[PATCH] D125499: Enabling the detection of devtoolset-11 toolchain.

Kamau Bridgeman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 12:30:03 PDT 2022


kamaub added a comment.

In D125499#3541689 <https://reviews.llvm.org/D125499#3541689>, @tstellar wrote:

> I'm curious what is your system configuration where this patch actually allows for detection of devtoolset?  I noticed that if clang and gcc are both installed to /usr/, then driver will pick the gcc in /usr/ over the one in /opt/rh/.../

The machine I needed the devtoolset-11 path for is not the same as the current bot failure trying to be addressed in https://reviews.llvm.org/D127310 but all there isn'y anything special to the configuration, I have `/opt/rh/devtoolset-11/root/usr` installed as normal from the yum repositories and I had a `check-all` build failure without this patch

  ~/Github/build $ ninja check-all
  [25/1032] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.powerpc64.o
  FAILED: projects/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.powerpc64.o
  cd /home/kamaub/Github/build/projects/compiler-rt/lib/scudo/standalone/tests && /home/kamaub/Github/build/./bin/clang -g -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/kamaub/Github/llvm-project/llvm/utils/unittest/googletest/include -I/home/kamaub/Github/llvm-project/llvm/utils/unittest/googletest -I/home/kamaub/Github/llvm-project/compiler-rt/include -I/home/kamaub/Github/llvm-project/compiler-rt/lib -I/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone -I/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wno-mismatched-new-delete -m64 -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.powerpc64.o /home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
  /home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:118:19: error: no member named 'make_unique' in namespace 'std'
      NoTags = std::make_unique<scudo::ScopedDisableMemoryTagChecks>();
               ~~~~~^
  /home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:118:66: error: expected '(' for function-style cast or type construction
      NoTags = std::make_unique<scudo::ScopedDisableMemoryTagChecks>();
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  /home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:118:68: error: expected expression
      NoTags = std::make_unique<scudo::ScopedDisableMemoryTagChecks>();
                                                                     ^
  3 errors generated.



================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2156
     Prefixes.push_back("/opt/rh/devtoolset-10/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-9/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-8/root/usr");
----------------
tstellar wrote:
> MaskRay wrote:
> > The detection is wasted every Linux user (even if they don't use RedHat/Fedora). Some may need to be refactored to detect `/opt/rh` first. Some ancient devtoolset-* may be deleted now.
> @kamaub Are you planning to address these comments in a follow up change?
@tstellar Sorry I missed this, thank you for pointing it out, I should have addressed this in a follow-up chain but I email notifications are not working as only saw these comment while taking a look at https://reviews.llvm.org/D127310




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125499



More information about the cfe-commits mailing list