Hi All
I'm hoping one of the experts here can help me out with this problem...
I've built a Linux to Sun cross compiler using gcc-3.4.4. I've done this
before and had it work, but some problems have cropped up.... In the past
I've been able to build simple programs (ie - "Hello World") on linux and
execute them under Solaris on Sparc hardware, but it's quit working.
I'm using gcc-3.4.4 configured as follows:
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/sparc-sun-solaris2.9/bin/g++
-v
Reading specs from
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/specs
Configured with:
../gcc-3.4.4/configure --host=i686-pc-linux-gnu --target=sparc-sun-solaris2.9
--with-sysroot=/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot
--with-gnu-as --with-gnu-ld --enable-languages=c,c++ --prefix=/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc
Thread model: posix
gcc version 3.4.4
[EMAIL PROTECTED] helloworld]$
The "sysroot" directory contains all of the goodies from /usr/lib,
/usr/include, etc from a Sun box running Solaris 9. I can send a complete
file list if anyone wants it I was really careful to make sure that all of
the symlinks that were in these directories on the Sun machine were
preserved. When I try to build a simple hello world program:
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
I get the following errors:
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/../../../../sparc-sun-solaris2.9/bin/ld:
skipping incompatible
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot/lib/libm.so when
searching for -lm
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/../../../../sparc-sun-solaris2.9/bin/ld:
skipping incompatible
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot/lib/libm.a when
searching for -lm
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/../../../../sparc-sun-solaris2.9/bin/ld:
skipping incompatible
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot/lib/libc.so when
searching for -lc
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/../../../../sparc-sun-solaris2.9/bin/ld:
skipping incompatible
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot/lib/libc.a when
searching for -lc
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/../../../../sparc-sun-solaris2.9/bin/ld:
skipping incompatible
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot/lib/libc.so when
searching for -lc
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/../../../../sparc-sun-solaris2.9/bin/ld:
skipping incompatible
/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc-build/sysroot/lib/libc.a when
searching for -lc
(when compiling more complex examples I get a similar problem for -lrt)
Can anyone shed some light on this? I've done some googling and turned up
some talk of 32 bit versus 64 bit architectures, but trying the build with
an -m32 or -m64 made no difference. I've had this work before, so I'm
probably missing something obvious...
Thanks
Mark
Mark Cuss, B. Sc.
Software Developer
Systems Administrator
CDL Systems Ltd.
Suite 220
3553 31 Street NW
Calgary, AB, Canada
T2L 2K7
Phone 403 289 1733 ext 226
Fax 403 289 3967
[EMAIL PROTECTED]
www.cdlsystems.com