[OE-core] [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64

Khem Raj raj.khem at gmail.com
Wed Jun 13 14:01:13 UTC 2018


On Wed, Jun 13, 2018 at 12:16 AM <kai.kang at windriver.com> wrote:
>
> From: Kai Kang <kai.kang at windriver.com>
>
> 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`
>
> Signed-off-by: Kai Kang <kai.kang at windriver.com>
> ---
>  meta/classes/goarch.bbclass | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> index f54c5169e3e..5fd9f294a8a 100644
> --- a/meta/classes/goarch.bbclass
> +++ b/meta/classes/goarch.bbclass
> @@ -36,6 +36,7 @@ COMPATIBLE_HOST_mipsarchn32 = "null"
>  ARM_INSTRUCTION_SET = "arm"
>  TUNE_CCARGS_remove = "-march=mips32r2"
>  SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
> +SECURITY_CFLAGS_mips64 = "${SECURITY_NOPIE_CFLAGS}"

perhaps we should use _mipsall once

>  SECURITY_NOPIE_CFLAGS ??= ""
>
>  def go_map_arch(a, d):
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list