+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.
#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. */
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}}"
#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
#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)"
#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"
#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
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"
/* 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}"