"ld: cannot find -lgcc_eh"

Robert P. J. Day rpjday@mindspring.com
Sun Dec 5 16:57:00 GMT 2004

  yes, i know this has a known patch.  for my bleeding edge combo of
toolchain parts, the inline patch fixed the last problem (at least,
that's not where the build blew up this time.)

  now, it's (big snip coming here, 77000 lines in):

-lgcc -lgcc_eh

cannot find -lgcc_eh

  and, sure enough, we have

which appears to address that problem beautifully.  well, at least it
does with glibc-2.3.3, the patch being fairly strightforward -- get
rid of the library reference on that line in Makeconfig:


--- libc/Makeconfig.jj  2003-07-22 08:25:32.000000000 -0400
+++ libc/Makeconfig     2003-09-11 16:23:08.000000000 -0400
@@ -505,7 +505,7 @@ link-libc-bounded = $(common-objpfx)libc
 link-extra-libs-bounded = $(foreach

 ifndef gnulib
-gnulib := -lgcc -lgcc_eh
+gnulib := -lgcc
 ifeq ($(elf),yes)  +preinit = $(addprefix $(csu-objpfx),crti.o)


  but Makeconfig in glibc-20041204 has a more complicated structure at
that point:


ifndef gnulib
ifneq ($(have-as-needed),yes)
 libgcc_eh := -lgcc_eh
 libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix)
ifneq ($(have-cc-with-libunwind),yes)
 gnulib := -lgcc $(libgcc_eh)
 static-gnulib := -lgcc -lgcc_eh
 gnulib := -lgcc $(libgcc_eh) -lunwind
 static-gnulib := -lgcc -lgcc_eh -lunwind


  i'm open to suggestions as to the equivalent patch in *this*
Makeconfig file, and i'll give it a shot before i head out for lunch.


Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

More information about the crossgcc mailing list