summaryrefslogtreecommitdiff
path: root/lang/gcc-ooo/files/patch-ar
blob: e6a4c8ad30b096dd05fed7dd91c4dd6246d4a4c0 (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
30
31
32
--- gcc/config/freebsd.h.orig	Mon Nov 22 22:17:32 1999
+++ gcc/config/freebsd.h	Fri Feb  4 05:29:31 2000
@@ -48,13 +48,26 @@
 #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 FBSD_CPP_PREDEFINES " -Dunix -D__FreeBSD__ -Asystem(unix) -Asystem(bsd) -Asystem(FreeBSD) "
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES  FBSD_CPP_PREDEFINES
+
 /* 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.