One other thing to note - even though the compiler / linker complains about these library incompatiblilties, the resulting a.out executes as expected on a Solaris box.... wierd.

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
----- Original Message ----- From: "Mark Cuss" <[EMAIL PROTECTED]>
To: <gcc@gcc.gnu.org>
Sent: Monday, November 07, 2005 3:25 PM
Subject: Skipping incompatable libaries on a SPARC cross compile


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 completefile list if anyone wants it I was really careful to make sure that all ofthe symlinks that were in these directories on the Sun machine werepreserved. 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 whensearching 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 whensearching 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 whensearching 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 whensearching 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 whensearching 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 whensearching 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 upsome talk of 32 bit versus 64 bit architectures, but trying the build withan -m32 or -m64 made no difference. I've had this work before, so I'mprobably 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>>

Reply via email to