diff -Naur glibc-2.11.orig/Makeconfig glibc-2.11/Makeconfig
--- glibc-2.11.orig/Makeconfig	2009-10-30 13:17:08.000000000 -0400
+++ glibc-2.11/Makeconfig	2009-11-13 12:14:18.000000000 -0500
@@ -538,12 +538,20 @@
   libunwind = -lunwind
 endif
 ifneq ($(have-as-needed),yes)
- libgcc_eh := -lgcc_eh $(libunwind)
+ ifneq ($(have-cc-with-libgcc_eh),yes)
+  libgcc_eh := $(libunwind)
+ else
+  libgcc_eh := -lgcc_eh $(libunwind)
+ endif
 else
  libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
 endif
 gnulib := -lgcc $(libgcc_eh)
-static-gnulib := -lgcc -lgcc_eh $(libunwind)
+ifneq ($(have-cc-with-libgcc_eh),yes)
+ static-gnulib := -lgcc $(libunwind)
+else
+ static-gnulib := -lgcc -lgcc_eh $(libunwind)
+endif
 libc.so-gnulib := -lgcc
 endif
 ifeq ($(elf),yes)
diff -Naur glibc-2.11.orig/config.make.in glibc-2.11/config.make.in
--- glibc-2.11.orig/config.make.in	2009-10-30 13:17:08.000000000 -0400
+++ glibc-2.11/config.make.in	2009-11-13 12:14:18.000000000 -0500
@@ -64,6 +64,7 @@
 have-libaudit = @have_libaudit@
 have-libcap = @have_libcap@
 have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
+have-cc-with-libgcc_eh = @libc_cv_cc_with_libgcc_eh@
 fno-unit-at-a-time = @fno_unit_at_a_time@
 bind-now = @bindnow@
 have-hash-style = @libc_cv_hashstyle@
diff -Naur glibc-2.11.orig/configure.in glibc-2.11/configure.in
--- glibc-2.11.orig/configure.in	2009-10-30 13:17:08.000000000 -0400
+++ glibc-2.11/configure.in	2009-11-13 12:14:18.000000000 -0500
@@ -1505,6 +1505,23 @@
     AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
   fi
 
+  AC_CACHE_CHECK(whether to link against libgcc_eh,
+                 libc_cv_cc_with_libgcc_eh, [
+    cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+    if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
+       conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
+      libc_cv_cc_with_libgcc_eh=yes
+    else
+      libc_cv_cc_with_libgcc_eh=no
+    fi
+    rm -f conftest*])
+  AC_SUBST(libc_cv_cc_with_libgcc_eh)
+  if test $libc_cv_cc_with_libgcc_eh = yes; then
+    AC_DEFINE(HAVE_CC_WITH_LIBGCC_EH)
+  fi
+
   AC_CACHE_CHECK(for -z nodelete option,
 		 libc_cv_z_nodelete, [dnl
   cat > conftest.c <<EOF
