* [PATCH] go: allow recipes to override the build mode for golang
@ 2018-10-28 13:40 brendank310
0 siblings, 0 replies; only message in thread
From: brendank310 @ 2018-10-28 13:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Brendan Kerrigan
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-28 13:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-28 13:40 [PATCH] go: allow recipes to override the build mode for golang brendank310
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox