Branch: refs/heads/main
Revision: 943c49c08f8565668a2c12a515c07fa8b612bfdf
Author: mppf
Link: Add CHPL_LLVM_GCC_INSTALL_DIR as an alternative to CHPL_LLVM_GCC_PREFIX by mppf · Pull Request #25913 · chapel-lang/chapel · GitHub
Log Message:
Add CHPL_LLVM_GCC_INSTALL_DIR as an alternative to CHPL_LLVM_GCC_PREFIX (#25913)
This PR adds CHPL_LLVM_GCC_INSTALL_DIR as an alternative to
CHPL_LLVM_GCC_PREFIX.
This PR is motivated by the discussion in
.
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 of clang 16. That
flag can be used to request a particular version of GCC on Ubuntu.
To understand what one might want to include:
- run
clang++ -v hello.ccwherehello.ccmight just containint main() { return 0; } - you can see the GCC installations it considers at the beginning, e.g.
Found candidate GCC installation:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation:
/usr/bin/../lib/gcc/x86_64-linux-gnu/13
Found candidate GCC installation:
/usr/bin/../lib/gcc/x86_64-linux-gnu/14
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/14
* you can try to change which version should be used, e.g. with `clang++
-v hello.cc --gcc-install-dir=/usr/bin/../lib/gcc/x86_64-linux-gnu/13 `
Reviewed by @e-kayrakli - thanks!
- [x] able to build a GPU-enabled runtime on Ubuntu 24.04 with GCC 14
installed
- [x] full comm=none testing
Compare: https://github.com/chapel-lang/chapel/compare/28a9b6897d6baf7199192ad6ab8c61970be791aa...bf9e120ffabfcee7a96fee945c22e5bfd41edf32
Diff:
M doc/rst/usingchapel/chplenv.rst
M util/chplenv/chpl_llvm.py
https://github.com/chapel-lang/chapel/pull/25913.diff