autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking $host for 64-bit code generation


From: John Calcote
Subject: Checking $host for 64-bit code generation
Date: Mon, 23 Jun 2008 12:26:09 -0600
User-agent: Thunderbird 2.0.0.14 (X11/20080421)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there a community-approved method for determining in configure.ac
whether or not you're building (targeting) 64-bit code?

Seems that given the recent increase in popularity of 64-bit hardware,
it might be a good idea to add a standard Autoconf test for native word
size.

I realize that there are several important permutations here - such as
cross-compiling (eg., $build vs $host), and specifically requesting
32-bit code on 64-bit hardware. In order to set proper options when the
user requests 32-bit code on a 64-bit system, you first have to know
what sort of system you're targeting.

Currently, I'm doing this as a first cut:

platform_bits=32
case $host in
  *64*-*-*)
    platform_bits=64
    ;;
esac

I realize this is a TERRIBLE way to find out, as many CPU's don't have
"64" in their name, but it catches several common cases (x86_64, ia64,
powerpc64, hppa64, sparc64, etc) anyway. That's why I'm asking.

Thanks,
John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIX+rBdcgqmRY/OH8RAsIgAJ9azNDSUcdQcMWIG1YXHkIyeX89NgCgg3ja
4EHaiOF9xFUz2DNqTnU0PX0=
=iBts
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]