https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109602
Arsen Arsenović <arsen at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arsen at gcc dot gnu.org --- Comment #3 from Arsen Arsenović <arsen at gcc dot gnu.org> --- this patch is not upstream because we haven't proposed it for inclusion in the tree yet. if concerned with gentoo packaging, please open a bug on our bug tracker or talk to us on #gentoo-toolchain on libera.chat (In reply to Andrew Pinski from comment #1) > I am 99% sure this patch is not portable at all. In that not all env > supports --unset. this is part of the reason why we have not done so. (In reply to Andrew Pinski from comment #2) > Second who sets LD_LIBRARY_PATH in the first place. > Third these I thought was only done for maintenance mode. GCC tarballs appear to lack .mo files entirely (checked gcc-12.2.0.tar.xz and gcc-14-20230423.tar.xz) in all components, so this step would necessarily run. the LD_LIBRARY_PATH is set through RPATH_ENVVAR when partway through bootstrapping: LD_LIBRARY_PATH=/home/arsen/gcc/releases/gcc-11b/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs:/home/arsen/gcc/releases/gcc-11b/x86_64-pc-linux-gnu/libgomp/.libs:/home/arsen/gcc/releases/gcc-11b/x86_64-pc-linux-gnu/libitm/.libs:/home/arsen/gcc/releases/gcc-11b/./gcc:/home/arsen/gcc/releases/gcc-11b/./prev-gcc this is done, it'd seem, through all-target-libstdc++-v3 -> RAW_CXX_TARGET_EXPORTS -> BASE_TARGET_EXPORTS this happens on the 13 branch as well, but is not noticeable since that's not a downgrade on my system. it's a bit unsafe to set this variable globally like this (since it affects build-machine programs like make and msgfmt and sh too), but I'm not sure how one could avoid it, since the configure script needs it set, but not the shell that runs it, etc.. (and, even worse, only some programs configure runs need it set..) maybe it'd be easier to inject a runpath into linker flags or something? not all things can be fixed by patching like the msgfmt patch