Re: Mac OS X cross-compiler not finding system include files?

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

 



Kai Ruottu wrote:
> Maróy Ákos wrote:
> 
>> It seems that there's an issue with the Mac OS X gcc build process, so
>> that it automagically ads $prefix after $sysroot in the include search
>> path.
> 
> Everything seem to tell that the "Open Source" people in Apple haven't
> ever thought someone to crosscompile for MacOS X. So the Apple GCC
> sources like the :
> 
> http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5490.tar.gz
> 
> the given link gave, may be quite one-eyed'ly patched only for the
> native GCC case...
> 
>> for example, I re-compiled gcc with prefix=/opt/i686-apple-darwin9 and
>> sysroot=/foo/bar, and now I get:
>>
>> $ /opt/i686-apple-darwin9/libexec/gcc/i686-apple-darwin9/4.0.1/cc1plus -v
>> ignoring nonexistent directory
>> "/foo/bar/opt/i686-apple-darwin9/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/c++/4.0.1"
>> ignoring nonexistent directory
> 
> This would be '$sysroot/$prefix/include/c++/4.0.1' when the
> '/lib/gcc/i686-apple-darwin9/4.0.1/../../../..' (== '') is
> removed.  So the traditional '$prefix/include/c++/$gcc-version'
> as the install place for the common (for a GCC version) C++
> headers seems to been some starting point in this mess...
> 
> But despite of using the '--with-sysroot=$sysroot', the stuff
> built during the GCC build should still go into the $prefix
> install scheme - but this is only my opinion, what the '--with-sysroot'
> currently really does is unclear for me...

Ahhh, so you're saying that the Apple people have a patched version of gcc
and they've messed up the paths in their patches?  That would explain a lot.

Andrew.

[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