diff mbox series

[oe,warrior-next,04/10] klibc: Pass -fno-builtin-bcmp with musl/clang combo

Message ID cede91ddd57fb3ffc6212866c32dac3158c89e56.1569801183.git.akuster808@gmail.com
State New
Headers show
Series None | expand

Commit Message

Armin Kuster Sept. 29, 2019, 11:55 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>


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>
(cherry picked from commit 11bc2775af3e47399ac268a2e6fbd63185e478ef)
Signed-off-by: Armin Kuster <akuster808@gmail.com>

---
 meta-initramfs/recipes-devtools/klibc/klibc.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.7.4

-- 
_______________________________________________
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 5805448..7faf0ca 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 \
                 "