From feb6b28ce2c07c870d7a2fe6bc82db4bbf2c4e54 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 15 Sep 2022 20:12:21 -0700 Subject: python: Enable build with clang on target Signed-off-by: Khem Raj --- conf/nonclangable.conf | 6 ------ recipes-devtools/python/python3_%.bbappend | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 recipes-devtools/python/python3_%.bbappend diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf index e16bdc0..81f03ef 100644 --- a/conf/nonclangable.conf +++ b/conf/nonclangable.conf @@ -93,12 +93,6 @@ TOOLCHAIN:pn-ppp = "gcc" #| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7); TOOLCHAIN:pn-pseudo = "gcc" -#| checking for multiarch... riscv64-yoe-linux -#| configure: error: internal configure error for the platform triplet, please file a bug report -TOOLCHAIN:pn-python3:riscv64 = "gcc" -TOOLCHAIN:pn-python3:riscv32 = "gcc" -TOOLCHAIN:pn-python3:libc-musl = "gcc" - # mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2] # vld1.s32 ${1:h}, [$3] ' TOOLCHAIN:pn-pulseaudio:armv7ve = "gcc" diff --git a/recipes-devtools/python/python3_%.bbappend b/recipes-devtools/python/python3_%.bbappend new file mode 100644 index 0000000..a4d8b49 --- /dev/null +++ b/recipes-devtools/python/python3_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +do_configure:prepend:class-target:toolchain-clang() { + # We do not need --print-multiarch with clang since it prints wrong value + sed -i -e 's#\[MULTIARCH=$($CC --print-multiarch 2>/dev/null)\]#\[MULTIARCH=""\]#g' ${S}/configure.ac +} + -- cgit v1.2.3-54-g00ecf