From patchwork Sat Sep 23 00:58:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 114112 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp135772qgf; Fri, 22 Sep 2017 17:58:38 -0700 (PDT) X-Received: by 10.99.165.25 with SMTP id n25mr717523pgf.51.1506128318272; Fri, 22 Sep 2017 17:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506128318; cv=none; d=google.com; s=arc-20160816; b=M9efhM7UZ5mTvgdEum3ZOTB91SWTmrwCwH2LrFERrq4GMTgpmLCCDUiYvjDArGhqu9 r9dKc+7atAMnAzJKuvdwrMUTdeThDllG1WP4i7iVM2SgAAdVLM2fPU1n+FPISdYQfpa5 wEqqkCRoMTX6xbA5AOqa1BmZcUMC2I4R01hWzwNSYVndxQgdw4tiC9pZ4DCiwoPloM4F brdBgnxsaGaAQk7bgPT66pzZvst0T+I4FxiKgfUlG8tA9HV28wrtO4sMLOfC7HculZrT +1YFJsfcfj5I4ytWAcE43kYiKDj9l42Gkp3kKHNAjAmj+GsGLSnHUKt0CxPKisT9RnVG OrkA== 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:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=iyS50ukD7zrhWvcez+S4W0cCu15GFJcOT50qdb02WGE=; b=TxieHST49ed7AaBRpriiHMb44RlkNRUoNjelJaJu731fCxUwUbJu7ndXf+Xm8d6qbC o+1y/8S5of/HCdqcsz6MY1Op8ffO+XYkB9QE1kVS1yfxXEVRGaA6kRC5qZ2F1JyAH0Hy 8qz3x79sxxvUhkrvHP4ZjwQD3u1wE56TQIVzYxEuRMI304ZLf4hX0I4VKjmd/RkjKEOU lJAdUnBq2dsfr2HXsa6Hrnx3vIwcVY0iruey8QDY+SugxRmwN1EbVrcAHeIExwaYPjmE Fn4mfi/7LB7GyoUY4Q2BjXkZjSW36yPXsRUY2ZCgj45583taxD1Jj1YcCWJsTvwQc5D7 Rc2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=rX8EzfF2; 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 c4si581813pgn.433.2017.09.22.17.58.37; Fri, 22 Sep 2017 17:58:38 -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.s=20161025 header.b=rX8EzfF2; 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 C4B1478474; Sat, 23 Sep 2017 00:58:32 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by mail.openembedded.org (Postfix) with ESMTP id 1A6E278422 for ; Sat, 23 Sep 2017 00:58:31 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id g65so1114224pfe.1 for ; Fri, 22 Sep 2017 17:58:33 -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; bh=Lp2EIylXXpoRxhLMtBb9Ibjb7zsp4fuESVzRwixtzQ4=; b=rX8EzfF2owK1i7ZcTZn5WFufKWttnZrFRHAnwHaUG3PDrBFXQlDSfa02aWNu3R08D4 h7NBuzJeXQPa1pLHfOE8n1ucU5qSbxPuR/RqIbMns+esPdciiaeEYnQLjmujDen1dVRe 2O1t1nGz0U13qKCnP7cHSoNlxQ8y1TXkoy54ZP8e2ayY0e3SDaErOxB+nlyNo5PhRMzg dcFn+jDXyEMv3GyyYEUTlgfTyoBCKf/iOjVxjt1t2wBGrYbO6qoNW5C3v2FLq0YA7UZ/ bclcYOG2HoLb3sKByNXQWeXuqMToqCjsL3dv3sL3f1LRzeTrm1esEMuNedTQKu8iBKnv 9aUw== 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; bh=Lp2EIylXXpoRxhLMtBb9Ibjb7zsp4fuESVzRwixtzQ4=; b=TAfVEXQbB7UFcDauxqRTZK2p4pL0niQyAK+TN1zxWHlvHVtpgtGv2nX0wLiSXNKKZk DkbmQuANcyaHPWRyS88vcpWypWiMyq9gTsDCqjPj/oIjNWAtvqVwKCzkwHSeu118eme/ ZbxMnEJjH1qewMVJaQfN4bOqxtR3C1WvaxUAySbPfG5VhcLhYdYo20mcivLpXX2nRGje 4rlVenLvVbSmGz3Z5ct49ZAc/Z6EwY+qzdUR7cNTN6nfsc6NXX1nKVqlJuIMWDf4vC9c qYDuyu0g7e9oujQeVHkVKSNCzwHlBeNKfXqg/gRSCr14u9v3ZOu43RkB7pDwnkrSOWyv 7HZQ== X-Gm-Message-State: AHPjjUiQEsghK781Ldyr6SGDARgiTRyHYdK84X6T/ZGFBpq/j+0qSzdY necgLtiVaw/a3hcE3LYIs2vCkg== X-Google-Smtp-Source: AOwi7QDC0ZNLmQ4CFB6DqFKspPxICbUquI0rSBtoaS2akHLMQ43oSO/C5sw9SOYeEaEuB0w7hsmOpQ== X-Received: by 10.84.234.140 with SMTP id n12mr724193plk.209.1506128313128; Fri, 22 Sep 2017 17:58:33 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::e57f]) by smtp.gmail.com with ESMTPSA id b66sm1151521pfe.165.2017.09.22.17.58.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 17:58:32 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Fri, 22 Sep 2017 17:58:20 -0700 Message-Id: <20170923005823.10278-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [OE-core] [PATCH 1/4] goarch.bbclass: fixups for Go mips32 support 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 From: Matt Madison * Fix the regular expression in the mips test * Flag as incompatible any mips32 tunes for n32 ABI or soft-float, as go does not support them. * Replace mips32r2 tune with mips32r1. Go only supports mips32r1, which is a strict subset of r2. Adjusting this tune is not ideal, but is hopefully a temporary measure until more complete mips32 ISA coverage arrives upstream. [YOCTO #12108] Signed-off-by: Matt Madison Signed-off-by: Khem Raj --- meta/classes/goarch.bbclass | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.14.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass index 8b95c5fe94..9ed562d5ab 100644 --- a/meta/classes/goarch.bbclass +++ b/meta/classes/goarch.bbclass @@ -43,10 +43,14 @@ def go_map_arch(a, d): return 'mips64le' elif re.match('mips64*', a): return 'mips64' - elif re.match('mipsel*', a): - return 'mipsle' - elif re.match('mips*', a): - return 'mips' + elif re.match('mips.*', a): + tf = d.getVar('TUNE_FEATURES').split() + if 'fpu-hard' in tf and 'n32' not in tf: + if 'mips32r2' in tf: + newtf = [t for t in tf if t != 'mips32r2'] + newtf.append('mips32') + d.setVar('TUNE_FEATURES', ' '.join(newtf)) + return 'mips' if 'bigendian' in tf else 'mipsle' elif re.match('p(pc|owerpc)(64)', a): return 'ppc64' elif re.match('p(pc|owerpc)(64el)', a): From patchwork Sat Sep 23 00:58:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 114113 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp135959qgf; Fri, 22 Sep 2017 17:58:55 -0700 (PDT) X-Received: by 10.99.126.84 with SMTP id o20mr745037pgn.133.1506128335784; Fri, 22 Sep 2017 17:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506128335; cv=none; d=google.com; s=arc-20160816; b=dct8om3XzvQIe+xJB3CbwKop8b0N0V8bo5345ScUqX6foqn9+ckkuoiNXweJ+6yUQH rDCo9ML+FpAXbV7g3yaYfBRbyzcdLP4nTm334i859xyPCnnEYtGxlNb+ukoPVf+GKefx RknkE1AA0bPvakEJKQtqnRXXyatVo6d/DKxJ3pF3sjzGCwHAmZH2x3taJaYM52r4vQpD lXoQKsogIC1vw94JsdhxPjqrRx1LY/+x1pBkMetE/LtEfzJBlpPz1XDs+gVMIv1vsiC0 DLbRHPC4JffEdybmQj7PEmGgCKFfFTJB4IvshUfjwtugC6BmQLqvmUn5iliQ27fUVJNP VwQw== 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=RDh5icPnQXq2HfI7nJl5a9bhFFg4Z8T/DtmGJzCU1+Y=; b=lphK7VGaN5ppBde8gwmVR5HkbkVUvVcx+GsJnq88ss6OrHgBkOA8Bqiak9r8eNBqM1 8inBHiY0jAF+7TjEsRNfrrGOcVKqVKF9Q7AbERQpDsPHIE4QBRYh19nh9g4NvJnVkJ3b nHcQekYjUC1Z7pB8LLGxGpNX1CuByoKg26z39aWm0v67BxdDh4inXuHp4JBP2dVROsR0 u1NxV86xiC0BQiFzmEGgdGgIU1O+5HlDRCkbZGHiCazUtiK0YOIED+WycPdLpOzYqwTv 104uVc85f/0FyieAjXFMZuFRwPKH4gLjNtBowWQzF2oaMdBA1L9jpTMmoqha6KMR1AMb pTHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=GU9XFXMU; 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 d188si569750pfc.344.2017.09.22.17.58.55; Fri, 22 Sep 2017 17:58:55 -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.s=20161025 header.b=GU9XFXMU; 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 354FD78478; Sat, 23 Sep 2017 00:58:53 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by mail.openembedded.org (Postfix) with ESMTP id BE6D17846B for ; Sat, 23 Sep 2017 00:58:32 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id e69so1102704pfg.4 for ; Fri, 22 Sep 2017 17:58:34 -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=rI2HpEfHkCBMmYb8JEBxylEUAjhMkRGivHm1ibWEnck=; b=GU9XFXMU/Pzz7Bpv8nKgSc/0oXXEeKjsNjQtGUpQq5FxbfMQAYGTBiziTKWrxEXtUf zk9IyTqKvc1TTOvad931IAu+7tb0qPo/DUPERIWa3ExQS2noM/mAeIAdUHySIp1GKr8n bvDtNKswDPIxBd1BStpnU/jjhkxX6VprEVH5I+EEnRpG1OoV1TxJMW3QTmMOTplDdLDL +63DVXKfH+YjUCiPtrhR1LDFoYCGgf81MGjEBPkocJSkwFaN781BWW4litcFYJ5wVECV BlxbExiAhEa6X5mcCJbP135EhjNL7WJiYciwRwXG90aIISs96U0xeUwO4vZw3/MoVgKm qWwQ== 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=rI2HpEfHkCBMmYb8JEBxylEUAjhMkRGivHm1ibWEnck=; b=TjLbrJrj2ORf6sH3JKtLQpYaRuNFrhG52McBjJtq5J3u3IgTUHUf8FZkQ0UXyjBpNh tISO9BX4wHThwiS67IM33As2MntTJcdGiwZ9txgRIyR4W0v7jqcZr+fduoxgYE8KLPOy cDXMxKIu0CF9tx/9XDoIcc0hFgsWBLaX/jqaqrFsyRZOQEgdO7W6qh44PXNaB5pHd2cv Vgap0cW8hE3IsYd+Kukc2gA56EdTdoEAhX+uKApVGo6OXrNCVILMdm9UBhUluE791C4A 2mMvMa2zIWiJWD9I+9UERsbQ/4vHLzB8cX/xIcKoSULZi+/5r3U4g9BW8GzQ3u/+t1Dy Gp5g== X-Gm-Message-State: AHPjjUj56S5MRzYh0kIfpJFAR9Z4+w8To3/K3Vl0hHpvWswtenHtMBSw 3qlUfX819Eu9D25BBX1Fo554Dw== X-Google-Smtp-Source: AOwi7QD306ss2LZ094ecGgu1XXMO6eqEw8eCZa8XWsJ7/5L21MhnqsocIqvonHQHFLBqA4J+M/vv3Q== X-Received: by 10.84.179.36 with SMTP id a33mr684690plc.99.1506128314181; Fri, 22 Sep 2017 17:58:34 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::e57f]) by smtp.gmail.com with ESMTPSA id b66sm1151521pfe.165.2017.09.22.17.58.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 17:58:33 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Fri, 22 Sep 2017 17:58:21 -0700 Message-Id: <20170923005823.10278-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170923005823.10278-1-raj.khem@gmail.com> References: <20170923005823.10278-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 2/4] go: disable PIE flags for cgo 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 From: Matt Madison If the security_flags.inc file is included, gcc will do PIE builds by default. These flags need to be disabled for go packages that use cgo. Signed-off-by: Matt Madison Signed-off-by: Khem Raj --- meta/classes/go.bbclass | 3 +++ meta/recipes-devtools/go/go-target.inc | 3 +++ 2 files changed, 6 insertions(+) -- 2.14.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index e167c949ec..09b01a84c3 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -50,6 +50,9 @@ GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE} GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" export GOTOOLDIR +SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}" +SECURITY_LDFLAGS = "" + export CGO_ENABLED ?= "1" export CGO_CFLAGS ?= "${CFLAGS}" export CGO_CPPFLAGS ?= "${CPPFLAGS}" diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc index b88d0166e5..6065c3c80d 100644 --- a/meta/recipes-devtools/go/go-target.inc +++ b/meta/recipes-devtools/go/go-target.inc @@ -18,6 +18,9 @@ GO_LDFLAGS = "" GO_LDFLAGS_class-nativesdk = "-linkmode external" export GO_LDFLAGS +SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}" +SECURITY_LDFLAGS = "" + do_configure[noexec] = "1" do_compile() { From patchwork Sat Sep 23 00:58:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 114114 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp136022qgf; Fri, 22 Sep 2017 17:59:00 -0700 (PDT) X-Received: by 10.99.60.77 with SMTP id i13mr775368pgn.114.1506128340701; Fri, 22 Sep 2017 17:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506128340; cv=none; d=google.com; s=arc-20160816; b=BgLVsstQSB7Qze6W1mwSVnjBChrOvWY6YIwRldMeu6cwssfFoY6s4KVBzCfdQQwWFW +B4ElHFSfpxq9CfscUaTPtkD0v/MBJfUC1dSN8dkdxkDOA8bO/w1/7waGiPzid0AC8To 2uFSoTIQRHPxZaFJBSAY9bGpyNzvTpYBtWJxRhPu5yr0aFSCR1F17nOmdBh/oi/iG4HP rl30ARc+7wiPzATu0hf/BGgMEFI48d6FTpo7t6DjvKvHIpPmIWYnsUPzDWcc62G3Wcx4 csckQRrs3SeEL0aEplyjXRVgcpRWVwfSW4hxKOzcu2/rs1W30YAPY1ms7tw3cEKnBnC4 WppA== 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=t14RtNQCNx13P+K+omgYi+FmIlJJ8va6mWz98Tuw8uM=; b=VsCY6MkwWfiiOnaDaEUDYyiMFG/B/Z73IlnY3mJla+a5oIJTNkTp8P0+p7nfyAOXEd om85pkzk/noyXQABxj2NSXNIRnhzknHDVhjFsOoUzIJNdjR1iZ2bCon+5MDqzKdeJHPQ Pq8C3Kw6tqD+yZWhuuiVLbnp/25AtH7ZtDF/WBDAG7j3d/LCw2+akY3ogfrKZdA8h1Wb sWShW3buP3Gy5CewSHWNs6IK3LIYTZri4WO4IszN/SrAY1pBQlmko6VVQiwd5G/2jQhY Z49EFyWUJpPs2Ttv4Qc0Lo2uFpWqtaWkkh1K1XmieSa5VxcQEmKZJL6c/1itq+s2IOE2 /pig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=NxByUl4p; 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 i8si561464pll.306.2017.09.22.17.59.00; Fri, 22 Sep 2017 17:59:00 -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.s=20161025 header.b=NxByUl4p; 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 2D0D478480; Sat, 23 Sep 2017 00:58:54 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by mail.openembedded.org (Postfix) with ESMTP id 4306A7846B for ; Sat, 23 Sep 2017 00:58:33 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id d8so1511705pgt.3 for ; Fri, 22 Sep 2017 17:58:35 -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=CbPfs4LPX3JHlWXMQeWaPZSZGSnB+QMSocXoEp/wzk4=; b=NxByUl4phAYXpnXs0ZjaYwSOKyqUkumit1dK9TQFimYTfHcxnGoqWVR2ARDZxVIIVy yv+/22rplFj/KFnbRVCk7mfJGRn11Et//magzIG3WA/fsPG7JjZNelaiQGWv5h29b9o6 QByupWT3vmZcEbVp/VlSThel3yxCHHmgkxPI4OU4nuH3/6WmbakeHZ+iy+9w1uM8rm/v hlf+zj4hjPgYnvH62qhBZrOgFQEd/zZhivgaGHziDCODoVfvux6SW8Q2Envoe7gekpGc 3Mh4TVFPcww6hVA3SW2HEHGKC7KYe/0Z2QXzimyqIKp4NjLVFQfRiXf97hevWIWVk5kd rvdg== 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=CbPfs4LPX3JHlWXMQeWaPZSZGSnB+QMSocXoEp/wzk4=; b=slZ40A2kiK4D/t0bB4dYdoo4aJrTlt/gzdzU0hPNnHtTJNy1G5isDqFC6JPOLIdKST L3RGSrrmWAYWt/bApgTn2LC6J/IRhTiCl5Ob1f1Ymff2oSxZuo0IPEN0SbaYXbGL6KTB y/cxRUu/E/W5PoCISMzc4BYryoz2u13GQR8UPTIOjlcb/nzG5y+/Cp7pOY5+jg0W+94Q Z0CCjVF48jDCuOfLuYLmyUm4FbFMZ4mJSH/mnkVtlvPxFXtugfwXPE/mFgqJvh0ayupf cVnK5BJBCyRb0RTa2q/xjBnO5QyD6S5+6IADXfYagWtSXNJMQDnFU9Y+Pr/2cc17N98A jmog== X-Gm-Message-State: AHPjjUhAy5JTuAcMCAbHBdMiKesA/PO5anIumxH2cTczgzW1fiGaQyzL M3ouDLbyAVJSOxvB6Fs0a1DiIA== X-Google-Smtp-Source: AOwi7QAcYmFqOSDiS1RBPWv2vW3E9VNOQI3HPe2OFFO+KmmhyXieF/Cz6ZNLkOcIvT9nPWczMDY/Ig== X-Received: by 10.99.106.67 with SMTP id f64mr772603pgc.101.1506128315377; Fri, 22 Sep 2017 17:58:35 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::e57f]) by smtp.gmail.com with ESMTPSA id b66sm1151521pfe.165.2017.09.22.17.58.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 17:58:34 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Fri, 22 Sep 2017 17:58:22 -0700 Message-Id: <20170923005823.10278-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170923005823.10278-1-raj.khem@gmail.com> References: <20170923005823.10278-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 3/4] go_1.9: remove obsolete overrides 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 From: Matt Madison Now that mips and security flags fixes are in place in the bbclasses, remove the local settings in this recipe. Signed-off-by: Matt Madison Signed-off-by: Khem Raj --- meta/recipes-devtools/go/go_1.9.bb | 2 -- 1 file changed, 2 deletions(-) -- 2.14.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/go/go_1.9.bb b/meta/recipes-devtools/go/go_1.9.bb index 08ab793f86..c67e2cb050 100644 --- a/meta/recipes-devtools/go/go_1.9.bb +++ b/meta/recipes-devtools/go/go_1.9.bb @@ -1,4 +1,2 @@ require go-${PV}.inc require go-target.inc -TUNE_CCARGS_remove = "-march=mips32r2" -SECURITY_PIE_CFLAGS_remove = "-fPIE -pie" From patchwork Sat Sep 23 00:58:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 114115 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp136071qgf; Fri, 22 Sep 2017 17:59:05 -0700 (PDT) X-Received: by 10.98.16.80 with SMTP id y77mr704940pfi.261.1506128345233; Fri, 22 Sep 2017 17:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506128345; cv=none; d=google.com; s=arc-20160816; b=aT+Xw997GLQWvQoZOExGxpLr8WzNIj7KM4deIR8VjMtvW3yMGlWQTke8FeHwvRXKn+ st0il550LE0FPW07tlZ5xWVsKhRwqa7fGBNzRV1KCzh2dfCQSdYzfxkkhFezIw5ECcny YVQH2Y2W655DK1CyfYOqWp7r69MnwCnNjZUQk9fXT8ch28+MFa3OcJQlynsnpZ8HdHxo AsNG/wmzfw8DAVOzj5ucsAPydmgWiiDkPloWe3UIQVMekngqJv6wUEgioQ0Ebm6KxRr7 /NH7RdmPRvShwSLPAmg+UP6FzHLV1fBNRDSpR0ilpAUly6vuw2mMdIP2vDUMqYDkP0qa uuww== 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=SUcIDT+PIZ0lnj80imxAZKRWYNmAjrCrZuijHit4ZC4=; b=07HAsf614cERiBQ1/AobsyZS0ZHMfWDX3+tpVsptVTgvk3xJN9yGUMnuPyPLPuMNHV iZdA3iM0XCMG610aSA7YFuHcKuMpktO0TDwl73U4pRoR/rB1+KVzxVSabyWccdlZBgEA vEBEwOwrUcl/9VR8GL9CQcNqrhSW83+7JIlRaRDpIWiUA6srRRg/tMQnqKV5B/HGtNyZ QrQqgqF2xbmLLuoLqu3/7yYGG+XttvWB9XtPulHSPtk1cbh1BqFdjkRWKYu2ZwaCcF3r d89QfOrfG79fkE1valNFfums/Bzx5qj/A/sxs8bzloLx93JVKIrpbnhHRd3pmgPH1lRE RaCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=KsLpeJnG; 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 m14si580185pgs.511.2017.09.22.17.59.04; Fri, 22 Sep 2017 17:59:05 -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.s=20161025 header.b=KsLpeJnG; 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 2DF8678485; Sat, 23 Sep 2017 00:58:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by mail.openembedded.org (Postfix) with ESMTP id 5843178477 for ; Sat, 23 Sep 2017 00:58:34 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id r71so1297344pfe.12 for ; Fri, 22 Sep 2017 17:58:36 -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=1DATQQ64B8Z0/lIAY5SbSSTZ1AitA0d/Lb50Th0RVjk=; b=KsLpeJnGikPmsHIfY94mZBZNhukdcYfU1sBX3ehtvJo8Y5YK9ZW3BIhksh+70cuGL3 q+wKGM1XIVThnpbERNJFXC36nPqXhNCCT4QC0vpxWc/32qCuHhXyYa0B4NX+i9uuNL2m PZzvscHR2v8OD/hzANl7fZ/Nlq47CMv/Vf8Jp4JVHMKOzBImdE0g5rHMcMhBMC/Y93IJ inIa+WVpE29rBXn8/c/xUNOXkwDWSJmUJOd2lY/9kTexOP1oTPVj2MiEZhRRM2oIkq4x BLDrqKAilCSzde1ghEfucTLvLviSlvlfEr8OyInbovqtfpRAZN5rCDpg97X/4UMWjoaN aREA== 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=1DATQQ64B8Z0/lIAY5SbSSTZ1AitA0d/Lb50Th0RVjk=; b=D9iLuavEJtsWii5Qo7Zd1ysc/XNg8zHE9n+ZBHBuBE60drztiEY8OEAXFxvowHp4kQ 1gDWoCVknWvbrOO8Nz/UUlG/Ja6/JveL+jetG9SQwRr9T428/aCds+UVThtxM0lWfZLg nP/UDSAAbDovr2UYgIFAAemzQAelMV1qdQN97fcUFDMgonVEUHVubqWdURskWlGLJXtl gEPtO3tbU1CMzJoFrs7ot76FXKHlC7biwa4pgDIiYFF2YjgXGZzmfn6g5ietjrWauS9S BjVrqLVANdmuFyJR9Tr2TjO5H3k4C02LhrMidxIZHj0sEWkjf8EPPFgUqLARA28cqGe6 pnSA== X-Gm-Message-State: AHPjjUhadFOTBjREe1KdYNGPnSGcXalQIUR9wO7jmJS34u9KrQ5abaTg bqxpNBmJSPgMyA0ormYdvti7Jg== X-Google-Smtp-Source: AOwi7QCHSJ2o7X2FxVntUvLbCAzmtFGmdqbKMAR5JqTg1h8o3QfDFu+uTqaaGNBuFT1GfzO3TbSX0w== X-Received: by 10.98.236.17 with SMTP id k17mr730761pfh.191.1506128316360; Fri, 22 Sep 2017 17:58:36 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::e57f]) by smtp.gmail.com with ESMTPSA id b66sm1151521pfe.165.2017.09.22.17.58.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 17:58:35 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Fri, 22 Sep 2017 17:58:23 -0700 Message-Id: <20170923005823.10278-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170923005823.10278-1-raj.khem@gmail.com> References: <20170923005823.10278-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 4/4] go: Fix build with -buildmode=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/go/go-1.9.inc | 1 + ...dmode-pie-forces-external-linking-mode-on.patch | 46 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch -- 2.14.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/go/go-1.9.inc b/meta/recipes-devtools/go/go-1.9.inc index 0b0aca3fbe..65adaa8d72 100644 --- a/meta/recipes-devtools/go/go-1.9.inc +++ b/meta/recipes-devtools/go/go-1.9.inc @@ -14,6 +14,7 @@ SRC_URI += "\ file://0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch \ file://0007-ld-add-soname-to-shareable-objects.patch \ file://0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch \ + file://0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch \ " SRC_URI[main.md5sum] = "da2d44ea384076efec43ee1f8b7d45d2" SRC_URI[main.sha256sum] = "a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993" diff --git a/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch b/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch new file mode 100644 index 0000000000..7475d9338a --- /dev/null +++ b/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch @@ -0,0 +1,46 @@ +From aae44527c8065d54f6acaf87c82cba1ac96fae59 Mon Sep 17 00:00:00 2001 +From: Ian Lance Taylor +Date: Fri, 18 Aug 2017 17:46:03 -0700 +Subject: [PATCH] cmd/go: -buildmode=pie forces external linking mode on all + systems + +The go tool assumed that -buildmode=pie implied internal linking on +linux-amd64. However, that was changed by CL 36417 for issue #18968. + +Fixes #21452 + +Change-Id: I8ed13aea52959cc5c53223f4c41ba35329445545 +Reviewed-on: https://go-review.googlesource.com/57231 +Run-TryBot: Ian Lance Taylor +TryBot-Result: Gobot Gobot +Reviewed-by: Avelino +Reviewed-by: Rob Pike +--- +Upstream-Status: Backport + + src/cmd/go/internal/load/pkg.go | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go +index 2660d3f..d40773b 100644 +--- a/src/cmd/go/internal/load/pkg.go ++++ b/src/cmd/go/internal/load/pkg.go +@@ -954,11 +954,12 @@ func (p *Package) load(stk *ImportStack, bp *build.Package, err error) *Package + + if cfg.BuildContext.CgoEnabled && p.Name == "main" && !p.Goroot { + // Currently build modes c-shared, pie (on systems that do not +- // support PIE with internal linking mode), plugin, and +- // -linkshared force external linking mode, as of course does ++ // support PIE with internal linking mode (currently all ++ // systems: issue #18968)), plugin, and -linkshared force ++ // external linking mode, as of course does + // -ldflags=-linkmode=external. External linking mode forces + // an import of runtime/cgo. +- pieCgo := cfg.BuildBuildmode == "pie" && (cfg.BuildContext.GOOS != "linux" || cfg.BuildContext.GOARCH != "amd64") ++ pieCgo := cfg.BuildBuildmode == "pie" + linkmodeExternal := false + for i, a := range cfg.BuildLdflags { + if a == "-linkmode=external" { +-- +2.14.1 +