[PATCH] D118700: Add support to --gcc-toolchain flag for GCC compiled with --enable-version-specific-runtime-libs.
Raúl Peñacoba via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 3 02:17:23 PST 2022
rpenacob added a comment.
That is an interesting case. It looks like we're hitting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32415 , so gcc doesn't seem to search for its own libgcc_s.so when configured with --enable-version-specific-runtime-libs
Most users don't notice this issue because a system-wide libgcc_s.so is usually found instead.
The gcc bug manifests like this:
With --enable-version-specific-runtime-libs
$ <GCC_TOOLCHAIN>/bin/g++ -print-file-name=libgcc_s.so
/lib/../lib64/libgcc_s.so
Without --enable-version-specific-runtime-libs
$ <GCC_TOOLCHAIN>/bin/g++ -print-file-name=libgcc_s.so
<GCC_TOOLCHAIN>/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libgcc_s.so
However clang doesn't get to find the system wide library, so this is why we need an extra library path.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118700/new/
https://reviews.llvm.org/D118700
More information about the cfe-commits
mailing list