diff mbox series

[oe,meta-initramfs,1/3] klibc: Pass -fno-builtin-bcmp with musl/clang combo

Message ID 20190807040323.17521-1-raj.khem@gmail.com
State Accepted
Commit 11bc2775af3e47399ac268a2e6fbd63185e478ef
Headers show
Series [oe,meta-initramfs,1/3] klibc: Pass -fno-builtin-bcmp with musl/clang combo | expand

Commit Message

Khem Raj Aug. 7, 2019, 4:03 a.m. UTC
clang would emit bcmp built-in for musl bases system
but here we do not link in musl C library, so its best
to disable it

Fixes
git/usr/klibc/memmem.c:38: undefined reference to `bcmp'

Signed-off-by: Khem Raj <raj.khem@gmail.com>

Cc: Andrea Adami <andrea.adami@gmail.com>
---
 meta-initramfs/recipes-devtools/klibc/klibc.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.22.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index 5805448671..7faf0cabbf 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -33,6 +33,9 @@  ARMPATCHES_arm = "file://klibc-config-eabi.patch \
 
 S = "${WORKDIR}/git"
 
+OPTFLAGS = "${TUNE_CCARGS} -Os"
+OPTFLAGS_append_libc-musl_toolchain-clang = " -fno-builtin-bcmp"
+
 PARALLEL_MAKE = ""
 EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
                 'CROSS_COMPILE=${TARGET_PREFIX}' \
@@ -43,7 +46,7 @@  EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
                 'INSTALLDIR=${libdir}/klibc' \
                 'SHLIBDIR=${libdir}' \
                 '${KLIBCTHUMB}' \
-                'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
+                'KLIBCOPTFLAGS=${OPTFLAGS}' \
                  V=1 \
                 "