From patchwork Mon Nov 12 11:35:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 996358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489719-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="gs8hDS8X"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VW3Mp0Wt"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42tpbH5k8Xz9s1x for ; Mon, 12 Nov 2018 22:35:22 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=H0FrGc/CerCdY8rHve+5KDHfY1c+9xXteN+B9u/IkfCEPXYbpR v/nMi/hlVWFvsZYwxINeNA38i4DSU8HhX7plPy/uL39UbA002msYuwoPlyzkOn9D 0v1WIA0b+VPoVvz3f85gUalToaq1sTsB8Lm8xn7eFLktqfaCvIIbK3CDo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=WVms2uodeZE/gD2a8WctyJ7JIBg=; b=gs8hDS8XItDvjZKuzWKh DtywYGT9m27g/mvJNimOqKbWlhRqDKpzLWE8DPrPkFIHwpNQNjkqtKBOVFmWLU/6 FR4gPzRJYEZiQJKb2Phu1pOVtVdDq8C6oKc6XoCobLmKq4zl/vVDxzIN8mSUHIeg aAe/lDRlgJY2RA5yReh0Q7g= Received: (qmail 99089 invoked by alias); 12 Nov 2018 11:35:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 99066 invoked by uid 89); 12 Nov 2018 11:35:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS, WEIRD_QUOTING autolearn=ham version=3.3.2 spammy=rtems X-HELO: mail-pg1-f178.google.com Received: from mail-pg1-f178.google.com (HELO mail-pg1-f178.google.com) (209.85.215.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Nov 2018 11:35:10 +0000 Received: by mail-pg1-f178.google.com with SMTP id 70so3955484pgh.8 for ; Mon, 12 Nov 2018 03:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=S8aZc9mhute3sxOVtvrCzCtT2EA+Od8M3dEt6v6zRFA=; b=VW3Mp0WtLS4QCh2t49D/oDa0PUW7NfYWKmJ2bFgIMhLIVVSbDtHb/SKyACvyjrXeHn kdXZJcHpEKYc9sxdI7XRL3zJglvwNlZvEydbQwU6uxwqHLCUBrtE/qrBjfKDL8Ixa+yy qrnx8JasTudQbQ96IkCQ6Y92QN6bPzCqQgJTdAxhX3thTqchseUj3KfiPkksojNFSRzW g5mY1NtPkiCWJzgZdIQNV1hq+Enh8dFgMs4rrqkRIMAUSX0g0iK7+uq+i7MH/M14gnyt 476LcHwQYdCOdpGMMqGH0RwWN5/HvF7fwtO81o6u+EO5WZCJ5oDKNUApuDfES/bPAxYj 7EYQ== Received: from bubble.grove.modra.org ([58.175.241.133]) by smtp.gmail.com with ESMTPSA id o70-v6sm45215190pfo.86.2018.11.12.03.35.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Nov 2018 03:35:06 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 42B9480388; Mon, 12 Nov 2018 22:05:03 +1030 (ACDT) Date: Mon, 12 Nov 2018 22:05:03 +1030 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: rs6000/sysv4.h using gnu-user.h Message-ID: <20181112113503.GE22752@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes 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. Requires https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00917.html and https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00919.html Bootstrapped etc. powerpc-linux and powerpc64le-linux. * 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. diff --git a/gcc/config.gcc b/gcc/config.gcc index 75ff2f5658e..6aea55207ca 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2567,7 +2567,7 @@ powerpc64-*-darwin*) extra_headers=altivec.h ;; 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" tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" case ${target} in @@ -2582,7 +2582,7 @@ powerpc*-*-freebsd*) esac ;; 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" tmake_file="${tmake_file} rs6000/t-netbsd" extra_options="${extra_options} rs6000/sysv4.opt" @@ -2594,30 +2594,30 @@ powerpc-*-eabispe*) use_gcc_stdint=wrap ;; 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" tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm" use_gcc_stdint=wrap ;; 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" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" use_gcc_stdint=wrap ;; 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" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" ;; 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" tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm" use_gcc_stdint=wrap ;; 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" tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" use_gcc_stdint=wrap @@ -2628,7 +2628,7 @@ powerpc-*-rtems*spe*) tmake_file="${tmake_file} powerpcspe/t-fprules powerpcspe/t-rtems powerpcspe/t-ppccomm" ;; 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" tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm" ;; @@ -2727,7 +2727,7 @@ powerpc-wrs-vxworks*spe) tm_file="${tm_file} vx-common.h vxworks.h powerpcspe/vxworks.h powerpcspe/e500.h" ;; 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" extra_options="${extra_options} rs6000/sysv4.opt" extra_headers=ppc-asm.h @@ -2747,7 +2747,7 @@ powerpc-wrs-vxworks*) ;; powerpc-*-lynxos*) 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" extra_options="${extra_options} rs6000/sysv4.opt lynx.opt" thread_file=lynx @@ -2755,18 +2755,18 @@ powerpc-*-lynxos*) gas=yes ;; 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" extra_options="${extra_options} rs6000/sysv4.opt" ;; 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" extra_options="${extra_options} rs6000/sysv4.opt" use_gcc_stdint=wrap ;; 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" extra_options="${extra_options} rs6000/sysv4.opt" use_gcc_stdint=wrap diff --git a/gcc/config/rs6000/freebsd.h b/gcc/config/rs6000/freebsd.h index 53ae40d75b7..5947eff2a1b 100644 --- a/gcc/config/rs6000/freebsd.h +++ b/gcc/config/rs6000/freebsd.h @@ -18,6 +18,10 @@ along with GCC; see the file COPYING3. If not see . */ +/* 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. */ #undef CPP_OS_DEFAULT_SPEC @@ -59,14 +63,6 @@ #undef WCHAR_TYPE_SIZE #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 -mrelocatable or -mrelocatable-lib is given. */ #undef RELOCATABLE_NEEDS_FIXUP diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h index fd3dea5ab89..985f730d764 100644 --- a/gcc/config/rs6000/freebsd64.h +++ b/gcc/config/rs6000/freebsd64.h @@ -306,15 +306,6 @@ extern int dot_symbols; #undef WCHAR_TYPE_SIZE #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 */ #undef RS6000_MCOUNT #define RS6000_MCOUNT "_mcount" diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index b1818b43cf4..a9aae81a906 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -478,6 +478,13 @@ extern int dot_symbols; -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \ %(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 #define TOC_SECTION_ASM_OP \ (TARGET_64BIT \ diff --git a/gcc/config/rs6000/lynx.h b/gcc/config/rs6000/lynx.h index 9e2bb723a92..526494fd834 100644 --- a/gcc/config/rs6000/lynx.h +++ b/gcc/config/rs6000/lynx.h @@ -71,16 +71,6 @@ } \ 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 writable section for linkonce.r and linkonce.t. */ diff --git a/gcc/config/rs6000/netbsd.h b/gcc/config/rs6000/netbsd.h index f4c1dd411bb..acc511d64a5 100644 --- a/gcc/config/rs6000/netbsd.h +++ b/gcc/config/rs6000/netbsd.h @@ -19,6 +19,10 @@ along with GCC; see the file COPYING3. If not see . */ +/* 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! */ #define TARGET_OS_CPP_BUILTINS() \ do \ diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h index 54ddcb4b552..0ac9bfb0ffc 100644 --- a/gcc/config/rs6000/rtems.h +++ b/gcc/config/rs6000/rtems.h @@ -288,3 +288,10 @@ { "asm_spec64", ASM_SPEC64 }, \ { "link_os_spec32", LINK_OS_SPEC32 }, \ { "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}" diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 73541af3e69..0d84f4f3f57 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -23,6 +23,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#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. */ #define TARGET_OBJECT_FORMAT OBJECT_ELF @@ -556,8 +561,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) %{mcall-openbsd: -mno-eabi }}} \ %{msdata: -msdata=default} \ %{mno-sdata: -msdata=none} \ -%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \ -%{profile: -p}" +%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}}" \ +GNU_USER_TARGET_CC1_SPEC /* Default starting address if specified. */ #define LINK_START_SPEC "\ @@ -739,82 +744,27 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) %{symbolic:-Bsymbolic}" /* GNU/Linux support. */ -#define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \ -%{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ -%{!shared: %{profile:-lc_p} %{!profile:-lc}}}" +#define LIB_LINUX_SPEC \ + "%{mnewlib: --start-group -llinux -lc --end-group; \ + :" GNU_USER_TARGET_LIB_SPEC "}" -#if ENABLE_OFFLOADING == 1 -#define CRTOFFLOADBEGIN "%{fopenacc|fopenmp:crtoffloadbegin%O%s}" -#define CRTOFFLOADEND "%{fopenacc|fopenmp:crtoffloadend%O%s}" -#else -#define CRTOFFLOADBEGIN "" -#define CRTOFFLOADEND "" -#endif +#define STARTFILE_LINUX_SPEC GNU_USER_TARGET_STARTFILE_SPEC -/* STARTFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_STARTFILE_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 ENDFILE_LINUX_SPEC GNU_USER_TARGET_ENDFILE_SPEC #define LINK_START_LINUX_SPEC "" #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" #undef MUSL_DYNAMIC_LINKER #define MUSL_DYNAMIC_LINKER \ "/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: \ %{rdynamic:-export-dynamic} \ -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}" /* NetBSD support. */