* [PATCH 0/3] Fixes for python-native and runqemu with uclibc
@ 2011-11-28 1:45 Khem Raj
2011-11-28 1:46 ` [PATCH 1/3] default-distrovars: Define SDK_VERSION and DISTRO_VERSION Khem Raj
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Khem Raj @ 2011-11-28 1:45 UTC (permalink / raw)
To: openembedded-core
These patches fix a problem with python-native
and other patches to get runqemu working with uclibc
The following changes since commit a14b41f4de3ea6c3f00ff7a1d0441483e40b28de:
default-distrovars: Define SDK_VERSION and DISTRO_VERSION (2011-11-27 17:32:00 -0800)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/misc
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc
Khem Raj (3):
default-distrovars: Define SDK_VERSION and DISTRO_VERSION
toolchain-scripts.bbclass: Make it work when TCLIBC=uclibc
python-native: Fix gcc compiler detecting logic
meta/classes/toolchain-scripts.bbclass | 8 +++++-
meta/conf/distro/include/default-distrovars.inc | 3 +-
.../python/python-native/unixccompiler.patch | 22 ++++++++++----------
.../recipes-devtools/python/python-native_2.7.2.bb | 2 +-
4 files changed, 20 insertions(+), 15 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] default-distrovars: Define SDK_VERSION and DISTRO_VERSION
2011-11-28 1:45 [PATCH 0/3] Fixes for python-native and runqemu with uclibc Khem Raj
@ 2011-11-28 1:46 ` Khem Raj
2011-11-28 1:46 ` [PATCH 2/3] toolchain-scripts.bbclass: Make it work when TCLIBC=uclibc Khem Raj
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-11-28 1:46 UTC (permalink / raw)
To: openembedded-core
runqemu scripts check for them and when using just oe-core
these are not defined anywhere
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/conf/distro/include/default-distrovars.inc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 79c6e14..6f5f1c0 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -46,4 +46,5 @@ NO32LIBS ??= "1"
# Default to emitting logfiles if a build fails.
BBINCLUDELOGS ??= "yes"
-
+SDK_VERSION ??= "oe-core.0"
+DISTRO_VERSION ??= "oe-core.0"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] toolchain-scripts.bbclass: Make it work when TCLIBC=uclibc
2011-11-28 1:45 [PATCH 0/3] Fixes for python-native and runqemu with uclibc Khem Raj
2011-11-28 1:46 ` [PATCH 1/3] default-distrovars: Define SDK_VERSION and DISTRO_VERSION Khem Raj
@ 2011-11-28 1:46 ` Khem Raj
2011-11-28 1:46 ` [PATCH 3/3] python-native: Fix gcc compiler detecting logic Khem Raj
2011-11-29 15:49 ` [PATCH 0/3] Fixes for python-native and runqemu with uclibc Saul Wold
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-11-28 1:46 UTC (permalink / raw)
To: openembedded-core
This class currently only works with eglibc. Since
it adds dependencies explicitly on eglibc when using
uclibc this creates problems. So we make sure that
it checks for TCLIBC to determine system C library
in use
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/toolchain-scripts.bbclass | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index c936a27..5fb6cd3 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -104,7 +104,7 @@ toolchain_create_sdk_env_script_for_installer () {
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}"
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE := "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
-TOOLCHAIN_NEED_CONFIGSITE_CACHE = "eglibc ncurses"
+TOOLCHAIN_NEED_CONFIGSITE_CACHE = "ncurses"
#This function create a site config file
toolchain_create_sdk_siteconfig () {
@@ -112,7 +112,9 @@ toolchain_create_sdk_siteconfig () {
rm -f $siteconfig
touch $siteconfig
-
+ if [ "${LIBC}" = "eglibc" ]; then
+ TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TOOLCHAIN_NEED_CONFIGSITE_CACHE} eglibc"
+ fi
for sitefile in ${TOOLCHAIN_CONFIGSITE_NOCACHE} ; do
cat $sitefile >> $siteconfig
done
@@ -140,5 +142,7 @@ python __anonymous () {
deps = d.getVarFlag('do_configure', 'depends') or ""
for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
deps += " %s:do_populate_sysroot" % dep
+ if d.getVar('TCLIBC', True) is "uclibc":
+ deps += "uclibc:do_populate_sysroot"
d.setVarFlag('do_configure', 'depends', deps)
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] python-native: Fix gcc compiler detecting logic
2011-11-28 1:45 [PATCH 0/3] Fixes for python-native and runqemu with uclibc Khem Raj
2011-11-28 1:46 ` [PATCH 1/3] default-distrovars: Define SDK_VERSION and DISTRO_VERSION Khem Raj
2011-11-28 1:46 ` [PATCH 2/3] toolchain-scripts.bbclass: Make it work when TCLIBC=uclibc Khem Raj
@ 2011-11-28 1:46 ` Khem Raj
2011-11-29 15:49 ` [PATCH 0/3] Fixes for python-native and runqemu with uclibc Saul Wold
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-11-28 1:46 UTC (permalink / raw)
To: openembedded-core
We have a patch unixccompiler.patch where we try to throw away
everything except first element of CC string but this does not
work if gcc is prepended with something e.g. CC="ccache gcc"
then the logic fails and it ends up in some modules failing on
you silently (_sqlite3) in my case.
The fix here is to drop basename so we keep the whole
string as it is and then the detection function searches
for gcc string in the whole CC. This works in both cases
one the original intent of the patch and the second described
above. One place where it will fail is if someone has non-gcc
compiler installed in some subdir which has gcc in it e.g.
/usr/gcc/fakecc but for OE this should never happen. Ideally
the the detection logic should have tried to execute gcc
and then parsed --version output or something.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../python/python-native/unixccompiler.patch | 22 ++++++++++----------
.../recipes-devtools/python/python-native_2.7.2.bb | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-devtools/python/python-native/unixccompiler.patch b/meta/recipes-devtools/python/python-native/unixccompiler.patch
index 10a9baf..4502829 100644
--- a/meta/recipes-devtools/python/python-native/unixccompiler.patch
+++ b/meta/recipes-devtools/python/python-native/unixccompiler.patch
@@ -1,20 +1,20 @@
-Upstream-Status: Inappropriate [embedded specific]
+Upstream-Status: Pending
-# The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information.
-# This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name.
+The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information.
+This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name.
-#Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-diff --git Python-2.6.6/Lib/distutils/unixccompiler.py Python-2.6.6/Lib/distutils/unixccompiler.py
-index 6d0b84d..aaf49cb 100644
---- Python-2.6.6/Lib/distutils/unixccompiler.py
-+++ Python-2.6.6/Lib/distutils/unixccompiler.py
-@@ -282,7 +282,7 @@ class UnixCCompiler(CCompiler):
+Signed-off-by: Mei Lei <lei.mei@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: Python-2.7.2/Lib/distutils/unixccompiler.py
+===================================================================
+--- Python-2.7.2.orig/Lib/distutils/unixccompiler.py 2011-11-24 13:51:10.539998722 -0800
++++ Python-2.7.2/Lib/distutils/unixccompiler.py 2011-11-24 15:54:36.872137766 -0800
+@@ -282,7 +282,7 @@
# this time, there's no way to determine this information from
# the configuration data stored in the Python installation, so
# we use this hack.
- compiler = os.path.basename(sysconfig.get_config_var("CC"))
-+ compiler = os.path.basename(sysconfig.get_config_var("CC").split()[0])
++ compiler = sysconfig.get_config_var("CC")
if sys.platform[:6] == "darwin":
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
diff --git a/meta/recipes-devtools/python/python-native_2.7.2.bb b/meta/recipes-devtools/python/python-native_2.7.2.bb
index 6b90d5b..d036eca 100644
--- a/meta/recipes-devtools/python/python-native_2.7.2.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.2.bb
@@ -1,6 +1,6 @@
require python.inc
DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
SRC_URI += "file://04-default-is-optimized.patch \
file://05-enable-ctypes-cross-build.patch \
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Fixes for python-native and runqemu with uclibc
2011-11-28 1:45 [PATCH 0/3] Fixes for python-native and runqemu with uclibc Khem Raj
` (2 preceding siblings ...)
2011-11-28 1:46 ` [PATCH 3/3] python-native: Fix gcc compiler detecting logic Khem Raj
@ 2011-11-29 15:49 ` Saul Wold
3 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2011-11-29 15:49 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 11/27/2011 05:46 PM, Khem Raj wrote:
> These patches fix a problem with python-native
> and other patches to get runqemu working with uclibc
>
> The following changes since commit a14b41f4de3ea6c3f00ff7a1d0441483e40b28de:
>
> default-distrovars: Define SDK_VERSION and DISTRO_VERSION (2011-11-27 17:32:00 -0800)
>
> are available in the git repository at:
> git://git.openembedded.org/openembedded-core-contrib kraj/misc
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc
>
> Khem Raj (3):
> default-distrovars: Define SDK_VERSION and DISTRO_VERSION
> toolchain-scripts.bbclass: Make it work when TCLIBC=uclibc
> python-native: Fix gcc compiler detecting logic
>
> meta/classes/toolchain-scripts.bbclass | 8 +++++-
> meta/conf/distro/include/default-distrovars.inc | 3 +-
> .../python/python-native/unixccompiler.patch | 22 ++++++++++----------
> .../recipes-devtools/python/python-native_2.7.2.bb | 2 +-
> 4 files changed, 20 insertions(+), 15 deletions(-)
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-29 15:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 1:45 [PATCH 0/3] Fixes for python-native and runqemu with uclibc Khem Raj
2011-11-28 1:46 ` [PATCH 1/3] default-distrovars: Define SDK_VERSION and DISTRO_VERSION Khem Raj
2011-11-28 1:46 ` [PATCH 2/3] toolchain-scripts.bbclass: Make it work when TCLIBC=uclibc Khem Raj
2011-11-28 1:46 ` [PATCH 3/3] python-native: Fix gcc compiler detecting logic Khem Raj
2011-11-29 15:49 ` [PATCH 0/3] Fixes for python-native and runqemu with uclibc Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox