# HG changeset patch # User dbuck # Date 1527753483 14400 # Node ID d5dd14b37ea57fd0390b8298a35b666470a80630 # Parent fe7df3d2f5ae67a2112ccc5a1d5e4131890ef511 8203845: backport of JDK-8034788 inadvertently rolled back JDK-8187045 changes to toolchain.m4 Summary: reapply JDK- 8187045 changes to flags.m4 Reviewed-by: tbell, erikj diff -r fe7df3d2f5ae -r d5dd14b37ea5 common/autoconf/flags.m4 --- a/common/autoconf/flags.m4 Fri May 25 10:37:07 2018 +0100 +++ b/common/autoconf/flags.m4 Thu May 31 03:58:03 2018 -0400 @@ -640,9 +640,10 @@ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " fi if test "x$OPENJDK_TARGET_OS" = xlinux; then - # And since we now know that the linker is gnu, then add -z defs, to forbid - # undefined symbols in object files. - LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" + # And since we now know that the linker is gnu, then add: + # -z defs, to forbid undefined symbols in object files + # -z noexecstack, to mark stack regions as non-executable + LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack" if test "x$DEBUG_LEVEL" = "xrelease"; then # When building release libraries, tell the linker optimize them. # Should this be supplied to the OSS linker as well? diff -r fe7df3d2f5ae -r d5dd14b37ea5 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Fri May 25 10:37:07 2018 +0100 +++ b/common/autoconf/generated-configure.sh Thu May 31 03:58:03 2018 -0400 @@ -4305,7 +4305,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1527191982 +DATE_WHEN_GENERATED=1527649790 ############################################################################### # @@ -41654,9 +41654,10 @@ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " fi if test "x$OPENJDK_TARGET_OS" = xlinux; then - # And since we now know that the linker is gnu, then add -z defs, to forbid - # undefined symbols in object files. - LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" + # And since we now know that the linker is gnu, then add: + # -z defs, to forbid undefined symbols in object files + # -z noexecstack, to mark stack regions as non-executable + LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack" if test "x$DEBUG_LEVEL" = "xrelease"; then # When building release libraries, tell the linker optimize them. # Should this be supplied to the OSS linker as well?