Hello all
Can anyone shed any light on this problem for me? I've built gcc 3.4.4 as a
Linux (on x86) to Solaris (on SPARC) cross compiler. When I do the make
install, I get 2 sets of binaries:
1) $prefix/bin - this contains all of the binaries with
'sparc-sun-solaris2.9' in front of them (ie - sparc-sun-solaris2.9-g++, etc)
2) $prefix/sparc-sun-solaris2.9/bin - this contains all of the binaries
with their normal names (ie - g++, gcc, etc)
If I set my PATH to $prefix/sparc-sun-solaris2.9/bin, then I can build a
simple "hello world" test program. However, if I either directly call
$prefix/bin/sparc-sun-solaris2.9/g++ or indirectly call it by using g++ -b
sparc-sun-solaris2.9, I get:
[EMAIL PROTECTED] helloworldsun]$ g++ -b sparc-sun-solaris2.9 hello.cxx
/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:
values-Xa.o: No such file: No such file or directory
collect2: ld returned 1 exit status
[EMAIL PROTECTED] helloworldsun]$
values-Xa.o lives in $sysroot/usr/ccs/lib like it's supposed to. If I call
$prefix/sparc-sun-solaris2.9/bin/g++ it finds it OK, but
$prefix/bin/sparc-sun-solaris-2.9-g++ can't - any ideas why this might be?
I've tried including the path to values-Xa.o with -L but that hasn't helped?
I'd really appreciate some pointers on this one.
Thanks in advance
Mark
----- Original Message -----
From: "Mark Cuss" <[EMAIL PROTECTED]>
To: <gcc@gcc.gnu.org>
Sent: Monday, July 25, 2005 1:04 PM
Subject: Can't find values-Xa.o when cross compiling
Hello All
I've built gcc-3.4.4 as a linux to Solaris (on SPARC) cross compiler. If
I
change my path to include my new compiler executables, I can compile and
link a simple "hello world" program.
However, I want to be able to specify the target architecture and compiler
version number with gcc's -b and -V flags. When I try to build my program
using these flags, the system can't find values-Xa.o:
[EMAIL PROTECTED] helloworld]$ g++ -b sparc-sun-solaris2.9 -V 3.4.4 hello.cxx
/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:
values-Xa.o: No such file: No such file or directory collect2: ld returned
1 exit status [EMAIL PROTECTED] helloworld]$ The file is in $sysroot/usr/lib
(and $sysroot/usr/ccs/lib too). $sysroot was set as configure option when
built gcc. According to the docs, itlooks like $sysroot should be
searched for the library & object files, but it doesn't seem to work.
Even if I specify the path to the linker with -Wl,-L <path>, it still
can't find the file. However, if I directly call gcc instead of using -b
and -V to call sparc-sun-solaris2.9-gcc, it works... Any ideas why this
might be? My gcc package is configured as:[EMAIL PROTECTED] helloworld]$
gcc -vReading specs
from/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc/lib/gcc/sparc-sun-solaris2.9/3.4.4/specsConfigured
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 --prefix=/cdl/apps/.software/linux/gcc-3.4.4-x86-sparc --enable-languages=c,c++Thread model: posixgcc [EMAIL PROTECTED] helloworld]$ Thanks Mark Mark Cuss, B. Sc. Real TimeSystems Analyst System Administrator CDL Systems Ltd Suite 230 3553 - 31Street NW Calgary, AB, Canada Phone: 403 289 1733 ext 226Fax: 403 289 3967>www.cdlsystems.com>>