[PATCH] CPP fixes for x86_64-netbsd on 3.1 branch
Jason R Thorpe
thorpej@wasabisystems.com
Wed May 29 21:46:00 GMT 2002
These were applied to the trunk, but missed the 3.1 cut-off.
Committed to 3.1 branch.
* config/i386/netbsd64.h (CPP_LP64_SPEC): Define.
(CPP_SUBTARGET_SPEC): Define.
(SUBTARGET_EXTRA_SPECS): Redefine, adding cpp_lp64 and
cpp_subtarget specs.
(CPP_SPEC): Redefine to include %(cpp_subtarget).
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: config/i386/netbsd64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/netbsd64.h,v
retrieving revision 1.1
diff -u -r1.1 netbsd64.h
--- config/i386/netbsd64.h 22 Jan 2002 19:48:27 -0000 1.1
+++ config/i386/netbsd64.h 30 May 2002 03:55:44 -0000
@@ -48,6 +48,24 @@
"-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
+/* Provide some extra CPP specs needed by NetBSD/x86_64. */
+#define CPP_LP64_SPEC "%{!m32:-D_LP64}"
+
+#define CPP_SUBTARGET_SPEC "%(cpp_lp64)"
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+ { "cpp_lp64", CPP_LP64_SPEC }, \
+ { "cpp_subtarget", CPP_SUBTARGET_SPEC },
+
+
+/* Provide a CPP_SPEC appropriate for NetBSD. Currently we deal with
+ our subtarget specs and the GCC option `-posix'. */
+
+#undef CPP_SPEC
+#define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
+
+
/* Output assembler code to FILE to call the profiler. */
#undef FUNCTION_PROFILER
More information about the Gcc-patches
mailing list