diff --git a/classes/external-toolchain.bbclass b/classes/external-toolchain.bbclass index 2453ca8..9eb64f3 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" @@ -136,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/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index ae36d6e..1b520fa 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -17,11 +17,12 @@ 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 # 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" @@ -45,7 +46,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 @@ -136,6 +137,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. 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', '') +} 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)}" diff --git a/recipes-external/gcc/gcc-runtime-external.bb b/recipes-external/gcc/gcc-runtime-external.bb index eba354c..af9a6e9 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 \ " @@ -43,12 +45,16 @@ do_install_extra () { done } +FILES_${PN}-dbg += "${datadir}/gdb/python/libstdcxx" FILES_libstdc++-dev = "\ ${includedir}/c++ \ ${libdir}/libstdc++.so \ ${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" 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" diff --git a/recipes-external/gdb/gdbserver-external.bb b/recipes-external/gdb/gdbserver-external.bb index a0aace5..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]}" @@ -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 diff --git a/recipes-external/glibc/glibc-external.bb b/recipes-external/glibc/glibc-external.bb index 6b51310..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.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) } @@ -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 += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a" +FILES_${PN}-dev_remove = "${base_libdir}/*_nonshared.a ${libdir}/*_nonshared.a" +FILES_${PN}-dev += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a ${libdir}/libmvec_nonshared.a"