yann@1: wget "http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2003-09&msgid=20030911190500.GE12344%40sunsite.ms.mff.cuni.cz" yann@1: aka http://sources.redhat.com/ml/libc-alpha/2003-09/msg00104.html yann@1: yann@1: This seems to fix the error yann@1: gcc-3.4.1-glibc-2.3.3/lib/gcc/powerpc-7400-linux-gnu/3.4.1/../../../../powerpc-7400-linux-gnu/bin/ld: cannot find -lgcc_eh yann@1: make[1]: *** [build/powerpc-7400-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/libc.so] Error 1 yann@1: but I assume it might cause trouble with nptl yann@1: FIXME: once we figure out why this patch is wrong, fix it right :-) yann@1: yann@1: Date: Thu, 11 Sep 2003 21:05:00 +0200 yann@1: From: Jakub Jelinek yann@1: To: libc-alpha at sources dot redhat dot com yann@1: Subject: Re: Another ugly bootstrapping patch for libgcc_eh yann@1: Message-ID: <20030911190500.GE12344@sunsite.ms.mff.cuni.cz> yann@1: Reply-To: Jakub Jelinek yann@1: References: <20030911194944.GA6104@nevyn.them.org> <20030911180703.GD12344@sunsite.ms.mff.cuni.cz> <20030911203621.GA31503@nevyn.them.org> yann@1: In-Reply-To: <20030911203621 dot GA31503 at nevyn dot them dot org> yann@1: yann@1: On Thu, Sep 11, 2003 at 04:36:21PM -0400, Daniel Jacobowitz wrote: yann@1: > > Why exactly do you need that? yann@1: > > What exact library needs the functions from libgcc_eh.a? yann@1: > > There shouldn't be any these days (__register_*/__frame_state_for etc. yann@1: > > functions should come from sysdeps/generic on arches which need them, yann@1: > > _Unwind_* come from unwind*.c). yann@1: > > IMHO both: yann@1: > > yann@1: > > # Force the backward compatibility EH functions to be linked. yann@1: > > LDFLAGS-c.so += -u __register_frame yann@1: > > yann@1: > > in Makerules and -lgcc_eh in Makeconfig should go. yann@1: > yann@1: > If you say so. That -lgcc_eh's been in and out quite a number of yann@1: > times. I was just assuming that it was necessary. yann@1: yann@1: I have been testing following patch on hammer. yann@1: linuxthreads built just fine and NPTL libraries too, yann@1: and in both cases libraries had the same exported symbols as without yann@1: the patch (though its .text slightly shrunk because it no longer contained yann@1: unneeded libgcc_eh routines (and also libc.so has fewer .plt slots). yann@1: Unfortunately, sln in NPTL build doesn't link, as libgcc_eh.a is needed yann@1: in this case. yann@1: So, IMHO we need my Makerules change and Daniel's patch. yann@1: yann@1: 2003-09-11 Jakub Jelinek yann@1: yann@1: #* Makerules (LDFLAGS-c.so): Remove -u __register_frame. yann@1: * Makeconfig (gnulib): Remove -lgcc_eh. yann@1: yann@1: # Ulrich already applied this. yann@1: #--- libc/Makerules.jj 2003-07-23 03:56:16.000000000 -0400 yann@1: #+++ libc/Makerules 2003-09-11 16:22:44.000000000 -0400 yann@1: #@@ -572,8 +572,6 @@ LDFLAGS-c.so = -nostdlib -nostartfiles yann@1: # LDLIBS-c.so += $(gnulib) yann@1: # # Give libc.so an entry point and make it directly runnable itself. yann@1: # LDFLAGS-c.so += -e __libc_main yann@1: #-# Force the backward compatibility EH functions to be linked. yann@1: #-LDFLAGS-c.so += -u __register_frame yann@1: # # Pre-link the objects of libc_pic.a so that we can locally resolve yann@1: # # COMMON symbols before we link against ld.so. This is because ld.so yann@1: # # contains some of libc_pic.a already, which will prevent the COMMONs yann@1: --- libc/Makeconfig.jj 2003-07-22 08:25:32.000000000 -0400 yann@1: +++ libc/Makeconfig 2003-09-11 16:23:08.000000000 -0400 yann@1: @@ -505,7 +505,7 @@ link-libc-bounded = $(common-objpfx)libc yann@1: link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a) yann@1: yann@1: ifndef gnulib yann@1: -gnulib := -lgcc -lgcc_eh yann@1: +gnulib := -lgcc yann@1: endif yann@1: ifeq ($(elf),yes) yann@1: +preinit = $(addprefix $(csu-objpfx),crti.o) yann@1: yann@1: yann@1: Jakub yann@1: