diff options
author | Andrew Haley <aph@gcc.gnu.org> | 2001-07-27 15:20:41 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2001-07-27 15:20:41 +0000 |
commit | f636e2a57d170c1b8bb65668afc86b69f4b45ef1 (patch) | |
tree | 94f774eabded5772ad2b780985878210e0b4123b /gcc | |
parent | 0ab142b0273f6b8f76386e524702c969b7609afe (diff) | |
download | gcc-f636e2a57d170c1b8bb65668afc86b69f4b45ef1.zip gcc-f636e2a57d170c1b8bb65668afc86b69f4b45ef1.tar.gz gcc-f636e2a57d170c1b8bb65668afc86b69f4b45ef1.tar.bz2 |
linux.h (CPP_DEFAULT_CPU_SPEC): New.
2001-07-26 Andrew Haley <aph@redhat.com>
Joern Rennecke <amylaar@redhat.com>
* config/sh/linux.h (CPP_DEFAULT_CPU_SPEC): New.
(SUBTARGET_CPP_ENDIAN_SPEC): New.
(SUBTARGET_CPP_SPEC): New.
(CPP_SPEC): Remove.
* config/sh/sh.h (SUBTARGET_CPP_ENDIAN_SPEC): New.
(SUBTARGET_CPP_PTR_SPEC): New.
(CPP_DEFAULT_CPU_SPEC): New.
(EXTRA_SPECS): Add SUBTARGET_CPP_ENDIAN_SPEC,
SUBTARGET_CPP_PTR_SPEC, and CPP_DEFAULT_CPU_SPEC.
(CPP_SPEC): Break out parts into SUBTARGET_CPP_ENDIAN_SPEC,
SUBTARGET_CPP_PTR_SPEC, and CPP_DEFAULT_CPU_SPEC.
(SUBTARGET_CPP_SPEC): Define as an empty string.
From-SVN: r44428
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/sh/linux.h | 21 | ||||
-rw-r--r-- | gcc/config/sh/sh.h | 31 |
2 files changed, 41 insertions, 11 deletions
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index 3a10ac4..2be3d81 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -39,17 +39,22 @@ Boston, MA 02111-1307, USA. */ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD -#undef CPP_SPEC -#define CPP_SPEC \ - "%{mb:-D__BIG_ENDIAN__} \ - %{!mb:-D__LITTLE_ENDIAN__} \ - %{m3e:-D__SH3E__} \ - %{m4:-D__SH4__} \ - %{!m3e:%{!m4:-D__SH3__ -D__sh3__}} \ +#undef SUBTARGET_CPP_SPEC +#define SUBTARGET_CPP_SPEC "\ %{fPIC:-D__PIC__ -D__pic__} \ %{fpic:-D__PIC__ -D__pic__} \ %{posix:-D_POSIX_SOURCE} \ - %{pthread:-D_REENTRANT -D_PTHREADS}" + %{pthread:-D_REENTRANT -D_PTHREADS} \ +" + +#undef SUBTARGET_CPP_ENDIAN_SPEC +#define SUBTARGET_CPP_ENDIAN_SPEC \ + "%{mb:-D__BIG_ENDIAN__} \ + %{!mb:-D__LITTLE_ENDIAN__}" + +#undef CPP_DEFAULT_CPU_SPEC +#define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__" + #undef CPP_PREDEFINES #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -Dlinux -Asystem=posix" diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 039c7b0..e82a9d2 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -42,7 +42,7 @@ extern int code_for_indirect_jump_scratch; #define SDB_DELIM ";" -#define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__} \ +#define CPP_SPEC " \ %{m1:-D__sh1__} \ %{m2:-D__sh2__} \ %{m3:-D__sh3__} \ @@ -51,9 +51,34 @@ extern int code_for_indirect_jump_scratch; %{m4-single:-D__SH4_SINGLE__} \ %{m4-nofpu:-D__sh3__ -D__SH4_NOFPU__} \ %{m4:-D__SH4__} \ -%{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:%{!m4-nofpu:-D__sh1__}}}}}}}} \ +%{!m1:%{!m2:%{!m3*:%{!m4*:%(cpp_default_cpu_spec)}}}} \ %{mnomacsave:-D__NOMACSAVE__} \ -%{mhitachi:-D__HITACHI__}" +%{mhitachi:-D__HITACHI__} \ +%(subtarget_cpp_spec) \ +%(subtarget_cpp_ptr_spec) \ +%(subtarget_cpp_endian_spec) " + +#ifndef SUBTARGET_CPP_ENDIAN_SPEC +#define SUBTARGET_CPP_ENDIAN_SPEC "%{ml:-D__LITTLE_ENDIAN__}" +#endif + +#ifndef SUBTARGET_CPP_SPEC +#define SUBTARGET_CPP_SPEC "" +#endif + +#ifndef CPP_DEFAULT_CPU_SPEC +#define CPP_DEFAULT_CPU_SPEC "-D__sh1__" +#endif + +#ifndef SUBTARGET_CPP_PTR_SPEC +#define SUBTARGET_CPP_PTR_SPEC "-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int" +#endif + +#define EXTRA_SPECS \ + { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ + { "subtarget_cpp_endian_spec", SUBTARGET_CPP_ENDIAN_SPEC }, \ + { "subtarget_cpp_ptr_spec", SUBTARGET_CPP_PTR_SPEC }, \ + { "cpp_default_cpu_spec", CPP_DEFAULT_CPU_SPEC }, #define CPP_PREDEFINES "-D__sh__ -Acpu=sh -Amachine=sh" |