[OE-core] [PATCH] python: Change python 2.7.9 to use libffi from the system

Khem Raj raj.khem at gmail.com
Thu Apr 9 06:55:19 UTC 2015


> On Apr 7, 2015, at 10:47 PM, Nathan Rossi <nathan.rossi at xilinx.com> wrote:
> 
> Changes in python 2.7.9 from 2.7.3 cause issues when building the in
> tree libffi for ctypes. These issues primarily affect less common
> platforms (e.g. MicroBlaze) that are supported by libffi but the python
> overrides for the in tree libffi are not able to detect correctly.
> 
> This patch changes the python 2.7.9 recipe to match how the python 3
> recipe handles libffi by configuring the build to use the system
> libffi. This brings consistency between the libffi used for different
> python versions as well as with the system.
> 
> Signed-off-by: Nathan Rossi <nathan.rossi at xilinx.com>
> ---
> The main reason for this change is that python 2.7.9 builds are broken for
> MicroBlaze, when build the ctypes modules it fails to detect the 'MICROBLAZE'
> platform, despite it being available in the libffi source tree as well as
> working correctly with python 2.7.3.
> 
> |   File "build/temp.linux2-microblazeel-2.7/libffi/fficonfig.py", line 33, in <module>
> |     ffi_sources += ffi_platforms['MICROBLAZE']
> | KeyError: 'MICROBLAZE'
> | Makefile:490: recipe for target 'sharedmods' failed
> | make: *** [sharedmods] Error 1
> 
> It seems that this fficonfig.py file was added for python 2.7.9 and does not
> contain the equivalent entries for all of libffi's supported platforms.
> 

this is ok



> Regards,
> Nathan
> ---
> meta/recipes-devtools/python/python_2.7.9.bb |    4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/python/python_2.7.9.bb b/meta/recipes-devtools/python/python_2.7.9.bb
> index 0031b8f..7918550 100644
> --- a/meta/recipes-devtools/python/python_2.7.9.bb
> +++ b/meta/recipes-devtools/python/python_2.7.9.bb
> @@ -1,5 +1,5 @@
> require python.inc
> -DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
> +DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
> PR = "${INC_PR}"
> 
> DISTRO_SRC_URI ?= "file://sitecustomize.py"
> @@ -32,6 +32,8 @@ S = "${WORKDIR}/Python-${PV}"
> 
> inherit autotools multilib_header python-dir pythonnative
> 
> +CONFIGUREOPTS += " --with-system-ffi "
> +
> # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
> #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
> TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
> -- 
> 1.7.10.4
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list