initial commit
[glibc.git] / debian / patches / hurd-i386 / git-mach-headers-freestanding.diff
1 commit 8b8c768e3c701ed1993789bb46acb8a12c7a93df
2 Author: Flavio Cruz <flaviocruz@gmail.com>
3 Date: Sun Dec 18 19:46:15 2022 -0500
4
5 Force use of -ffreestanding when checking for gnumach headers
6
7 Without this ./configure assumes that we are in a fully hosted
8 environment, which might not be the case. After this patch, we can rely on
9 the freestanding header files provided by GCC such as stdint.h.
10 Message-Id: <Y5+0V9osFc/zXMq0@mars>
11
12 commit 7685630b98ca2a3f5de86eadf130993e6cf998a0
13 Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
14 Date: Mon Dec 19 02:34:55 2022 +0100
15
16 mach: Fix passing -ffreestanding when checking for gnumach headers
17
18 8b8c768e3c70 ("Force use of -ffreestanding when checking for gnumach
19 headers") was passing -ffreestanding to CFLAGS only, but headers checks are
20 performed with the preprocessor, so we rather need to pass it to CPPFLAGS.
21
22 commit 0fb10e49ad169374650534509767ec1d4232e230
23 Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
24 Date: Mon Dec 19 02:38:38 2022 +0100
25
26 mach: Drop remnants of old_CFLAGS
27
28 ---
29 sysdeps/mach/configure | 9 ++++-----
30 sysdeps/mach/configure.ac | 7 +++----
31 2 files changed, 7 insertions(+), 9 deletions(-)
32
33 --- a/sysdeps/mach/configure
34 +++ b/sysdeps/mach/configure
35 @@ -127,12 +127,13 @@ fi
36 config_vars="$config_vars
37 MIG = $MIG"
38
39 +OLD_CPPFLAGS=$CPPFLAGS
40 if test -n "$sysheaders"; then
41 - OLD_CPPFLAGS=$CPPFLAGS
42 CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
43 fi
44
45 ### Sanity checks for Mach header installation
46 +CPPFLAGS="$CPPFLAGS -ffreestanding"
47
48
49 ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h"
50 @@ -521,6 +522,4 @@ if test $hurd_cv_mig_retcode = yes; then
51
52 fi
53
54 -if test -n "$sysheaders"; then
55 - CPPFLAGS=$OLD_CPPFLAGS
56 -fi
57 +CPPFLAGS=$OLD_CPPFLAGS
58 --- a/sysdeps/mach/configure.ac
59 +++ b/sysdeps/mach/configure.ac
60 @@ -6,12 +6,13 @@ if test "x$MIG" = xMISSING; then
61 fi
62 LIBC_CONFIG_VAR([MIG], [$MIG])
63
64 +OLD_CPPFLAGS=$CPPFLAGS
65 if test -n "$sysheaders"; then
66 - OLD_CPPFLAGS=$CPPFLAGS
67 CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
68 fi
69
70 ### Sanity checks for Mach header installation
71 +CPPFLAGS="$CPPFLAGS -ffreestanding"
72 AC_CHECK_HEADER(mach/mach_types.h,,
73 [AC_MSG_ERROR([cannot find Mach headers])], -)
74 AC_CHECK_HEADER(mach/mach_types.defs,, [dnl
75 @@ -130,6 +131,4 @@ fi])
76
77 hurd_MIG_RETCODE
78
79 -if test -n "$sysheaders"; then
80 - CPPFLAGS=$OLD_CPPFLAGS
81 -fi
82 +CPPFLAGS=$OLD_CPPFLAGS