Skip to contentSkip to conversation

set SECURITY_CFLAGS for mips64 in goarch.bbclass

PATCH Superseded [email protected] 1 participant 2 messages Jun 14, 2018

lore
Share & tools
lore
#0 lore raw

v2 cover set SECURITY_CFLAGS for mips64 in goarch.bbclass

From: Kai Kang <[email protected]>

V2:
* use override 'mipsarch' to set SECURITY_CFLAGS for both mips and mips64

Build packages go-dep and glide successfully on qemumips and qemumips64.

Kai Kang (1):
goarch.bbclass: set SECURITY_CFLAGS for mips64

 meta/classes/goarch.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 goarch.bbclass: set SECURITY_CFLAGS for mips64

From: Kai Kang <[email protected]>

When include conf/distro/include/security_flags.inc, NOPIE flags are still required for mips64 target builds. Otherwise it fails to build packages such as glide which inherit go.bbclass:

| .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/
| gcc/mips64-wrs-linux/7.3.0/ld: .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o:
| relocation r_mips_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC`

Use override 'mipsarch' to set SECURITY_CFLAGS for both mips and mips64.

---
 meta/classes/goarch.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/goarch.bbclass +1 -1
index f54c5169e3e..bb36cc81424 100644
@@ -35,7 +35,7 @@ COMPATIBLE_HOST_powerpc64 = "null"
 COMPATIBLE_HOST_mipsarchn32 = "null"
 ARM_INSTRUCTION_SET = "arm"
 TUNE_CCARGS_remove = "-march=mips32r2"
-SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_CFLAGS_mipsarch = "${SECURITY_NOPIE_CFLAGS}"
 SECURITY_NOPIE_CFLAGS ??= ""
 
 def go_map_arch(a, d):
Signature · 1 line
2.17.1