From 3a6f68ef34561ae3003cfbfd82d8b175e33e830a Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Fri, 31 Jan 2020 12:24:23 -0800 Subject: Limit multilib toolchains to symlinks to the main toolchain Multiple copies of the same binary toolchain will not help with anything, so limit use to a single (primary) lib toolchain, and then new symlinks to those toolchains to continue to enable the environment files. Signed-off-by: Mark Hatle --- .../recipes-core/meta/gnu-toolchain-canadian.bb | 25 ++++++++++++++++++++++ .../packagegroup-cross-canadian.bbappend | 14 ++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb create mode 100644 meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend diff --git a/meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb b/meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb new file mode 100644 index 00000000..ca8885b8 --- /dev/null +++ b/meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb @@ -0,0 +1,25 @@ +inherit cross-canadian + +SUMMARY = "Links to the various GNU toolchains for use with the Xilinx multilib toolchain" +PN = "gnu-toolchain-canadian-${TARGET_SYS}" +BPN = "gnu-toolchain-canadian" + +LICENSE = "MIT" + +do_install () { + if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then + mkdir -p ${D}${bindir} + + # Create a link for each item references by the environment files + for each in gcc g++ as ld gdb strip ranlib objcopy objdump readelf ar nm ; do + ln -s ../${TARGET_SYS_MULTILIB_ORIGINAL}/${TARGET_SYS_MULTILIB_ORIGINAL}-${each} ${D}${bindir}/${TARGET_SYS}-$each + done + fi +} + +INHIBIT_DEFAULT_DEPS = "1" + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "${bindir}" + +PACKAGES = "${PN}" diff --git a/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend new file mode 100644 index 00000000..456ec6c1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend @@ -0,0 +1,14 @@ +# Avoid installing all of the alternative toolchains +# due to multilib enabled in the primary toolchain. + +# Create the links to the multilib toolchain components +GNUTCLINKS = "gnu-toolchain-canadian-${TARGET_SYS}" + +# Without the := the eval during do_package is occasionally missing multilibs +RDEPENDS_${PN}_xilinx-standalone := " \ + ${@all_multilib_tune_values(d, 'GNUTCLINKS')} \ + ${BINUTILS} \ + ${GCC} \ + ${GDB} \ + meta-environment-${MACHINE} \ +" -- cgit v1.2.3-54-g00ecf