[meta-initramfs] klibc: fix build for mipsel and mips64el with security flags enabled

Submitted by Andrea Adami on Dec. 4, 2018, 3 p.m. | Patch ID: 156891

Details

Message ID 20181204150057.3249-1-andrea.adami@gmail.com
State Master Next
Commit 981aa87a2350f7838e0573fde2aab7dc7670080e
Headers show

Commit Message

Andrea Adami Dec. 4, 2018, 3 p.m.
Fix relocations like:
| mipsel-oe-linux-musl-ld.bfd: usr/klibc/libc.a(kill.o):
 relocation R_MIPS_26 against `__syscall_common' can not be used when making a shared object; recompile with -fPIC

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 meta-initramfs/recipes-devtools/klibc/klibc.inc | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index be01c2f58..398dfd1cf 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -69,6 +69,7 @@  KLIBC_ARCH = "${TARGET_ARCH}"
 KLIBC_ARCH_aarch64 = "arm64"
 KLIBC_ARCH_armeb = "arm"
 KLIBC_ARCH_mipsel = "mips"
+KLIBC_ARCH_mips64el = "mips64"
 KLIBC_ARCH_x86 = "i386"
 KLIBC_ARCH_x86-64 = "x86_64"
 KLIBC_ARCH_powerpc = "ppc"
@@ -78,4 +79,6 @@  THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})"
 GCCPIE ?= ""
 SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}"
 SECURITY_LDFLAGS_mips = ""
+SECURITY_LDFLAGS_mipsel = ""
 SECURITY_LDFLAGS_mips64 = ""
+SECURITY_LDFLAGS_mips64el = ""