Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!34configure: remove redundant PIE flags for sanitizers
Pipeline #103220 passed with stage
in 20 minutes and 48 seconds
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment