diff --git a/contrib/gcc/config/alpha/freebsd.h b/contrib/gcc/config/alpha/freebsd.h index a258c64758d..a3052d83c06 100644 --- a/contrib/gcc/config/alpha/freebsd.h +++ b/contrib/gcc/config/alpha/freebsd.h @@ -36,12 +36,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef WCHAR_UNSIGNED #define WCHAR_UNSIGNED 0 -/* Provide a CPP_SPEC appropriate for FreeBSD. Current we just deal with - the GCC option `-posix'. */ - -#undef CPP_SPEC -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" - /* Provide an ASM_SPEC appropriate for a FreeBSD/Alpha target. This differs from the generic FreeBSD ASM_SPEC in that no special handling of PIC is necessary on the Alpha. */ @@ -76,7 +70,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES \ - "-D__alpha__ -D__alpha -D__ELF__ -Acpu(alpha) -Amachine(alpha)" \ + "-D__alpha__ -D__alpha -Acpu(alpha) -Amachine(alpha)" \ CPP_FBSD_PREDEFINES #undef LINK_SPEC diff --git a/contrib/gcc/config/freebsd.h b/contrib/gcc/config/freebsd.h index a96dac66feb..95505d8f3a4 100644 --- a/contrib/gcc/config/freebsd.h +++ b/contrib/gcc/config/freebsd.h @@ -58,6 +58,17 @@ Boston, MA 02111-1307, USA. */ the final CPP_PREDEFINES value. */ #define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=400003 -Asystem(unix) -Asystem(FreeBSD) " +#define FBSD_CPP_SPEC "\ + %(cpp_cpu) \ + %{!maout: -D__ELF__} \ + %{munderscores: -D__UNDERSCORES__} \ + %{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ + %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ + %{posix:-D_POSIX_SOURCE}" + +#undef CPP_SPEC +#define CPP_SPEC FBSD_CPP_SPEC + /* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate libc, depending on whether we're doing profiling. (like the default, except no -lg, and no -p). */ diff --git a/contrib/gcc/config/i386/freebsd.h b/contrib/gcc/config/i386/freebsd.h index 0de6beb1905..5b8d51b7c2b 100644 --- a/contrib/gcc/config/i386/freebsd.h +++ b/contrib/gcc/config/i386/freebsd.h @@ -466,13 +466,6 @@ do { \ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES -#undef CPP_SPEC -#define CPP_SPEC "\ -%{!maout: -D__ELF__} \ -%{munderscores: -D__UNDERSCORES__} \ -%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ -%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}" - #undef CC1_SPEC #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ diff --git a/contrib/gcc/config/i386/freebsd.h.fixed b/contrib/gcc/config/i386/freebsd.h.fixed index 0de6beb1905..5b8d51b7c2b 100644 --- a/contrib/gcc/config/i386/freebsd.h.fixed +++ b/contrib/gcc/config/i386/freebsd.h.fixed @@ -466,13 +466,6 @@ do { \ #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES -#undef CPP_SPEC -#define CPP_SPEC "\ -%{!maout: -D__ELF__} \ -%{munderscores: -D__UNDERSCORES__} \ -%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ -%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}" - #undef CC1_SPEC #define CC1_SPEC "\ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \