[PATCH] Define _LP64 on x86-64?
Andreas Jaeger
aj@suse.de
Fri Mar 14 08:31:00 GMT 2003
Mark Mitchell <mark@codesourcery.com> writes:
>> Alternatively (with less impact) I can just add the defines for
>> Linux/x86-64 only. Please tell me if you prefer this solution.
>
> Yes, let's go with this second way. Patch pre-approved.
Ok, here's the version I'm committing now. Bootstrapped/regtested on
x86_64-linux-gnu.
Andreas
2003-03-14 Andreas Jaeger <aj@suse.de>
Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
* linux64.h (TARGET_OS_CPP_BUILTINS): Define _LP64 and __LP64__ in
64-bit mode.
Index: gcc/config/i386/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/linux64.h,v
retrieving revision 1.18.4.1
diff -u -p -r1.18.4.1 linux64.h
--- gcc/config/i386/linux64.h 14 Jan 2003 20:29:44 -0000 1.18.4.1
+++ gcc/config/i386/linux64.h 14 Mar 2003 06:30:00 -0000
@@ -1,5 +1,5 @@
/* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>, based on linux.h.
This file is part of GNU CC.
@@ -35,6 +35,11 @@ Boston, MA 02111-1307, USA. */
{ \
builtin_define ("__PIC__"); \
builtin_define ("__pic__"); \
+ } \
+ if (TARGET_64BIT) \
+ { \
+ builtin_define ("__LP64__"); \
+ builtin_define ("_LP64"); \
} \
} \
while (0)
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Gcc-patches
mailing list