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
This commit is contained in:
Marvin Scholz 2021-04-26 20:36:18 +02:00 committed by Hugo Beauzée-Luyssen
parent 37cdeb672e
commit 8d47e5a8ba
1 changed files with 0 additions and 8 deletions

View File

@ -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