Commit 57016b47 by Steve Ellcey Committed by Steve Ellcey

ia64.h (EXTRA_SPECS): Remove cpp_cpu.

	* config/ia64/ia64.h (EXTRA_SPECS): Remove cpp_cpu.
	(CPP_CPU_SPEC): Remove.
	(TARGET_CPU_CPP_BUILTINS): New.
	* config/ia64/hpux.h (CPP_PREDEFINES): Remove.
	(CPP_SPEC): Remove.
	(TARGET_OS_CPP_BUILTINS): New.
	* config/ia64/linux.h (CPP_PREDEFINES): Remove.
	(TARGET_OS_CPP_BUILTINS): New.
	* config/ia64/aix.h (CPP_SPEC): Move some stuff to
	TARGET_OS_CPP_BUILTINS.
	(CPP_PREDEFINES): Remove.
	(CPLUSPLUS_CPP_SPEC): Remove.
	(TARGET_OS_CPP_BUILTINS): New.

From-SVN: r56771
parent 5e25fa22
2002-09-03 Steve Ellcey <sje@cup.hp.com>
* config/ia64/ia64.h (EXTRA_SPECS): Remove cpp_cpu.
(CPP_CPU_SPEC): Remove.
(TARGET_CPU_CPP_BUILTINS): New.
* config/ia64/hpux.h (CPP_PREDEFINES): Remove.
(CPP_SPEC): Remove.
(TARGET_OS_CPP_BUILTINS): New.
* config/ia64/linux.h (CPP_PREDEFINES): Remove.
(TARGET_OS_CPP_BUILTINS): New.
* config/ia64/aix.h (CPP_SPEC): Move some stuff to
TARGET_OS_CPP_BUILTINS.
(CPP_PREDEFINES): Remove.
(CPLUSPLUS_CPP_SPEC): Remove.
(TARGET_OS_CPP_BUILTINS): New.
2002-09-03 Richard Henderson <rth@redhat.com> 2002-09-03 Richard Henderson <rth@redhat.com>
* Makefile.in (USER_H): Add ginclude/float.h. * Makefile.in (USER_H): Add ginclude/float.h.
......
...@@ -71,32 +71,36 @@ Boston, MA 02111-1307, USA. */ ...@@ -71,32 +71,36 @@ Boston, MA 02111-1307, USA. */
/* Define this so we can compile MS code for use with WINE. */ /* Define this so we can compile MS code for use with WINE. */
#define HANDLE_PRAGMA_PACK_PUSH_POP #define HANDLE_PRAGMA_PACK_PUSH_POP
/* Target OS builtins. */
#define TARGET_OS_CPP_BUILTINS() \
do { \
if (iso_flag) \
builtin_define("_ANSI_C_SOURCE"); \
builtin_define("_AIX"); \
builtin_define("_AIX64"); \
builtin_define("unix"); \
builtin_assert("system=unix"); \
builtin_assert("system=aix"); \
builtin_define("__64BIT__"); \
builtin_define("_LONG_LONG"); \
builtin_define("_IA64"); \
builtin_define("__int128=__size128_t"); \
if (c_language == clk_cplusplus) \
{ \
builtin_define("_XOPEN_SOURCE=500"); \
builtin_define("_XOPEN_SOURCE_EXTENDED=1"); \
builtin_define("_LARGE_FILE_API"); \
builtin_define("_ALL_SOURCE"); \
} \
} while (0)
/* A C string constant that tells the GNU CC driver program options to pass to /* A C string constant that tells the GNU CC driver program options to pass to
CPP. It can also specify how to translate options you give to GNU CC into CPP. It can also specify how to translate options you give to GNU CC into
options for GNU CC to pass to the CPP. */ options for GNU CC to pass to the CPP. */
/* If -ansi, we need to define _ANSI_C_SOURCE to get the right headers. */
#undef CPP_SPEC #undef CPP_SPEC
#define CPP_SPEC "\ #define CPP_SPEC "\
%{mcpu=itanium:-D__itanium__} %{mbig-endian:-D__BIG_ENDIAN__} \ %{posix:-D_POSIX_SOURCE}"
%{ansi:-D_ANSI_C_SOURCE} \
%{posix:-D_POSIX_SOURCE} \
%{cpp_cpu}"
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D_AIX -D_AIX64 -D_LONGLONG -Dunix \
-Asystem=unix -Asystem=aix \
-D__64BIT__ -D_LONG_LONG -D_IA64 -D__int128=__size128_t"
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
#define CPLUSPLUS_CPP_SPEC \
"-D_XOPEN_SOURCE=500 \
-D_XOPEN_SOURCE_EXTENDED=1 \
-D_LARGE_FILE_API \
-D_ALL_SOURCE \
%{cpp_cpu}"
/* Define this for shared library support. */ /* Define this for shared library support. */
......
...@@ -25,26 +25,29 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,26 +25,29 @@ Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX"); #define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX");
#undef CPP_PREDEFINES /* Target OS builtins. */
#define CPP_PREDEFINES "\ /* -D__fpreg=long double is needed to compensate for
-D__IA64__ -D__hpux -D__hpux__ -Dhpux -Dunix \ the lack of __fpreg which is a primative type in
-D__BIG_ENDIAN__ -D_LONGLONG \ HP C but does not exist in GNU C. */
-Asystem=hpux -Asystem=posix -Asystem=unix \ #define TARGET_OS_CPP_BUILTINS() \
-D_UINT128_T" do { \
builtin_assert("system=hpux"); \
/* -D__fpreg=long double is needed to compensate for the lack of __fpreg builtin_assert("system=posix"); \
which is a primitive type in HP C but does not exist in GNU C. Same builtin_assert("system=unix"); \
for __float80 and __float128. These types appear in HP-UX header builtin_define_std("hpux"); \
files and so must have some definition. */ builtin_define_std("unix"); \
builtin_define("__IA64__"); \
#undef CPP_SPEC builtin_define("_LONGLONG"); \
#define CPP_SPEC "\ builtin_define("_UINT128_T"); \
%{mcpu=itanium:-D__itanium__} \ builtin_define("__fpreg=long double"); \
%{mlp64:-D__LP64__ -D_LP64} \ builtin_define("__float80=long double"); \
%{!ansi:%{!std=c*:%{!std=i*: -D_HPUX_SOURCE -D__STDC_EXT__}}} \ builtin_define("__float128=long double"); \
-D__fpreg=long\\ double \ if (c_language == clk_cplusplus || !flag_iso) \
-D__float80=long\\ double \ { \
-D__float128=long\\ double" builtin_define("_HPUX_SOURCE"); \
builtin_define("__STDC_EXT__"); \
} \
} while (0)
#undef ASM_EXTRA_SPEC #undef ASM_EXTRA_SPEC
#define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}" #define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
......
...@@ -31,14 +31,27 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,14 +31,27 @@ Boston, MA 02111-1307, USA. */
/* Run-time target specifications */ /* Run-time target specifications */
/* Target CPU builtins. */
#define TARGET_CPU_CPP_BUILTINS() \
do { \
builtin_assert("cpu=ia64"); \
builtin_assert("machine=ia64"); \
builtin_define("__ia64"); \
builtin_define("__ia64__"); \
builtin_define("__itanium__"); \
builtin_define("__ELF__"); \
if (!TARGET_ILP32) \
{ \
builtin_define("_LP64"); \
builtin_define("__LP64__"); \
} \
if (TARGET_BIG_ENDIAN) \
builtin_define("__BIG_ENDIAN__"); \
} while (0)
#define EXTRA_SPECS \ #define EXTRA_SPECS \
{ "cpp_cpu", CPP_CPU_SPEC }, \
{ "asm_extra", ASM_EXTRA_SPEC }, { "asm_extra", ASM_EXTRA_SPEC },
#define CPP_CPU_SPEC " \
-Acpu=ia64 -Amachine=ia64 -D__ia64 -D__ia64__ %{!milp32:-D_LP64 -D__LP64__} \
-D__ELF__"
#define CC1_SPEC "%(cc1_cpu) " #define CC1_SPEC "%(cc1_cpu) "
#define ASM_EXTRA_SPEC "" #define ASM_EXTRA_SPEC ""
...@@ -209,13 +222,6 @@ extern const char *ia64_tls_size_string; ...@@ -209,13 +222,6 @@ extern const char *ia64_tls_size_string;
/* Driver configuration */ /* Driver configuration */
/* A C string constant that tells the GNU CC driver program options to pass to /* A C string constant that tells the GNU CC driver program options to pass to
CPP. It can also specify how to translate options you give to GNU CC into
options for GNU CC to pass to the CPP. */
#define CPP_SPEC \
"%{mcpu=itanium:-D__itanium__} %{mbig-endian:-D__BIG_ENDIAN__} %(cpp_cpu)"
/* A C string constant that tells the GNU CC driver program options to pass to
`cc1'. It can also specify how to translate options you give to GNU CC into `cc1'. It can also specify how to translate options you give to GNU CC into
options for GNU CC to pass to the `cc1'. */ options for GNU CC to pass to the `cc1'. */
......
...@@ -9,10 +9,15 @@ ...@@ -9,10 +9,15 @@
#undef CC1_SPEC #undef CC1_SPEC
#define CC1_SPEC "%{profile:-p} %{G*}" #define CC1_SPEC "%{profile:-p} %{G*}"
/* ??? Maybe this should be in sysv4.h? */ /* Target OS builtins. */
#define CPP_PREDEFINES "\ #define TARGET_OS_CPP_BUILTINS() \
-D__gnu_linux__ -D__linux -D__linux__ -D_LONGLONG \ do { \
-Dlinux -Dunix -Asystem=linux" builtin_assert("system=linux"); \
builtin_define_std("linux"); \
builtin_define_std("unix"); \
builtin_define("__gnu_linux__"); \
builtin_define("_LONGLONG"); \
} while (0)
/* Need to override linux.h STARTFILE_SPEC, since it has crtbeginT.o in. */ /* Need to override linux.h STARTFILE_SPEC, since it has crtbeginT.o in. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
......
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