aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorRainer Orth <ro@gcc.gnu.org>2025-04-26 17:06:04 +0200
committerGitHub <noreply@github.com>2025-04-26 17:06:04 +0200
commite71c8ea3cc73c8f7b0382468f355a254166d3a72 (patch)
treeb48b33a412d90e57f7b973875061eb20e573471f /llvm/lib/CodeGen/LiveDebugVariables.cpp
parentd59163092dfa7ec94391121ffdcb7b9b0e58f3b4 (diff)
downloadllvm-e71c8ea3cc73c8f7b0382468f355a254166d3a72.zip
llvm-e71c8ea3cc73c8f7b0382468f355a254166d3a72.tar.gz
llvm-e71c8ea3cc73c8f7b0382468f355a254166d3a72.tar.bz2
[Driver] Fix _XOPEN_SOURCE definition on Solaris (#137141)
Since commit 613a077b05b8352a48695be295037306f5fca151, `flang` doesn't build any longer on Solaris/amd64: ``` flang/lib/Evaluate/intrinsics-library.cpp:225:26: error: address of overloaded function 'acos' does not match required type '__float128 (__float128)' 225 | FolderFactory<F, F{std::acos}>::Create("acos"), | ^~~~~~~~~ ``` That patch led to the version of `quadmath.h` deep inside `/usr/gcc/<N>` to be found, thus `HAS_QUADMATHLIB` is defined. However, the `struct HostRuntimeLibrary<__float128, LibraryVersion::Libm>` template is guarded by `_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600`, while `clang` only predefines `_XOPEN_SOURCE=500`. This code dates back to commit 0c1941cb055fcf008e17faa6605969673211bea3 back in 2012. Currently, this is long obsolete and `gcc` prefefines `_XOPEN_SOURCE=600` instead since GCC 4.6 back in 2011. This patch follows that. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions