dev-util/mingw64-toolchain: fix lto again

Was wondering why AR was looking for the lto plugin in a non-existing
bfd-plugins directory before, turned out it was because gcc resolved
its location differently when set as a symlink.

In commit c4262506ff, reverted to using
upstream's intended hardlink but didn't notice this change in behavior
and it broke lto again.

Bug: https://bugs.gentoo.org/854516
Fixes: c4262506ff
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2022-09-16 12:17:19 -04:00
parent 7dc748f875
commit e855eb72fd
2 changed files with 4 additions and 6 deletions
@@ -101,9 +101,8 @@ src_compile() {
)
mwt-binutils() {
# symlink gcc's lto plugin for AR (bug #854516)
mkdir "${sysroot}"/${CTARGET}/lib/bfd-plugins || die
ln -s ../../../libexec/gcc/${CTARGET}/${GCC_PV}/liblto_plugin.so \
"${sysroot}"/${CTARGET}/lib/bfd-plugins || die
ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV}/liblto_plugin.so \
"${sysroot}"/lib/bfd-plugins || die
}
# gcc (minimal -- if need more, disable only in stage1 / enable in stage3)
@@ -102,9 +102,8 @@ src_compile() {
)
mwt-binutils() {
# symlink gcc's lto plugin for AR (bug #854516)
mkdir "${sysroot}"/${CTARGET}/lib/bfd-plugins || die
ln -s ../../../libexec/gcc/${CTARGET}/${GCC_PV}/liblto_plugin.so \
"${sysroot}"/${CTARGET}/lib/bfd-plugins || die
ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV}/liblto_plugin.so \
"${sysroot}"/lib/bfd-plugins || die
}
# gcc (minimal -- if need more, disable only in stage1 / enable in stage3)