This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trouble linking 32-bit and 64-bit objects


On Mon, Nov 07, 2005 at 01:24:05PM -0700, Allmen, Michael-P57512 wrote:
> I am having problems with binutils.  I want to build binutils so it will
> generate 32-bit or 64-bit objects/executables on Solaris 9.

did you enable multilib support when you built your binutils ?

>  I am using
> gcc-3.4.3 which is configured to use Sun as/ld by default.  I have been
> working mainly with 2.15.97 but have also tried 2.15.

why 2.15.97 ?  2.16.1 is released ...

> If I configure binutils with the default target (sparc-sun-solaris2.9),
> I can build 32-bit objects/executables using gcc (gcc
> -B/path/to/binutils/bin source.c).  If I attempt a 64-bit compile (gcc
> -m64 -B/path/to/binutils/bin source.c), I get errors about incompatible
> libraries.

by your description it sounds like you have proper 32/64 bit versions of your 
libc and your gcc supports multilib just fine ...

> /tmp/binutils/bin/ld: warning: sparc:v9 architecture of input file
> `/proj/muostps/tps/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/sparcv9/
> crt1.o' is incompatible with sparc output

you should try compiling with -mcpu=sparcv9

> Can GNU-binutils be built to generate 32-bit or 64-bit
> objects/executables using the same binaries on Solaris?

sparc linux can do it but i cant vouch for solaris
-mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]