mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-31 01:10:08 +00:00
klibc: Fix build with security flags
Drop -Os which is also causing the relro Fixes | x86_64-bec-linux-musl-ld.bfd: discarded output section: `.got.plt' Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andrea Adami <andrea.adami@gmail.com>
This commit is contained in:
@@ -21,9 +21,10 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
|
||||
file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch \
|
||||
file://0001-Kbuild.klibc-Add-path-to-compiler-headers-via-isyste.patch \
|
||||
file://0001-arm-Do-not-set-a-fallback-march-and-mtune.patch \
|
||||
file://0001-klibc_2.0.4-add-kexec_file_load-syscall.patch \
|
||||
file://0001-klibc_2.0.4-add-kexec_file_load-syscall.patch \
|
||||
file://0001-klibc-add-getrandom-syscall.patch \
|
||||
"
|
||||
file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \
|
||||
"
|
||||
|
||||
ARMPATCHES ?= ""
|
||||
|
||||
@@ -31,7 +32,6 @@ ARMPATCHES_arm = "file://klibc-config-eabi.patch \
|
||||
file://armv4-fix-v4bx.patch \
|
||||
"
|
||||
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
@@ -44,9 +44,10 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
|
||||
'INSTALLDIR=${libdir}/klibc' \
|
||||
'SHLIBDIR=${libdir}' \
|
||||
'${KLIBCTHUMB}' \
|
||||
'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
|
||||
'KLIBCOPTFLAGS=${TUNE_CCARGS}' \
|
||||
V=1 \
|
||||
"
|
||||
EXTRA_OEMAKE += 'EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" EXTRA_KLIBCLDFLAGS="-z noexecstack"'
|
||||
|
||||
export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
|
||||
KLIBCTHUMB = "${@['CONFIG_KLIBC_THUMB=n', 'CONFIG_KLIBC_THUMB=y'][(d.getVar('ARM_INSTRUCTION_SET') == 'thumb')]}"
|
||||
|
||||
Reference in New Issue
Block a user