diff options
author | kan <kan@FreeBSD.org> | 2003-07-11 05:09:19 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-07-11 05:09:19 +0000 |
commit | 8b2cc597a6c0c2bafa3f28ee0802ab13f2b0baf6 (patch) | |
tree | 6f5440522030f382f698af49c052cacd8fb0e85c /contrib/gcc | |
parent | 72fde9e54fb99e443e006fad1f2af9c8f60c28e8 (diff) | |
download | FreeBSD-src-8b2cc597a6c0c2bafa3f28ee0802ab13f2b0baf6.zip FreeBSD-src-8b2cc597a6c0c2bafa3f28ee0802ab13f2b0baf6.tar.gz |
Update for GCC 3.3.1-prerelease.
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/config/freebsd-spec.h | 74 | ||||
-rw-r--r-- | contrib/gcc/config/freebsd.h | 20 |
2 files changed, 41 insertions, 53 deletions
diff --git a/contrib/gcc/config/freebsd-spec.h b/contrib/gcc/config/freebsd-spec.h index 6189298..3dee03b 100644 --- a/contrib/gcc/config/freebsd-spec.h +++ b/contrib/gcc/config/freebsd-spec.h @@ -50,45 +50,43 @@ Boston, MA 02111-1307, USA. */ || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) - -#ifndef FREEBSD_NATIVE /* these bits are here to reduce merge diffs, but I don't want to acutally use the bits right now */ - - -#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" +#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_NATIVE_TARGET_OS_CPP_BUILTINS(); \ + 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) + +#ifdef FREEBSD_NATIVE +#define FBSD_NATIVE_TARGET_OS_CPP_BUILTINS() \ + do { \ + builtin_define_std ("__FreeBSD_cc_version=500006"); \ + } while (0) +#else +#define FBSD_NATIVE_TARGET_OS_CPP_BUILTINS() \ + do {} while (0) #endif - -#else /* FREEBSD_NATIVE */ -/* Place spaces around this string. We depend on string splicing to produce - the final CPP_PREDEFINES value. */ - -#define FBSD_CPP_PREDEFINES \ - "-D__FreeBSD__=5 -D__FreeBSD_cc_version=500005 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" -#endif /* ! FREEBSD_NATIVE */ - - /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC option `-posix', and PIC issues. Try to detect support for the `long long' type. Unfortunately the GCC spec parser will not allow us @@ -106,7 +104,7 @@ Boston, MA 02111-1307, USA. */ /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add the magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static object constructed - before entering `main'. */ + before entering `main'. */ #define FBSD_STARTFILE_SPEC \ "%{!shared: \ diff --git a/contrib/gcc/config/freebsd.h b/contrib/gcc/config/freebsd.h index cd9f7eb..9f4f171 100644 --- a/contrib/gcc/config/freebsd.h +++ b/contrib/gcc/config/freebsd.h @@ -43,7 +43,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 @@ -68,17 +71,10 @@ Boston, MA 02111-1307, USA. */ #undef NO_IMPLICIT_EXTERN_C #define NO_IMPLICIT_EXTERN_C 1 -/* Allow #sccs in preprocessor. */ -#undef SCCS_DIRECTIVE -#define SCCS_DIRECTIVE 1 - /* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...) */ #undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef WCHAR_UNSIGNED -#define WCHAR_UNSIGNED 0 +#define WCHAR_TYPE "int" #ifdef FREEBSD_NATIVE #define LIBSTDCXX_PROFILE "-lstdc++_p" @@ -101,9 +97,3 @@ Boston, MA 02111-1307, USA. */ This enables the test coverage code to use file locking when exiting a program, which avoids race conditions if the program has forked. */ #define TARGET_HAS_F_SETLKW 1 - - -/************************[ Assembler stuff ]********************************/ - - -/************************[ Debugger stuff ]*********************************/ |