GCC 4.5.2 compile on solaris 10

  • Follow


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.


0
Reply Vincent 3/4/2011 10:29:55 PM

On rereading the group charter...

NEVER MIND!

0
Reply Vincent 3/4/2011 10:51:13 PM


[follow-ups set to comp.unix.solaris]
In article <435c2075-ebd1-4a2d-9f01-42ba7ef19556@l14g2000pre.googlegroups.com>,
Vincent  <vincent.fox@gmail.com> wrote:
>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-

LDFLAGS=-m64

John
groenveld@acm.org
0
Reply groenvel 3/4/2011 11:16:36 PM

Vincent <vincent.fox@gmail.com> writes:

> 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++

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
0
Reply Rainer 3/7/2011 10:31:45 AM

3 Replies
678 Views

(page loaded in 0.067 seconds)

Similiar Articles:













7/23/2012 9:41:59 AM


Reply: