Misc fixes around SDK and package management
PATCH 1/4 classes/package_rpm.bbclass: Fix SDK Suffix reference
In reply to Mark HatleThe meta-mingw layer attempts to change the SDK Suffix, but the rpm packaging had a hard coded reference to _nativesdk.
I did a quick scan for other hard coded entries and did not fine any more.
--- meta/classes/package_rpm.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/package_rpm.bbclass +2 -1
@@ -654,7 +654,8 @@ python do_package_rpm () { targetsys = d.getVar('TARGET_SYS', True) targetvendor = d.getVar('TARGET_VENDOR', True) package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") - if package_arch not in "all any noarch".split() and not package_arch.endswith("_nativesdk"): + sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX', True) or "nativesdk").replace("-", "_") + if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix): ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch) else:
Signature · 1 line
1.9.3
PATCH 2/4 populate_sdk: Fix TOOLCHAIN_TARGET_TASK_ATTEMPTONLY implementation
In reply to Mark HatleThe variable was only partially implemented, and the part that was there was named incorrectly to, missing the 'TASK' piece.
--- meta/classes/populate_sdk_base.bbclass | 1 + meta/lib/oe/manifest.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +1 -0
@@ -55,6 +55,7 @@ fakeroot python do_populate_sdk() { pn = d.getVar('PN', True) runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d) + runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d) # create target/host SDK manifests create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True),
meta/lib/oe/manifest.py +1 -1
@@ -31,7 +31,7 @@ class Manifest(object): }, MANIFEST_TYPE_SDK_TARGET: { "TOOLCHAIN_TARGET_TASK": PKG_TYPE_MUST_INSTALL, - "TOOLCHAIN_TARGET_ATTEMPTONLY": PKG_TYPE_ATTEMPT_ONLY + "TOOLCHAIN_TARGET_TASK_ATTEMPTONLY": PKG_TYPE_ATTEMPT_ONLY } }
Signature · 1 line
1.9.3
PATCH 3/4 gcc-cross-canadian: Add configure-target-libgcc
In reply to Mark HatleWhile we're not going to package the libgcc component as part of the SDK, we do need to generate it to get the unwind, and quadmath headers. Without this change it is not possible to build eglibc or other components that require these headers with the SDK toolchain.
--- meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-cross-canadian.inc +10 -3
@@ -58,7 +58,7 @@ do_configure () { } do_compile () { - oe_runmake all-host + oe_runmake all-host configure-target-libgcc } INHIBIT_PACKAGE_STRIP = "1"
@@ -97,6 +97,7 @@ EXEEXT = "" BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" do_install () { + ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h ) oe_runmake 'DESTDIR=${D}' install-host # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
@@ -137,6 +138,11 @@ do_install () { ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix done + # libquadmath headers need to be available in the gcc libexec dir + install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ + cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ + cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ + chown -R root:root ${D} cross_canadian_bindirlinks
@@ -150,8 +156,9 @@ SYSTEMHEADERS = "/usr/include" SYSTEMLIBS = "${target_base_libdir}/" SYSTEMLIBS1 = "${target_libdir}/" -EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ - --disable-libgomp --disable-libmudflap \ +EXTRA_OECONF += " --enable-poison-system-directories" + +EXTRA_OECONF += "--disable-libunwind-exceptions \ --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \ --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
Signature · 1 line
1.9.3
PATCH 4/4 lib/oe/package_manager.py: Add processing for alternative SDK_OS
In reply to Mark HatleFor the meta-mingw layer, we need to process alternative SDK_OS, since this is not a Linux based OS.
--- meta/lib/oe/package_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oe/package_manager.py +5 -1
@@ -739,11 +739,15 @@ class RpmPM(PackageManager): channel_priority = 5 platform_dir = os.path.join(self.etcrpm_dir, "platform") + sdkos = self.d.getVar("SDK_OS", True) with open(platform_dir, "w+") as platform_fd: platform_fd.write(platform + '\n') for pt in platform_extra: channel_priority += 5 - platform_fd.write(re.sub("-linux.*$", "-linux.*\n", pt)) + if sdkos: + tmp = re.sub("-%s$" % sdkos, "-%s\n" % sdkos, pt) + tmp = re.sub("-linux.*$", "-linux.*\n", tmp) + platform_fd.write(tmp) # Tell RPM that the "/" directory exist and is available bb.note("configuring RPM system provides")
Signature · 1 line
1.9.3
cover Misc fixes around SDK and package management
While working with meta-mingw and some related toolchain SDKs, I found a number of minor issues. These 4 fixes correct the issues observed.
Note RPM is not capable of installing meta-mingw into an SDK. You must still use IPK for that. I'll continue to work on a fix for that.
The following changes since commit 41bd9dbf6f3e0add6a9e2cb20cfcbff44d785ea4:
syslinux: fix isohybird overflows on 32 bit system (2014-06-24 19:53:02 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mhatle/oe-core
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mhatle/oe-core
Mark Hatle (4):
classes/package_rpm.bbclass: Fix SDK Suffix reference
populate_sdk: Fix TOOLCHAIN_TARGET_TASK_ATTEMPTONLY implementation
gcc-cross-canadian: Add configure-target-libgcc lib/oe/package_manager.py: Add processing for alternative SDK_OS
meta/classes/package_rpm.bbclass | 3 ++- meta/classes/populate_sdk_base.bbclass | 1 + meta/lib/oe/manifest.py | 2 +- meta/lib/oe/package_manager.py | 6 +++++- meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 13 ++++++++++--- 5 files changed, 19 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.3