[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
Wed Feb 2 01:58:21 PST 2022


rpenacob added a comment.

Sure!

**GCC**
With the `--enable-version-specific-runtime-libs`

  #include "..." search starts here:
  #include <...> search starts here:
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include-fixed
   /usr/local/include
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/../../include
   /usr/include
  ...
  -L/home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0
  -L/home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc
  -L/lib/../lib64
  -L/usr/lib/../lib64
  -L/home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../..

Without it

  #include "..." search starts here:
  #include <...> search starts here:
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include-fixed
   /usr/local/include
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/../../include
   /usr/include
  ...
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64
  -L/lib/../lib64
  -L/usr/lib/../lib64
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../..

**G++**
With the `--enable-version-specific-runtime-libs`

  #include "..." search starts here:
  #include <...> search starts here:
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/c++
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/c++/x86_64-pc-linux-gnu
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/c++/backward
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include-fixed
   /usr/local/include
   /home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/../../include
   /usr/include
  ...
  -L/home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0
  -L/home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc
  -L/lib/../lib64
  -L/usr/lib/../lib64
  -L/home/rpenacob/.../gcc-rt-libs/install-rt/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../..

Without it

  #include "..." search starts here:
  #include <...> search starts here:
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/x86_64-pc-linux-gnu
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/backward
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/include-fixed
   /usr/local/include
   /home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/../../include
   /usr/include
  ...
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64
  -L/lib/../lib64
  -L/usr/lib/../lib64
  -L/home/rpenacob/.../gcc-rt-libs/install/bin/../lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../..


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118700/new/

https://reviews.llvm.org/D118700



More information about the cfe-commits mailing list