Skip to contentSkip to conversation

python3-ctypes: Fix cross compilation for arm targets

PATCH In review Alejandro Hernandez 2 participants 3 messages Jun 16, 2015 – Jun 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-ctypes: Fix cross compilation for arm targets

When cross compiling for arm targets ctypes compilation fails because it uses _sysconfigdata from the HOST, this patches makes it use the one from TARGET fixing compilation of this module

[YOCTO #7873]

---
 meta/recipes-devtools/python/python3_3.3.3.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/python/python3_3.3.3.bb +4 -0
index 6147408..22ea651 100644
@@ -72,6 +72,10 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
 export _PYTHON_PROJECT_BASE = "${B}"
 export _PYTHON_PROJECT_SRC = "${S}"
 
+# Fix ctypes cross compilation
+export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
+
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
 
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 1/1 python3-ctypes: Fix cross compilation for arm targets

When cross compiling for arm targets ctypes compilation fails because it uses _sysconfigdata from the HOST, this patches makes it use the one from TARGET fixing compilation of this module

[YOCTO #7873]

---
 meta/recipes-devtools/python/python3_3.4.3.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/python/python3_3.4.3.bb +3 -0
index 8e0c2ba..7eb99b1 100644
@@ -69,6 +69,9 @@ export _PYTHON_PROJECT_BASE = "${B}"
 export _PYTHON_PROJECT_SRC = "${S}"
 export CCSHARED = "-fPIC"
 
+# Fix ctypes cross compilation
+export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
 
Signature · 1 line
1.8.4.5
#2 lore raw
In reply to Alejandro Hernandez
Quoted 5 lines · Alejandro Hernandez

When cross compiling for arm targets ctypes compilation fails because it uses _sysconfigdata from the HOST, this patches makes it use the one from TARGET fixing compilation of this module

[YOCTO #7873]

Thanks Alejandro,

This is queued in my fido-next branch[1].

Regards,

Joshua

1. http://cgit.openembedded.org/openembedded-core
-contrib/log/?h=joshuagl/fido-next

Quoted 28 lines

Signed-off-by: Alejandro Hernandez <
[email protected]>

---
 meta/recipes-devtools/python/python3_3.3.3.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/python/python3_3.3.3.bb +4 -1
index 6147408..22ea651 100644
@@ -72,6 +72,10 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
 export _PYTHON_PROJECT_BASE = "${B}"
 export _PYTHON_PROJECT_SRC = "${S}"
 
+# Fix ctypes cross compilation
+export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}
-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
+
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
Signature · 2 lines
-- 
1.8.4.5