Discussion:
GCC 4.5.2 compile on solaris 10
(too old to reply)
Vincent
2011-03-04 22:29:55 UTC
Permalink
Wondering if anyone has tips to help get a clean 64-bit build of gcc
4.5.2 on Sparc for Solaris 10? Or pointers to where I might look?

I've been noodling around with trying to use the /usr/sfw/bin/gcc and
Sun Studio 12.2 for about a day now. Latest attempt has configure
line like so:
/tank/src/gcc-4.5.2/configure CC=cc CXX=CC CFLAGS=-m64 CXXFLAGS=-m64 --
build=sparc-sun-solaris2.10 --with-gmp=/ucd --with-mpfr=/ucd --with-
mpc=/ucd --prefix=/ucd --with-gnu-as --with-as=/usr/sfw/bin/gas --
without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-
languages=c,c++

and this produces ELFCLASS 64 errors like so:

cc -g -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes
\
build/genmodes.o build/errors.o ../build-sparc-sun-solaris2.10/
libiberty/libiberty.a
ld: warning: file ../build-sparc-sun-solaris2.10/libiberty/
libiberty.a(alloca.o): wrong ELF class: ELFCLASS64
Undefined first referenced
symbol in file
htab_create_alloc build/genmodes.o
C_alloca build/genmodes.o
htab_find build/genmodes.o
xcalloc build/genmodes.o
htab_hash_string build/genmodes.o
htab_find_slot build/genmodes.o
xmalloc build/genmodes.o
xstrdup build/genmodes.o
ld: fatal: Symbol referencing errors. No output written to build/
genmodes
make[3]: *** [build/genmodes] Error 2
make[3]: Leaving directory `/tmp/objdir/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/tmp/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/tmp/objdir'
make: *** [all] Error 2


Have built all requisites from recent source. Used the 32-bit /usr/
sfw/bin/gcc and oddly seems I am ending up with 64-bit libraries. I'd
like in the end to have a complete 64-bit set of tools, but can't get
so far as building a 64-bit gcc on this platform to achieve that.
Vincent
2011-03-04 22:51:13 UTC
Permalink
On rereading the group charter...

NEVER MIND!
John D Groenveld
2011-03-04 23:16:36 UTC
Permalink
[follow-ups set to comp.unix.solaris]
Post by Vincent
Sun Studio 12.2 for about a day now. Latest attempt has configure
/tank/src/gcc-4.5.2/configure CC=cc CXX=CC CFLAGS=-m64 CXXFLAGS=-m64 --
build=sparc-sun-solaris2.10 --with-gmp=/ucd --with-mpfr=/ucd --with-
mpc=/ucd --prefix=/ucd --with-gnu-as --with-as=/usr/sfw/bin/gas --
without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-
LDFLAGS=-m64

John
***@acm.org
Rainer Orth
2011-03-07 10:31:45 UTC
Permalink
Post by Vincent
Wondering if anyone has tips to help get a clean 64-bit build of gcc
4.5.2 on Sparc for Solaris 10? Or pointers to where I might look?
I've been noodling around with trying to use the /usr/sfw/bin/gcc and
Sun Studio 12.2 for about a day now. Latest attempt has configure
/tank/src/gcc-4.5.2/configure CC=cc CXX=CC CFLAGS=-m64 CXXFLAGS=-m64 --
build=sparc-sun-solaris2.10 --with-gmp=/ucd --with-mpfr=/ucd --with-
mpc=/ucd --prefix=/ucd --with-gnu-as --with-as=/usr/sfw/bin/gas --
without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-
languages=c,c++
Why would you want to do this? Even if the compiler binary is 32-bit,
it is able to generate 32 and 64-bit code just fine.

I think you're missing --target=sparcv9-sun-solaris2.10. --build above
is wrong, too: your build compiler creates 64-bit code.

Note that it's a looong time I've tried this myself.

Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
Loading...