[PATCH] Define _LP64 on x86-64?

Gwenole Beauchesne gbeauchesne@mandrakesoft.com
Fri Oct 11 06:03:00 GMT 2002


On 10 Oct 2002, Gabriel Dos Reis wrote:

> an LP64 machine where you have sizeof 0 == 32 and sizeof(void*) == 64?

This reminds me of something: why don't we have _LP64 defined on x86-64?  
Other arches define it and it is even clearly stated so in the IA-64 ABI,
IIRC.

Thus added, bootstrapped, regtested on x86_64-mandrake-linux-gnu.
(configured with --enable-languages=c,c++ on 3.2-branch of today)

Bye,
Gwenole.

2002-10-11  Gwenole Beauchesne  <gbeauchesne@mandrakesoft.com>

	* config/i386/linux64.h (CPP_SPEC): Define _LP64 in 64-bit mode.

--- gcc/config/i386/linux64.h.x86_64-_LP64	2002-10-09 
10:34:31.000000000 -0400
+++ gcc/config/i386/linux64.h	2002-10-11 09:54:48.000000000 -0400
@@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA.  */
 #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__gnu_linux__ -Dlinux 
-Asystem(posix)"
 
 #undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ 
-D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} 
%{!m32:-D__LONG_MAX__=9223372036854775807L}"
+#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ 
-D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} 
%{!m32:-D__LONG_MAX__=9223372036854775807L} %{!m32:-D_LP64}"
 
 /* Provide a LINK_SPEC.  Here we provide support for the special GCC
    options -static and -shared, which allow us to link things in one




More information about the Gcc-patches mailing list