source: patches/glibc-2.7-libgcc_eh-1.patch@ 82610ce

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 82610ce was bfb94b2, checked in by Jim Gifford <clfs@…>, 17 years ago

Updated to Glibc 2.7

  • Property mode set to 100644
File size: 4.4 KB
RevLine 
[bfb94b2]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
11diff -Naur glibc-2.7.orig/Makeconfig glibc-2.7/Makeconfig
12--- glibc-2.7.orig/Makeconfig 2007-07-05 15:03:47.000000000 -0700
13+++ glibc-2.7/Makeconfig 2007-10-20 15:23:21.000000000 -0700
14@@ -524,12 +524,20 @@
15 libunwind = -lunwind
16 endif
17 ifneq ($(have-as-needed),yes)
18+ifneq ($(have-cc-with-libgcc_eh),yes)
19+ libgcc_eh := $(libunwind)
20+else
21 libgcc_eh := -lgcc_eh $(libunwind)
22+endif
23 else
24 libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
25 endif
26 gnulib := -lgcc $(libgcc_eh)
27-static-gnulib := -lgcc -lgcc_eh $(libunwind)
28+ifneq ($(have-cc-with-libgcc_eh),yes)
29+ static-gnulib := -lgcc $(libunwind)
30+else
31+ static-gnulib := -lgcc -lgcc_eh $(libunwind)
32+endif
33 libc.so-gnulib := -lgcc
34 endif
35 ifeq ($(elf),yes)
36diff -Naur glibc-2.7.orig/config.make.in glibc-2.7/config.make.in
37--- glibc-2.7.orig/config.make.in 2007-08-25 15:25:24.000000000 -0700
38+++ glibc-2.7/config.make.in 2007-10-20 15:23:21.000000000 -0700
39@@ -60,6 +60,7 @@
40 have-libaudit = @have_libaudit@
41 have-libcap = @have_libcap@
42 have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
43+have-cc-with-libgcc_eh = @libc_cv_cc_with_libgcc_eh@
44 fno-unit-at-a-time = @fno_unit_at_a_time@
45 bind-now = @bindnow@
46 have-hash-style = @libc_cv_hashstyle@
47diff -Naur glibc-2.7.orig/configure glibc-2.7/configure
48--- glibc-2.7.orig/configure 2007-10-18 04:22:23.000000000 -0700
49+++ glibc-2.7/configure 2007-10-20 21:26:18.000000000 -0700
50@@ -716,6 +716,7 @@
51 BISON
52 VERSIONING
53 libc_cv_cc_with_libunwind
54+libc_cv_cc_with_libgcc_eh
55 libc_cv_Bgroup
56 libc_cv_libgcc_s_suffix
57 libc_cv_as_needed
58@@ -6045,6 +6046,33 @@
59
60 fi
61
62+ { echo "$as_me:$LINENO: checking whether to link against libgcc_eh" >&5
63+echo $ECHO_N "checking whether to link against libgcc_eh... $ECHO_C" >&6; }
64+if test "${libc_cv_cc_with_libgcc_eh+set}" = set; then
65+ echo $ECHO_N "(cached) $ECHO_C" >&6
66+else
67+
68+ cat > conftest.c <<EOF
69+int main (void) { return 0; }
70+EOF
71+ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
72+ conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
73+ libc_cv_cc_with_libgcc_eh=yes
74+ else
75+ libc_cv_cc_with_libgcc_eh=no
76+ fi
77+ rm -f conftest*
78+fi
79+{ echo "$as_me:$LINENO: result: $libc_cv_cc_with_libgcc_eh" >&5
80+echo "${ECHO_T}$libc_cv_cc_with_libgcc_eh" >&6; }
81+
82+ if test $libc_cv_cc_with_libgcc_eh = yes; then
83+ cat >>confdefs.h <<\_ACEOF
84+#define HAVE_CC_WITH_LIBGCC_EH 1
85+_ACEOF
86+
87+ fi
88+
89 { echo "$as_me:$LINENO: checking for -z nodelete option" >&5
90 echo $ECHO_N "checking for -z nodelete option... $ECHO_C" >&6; }
91 if test "${libc_cv_z_nodelete+set}" = set; then
92@@ -9243,6 +9271,7 @@
93 BISON!$BISON$ac_delim
94 VERSIONING!$VERSIONING$ac_delim
95 libc_cv_cc_with_libunwind!$libc_cv_cc_with_libunwind$ac_delim
96+libc_cv_cc_with_libgcc_eh!$libc_cv_cc_with_libgcc_eh$ac_delim
97 libc_cv_Bgroup!$libc_cv_Bgroup$ac_delim
98 libc_cv_libgcc_s_suffix!$libc_cv_libgcc_s_suffix$ac_delim
99 libc_cv_as_needed!$libc_cv_as_needed$ac_delim
100@@ -9294,7 +9323,7 @@
101 LTLIBOBJS!$LTLIBOBJS$ac_delim
102 _ACEOF
103
104- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
105+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 53; then
106 break
107 elif $ac_last_try; then
108 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
109diff -Naur glibc-2.7.orig/configure.in glibc-2.7/configure.in
110--- glibc-2.7.orig/configure.in 2007-06-07 20:16:36.000000000 -0700
111+++ glibc-2.7/configure.in 2007-10-20 15:23:21.000000000 -0700
112@@ -1388,6 +1388,23 @@
113 AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
114 fi
115
116+ AC_CACHE_CHECK(whether to link against libgcc_eh,
117+ libc_cv_cc_with_libgcc_eh, [
118+ cat > conftest.c <<EOF
119+int main (void) { return 0; }
120+EOF
121+ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
122+ conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
123+ libc_cv_cc_with_libgcc_eh=yes
124+ else
125+ libc_cv_cc_with_libgcc_eh=no
126+ fi
127+ rm -f conftest*])
128+ AC_SUBST(libc_cv_cc_with_libgcc_eh)
129+ if test $libc_cv_cc_with_libgcc_eh = yes; then
130+ AC_DEFINE(HAVE_CC_WITH_LIBGCC_EH)
131+ fi
132+
133 AC_CACHE_CHECK(for -z nodelete option,
134 libc_cv_z_nodelete, [dnl
135 cat > conftest.c <<EOF
136
Note: See TracBrowser for help on using the repository browser.