Subject: Has no-one noticed this? (Re: can lang/gcc3 compile 64bit?)
To: None <tech-pkg@NetBSD.org>
From: Charlie Allom <charlie@rubberduck.com>
List: tech-pkg
Date: 01/18/2004 23:13:06
--Apple-Mail-1--515978101
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On 18/01/2004, at 11:25 AM, Charlie Allom wrote:

> I am using lang/gcc3 on my Solaris 9 box as the only compiler, and for 
> things in pkgsrc all is going well. But I am trying to compile 
> ipfilter and it complains I cannot make 64bit programs...

bugger, 3.3.2 from sunfreeware works. As does 3.3 sunfreeware. What is 
wrong? :)

OK I looked at the buildsunos script and this is how it tries to figure 
out 64bit .. so my pkgsrc gcc is obviously lacking...

t=conftest6220.c
+ trap rm -f $t 32.out 64.out; exit 1 0 1 2 3 15
+ cat
#include <stdio.h>
int main(void)
{
printf("%ld\n", (long) sizeof(long));
exit(0);
}
+ gcc -m32 conftest6220.c -o 32.out
+ ./32.out
+ [ 4 = 4 ]
+ :
+ gcc -m64 -mcmodel=medlow conftest6220.c -o 64.out
+ ./64.out
out64=8
+ isainfo -b
+ [ 8 = 8 -o 64 = 32 -a 8 =  ]
+ echo found 32/64 bit compiler
found 32/64 bit compiler

Just to be sure I try it myself...

22:59 lazy:~/ip_fil3.4.33pre2% gcc -m32 conftest.c -o 32
DING! lazy:~/ip_fil3.4.33pre2% gcc -m64 -mcmodel=medlow conftest.c -o 64
DING! lazy:~/ip_fil3.4.33pre2% which gcc
/usr/local/bin/gcc
DING! lazy:~/ip_fil3.4.33pre2% rm 32 64
DING! lazy:~/ip_fil3.4.33pre2% /usr/pkg/gcc-3.3.2/bin/gcc -m32 
conftest.c -o 32
23:01 lazy:~/ip_fil3.4.33pre2% /usr/pkg/gcc-3.3.2/bin/gcc -m64 
-mcmodel=medlow conftest.c -o 64
cc1: error: -m64 is not supported by this configuration
cc1: error: -mcmodel= is not supported on 32 bit systems
zsh: 6334 exit 1     /usr/pkg/gcc-3.3.2/bin/gcc -m64 -mcmodel=medlow 
conftest.c -o 64


> What does this do in the gcc3/Makefile?
>
> .if ${OPSYS} == "SunOS"
>         -cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
> .endif
>

Not much it seems. They are empty directories.

   C.
-- 
  charlie@rubberduck.com - Melbourne, Australia
  http://rubberduck.com/~yeled/
  PGP: 0x14AA7941 || finger yeled@lazy.spodder.com

--Apple-Mail-1--515978101
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFACnhSqiZDwhSqeUERAnpFAJ4qk2dLyoAz1udz00R18OOUsjv7LQCeP3yJ
gNNjcMYOAPYGVAuAgj9kBuc=
=4lwT
-----END PGP SIGNATURE-----

--Apple-Mail-1--515978101--