problem when installing gcc as cross compiler for sparc
Anja Müller
Mueller-Lehnitz@t-online.de
Mon Nov 8 10:23:00 GMT 1999
Hello, my name is Anja Müller. I have a problem when installing gcc as a
cross compiler and need your help. I want to install the gcc as cross
compiler for a sparc architecture, but it doesn't function. I read the
file INSTALL from the gcc source package and did the particular steps in
the
right order. Executing "configure ..." and "make LANGUAGES=c" succeeded
without errors, but "make stage1" was aborted, because lot of files
couldn't be found. Furthermore there is an error message that the file
crt0.o cannot not be found. Normally this file is a startup file, but it
doesn't exist for the sparc architecture. In the INSTALL documentation
is written that especially for sun the enviroment variable FLOAT_OPTION
mustn't be set, if the library libgcc.a is going to be compiled. Else
the compiler asks for this startup file (maybe crt0.o). But how can I
influence that ? To give you an overview of my way going on during the
installation of gcc as cross compiler I want to list the single steps.
Maybe you can help me.
At first I was buildung the binutils package for a sparc architecture:
configure --prefix=/usr/local --exec-prefix=/usr/local
--target=sparc-sun-sunos4.1.1
make
make install
The directory /usr/local/sparc-sun-sunos4.1.1 was generated and in
/usr/local/sparc-sun-sunos4.1.1/bin the programs ar,as, ld, nm, ranlib,
strip are located now. Furthermore there are adequate prgrams in
/usr/local/bin :
sparc-sun-sunos4.1.1-addr2line
sparc-sun-sunos4.1.1-ar
sparc-sun-sunos4.1.1-as
sparc-sun-sunos4.1.1-c++filt
sparc-sun-sunos4.1.1-gasp
sparc-sun-sunos4.1.1-ld
sparc-sun-sunos4.1.1-nm
sparc-sun-sunos4.1.1-objcopy
sparc-sun-sunos4.1.1-objdump
sparc-sun-sunos4.1.1-ranlib
sparc-sun-sunos4.1.1-size
sparc-sun-sunos4.1.1-strings
sparc-sun-sunos4.1.1-strip
To provide special libaries for sparc I had downloaded the two packages
glibc-2.1.1.16.sparc.rpm and glibc-devel-2.1.1.16.sparc.rpm. I unpacked
them
with:
rpm2cpio glibc-2.1.1.16.sparc.rpm &&& cpio --extract
--make-directories
rpm2cpio glibc-devel-2.1.1.16.sparc.rpm &&& cpio --extract
--make-directories
Then I changed in the new directory and copied the include files and the
libaries to the sparc directory :
cp -R usr/include /usr/local/sparc-sun-sunos4.1.1
cp -R /usr/src/linux/include/linux
/usr/local/sparc-sun-sunos4.1.1/include/linux
cp -R /usr/src/linux/include/asm-sparc
/usr/local/sparc-sun-sunos4.1.1/include/asm
cp -R lib/* /usr/local/sparc-sun-sunos4.1.1/lib
mkdir /usr/local/sparc-sun-sunos4.1.1/usr
cp -R usr/lib /usr/local/sparc-sun-sunos4.1.1/usr
After that I opened the shared libary libc.so in
/usr/local/sparc-sun-sunos4.1.1/usr/lib/ to modify the path:
GROUP ( /usr/local/sparc-sun-sunos4.1.1/lib/libc.so.6
/usr/local/sparc-sun-sunos4.1.1/usr/lib/libc_nonshared.a )
Cause of troubles during the first installation step "make LANGUAGES=c"
where the whole target machine directory was expected to be in /usr and
not
in /usr/local, I created a symbolic link in /usr :
ln -s /usr/local/sparc-sun-sunos4.1.1 sparc-sun-sunos4.1.1
Then I started the installation of gcc as cross compiler:
configure --target=sparc-sun-sunos4.1.1 -> successful
make LANGUAGES=c -> successful
Now there was this question about the libgcc1.a library: I don't have a
sparc machine here, so I couldn't compile the libgcc1.c there. And I
have
not another cross compiler for sparc on my system. So where can I get
this
file compiled for sparc ? In the gcc source directory I went to the
subdirectory config/sparc where I found the file lb1spc.asm which is an
assembler version of the libgcc1.c especially for sparc. So I thought I
can
compiler this file with my sparc cross assembler that I had from the
binutils package. Do you
think this is the problem ?
/usr/local/sparc-sun-sunos4.1.1/bin/as lb1spc.asm -o lb1spc.o
/usr/local/sparc-sun-sunos4.1.1/bin/ar qsv libgcc1.a lb1spc.o
I copied this file (libgcc1.a) to the gcc build directory (source
directory)
and went on with the next installation command "make stage1":
make stage1
Unfortunately this stopped with a lot of errors. I copied them:
errors when making stage1:
:~/gcc-2.7.2.3 >make stage1
if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
for dir in . cp ; \
do \
if [ -d stage1/$dir ] ; then true ; else mkdir stage1/$dir ; fi ; \
done
mv *.o insn-flags.h insn-config.h insn-codes.h insn-output.c
insn-recog.c
insn-e
mit.c insn-extract.c insn-peep.c insn-attr.h insn-attrtab.c
insn-opinit.c
stamp-
flags stamp-config stamp-codes stamp-output stamp-recog stamp-emit
stamp-extract
stamp-peep stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt
stamp-cr
tS genemit genoutput genrecog genextract genflags gencodes genconfig
genpeep
gen
attrtab genattr genopinit bc-arity.h bc-opcode.h bc-opname.h
stamp-bcarity
stamp
-bcopcode stamp-bcopname bi-arity bi-opcode bi-opname xgcc cc1 cpp
gcc-cross
cccp cc1obj enquire protoize unprotoize specs collect2 underscore.c
*.greg
*.lr
eg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop *.dbr *.jump2
*.sched
*.cse
2 *.sched2 *.stack *.[si] g++ g++-cross cc1plus stage1
mv: *.o: Datei oder Verzeichnis nicht gefunden
mv: insn-flags.h: Datei oder Verzeichnis nicht gefunden
mv: insn-config.h: Datei oder Verzeichnis nicht gefunden
mv: insn-codes.h: Datei oder Verzeichnis nicht gefunden
mv: insn-output.c: Datei oder Verzeichnis nicht gefunden
mv: insn-recog.c: Datei oder Verzeichnis nicht gefunden
mv: insn-emit.c: Datei oder Verzeichnis nicht gefunden
mv: insn-extract.c: Datei oder Verzeichnis nicht gefunden
mv: insn-peep.c: Datei oder Verzeichnis nicht gefunden
mv: insn-attr.h: Datei oder Verzeichnis nicht gefunden
mv: insn-attrtab.c: Datei oder Verzeichnis nicht gefunden
mv: insn-opinit.c: Datei oder Verzeichnis nicht gefunden
mv: stamp-flags: Datei oder Verzeichnis nicht gefunden
mv: stamp-config: Datei oder Verzeichnis nicht gefunden
mv: stamp-codes: Datei oder Verzeichnis nicht gefunden
mv: stamp-output: Datei oder Verzeichnis nicht gefunden
mv: stamp-recog: Datei oder Verzeichnis nicht gefunden
mv: stamp-emit: Datei oder Verzeichnis nicht gefunden
mv: stamp-extract: Datei oder Verzeichnis nicht gefunden
mv: stamp-peep: Datei oder Verzeichnis nicht gefunden
mv: stamp-attr: Datei oder Verzeichnis nicht gefunden
mv: stamp-attrtab: Datei oder Verzeichnis nicht gefunden
mv: stamp-opinit: Datei oder Verzeichnis nicht gefunden
mv: stamp-proto: Datei oder Verzeichnis nicht gefunden
mv: stamp-crt: Datei oder Verzeichnis nicht gefunden
mv: stamp-crtS: Datei oder Verzeichnis nicht gefunden
mv: genemit: Datei oder Verzeichnis nicht gefunden
mv: genoutput: Datei oder Verzeichnis nicht gefunden
mv: genrecog: Datei oder Verzeichnis nicht gefunden
mv: genextract: Datei oder Verzeichnis nicht gefunden
mv: genflags: Datei oder Verzeichnis nicht gefunden
mv: gencodes: Datei oder Verzeichnis nicht gefunden
mv: genconfig: Datei oder Verzeichnis nicht gefunden
mv: genpeep: Datei oder Verzeichnis nicht gefunden
mv: genattrtab: Datei oder Verzeichnis nicht gefunden
mv: genattr: Datei oder Verzeichnis nicht gefunden
mv: genopinit: Datei oder Verzeichnis nicht gefunden
mv: bc-arity.h: Datei oder Verzeichnis nicht gefunden
mv: bc-opcode.h: Datei oder Verzeichnis nicht gefunden
mv: bc-opname.h: Datei oder Verzeichnis nicht gefunden
mv: stamp-bcarity: Datei oder Verzeichnis nicht gefunden
mv: stamp-bcopcode: Datei oder Verzeichnis nicht gefunden
mv: stamp-bcopname: Datei oder Verzeichnis nicht gefunden
mv: bi-arity: Datei oder Verzeichnis nicht gefunden
mv: bi-opcode: Datei oder Verzeichnis nicht gefunden
mv: bi-opname: Datei oder Verzeichnis nicht gefunden
mv: xgcc: Datei oder Verzeichnis nicht gefunden
mv: cc1: Datei oder Verzeichnis nicht gefunden
mv: cpp: Datei oder Verzeichnis nicht gefunden
mv: gcc-cross: Datei oder Verzeichnis nicht gefunden
mv: cccp: Datei oder Verzeichnis nicht gefunden
mv: cc1obj: Datei oder Verzeichnis nicht gefunden
mv: enquire: Datei oder Verzeichnis nicht gefunden
mv: protoize: Datei oder Verzeichnis nicht gefunden
mv: unprotoize: Datei oder Verzeichnis nicht gefunden
mv: specs: Datei oder Verzeichnis nicht gefunden
mv: collect2: Datei oder Verzeichnis nicht gefunden
mv: underscore.c: Datei oder Verzeichnis nicht gefunden
mv: *.greg: Datei oder Verzeichnis nicht gefunden
mv: *.lreg: Datei oder Verzeichnis nicht gefunden
mv: *.combine: Datei oder Verzeichnis nicht gefunden
mv: *.flow: Datei oder Verzeichnis nicht gefunden
mv: *.cse: Datei oder Verzeichnis nicht gefunden
mv: *.jump: Datei oder Verzeichnis nicht gefunden
mv: *.rtl: Datei oder Verzeichnis nicht gefunden
mv: *.tree: Datei oder Verzeichnis nicht gefunden
mv: *.loop: Datei oder Verzeichnis nicht gefunden
mv: *.dbr: Datei oder Verzeichnis nicht gefunden
mv: *.jump2: Datei oder Verzeichnis nicht gefunden
mv: *.sched: Datei oder Verzeichnis nicht gefunden
mv: *.cse2: Datei oder Verzeichnis nicht gefunden
mv: *.sched2: Datei oder Verzeichnis nicht gefunden
mv: *.stack: Datei oder Verzeichnis nicht gefunden
mv: *.[si]: Datei oder Verzeichnis nicht gefunden
mv: g++: Datei oder Verzeichnis nicht gefunden
mv: g++-cross: Datei oder Verzeichnis nicht gefunden
mv: cc1plus: Datei oder Verzeichnis nicht gefunden
make: [stage1-start] Error 1 (ignored)
if [ -f as ] ; then ln -s ../as stage1 || cp as stage1 ; else true ; fi
ln: stage1/as: File exists
cp: `as' and `stage1/as' are the same file
make: [stage1-start] Error 1 (ignored)
if [ -f ld ] ; then ln -s ../ld stage1 || cp ld stage1 ; else true ; fi
if [ -f collect-ld ] ; then ln -s ../collect-ld stage1 || cp collect-ld
stage1 ;
else true ; fi
rm -f stage1/libgcc.a
cp libgcc.a stage1
if [ -f /usr/sparc-sun-sunos4.1.1/bin/ranlib ] ; then
/usr/sparc-sun-sunos4.1.1/
bin/ranlib stage1/libgcc.a; else true; fi
mv cp/*.o stage1/cp
mv: cp/*.o: Datei oder Verzeichnis nicht gefunden
make: [c++.stage1] Error 1 (ignored)
:~/gcc-2.7.2.3 >
It seems that there are a lot of files missing. Do you know what I have
made wrong ? And whats about the file ctr0.o ? Please help me !
Thank you,
Anja
More information about the Gcc-help
mailing list