* [PATCH] python-native: Build with ipv6 enabled
@ 2017-09-26 16:56 Alejandro Hernandez
2017-09-26 17:16 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Hernandez @ 2017-09-26 16:56 UTC (permalink / raw)
To: openembedded-core
Before we introduced DISTRO_FEATURES_NATIVE on commit:
db1f1adace58763c35774e3fdfeaac5c3ca646fd
ipv6 was enabled by default on DISTRO_FEATURES via DISTRO_FEATURES_LIBC
hence python-native was built with ipv6 support.
After this, the check for ipv6 on DISTRO_FEATURES stopped working for the
python-native recipe and it was always disabled.
This patch fixes the implementation of EXTRA_OECONF to get the ipv6
configuration correctly (whether were building for native or target),
and it also modifies DISTRO_FEATURES_NATIVE to add ipv6 by default,
simply to get it working like it was before changes were made'
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
meta/conf/bitbake.conf | 2 +-
meta/recipes-devtools/python/python.inc | 11 +++++++++--
meta/recipes-devtools/python/python3_3.5.3.bb | 2 +-
meta/recipes-devtools/python/python_2.7.13.bb | 2 +-
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 4ff1e9608e7..9ca7c57a5c3 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -807,7 +807,7 @@ IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
# Native distro features (will always be used for -native, even if they
# are not enabled for target)
-DISTRO_FEATURES_NATIVE ?= "x11"
+DISTRO_FEATURES_NATIVE ?= "x11 ipv6"
DISTRO_FEATURES_NATIVESDK ?= "x11 libc-charsets libc-locales libc-locale-code"
# Normally target distro features will not be applied to native builds:
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index b40f551ab39..73b95ad2c71 100644
--- a/meta/recipes-devtools/python/python.inc
+++ b/meta/recipes-devtools/python/python.inc
@@ -22,13 +22,20 @@ PYTHON_MAJMIN = "2.7"
inherit autotools pkgconfig
-EXTRA_OECONF = "\
+EXTRA_OECONF_class-target = "\
+ --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \
+"
+EXTRA_OECONF_class-native = "\
+ --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'ipv6', 'yes', 'no', d)} \
+"
+
+# _append automatically gets appended to the correct EXTRA_OECONF_class-<>
+EXTRA_OECONF_append = "\
--with-threads \
--with-pymalloc \
--without-cxx-main \
--with-signal-module \
--enable-shared \
- --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \
ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \
${PYTHONLSBOPTS} \
"
diff --git a/meta/recipes-devtools/python/python3_3.5.3.bb b/meta/recipes-devtools/python/python3_3.5.3.bb
index 13df12fe566..2657ed09618 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -66,7 +66,7 @@ CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
SDK_CC_ARCH += "-DNDEBUG -fno-inline"
EXTRA_OEMAKE += "CROSS_COMPILE=yes"
-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
+EXTRA_OECONF_append = " CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
export CROSS_COMPILE = "${TARGET_PREFIX}"
export _PYTHON_PROJECT_BASE = "${B}"
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.13.bb
index 4d73cd25c8b..c346b0988bd 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.13.bb
@@ -37,7 +37,7 @@ inherit autotools multilib_header python-dir pythonnative
CONFIGUREOPTS += " --with-system-ffi "
-EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
+EXTRA_OECONF_append = " ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
do_configure_append() {
rm -f ${S}/Makefile.orig
--
2.12.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: Build with ipv6 enabled
2017-09-26 16:56 [PATCH] python-native: Build with ipv6 enabled Alejandro Hernandez
@ 2017-09-26 17:16 ` Burton, Ross
2017-09-26 17:23 ` Alejandro Hernandez
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2017-09-26 17:16 UTC (permalink / raw)
To: Alejandro Hernandez; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
On 26 September 2017 at 17:56, Alejandro Hernandez <
alejandro.hernandez@linux.intel.com> wrote:
> This patch fixes the implementation of EXTRA_OECONF to get the ipv6
> configuration correctly (whether were building for native or target),
> and it also modifies DISTRO_FEATURES_NATIVE to add ipv6 by default,
> simply to get it working like it was before changes were made'
>
Why are changes beyond adding to DISTRO_FEATURES_NATIVE required at all?
Ross
[-- Attachment #2: Type: text/html, Size: 822 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: Build with ipv6 enabled
2017-09-26 17:16 ` Burton, Ross
@ 2017-09-26 17:23 ` Alejandro Hernandez
2017-09-26 17:25 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Hernandez @ 2017-09-26 17:23 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
Hey Ross,
On 09/26/2017 12:16 PM, Burton, Ross wrote:
> On 26 September 2017 at 17:56, Alejandro Hernandez
> <alejandro.hernandez@linux.intel.com
> <mailto:alejandro.hernandez@linux.intel.com>> wrote:
>
> This patch fixes the implementation of EXTRA_OECONF to get the ipv6
> configuration correctly (whether were building for native or target),
> and it also modifies DISTRO_FEATURES_NATIVE to add ipv6 by default,
> simply to get it working like it was before changes were made'
>
>
Using EXTRA_OECONF_append gets added to the correct
EXTRA_OECONF_class-<target/natve> correctly, otherwise its disregarded.
> Why are changes beyond adding to DISTRO_FEATURES_NATIVE required at all?
>
> Ross
[-- Attachment #2: Type: text/html, Size: 2078 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: Build with ipv6 enabled
2017-09-26 17:23 ` Alejandro Hernandez
@ 2017-09-26 17:25 ` Burton, Ross
2017-09-26 17:47 ` Alejandro Hernandez
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2017-09-26 17:25 UTC (permalink / raw)
To: Alejandro Hernandez; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
On 26 September 2017 at 18:23, Alejandro Hernandez <
alejandro.hernandez@linux.intel.com> wrote:
> Using EXTRA_OECONF_append gets added to the correct
> EXTRA_OECONF_class-<target/natve> correctly, otherwise its disregarded.
>
>
I guess the subtext was
+EXTRA_OECONF_class-native = "\
+ --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'ipv6',
'yes', 'no', d)} \
That is totally wrong. In a native recipe, DISTRO_FEATURES has been
altered based on DISTRO_FEATURES_NATIVE. You don't need to make other
changes, and I suspect that reverting this chunk means the other chunks can
also be reverted.
Ross
[-- Attachment #2: Type: text/html, Size: 1743 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: Build with ipv6 enabled
2017-09-26 17:25 ` Burton, Ross
@ 2017-09-26 17:47 ` Alejandro Hernandez
0 siblings, 0 replies; 5+ messages in thread
From: Alejandro Hernandez @ 2017-09-26 17:47 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
On 09/26/2017 12:25 PM, Burton, Ross wrote:
> On 26 September 2017 at 18:23, Alejandro Hernandez
> <alejandro.hernandez@linux.intel.com
> <mailto:alejandro.hernandez@linux.intel.com>> wrote:
>
>> Using EXTRA_OECONF_append gets added to the correct
>> EXTRA_OECONF_class-<target/natve> correctly, otherwise its
>> disregarded.
>
>
> I guess the subtext was
>
> +EXTRA_OECONF_class-native = "\
> + --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'ipv6',
> 'yes', 'no', d)} \
>
>
> That is totally wrong. In a native recipe, DISTRO_FEATURES has been
> altered based on DISTRO_FEATURES_NATIVE. You don't need to make other
> changes, and I suspect that reverting this chunk means the other
> chunks can also be reverted.
I see your point, seems like I got confused, I just checked and the
resulting EXTRA_OECONF is the same, but I understand why this is
conceptually wrong, I'll send a v2 in a bit.
Thanks!
Alejandro
>
> Ross
>
[-- Attachment #2: Type: text/html, Size: 3495 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-26 17:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 16:56 [PATCH] python-native: Build with ipv6 enabled Alejandro Hernandez
2017-09-26 17:16 ` Burton, Ross
2017-09-26 17:23 ` Alejandro Hernandez
2017-09-26 17:25 ` Burton, Ross
2017-09-26 17:47 ` Alejandro Hernandez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox