Re: cross-compilers and include-fixed... how does this work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 May 2011 19:39, Paul Smith wrote:
> Hi all.
>
> To try to restore my sanity after attempting to get a multiarch (i686 &
> x86_64) version of GCC 4.2.4 to build, I've decided to go with 4.5.2
> which compiles just fine for multiarch.  But I have a problem that seems
> like it would be common and I wonder how I'm intended to deal with it.
>
> I'm using --sysroot to compile code for a different target, with a very
> different set of headers and libraries than my build system.
>
> However, the contents of the include-fixed directory in my GCC 4.5.2
> installation are from the (very old) system that I built GCC on, while
> I'm trying to compile for a target with a much newer set of headers and
> libraries.  This is causing my builds to fail because the fixed includes
> are not matching up with the includes in the sysroot.
>
> For example, I compiled GCC 4.5.2 on a system running Red Hat EL 4 (very
> old!).  The contents of the 4.5.2 include-fixed directory, for example
> the features.h file, are thus ancient and don't have support for, for
> example, the 2008 POSIX spec.
>
> Now when I try to compile with a --sysroot for a newer target that does
> have this support, I can't enable it because features.h is being used
> from the old system, via include-fixed, not the sysroot.
>
>
> Can anyone explain how the interaction between include-fixed and
> cross-compiling is intended to work?

What is the output of 'gcc -v' ?

Did you actually build gcc as a cross-compiler using --target or
--with-sysroot at configure time?

It sounds like you've just built a native compiler on RHEL4 and are
only using --sysroot, which (if I understand correctly) doesn't make
it a cross-compiler, and gcc still assumes the target system is the
same as the host system where you're running the compiler, so the
include-fixed headers would still be valid for the target system.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux