Skip to contentSkip to conversation

klibc.inc: lazy assign GCCPIE in case security_flags.inc was not included

PATCH New Andrea Adami 1 participant 1 message Sep 25, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 klibc.inc: lazy assign GCCPIE in case security_flags.inc was not included

fix build error (GCCPIE is unset):

EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack EXTRA_KLIBCLDFLAGS=${@-z relro -z now -pie if else } -z noexecstack | make: invalid option -- 'z'
| make: invalid option -- ' '

---
 meta-initramfs/recipes-devtools/klibc/klibc.inc | 1 +
 1 file changed, 1 insertion(+)
meta-initramfs/recipes-devtools/klibc/klibc.inc +1 -0
index 6342be0..be01c2f 100644
@@ -75,6 +75,7 @@ KLIBC_ARCH_powerpc = "ppc"
 KLIBC_ARCH_powerpc64 = "ppc64"
 THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})"
 
+GCCPIE ?= ""
 SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}"
 SECURITY_LDFLAGS_mips = ""
 SECURITY_LDFLAGS_mips64 = ""
Signature · 1 line
2.7.4