From: brendank310 <brendank310@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Brendan Kerrigan <kerriganb@ainfosec.com>
Subject: [PATCH] go: allow recipes to override the build mode for golang
Date: Sun, 28 Oct 2018 09:40:07 -0400 [thread overview]
Message-ID: <20181028134007.30976-1-brendank310@gmail.com> (raw)
From: Brendan Kerrigan <kerriganb@ainfosec.com>
Signed-off-by: Brendan Kerrigan <kerriganb@ainfosec.com>
---
meta/classes/go.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 167d02e3fa..6cf93c14aa 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -28,6 +28,7 @@ export GOPATH_OMIT_IN_ACTIONID ?= "1"
export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
export GOPTESTFLAGS ?= ""
GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
+GOBUILDMODE ?= "pie"
export GO = "${HOST_PREFIX}go"
GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
@@ -187,5 +188,5 @@ python() {
if 'mips' in d.getVar('TARGET_ARCH'):
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
else:
- d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
+ d.appendVar('GOBUILDFLAGS', ' -buildmode=%s' % d.getVar('GOBUILDMODE'))
}
--
2.17.1
reply other threads:[~2018-10-28 13:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181028134007.30976-1-brendank310@gmail.com \
--to=brendank310@gmail.com \
--cc=kerriganb@ainfosec.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox