From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55636 invoked by alias); 12 Nov 2018 11:31:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 55627 invoked by uid 89); 12 Nov 2018 11:31:23 -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,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:9a09, Hx-languages-length:2322, HX-Received:sk:o9-v6mr X-HELO: mail-pf1-f174.google.com Received: from mail-pf1-f174.google.com (HELO mail-pf1-f174.google.com) (209.85.210.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Nov 2018 11:31:20 +0000 Received: by mail-pf1-f174.google.com with SMTP id u3-v6so1524631pfm.4 for ; Mon, 12 Nov 2018 03:31:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=6XIEDYnXt4IOW77Nv9HA/QvT0LRC6JS7GatjExYAqGM=; b=HF/i7mdXj8bCcaDd8ltKpL4yAtjg52RdRMpCXScSr4pw8LyCUM3VTNLkixxZjdQCgU WvKZMy/OX7pGSAFnZyHnQFMgNitFUgmT30AI5/3EoxPhuVPmTwj/UjWjgrmG85B2rNp1 VP3/Edn6CGVmYSM6kZNqpIGuh1RA9CFFlSHT4QKoH5rW6KAI6QkbC9kwEZg8tn49lZEN xKHvkoKEGVbFfl8IjckjEXZMOdw7/TU2BH5oirnoKSdLnoPyK6f4NmhOQerZADTohKGG zgMrTYoSUd2VvIo/M6L/HDh4LSTuwuWhGSesAXuScYdO+ogVOdz8GU9LxHJmDT4zj4Ut P0aA== Return-Path: Received: from bubble.grove.modra.org ([58.175.241.133]) by smtp.gmail.com with ESMTPSA id p12-v6sm2257017pff.5.2018.11.12.03.31.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Nov 2018 03:31:17 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id DD0FF80388; Mon, 12 Nov 2018 22:01:13 +1030 (ACDT) Date: Mon, 12 Nov 2018 11:31:00 -0000 From: Alan Modra To: gcc-patches@gcc.gnu.org Subject: Allow target to override gnu-user.h crti and crtn Message-ID: <20181112113113.GD22752@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00919.txt.bz2 Also give target access to the gnu-user.h LINK_GCC_C_SEQUENCE_SPEC. In preparation for using gnu-user.h in rs6000/. Bootstrapped etc. powerpc64le-linux. OK? * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define. (GNU_USER_TARGET_STARTFILE_SPEC): Use it here. (GNU_USER_TARGET_CRTN): Define. (GNU_USER_TARGET_ENDFILE_SPEC): Use it here. (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define. diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h index 75f6a6f0a7d..09170d416b8 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h @@ -40,6 +40,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define CRTOFFLOADEND "" #endif +#define GNU_USER_TARGET_CRTI "crti.o%s" +#define GNU_USER_TARGET_CRTN "crtn.o%s" + /* Provide a STARTFILE_SPEC appropriate for GNU userspace. Here we add the GNU userspace magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static @@ -51,8 +54,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see static:crt1.o%s; \ static-pie:rcrt1.o%s; \ " PIE_SPEC ":Scrt1.o%s; \ - :crt1.o%s} \ - crti.o%s \ + :crt1.o%s} " \ + GNU_USER_TARGET_CRTI " \ %{static:crtbeginT.o%s; \ shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ :crtbegin.o%s} \ @@ -75,8 +78,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see fvtable-verify=std:vtv_end.o%s} \ %{static:crtend.o%s; \ shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ - :crtend.o%s} \ - crtn.o%s " \ + :crtend.o%s} " \ + GNU_USER_TARGET_CRTN " " \ CRTOFFLOADEND #undef ENDFILE_SPEC #define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC @@ -106,11 +109,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " #endif -#undef LINK_GCC_C_SEQUENCE_SPEC -#define LINK_GCC_C_SEQUENCE_SPEC \ +#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \ "%{static|static-pie:--start-group} %G %{!nolibc:%L} \ %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}" +#undef LINK_GCC_C_SEQUENCE_SPEC +#define LINK_GCC_C_SEQUENCE_SPEC GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC + /* Use --as-needed -lgcc_s for eh support. */ #ifdef HAVE_LD_AS_NEEDED #define USE_LD_AS_NEEDED 1 -- Alan Modra Australia Development Lab, IBM