summaryrefslogtreecommitdiff
path: root/gcc/config/freebsd-spec.h
diff options
context:
space:
mode:
authorLoren J. Rittle <ljrittle@acm.org>2003-03-12 02:29:08 +0000
committerLoren J. Rittle <ljrittle@gcc.gnu.org>2003-03-12 02:29:08 +0000
commit7358f10d14bcd6ef86ac37c88e3c22a2e0635e9a (patch)
tree2dc0db73545198b77c2ebbab239403fc05c54537 /gcc/config/freebsd-spec.h
parentd00bc0a2a6c596e8c42647a64ffb5c616a3d1cfb (diff)
downloadgcc-7358f10d14bcd6ef86ac37c88e3c22a2e0635e9a.tar.gz
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
Diffstat (limited to 'gcc/config/freebsd-spec.h')
-rw-r--r--gcc/config/freebsd-spec.h49
1 files changed, 25 insertions, 24 deletions
diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h
index 3fc4dcc7a41..4d81d80c443 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. */