diff options
author | Loren J. Rittle <ljrittle@acm.org> | 2003-03-12 02:29:08 +0000 |
---|---|---|
committer | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2003-03-12 02:29:08 +0000 |
commit | 7358f10d14bcd6ef86ac37c88e3c22a2e0635e9a (patch) | |
tree | 2dc0db73545198b77c2ebbab239403fc05c54537 | |
parent | d00bc0a2a6c596e8c42647a64ffb5c616a3d1cfb (diff) | |
download | gcc-7358f10d14bcd6ef86ac37c88e3c22a2e0635e9a.zip gcc-7358f10d14bcd6ef86ac37c88e3c22a2e0635e9a.tar.gz gcc-7358f10d14bcd6ef86ac37c88e3c22a2e0635e9a.tar.bz2 |
freebsd-spec.h (FBSD_CPP_PREDEFINES): Remove.
* config/freebsd-spec.h (FBSD_CPP_PREDEFINES): Remove.
(FBSD_TARGET_OS_CPP_BUILTINS): New port-specific macro.
(FBSD_TARGET_CPU_CPP_BUILTINS): New port-specific macro.
* config/freebsd.h (CPP_PREDEFINES): Remove.
(TARGET_OS_CPP_BUILTINS): New.
* config/alpha/freebsd.h: Use overridden FBSD_TARGET_CPU_CPP_BUILTINS
instead of TARGET_OS_CPP_BUILTINS.
* config/sparc/freebsd.h (CPP_PREDEFINES): Remove.
From-SVN: r64212
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config/alpha/freebsd.h | 6 | ||||
-rw-r--r-- | gcc/config/freebsd-spec.h | 49 | ||||
-rw-r--r-- | gcc/config/freebsd.h | 5 | ||||
-rw-r--r-- | gcc/config/sparc/freebsd.h | 2 |
5 files changed, 45 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 486378e..c9300d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2003-03-11 Loren James Rittle <ljrittle@acm.org> + + * config/freebsd-spec.h (FBSD_CPP_PREDEFINES): Remove. + (FBSD_TARGET_OS_CPP_BUILTINS): New port-specific macro. + (FBSD_TARGET_CPU_CPP_BUILTINS): New port-specific macro. + * config/freebsd.h (CPP_PREDEFINES): Remove. + (TARGET_OS_CPP_BUILTINS): New. + * config/alpha/freebsd.h: Use overridden FBSD_TARGET_CPU_CPP_BUILTINS + instead of TARGET_OS_CPP_BUILTINS. + * config/sparc/freebsd.h (CPP_PREDEFINES): Remove. + 2003-03-11 Geoffrey Keating <geoffk@apple.com> * c-cppbuiltin.c (builtin_define_std): Add ATTRIBUTE_UNUSED. diff --git a/gcc/config/alpha/freebsd.h b/gcc/config/alpha/freebsd.h index c77d856..7b3f5c4 100644 --- a/gcc/config/alpha/freebsd.h +++ b/gcc/config/alpha/freebsd.h @@ -20,11 +20,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Provide a CPP_SPEC appropriate for FreeBSD/alpha. Besides the dealing with +/* Provide a FBSD_TARGET_CPU_CPP_BUILTINS and CPP_SPEC appropriate for + FreeBSD/alpha. Besides the dealing with the GCC option `-posix', and PIC issues as on all FreeBSD platforms, we must deal with the Alpha's FP issues. */ -#define TARGET_OS_CPP_BUILTINS() \ +#undef FBSD_TARGET_CPU_CPP_BUILTINS +#define FBSD_TARGET_CPU_CPP_BUILTINS() \ do \ { \ if (flag_pic) \ diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h index 3fc4dcc..4d81d80 100644 --- a/gcc/config/freebsd-spec.h +++ b/gcc/config/freebsd-spec.h @@ -48,30 +48,31 @@ Boston, MA 02111-1307, USA. */ || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) -#if FBSD_MAJOR == 6 -#define FBSD_CPP_PREDEFINES \ - "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" -#endif - -#if FBSD_MAJOR == 5 -#define FBSD_CPP_PREDEFINES \ - "-D__FreeBSD__=5 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" -#endif - -#if FBSD_MAJOR == 4 -#define FBSD_CPP_PREDEFINES \ - "-D__FreeBSD__=4 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" -#endif - -#if FBSD_MAJOR == 3 -#define FBSD_CPP_PREDEFINES \ - "-D__FreeBSD__=3 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" -#endif - -#ifndef FBSD_CPP_PREDEFINES -#define FBSD_CPP_PREDEFINES \ - "-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" -#endif +#define FBSD_TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + if (FBSD_MAJOR == 6) \ + builtin_define ("__FreeBSD__=6"); \ + else if (FBSD_MAJOR == 5) \ + builtin_define ("__FreeBSD__=5"); \ + else if (FBSD_MAJOR == 4) \ + builtin_define ("__FreeBSD__=4"); \ + else if (FBSD_MAJOR == 3) \ + builtin_define ("__FreeBSD__=3"); \ + else \ + builtin_define ("__FreeBSD__"); \ + builtin_define_std ("unix"); \ + builtin_define ("__ELF__"); \ + builtin_define ("__KPRINTF_ATTRIBUTE__"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=bsd"); \ + builtin_assert ("system=FreeBSD"); \ + FBSD_TARGET_CPU_CPP_BUILTINS(); \ + } \ + while (0) + +/* Define the default FreeBSD-specific per-CPU hook code. */ +#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC option `-posix', and PIC issues. */ diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h index 285f5bf..f71bd8b 100644 --- a/gcc/config/freebsd.h +++ b/gcc/config/freebsd.h @@ -42,7 +42,10 @@ Boston, MA 02111-1307, USA. */ #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR)) #undef CPP_PREDEFINES -#define CPP_PREDEFINES FBSD_CPP_PREDEFINES +/* Obsolete, do not define it. */ + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS() #undef CPP_SPEC #define CPP_SPEC FBSD_CPP_SPEC diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h index 3bc6b4f..bec5a23 100644 --- a/gcc/config/sparc/freebsd.h +++ b/gcc/config/sparc/freebsd.h @@ -26,7 +26,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Because we include sparc/sysv4.h. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES FBSD_CPP_PREDEFINES +/* Do not define it here, we now use TARGET_OS_CPP_BUILTINS. */ #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ |