This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

crossgcc building problem


Hi

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
binary.

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
/usr/local/cpl/sparc-sun-solaris2.7/
(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
cross-platform-compilation:
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
sparc-sun-solaris2.7-addr2line
-rwxr-xr-x   2 root     other    1164009 May  1 14:26
sparc-sun-solaris2.7-ar
-rwxr-xr-x   2 root     other    1701847 May  1 14:26
sparc-sun-solaris2.7-as
-rwxr-xr-x   1 root     other     172187 May  1 14:26
sparc-sun-solaris2.7-c++filt
-rwxr-xr-x   1 root     other     196941 May  1 14:26
sparc-sun-solaris2.7-gasp
-rwxr-xr-x   2 root     other    1703954 May  1 14:27
sparc-sun-solaris2.7-ld
-rwxr-xr-x   2 root     other    1275802 May  1 14:26
sparc-sun-solaris2.7-nm
-rwxr-xr-x   1 root     other    1661789 May  1 14:26
sparc-sun-solaris2.7-objcopy
-rwxr-xr-x   1 root     other    1808316 May  1 14:26
sparc-sun-solaris2.7-objdump
-rwxr-xr-x   2 root     other    1164124 May  1 14:26
sparc-sun-solaris2.7-ranlib
-rwxr-xr-x   1 root     other     383383 May  1 14:26
sparc-sun-solaris2.7-readelf
-rwxr-xr-x   1 root     other    1118849 May  1 14:26
sparc-sun-solaris2.7-size
-rwxr-xr-x   1 root     other    1115311 May  1 14:26
sparc-sun-solaris2.7-strings
-rwxr-xr-x   2 root     other    1661788 May  1 14:26
sparc-sun-solaris2.7-strip
** 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
--with-headers=/usr/local/cpl/sol7/include
--with-libs=/usr/local/cpl/sol7/lib

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:
.
.
.
mv tmp-libgcc.map libgcc.map
/usr/share/src/cross2/gcc-3.0.4/gcc/xgcc
-B/usr/share/src/cross2/gcc-3.0.4/gcc/
-B/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin/
-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
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared
-nodefaultlibs -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs -Wl,
-M,libgcc.map -o libgcc_s.so   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 libgcc_s.so.1
&& ln -s libgcc_s.so libgcc_s.so.1
/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin/ld:libgcc.map:
file format not recognized; treating as linker script
/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin/ld:libgcc.map:1:

parse error
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] 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 ]

Ideas?



--
Miki Shapiro <mikis@aAladdin.com>
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, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]