Since musl ldso can now co-exist in multilib therefore add support to build multilibbed headers and adjust the wrapper header to support musl, it needs __WORDSIZE which is defined in bits/reg.h for musl
[YOCTO #13122] Signed-off-by: Khem Raj <[email protected]> --- v2: Use OE's libc switch to include relevant header instead of __GLIBC__ define meta/classes/multilib_header.bbclass | 16 +++++++++------- scripts/multilib_header_wrapper.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/meta/classes/multilib_header.bbclass b/meta/classes/multilib_header.bbclass index e03f5b13b2..0304f6d3af 100644 --- a/meta/classes/multilib_header.bbclass +++ b/meta/classes/multilib_header.bbclass @@ -6,13 +6,14 @@ inherit siteinfo # all of the ABI variants for that given architecture. # oe_multilib_header() { - - case ${HOST_OS} in - *-musl*) - return - ;; - *) - esac + case ${HOST_OS} in + *-musl*) + wordsize="bits/reg.h" + ;; + *) + wordsize="bits/wordsize.h" + ;; + esac # For MIPS: "n32" is a special case, which needs to be # distinct from both 64-bit and 32-bit. case ${TARGET_ARCH} in @@ -37,6 +38,7 @@ oe_multilib_header() { mv ${D}/${includedir}/$each_header ${D}/${includedir}/${stem}-${ident}.h sed -e "s#ENTER_HEADER_FILENAME_HERE#${stem}#g" ${COREBASE}/scripts/multilib_header_wrapper.h > ${D}/${includedir}/$each_header + sed -i -e "s#WORDSIZE_HEADER#${wordsize}#g" ${D}/${includedir}/$each_header done } diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h index 88f3193812..ae441b4445 100644 --- a/scripts/multilib_header_wrapper.h +++ b/scripts/multilib_header_wrapper.h @@ -5,7 +5,7 @@ * */ -#include <bits/wordsize.h> +#include <WORDSIZE_HEADER> #if __WORDSIZE == 32 -- 2.28.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#141687): https://lists.openembedded.org/g/openembedded-core/message/141687 Mute This Topic: https://lists.openembedded.org/mt/76325162/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
