aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gcc46/files/patch-ar
blob: f2200f115da8933094e0cdd33f26a086a292bb9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- gcc/config/freebsd.h.orig   Mon Nov 22 22:17:32 1999
+++ gcc/config/freebsd.h    Sat Dec 18 14:42:03 1999
@@ -48,13 +48,23 @@
 #undef WORD_SWITCH_TAKES_ARG
 #define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
 
+/* Place spaces around this string.  We depend on string splicing to produce
+   the final CPP_PREDEFINES value.  */
+#define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) "
+
 /* Provide a CPP_SPEC appropriate for FreeBSD.  We just deal with the GCC 
    option `-posix', and PIC issues.  */
 
-#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu)                       \
+#define FBSD_CPP_SPEC "                            \
+  %(cpp_cpu)                               \
   %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}      \
-  %{posix:-D_POSIX_SOURCE}"
+  %{posix:-D_POSIX_SOURCE}                     \
+  %{!maout: -D__ELF__}                         \
+  %{munderscores: -D__UNDERSCORES__}                   \
+  %{maout: %{!mno-underscores: -D__UNDERSCORES__}}"
+
+#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 or need threads support.