gnu.h: Undef TARGET_OS_CPP_BUILTINS.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Wed, 5 Jun 2002 17:01:31 +0000 (17:01 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Wed, 5 Jun 2002 17:01:31 +0000 (17:01 +0000)
config:
* alpha/gnu.h: Undef TARGET_OS_CPP_BUILTINS.
* i386/beos-elf.h: Use TARGET_OS_CPP_BUILTINS rather than
CPP_PREDEFINES and part of CPP_SPEC.
i386/freebsd-aout.h, i386/gas.h, i386/gnu.h, i386/linux-aout.h,
i386/linux.h, i386/moss.h, i386/xm-vsta.h: Similarly.

From-SVN: r54286

gcc/ChangeLog
gcc/config/i386/beos-elf.h
gcc/config/i386/freebsd-aout.h
gcc/config/i386/gas.h
gcc/config/i386/gnu.h
gcc/config/i386/linux-aout.h
gcc/config/i386/linux.h
gcc/config/i386/moss.h
gcc/config/i386/xm-vsta.h

index 3b9651c5c64e04a275f0275c0849817a6cafb6c9..d6c942ab23d78583e391164ddb934768693ac1da 100644 (file)
@@ -1,3 +1,12 @@
+2002-06-05  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+config:
+       * alpha/gnu.h: Undef TARGET_OS_CPP_BUILTINS.
+       * i386/beos-elf.h: Use TARGET_OS_CPP_BUILTINS rather than
+       CPP_PREDEFINES and part of CPP_SPEC.
+       i386/freebsd-aout.h, i386/gas.h, i386/gnu.h, i386/linux-aout.h,
+       i386/linux.h, i386/moss.h, i386/xm-vsta.h: Similarly.
+
 Wed Jun  5 15:20:58 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * reg-stack.c (reg_to_stack): Do not call find_basic_blocks.
index e7613b86af15720f5716b2470d369f1d5c674f05..7f9c2e2edecb4101a90afbbd59a4775c0b830a2f 100644 (file)
@@ -67,17 +67,26 @@ Boston, MA 02111-1307, USA.  */
    
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 16
-    
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -D__BEOS__ -D__INTEL__ -D_X86_=1 \
--D__stdcall=__attribute__((__stdcall__)) \
--D__cdecl=__attribute__((__cdecl__)) \
--D__declspec(x)=__attribute__((x)) \
--Asystem=beos"
-
-#undef CPP_SPEC
-#define CPP_SPEC "%{!no-fPIC:%{!no-fpic:-D__PIC__ -D__pic__}}"
 
+#define TARGET_OS_CPP_BUILTINS()                                       \
+  do                                                                   \
+    {                                                                  \
+       builtin_define ("__ELF__");                                     \
+       builtin_define ("__BEOS__");                                    \
+       builtin_define ("__INTEL__");                                   \
+       builtin_define ("_X86_");                                       \
+       builtin_define ("__stdcall=__attribute__((__stdcall__))");      \
+       builtin_define ("__cdecl=__attribute__((__cdecl__))");          \
+       builtin_define ("__declspec(x)=__attribute__((x))");            \
+       builtin_assert ("system=beos");                                 \
+       if (flag_pic)                                                   \
+         {                                                             \
+           builtin_define ("__PIC__");                                 \
+           builtin_define ("__pic__");                                 \
+         }                                                             \
+    }                                                                  \
+  while (0)
+    
 /* BeOS uses lots of multichars, so don't warn about them unless the
    user explicitly asks for the warnings with -Wmultichar.  Note that
    CC1_SPEC is used for both cc1 and cc1plus.  */
index 7f8a4fe811c056eaff88af9a061bcd14fded6859..c5ce80a1118d8816df9a897cc591f8fe2e1b5f83 100644 (file)
@@ -37,9 +37,16 @@ Boston, MA 02111-1307, USA.  */
    defaults.h works.  */
 #undef ASM_PREFERRED_EH_DATA_FORMAT
 
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -D__FreeBSD__\
- -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("unix");            \
+       builtin_define ("__FreeBSD__");         \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=bsd");          \
+       builtin_assert ("system=FreeBSD");      \
+    }                                          \
+  while (0)
 
 /* Like the default, except no -lg.  */
 #define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}"
index c627775a8606867dc64fb5221b6148b357c4c95a..1f9de018821acfea747b1d3b79efb897269c9316 100644 (file)
@@ -45,11 +45,6 @@ Boston, MA 02111-1307, USA.  */
 
 #define SDB_DEBUGGING_INFO
 
-/* Specify predefined symbols in preprocessor.  */
-
-#define CPP_PREDEFINES "-Dunix"
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
-
 /* Allow #sccs in preprocessor.  */
 
 #define SCCS_DIRECTIVE
index 50e019560384bba17eb7060fb515e2f87d974ed3..acf2d3fdac828d49492ef494650f683deff5ebd9 100644 (file)
@@ -3,14 +3,29 @@
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
 
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -DMACH -Asystem=mach \
-  -Dunix -Asystem=unix -Asystem=posix -D__gnu_hurd__ -D__GNU__ -Asystem=gnu"
+#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("MACH");            \
+       builtin_define_std ("unix");            \
+       builtin_define ("__ELF__");             \
+       builtin_define ("__GNU__");             \
+       builtin_define ("__gnu_hurd__");        \
+       builtin_assert ("system=gnu");          \
+       builtin_assert ("system=mach");         \
+       builtin_assert ("system=posix");        \
+       builtin_assert ("system=unix");         \
+       if (flag_pic)                           \
+         {                                     \
+           builtin_define ("__PIC__");         \
+           builtin_define ("__pic__");         \
+         }                                     \
+    }                                          \
+  while (0)
 
 #undef CPP_SPEC
-#define CPP_SPEC "\
-  %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \
-  %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
 
 #undef CC1_SPEC
 #define CC1_SPEC "%(cc1_cpu)"
index 51203cda3e5c1742e77d1f744576a9406e0daf23..783b8a946edbb786b82ea673850534faa977cba4 100644 (file)
@@ -23,13 +23,23 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START "#"
 
-/* Specify predefined symbols in preprocessor.  */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -D__gnu_linux__ -Dlinux -Asystem=posix"
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("linux");           \
+       builtin_define_std ("unix");            \
+       builtin_define ("__gnu_linux__");       \
+       builtin_assert ("system=posix");        \
+       if (flag_pic)                           \
+         {                                     \
+           builtin_define ("__PIC__");         \
+           builtin_define ("__pic__");         \
+         }                                     \
+    }                                          \
+  while (0)
 
 #undef CPP_SPEC
-#define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
 
 #undef SIZE_TYPE
 #define SIZE_TYPE "unsigned int"
index 232a9eec5e4a57e93f240c6223225c8e0896991d..3bc20fe54105a420c0f1d19c428a1c5dbedb98f1 100644 (file)
@@ -80,14 +80,27 @@ Boston, MA 02111-1307, USA.  */
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE BITS_PER_WORD
     
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -Asystem=posix"
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("linux");           \
+       builtin_define_std ("unix");            \
+       builtin_define ("__ELF__");             \
+       builtin_define ("__gnu_linux__");       \
+       builtin_assert ("system=posix");        \
+       if (flag_pic)                           \
+         {                                     \
+           builtin_define ("__PIC__");         \
+           builtin_define ("__pic__");         \
+         }                                     \
+    }                                          \
+  while (0)
 
 #undef CPP_SPEC
 #ifdef USE_GNULIBC_1
-#define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
 #else
-#define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
 #endif
 
 #undef CC1_SPEC
index 200cae0edcccca14bb60b971dfc650c4a332b82f..642c625a3950bca64a5087341ec88f5f8b8ae4e7 100644 (file)
@@ -19,8 +19,20 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -Dmoss -Asystem=posix"
+#undef TARGET_OS_CPP_BUILTINS /* config.gcc includes i386/linux.h.  */
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("moss");            \
+       builtin_define ("__ELF__");             \
+       builtin_assert ("system=posix");        \
+       if (flag_pic)                           \
+         {                                     \
+           builtin_define ("__PIC__");         \
+           builtin_define ("__pic__");         \
+         }                                     \
+    }                                          \
+  while (0)
 
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC  "crt0.o%s"
index 735d1d51943b6067fcb6067f34aecd9ee68ac19a..53943eaf7dadb1928b21d1de0babc16dfb725746 100644 (file)
@@ -1,2 +1,11 @@
 /* Use semicolons to separate elements of a path.  */
 #define PATH_SEPARATOR ';'
+
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+       builtin_define_std ("unix");            \
+    }                                          \
+  while (0)
+
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"