Article View: gnu.gcc.help
Article #52788cross compiling gcc-2.1 host=sparc, target=sun3/m68k
From: Rhonda Gaines
Date: Wed, 20 May 1992 21:11
Date: Wed, 20 May 1992 21:11
104 lines
5612 bytes
5612 bytes
I'm still having problems trying to build gcc-2.1 as a cross-compiler.
The host is a sun4 and the target is a sun3 68020. I've built previous
versions of gcc before (not for cross-compilation) and never had this
much trouble. I have the GNU cross-assembler (gas v1.38). It's been
a struggle to get gcc to use gas instead of /bin/as. I finally
copied gas in place of as (saving a copy of as in as.orig of course)
and was able to proceed further. My problem now is that certain
library files that gcc expects to find it doesn't see. So each time
I got an error, I moved that library file into ./gcc. Well now
I've finally run across a library file "Mcrt1.o" that's not in
/usr/lib. I'm beginning to wonder if gcc (or gas) needs another
package built that contains the library files it needs. I know this
sounds like a bunch of silly hacks but with each error, I try to
figure out a way to get past it. Any responses should be directed to
me here rrg@fibercom.com.
-thanks
rhonda
Here are my latest errors:
[1] configure --host=sparc-sun-sunos4.1 --target=m68k-sun-sunos4.1 <return>
Linked `config.h' to `./config/xm-sparc.h'
Linked `tm.h' to `./config/sun3.h'
Linked `md' to `./config/m68k.md'
Linked `aux-output.c' to `./config/m68k.c'
Linked `tconfig.h' to `./config/xm-m68k.h'
Created `Makefile'.
Links are now set up for host sparc-sun-sunos4.1 and target m68k-sun-sunos4.1.
******THIS WAS BEFORE I INSTALLED GAS.******************
[5] make CC=stage1/gcc CFLAGS="-g -O -I /usr/include -Bstage1/" > &errs2 &
stage1/gcc -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -I. -I. -I./config \
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun-sunos4.1/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ./version.c`/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun-sunos4.1/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ./version.c`/sys-include\" \
-c `echo ./cccp.c | sed 's,^\./,,'`
as: error: unknown option 'm'
as: error: unknown option 'c'
as: error: unknown option '6'
as: error: unknown option '8'
as: error: unknown option '0'
as: error: unknown option '2'
as: error: unknown option '0'
usage: as [-F[O][if]#] [-O[#]] [-S[C]] [-o objfile] [-L] [-R] [-Q]
[-P [[-Ipath] [-Dname] [-Dname=def] [-Uname]]...] file.s...
*** Error code 1
make: Fatal error: Command failed for target `cccp.o'
**********THIS WAS THE ONLY WAY I COULD GET IT TO RECOGNIZE GAS
[5a] melrose:root# mv /bin/as /bin/as.old
melrose:root# ln -s /usr/local/bin/gas /bin/as
melrose:root# lfl /bin/as
/melrose/gcc-2.1
lrwxrwxrwx 1 root 18 May 18 15:15 /bin/as -> /usr/local/bin/gas*
melrose:root# mv /bin/as gas_link
melrose:root# mv /bin/as.old /bin/as
****************HERE'S MY LATEST PROBLEM - GETTING IT TO FIND THE
LIBRARY FILES, I ENDED UP MOVING crt0.o and mcrt0.o to ./gcc-2.1
[6] make CC=stage1/gcc CFLAGS="-g -O -I /usr/include -Bstage1/" > & errs4 &
stage1/gcc -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -I. -I. -I./config \
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun-sunos4.1/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ./version.c`/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun-sunos4.1/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ./version.c`/sys-include\" \
-c `echo ./cccp.c | sed 's,^\./,,'`
stage1/gcc -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -I. -I. -I./config -c ./cexp.c
stage1/gcc -c -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -I. -I. -I./config version.c
stage1/gcc -c -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -I. -I. -I./config obstack.c
stage1/gcc -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -o cccp cccp.o cexp.o version.o obstack.o ` case "stage1/gcc" in "cc") echo ;; esac `
ld: crt0.o: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `cccp'
***************THERE IS NO Mcrt1.o IN OUR /USR/LIB DIRECTORY. ARE
WE MISSING SOME LIBRARY FILES THAT GCC EXPECTS?? DOES ANOTHER GNU
PACKAGE NEED TO BE COMPILED THAT CONTAINS THESE LIBRARIES?? THIS IS
THE FIRST TIME I'VE TRIED TO COMPILE FOR CROSS-COMPILATION BUT NOT
THE FIRST TIME I'VE COMPILED GCC (ALTHOUGH I'VE NEVER COMPILED
VERSION 2.1 BEFORE).
ERRS6
stage1/gcc -DCROSS_COMPILE -g -O -I /usr/include -Bstage1/ -o cccp cccp.o cexp.o version.o obstack.o ` case "stage1/gcc" in "cc") echo ;; esac `
ld: Mcrt1.o: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `cccp'
--
Rhonda Gaines INTERNET: rrg@fibercom.com
FiberCom, Inc. UUCP: ...!uunet!fibercom!rrg
P.O. Box 11966 PHONE: 703-342-6700 or 800-423-1183 x291
Roanoke, VA 24022-1966 FAX: 703-342-5961
Technical Details
Message-ID:
<31318@fibercom.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!fibercom!rrgShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,44f83b104d1108d4,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-05-20 14:32:48 PST Path: arc1-ca.pugleaf.net!sparky!uunet!fibercom!rrg From: rrg@fibercom.COM (Rhonda Gaines) Newsgroups: gnu.gcc.help Subject: cross compiling gcc-2.1 host=sparc, target=sun3/m68k Message-ID: <31318@fibercom.COM> Date: 20 May 92 21:11:58 GMT Organization: FiberCom, Inc., Roanoke, Virginia Lines: 104