From patchwork Mon Nov 12 11:31:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 996357 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-489717-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="SDZS4L3Q"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HF/i7mdX"; 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 42tpVr09zJz9s6w for ; Mon, 12 Nov 2018 22:31:31 +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:subject:message-id:mime-version:content-type; q=dns; s= default; b=sD9YbE2zp2gbU8YN7w7i4EV0XJJH6xbbca3A6A+3y4SWr5vSv+YZQ EJ1IHYMqLox7ov7Z+nbDl9/nvCcYOcGqB1vG1ZDSsHy2My0aWxt5fJUtPXRluhPX gqzPSoc57Vxx6y6eUM/T+4r5oGED+x69rq+HnrRaURa6TDA9lYevjs= 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:subject:message-id:mime-version:content-type; s= default; bh=wewGJZu9/lTjEaAtA3okMqhbN04=; b=SDZS4L3QBB/ghYctbCZh AqTpNaO8HSBSIs+2prhqSbVRv3IKp5sDM+gYygtZSTEpkd7iEXtHJyD8jcdLDcs5 Fdai3j9WISIArF73M9Lf0qmMB5nv6HpMH7vL2xzPQn7uLW161RyfowE/DALGHfo+ 9E+pWoxMbvhpdkNtDXXfoi8= 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-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 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== 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 22:01:13 +1030 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-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes 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