From patchwork Sat Jul 1 14:23:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 106819 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3562242qge; Sat, 1 Jul 2017 07:25:19 -0700 (PDT) X-Received: by 10.84.179.195 with SMTP id b61mr1011195plc.178.1498919118957; Sat, 01 Jul 2017 07:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498919118; cv=none; d=google.com; s=arc-20160816; b=QJjY7AjwcWumGcRWyRlNPHm3EDQl0Pac6IIBPBRcQdi0AJJkPvEdXP7hgtkBE6AfTr ugQ728zYmaPglqiXMtBYt80K+9e258XIjbf+zXUEWRjewhgoFK8PIJCzVAJkKVdktCFL 0fBSqAzQX8IWOiHs4Nn5OduhOzQjAeWhVazqIJg330q6wZSCERSSxMNwOQhfVZcHBZ5+ ZXB6K/IGqOJdR538pLkLLhdDQ3QFb6seytQNQkLcXlj/lR6a6TriBtiEu0tSVRtVCSv4 IHurzWU5l9bazVW7UHEEI35Pf4ezc37icqxYGXiJD4mGOO3A2V3w4Aaewo8WyE+irRBN RLvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=JwKbkKZw1b2PRpUeEP6BzX4v9J3N2XqJyRKYXBpWrLs=; b=pNlRW6eikMflftxFpTPXGidnxkKe1WhV3sj6GxJxCmM0+IQWKlTSWhYqZZKBGtKZrv K6XMtQSGTl6mCsD+MV9kJwJzoHCXRWy+5cDqZrpqgIs93dgdounjBb6rxGLd/Hpkl/mN dZkRd4JKkfFL5+w/WtpeoamGz4HaOZBLoOMzlhSs3EXcXjhsrnLrBgrY2+AfwVt0VUtL HwhMxPRG7vDz8snyDjCfdNLhP/62AWVWG/VDbBb/JeLGfNkHB3MMRQnUUFeS7vaCoHui EvePFygJRvLhnyVvogl2cE8Vrf3pOPgCPiku/qPpNavm08k0U5cosJrK+YUmc4WLGPrs YJKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=K5ajn0Y6; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id c16si8824951plk.615.2017.07.01.07.25.18; Sat, 01 Jul 2017 07:25:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=K5ajn0Y6; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AF38F782D7; Sat, 1 Jul 2017 14:24:51 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by mail.openembedded.org (Postfix) with ESMTP id 46AF3775DE for ; Sat, 1 Jul 2017 14:23:47 +0000 (UTC) Received: by mail-pf0-f181.google.com with SMTP id c73so80194572pfk.2 for ; Sat, 01 Jul 2017 07:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MyXxFFTqsgC4/nC0ZOJZkbcdQpfgko0LLk/6HidsIxo=; b=K5ajn0Y6nn+S1AHWlSasUmbQZKapwOdi9tN8A5k/YVd2zUpTmEBjMIaVORjpu91kqC SQdTWnGos35VqK4Uav++p+qBwt6hvzno+Pl8zMQExxfLeCQ4Y0ReB+3gOln3mCwYwxqH 177kD9zKIWLIcO94OMqEJ6NCUJEmZ8V96aE3ux5LfeRLj9bDade0txug/YQK8FG/SVif 3wHs0DN3v+f8LjwAIYDsx4PvRgaJmH/r8x6LdeybGMuwDd3s3xpoCWmNoN7tLN5KZHIj PN47cuvjPGm60uSWfZeofjPU3NDXTyHZcUqw1NCK4aE1X88D5e6Y90QdJ0FOX/7el6H9 Ypew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MyXxFFTqsgC4/nC0ZOJZkbcdQpfgko0LLk/6HidsIxo=; b=Ck9bM7ARG72zvWptVALVwtQZF2VrNURmZiP1h6cgrMsKSdXGzXJxZsJGAN7q/u2ncg ebbj0vJuFf68KsQoMV5X7weysUeQ3rL/hc3CJN8TlULgjI8wfDvFDWGlXbbS8bWryahY 2w43meesb7e2Ab4e1XAB+lRaEg4OubZE6PQiUrBCLkl/d1ku52AZ4wmh3VDKTsVFZDBv CWN4KOolurP5TqZAAK/kTdignl9HGoPBwI0yNgMBo4coVSzBrBbgayAkL6T/Nu4cBbdW 9oHybFcW2drVXyiSixTB/i4eCVvpnIJyu+Wmp0Lf3E6S39Dh7nXQ6oDKtSAFZ5ej1yfx 1sww== X-Gm-Message-State: AIVw110g/d9A6LTq6kQ6CBRPimvHu9oRRBkBtiscZxEWuy+J6yZfcx3B sVUt3sJyn6iAd5wA X-Received: by 10.84.132.40 with SMTP id 37mr996780ple.141.1498919029028; Sat, 01 Jul 2017 07:23:49 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::3df3]) by smtp.gmail.com with ESMTPSA id 17sm25026909pfn.84.2017.07.01.07.23.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2017 07:23:48 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 1 Jul 2017 07:23:10 -0700 Message-Id: X-Mailer: git-send-email 2.13.2 In-Reply-To: References: Subject: [OE-core] [PATCH 07/19] gcc7: Enable static PIE X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- meta/recipes-devtools/gcc/gcc-7.1.inc | 1 + .../gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch | 37 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch -- 2.13.2 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/gcc/gcc-7.1.inc b/meta/recipes-devtools/gcc/gcc-7.1.inc index 4098d6a2c1..b52d51fba6 100644 --- a/meta/recipes-devtools/gcc/gcc-7.1.inc +++ b/meta/recipes-devtools/gcc/gcc-7.1.inc @@ -72,6 +72,7 @@ SRC_URI = "\ file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ file://0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ file://0047-sync-gcc-stddef.h-with-musl.patch \ + file://0048-gcc-Enable-static-PIE.patch \ ${BACKPORTS} \ " BACKPORTS = "\ diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch b/meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch new file mode 100644 index 0000000000..879e360cf3 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-7.1/0048-gcc-Enable-static-PIE.patch @@ -0,0 +1,37 @@ +From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 13 Jun 2017 12:12:52 -0700 +Subject: [PATCH 49/49] gcc: Enable static PIE + +Static PIE support in GCC +see +https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/gnu-user.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h +index 2787a3d16be..ee7b781319e 100644 +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -51,10 +51,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #if defined HAVE_LD_PIE + #define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;: \ +- %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \ +- crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \ ++ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \ ++ crti.o%s %{shared:crtbeginS.o%s;: \ + %{" PIE_SPEC ":crtbeginS.o%s} \ +- %{" NO_PIE_SPEC ":crtbegin.o%s}} \ ++ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \ + %{fvtable-verify=none:%s; \ + fvtable-verify=preinit:vtv_start_preinit.o%s; \ + fvtable-verify=std:vtv_start.o%s} \ +-- +2.13.1 +