aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAkio Nakamura <nakamura@dgtechnologies.co.jp>2018-04-05 18:41:46 +0900
committerAkio Nakamura <nakamura@dgtechnologies.co.jp>2018-04-13 10:26:05 +0900
commit2eb5036c330fcc4fc115fe378b8211fd14711195 (patch)
treefb63d3465be4caa343d55ee5eebb24cd0356fd80 /configure.ac
parent8480d41e0f9d466447f49bf5dd7c17c5337af77a (diff)
macOS: Prevent Xcode 9.3 build warnings
This PR solves #12867 (needs to run autogen.sh && ./configure) clang (Apple LLVM version 9.1.0 (clang-902.0.39.1)) warns unused argument '-pie' during compilation. So we check for warnings in the test using $CXXFLAG_WERROR. Windows is alse default-pie and was special-cased because it also warned, but we can also eliminate that case if warnings are caught.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 1 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index b38e480f27..c4bc061d74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -630,11 +630,7 @@ if test x$use_hardening != xno; then
AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"])
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
-
- if test x$TARGET_OS != xwindows; then
- AX_CHECK_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"])
- AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
- fi
+ AX_CHECK_LINK_FLAG([[-fPIE -pie]], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],, [[$CXXFLAG_WERROR]])
case $host in
*mingw*)