mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
4.4 KiB

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