]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: only enable safe-stack if linker supports it feature/safestack 246/head
authorVincent Bernat <vincent@bernat.im>
Thu, 28 Sep 2017 11:11:32 +0000 (13:11 +0200)
committerVincent Bernat <vincent@bernat.im>
Thu, 28 Sep 2017 11:11:32 +0000 (13:11 +0200)
configure.ac

index 773a81f930f9e2ab61a85488f2d0851d10637b7c..0edceb12d650ae30948fc590cfc30afa66e0d840 100644 (file)
@@ -111,7 +111,9 @@ if test x"$hardening" != x"no"; then
   AX_CFLAGS_GCC_OPTION([-fstack-protector-strong], [LLDP_CFLAGS])
   AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2], [LLDP_CPPFLAGS])
   AX_LDFLAGS_OPTION([-fsanitize=safe-stack], [LLDP_BIN_LDFLAGS])
-  AX_CFLAGS_GCC_OPTION([-fsanitize=safe-stack], [LLDP_CFLAGS])
+  if test x"$ax_cv_ld_check_flag__fsanitize_safe_stack" != x"no"; then
+    AX_CFLAGS_GCC_OPTION([-fsanitize=safe-stack], [LLDP_CFLAGS])
+  fi
 fi
 if test x"$pie" = x"yes"; then
   AX_CFLAGS_GCC_OPTION([-fPIE], [LLDP_CFLAGS])