Dear Kay & Andrew,
Thank you for your detailed explanation of the sysroot concept. Indeed,
I'm using the system libraries from the Apple XCode package for this
purpose.
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.
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
"/foo/bar/opt/i686-apple-darwin9/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/c++/4.0.1/i686-apple-darwin9"
ignoring nonexistent directory
"/foo/bar/opt/i686-apple-darwin9/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/c++/4.0.1/backward"
ignoring nonexistent directory "/foo/bar/usr/local/include"
ignoring nonexistent directory
"/foo/bar/opt/i686-apple-darwin9/lib/gcc/i686-apple-darwin9/4.0.1/include"
ignoring nonexistent directory
"/foo/bar/opt/i686-apple-darwin9/lib/gcc/i686-apple-darwin9/4.0.1/../../../../i686-apple-darwin9/include"
ignoring nonexistent directory "/foo/bar/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/foo/bar/usr/include
/foo/bar/System/Library/Frameworks (framework directory)
End of search list.
where in fact all of the files are there, not in
/foo/bar/opt/i686-apple-darwin9, ($sysroot/$prefix) but in /foo/bar
($sysroot)
if I wanted to fix / patch this, where would I look in the gcc source
code tree?
Akos