From: Paul Floyd Date: Sun, 22 Dec 2024 15:49:11 +0000 (+0100) Subject: regtest: add check for -Wl,--no-warn-execstack X-Git-Tag: VALGRIND_3_25_0~189 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7deeb51a44392f26712f3a429813491423c405e9;p=thirdparty%2Fvalgrind.git regtest: add check for -Wl,--no-warn-execstack --- diff --git a/configure.ac b/configure.ac index 7c417eb9d..cb1dc69d3 100755 --- a/configure.ac +++ b/configure.ac @@ -3100,6 +3100,22 @@ AC_LINK_IFELSE( CFLAGS=$safe_CFLAGS fi +# check if linker accepts --no-warn-execstack +AC_MSG_CHECKING([if the linker accepts -Wl,--no-warn-execstack]) +safe_CFLAGS=$CFLAGS +CFLAGS="-Wl,--no-warn-execstack" + +AC_LINK_IFELSE( +[AC_LANG_PROGRAM([ ], [return 0;])], +[ + AC_SUBST([FLAG_NO_WARN_EXECSTACK], ["-Wl,--no-warn-execstack"]) + AC_MSG_RESULT([yes]) +], [ + AC_SUBST([FLAG_NO_WARN_EXECSTACK], [""]) + AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + # does the ppc assembler support "mtocrf" et al? AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf]) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 76825b947..3dc876251 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -335,7 +335,7 @@ endif if HAVE_NESTED_FUNCTIONS check_PROGRAMS += nestedfns - nestedfns_LDFLAGS = -Wl,--no-warn-execstack + nestedfns_LDFLAGS = @FLAG_NO_WARN_EXECSTACK@ endif # This doesn't appear to be compilable on Darwin.