This is the mail archive of the
mailing list for the GCC project.
Re: building cross compiler and "cannot find -lgcc_eh"
- From: Ian Lance Taylor <iant at google dot com>
- To: david dot hagood at gmail dot com
- Cc: gcc-help at gcc dot gnu dot org, libc-help at sourceware dot org
- Date: Fri, 29 Jul 2011 07:53:01 -0700
- Subject: Re: building cross compiler and "cannot find -lgcc_eh"
- References: <51ecffed248b7117b9de06294731b940.squirrel@localhost>
> I am trying to build a set of cross compilation tools (and for reasons too
> long to go into cannot "just use crosstools" - see end of message). Using
> GCC 4.6.1, GLIB 2.14, and binutils 2.20.1, on the build of GLIBC using the
> stage 1 cross compiler I get the "ld: cannot find -lgcc_eh" error, because
> GCC didn't build it.
> How can I get the stage 1 build of GCC to create libgcc_eh? Or
> alternatively, how can I get GLIBC to not try to use libgcc_eh?
> A deeper question is "do none of the people actively developing GCC and
> GLIBC ever do cross compiles?"
We do. We use complex scripts to make it work. You have chosen to
avoid using those scripts, so now you have to, in effect, recreate them.
One procedure is to build the stage1 gcc with --disable-libgcc, use that
to build a stub glibc, use that to build the stage2 gcc, which this time
will get a libgcc_eh, and use that to build the final glibc. Building a
stub glibc means just building the startup files and an empty shared
Some background at http://www.airs.com/blog/archives/492 .