netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.

* config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
(EXTRA_SPECS): Add netbsd_cpp_spec.
(CPP_SPEC): Use %(netbsd_cpp_spec).
(CPP_PREDEFINES): Remove.
* config/m68k/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
(EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
(CPP_PREDEFINES): Remove.

From-SVN: r54016
This commit is contained in:
Jason Thorpe 2002-05-29 20:09:29 +00:00 committed by Jason Thorpe
parent e7206fbc5c
commit cd7714ee96
3 changed files with 43 additions and 16 deletions

View File

@ -1,3 +1,14 @@
2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
* config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
(EXTRA_SPECS): Add netbsd_cpp_spec.
(CPP_SPEC): Use %(netbsd_cpp_spec).
(CPP_PREDEFINES): Remove.
* config/m68k/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
(EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
(CPP_PREDEFINES): Remove.
2002-05-29 Neil Booth <neil@daikokuya.demon.co.uk>
PR preprocessor/6844

View File

@ -24,6 +24,17 @@ 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(); \
builtin_define ("__m68k__"); \
builtin_define ("__SVR4_ABI__"); \
builtin_define ("__motorola__"); \
builtin_assert ("cpu=m68k"); \
builtin_assert ("machine=m68k"); \
} \
while (0)
/* Default target comes from config.gcc */
#undef TARGET_DEFAULT
@ -44,7 +55,8 @@ Boston, MA 02111-1307, USA. */
{ "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \
{ "cpp_cpu_spec", CPP_CPU_SPEC }, \
{ "cpp_fpu_spec", CPP_FPU_SPEC }, \
{ "asm_default_spec", ASM_DEFAULT_SPEC },
{ "asm_default_spec", ASM_DEFAULT_SPEC }, \
{ "netbsd_cpp_spec", NETBSD_CPP_SPEC },
#define CPP_CPU_SPEC \
@ -80,7 +92,7 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC \
"%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)"
"%(netbsd_cpp_spec) %(cpp_cpu_spec) %(cpp_fpu_spec)"
/* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets. We pass
@ -92,16 +104,6 @@ Boston, MA 02111-1307, USA. */
%{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
%{fpic:-k} %{fPIC:-k -K}"
/* Provide a set of CPP pre-definitions and pre-assertions appropriate
for NetBSD m68k ELF targets (using the SVR4 ABI). */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
"-D__NetBSD__ -D__ELF__ -D__m68k__ -D__SVR4_ABI__ -D__motorola__ \
-Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k"
/* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target.
This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
the m68k target. */

View File

@ -1,3 +1,16 @@
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
NETBSD_OS_CPP_BUILTINS_AOUT(); \
builtin_define_std ("unix"); \
builtin_define_std ("m68k"); \
builtin_define_std ("mc68000"); \
builtin_define_std ("mc68020"); \
builtin_assert ("cpu=m68k"); \
builtin_assert ("machine=m68k"); \
} \
while (0)
#include <m68k/m68k.h>
/* Get generic NetBSD definitions. */
@ -7,18 +20,19 @@
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
#define EXTRA_SPECS \
{ "netbsd_cpp_spec", NETBSD_CPP_SPEC },
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
This will control the use of inline 68881 insns in certain macros. */
#undef CPP_SPEC
#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
#define CPP_SPEC \
"%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %(netbsd_cpp_spec)"
#undef ASM_SPEC
#define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}"
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k"
/* Make gcc agree with <machine/ansi.h> */