Commit 62045234 by Alan Modra Committed by Alan Modra

[RS6000] rs6000/sysv4.h using gnu-user.h

This patch removes some duplication in rs6000/sysv4.h of macros found
in gnu-user.h that we want for linux.  Including gnu-user.h will mean
powerpc doesn't miss updates to that file.

	* config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
	(powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
	(powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
	(powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
	(powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
	* config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
	(LINK_GCC_C_SEQUENCE_SPEC): Undef.
	(ASM_APP_ON, ASM_APP_OFF): Don't define.
	* config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
	* config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
	* config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
	* config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
	(LINK_GCC_C_SEQUENCE_SPEC): Undef.
	* config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
	* config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
	(GNU_USER_TARGET_CRTN): Redefine.
	(CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
	(LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
	(CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
	(STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
	(ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
	(UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
	(LINK_EH_SPEC): Don't define.

From-SVN: r266496
parent 0abbc8f1
2018-11-27 Alan Modra <amodra@gmail.com>
* config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
(powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
(powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
(powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
(powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
* config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
(LINK_GCC_C_SEQUENCE_SPEC): Undef.
(ASM_APP_ON, ASM_APP_OFF): Don't define.
* config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
* config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
* config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
* config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
(LINK_GCC_C_SEQUENCE_SPEC): Undef.
* config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
* config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
(GNU_USER_TARGET_CRTN): Redefine.
(CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
(LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
(CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
(STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
(ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
(UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
(LINK_EH_SPEC): Don't define.
2018-11-26 Martin Sebor <msebor@redhat.com> 2018-11-26 Martin Sebor <msebor@redhat.com>
PR 87756 PR 87756
...@@ -2567,7 +2567,7 @@ powerpc64-*-darwin*) ...@@ -2567,7 +2567,7 @@ powerpc64-*-darwin*)
extra_headers=altivec.h extra_headers=altivec.h
;; ;;
powerpc*-*-freebsd*) powerpc*-*-freebsd*)
tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
case ${target} in case ${target} in
...@@ -2582,7 +2582,7 @@ powerpc*-*-freebsd*) ...@@ -2582,7 +2582,7 @@ powerpc*-*-freebsd*)
esac esac
;; ;;
powerpc-*-netbsd*) powerpc-*-netbsd*)
tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt" extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
tmake_file="${tmake_file} rs6000/t-netbsd" tmake_file="${tmake_file} rs6000/t-netbsd"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
...@@ -2594,30 +2594,30 @@ powerpc-*-eabispe*) ...@@ -2594,30 +2594,30 @@ powerpc-*-eabispe*)
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
powerpc-*-eabisimaltivec*) powerpc-*-eabisimaltivec*)
tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
powerpc-*-eabisim*) powerpc-*-eabisim*)
tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
powerpc-*-elf*) powerpc-*-elf*)
tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
;; ;;
powerpc-*-eabialtivec*) powerpc-*-eabialtivec*)
tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
powerpc-*-eabi*) powerpc-*-eabi*)
tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
use_gcc_stdint=wrap use_gcc_stdint=wrap
...@@ -2628,7 +2628,7 @@ powerpc-*-rtems*spe*) ...@@ -2628,7 +2628,7 @@ powerpc-*-rtems*spe*)
tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-rtems powerpcspe/t-ppccomm" tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-rtems powerpcspe/t-ppccomm"
;; ;;
powerpc-*-rtems*) powerpc-*-rtems*)
tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h" tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt" extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm" tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
;; ;;
...@@ -2727,7 +2727,7 @@ powerpc-wrs-vxworks*spe) ...@@ -2727,7 +2727,7 @@ powerpc-wrs-vxworks*spe)
tm_file="${tm_file} vx-common.h vxworks.h powerpcspe/vxworks.h powerpcspe/e500.h" tm_file="${tm_file} vx-common.h vxworks.h powerpcspe/vxworks.h powerpcspe/e500.h"
;; ;;
powerpc-wrs-vxworks*) powerpc-wrs-vxworks*)
tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h" tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks" tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
extra_headers=ppc-asm.h extra_headers=ppc-asm.h
...@@ -2747,7 +2747,7 @@ powerpc-wrs-vxworks*) ...@@ -2747,7 +2747,7 @@ powerpc-wrs-vxworks*)
;; ;;
powerpc-*-lynxos*) powerpc-*-lynxos*)
xm_defines=POSIX xm_defines=POSIX
tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
tmake_file="t-lynx rs6000/t-lynx" tmake_file="t-lynx rs6000/t-lynx"
extra_options="${extra_options} rs6000/sysv4.opt lynx.opt" extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
thread_file=lynx thread_file=lynx
...@@ -2755,18 +2755,18 @@ powerpc-*-lynxos*) ...@@ -2755,18 +2755,18 @@ powerpc-*-lynxos*)
gas=yes gas=yes
;; ;;
powerpcle-*-elf*) powerpcle-*-elf*)
tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
;; ;;
powerpcle-*-eabisim*) powerpcle-*-eabisim*)
tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
use_gcc_stdint=wrap use_gcc_stdint=wrap
;; ;;
powerpcle-*-eabi*) powerpcle-*-eabi*)
tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
use_gcc_stdint=wrap use_gcc_stdint=wrap
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
along with GCC; see the file COPYING3. If not see along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* Undef gnu-user.h macros we don't want. */
#undef CPLUSPLUS_CPP_SPEC
#undef LINK_GCC_C_SEQUENCE_SPEC
/* Override the defaults, which exist to force the proper definition. */ /* Override the defaults, which exist to force the proper definition. */
#undef CPP_OS_DEFAULT_SPEC #undef CPP_OS_DEFAULT_SPEC
...@@ -59,14 +63,6 @@ ...@@ -59,14 +63,6 @@
#undef WCHAR_TYPE_SIZE #undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32 #define WCHAR_TYPE_SIZE 32
/* Override rs6000.h definition. */
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
/* Override rs6000.h definition. */
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
/* We don't need to generate entries in .fixup, except when /* We don't need to generate entries in .fixup, except when
-mrelocatable or -mrelocatable-lib is given. */ -mrelocatable or -mrelocatable-lib is given. */
#undef RELOCATABLE_NEEDS_FIXUP #undef RELOCATABLE_NEEDS_FIXUP
......
...@@ -306,15 +306,6 @@ extern int dot_symbols; ...@@ -306,15 +306,6 @@ extern int dot_symbols;
#undef WCHAR_TYPE_SIZE #undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32 #define WCHAR_TYPE_SIZE 32
/* Override rs6000.h definition. */
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
/* Override rs6000.h definition. */
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
/* Function profiling bits */ /* Function profiling bits */
#undef RS6000_MCOUNT #undef RS6000_MCOUNT
#define RS6000_MCOUNT "_mcount" #define RS6000_MCOUNT "_mcount"
......
...@@ -478,6 +478,13 @@ extern int dot_symbols; ...@@ -478,6 +478,13 @@ extern int dot_symbols;
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \ -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
%(link_os_extra_spec64)" %(link_os_extra_spec64)"
/* Use gnu-user.h LINK_GCC_SEQUENCE_SPEC for linux. */
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{mads|myellowknife|mmvme|msim:%G %L %G;" \
"!mcall-*|mcall-linux:" GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC ";" \
":%G %L %G}"
#undef TOC_SECTION_ASM_OP #undef TOC_SECTION_ASM_OP
#define TOC_SECTION_ASM_OP \ #define TOC_SECTION_ASM_OP \
(TARGET_64BIT \ (TARGET_64BIT \
......
...@@ -71,16 +71,6 @@ ...@@ -71,16 +71,6 @@
} \ } \
while (0) while (0)
/* Override the rs6000.h definition. */
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
/* Override the rs6000.h definition. */
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
/* LynxOS does not do anything with .fixup plus let's not create /* LynxOS does not do anything with .fixup plus let's not create
writable section for linkonce.r and linkonce.t. */ writable section for linkonce.r and linkonce.t. */
......
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
along with GCC; see the file COPYING3. If not see along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* Undef gnu-user.h macros we don't want. */
#undef CPLUSPLUS_CPP_SPEC
#undef LINK_GCC_C_SEQUENCE_SPEC
#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */ #undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
......
...@@ -288,3 +288,10 @@ ...@@ -288,3 +288,10 @@
{ "asm_spec64", ASM_SPEC64 }, \ { "asm_spec64", ASM_SPEC64 }, \
{ "link_os_spec32", LINK_OS_SPEC32 }, \ { "link_os_spec32", LINK_OS_SPEC32 }, \
{ "link_os_spec64", LINK_OS_SPEC64 }, { "link_os_spec64", LINK_OS_SPEC64 },
/* Use gnu-user.h LINK_GCC_SEQUENCE_SPEC for rtems. */
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{mads|myellowknife|mmvme|msim:%G %L %G;" \
"!mcall-*|mcall-linux:" GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC ";" \
":%G %L %G}"
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#undef GNU_USER_TARGET_CRTI
#define GNU_USER_TARGET_CRTI "%{mnewlib:ecrti.o%s;:crti.o%s}"
#undef GNU_USER_TARGET_CRTN
#define GNU_USER_TARGET_CRTN "%{mnewlib:ecrtn.o%s;:crtn.o%s}"
/* Yes! We are ELF. */ /* Yes! We are ELF. */
#define TARGET_OBJECT_FORMAT OBJECT_ELF #define TARGET_OBJECT_FORMAT OBJECT_ELF
...@@ -556,8 +561,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) ...@@ -556,8 +561,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
%{mcall-openbsd: -mno-eabi }}} \ %{mcall-openbsd: -mno-eabi }}} \
%{msdata: -msdata=default} \ %{msdata: -msdata=default} \
%{mno-sdata: -msdata=none} \ %{mno-sdata: -msdata=none} \
%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \ %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}}" \
%{profile: -p}" GNU_USER_TARGET_CC1_SPEC
/* Default starting address if specified. */ /* Default starting address if specified. */
#define LINK_START_SPEC "\ #define LINK_START_SPEC "\
...@@ -739,82 +744,27 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) ...@@ -739,82 +744,27 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
%{symbolic:-Bsymbolic}" %{symbolic:-Bsymbolic}"
/* GNU/Linux support. */ /* GNU/Linux support. */
#define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \ #define LIB_LINUX_SPEC \
%{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ "%{mnewlib: --start-group -llinux -lc --end-group; \
%{!shared: %{profile:-lc_p} %{!profile:-lc}}}" :" GNU_USER_TARGET_LIB_SPEC "}"
#if ENABLE_OFFLOADING == 1 #define STARTFILE_LINUX_SPEC GNU_USER_TARGET_STARTFILE_SPEC
#define CRTOFFLOADBEGIN "%{fopenacc|fopenmp:crtoffloadbegin%O%s}"
#define CRTOFFLOADEND "%{fopenacc|fopenmp:crtoffloadend%O%s}"
#else
#define CRTOFFLOADBEGIN ""
#define CRTOFFLOADEND ""
#endif
/* STARTFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_STARTFILE_SPEC #define ENDFILE_LINUX_SPEC GNU_USER_TARGET_ENDFILE_SPEC
but with the mnewlib ecrti.o%s selection substituted for crti.o%s. */
#define STARTFILE_LINUX_SPEC \
"%{shared:; \
pg|p|profile:gcrt1.o%s; \
static:crt1.o%s; \
static-pie|" PIE_SPEC ":Scrt1.o%s; \
:crt1.o%s} \
%{mnewlib:ecrti.o%s;:crti.o%s} \
%{static:crtbeginT.o%s; \
shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \
:crtbegin.o%s} \
%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_start_preinit.o%s; \
fvtable-verify=std:vtv_start.o%s} \
" CRTOFFLOADBEGIN
/* ENDFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_ENDFILE_SPEC
but with the mnewlib ecrtn.o%s selection substituted for crtn.o%s. */
#define ENDFILE_LINUX_SPEC \
"%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \
fvtable-verify=std:vtv_end.o%s} \
%{static:crtend.o%s; \
shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
:crtend.o%s} \
%{mnewlib:ecrtn.o%s;:crtn.o%s} \
" CRTOFFLOADEND
#define LINK_START_LINUX_SPEC "" #define LINK_START_LINUX_SPEC ""
#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","")
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#undef MUSL_DYNAMIC_LINKER #undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER \ #define MUSL_DYNAMIC_LINKER \
"/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
#ifndef GNU_USER_DYNAMIC_LINKER
#if DEFAULT_LIBC == LIBC_UCLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
"%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
#elif DEFAULT_LIBC == LIBC_MUSL
#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
"%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U, M) \
"%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
#else
#error "Unsupported DEFAULT_LIBC"
#endif
#define GNU_USER_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
MUSL_DYNAMIC_LINKER)
#endif
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
#endif
#define CPP_OS_LINUX_SPEC "%{pthread:-D_REENTRANT}" #define CPP_OS_LINUX_SPEC "%{pthread:-D_REENTRANT}"
/* NetBSD support. */ /* NetBSD support. */
......
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