external csl toolchain improvements (v2)
cover external csl toolchain improvements (v2)
This cleans up the recipe and simplifies it, fixes up locale handling, silences QA packaging warnings, and includes toolchain version in the metadata checksums for target recipes. Obviously this is intended for after the final release.
The following changes since commit 4e1a8ed1ab7e7bd950e511c79ddfe072cb280a6e:
bitbake.conf: Include abi_version.conf in a early stage (2012-04-16 12:51:50 +0100)
are available in the git repository at:
git://github.com/kergoth/oe-core external-csl-improvements
Christopher Larson (6):
external-csl-toolchain: split out a libstdc++-staticdev package
libc-package: fix handling for 'precompiled' locales csl-versions.inc: capture version in signatures
tcmode-external-csl: use the existing precompiled locale files
external-csl-toolchain: silence .a/.debug QA warnings
external-csl-toolchain: cleanup, simplify, use base_libdir
meta/classes/libc-package.bbclass | 12 ++-- meta/conf/distro/include/csl-versions.inc | 4 + meta/conf/distro/include/tcmode-external-csl.inc | 4 + meta/recipes-core/meta/external-csl-toolchain.bb | 68 +++++++++++----------- 4 files changed, 48 insertions(+), 40 deletions(-)
Signature · 1 line
1.7.7
PATCH 1/6 external-csl-toolchain: split out a libstdc++-staticdev package
This silences one of the QA warnings.
--- meta/recipes-core/meta/external-csl-toolchain.bb | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-core/meta/external-csl-toolchain.bb +4 -4
@@ -88,7 +88,7 @@ external_toolchain_sysroot_adjust() { fi } -PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg" +PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg" INSANE_SKIP_libgcc = "1" INSANE_SKIP_libstdc++ = "1"
@@ -111,6 +111,7 @@ PKGV_libgcc = "${CSL_VER_GCC}" PKGV_libgcc-dev = "${CSL_VER_GCC}" PKGV_libstdc++ = "${CSL_VER_GCC}" PKGV_libstdc++-dev = "${CSL_VER_GCC}" +PKGV_libstdc++-staticdev = "${CSL_VER_GCC}" PKGV_linux-libc-headers = "${CSL_VER_KERNEL}" PKGV_linux-libc-headers-dev = "${CSL_VER_KERNEL}" PKGV_gdbserver = "${CSL_VER_GDB}"
@@ -122,9 +123,8 @@ FILES_libstdc++ = "${libdir}/libstdc++.so.*" FILES_libstdc++-dev = "${includedir}/c++/${PV} \ ${libdir}/libstdc++.so \ ${libdir}/libstdc++.la \ - ${libdir}/libstdc++.a \ - ${libdir}/libsupc++.la \ - ${libdir}/libsupc++.a" + ${libdir}/libsupc++.la" +FILES_libstdc++-staticdev = "${libdir}/libstdc++.a ${libdir}/libsupc++.a" FILES_linux-libc-headers = "${includedir}/asm* \ ${includedir}/linux \ ${includedir}/mtd \
Signature · 1 line
1.7.7
PATCH 2/6 libc-package: fix handling for 'precompiled' locales
In reply to Christopher LarsonDue to how the 'supported' locales were being generated (added ' ' twice for locales with '.' in them), one could end up with the locale-base packages in your PACKAGES twice, causing packaging problems with eglibc-locale.
--- meta/classes/libc-package.bbclass | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
meta/classes/libc-package.bbclass +7 -5
@@ -221,11 +221,13 @@ python package_do_split_gconvs () { supported = [] full_bin_path = d.getVar('PKGD', True) + binary_locales_dir for dir in os.listdir(full_bin_path): - dbase = dir.split(".") - d2 = " " - if len(dbase) > 1: - d2 = "." + dbase[1].upper() + " " - supported.append(dbase[0] + d2) + elements = dir.split('.', 1) + locale = elements[0] + if len(elements) > 1: + charset = elements[1] + else: + charset = '' + supported.append('%s %s\n' % (locale, charset)) # Collate the locales by base and encoding utf8_only = int(d.getVar('LOCALE_UTF8_ONLY', True) or 0)
Signature · 1 line
1.7.7
PATCH 3/6 csl-versions.inc: capture version in signatures
In reply to Christopher LarsonWe want to ensure that changing external toolchain version will change the metadata checksums of target recipes. This will do so via ensuring that any variable which references TOOLCHAIN_OPTIONS also pulls in the toolchain version variables.
--- meta/conf/distro/include/csl-versions.inc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
meta/conf/distro/include/csl-versions.inc +4 -0
@@ -103,3 +103,7 @@ python csl_version_handler () { d.setVar('CSL_VER_GDB', csl_get_gdb_version(ld)) } addhandler csl_version_handler + +# Ensure that any variable which includes the --sysroot (CC, CXX, etc) also +# depends on the toolchain version +TOOLCHAIN_OPTIONS[vardeps] += "CSL_VER_MAIN CSL_VER_GCC"
Signature · 1 line
1.7.7
PATCH 4/6 tcmode-external-csl: use the existing precompiled locale files
In reply to Christopher Larson--- meta/conf/distro/include/tcmode-external-csl.inc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
meta/conf/distro/include/tcmode-external-csl.inc +4 -0
@@ -35,6 +35,10 @@ PREFERRED_PROVIDER_virtual/libiconv = "external-csl-toolchain" PREFERRED_PROVIDER_glibc-thread-db = "external-csl-toolchain" PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-csl-toolchain" +# No need to re-compile the locale files +GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled" +ENABLE_BINARY_LOCALE_GENERATION = "" + TARGET_CPPFLAGS_prepend = " -isystem${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/include " TARGET_LDFLAGS_prepend = " -L${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/lib -Wl,-rpath-link,${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/lib "
Signature · 1 line
1.7.7
PATCH 5/6 external-csl-toolchain: silence .a/.debug QA warnings
In reply to Christopher Larson--- meta/recipes-core/meta/external-csl-toolchain.bb | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
meta/recipes-core/meta/external-csl-toolchain.bb +2 -3
@@ -90,9 +90,8 @@ external_toolchain_sysroot_adjust() { PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg" -INSANE_SKIP_libgcc = "1" -INSANE_SKIP_libstdc++ = "1" -INSANE_SKIP_gdbserver = "1" +# This test should be fixed to ignore .a files in .debug dirs +INSANE_SKIP_${PN}-dbg = "staticdev" PKG_${PN} = "eglibc" PKG_${PN}-dev = "eglibc-dev"
Signature · 1 line
1.7.7
PATCH 6/6 external-csl-toolchain: cleanup, simplify, use base_libdir
In reply to Christopher Larson--- meta/recipes-core/meta/external-csl-toolchain.bb | 55 +++++++++++----------- 1 files changed, 27 insertions(+), 28 deletions(-)
meta/recipes-core/meta/external-csl-toolchain.bb +27 -28
@@ -24,36 +24,40 @@ PROVIDES += "\ virtual/linux-libc-headers \ " PV = "${CSL_VER_MAIN}" -PR = "r3" +PR = "r5" #SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2" SRC_URI = "file://SUPPORTED" do_install() { - install -d ${D}${sysconfdir} ${D}${bindir} ${D}${sbindir} ${D}${base_bindir} ${D}${libdir} - install -d ${D}${base_libdir} ${D}${base_sbindir} ${D}${datadir} ${D}/usr + # Use optimized files if available + sysroot="${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc" + if [ -d $sysroot/${CSL_TARGET_CORE} ]; then + sysroot="$sysroot/${CSL_TARGET_CORE}" + fi + + cp -a $sysroot${base_libdir}/. ${D}${base_libdir} + cp -a $sysroot/etc/. ${D}${sysconfdir} + cp -a $sysroot/sbin/. ${D}${base_sbindir} - if [ -d ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE} ]; then - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/lib/. ${D}${base_libdir} - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/etc/. ${D}${sysconfdir} - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/sbin/. ${D}${base_sbindir} - if [ ! -e ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/usr/include ]; then - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/usr/include ${D}/usr/ + install -d ${D}/usr + for usr_element in bin include libexec sbin share ${base_libdir}; do + usr_path=$sysroot/usr/$usr_element + cp -a $usr_path ${D}/usr/ + done + for datadir_element in man info; do + datadir_path=$sysroot/usr/$datadir_element + if [ -e $datadir_path ]; then + cp -a $datadir_path ${D}${datadir}/ fi - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/usr/. ${D}/usr/ - else - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/lib/. ${D}${base_libdir} - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/etc/. ${D}${sysconfdir} - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/sbin/. ${D}${base_sbindir} - cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/usr/. ${D}/usr/ - fi + done - if [ -e ${D}${prefix}/info ]; then - mv ${D}${prefix}/info ${D}${infodir} - fi - if [ -e ${D}${prefix}/man ]; then - mv ${D}${prefix}/man ${D}${mandir} + # Some toolchains have headers under the core specific area + if [ -e $sysroot/usr/include ]; then + cp -a $sysroot/usr/include/. ${D}${includedir} + else + cp -a $sysroot/../usr/include/. ${D}${includedir} fi rm ${D}${sysconfdir}/rpc
@@ -61,18 +65,13 @@ do_install() { mv ${D}${libdir}/bin/* ${D}${bindir}/ if [ -e ${D}${libdir}/bin/.debug ]; then - install -d ${D}${bindir}/.debug mv ${D}${libdir}/bin/.debug/* ${D}${bindir}/.debug/ fi ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h - sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so - sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libpthread.so -} - -do_install_locale_append () { - rm -r ${D}${datadir}/locale ${D}${libdir}/locale + sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libc.so + sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libpthread.so } SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust"
Signature · 1 line
1.7.7
Quoted 8 lines · Christopher Larson
This cleans up the recipe and simplifies it, fixes up locale handling, silences QA packaging warnings, and includes toolchain version in the metadata checksums for target recipes. Obviously this is intended for after the final release.
The following changes since commit
4e1a8ed1ab7e7bd950e511c79ddfe072cb280a6e:bitbake.conf: Include abi_version.conf in a early stage (2012-04-16 12:51:50 +0100)
Bah, ignore this series too, need to fix one of the patches. *rolls eyes*
Signature · 1 line
Christopher Larson