On Wed, 29 May 2024 10:33:16 +0100 Jonathan Wakely <jwakely....@gmail.com> wrote:
> > 1. Some GCC binaries hardcode RUNPATH and use > > Binaries, or just libraries? > I meant GCC shared library binaries. The actual executables under bin/ do not use RUNPATH with GCC default build behaviour. I think FreeBSD GCC compiler from ports was patched to automatically insert RUNPATH into all binaries: $ cat test.c int main(void){} $ /usr/local/gnat13/bin/gcc test.c $ objdump -x a.out | grep RUNPATH RUNPATH /usr/local/gnat13/lib So when I use it as a bootstrap Ada compiler, my new compiler has "RUNPATH /usr/local/gnat13/lib" sprinkled all over its binaries. I can fix this by building my own compiler from sources multiple times, however it is FreeBSD specific issue and not related to my original libstdc++ RUNPATH question. > > /opt/gcc-14.1.0/lib/libgcc_s.so.1 while other GCC binaries pick up > > /lib/libgcc_s.so.1 instead. Seems somewhat inconsistent and may result > > in weird behaviour if there are ABI changes, etc. > > Have you observed an actual failure? No I haven't seen any failures yet. If GCC is using libstdc++ statically, then I guess this is not an issue. I just want to make sure GCC compiler itself does not have any broken/fragile shared library dependencies. Thanks.