This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building cross compiler and "cannot find -lgcc_eh"


david.hagood@gmail.com writes:

> 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
libc.so.

Some background at http://www.airs.com/blog/archives/492 .

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]