summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc-at-google.com@ffmpeg.org>2016-12-02 14:04:53 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-13 00:41:39 +0100
commit3f55752cd566c68ff3d3ae984a3936c1d08ef8ca (patch)
tree62498fcac846d56eb83023331f8e271d2fcf4302 /configure
parentfed50c4304eecb352e29ce789cdb96ea84d6162f (diff)
configure: add -fPIE instead of -pie to C flags for ThreadSanitizer
-pie was added to C flags for ThreadSanitizer in commit 19f251a2882a8d0779b432e63bf282e4d9c443bb. Under clang 3.8.0, the -pie flag causes a compiler warning and a linker error when running configure --toolchain=clang-tsan. Here is an excerpt from config.log: clang ... -fsanitize=thread -pie -std=c11 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.hL61stP9.o /tmp/ffconf.YO6ZaSFG.c clang: warning: argument unused during compilation: '-pie' clang -fsanitize=thread -pie -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.W5c2e41l /tmp/ffconf.hL61stP9.o -lbz2 -pthread /usr/bin/ld: /tmp/ffconf.hL61stP9.o: relocation R_X86_64_PC32 against undefined symbol `atan2f@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) To be conservative, I changed -pie to -fPIE. But the documentation seems to imply just -fsanitize=thread is enough: http://clang.llvm.org/docs/ThreadSanitizer.html https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index 2fd6dafe1e..9dfd006698 100755
--- a/configure
+++ b/configure
@@ -3553,7 +3553,7 @@ case "$toolchain" in
;;
*-tsan)
cc_default="${toolchain%-tsan}"
- add_cflags -fsanitize=thread -pie
+ add_cflags -fsanitize=thread -fPIE
add_ldflags -fsanitize=thread -pie
case "$toolchain" in
gcc-tsan)