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
This commit is contained in:
Alan Modra 2013-05-06 12:27:43 +09:30 committed by Alan Modra
parent 8f1dbf8d00
commit 470d4d131d
5 changed files with 26 additions and 11 deletions

View File

@ -1,3 +1,12 @@
2013-05-06 Alan Modra <amodra@gmail.com>
* 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 <amodra@gmail.com>
* config/rs6000/sysv4.h (ENDIAN_SELECT): Define, extracted from

View File

@ -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

View File

@ -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")

View File

@ -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) \

View File

@ -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" }