From 470d4d131d1435da0a65a6b07da4a22f028159f8 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 6 May 2013 12:27:43 +0930 Subject: [PATCH] linux.h (DEFAULT_ASM_ENDIAN): Define. * config/rs6000/linux.h (DEFAULT_ASM_ENDIAN): Define. (LINK_OS_LINUX_EMUL): Use ENDIAN_SELECT. * config/rs6000/linux64.h (DEFAULT_ASM_ENDIAN): Define. * config/rs6000/sysv4le.h (DEFAULT_ASM_ENDIAN): Define. (LINK_TARGET_SPEC): Use ENDIAN_SELECT. * config/rs6000/sysv4.h (DEFAULT_ASM_ENDIAN): Define as -mbig. From-SVN: r198620 --- gcc/ChangeLog | 9 +++++++++ gcc/config/rs6000/linux.h | 11 +++++++++-- gcc/config/rs6000/linux64.h | 3 +++ gcc/config/rs6000/sysv4.h | 4 ---- gcc/config/rs6000/sysv4le.h | 10 +++++----- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c790a177a9..1a448c7d208 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2013-05-06 Alan Modra + + * config/rs6000/linux.h (DEFAULT_ASM_ENDIAN): Define. + (LINK_OS_LINUX_EMUL): Use ENDIAN_SELECT. + * config/rs6000/linux64.h (DEFAULT_ASM_ENDIAN): Define. + * config/rs6000/sysv4le.h (DEFAULT_ASM_ENDIAN): Define. + (LINK_TARGET_SPEC): Use ENDIAN_SELECT. + * config/rs6000/sysv4.h (DEFAULT_ASM_ENDIAN): Define as -mbig. + 2013-05-06 Alan Modra * config/rs6000/sysv4.h (ENDIAN_SELECT): Define, extracted from diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h index 5329f01874b..f7f2d80c4f2 100644 --- a/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h @@ -79,10 +79,17 @@ #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" +#undef DEFAULT_ASM_ENDIAN #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) -#define LINK_OS_LINUX_EMUL "%{!mbig: %{!mbig-endian: -m elf32lppclinux}}%{mbig|mbig-endian: -m elf32ppclinux}" +#define DEFAULT_ASM_ENDIAN " -mlittle" +#define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \ + " -m elf32lppclinux", \ + " -m elf32lppclinux") #else -#define LINK_OS_LINUX_EMUL "%{!mlittle: %{!mlittle-endian: -m elf32ppclinux}}%{mlittle|mlittle-endian: -m elf32lppclinux}" +#define DEFAULT_ASM_ENDIAN " -mbig" +#define LINK_OS_LINUX_EMUL ENDIAN_SELECT(" -m elf32ppclinux", \ + " -m elf32lppclinux", \ + " -m elf32ppclinux") #endif #undef LINK_OS_LINUX_SPEC diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 4129eb8228b..3f280581feb 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -366,7 +366,9 @@ extern int dot_symbols; #define GNU_USER_DYNAMIC_LINKER64 \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) +#undef DEFAULT_ASM_ENDIAN #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +#define DEFAULT_ASM_ENDIAN " -mlittle" #define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ " -m elf32lppclinux", \ " -m elf32lppclinux") @@ -374,6 +376,7 @@ extern int dot_symbols; " -m elf64lppc", \ " -m elf64lppc") #else +#define DEFAULT_ASM_ENDIAN " -mbig" #define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ " -m elf32lppclinux", \ " -m elf32ppclinux") diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 8676a12e502..0cc8ffb8cb3 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -527,11 +527,7 @@ extern int fixuplabelno; "mcall-i960-old:" LITTLE_OPT ";" \ ":" DEFAULT_OPT "}" -#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) -#define DEFAULT_ASM_ENDIAN " -mlittle" -#else #define DEFAULT_ASM_ENDIAN " -mbig" -#endif #undef ASM_SPEC #define ASM_SPEC "%(asm_cpu) \ diff --git a/gcc/config/rs6000/sysv4le.h b/gcc/config/rs6000/sysv4le.h index 40ab10a3062..3901122a738 100644 --- a/gcc/config/rs6000/sysv4le.h +++ b/gcc/config/rs6000/sysv4le.h @@ -25,12 +25,12 @@ #undef CC1_ENDIAN_DEFAULT_SPEC #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_little)" +#undef DEFAULT_ASM_ENDIAN +#define DEFAULT_ASM_ENDIAN " -mlittle" + #undef LINK_TARGET_SPEC -#define LINK_TARGET_SPEC "\ -%{mbig: --oformat elf32-powerpc } %{mbig-endian: --oformat elf32-powerpc } \ -%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ - %{mcall-linux: --oformat elf32-powerpc} \ - }}}}" +#define LINK_TARGET_SPEC \ + ENDIAN_SELECT(" --oformat elf32-powerpc", "", "") #undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS { "mlittle", "mcall-sysv" }