I am wondering if there are any alternatives to resorting to 
--with-native-system-header-dir= for building FSF gcc
on darwin once the SDK is removed from the / and only resides in the buried SDK 
directory. The FSF gcc bootstrap fails
in the absence of /usr/include in the fixincludes step unless I use...

Using built-in specs.
COLLECT_GCC=/sw/lib/gcc4.8/bin/gcc-fsf-4.8
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.8/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin13.0.0
Configured with: ../gcc-4.8.1/configure --prefix=/sw --prefix=/sw/lib/gcc4.8 
--mandir=/sw/share/man --infodir=/sw/lib/gcc4.8/info 
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw 
--with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw --with-mpc=/sw 
--with-system-zlib --enable-checking=release --x-includes=/usr/X11R6/include 
--x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.8 
--with-native-system-header-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include
 'CXX_FOR_BUILD=xcrun g++' 'CC_FOR_BUILD=xcrun gcc' CXXFLAGS='-O2 -g 
-iframework 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/System/Library/Frameworks'
Thread model: posix
gcc version 4.8.1 (GCC) 

however this breaks -isysroot as...

$ /sw/lib/gcc4.8/bin/gcc-fsf-4.8 -isysroot 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk himenoBMTxpa.c -v
Using built-in specs.
COLLECT_GCC=/sw/lib/gcc4.8/bin/gcc-fsf-4.8
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.8/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin13.0.0
Configured with: ../gcc-4.8.1/configure --prefix=/sw --prefix=/sw/lib/gcc4.8 
--mandir=/sw/share/man --infodir=/sw/lib/gcc4.8/info 
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw 
--with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw --with-mpc=/sw 
--with-system-zlib --enable-checking=release --x-includes=/usr/X11R6/include 
--x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.8 
--with-native-system-header-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include
 'CXX_FOR_BUILD=xcrun g++' 'CC_FOR_BUILD=xcrun gcc' CXXFLAGS='-O2 -g 
-iframework 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/System/Library/Frameworks'
Thread model: posix
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.9.0' '-isysroot' 
'/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk' '-v' '-mtune=core2'
 /sw/lib/gcc4.8/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.1/cc1 -quiet -v 
-D__DYNAMIC__ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk 
himenoBMTxpa.c -fPIC -quiet -dumpbase himenoBMTxpa.c 
-mmacosx-version-min=10.9.0 -mtune=core2 -auxbase himenoBMTxpa -version -o 
/var/folders/l7/2pphc9xd69n5nwbdv44z_knw0000gn/T//ccg2ZqTW.s
GNU C (GCC) version 4.8.1 (x86_64-apple-darwin13.0.0)
        compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, 
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory 
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/local/include"
ignoring nonexistent directory 
"/sw/lib/gcc4.8/lib/gcc/x86_64-apple-darwin13.0.0/4.8.1/../../../../x86_64-apple-darwin13.0.0/include"
ignoring nonexistent directory 
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include"
ignoring nonexistent directory 
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /sw/lib/gcc4.8/lib/gcc/x86_64-apple-darwin13.0.0/4.8.1/include
 /sw/lib/gcc4.8/include
 /sw/lib/gcc4.8/lib/gcc/x86_64-apple-darwin13.0.0/4.8.1/include-fixed
 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/System/Library/Frameworks
End of search list.
GNU C (GCC) version 4.8.1 (x86_64-apple-darwin13.0.0)
        compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2, 
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 77506ba0a077461bca132d88745bf397
himenoBMTxpa.c:39:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.

the search path now duplicates the path to the SDK such that you get a search 
for headers in...

/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include

instead of...

/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include

Am I misusing, --with-native-system-header-dir or does it is really 
incompatible with -isysroot if --with-native-system-header-dir 
is anything other than /. Thanks in advance for any suggestions.
                 Jack

Reply via email to