diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-04-25 12:08:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-27 15:11:47 +0100 |
commit | 8cf9b6529e695401bba7e8dbd7b151e0cae743d2 (patch) | |
tree | 626cdc948ed5f27f1ef837630dcfcd19c59d6217 /meta/recipes-devtools | |
parent | fb21d2e147fb2d02f405ed67d30526e60a7d6857 (diff) | |
download | poky-8cf9b6529e695401bba7e8dbd7b151e0cae743d2.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
(From OE-Core rev: 7d8d0b90bea7ea01e1e9ab0ff98f22431f68a506)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 9 |
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} = "\ | |||
75 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | 75 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ |
76 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ | 76 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ |
77 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \ | 77 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \ |
78 | ${libdir}/bfd-plugins/*.so \ | ||
78 | ${includedir}/c++/${BINV} \ | 79 | ${includedir}/c++/${BINV} \ |
79 | ${prefix}/${TARGET_SYS}/bin/* \ | 80 | ${prefix}/${TARGET_SYS}/bin/* \ |
80 | ${prefix}/${TARGET_SYS}/lib/* \ | 81 | ${prefix}/${TARGET_SYS}/lib/* \ |
@@ -92,6 +93,8 @@ EXEEXT = "" | |||
92 | 93 | ||
93 | # Compute how to get from libexecdir to bindir in python (easier than shell) | 94 | # Compute how to get from libexecdir to bindir in python (easier than shell) |
94 | BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" | 95 | BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" |
96 | # linker plugin path | ||
97 | LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${libdir}/bfd-plugins"))}" | ||
95 | 98 | ||
96 | do_install () { | 99 | do_install () { |
97 | ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) | 100 | ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) |
@@ -136,8 +139,12 @@ do_install () { | |||
136 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 139 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
137 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 140 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
138 | 141 | ||
142 | # install LTO linker plugins where binutils tools can find it | ||
143 | install -d ${D}${libdir}/bfd-plugins | ||
144 | ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | ||
145 | |||
139 | chown -R root:root ${D} | 146 | chown -R root:root ${D} |
140 | 147 | ||
141 | cross_canadian_bindirlinks | 148 | cross_canadian_bindirlinks |
142 | 149 | ||
143 | for i in linux ${CANADIANEXTRAOS} | 150 | for i in linux ${CANADIANEXTRAOS} |