https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688
--- Comment #35 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- And since the title of this bug was changed to mention that this is related to the GNU gold linker, there is a runpath bug in this linker that might affect libtool (perhaps causing it to use LD_LIBRARY_PATH?): https://sourceware.org/bugzilla/show_bug.cgi?id=13764 (I reported it in 2012, with Jonathan Nieder's patch to fix it, but after 10 years, there is still no reaction from the developers!) So you may want to try this patch to see if this solves the issue.