crossgcc building problem
Wed May 1 05:09:00 GMT 2002


I'm attempting to build sparc-sun-solaris2.7 targeted gcc-3.0.4 that will
run on sparc-sun-solaris2.8.
I have a local gcc 2.95.2 installed from a binary package.

The problem: when linking the gcc binary (if I understand correctly) - it
uses the cross-platform linker instead of the local one, thereby making
a cross-compil*ed* gcc binary, whereas I want a cross-compil*ing* LOCAL gcc

I have:
read the FAQ, and a couple more MINI-howtos, so if you send me RTFM'ing,
sent me to pinpoint locations :-)
My complete cross-environment is going to live in
(there will be more cross-headaches later)

Now here's what I did:
a. Built and installed a set of binutils-2.11.2 in /usr/local/bin ==> for
creating local binaries.
b. Built and installed a set of binutils-2.11.2 for
14:56|[May] mikisu:/usr/src#ls -l /usr/local/cpl/sparc-sun-solaris2.7/bin/
total 32368
-rwxr-xr-x   1 root     other    1262041 May  1 14:26
-rwxr-xr-x   2 root     other    1164009 May  1 14:26
-rwxr-xr-x   2 root     other    1701847 May  1 14:26
-rwxr-xr-x   1 root     other     172187 May  1 14:26
-rwxr-xr-x   1 root     other     196941 May  1 14:26
-rwxr-xr-x   2 root     other    1703954 May  1 14:27
-rwxr-xr-x   2 root     other    1275802 May  1 14:26
-rwxr-xr-x   1 root     other    1661789 May  1 14:26
-rwxr-xr-x   1 root     other    1808316 May  1 14:26
-rwxr-xr-x   2 root     other    1164124 May  1 14:26
-rwxr-xr-x   1 root     other     383383 May  1 14:26
-rwxr-xr-x   1 root     other    1118849 May  1 14:26
-rwxr-xr-x   1 root     other    1115311 May  1 14:26
-rwxr-xr-x   2 root     other    1661788 May  1 14:26
** If I understand correctly, these are intended to be run on solaris2.8,
but handle solaris2.7 binaries. Therefore, since the gcc I'm making now is
going to be a solaris2.8 binary, it is not them that should be used to
create it, but rather the ones in /usr/local/bin. **

c. configured gcc-3.0.4 as follows:
./configure --target=sparc-sun-solaris2.7
--prefix=/usr/local/cpl/sparc-sun-solaris2.7 -v

NOTE: I copied (with subdirs) all libraries and headers from a
Solaris7/SPARC machine to this Solaris8/SPARC machine to
/usr/local/cpl/sol7/lib and /usr/local/cpl/sol7/include

d. ran make.
At the very end, here's what I got:
-B/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/lib/ -isystem
/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/include -O2
-DCROSS_COMPILE -DIN_GCC  -DSVR4  -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g1
-nodefaultlibs -Wl,-h, -Wl,-z,text -Wl,-z,defs -Wl,
-M, -o   libgcc/./_muldi3.o libgcc/./_divdi3.o
libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o
libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o
libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o
libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_cmpdi2.o
libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o
libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o
libgcc/./_fixdfdi.o libgcc/./_fixun
ssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o
libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o
libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o
libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_exit.o
libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o
libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o
libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o
libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./unwind-dw2.o
libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o -lc && rm -f
&& ln -s
file format not recognized; treating as linker script

parse error
collect2: ld returned 1 exit status
make[2]: *** [] Error 1
make[2]: Leaving directory `/usr/share/src/cross2/gcc-3.0.4/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/usr/share/src/cross2/gcc-3.0.4/gcc'
make: *** [all-gcc] Error 2
[... slump ]


Miki Shapiro <>
Unixophilic Software Developer
Aladdin Knowledge Systems
Tel: +972-(4)-8811433  ICQ: 3EE853
If at first you don't succeed...
... SkyDiving is probbably not for you.

******************************* IMPORTANT ! **********************************
The content of this email and any attachments are confidential and intended 
for the named recipient(s) only.

If you have received this email in error please notify the sender immediately.
Do not disclose the content of this message or make copies.

This email was scanned by eSafe Mail for viruses, vandals  and other
malicious content.

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list