On 08/24/2018 03:56 PM, Michael Matz wrote: > Hi, > > On Fri, 24 Aug 2018, Martin Liška wrote: > >>>> Where >>>> /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/9.0.0/libgcov.so >>>> points to /home/marxin/bin/gcc/lib64/libgcov.so.1 ? >>> >>> Any symlinks need to be *relative*, not absolute, so the install tree >>> is relocatable. There's unlibsubdir / libsubdir_to_prefix in >>> gcc/Makefile.in but I'm not sure if that's available in the libgcc/ >>> directory at present. >> >> Well I'm not much sure how to do that. Is it about fixing what >> SHLIBGCOV_INSTALL_SOLINK does? > > Yep. Though I'll say in our GCC packages we explicitely (i.e. outside the > normal make install) rewrite all shared library symlinks to be relative > and be placed in the version-dependend subdir. So it might be that many > of the other shared libraries that GCC can install are also wrong (either > not in the version-dep subdir or not relative). Would be nice to fix all > of them, but that's probably a larger effort. > > I'd say do with libgcov whatever is currently done with libgcc_s. If the > latter needs fixing to be relative or in the version-dep subdir (if > enabled) that would be a separate fix (and yes, it would be to the > SHLIB*_INSTALL_SOLINK macro).
If I see correctly, for libgcc has following files: /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/9.0.0/libgcc_eh.a /home/marxin/bin/gcc/lib64/gcc/x86_64-pc-linux-gnu/9.0.0/libgcc.a /home/marxin/bin/gcc/lib64/libgcc_s.so.1 /home/marxin/bin/gcc/lib64/libgcc_s.so where the trick is done in gcc.c in init_gcc_specs function. For shared version, they use -lgcc_s while for static -lgcc. That explains why I had issues with current layout that static version was preferred. That said, should I use similar mechanism? Martin > > > Ciao, > Michael. >