OSDN Git Service

* config/freebsd-spec.h (FBSD_CPP_PREDEFINES): Remove.
authorljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Mar 2003 02:29:08 +0000 (02:29 +0000)
committerljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Mar 2003 02:29:08 +0000 (02:29 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64212 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 486378e..c9300d0 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 c77d856..7b3f5c4 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 3fc4dcc..4d81d80 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 285f5bf..f71bd8b 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 3bc6b4f..bec5a23 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}}                                           \