netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.

* config/i386/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES): Remove.
(SUBTARGET_EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
* config/i386/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES): Remove.
(SUBTARGET_EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
* config/i386/netbsd64.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES, CPP_LP64_SPEC, CPP_SUBTARGET_SPEC): Remove.
(SUBTARGET_EXTRA_SPECS): Remove cpp_lp64 and cpp_subtarget.
Add netbsd_cpp_spec.
(CPP_SPEC): Remove %(cpp_subtarget), add %(netbsd_cpp_spec).

From-SVN: r54009
This commit is contained in:
Jason Thorpe 2002-05-29 17:57:55 +00:00 committed by Jason Thorpe
parent cd7ab83f2d
commit 45beef47f3
4 changed files with 51 additions and 30 deletions

View File

@ -1,3 +1,19 @@
2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
* config/i386/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES): Remove.
(SUBTARGET_EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
* config/i386/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES): Remove.
(SUBTARGET_EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
* config/i386/netbsd64.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES, CPP_LP64_SPEC, CPP_SUBTARGET_SPEC): Remove.
(SUBTARGET_EXTRA_SPECS): Remove cpp_lp64 and cpp_subtarget.
Add netbsd_cpp_spec.
(CPP_SPEC): Remove %(cpp_subtarget), add %(netbsd_cpp_spec).
2002-05-29 Neil Booth <neil@daikokuya.demon.co.uk>
Zack Weinberg <zack@codesourcery.com>

View File

@ -20,6 +20,13 @@ 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. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
NETBSD_OS_CPP_BUILTINS_ELF(); \
} \
while (0)
/* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target.
This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
the i386 target. */
@ -38,16 +45,14 @@ Boston, MA 02111-1307, USA. */
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
%{static:-static}}"
/* Names to predefine in the preprocessor for this target machine. */
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "netbsd_cpp_spec", NETBSD_CPP_SPEC },
#define CPP_PREDEFINES \
"-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
/* Provide a CPP_SPEC appropriate for NetBSD. Currently we just deal with
the GCC option `-posix'. */
/* Provide a CPP_SPEC appropriate for NetBSD. */
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
#define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)"
/* Make gcc agree with <machine/ansi.h> */

View File

@ -1,3 +1,10 @@
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
NETBSD_OS_CPP_BUILTINS_AOUT(); \
} \
while (0)
#define TARGET_VERSION fprintf (stderr, " (NetBSD/i386 a.out)");
/* This goes away when the math-emulator is fixed */
@ -5,12 +12,12 @@
#define TARGET_SUBTARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -D__NetBSD__ \
-Asystem=unix -Asystem=bsd -Asystem=NetBSD"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "netbsd_cpp_spec", NETBSD_CPP_SPEC },
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
#define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)"
#undef SIZE_TYPE

View File

@ -20,6 +20,14 @@ 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. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
NETBSD_OS_CPP_BUILTINS_ELF(); \
if (TARGET_64BIT) \
NETBSD_OS_CPP_BUILTINS_LP64(); \
} \
while (0)
/* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target.
This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
@ -41,29 +49,14 @@ Boston, MA 02111-1307, USA. */
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
%{static:-static}}"
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES \
"-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 },
#define SUBTARGET_EXTRA_SPECS \
{ "netbsd_cpp_spec", NETBSD_CPP_SPEC },
/* Provide a CPP_SPEC appropriate for NetBSD. Currently we deal with
our subtarget specs and the GCC option `-posix'. */
/* Provide a CPP_SPEC appropriate for NetBSD. */
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
#define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)"
/* Output assembler code to FILE to call the profiler. */