python3-m2crypto: fix build with musl multilib
PATCH 1/1 python3-m2crypto: fix build with musl multilib
From: "mark.yang" <[email protected]>
Fix this do_compile failure with musl multilib:
openssl/configuration.h:19: Error: Unable to find 'bits/wordsize.h' openssl/configuration.h:43: Error: CPP #error ""Unknown __WORDSIZE detected""
oe-core f296632258 ("multilib_header_wrapper.h: support musl") detects musl with __has_include. swig has no __has_include, so the wrapper includes bits/wordsize.h as on glibc. musl does not have this header.
Pass -D__MHWORDSIZE to swig. The wrapper uses a predefined __MHWORDSIZE as is (rule 1 in f296632258).
Signed-off-by mark.yang <[email protected]>
--- meta-python/recipes-devtools/python/python3-m2crypto_0.51.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-m2crypto_0.51.0.bb +1 -1
@@ -30,7 +30,7 @@ RDEPENDS:${PN} += "\ DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}" DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}" -SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']} -DOPENSSL_NO_FILENAMES" +SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']} -DOPENSSL_NO_FILENAMES -D__MHWORDSIZE=${SITEINFO_BITS}" SWIG_FEATURES:append:riscv64 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}" SWIG_FEATURES:append:riscv32 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}"