Subject: Generic LP64 define?
To: None <>
From: Eduardo Horvath <>
List: tech-toolchain
Date: 08/02/2000 16:09:06
Now to detect a system that's LP64 we need to check a special define for
each architecture.  Now it's something like:

#if defined(__alpha__) || defined(__sparc_v9__)


#if defined(__alpha__) || (defined(__sparc__) && defined(__arch64__))

If we start having 64-bit POWER/PPC, 64-bit MIPs, or ia64, these checks
will quickly become unweildy.

I propose we add a new define to the gcc specs file to identify a 64-bit
target so we don't have to keep messing about with architecture specific

Alternatively we can change these to compare LONG_MAX to INT_MAX as

	/* LP64 code */
	/* ILP32 code */

However, this requires <sys/limits.h> and does not properly identify the
width of a pointer.

Eduardo Horvath