c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, [...]): Default here.
authorNeil Booth <neil@daikokuya.co.uk>
Sun, 18 May 2003 09:46:23 +0000 (09:46 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 18 May 2003 09:46:23 +0000 (09:46 +0000)
* c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, TARGET_OBJFMT_CPP_BUILTINS):
Default here.
(c_cpp_builtins): Invoke TARGET_OBJFMT_CPP_BUILTINS().
* defaults.h: Don't default TARGET_OS_CPP_BUILTINS here.
* config/elfos.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__.
* config/freebsd-spec.h, config/netbsd-elf.h, config/alpha/gnu.h,
config/arm/linux-elf.h, config/arm/rtems-elf.h,
config/arm/unknown-elf.h, config/cris/cris.h, config/cris/linux.h,
config/h8300/elf.h, config/i370/linux.h, config/i386/beos-elf.h,
config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h,
config/i386/moss.h, config/i386/rtemself.h, config/ia64/ia64.h,
config/m68k/rtemself.h, config/mcore/mcore-elf.h, config/mips/linux.h,
config/pa/pa-linux.h, config/rs6000/linux.h, config/rs6000/linux64.h,
config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h,
config/sh/coff.h, config/sh/elf.h, config/sh/rtemself.h,
config/sh/sh.h, config/sparc/linux.h, config/sparc/linux64.h,
config/sparc/openbsd64.h, config/sparc/sp64-elf.h,
config/sparc/sp86x-elf.h, config/xtensa/elf.h, config/xtensa/linux.h:
Don't define __ELF__.
* config/alpha.h, config/m68k/linux.h (TARGET_OBJFMT_CPP_BUILTINS):
Define __ELF__.
* doc/cpp.texi: Document __ELF__.
* doc/tm.texi: Document TARGET_OBJFMT_CPP_BUILTINS.

From-SVN: r66926

45 files changed:
gcc/ChangeLog
gcc/c-cppbuiltin.c
gcc/config/alpha/elf.h
gcc/config/alpha/gnu.h
gcc/config/arm/linux-elf.h
gcc/config/arm/rtems-elf.h
gcc/config/arm/unknown-elf.h
gcc/config/cris/cris.h
gcc/config/cris/linux.h
gcc/config/elfos.h
gcc/config/freebsd-spec.h
gcc/config/h8300/elf.h
gcc/config/i370/linux.h
gcc/config/i386/beos-elf.h
gcc/config/i386/gnu.h
gcc/config/i386/linux.h
gcc/config/i386/linux64.h
gcc/config/i386/moss.h
gcc/config/i386/rtemself.h
gcc/config/ia64/ia64.h
gcc/config/m68k/linux.h
gcc/config/m68k/rtemself.h
gcc/config/mcore/mcore-elf.h
gcc/config/mips/linux.h
gcc/config/netbsd-elf.h
gcc/config/pa/pa-linux.h
gcc/config/rs6000/linux.h
gcc/config/rs6000/linux64.h
gcc/config/rs6000/sysv4.h
gcc/config/rs6000/vxworks.h
gcc/config/s390/linux.h
gcc/config/sh/coff.h
gcc/config/sh/elf.h
gcc/config/sh/rtemself.h
gcc/config/sh/sh.h
gcc/config/sparc/linux.h
gcc/config/sparc/linux64.h
gcc/config/sparc/openbsd64.h
gcc/config/sparc/sp64-elf.h
gcc/config/sparc/sp86x-elf.h
gcc/config/xtensa/elf.h
gcc/config/xtensa/linux.h
gcc/defaults.h
gcc/doc/cpp.texi
gcc/doc/tm.texi

