summaryrefslogtreecommitdiff
blob: ff9b42bf96c99bb8111ce377ebe7096767324246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Some notes on the 'bootstrap with or without libc headers' debate:
http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html

--- gcc/configure.in
+++ gcc/configure.in
@@ -1276,8 +1276,9 @@
 # This prevents libgcc2 from containing any code which requires libc
 # support.
 inhibit_libc=
-if { test x$host != x$target && test "x$with_headers" = x &&
-     test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
+if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
+       test x$with_newlib = xyes ; } &&
+     { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
        inhibit_libc=-Dinhibit_libc
 fi
 AC_SUBST(inhibit_libc)
--- gcc/configure
+++ gcc/configure
@@ -1276,8 +1276,9 @@
 # This prevents libgcc2 from containing any code which requires libc
 # support.
 inhibit_libc=
-if { test x$host != x$target && test "x$with_headers" = x &&
-     test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
+if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
+       test x$with_newlib = xyes ; } &&
+     { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
        inhibit_libc=-Dinhibit_libc
 fi
 AC_SUBST(inhibit_libc)
--- gcc/config/alpha/linux.h
+++ gcc/config/alpha/linux.h
@@ -72,6 +72,7 @@
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
 
+#ifndef inhibit_libc
 #ifdef IN_LIBGCC2
 #include <signal.h>
 #include <sys/ucontext.h>
@@ -121,3 +122,4 @@
     (FS)->retaddr_column = 64;						\
     goto SUCCESS;							\
   } while (0)
+#endif /* inhibit_libc */
--- gcc/config/i386/linux.h
+++ gcc/config/i386/linux.h
@@ -240,6 +240,7 @@
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
 
+#ifndef inhibit_libc
 #ifdef IN_LIBGCC2
 /* There's no sys/ucontext.h for some (all?) libc1, so no
    signal-turned-exceptions for them.  There's also no configure-run for
@@ -304,3 +305,4 @@
   } while (0)
 #endif /* not USE_GNULIBC_1 */
 #endif /* IN_LIBGCC2 */
+#endif /* inhibit_libc */