[vlc-devel] [PATCH] configure: only add -pie to LDFLAGS
Marvin Scholz
epirat07 at gmail.com
Wed Mar 11 01:00:09 CET 2020
The -pie flag is a linker flag, adding it to compiler flags causes
a Clang warning
warning: argument unused during compilation: '-pie'
for every compiled object.
---
configure.ac | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index bc1874cb97..182a774d1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1098,12 +1098,14 @@ 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], [CXXFLAGS])
])
AS_IF([test -z "${with_sanitizer##*memory*}" ], [
- AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
- AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
+ AX_APPEND_COMPILE_FLAGS([-fPIE])
+ AX_APPEND_COMPILE_FLAGS([-fPIE], [CXXFLAGS])
+ AX_APPEND_FLAG([-pie], [LDFLAGS])
])
AS_IF([test -z "${with_sanitizer##*thread*}" ], [
- AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
- AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
+ AX_APPEND_COMPILE_FLAGS([-fPIE])
+ AX_APPEND_COMPILE_FLAGS([-fPIE], [CXXFLAGS])
+ AX_APPEND_FLAG([-pie], [LDFLAGS])
])
])
--
2.21.1 (Apple Git-122.3)
More information about the vlc-devel
mailing list