This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Another ugly bootstrapping patch for libgcc_eh
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 11 Sep 2003 15:49:45 -0400
- Subject: Another ugly bootstrapping patch for libgcc_eh
Some months ago, when I updated our local bootstrapping procedure to use
glibc 2.3.2, I posted a patch that changed a check for a function in
-lgcc_eh to check also in -lgcc. The problem is that the functions we need
are built even if GCC is configured --disable-shared, but they go into -lgcc
instead of into -lgcc_eh.
The same problem cropped up again, so here's a second patch. It correctly
detects libgcc_eh on my host and correctly doesn't detect it for my cross
build. OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-09-11 Daniel Jacobowitz <drow@mvista.com>
* Makeconfig (gnulib): Use $(libgcc-eh).
* config.make (libgcc-eh): Define.
* configure.in: Check for libgcc_eh.a.
* configure: Regenerated.
diff -urp glibc-2.3.2/Makeconfig glibc-2.3.2.work/Makeconfig
--- glibc-2.3.2/Makeconfig 2003-09-11 15:16:17.000000000 -0400
+++ glibc-2.3.2.work/Makeconfig 2003-09-11 12:14:50.000000000 -0400
@@ -505,7 +505,7 @@ link-libc-bounded = $(common-objpfx)libc
link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
ifndef gnulib
-gnulib := -lgcc -lgcc_eh
+gnulib := -lgcc $(libgcc-eh)
endif
ifeq ($(elf),yes)
+preinit = $(addprefix $(csu-objpfx),crti.o)
diff -urp glibc-2.3.2/config.make.in glibc-2.3.2.work/config.make.in
--- glibc-2.3.2/config.make.in 2003-09-11 15:16:25.000000000 -0400
+++ glibc-2.3.2.work/config.make.in 2003-09-11 12:14:31.000000000 -0400
@@ -55,6 +55,7 @@ enable-check-abi = @enable_check_abi@
have-forced-unwind = @libc_cv_forced_unwind@
static-libgcc = @libc_cv_gcc_static_libgcc@
+libgcc-eh = @libgcc_eh@
versioning = @VERSIONING@
oldest-abi = @oldest_abi@
diff -urp glibc-2.3.2/configure.in glibc-2.3.2.work/configure.in
--- glibc-2.3.2/configure.in 2003-09-11 15:16:26.000000000 -0400
+++ glibc-2.3.2.work/configure.in 2003-09-11 12:17:15.000000000 -0400
@@ -1652,6 +1652,30 @@
fi
fi
+AC_CACHE_CHECK(for libgcc_eh.a, libgcc_cv_libgcc_eh,
+[cat > conftest.c <<EOF
+#line $LINENO "configure"
+_start ()
+{
+}
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ -nostdlib -nostartfiles -o conftest conftest.c
+ -lgcc -lgcc_eh -lgcc])
+then
+ libgcc_cv_libgcc_eh=yes
+else
+ libgcc_cv_libgcc_eh=no
+fi
+rm -f conftest*])
+if test $libgcc_cv_libgcc_eh = yes
+then
+ libgcc_eh=-lgcc_eh
+else
+ libgcc_eh=
+fi
+AC_SUBST(libgcc_eh)
+
AC_CACHE_CHECK(for DWARF2 unwind info support, libc_cv_gcc_dwarf2_unwind_info,
[cat > conftest.c <<EOF
#line $LINENO "configure"