[all-commits] [llvm/llvm-project] c79d37: [sanitizer_common] Only use NT_GNU_BUILD_ID in san...
rorth via All-commits
all-commits at lists.llvm.org
Tue Jan 11 14:51:30 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c79d37279156d8f2242c8f9acc6119c67aa5cf52
https://github.com/llvm/llvm-project/commit/c79d37279156d8f2242c8f9acc6119c67aa5cf52
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2022-01-11 (Tue, 11 Jan 2022)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Log Message:
-----------
[sanitizer_common] Only use NT_GNU_BUILD_ID in sanitizer_linux_libcdep.cpp if supported
D114294 <https://reviews.llvm.org/D114294> broke the Solaris buildbots:
/opt/llvm-buildbot/home/solaris11-amd64/clang-solaris11-amd64/llvm/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:613:29: error: use of undeclared identifier 'NT_GNU_BUILD_ID'
if (nhdr->n_type == NT_GNU_BUILD_ID && nhdr->n_namesz == kGnuNamesz) {
^
Like D107556 <https://reviews.llvm.org/D107556>, it forgot that
`NT_GNU_BUILD_ID` is an unportable GNU extension.
Fixed by making the code conditional on the definition of the macro.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D117051
More information about the All-commits
mailing list