summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-07 22:44:23 -0700
committerKhem Raj <raj.khem@gmail.com>2021-05-11 08:25:56 -0700
commit4e36f13b04a8b7ff19a4205c66b3b27f0800ab9a (patch)
treeb48933c65dd0e05ee4857c994f3f23d344bd96d4
parent3c259f977e8647ac9c54097d0faab70719a5553e (diff)
downloadmeta-openembedded-4e36f13b04a8b7ff19a4205c66b3b27f0800ab9a.tar.gz
python3-m2crypto: Pass correct ABI defines to swig
This ensures that WORDSIZE is as per the target, currently this does not get it right for cross-compilation env, and OE uses multilib headers by default ( even when you do not use multilib ) which means if WORDSIZE is wrong it will go on to include wrong headers due to these artificial stubs Fixes swig -python -py3 -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../lib/aarch64-oe-linux/gcc/aarch64-oe-linux/11.1.0/include-fixed -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/lib/aarch64-oe-linux/11.1.0/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include -ITOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/python3.9 -I/usr/include/openssl -includeall -modern -builtin -outdir TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/M2Crypto-0.37.1/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i TOPDIR/tmp-glibc/work/cortexa57-oe-linux/python3-m2crypto/0.37.1-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:23: Error: Unable to find 'openssl/opensslconf-32.h' Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb28
1 files changed, 3 insertions, 25 deletions
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
index 896d9d2cc4..ef123075c7 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
+++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
@@ -33,31 +33,9 @@ DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
33 33
34SWIG_FEATURES_x86 = "-D__i386__" 34SWIG_FEATURES_x86 = "-D__i386__"
35SWIG_FEATURES_x32 = "-D__ILP32__" 35SWIG_FEATURES_x32 = "-D__ILP32__"
36SWIG_FEATURES ?= "-D__${HOST_ARCH}__"
37export SWIG_FEATURES
38 36
39# Get around a problem with swig, but only if the 37SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']}"
40# multilib header file exists. 38
41# 39export SWIG_FEATURES
42do_configure_prepend() {
43 ${CPP} -dM - < /dev/null | grep -v '__\(STDC\|REGISTER_PREFIX\|GNUC\|STDC_HOSTED\)__' \
44 | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' > ${S}/SWIG/gcc_macros.h
45
46 if [ "${SITEINFO_BITS}" = "64" ];then
47 bit="64"
48 else
49 bit="32"
50 fi
51
52 if [ -e ${STAGING_INCDIR}/openssl/opensslconf-${bit}.h ] ;then
53 for i in SWIG/_ec.i SWIG/_evp.i; do
54 sed -i -e "s/opensslconf.*\./opensslconf-${bit}\./" "${S}/$i"
55 done
56 elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-n${bit}.h ] ;then
57 for i in SWIG/_ec.i SWIG/_evp.i; do
58 sed -i -e "s/opensslconf.*\./opensslconf-n${bit}\./" "${S}/$i"
59 done
60 fi
61}
62 40
63BBCLASSEXTEND = "native" 41BBCLASSEXTEND = "native"