Skip to contentSkip to conversation

Misc fixings of nativesdk

PATCH In review Lianhao Lu 3 participants 12 messages Mar 31, 2012 – Apr 3, 2012

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

cover Misc fixings of nativesdk

This patch serie fixed bunch of things for nativesdk recipes, including:

1. Fixed the issue of reading in incorrect pkgdata files of do_package_write_xxx.
2. Avoided crosssdk tasks generating different task hashs for different MACHINE.
3. Dropped unnecessary target tasks for nativesdk.

The following changes since commit 627998726ca3ee2ed2510c0f666747f688d06c56:
Steffen Sledz (1):
docbook-utils-native: fix syntax problem in jw.in

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib llu/nativesdkfixing
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/nativesdkfixing

Lianhao Lu (5):
nativesdk.bbclass: Set PACKAGE_ARCHS to SDK_PACKAGE_ARCHS. crosssdk.bbclass: Set TUNE_PKGARCH to SDK_PKGARCH. autotools.bbclass: Drop -nativesdk dependency to lib-cross.
eglibc-nativesdk: Set GCC_ADDONS. pkgconfig.bbclass: corrected dependency for -nativesdk.

 meta/classes/autotools.bbclass          |    1 +
 meta/classes/crosssdk.bbclass           |    5 +++++
 meta/classes/nativesdk.bbclass          |    8 +-------
 meta/classes/pkgconfig.bbclass          |    1 +
 meta/recipes-core/eglibc/eglibc_2.13.bb |    3 ++-
 meta/recipes-core/eglibc/eglibc_2.15.bb |    3 ++-
 6 files changed, 12 insertions(+), 9 deletions(-)
author
#1 lore raw

PATCH 1/5 nativesdk.bbclass: Set PACKAGE_ARCHS to SDK_PACKAGE_ARCHS.

This patch fixed the issue of reading incorrect pkgdata files. Previous appending '-nativesdk' suffix to PACKAGE_ARCHS would result the i686-nativesdk recipes reading in x86_64-nativesdk pkgdata files if the MACHINE is set to qemux86-64.

