From 5afc50391f98e0719be9088763c48b3b9074c401 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 29 Nov 2016 14:42:12 -0700 Subject: [PATCH 01/14] tcmode: fix x32 LDEMULATION Signed-off-by: Christopher Larson --- conf/distro/include/tcmode-external-sourcery.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 4738e36..0eeed75 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -134,6 +134,7 @@ LDEMULATION_ENDIAN = "${@'bt' if 'bigendian' in '${TUNE_FEATURES}'.split() else LDEMULATION_BITS = "${@'64' if 'n64' in '${TUNE_FEATURES}'.split() else '32'}" LDEMULATION_mips64 = "elf${LDEMULATION_BITS}${LDEMULATION_ENDIAN}smip${@bb.utils.contains('TUNE_FEATURES', 'n32', 'n32', '', d)}" LDEMULATION_x86-64 = "elf_${TARGET_ARCH}" +LDEMULATION_x86-64_linux-gnux32 = "elf32_${TARGET_ARCH}" TUNE_LDARGS += "${@'-m ${LDEMULATION}' if '${LDEMULATION}' else ''}" # Ensure that the licensing variables are available to the toolchain. From 6a9eaae40bdd5620b32ce7f4496b8e9df2e8294a Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 29 Nov 2016 14:44:50 -0700 Subject: [PATCH 02/14] tcmode: fix x32 BASELIB Signed-off-by: Christopher Larson --- conf/distro/include/tcmode-external-sourcery.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 0eeed75..95515f4 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -17,6 +17,7 @@ NO32LIBS ?= "${HAS_64BIT_TOOLCHAIN}" # Align paths with the external toolchain BASELIB_aarch64 = "lib64" BASELIB_x86-64 = "lib64" +BASELIB_x86-64_linux-gnux32 = "libx32" # Ensure that we only attempt to package up locales which are available in the # external toolchain. In the future, we should examine the external toolchain From 13658a6c4d352e20a665bf3b96813f60a0c92679 Mon Sep 17 00:00:00 2001 From: Fahad Arslan Date: Wed, 30 Nov 2016 17:50:08 +0500 Subject: [PATCH 03/14] perl-ptest: remove runtime dep on libssp libssp support is only available in toolchain for minnowmax so remove it until there is a requirement. Jira ID: SB-8337 Signed-off-by: Fahad Arslan --- recipes-devtools/perl/perl_%.bbappend | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes-devtools/perl/perl_%.bbappend diff --git a/recipes-devtools/perl/perl_%.bbappend b/recipes-devtools/perl/perl_%.bbappend new file mode 100644 index 0000000..c287928 --- /dev/null +++ b/recipes-devtools/perl/perl_%.bbappend @@ -0,0 +1 @@ +RDEPENDS_${PN}-ptest_remove = "${@bb.utils.contains("MACHINE_FEATURES", "x86", "", "libssp", d)}" From b9ddc4944219519edd69096200ab64734ef32f0b Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 6 Dec 2016 20:02:53 -0700 Subject: [PATCH 04/14] gdbserver-external: drop bits that belong with gdb, not gdbserver This fixes a gdb/gdbserver-external file conflict. Signed-off-by: Christopher Larson --- recipes-external/gdb/gdbserver-external.bb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/recipes-external/gdb/gdbserver-external.bb b/recipes-external/gdb/gdbserver-external.bb index a0aace5..8b191f5 100644 --- a/recipes-external/gdb/gdbserver-external.bb +++ b/recipes-external/gdb/gdbserver-external.bb @@ -18,15 +18,7 @@ def get_gdb_license(d): LICENSE := "${@get_gdb_license(d)}" LICENSE[vardepvalue] = "${LICENSE}" -FILES_${PN} = "\ - ${bindir}/gdbserver \ - ${datadir}/gdb/guile \ - ${datadir}/gdb/python/gdb \ - ${datadir}/gdb/syscalls \ - ${datadir}/gdb/system-gdbinit \ - ${libdir}/libinproctrace.so \ -" -INSANE_SKIP_${PN} += "dev-so" +FILES_${PN} = "${bindir}/gdbserver" FILES_${PN}-doc = "${mandir}/man1/gdbserver.1" # Ensure that our rdeps are able to be set by shlibs processing From a098af1ea555fe4290fa9bd10f7b33a0acc0c0cf Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 6 Dec 2016 20:03:20 -0700 Subject: [PATCH 05/14] gdbserver-external: update SUMMARY for gdbserver, not gdb Signed-off-by: Christopher Larson --- recipes-external/gdb/gdbserver-external.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-external/gdb/gdbserver-external.bb b/recipes-external/gdb/gdbserver-external.bb index 8b191f5..1f7702a 100644 --- a/recipes-external/gdb/gdbserver-external.bb +++ b/recipes-external/gdb/gdbserver-external.bb @@ -1,4 +1,4 @@ -SUMMARY = "gdb - GNU debugger" +SUMMARY = "gdbserver is a program that allows you to run GDB on a different machine than the one which is running the program being debugged" HOMEPAGE = "http://www.gnu.org/software/gdb/" SECTION = "devel" PV := "${@oe.external.run(d, 'gdb', '-v').splitlines()[0].split()[-1]}" From 87616f2b2039d21aa178c89f8b7cdd71525f60ba Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 6 Dec 2016 20:03:31 -0700 Subject: [PATCH 06/14] tcmode: change gdbserver default to gdbserver-external Using the one already available with our toolchain makes a great deal of sense, as it's a known quantity. The only reason we switched to gdb was due to conflicts between gdb and gdbserver-external, but that issue has been resolved. Signed-off-by: Christopher Larson --- conf/distro/include/tcmode-external-sourcery.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 4738e36..0ee6996 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -45,7 +45,7 @@ PREFERRED_PROVIDER_virtual/libc ?= "glibc-external" PREFERRED_PROVIDER_virtual/libintl ?= "glibc-external" PREFERRED_PROVIDER_virtual/libiconv ?= "glibc-external" -PREFERRED_PROVIDER_gdbserver ??= "gdb" +PREFERRED_PROVIDER_gdbserver ??= "gdbserver-external" PREFERRED_PROVIDER_oprofile ??= "oprofile" # These are defined in default-providers.inc, which is parsed before the From 3ebfc4903024f63a1626ddc3d3af782a914309e8 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Thu, 15 Dec 2016 21:49:12 -0700 Subject: [PATCH 07/14] buildtools-tarball: ignore TOOLCHAIN_TARGET_TASK_append buildtools-tarball is host only, and does not add TOOLCHAIN_TARGET_TASK to RDEPENDS. Forcibly empty it, otherwise a TOOLCHAIN_TARGET_TASK_append at the config level will break the buildtools-tarball build JIRA: SB-8391 Signed-off-by: Christopher Larson --- core/recipes-core/meta/buildtools-tarball.bbappend | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 core/recipes-core/meta/buildtools-tarball.bbappend diff --git a/core/recipes-core/meta/buildtools-tarball.bbappend b/core/recipes-core/meta/buildtools-tarball.bbappend new file mode 100644 index 0000000..be543d3 --- /dev/null +++ b/core/recipes-core/meta/buildtools-tarball.bbappend @@ -0,0 +1,6 @@ +# buildtools-tarball is host only, and does not add TOOLCHAIN_TARGET_TASK to +# RDEPENDS. Forcibly empty it, otherwise a TOOLCHAIN_TARGET_TASK_append at the +# config level will break the buildtools-tarball build +python () { + d.setVar('TOOLCHAIN_TARGET_TASK', '') +} From b034153aacc00444d6534bbf7d7d9dc0792888e9 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Thu, 15 Dec 2016 21:51:08 -0700 Subject: [PATCH 08/14] Don't alter GLIBC_GENERATE_LOCALES for nativesdk We only want this to take effect for the locales for the external toolchain, not those generated and used for nativesdk, otherwise we break the buildtools-tarball build. JIRA: SB-8391 Signed-off-by: Christopher Larson --- conf/distro/include/tcmode-external-sourcery.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 0ee6996..d79487a 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -21,7 +21,7 @@ BASELIB_x86-64 = "lib64" # Ensure that we only attempt to package up locales which are available in the # external toolchain. In the future, we should examine the external toolchain # sysroot and determine this accurately. -GLIBC_GENERATE_LOCALES_remove = "en_US.UTF-8" +GLIBC_GENERATE_LOCALES_remove_pn-glibc-locale = "en_US.UTF-8" # Align localedir with the corresponding path in external toolchain localedir = "${exec_prefix}/lib/locale" From f71a62353f5a42a92da1493026f49483f7344709 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Mon, 19 Dec 2016 09:00:24 -0700 Subject: [PATCH 09/14] glibc-external: fix libm* fixup We don't want the 'libm*.so.*' kept in our FILES, as it's too greedy, and results in picking up the wrong things. Signed-off-by: Christopher Larson --- recipes-external/glibc/glibc-external.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-external/glibc/glibc-external.bb b/recipes-external/glibc/glibc-external.bb index 6b51310..1dea375 100644 --- a/recipes-external/glibc/glibc-external.bb +++ b/recipes-external/glibc/glibc-external.bb @@ -152,7 +152,7 @@ python () { # Ensure that we pick up just libm, not all libs that start with m baselibs = d.getVar('libc_baselibs', False) - baselibs.replace('${base_libdir}/libm*.so.*', '${base_libdir}/libm.so.*') + baselibs = baselibs.replace('${base_libdir}/libm*.so.*', '${base_libdir}/libm.so.*') d.setVar('libc_baselibs', baselibs) } From 75590b4dcd6a573e7f13f2a3ba90a8ba064c8528 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Mon, 19 Dec 2016 09:16:34 -0700 Subject: [PATCH 10/14] glibc-external: also remove ${base_libdir}/*_nonshared.a This overly greedy pattern was picking up, via the FILES_MIRRORS, the nonshared paths in ${libdir}. Signed-off-by: Christopher Larson --- recipes-external/glibc/glibc-external.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-external/glibc/glibc-external.bb b/recipes-external/glibc/glibc-external.bb index 1dea375..919a2da 100644 --- a/recipes-external/glibc/glibc-external.bb +++ b/recipes-external/glibc/glibc-external.bb @@ -217,5 +217,5 @@ do_package_write_ipk[depends] += "${MLPREFIX}libgcc:do_packagedata" do_package_write_deb[depends] += "${MLPREFIX}libgcc:do_packagedata" do_package_write_rpm[depends] += "${MLPREFIX}libgcc:do_packagedata" -FILES_${PN}-dev_remove = "${libdir}/*_nonshared.a" +FILES_${PN}-dev_remove = "${base_libdir}/*_nonshared.a ${libdir}/*_nonshared.a" FILES_${PN}-dev += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a" From 46c4867c32ed250843a2765308a1ee4683b064c8 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Mon, 19 Dec 2016 09:16:03 -0700 Subject: [PATCH 11/14] glibc-external: keep libmvec We drop the overly greedy patterns for libm* and *_nonshared and explicitly add back the bits we know we own, but libmvec was missing from this. Signed-off-by: Christopher Larson --- recipes-external/glibc/glibc-external.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-external/glibc/glibc-external.bb b/recipes-external/glibc/glibc-external.bb index 919a2da..770f4bd 100644 --- a/recipes-external/glibc/glibc-external.bb +++ b/recipes-external/glibc/glibc-external.bb @@ -152,7 +152,7 @@ python () { # Ensure that we pick up just libm, not all libs that start with m baselibs = d.getVar('libc_baselibs', False) - baselibs = baselibs.replace('${base_libdir}/libm*.so.*', '${base_libdir}/libm.so.*') + baselibs = baselibs.replace('${base_libdir}/libm*.so.*', '${base_libdir}/libm.so.* ${base_libdir}/libmvec.so.*') d.setVar('libc_baselibs', baselibs) } @@ -218,4 +218,4 @@ do_package_write_deb[depends] += "${MLPREFIX}libgcc:do_packagedata" do_package_write_rpm[depends] += "${MLPREFIX}libgcc:do_packagedata" FILES_${PN}-dev_remove = "${base_libdir}/*_nonshared.a ${libdir}/*_nonshared.a" -FILES_${PN}-dev += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a" +FILES_${PN}-dev += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a ${libdir}/libmvec_nonshared.a" From c7ec5c09d10c0eb7e3ce2bea5e219ecd44011281 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Mon, 19 Dec 2016 12:52:17 -0700 Subject: [PATCH 12/14] gcc-runtime-external: fix inclusion of {omp,openacc}.h Signed-off-by: Christopher Larson --- recipes-external/gcc/gcc-runtime-external.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes-external/gcc/gcc-runtime-external.bb b/recipes-external/gcc/gcc-runtime-external.bb index eba354c..72aef4c 100644 --- a/recipes-external/gcc/gcc-runtime-external.bb +++ b/recipes-external/gcc/gcc-runtime-external.bb @@ -19,7 +19,9 @@ target_libdir = "${libdir}" HEADERS_MULTILIB_SUFFIX ?= "${@oe.external.run(d, 'gcc', *('${TARGET_CC_ARCH}'.split() + ['-print-sysroot-headers-suffix'])).rstrip()}" external_libroot = "${@os.path.realpath('${EXTERNAL_TOOLCHAIN_LIBROOT}').replace(os.path.realpath('${EXTERNAL_TOOLCHAIN}') + '/', '/')}" FILES_MIRRORS =. "\ - ${libdir}/gcc/${TARGET_SYS}/${GCC_VERSION}/|${external_libroot}/\n \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/|${external_libroot}/\n \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/|/lib/gcc/${EXTERNAL_TARGET_SYS}/${BINV}/include/ \n \ + ${libdir}/gcc/${TARGET_SYS}/|${libdir}/gcc/${EXTERNAL_TARGET_SYS}/\n \ ${includedir}/c\+\+/${GCC_VERSION}/${TARGET_SYS}/|${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}${HEADERS_MULTILIB_SUFFIX}/\n \ ${includedir}/c\+\+/${GCC_VERSION}/${TARGET_SYS}/|${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}/\n \ " @@ -49,6 +51,9 @@ FILES_libstdc++-dev = "\ ${libdir}/libstdc++.la \ ${libdir}/libsupc++.la \ " +FILES_libgomp-dev += "\ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \ +" BBCLASSEXTEND = "" do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata" From b590b6918f63532019873bb42b2364efc2046c0d Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 3 Jan 2017 14:44:12 -0700 Subject: [PATCH 13/14] external-toolchain: also inhibit debug split The external toolchain currently has a different naming scheme than any of oe-core's currently hardcoded schemes, so failed to recognize the files as debug, and would add debuglinks to the debug files, which is obviously wrong. Signed-off-by: Christopher Larson --- classes/external-toolchain.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/external-toolchain.bbclass b/classes/external-toolchain.bbclass index 2453ca8..fb5842a 100644 --- a/classes/external-toolchain.bbclass +++ b/classes/external-toolchain.bbclass @@ -117,6 +117,7 @@ python () { # Debug files are likely already split out INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" # Toolchain shipped binaries weren't necessarily built ideally WARN_QA_remove = "ldflags textrel" From a96f3c86c03deb09d87dd69ba24c0f29b7cd488d Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Tue, 3 Jan 2017 14:45:04 -0700 Subject: [PATCH 14/14] Revert "Drop now-unnecessary -dbg bits" This reverts commit 91b303278497e23fb4644aabb0b70e541f71c7c0. We need these explicitly listed in order to ensure we don't just package the files, but extract them from the sysroot. The best approach would be to identify elf binaries the way package.bbclass does, and extract the debuglink path to determine the files to include, but that can be a future enhancement. JIRA: SB-8524 Signed-off-by: Christopher Larson --- classes/external-toolchain.bbclass | 23 ++++++++++++++++++++ recipes-external/gcc/gcc-runtime-external.bb | 1 + recipes-external/gcc/libgcc-external.bb | 1 + 3 files changed, 25 insertions(+) diff --git a/classes/external-toolchain.bbclass b/classes/external-toolchain.bbclass index fb5842a..9eb64f3 100644 --- a/classes/external-toolchain.bbclass +++ b/classes/external-toolchain.bbclass @@ -137,6 +137,29 @@ FILES_${PN}-staticdev = "" FILES_${PN}-doc = "" FILES_${PN}-locale = "" +def debug_paths(d): + l = d.createCopy() + l.finalize() + paths = [] + exclude = [ + l.getVar('datadir', True), + l.getVar('includedir', True), + ] + for p in l.getVar('PACKAGES', True).split(): + if p.endswith('-dbg'): + continue + for f in (l.getVar('FILES_%s' % p, True) or '').split(): + if any((f == x or f.startswith(x + '/')) for x in exclude): + continue + d = os.path.dirname(f) + b = os.path.basename(f) + paths.append('/usr/lib/debug{0}/{1}.debug'.format(d, b)) + paths.append('{0}/.debug/{1}'.format(d, b)) + paths.append('{0}/.debug/{1}.debug'.format(d, b)) + return set(paths) + +FILES_${PN}-dbg = "${@' '.join(debug_paths(d))}" + # do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata" # do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata" # do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata" diff --git a/recipes-external/gcc/gcc-runtime-external.bb b/recipes-external/gcc/gcc-runtime-external.bb index 72aef4c..af9a6e9 100644 --- a/recipes-external/gcc/gcc-runtime-external.bb +++ b/recipes-external/gcc/gcc-runtime-external.bb @@ -45,6 +45,7 @@ do_install_extra () { done } +FILES_${PN}-dbg += "${datadir}/gdb/python/libstdcxx" FILES_libstdc++-dev = "\ ${includedir}/c++ \ ${libdir}/libstdc++.so \ diff --git a/recipes-external/gcc/libgcc-external.bb b/recipes-external/gcc/libgcc-external.bb index 11579d8..7bb7020 100644 --- a/recipes-external/gcc/libgcc-external.bb +++ b/recipes-external/gcc/libgcc-external.bb @@ -33,3 +33,4 @@ FILES_${PN}-dev = "${base_libdir}/libgcc_s.so \ ${libdir}/gcc/${TARGET_SYS}/${GCC_VERSION}/libgcov.a \ " INSANE_SKIP_${PN}-dev += "staticdev" +FILES_${PN}-dbg += "${base_libdir}/.debug/libgcc_s.so.*.debug"