building cross compiler and "cannot find -lgcc_eh"

david.hagood@gmail.com david.hagood@gmail.com
Fri Jul 29 14:21:00 GMT 2011


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?" It seems to me that would be a very good
regression test. I realize there are a large number of unavoidable
cross-dependencies between compiler and run-time library, but it seems to
me a great number of issues could be smoothed over if GCC had a configure
parameter like "--build-stage-1" and/or GLIBC had a
"--building-with-stage-1" option. It might even end up that there would
have to be more than just a couple of stages: it might be "build GCC stage
1, build GLIBC stage 1, build GCC stage 2, build GLIBC stage 2". But if
that worked, it wouldn't be so bad.

Right now I feel like I'm trying to get the Babelfish - I make a small
step, and run into another road block. Cross compiling is too important to
the embedded world, and I find it boggling that these sorts of sharp edges
don't get rounded off.


(w.r.t. "why not use crosstool?" - I am trying to be able to archive all
significant aspects of a project, such that in 10 years, if needed, the
project can be picked up and worked on. Crosstool seems to make a lot of
assumptions about the existence of external servers, making archiving all
the patches, build scripts, etc. difficult. My ideal goal is what I call
the "Dr. Zaius school of release": should Dr. Zaius unearth my project
2000 years from now, he should be able to rebuild it. Yes, he's got to
have a computer and some minimal set of tools, but the smaller the
requirements of that set of tools the better.)




More information about the Libc-help mailing list