[FFmpeg-devel] [PATCH] configure: add -fPIE instead of -pie to C flags for ThreadSanitizer

Michael Niedermayer michael at niedermayer.cc
Tue Dec 13 02:26:34 EET 2016

On Fri, Dec 02, 2016 at 02:04:53PM -0800, Wan-Teh Chang wrote:
> -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 at google.com>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161213/88257fe6/attachment.sig>

More information about the ffmpeg-devel mailing list