Commit 8d47e5a8 authored by Marvin Scholz's avatar Marvin Scholz Committed by Hugo Beauzée-Luyssen
Browse files

configure: remove redundant PIE flags for sanitizers

As per the Clang documentation, some sanitizers
only work with position independent executables,
so it is implied already by the sanitizer flag:

> Non-position-independent executables are not supported.
> Therefore, the fsanitize=thread flag will cause Clang
> to act as though the -fPIE flag had been supplied if
> compiling without -fPIC, and as though the -pie flag
> had been supplied if linking an executable.

https://clang.llvm.org/docs/ThreadSanitizer.html#limitations
parent 37cdeb67
......@@ -1183,14 +1183,6 @@ AS_VAR_IF(with_sanitizer, no, [], [
AX_APPEND_COMPILE_FLAGS([-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=pointer-compare -fsanitize=pointer-subtract])
AX_APPEND_COMPILE_FLAGS([-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=pointer-compare -fsanitize=pointer-subtract], [CXXFLAGS])
])
AS_IF([test -z "${with_sanitizer##*memory*}" ], [
AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
])
AS_IF([test -z "${with_sanitizer##*thread*}" ], [
AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
])
])
dnl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment