summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-11-08 22:51:09 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-11-08 22:51:09 +0000
commit1a158e7ba1e130a8bbdfb1a20771adf60a85cbd5 (patch)
tree2e24215b54f2e2ca42386954452a8d96228a6c1c /lib
parent43930933f7e78b57276ddda133ef1952398a882c (diff)
[Sanitizers, CMake] Also use version script for libclang_rt.asan-i386.so
When building LLVM on x86_64-pc-linux-gnu (Fedora 25) with the bundled gcc 6.4.1 which uses gld 2.26.1-1.fc25, the dynamic/Asan-i386-calls-Dynamic-Test and dynamic/Asan-i386-inline-Dynamic-Test tests failed to link with /usr/bin/ld: /var/scratch/gcc/llvm/dist/lib/clang/6.0.0/lib/linux/libclang_rt.asan-i386.so: fork: invalid version 21 (max 0) /var/scratch/gcc/llvm/dist/lib/clang/6.0.0/lib/linux/libclang_rt.asan-i386.so: error adding symbols: Bad value I tried building with a self-compiled gcc 7.1.0 using gld 2.28, but the error remained. It seems the error has been hit before (cf. https://reviews.llvm.org/rL314085), but no real explanation has been found. However, the problem goes away when linking the i386 libclang_rt.asan with a version script just like every other variant is. Not using the version script in this single case dates back to the initial introduction of the version script in r236551, but this change was just checked in without any explanation AFAICT. Since I've not found any other workaround and no reason for not always using the version script, I propose to do so. Tested on x86_64-pc-linux-gnu. Patch by Rainer Orth. Differential Revision: https://reviews.llvm.org/D39795 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317738 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/asan/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index 1bd449057..334235746 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -167,7 +167,7 @@ else()
PARENT_TARGET asan)
foreach(arch ${ASAN_SUPPORTED_ARCH})
- if (UNIX AND NOT ${arch} STREQUAL "i386")
+ if (UNIX)
add_sanitizer_rt_version_list(clang_rt.asan-dynamic-${arch}
LIBS clang_rt.asan-${arch} clang_rt.asan_cxx-${arch}
EXTRA asan.syms.extra)