summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Morrow <pemorrow@linux.microsoft.com>2021-04-06 06:07:58 -0700
committerSteve Sakoman <steve@sakoman.com>2021-04-06 05:53:53 -1000
commit85211463f398071364f4eb11e2fc47ba7ebe897a (patch)
tree329bcb1c979a22f18091dd146cb73ca7a648a61a
parentcbc074c2bbf5956ff225e794bb0b214c94a93d75 (diff)
downloadopenembedded-core-contrib-stable/dunfell-nut.tar.gz
openembedded-core-contrib-stable/dunfell-nut.tar.bz2
openembedded-core-contrib-stable/dunfell-nut.zip
go_1.14: don't set -buildmode=pie when building for windows targetsstable/dunfell-nut
go 1.14 for windows targets does not support -buildmode=pie, disable it and use the default buildmode instead. Support for -buildmode=pie for windows targets is added with go 1.15 (https://golang.org/doc/go1.15) which is added to poky in gatesgarth. Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/go.bbclass8
-rw-r--r--meta/recipes-devtools/go/go_1.14.bb8
2 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index e6c3591479..16e46398b1 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -145,11 +145,11 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg"
INSANE_SKIP_${PN} += "ldflags"
-# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
-# doesn't support -buildmode=pie, so skip the QA checking for mips and its
-# variants.
+# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but
+# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
+# for windows/mips/riscv and their variants.
python() {
- if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH'):
+ if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH') or 'windows' in d.getVar('TARGET_GOOS'):
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
else:
d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
diff --git a/meta/recipes-devtools/go/go_1.14.bb b/meta/recipes-devtools/go/go_1.14.bb
index bc90a1329e..c17527998b 100644
--- a/meta/recipes-devtools/go/go_1.14.bb
+++ b/meta/recipes-devtools/go/go_1.14.bb
@@ -3,11 +3,11 @@ require go-target.inc
export GOBUILDMODE=""
export CGO_ENABLED_riscv64 = ""
-# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips/riscv
-# doesn't support -buildmode=pie, so skip the QA checking for mips/riscv and its
-# variants.
+# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but
+# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
+# for windows/mips/riscv and their variants.
python() {
- if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True):
+ if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True) or 'windows' in d.getVar('TARGET_GOOS', True):
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
else:
d.setVar('GOBUILDMODE', 'pie')