summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2020-01-31 12:24:23 -0800
committerMark Hatle <mark.hatle@xilinx.com>2020-01-31 15:57:27 -0800
commit3a6f68ef34561ae3003cfbfd82d8b175e33e830a (patch)
treeb1908307d9e52b6179a3b63f69538cb065a06c70
parent193ba57865784c6e36b0e481f4054578a187d3cf (diff)
downloadmeta-xilinx-3a6f68ef34561ae3003cfbfd82d8b175e33e830a.tar.gz
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 <mark.hatle@xilinx.com>
-rw-r--r--meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb25
-rw-r--r--meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend14
2 files changed, 39 insertions, 0 deletions
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 @@
1inherit cross-canadian
2
3SUMMARY = "Links to the various GNU toolchains for use with the Xilinx multilib toolchain"
4PN = "gnu-toolchain-canadian-${TARGET_SYS}"
5BPN = "gnu-toolchain-canadian"
6
7LICENSE = "MIT"
8
9do_install () {
10 if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then
11 mkdir -p ${D}${bindir}
12
13 # Create a link for each item references by the environment files
14 for each in gcc g++ as ld gdb strip ranlib objcopy objdump readelf ar nm ; do
15 ln -s ../${TARGET_SYS_MULTILIB_ORIGINAL}/${TARGET_SYS_MULTILIB_ORIGINAL}-${each} ${D}${bindir}/${TARGET_SYS}-$each
16 done
17 fi
18}
19
20INHIBIT_DEFAULT_DEPS = "1"
21
22ALLOW_EMPTY_${PN} = "1"
23FILES_${PN} = "${bindir}"
24
25PACKAGES = "${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 @@
1# Avoid installing all of the alternative toolchains
2# due to multilib enabled in the primary toolchain.
3
4# Create the links to the multilib toolchain components
5GNUTCLINKS = "gnu-toolchain-canadian-${TARGET_SYS}"
6
7# Without the := the eval during do_package is occasionally missing multilibs
8RDEPENDS_${PN}_xilinx-standalone := " \
9 ${@all_multilib_tune_values(d, 'GNUTCLINKS')} \
10 ${BINUTILS} \
11 ${GCC} \
12 ${GDB} \
13 meta-environment-${MACHINE} \
14"