freebsd-spec.h (FBSD_CPP_PREDEFINES): Remove.
authorLoren J. Rittle <ljrittle@acm.org>
Wed, 12 Mar 2003 02:29:08 +0000 (02:29 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Wed, 12 Mar 2003 02:29:08 +0000 (02:29 +0000)
* 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

gcc/ChangeLog
gcc/config/alpha/freebsd.h
gcc/config/freebsd-spec.h
gcc/config/freebsd.h
gcc/config/sparc/freebsd.h

index 486378e45d3d0d810d767ea7bca898beebb8c48d..c9300d04a9d09356b5da7e0965cb64946e343017 100644 (file)
@@ -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.
index c77d85640f618478e4a03f7c3c08971c7f4844f2..7b3f5c4af69441d4984ab47b49b0fa9132317058 100644 (file)
@@ -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)                            \
index 3fc4dcc7a412e6ea63a750fc48e2444422bc5020..4d81d80c44316d1c746aeb7e8c03cfb63d7de5e7 100644 (file)
@@ -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.  */
index 285f5bf85f9b0beeba11b3062f922f1357372fc9..f71bd8b42d5c194379a43abd13b606c8cbfea4e9 100644 (file)
@@ -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
index 3bc6b4f2b7e63106003eb22053fc5cd69afb2415..bec5a2317357a8a67d599b512bc2b26c1e78a8db 100644 (file)
@@ -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}}                                           \