source: clfs-sysroot/patches/glibc-2.8-libgcc_eh-1.patch@ 63c1d49

Last change on this file since 63c1d49 was 2270211, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Update Patches in the book.

  • Property mode set to 100644
File size: 4.5 KB
RevLine 
[2270211]1Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
2Date: 2006-11-09
3Initial Package Version: 2.5
4Origin: Joe Ciccone
5Upstream Status: Unknown
6Description: Checks to see if libgcc_eh has been provided by gcc. If it has
7 the glibc will attempt to link to it.
8
9 Rediffed for 2.7 by Jim Gifford
10 Rediffed for 2.8 by Joe Ciccone
11
12diff -Naur glibc-2.8.orig/configure.in glibc-2.8/configure.in
13--- glibc-2.8.orig/configure.in 2008-04-11 13:52:55.000000000 -0400
14+++ glibc-2.8/configure.in 2008-09-20 12:06:26.000000000 -0400
15@@ -1395,6 +1395,23 @@
16 AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
17 fi
18
19+ AC_CACHE_CHECK(whether to link against libgcc_eh,
20+ libc_cv_cc_with_libgcc_eh, [
21+ cat > conftest.c <<EOF
22+int main (void) { return 0; }
23+EOF
24+ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
25+ conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
26+ libc_cv_cc_with_libgcc_eh=yes
27+ else
28+ libc_cv_cc_with_libgcc_eh=no
29+ fi
30+ rm -f conftest*])
31+ AC_SUBST(libc_cv_cc_with_libgcc_eh)
32+ if test $libc_cv_cc_with_libgcc_eh = yes; then
33+ AC_DEFINE(HAVE_CC_WITH_LIBGCC_EH)
34+ fi
35+
36 AC_CACHE_CHECK(for -z nodelete option,
37 libc_cv_z_nodelete, [dnl
38 cat > conftest.c <<EOF
39diff -Naur glibc-2.8.orig/Makeconfig glibc-2.8/Makeconfig
40--- glibc-2.8.orig/Makeconfig 2008-01-31 19:01:12.000000000 -0500
41+++ glibc-2.8/Makeconfig 2008-09-20 12:06:26.000000000 -0400
42@@ -525,12 +525,20 @@
43 libunwind = -lunwind
44 endif
45 ifneq ($(have-as-needed),yes)
46+ifneq ($(have-cc-with-libgcc_eh),yes)
47+ libgcc_eh := $(libunwind)
48+else
49 libgcc_eh := -lgcc_eh $(libunwind)
50+endif
51 else
52 libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
53 endif
54 gnulib := -lgcc $(libgcc_eh)
55-static-gnulib := -lgcc -lgcc_eh $(libunwind)
56+ifneq ($(have-cc-with-libgcc_eh),yes)
57+ static-gnulib := -lgcc $(libunwind)
58+else
59+ static-gnulib := -lgcc -lgcc_eh $(libunwind)
60+endif
61 libc.so-gnulib := -lgcc
62 endif
63 ifeq ($(elf),yes)
64diff -Naur glibc-2.8.orig/config.make.in glibc-2.8/config.make.in
65--- glibc-2.8.orig/config.make.in 2007-08-25 18:25:24.000000000 -0400
66+++ glibc-2.8/config.make.in 2008-09-20 12:06:26.000000000 -0400
67@@ -60,6 +60,7 @@
68 have-libaudit = @have_libaudit@
69 have-libcap = @have_libcap@
70 have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
71+have-cc-with-libgcc_eh = @libc_cv_cc_with_libgcc_eh@
72 fno-unit-at-a-time = @fno_unit_at_a_time@
73 bind-now = @bindnow@
74 have-hash-style = @libc_cv_hashstyle@
75diff -Naur glibc-2.8.orig/configure glibc-2.8/configure
76--- glibc-2.8.orig/configure 2008-09-01 16:01:43.000000000 -0400
77+++ glibc-2.8/configure 2008-09-20 12:06:26.000000000 -0400
78@@ -716,6 +716,7 @@
79 BISON
80 VERSIONING
81 libc_cv_cc_with_libunwind
82+libc_cv_cc_with_libgcc_eh
83 libc_cv_Bgroup
84 libc_cv_libgcc_s_suffix
85 libc_cv_as_needed
86@@ -6052,6 +6053,33 @@
87
88 fi
89
90+ { echo "$as_me:$LINENO: checking whether to link against libgcc_eh" >&5
91+echo $ECHO_N "checking whether to link against libgcc_eh... $ECHO_C" >&6; }
92+if test "${libc_cv_cc_with_libgcc_eh+set}" = set; then
93+ echo $ECHO_N "(cached) $ECHO_C" >&6
94+else
95+
96+ cat > conftest.c <<EOF
97+int main (void) { return 0; }
98+EOF
99+ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
100+ conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
101+ libc_cv_cc_with_libgcc_eh=yes
102+ else
103+ libc_cv_cc_with_libgcc_eh=no
104+ fi
105+ rm -f conftest*
106+fi
107+{ echo "$as_me:$LINENO: result: $libc_cv_cc_with_libgcc_eh" >&5
108+echo "${ECHO_T}$libc_cv_cc_with_libgcc_eh" >&6; }
109+
110+ if test $libc_cv_cc_with_libgcc_eh = yes; then
111+ cat >>confdefs.h <<\_ACEOF
112+#define HAVE_CC_WITH_LIBGCC_EH 1
113+_ACEOF
114+
115+ fi
116+
117 { echo "$as_me:$LINENO: checking for -z nodelete option" >&5
118 echo $ECHO_N "checking for -z nodelete option... $ECHO_C" >&6; }
119 if test "${libc_cv_z_nodelete+set}" = set; then
120@@ -9250,6 +9278,7 @@
121 BISON!$BISON$ac_delim
122 VERSIONING!$VERSIONING$ac_delim
123 libc_cv_cc_with_libunwind!$libc_cv_cc_with_libunwind$ac_delim
124+libc_cv_cc_with_libgcc_eh!$libc_cv_cc_with_libgcc_eh$ac_delim
125 libc_cv_Bgroup!$libc_cv_Bgroup$ac_delim
126 libc_cv_libgcc_s_suffix!$libc_cv_libgcc_s_suffix$ac_delim
127 libc_cv_as_needed!$libc_cv_as_needed$ac_delim
128@@ -9301,7 +9330,7 @@
129 LTLIBOBJS!$LTLIBOBJS$ac_delim
130 _ACEOF
131
132- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
133+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 53; then
134 break
135 elif $ac_last_try; then
136 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Note: See TracBrowser for help on using the repository browser.