Hi All,
I am trying to build gcc/binutils on my mac laptop in a similar way that
I do on my linux boxes. I am running into some trouble... I *think* my
basic question is: what build/target/host options do I need for binutils
and gcc for it to work on the system? My normal linux procedure is to
do something like:
in binutils, ./configure --prefix=$prefix --disable-shared
--disable-nls; make; make install;
in gcc, ./configure --prefix=$prefix --disable-shared
--disable-nls --enable-languages=c,c++; make; make install;
On my linux boxes this gives me a working binutils/gcc placed in $prefix
that has no shared libraries and the gcc knows to use the binutils from
inside $prefix. This is what I would like to duplicate on my mac system
if possible, but I have read hints here and there that suggest there is
something about the mach-O files that binutils has a hard time with?
Any hints where to look next is greatly appreciated!
The macbook has the following:
uname -a = Darwin uncompahgre 12.3.0 Darwin Kernel Version 12.3.0: Sun
Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
uname -m = x86_64
uname -r = 12.3.0
uname -s = Darwin
uname -p = i386
It also has the gcc that came installed with xcode:
# gcc --v
Using built-in specs.
Target: i686-apple-darwin11
Configured with:
/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/src/configure
--disable-checking --enable-werror
--prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin11
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/dst-llvmCore/Developer/usr/local
--program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
I can build xgcc with the existing tolchain, but then it fails trying to
configure libgomp on the next phase saying it can't create an executable.
Thanks!
Tim