This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Define _LP64 on x86-64?


Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> writes:

> 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)


A patch for GCC CVS should use the builtin_define commands, ia64
defines both these, do we need both of them?
	    builtin_define("_LP64");		\
	    builtin_define("__LP64__");		\

In general I like the idea and would like to have this patch committed
for 3.2 and one version for mainline.

Andreas

>
> 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
>
>

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]