https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688
--- Comment #36 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- An alternative solution: for programs that are known to potentially fail due to built libraries and LD_LIBRARY_PATH, GCC could define wrappers that clean up LD_LIBRARY_PATH before executing the real program.