From ae3f787fde7831fec117d42f26dc39961265d08b Mon Sep 17 00:00:00 2001 From: David O'Brien Date: Tue, 16 Dec 2003 10:54:58 +0000 Subject: [PATCH] freebsd.h (FBSD_TARGET_CPU_CPP_BUILTINS): Add __LP64__. * config/alpha/freebsd.h (FBSD_TARGET_CPU_CPP_BUILTINS): Add __LP64__. * config/sparc/freebsd.h (FBSD_TARGET_CPU_CPP_BUILTINS): Likewise. * config/i386/freebsd64.h (FBSD_TARGET_CPU_CPP_BUILTINS): Conditionally add __LP64__. From-SVN: r74684 --- gcc/ChangeLog | 7 +++++++ gcc/config/alpha/freebsd.h | 1 + gcc/config/i386/freebsd64.h | 11 +++++++++++ gcc/config/sparc/freebsd.h | 8 ++++++++ 4 files changed, 27 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1fa5eb20e007..5b0216b6229d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-12-16 David O'Brien + + * config/alpha/freebsd.h (FBSD_TARGET_CPU_CPP_BUILTINS): Add __LP64__. + * config/sparc/freebsd.h (FBSD_TARGET_CPU_CPP_BUILTINS): Likewise. + * config/i386/freebsd64.h (FBSD_TARGET_CPU_CPP_BUILTINS): Conditionally + add __LP64__. + 2003-12-16 Hartmut Penner * altivec.h (vec_cmple, vec_all_numeric): Fix typo. diff --git a/gcc/config/alpha/freebsd.h b/gcc/config/alpha/freebsd.h index f809c62012e3..149ce0658221 100644 --- a/gcc/config/alpha/freebsd.h +++ b/gcc/config/alpha/freebsd.h @@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ #define FBSD_TARGET_CPU_CPP_BUILTINS() \ do \ { \ + builtin_define ("__LP64__"); \ if (flag_pic) \ { \ builtin_define ("__PIC__"); \ diff --git a/gcc/config/i386/freebsd64.h b/gcc/config/i386/freebsd64.h index 12ca062301d0..4a660341b070 100644 --- a/gcc/config/i386/freebsd64.h +++ b/gcc/config/i386/freebsd64.h @@ -23,6 +23,17 @@ Boston, MA 02111-1307, USA. */ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); +#undef FBSD_TARGET_CPU_CPP_BUILTINS +#define FBSD_TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + if (TARGET_64BIT) \ + { \ + builtin_define ("__LP64__"); \ + } \ + } \ + while (0) + /* Provide a LINK_SPEC appropriate for the FreeBSD/x86-64 ELF target. This is a copy of LINK_SPEC from tweaked for the x86-64 target. */ diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h index b2809ddb7cf5..21f3da2183fd 100644 --- a/gcc/config/sparc/freebsd.h +++ b/gcc/config/sparc/freebsd.h @@ -25,6 +25,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define CPP_CPU64_DEFAULT_SPEC \ "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__sparc__ -D__arch64__" +#undef FBSD_TARGET_CPU_CPP_BUILTINS +#define FBSD_TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__LP64__"); \ + } \ + while (0) + /* Because we include sparc/sysv4.h. */ #undef CPP_PREDEFINES /* Do not define it here, we now use TARGET_OS_CPP_BUILTINS. */ -- 2.47.2