cpp found limits.h in FIXED_INCLUDE_DIR, but not in STANDARD_INCLUDE_DIR
Jay
jay.krell@cornell.edu
Tue Sep 16 18:40:00 GMT 2008
> hmm... actually i was cross compiling a native compiler.
> ie. cbuild=x86, chost=mipsel, ctarget=mipsel
> If you have a C library for your target system which provides
> limits.h, then you need to use the --with-sysroot option when
> configuring gcc to tell it where to find the target C library.
Because host == target, even though they != build,
the build system gets confused and doesn't follow "cross compiler" logic.
Fixincludes in particular does not handle this situation correctly.
See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37036
The bug contains my lame workaround:
configure -with-syroot=/ -with-build-sysroot=/usr/local/platform/sys-root
The analysis in the bug was based on 4.3.x and I haven't revisited with 4.4.
As the bug says, fixincludes is in a unique spot.
Normally when you are building Canadian and already built the
corresponding build=>host cross compiler, the build system doesn't need
to find the host headers/libs, as the cross compiler being used already
was configured to find them automatically (probably with -with-sysroot=/usr/local/platform/sys-root
or just -with-sysroot, which defaults to that; though note that -with-build-sysroot
has no such default, it defaults to "yes" which is worthless.)
While I believe I understand this build/host/target stuff fairly well,
I do NOT know how to discuss it in a way that is understandable. :)
There's (necessarily) too many compilers and no short clear way to refer to them.
The DIY-Linux folks have a tricky where they alter the "vendor" in the platform
string to force cross logic. I wonder if that is a very good idea and should
be more broadly used..
That may help you here:
configure -host mips-foo-linux -target mips-bar-linux ????
I'm very unsure, haven't tried such and I already have a workaround.
You sure host=mips?
As far as I know, there isn't much compiler hostable MIPS hardware these days.
Maybe old SGI machines? Or an emulator?
(Or Playstation2??)
- Jay
More information about the Gcc
mailing list