Add CHPL_LLVM_GCC_INSTALL_DIR as an alternative to CHPL_LLVM_GCC_PREFIX #25913
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds
CHPL_LLVM_GCC_INSTALL_DIR
as an alternative toCHPL_LLVM_GCC_PREFIX
.This PR is motivated by the discussion in https://chapel.discourse.group/t/cannot-make-gpu-enabled-chapel/37046/12 .
CHPL_LLVM_GCC_PREFIX
allows one to select a GCC installation. The trouble is, on some systems (E.g. Ubuntu 24.04), there can be multiple versions of GCC installed at the same time, with the same prefix (/usr
in this case).clang
actually supports--gcc-install-dir
as ofclang
16. That flag can be used to request a particular version of GCC on Ubuntu.To understand what one might want to include:
clang++ -v hello.cc
wherehello.cc
might just containint main() { return 0; }
clang++ -v hello.cc --gcc-install-dir=/usr/bin/../lib/gcc/x86_64-linux-gnu/13
Reviewed by @e-kayrakli - thanks!