Commit a6e464ae by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

aout.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__AOUT__ to...

	* config/cris/aout.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__AOUT__ to...
	(TARGET_OS_CPP_BUILTINS): New macro.
	* config/cris/cris.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__ELF__ to...
	(TARGET_OS_CPP_BUILTINS): New macro.
	(CPP_PREDEFINES): Don't define.  Move old definitions and...
	(CPP_SPEC): ...move -D__CRIS_ABI_version=2 to...
	(TARGET_CPU_CPP_BUILTINS): New macro.
	* config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Move constant
	definitions and the optional __PIC__, __pic__ and
	__NO_UNDERSCORES__ definitions to...
	(TARGET_OS_CPP_BUILTINS): New macro.

From-SVN: r64014
parent 00a221f0
2003-03-09 Hans-Peter Nilsson <hp@bitrange.com>
* config/cris/aout.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__AOUT__ to...
(TARGET_OS_CPP_BUILTINS): New macro.
* config/cris/cris.h (CRIS_CPP_SUBTARGET_SPEC): Move -D__ELF__ to...
(TARGET_OS_CPP_BUILTINS): New macro.
(CPP_PREDEFINES): Don't define. Move old definitions and...
(CPP_SPEC): ...move -D__CRIS_ABI_version=2 to...
(TARGET_CPU_CPP_BUILTINS): New macro.
* config/cris/linux.h (CRIS_CPP_SUBTARGET_SPEC): Move constant
definitions and the optional __PIC__, __pic__ and
__NO_UNDERSCORES__ definitions to...
(TARGET_OS_CPP_BUILTINS): New macro.
* flags.h (flag_leading_underscore): Declare.
* c-opts.c (c_common_post_options): On fopen failure, return
......
......@@ -64,8 +64,7 @@ Boston, MA 02111-1307, USA. */
#undef CRIS_CPP_SUBTARGET_SPEC
#define CRIS_CPP_SUBTARGET_SPEC \
"-D__AOUT__\
%{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\
"%{melinux:-D__gnu_linux__ -D__linux__ -D__unix__ -D__elinux__ -D__uclinux__\
%{!nostdinc:\
%{!mbest-lib-options:%{isystem*}}\
-isystem elinux/include%s\
......@@ -118,6 +117,19 @@ Boston, MA 02111-1307, USA. */
#undef CRIS_SUBTARGET_DEFAULT
#define CRIS_SUBTARGET_DEFAULT 0
/* Node: Run-time Target */
/* For the cris-*-aout subtarget. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__AOUT__"); \
} \
while (0)
/* Node: Storage Layout */
/* We can align to 16 bits (only) with CRIS a.out. */
......
......@@ -116,8 +116,7 @@ extern const char *cris_elinux_stacksize_str;
Note that -melf overrides -maout. */
#define CPP_SPEC \
"-D__CRIS_ABI_version=2\
%{mtune=*:-D__tune_%* %{mtune=v*:-D__CRIS_arch_tune=%*}}\
"%{mtune=*:-D__tune_%* %{mtune=v*:-D__CRIS_arch_tune=%*}}\
%{mtune=etrax4:-D__tune_v3 -D__CRIS_arch_tune=3}\
%{mtune=etrax100:-D__tune_v8 -D__CRIS_arch_tune=8}\
%{mtune=svinto:-D__tune_v8 -D__CRIS_arch_tune=8}\
......@@ -141,8 +140,7 @@ extern const char *cris_elinux_stacksize_str;
/* For the cris-*-elf subtarget. */
#define CRIS_CPP_SUBTARGET_SPEC \
"-D__ELF__\
%{mbest-lib-options:\
"%{mbest-lib-options:\
%{!moverride-best-lib-options:\
%{!march=*:%{!metrax*:%{!mcpu=*:-D__tune_v10 -D__CRIS_arch_tune=10}}}}}"
......@@ -246,8 +244,23 @@ extern const char *cris_elinux_stacksize_str;
/* Node: Run-time Target */
/* Only keep the non-varying ones here. */
#define CPP_PREDEFINES "-Dcris -DCRIS -DGNU_CRIS"
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("cris"); \
builtin_define_std ("CRIS"); \
builtin_define_std ("GNU_CRIS"); \
builtin_define ("__CRIS_ABI_version=2"); \
} \
while (0)
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__ELF__"); \
} \
while (0)
/* This needs to be at least 32 bits. */
extern int target_flags;
......
/* Definitions for GCC. Part of the machine description for CRIS.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Axis Communications. Written by Hans-Peter Nilsson.
This file is part of GCC.
......@@ -47,10 +47,7 @@ Boston, MA 02111-1307, USA. */
#undef CRIS_CPP_SUBTARGET_SPEC
#define CRIS_CPP_SUBTARGET_SPEC \
"-D__gnu_linux__ -D__linux__ -D__unix__ -D__ELF__\
%{pthread:-D_REENTRANT}\
%{fPIC|fpic: -D__PIC__ -D__pic__}\
%{!fleading-underscore:-fno-leading-underscore -D__NO_UNDERSCORES__}\
"%{pthread:-D_REENTRANT}\
%{!march=*:%{!cpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}\
%{!ansi:%{!std=*:%{!undef:-Dlinux -Dunix}\
-Asystem(unix) -Asystem(posix) -Acpu(cris) -Amachine(cris)}}"
......@@ -99,6 +96,28 @@ Boston, MA 02111-1307, USA. */
%{!r:%{O2|O3: --gc-sections}}"
/* Node: Run-time Target */
/* For the cris-*-linux* subtarget. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__gnu_linux__"); \
builtin_define ("__linux__"); \
builtin_define ("__unix__"); \
builtin_define ("__ELF__"); \
if (flag_pic) \
{ \
builtin_define ("__PIC__"); \
builtin_define ("__pic__"); \
} \
if (flag_leading_underscore <= 0) \
builtin_define ("__NO_UNDERSCORES__"); \
} \
while (0)
/* Node: Sections */
/* GNU/Linux has crti and crtn and does not need the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment