Dave Williss wrote:
I'm trying to build a compiler hosted on an i386-apple-darwin8.9.1
with target of sparc64-sun-solaris2.9
It gets as far as trying to build libgcc and gets this error:
/usr/local/sparc-sun-solaris2.9/bin/ld:libgcc/./libgcc.map: file
format not recognized; treating as linker script
/usr/local/sparc-sun-solaris2.9/bin/ld:libgcc/./libgcc.map:1: syntax
error
The default linker for 'sparc*-solaris2*' target is the Sun one, even
with a crosscompiler! And the GNU one doesn't
understand the options for it....
I've setup a /usr/local/sparc-sun-solaris2.9 directory with the
/usr/include and /usr/lib of the target machine. I've also built
bintools 2.17 with the same host/target settings and they're in
/usr/local/sparc-sun-solaris2.9/bin.
I configured gcc with the following options...
--prefix=/usr/local/sparc-sun-solaris2.9 --enable-languages=c,c++
--with-sysroot=/usr/local/sparc-sun-solaris2.9
--target=sparc64-sun-solaris2.9
--with-build-time-tools=/usr/local/sparc-sun-solaris2.9/bin
--enable-version-specific-runtime-libs
What am I doing wrong here?
You forgot to tell that your linker is the GNU one, adding a
'--with-gnu-ld' and also '--with-gnu-as', is either
obligatory (for 'ld') or recommended (for 'as')...