Subject: Re: bl3 and LDFLAGS
To: None <tech-pkg@netbsd.org>
From: grant beattie <grant@netbsd.org>
List: tech-pkg
Date: 06/09/2004 19:30:17
--pY3vCvL1qV+PayAL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 08, 2004 at 12:39:02PM +0100, Jonathan Perkin wrote:

> I've recently attempted a 64bit SunPRO bulk build, and the
> results don't look good so far.  Most packages are failing at
> the link stage because the 64bit flags are not being passed
> through to ld, e.g. for databases/freetds:
>=20
>   /bin/ksh ../../libtool --mode=3Dlink cc  -O -xO2 -xtarget=3Dultra -xarc=
h=3Dv9 -D_LARGE FILE_SOURCE -D_FILE_OFFSET_BITS=3D64 ...
>   ld -G -h libtds.so.2 [ no -xarch=3Dv9 etc] ...
>=20
>   ld: warning: file ./.libs/libtds_objects.a(mem.o): wrong ELF class: ELF=
CLASS64

you (somehow) need to pass '-64' to ld(1) to tell it you want to link
a 64bit object.

you can probably tweak bl3 to insert the appropriate arguments in
CFLAGS, LDFLAGS, etc.

you'll need to make sure you're really calling ld if you pass '-64'
because cc(1) doesn't grok it. when calling cc to link, just
-xtarget=3Dultra .. should do the trick though.

grant.


--pY3vCvL1qV+PayAL
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAxtioluYOb9yiFXoRAgi0AJ9oNHA6ul0fjLQfxbXd4z2TDGflkwCfQ15e
TkePigdgCzqxLe5SkSgp1aU=
=Ntgm
-----END PGP SIGNATURE-----

--pY3vCvL1qV+PayAL--