From: Vincent Bernat Date: Thu, 28 Sep 2017 11:11:32 +0000 (+0200) Subject: build: only enable safe-stack if linker supports it X-Git-Tag: 0.9.9~9^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F246%2Fhead;p=thirdparty%2Flldpd.git build: only enable safe-stack if linker supports it --- diff --git a/configure.ac b/configure.ac index 773a81f9..0edceb12 100644 --- a/configure.ac +++ b/configure.ac @@ -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])