Fixed bug [YOCTO #2203].

---
 meta/classes/nativesdk.bbclass |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
meta/classes/nativesdk.bbclass +1 -7
index 97c460c..9e20834 100644
@@ -13,13 +13,7 @@ LIBCOVERRIDE = ""
 # Update PACKAGE_ARCH and PACKAGE_ARCHS
 #
 PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
-python () {
-    archs = d.getVar('PACKAGE_ARCHS', True).split()
-    sdkarchs = []
-    for arch in archs:
-        sdkarchs.append(arch + '-nativesdk')
-    d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
-}
+PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
 
 STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
 STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
Signature · 1 line
1.7.0.4
author
#2 lore raw

PATCH 2/5 crosssdk.bbclass: Set TUNE_PKGARCH to SDK_PKGARCH.

The TUNE_PKGARCH of crosssdk should be set to SDK_ARCH, not the one from target machine's configuration.

Fixed bug [YOCTO #2206]

---
 meta/classes/crosssdk.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta/classes/crosssdk.bbclass +5 -0
index 83753b4..67df236 100644
@@ -1,6 +1,11 @@
 inherit cross
 
 PACKAGE_ARCH = "${SDK_ARCH}"
+python () {
+	# set TUNE_PKGARCH to SDK_ARCH
+	d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH', True))
+}
+
 STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
 STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
Signature · 1 line
1.7.0.4
author
#3 lore raw

PATCH 3/5 autotools.bbclass: Drop -nativesdk dependency to lib-cross.

In reply to Lianhao Lu

-nativesdk recipes should not have dependency to lib-cross, which is never used. This unnecessary dependency would result different task hash values in sstate for different MACHINE settings.

---
 meta/classes/autotools.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/classes/autotools.bbclass +1 -0
index 66eba9f..941c06d 100644
@@ -12,6 +12,7 @@ def autotools_dep_prepend(d):
 	if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"):
 		deps += 'libtool-native '
 		if not bb.data.inherits_class('native', d) \
+                        and not bb.data.inherits_class('nativesdk', d) \
                         and not bb.data.inherits_class('cross', d) \
                         and not d.getVar('INHIBIT_DEFAULT_DEPS', True):
                     deps += 'libtool-cross '
Signature · 1 line
1.7.0.4
author
#4 lore raw

PATCH 4/5 eglibc-nativesdk: Set GCC_ADDONS.

In reply to Lianhao Lu

Set only necessary GCC_ADDONS for eglibc-nativesdk so that it is not dependant on the target eglibc's GCC_ADDONS settings.

---
 meta/recipes-core/eglibc/eglibc_2.13.bb |    3 ++-
 meta/recipes-core/eglibc/eglibc_2.15.bb |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-core/eglibc/eglibc_2.13.bb +2 -1
index e02c80f..e480772 100644
@@ -3,7 +3,7 @@ require eglibc.inc
 SRCREV = "15508"
 
 DEPENDS += "gperf-native"
-PR = "r22"
+PR = "r23"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"
@@ -37,6 +37,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
 
 GLIBC_ADDONS ?= "ports,nptl,libidn"
+GLIBC_ADDONS_virtclass-nativesdk = "nptl"
 
 GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
 
meta/recipes-core/eglibc/eglibc_2.15.bb +2 -1
index 75ccace..4e7fe1e 100644
@@ -3,7 +3,7 @@ require eglibc.inc
 SRCREV = "17386"
 
 DEPENDS += "gperf-native"
-PR = "r2"
+PR = "r3"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_15"
@@ -42,6 +42,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
 
 GLIBC_ADDONS ?= "ports,nptl,libidn"
+GLIBC_ADDONS_virtclass-nativesdk = "nptl"
 
 GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
 
Signature · 1 line
1.7.0.4
#5 lore raw

Re: [PATCH 4/5] eglibc-nativesdk: Set GCC_ADDONS.

Quoted 2 lines · Lianhao Lu

Set only necessary GCC_ADDONS for eglibc-nativesdk so that it is not dependant on the target eglibc's GCC_ADDONS settings.

You mean GLIBC_ADDONS, right? :)

Quoted 5 lines
---
 meta/recipes-core/eglibc/eglibc_2.13.bb |    3 ++-
 meta/recipes-core/eglibc/eglibc_2.15.bb |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

This is a tricky problem as this is only correct for SDKMACHINEs which are IA based (which the only tested combinations are atm).

Ideally this would go in conf/machine-sdk/* as SDK_GLIBC_ADDONS and then in eglibc.inc we'd do:

GLIBC_ADDONS ?= "ports,nptl,libidn" SDK_GLIBC_ADDONS ?= "${GLIBC_ADDONS}" GLIBC_ADDONS_virtclass-nativesdk = "${SDK_GLIBC_ADDONS}"

which I appreciate is more complex but I think its more correct in case someone wants to try a different SDKMACHINE.

Cheers,

Richard

#6 lore raw

Re: [PATCH 4/5] eglibc-nativesdk: Set GCC_ADDONS.

In reply to Lianhao Lu
Quoted 3 lines · Lianhao Lu

 GLIBC_ADDONS ?= "ports,nptl,libidn"
+GLIBC_ADDONS_virtclass-nativesdk = "nptl"

nptl is bogus now a days. so please delete it completely.

#7 lore raw

Re: [PATCH 4/5] eglibc-nativesdk: Set GCC_ADDONS.

Quoted 1 line · Khem Raj

nptl is bogus now a days. so please delete it completely.

heh I must have said in GLIBC_ADDON context its bogus. Since its _the_ only thread implementation in eglibc/glibc

#8 lore raw

Re: [PATCH 4/5] eglibc-nativesdk: Set GCC_ADDONS.

I've recreated the patches per Richard's comment. However, removing nptl from the add-on settings resulted an eglibc configure error saying that it is an required add-on.

-Lianhao

Khem Raj wrote on 2012-03-31:

Quoted 9 lines · Khem Raj
Quoted 1 line

nptl is bogus now a days. so please delete it completely.

heh I must have said in GLIBC_ADDON context its bogus. Since its _the_ only thread implementation in eglibc/glibc

_______________________________________________ Openembedded-core mailing list [email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#9 lore raw

Re: [PATCH 4/5] eglibc-nativesdk: Set GCC_ADDONS.

Quoted 1 line · Lianhao

I've recreated the patches per Richard's comment. However, removing nptl from the add-on settings resulted an eglibc configure error saying that it is an required add-on.

hmm interesting. I will see whats going on there.

author
#10 lore raw

PATCH 5/5 pkgconfig.bbclass: corrected dependency for -nativesdk.

In reply to Lianhao Lu

For -nativesdk, the dependency should be pkgconfig-nativesdk instead of pkgconfig.

---
 meta/classes/pkgconfig.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/classes/pkgconfig.bbclass +1 -0
index 53e793a..ddcf878 100644
@@ -2,5 +2,6 @@ DEPENDS_prepend = "pkgconfig-native "
 
 PKGCONFIGRDEP = "pkgconfig"
 PKGCONFIGRDEP_virtclass-native = ""
+PKGCONFIGRDEP_virtclass-nativesdk = "pkgconfig-nativesdk"
 
 RDEPENDS_${PN}-dev += "${PKGCONFIGRDEP}"
Signature · 1 line
1.7.0.4
#11 lore raw
In reply to Lianhao Lu
Quoted 15 lines · Lianhao Lu

This patch serie fixed bunch of things for nativesdk recipes, including:

1. Fixed the issue of reading in incorrect pkgdata files of do_package_write_xxx.
2. Avoided crosssdk tasks generating different task hashs for different MACHINE.
3. Dropped unnecessary target tasks for nativesdk.

The following changes since commit 627998726ca3ee2ed2510c0f666747f688d06c56:
Steffen Sledz (1):
docbook-utils-native: fix syntax problem in jw.in

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib llu/nativesdkfixing
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/nativesdkfixing

Quoted 6 lines

Lianhao Lu (5):
nativesdk.bbclass: Set PACKAGE_ARCHS to SDK_PACKAGE_ARCHS. crosssdk.bbclass: Set TUNE_PKGARCH to SDK_PKGARCH. autotools.bbclass: Drop -nativesdk dependency to lib-cross.
eglibc-nativesdk: Set GCC_ADDONS. pkgconfig.bbclass: corrected dependency for -nativesdk.

I merged these apart from the eglibc patch which needs some small tweaks before it goes in.

Cheers,

Richard