index bd643b501ab0cda7d612dcbeb3748b280180b829..72a621c12bbba08294c9c9c080336031f6b7722e 100644 (file)
@@ -1,3 +1,29 @@
+2003-05-18  Neil Booth  <neil@daikokuya.co.uk>
+
+       * c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, TARGET_OBJFMT_CPP_BUILTINS):
+       Default here.
+       (c_cpp_builtins): Invoke TARGET_OBJFMT_CPP_BUILTINS().
+       * defaults.h: Don't default TARGET_OS_CPP_BUILTINS here.
+       * config/elfos.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__.
+       * config/freebsd-spec.h, config/netbsd-elf.h, config/alpha/gnu.h,
+       config/arm/linux-elf.h, config/arm/rtems-elf.h,
+       config/arm/unknown-elf.h, config/cris/cris.h, config/cris/linux.h,
+       config/h8300/elf.h, config/i370/linux.h, config/i386/beos-elf.h,
+       config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h,
+       config/i386/moss.h, config/i386/rtemself.h, config/ia64/ia64.h,
+       config/m68k/rtemself.h, config/mcore/mcore-elf.h, config/mips/linux.h,
+       config/pa/pa-linux.h, config/rs6000/linux.h, config/rs6000/linux64.h,
+       config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h,
+       config/sh/coff.h, config/sh/elf.h, config/sh/rtemself.h,
+       config/sh/sh.h, config/sparc/linux.h, config/sparc/linux64.h,
+       config/sparc/openbsd64.h, config/sparc/sp64-elf.h,
+       config/sparc/sp86x-elf.h, config/xtensa/elf.h, config/xtensa/linux.h:
+       Don't define __ELF__.
+       * config/alpha.h, config/m68k/linux.h (TARGET_OBJFMT_CPP_BUILTINS):
+       Define __ELF__.
+       * doc/cpp.texi: Document __ELF__.
+       * doc/tm.texi: Document TARGET_OBJFMT_CPP_BUILTINS.     * 
+
 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * builtins.c (validate_arglist): Eliminate libiberty VA_ macros,
index 9cb1b4efb52bb5ede4e45bb988c5d0fb8583f351..c97ced3caef06e39758fa1f85f3f57eae7fe0c76 100644 (file)
@@ -32,6 +32,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "toplev.h"
 #include "tm_p.h"              /* Target prototypes.  */
 
+#ifndef TARGET_OS_CPP_BUILTINS
+# define TARGET_OS_CPP_BUILTINS()
+#endif
+
+#ifndef TARGET_OBJFMT_CPP_BUILTINS
+# define TARGET_OBJFMT_CPP_BUILTINS()
+#endif
+
 #ifndef REGISTER_PREFIX
 #define REGISTER_PREFIX ""
 #endif
@@ -387,6 +395,7 @@ c_cpp_builtins (pfile)
 # define builtin_assert(TXT) cpp_assert (pfile, TXT)
   TARGET_CPU_CPP_BUILTINS ();
   TARGET_OS_CPP_BUILTINS ();
+  TARGET_OBJFMT_CPP_BUILTINS ();
 }
 
 /* Pass an object-like macro.  If it doesn't lie in the user's
index 5ff69604d8baef8f790e989d6773b7d9e7d81c6b..3ca8d6c7478d7a9cfb36b0784bc53d1e7863785b 100644 (file)
@@ -35,8 +35,13 @@ Boston, MA 02111-1307, USA.    */
 
 #undef ASM_FINAL_SPEC
 
-#undef  CPP_SUBTARGET_SPEC
-#define CPP_SUBTARGET_SPEC "-D__ELF__"
+/* alpha/ doesn't use elfos.h for some reason.  */
+#define TARGET_OBJFMT_CPP_BUILTINS()           \
+  do                                           \
+    {                                          \
+       builtin_define ("__ELF__");             \
+    }                                          \
+  while (0)
 
 #undef  CC1_SPEC
 #define CC1_SPEC  "%{G*}"
