From 5aae5812223792d5e5bd57e024de50fbcd1e6da5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 25 Apr 2021 12:08:26 -0700 Subject: gcc-target: Create a LTO plugin symlink in bfd-plugins directory This directory is scanned by binutils provided ar,ranlib,nm for plugins that it can load automatically, putting liblto_plugin.so in their means we do not need gcc-ar, gcc-nm, gcc-ranlib particularly as normal ar/ranlib/nm tools will work equally well as they can now use this linker plugin by default This also mean we can revert back to using ar/ranlib/nm as default providers for AR/NM/RANLIB on target Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-target.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc index 164a669aad..0ee3e83d42 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc @@ -54,6 +54,7 @@ FILES_${PN} = "\ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \ ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ + ${libdir}/bfd-plugins/*.so \ " INSANE_SKIP_${PN} += "dev-so" RRECOMMENDS_${PN} += "\ @@ -215,7 +216,8 @@ do_install () { ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp ln -sf g++ c++ ln -sf gcc cc - + install -d ${D}${libdir}/bfd-plugins + ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so chown -R root:root ${D} } -- cgit 1.2.3-korg