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