index 9b25daff6a54330e7c928ca42450a904a97694f5..db2a278db4a5f08c98a97d37a1094fc9daf71ecd 100644 (file)
@@ -7,7 +7,6 @@
 #define TARGET_OS_CPP_BUILTINS()               \
     do {                                       \
        builtin_define ("__GNU__");             \
-       builtin_define ("__ELF__");             \
        builtin_define ("__gnu_hurd__");        \
        builtin_define ("_LONGLONG");           \
        builtin_define_std ("unix");            \
index ec5c69f36ff11e84aba13f734a73162419110068..5da2b242070702bb457b2d97c5ab7678ca1dfb6e 100644 (file)
@@ -94,7 +94,6 @@
        builtin_define_std ("unix");            \
        builtin_define_std ("linux");           \
        builtin_define ("__gnu_linux__");       \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=unix");         \
        builtin_assert ("system=posix");        \
     } while (0)
index 9b5b1f1b93d89d100333ed4d252b70f71f4c4b85..a736ee1ea10c7718d379c280c08d0ea47594e343 100644 (file)
@@ -27,6 +27,5 @@
 #define TARGET_OS_CPP_BUILTINS()               \
     do {                                       \
        builtin_define ("__rtems__");           \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=rtems");        \
     } while (0)
index b3d6f6efa032e373d8dc410b3dadc9047e3f01be..573803fce2dc3314bf1a0b5d5989c5520ce58fb4 100644 (file)
@@ -43,7 +43,7 @@
 /* The __USES_INITFINI__ define is tested in newlib/libc/sys/arm/crt0.S
    to see if it needs to invoked _init() and _fini().  */
 #undef  SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC  "-D__ELF__ -D__USES_INITFINI__"
+#define SUBTARGET_CPP_SPEC  "-D__USES_INITFINI__"
 
 #undef  PREFERRED_DEBUGGING_TYPE
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
index 92c6550b55935686e03d15a27d78f5de35753c5e..f741663b53df8e966748423ea6e6c2477d35993e 100644 (file)
@@ -254,14 +254,6 @@ extern const char *cris_elinux_stacksize_str;
     }                                          \
   while (0)
 
-#define TARGET_OS_CPP_BUILTINS()               \
-  do                                           \
-    {                                          \
-      builtin_define ("__ELF__");              \
-    }                                          \
-  while (0)
-
-
 /* This needs to be at least 32 bits.  */
 extern int target_flags;
 
index f85743f7a9af2443dcca03113bdc6b4a161eec1a..6893d7f39b16e0bbc16aace11da83e5b2b72341d 100644 (file)
@@ -106,7 +106,6 @@ Boston, MA 02111-1307, USA.  */
       builtin_define ("__gnu_linux__");                \
       builtin_define ("__linux__");            \
       builtin_define ("__unix__");             \
-      builtin_define ("__ELF__");              \
       if (flag_pic)                            \
        {                                       \
          builtin_define ("__PIC__");           \
index b01dcdb609e55210dde755cd4ae474fdf7a7b2ed..3a04661ea33ba7f28d45144bbf744209337035dd 100644 (file)
@@ -21,6 +21,12 @@ 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.  */
 
+#define TARGET_OBJFMT_CPP_BUILTINS()           \
+  do                                           \
+    {                                          \
+       builtin_define ("__ELF__");             \
+    }                                          \
+  while (0)
 
 /* Define a symbol indicating that we are using elfos.h.
    Some CPU specific configuration files use this.  */
index 4d81d80c44316d1c746aeb7e8c03cfb63d7de5e7..b71a2024d3380f39651386d30dd42a7e89fbcc56 100644 (file)
@@ -62,7 +62,6 @@ Boston, MA 02111-1307, USA.  */
        else                                                            \
          builtin_define ("__FreeBSD__");                               \
        builtin_define_std ("unix");                                    \
-       builtin_define ("__ELF__");                                     \
        builtin_define ("__KPRINTF_ATTRIBUTE__");                       \
        builtin_assert ("system=unix");                                 \
        builtin_assert ("system=bsd");                                  \
index c7214d4945318a08d7221f87f441a1b385a1f2cd..bfa4e8143943666432b52ae67c5e289ea375a71b 100644 (file)
@@ -1,11 +1,3 @@
-/* Target OS preprocessor built-ins.  */
-#define TARGET_OS_CPP_BUILTINS()               \
-  do                                           \
-    {                                          \
-      builtin_define ("__ELF__");              \
-    }                                          \
-  while (0)
-
 /* Undefine some macros defined in h8300 that conflict with elfos.h .  */
 #undef SDB_DEBUGGING_INFO
 #undef DBX_DEBUGGING_INFO
index 4613dca8cda1ef11d830ff1f0631bd3d432cd902..730d6b0e996b3787c8b62ec7e685fe06f6a43dc8 100644 (file)
@@ -38,7 +38,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define_std ("unix");            \
        builtin_define_std ("linux");           \
        builtin_define ("__gnu_linux__");       \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=posix");        \
     } while (0)
 
index b84519f4d67aded1c85fb1a02a60b0ce42d7d544..d36975606c672972ee9951e3d2f75c4e3d2b235f 100644 (file)
@@ -58,7 +58,6 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_OS_CPP_BUILTINS()                                       \
   do                                                                   \
     {                                                                  \
-       builtin_define ("__ELF__");                                     \
        builtin_define ("__BEOS__");                                    \
        builtin_define ("__INTEL__");                                   \
        builtin_define ("_X86_");                                       \
index acf2d3fdac828d49492ef494650f683deff5ebd9..ff0ff254bac10f5f65185cfb169d09362d8fbc22 100644 (file)
@@ -9,7 +9,6 @@
     {                                          \
        builtin_define_std ("MACH");            \
        builtin_define_std ("unix");            \
-       builtin_define ("__ELF__");             \
        builtin_define ("__GNU__");             \
        builtin_define ("__gnu_hurd__");        \
        builtin_assert ("system=gnu");          \
index 6b553cd4cb57bbe68e7cef6f2e93eeb4810b95a7..15733930408d7c2a781f0e625675596815fef7b0 100644 (file)
@@ -79,7 +79,6 @@ Boston, MA 02111-1307, USA.  */
     {                                          \
        builtin_define_std ("linux");           \
        builtin_define_std ("unix");            \
-       builtin_define ("__ELF__");             \
        builtin_define ("__gnu_linux__");       \
        builtin_assert ("system=posix");        \
        if (flag_pic)                           \
index b6b575665ca6318297ec53a5310ff3ba0b0b260d..591e10df34b4ec455826d22db8e468014ab475b1 100644 (file)
@@ -29,7 +29,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define_std ("linux");                           \
        builtin_define_std ("unix");                            \
        builtin_define ("__gnu_linux__");                       \
-       builtin_define ("__ELF__");                             \
        builtin_assert ("system=posix");                        \
        if (flag_pic)                                           \
          {                                                     \
index 642c625a3950bca64a5087341ec88f5f8b8ae4e7..fc0e60c1b04db6386abb6fca56eaa093a9d4b061 100644 (file)
@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA.  */
   do                                           \
     {                                          \
        builtin_define_std ("moss");            \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=posix");        \
        if (flag_pic)                           \
          {                                     \
index 096717816f2cd535f9b07819e2d1bd451dfea684..59c40d6917e56fbc697a2c4cc0e99656dd3866cc 100644 (file)
@@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA.  */
   do                                           \
     {                                          \
        builtin_define ("__rtems__");           \
-       builtin_define ("__ELF__");             \
        builtin_define ("__USE_INIT_FINI__");   \
        builtin_assert ("system=rtems");        \
        if (!TARGET_80387)                      \
index e996459fedbf89482127b6ddb3b634acd012eb0a..41a687b70a263274cf2dc910c6089e467bcb9754 100644 (file)
@@ -39,7 +39,6 @@ do {                                          \
        builtin_define("__ia64");               \
        builtin_define("__ia64__");             \
        builtin_define("__itanium__");          \
-       builtin_define("__ELF__");              \
        if (TARGET_BIG_ENDIAN)                  \
          builtin_define("__BIG_ENDIAN__");     \
 } while (0)
index 168fca3d50b88b50db9d5ef6156bfb05e0438a20..b9b90826467fd13f52de5895fb1ab9639945adab 100644 (file)
@@ -106,12 +106,18 @@ Boston, MA 02111-1307, USA.  */
        builtin_define_std ("linux");           \
        builtin_define_std ("unix");            \
        builtin_define ("__gnu_linux__");       \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=unix");         \
        builtin_assert ("system=posix");        \
    }                                           \
   while (0)
 
+#define TARGET_OBJFMT_CPP_BUILTINS()           \
+  do                                           \
+    {                                          \
+       builtin_define ("__ELF__");             \
+    }                                          \
+  while (0)
+
 #undef CPP_SPEC
 #ifdef USE_GNULIBC_1
 #if TARGET_DEFAULT & MASK_68881
index 393f96ab1e124dc62eb9e292d13f318ede383bc0..ab051fe4bc8281c118a0b2360f883500974ed7b7 100644 (file)
@@ -30,7 +30,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define_std ("mc68000");         \
        builtin_define ("__USE_INIT_FINI__");   \
        builtin_define ("__rtems__");           \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=rtems");        \
     }                                          \
   while (0)
index b8378591706353f995406c87c540cdecfd8f59f9..cc8986a6ac63e72fe1a857fbd8e3e120dc7aef11 100644 (file)
@@ -25,13 +25,6 @@ Boston, MA 02111-1307, USA.  */
 /* Run-time Target Specification.  */
 #define TARGET_VERSION fputs (" (Motorola MCORE/elf)", stderr)
 
-#define TARGET_OS_CPP_BUILTINS()                               \
-  do                                                           \
-    {                                                          \
-      builtin_define ("__ELF__");                              \
-    }                                                          \
-  while (0)
-
 /* Use DWARF2 debugging info.  */
 #define DWARF2_DEBUGGING_INFO 1
 
index 3663fe14a83e99c958c609018d01164c84d490f8..2461ac34292abd08d65ef27c4b798cd8e716d204 100644 (file)
@@ -120,7 +120,6 @@ void FN ()                                                  \
 #define TARGET_OS_CPP_BUILTINS()                               \
     do {                                                       \
        builtin_define ("__gnu_linux__");                       \
-       builtin_define ("__ELF__");                             \
        builtin_define ("__PIC__");                             \
        builtin_define ("__pic__");                             \
        builtin_define_std ("unix");                            \
index cb38b93ba0a17911c4579cc1fddae5536474d8d7..55ea23a73840b1a7fc8f987856b24d3e795ad39b 100644 (file)
@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA.  */
   do                                           \
     {                                          \
       NETBSD_OS_CPP_BUILTINS_COMMON();         \
-      builtin_define ("__ELF__");              \
     }                                          \
   while (0)
 
index b2c0998168905f4afb9546d062d07678e0b00925..1c8266af57aec7f9a383c7efd497a5b0e3ea6c53 100644 (file)
@@ -56,7 +56,6 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_OS_CPP_BUILTINS()               \
   do                                           \
     {                                          \
-       builtin_define ("__ELF__");             \
        builtin_define ("__gnu_linux__");       \
        builtin_define_std ("linux");           \
        builtin_define_std ("unix");            \
index c8322bbfb901b65b7f87f76b14d1c9c01a7f0333..98e85e48363d9d0e1b9f16c59287125f9f47b1b2 100644 (file)
@@ -29,7 +29,6 @@
   do                                      \
     {                                     \
       builtin_define_std ("PPC");         \
-      builtin_define ("__ELF__");         \
       builtin_define_std ("powerpc");     \
       builtin_assert ("cpu=powerpc");     \
       builtin_assert ("machine=powerpc"); \
index 0cc8ae0cbc32d8796c14306b2d6b5ebc8a1957eb..128e3b755360476f14e9e6b4b986c72d92fc6030 100644 (file)
       builtin_define ("__powerpc__");       \
       builtin_define ("__powerpc64__");     \
       builtin_define ("__PIC__");           \
-      builtin_define ("__ELF__");           \
       builtin_assert ("cpu=powerpc64");     \
       builtin_assert ("machine=powerpc64"); \
     }                                       \
index 6d30f323059fa5e8291023f2b3b41ac104d539f4..4ccc71da6b5383c34503303b5de4f00edcc60ad8 100644 (file)
@@ -1071,7 +1071,7 @@ extern int fixuplabelno;
 /* FreeBSD support.  */
 
 #define CPP_OS_FREEBSD_SPEC    "\
-  -D__ELF__ -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
+  -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
   -Acpu=powerpc -Amachine=powerpc"
 
 #define        STARTFILE_FREEBSD_SPEC  FBSD_STARTFILE_SPEC
@@ -1190,7 +1190,7 @@ ncrtn.o%s"
   %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}}"
 
 #define CPP_OS_NETBSD_SPEC "\
--D__powerpc__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__"
+-D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
 
 /* WindISS support.  */
 
index e96d3840ddca5206267e3dfbacda292c60e92af2..6a5c7e98e985853cbd2feb44e162cee2844919ab 100644 (file)
@@ -39,7 +39,7 @@
 #define SUBTARGET_EXTRA_SPECS /* none needed */
 
 #define CPP_SPEC \
-"-DCPU_FAMILY=PPC -D__ppc -D__EABI__ -D__ELF__ \
+"-DCPU_FAMILY=PPC -D__ppc -D__EABI__  \
  %{t403: -DCPU=PPC403 -D_SOFT_FLOAT ; \
    t405: -DCPU=PPC405 -D_SOFT_FLOAT ; \
    t440: -DCPU=PPC440 -D_SOFT_FLOAT ; \
index cbb771099dc3cc3abc5706df991ad25d01603c4a..cc496bdb63b0c714c7e47de4906422e0da39f10c 100644 (file)
@@ -57,7 +57,6 @@ Boston, MA 02111-1307, USA.  */
       builtin_define_std ("unix");             \
       builtin_assert ("system=linux");         \
       builtin_assert ("system=unix");          \
-      builtin_define ("__ELF__");              \
       builtin_define ("__gnu_linux__");                \
       if (flag_pic)                            \
         {                                      \
index a663829171b51ddd873c793624af34cceb006d23..4d9aeb3d78d6138f7557386eb36e06d17f769af0 100644 (file)
@@ -72,6 +72,4 @@ Boston, MA 02111-1307, USA.  */
   assemble_name ((FILE), (NAME)),                      \
   fprintf ((FILE), ",%d\n", (int)(SIZE)))
 
-#define TARGET_OBJFMT_CPP_BUILTINS()
-
 #define DWARF2_UNWIND_INFO 0
index 1eed0899c0eb62aff450743697e4a7da9b129685..0dc2468a8603f14350d5e7707ac2efcafc4d3dc4 100644 (file)
@@ -58,11 +58,6 @@ Boston, MA 02111-1307, USA.  */
     fprintf ((FILE), "\t.little\n");                           \
 } while (0)
 
-
-
-/* Let code know that this is ELF.  */
-#define TARGET_OBJFMT_CPP_BUILTINS() builtin_define ("__ELF__")
-
 #undef SIZE_TYPE
 #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int")
 
index ee98cda91f397d44fd6417d5a54a1419b3e8ce68..b386774c5f29359f353621f0196138750ad5c2a7 100644 (file)
@@ -23,6 +23,5 @@ Boston, MA 02111-1307, USA.  */
 
 #define TARGET_OS_CPP_BUILTINS() do {          \
   builtin_define( "__rtems__" );               \
-  builtin_define( "__ELF__" );                 \
   builtin_assert( "system=rtems" );            \
 } while (0)
index acec122abd04d57d83e938cd1e1f53a03f95f306..c75103395344702cc34578031fdedf8e92da9586 100644 (file)
@@ -79,7 +79,6 @@ do { \
       builtin_define ("__pic__"); \
       builtin_define ("__PIC__"); \
     } \
-  TARGET_OBJFMT_CPP_BUILTINS (); \
 } while (0)
 
 /* We can not debug without a frame pointer.  */
index 4d33a3324546063c5d8d8f6d7840856bfc8f19f0..23f5892dd19e1b41064a6bed8ca488e3777f1e36 100644 (file)
@@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define_std ("unix");            \
        builtin_define_std ("linux");           \
        builtin_define ("__gnu_linux__");       \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=unix");         \
        builtin_assert ("system=posix");        \
     }                                          \
index 3f7f6cade824f57bcd54a2fb9cf294a0dfbf106b..aed067d9eacdef2d36a8482cf17b39be003ba5be 100644 (file)
@@ -26,7 +26,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define_std ("linux");           \
        builtin_define ("_LONGLONG");           \
        builtin_define ("__gnu_linux__");       \
-       builtin_define ("__ELF__");             \
        builtin_assert ("system=unix");         \
        builtin_assert ("system=posix");        \
     }                                          \
index c3d6dfc690c58d9b182fd995d42c323837b4b76b..96ddf7949af3cbf56a741cbe985d9ff1ec4d7209 100644 (file)
@@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA.  */
        builtin_define ("__sparcv9__");         \
        builtin_define ("__sparc_v9__");        \
        builtin_define ("__arch64__");          \
-       builtin_define ("__ELF__");             \
     }                                          \
   while (0)
 
index 5592a6efc3410a86f7d7f5fd7971853cac43a393..f442fd86fc665e6dd9985c64ca95081e7621d1a1 100644 (file)
@@ -44,7 +44,6 @@ Boston, MA 02111-1307, USA.  */
   do                                           \
     {                                          \
        builtin_define_std ("sparc");           \
-       builtin_define ("__ELF__");             \
     }                                          \
   while (0)
 
index e9e8cdb12480597baefcc5b7ba00967c6c781880..a3107b50a5745632f621eb1e14122ff81122bfa1 100644 (file)
@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA.  */
   do                                           \
     {                                          \
        builtin_define ("__sparclite86x__");    \
-       builtin_define ("__ELF__");             \
     }                                          \
   while (0)
 
index 4bc4f7fdca3dd8e0c20056f24fa86c251c146ae7..6c8ebcdc211b576d77bdeb2e948112bba6ea1d24 100644 (file)
@@ -19,11 +19,6 @@ along with GCC; see the file COPYING.  If not, write to the Free
 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.  */
 
-#define TARGET_OS_CPP_BUILTINS()                               \
-  do {                                                         \
-    builtin_define ("__ELF__");                                        \
-  } while (0)
-
 #define TARGET_SECTION_TYPE_FLAGS xtensa_multibss_section_type_flags
 
 /* Don't assume anything about the header files. */
index b364ed900b48b42dc52242bace586a4d10959b47..b3281a21d5227afd05723b7193a9435c2b9129d2 100644 (file)
@@ -23,7 +23,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   do {                                                         \
     builtin_define_std ("linux");                              \
     builtin_define_std ("unix");                               \
-    builtin_define ("__ELF__");                                        \
     builtin_define ("__gnu_linux__");                          \
     builtin_assert ("system=posix");                           \
   } while (0)
index 5f72bfd2b817d9d7a0384965862b1615f1d360d3..12b2527ef062aa268d639b2c4382c6399c2dcf93 100644 (file)
@@ -47,10 +47,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #  define TARGET_ESC 033
 #endif
 
-#ifndef TARGET_OS_CPP_BUILTINS
-# define TARGET_OS_CPP_BUILTINS()
-#endif
-
 /* Store in OUTPUT a string (made with alloca) containing an
    assembler-name for a local static variable or function named NAME.
    LABELNO is an integer which is different for each call.  */
index d1ade8112ea1f875474e046173852c3d2cb0d3ef..63ac814c0f5123e958029cb91fb2d7a7f45a160f 100644 (file)
@@ -1945,6 +1945,9 @@ incremented on every @samp{#include} directive and decremented at the
 end of every included file.  It starts out at 0, it's value within the
 base file specified on the command line.
 
+@item __ELF__
+This macro is defined if the target uses the ELF object format.
+
 @item __VERSION__
 This macro expands to a string constant which describes the version of
 the compiler in use.  You should not rely on its contents having any
index 8b22dbc2a0b027ce066cab73fb26e9bc13652e6c..73b2f273ee8c9f0d69c47e06cb9472fb5850175c 100644 (file)
@@ -655,6 +655,13 @@ preprocessing.
 Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional
 and is used for the target operating system instead.
 
+@findex TARGET_OBJFMT_CPP_BUILTINS
+@item TARGET_OBJFMT_CPP_BUILTINS()
+Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional
+and is used for the target object format.  @file{elfos.h} uses this
+macro to define @code{__ELF__}, so you probably do not need to define
+it yourself.
+
 @findex extern int target_flags
 @item extern int target_flags;
 This declaration should be present.