How can I configure for SPARC v9 architecture?
Georg Wittig
wittig@gypsy.gmd.de
Fri Sep 10 06:33:00 GMT 1999
SeungIl Lee <hacker@altair.snu.ac.kr> writes:
ûI want to use SPARC v9 architecture instructions.
ûHow should I configure for this?
û
û configure sparcv9-sun-solaris
After trying and hacking of the Makefiles I succeeded to install a to
some extend running gcc / g++ . Before going on with further
explanations I want to say that in my opinion 64 bit support for
sparcv9-sun-solaris2.7 is semi-official currently. The author of the
64 bit compiler backend wrote at June 25:
gcc-2.95 will miscompile a lot of things on v9. I'm working on
fixing it but a) it will take some time still b) won't make it
obviously into 2.95."
So here's how I succeeded partially:
1. Configuring:
env CC="cc -xarch=v9" \
CFLAGS=-Wa,-xregsym=no \
./configure \
-v \
--host=sparcv9-sun-solaris2.7 \
--target=sparcv9-sun-solaris2.7
The -xarch=v9 is necessary such that SUN-cc will generate 64 bit code
during the build of stage1.
The -xregsym=no is necessary to shut up the SUN assembler error
messages. Btw., I didn't find -xregsym documented anywhere. I got that
hint from Vic Abell in a posting in comp.unix.solaris (Message-ID:
<7p6h6c$gmp$1@mozo.cc.purdue.edu>).
2. Manual correction of a generated Makefile:
in gcc/Makefile substitute the second (!) definition of X_CFLAGS.
Change it from
X_CFLAGS=-DSVR4
to
X_CFLAGS=-DSVR4 -Wa,-xregsym=no
(either using your editor or by writing a small sed / awk / perl
script).
This is necessary for shutting up SUNs assembler error messages in
later phases of the compiler build.
3. make bootstrap
... and have a long break :-) For me it was busy for about 2 hours.
Stages 1, 2, and 3 were build without errors. During "make compare"
however, make stopped because "gcov.o differs". Looks like a bug in
the compiler.
But even if I comment out the "make compare" phase, building of
libstdc++ will fail at many points. Most of them could be corrected by
hand-editing the Makefiles in a lot of subdirectories, but I didn't do
that to the bitter end. I don't know if libstdc++ will work anyway
after so many corrections to get it to compile correctly.
I am happy with a gcc / g++ that is able to compile and run some
source files successfully. I don't need libstdc++ currently. :-)
--
Georg Wittig, GMD Georg.Wittig@gmd.de
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ich bin wichtig - gebt mir ein Handy!
More information about the Gcc-help
mailing list