summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-10 19:05:07 +0000
committerobrien <obrien@FreeBSD.org>2002-05-10 19:05:07 +0000
commitf4aad0fe0009f19479771253f2a031511c988870 (patch)
tree9b7807db5983d13091fe86523c62f93aa3a09d74 /contrib/gcc/config
parent12e1531e597ce65a197e9c59592508b201d816fc (diff)
downloadFreeBSD-src-f4aad0fe0009f19479771253f2a031511c988870.zip
FreeBSD-src-f4aad0fe0009f19479771253f2a031511c988870.tar.gz
Add tweaks needed when using as the system compiler.
Diffstat (limited to 'contrib/gcc/config')
-rw-r--r--contrib/gcc/config/freebsd-spec.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/contrib/gcc/config/freebsd-spec.h b/contrib/gcc/config/freebsd-spec.h
index 8b01536..ad6f059 100644
--- a/contrib/gcc/config/freebsd-spec.h
+++ b/contrib/gcc/config/freebsd-spec.h
@@ -18,6 +18,8 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
/* Common FreeBSD configuration.
All FreeBSD architectures should include this file, which will specify
their commonalities.
@@ -48,6 +50,10 @@ 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"
@@ -73,11 +79,24 @@ Boston, MA 02111-1307, USA. */
"-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#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=500003 -Dunix -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. */
#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}"
@@ -129,7 +148,8 @@ is built with the --enable-threads configure-time option.} \
%{pg: -lc_p} \
}"
#else
-#if FBSD_MAJOR >= 5
+#include <sys/param.h>
+#if __FreeBSD_version >= 500016
#define FBSD_LIB_SPEC " \
%{!shared: \
%{!pg: %{pthread:-lc_r} -lc} \
OpenPOWER on IntegriCloud