summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-04-25 12:08:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-27 15:11:43 +0100
commit7d8d0b90bea7ea01e1e9ab0ff98f22431f68a506 (patch)
treed4fa4e432134ab61fa442763d0e6e60e357c930e
parentd6658505089234476c1b35fc08fef1eb4f121e85 (diff)
downloadopenembedded-core-contrib-7d8d0b90bea7ea01e1e9ab0ff98f22431f68a506.tar.gz
gcc-cross-canadian: Install LTO linker plugin to BFD searchable location
This helps binutils provided tools ar/ranlib/nm to find the LTO linker plugin automatically as well which makes it equivalent to gcc-ar/gcc-nm/gcc-ranlib Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index d3875c94d3..878feaf810 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -75,6 +75,7 @@ FILES_${PN} = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \
+ ${libdir}/bfd-plugins/*.so \
${includedir}/c++/${BINV} \
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
@@ -92,6 +93,8 @@ EXEEXT = ""
# Compute how to get from libexecdir to bindir in python (easier than shell)
BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
+# linker plugin path
+LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${libdir}/bfd-plugins"))}"
do_install () {
( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
@@ -136,8 +139,12 @@ do_install () {
cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+ # install LTO linker plugins where binutils tools can find it
+ install -d ${D}${libdir}/bfd-plugins
+ ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
+
chown -R root:root ${D}
-
+
cross_canadian_bindirlinks
for i in linux ${CANADIANEXTRAOS}