[oe-commits] Khem Raj : python3: Fix host include contamination issue

git at git.openembedded.org git at git.openembedded.org
Mon Aug 26 13:08:11 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 40eaba5b95aeac4d652d90f0029b716d6d4115d1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=40eaba5b95aeac4d652d90f0029b716d6d4115d1

Author: Khem Raj <raj.khem at gmail.com>
Date:   Tue Jul 30 01:46:26 2013 -0700

python3: Fix host include contamination issue

Let compiler append sysroot to include path if it can

Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 .../python/python3-native_3.3.2.bb                 |    1 +
 .../python/python3/sysroot-include-headers.patch   |   35 ++++++++++++++++++++
 meta/recipes-devtools/python/python3_3.3.2.bb      |    1 +
 3 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/python/python3-native_3.3.2.bb b/meta/recipes-devtools/python/python3-native_3.3.2.bb
index 012deba..da8dc87 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.2.bb
@@ -20,6 +20,7 @@ file://avoid_warning_about_tkinter.patch \
 file://06-ctypes-libffi-fix-configure.patch \
 file://shutil-follow-symlink-fix.patch \
 file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://sysroot-include-headers.patch \
 ${DISTRO_SRC_URI} \
 "
 SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
diff --git a/meta/recipes-devtools/python/python3/sysroot-include-headers.patch b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch
new file mode 100644
index 0000000..785b556
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch
@@ -0,0 +1,35 @@
+Dont search hardcoded paths, we might be doing a cross-build
+Use '=' in-front to let compiler append sysroot, if it can
+
+Should fix things like
+
+configure:6972: arm-angstrom-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone -c -O2 -pipe -g -feliminate-unused-debug-types  -I/usr/include/ncursesw conftest.c >&5
+cc1: warning: include location "/usr/include/ncursesw" is unsafe for cross-compilation [-Wpoison-system-directories]
+
+
+Signed-off-by: Khem Raj
+Upstream-Status: Pending
+
+
+Index: Python-3.3.2/setup.py
+===================================================================
+--- Python-3.3.2.orig/setup.py	2013-07-30 01:30:48.000000000 -0700
++++ Python-3.3.2/setup.py	2013-07-30 01:41:11.697862723 -0700
+@@ -1210,7 +1210,7 @@
+         panel_library = 'panel'
+         if curses_library == 'ncursesw':
+             curses_defines.append(('HAVE_NCURSESW', '1'))
+-            curses_includes.append('/usr/include/ncursesw')
++            curses_includes.append('=/usr/include/ncursesw')
+             # Bug 1464056: If _curses.so links with ncursesw,
+             # _curses_panel.so must link with panelw.
+             panel_library = 'panelw'
+@@ -1819,7 +1819,7 @@
+         if host_platform == 'darwin':
+             # OS X 10.5 comes with libffi.dylib; the include files are
+             # in /usr/include/ffi
+-            inc_dirs.append('/usr/include/ffi')
++            inc_dirs.append('=/usr/include/ffi')
+ 
+         ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
+         if not ffi_inc or ffi_inc[0] == '':
diff --git a/meta/recipes-devtools/python/python3_3.3.2.bb b/meta/recipes-devtools/python/python3_3.3.2.bb
index 768d44b..fe423d3 100644
--- a/meta/recipes-devtools/python/python3_3.3.2.bb
+++ b/meta/recipes-devtools/python/python3_3.3.2.bb
@@ -30,6 +30,7 @@ SRC_URI += "\
             file://host_include_contamination.patch \
             file://python-3.3-multilib.patch \
             file://shutil-follow-symlink-fix.patch \
+            file://sysroot-include-headers.patch \
            "
 SRC_URI[md5sum] = "7dffe775f3bea68a44f762a3490e5e28"
 SRC_URI[sha256sum] = "f77202fe2bbc203205d7bd6e8452567fa1d9bc97f6957c9ef753d9a36cdcbe9a"



More information about the Openembedded-commits mailing list