common/autoconf/toolchain.m4

changeset 2248
f8f11c618554
parent 2172
a0101c7abbb9
child 2186
5c86538f0b0d
child 2204
0e87966d7ff1
equal deleted inserted replaced
2242:5a80fc5b9697 2248:f8f11c618554
1 # 1 #
2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 # 4 #
5 # This code is free software; you can redistribute it and/or modify it 5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as 6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this 7 # published by the Free Software Foundation. Oracle designates this
1209 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 1209 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
1210 if test -n "$HAS_GNU_HASH"; then 1210 if test -n "$HAS_GNU_HASH"; then
1211 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 1211 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
1212 fi 1212 fi
1213 if test "x$OPENJDK_TARGET_OS" = xlinux; then 1213 if test "x$OPENJDK_TARGET_OS" = xlinux; then
1214 # And since we now know that the linker is gnu, then add -z defs, to forbid 1214 # And since we now know that the linker is gnu, then add:
1215 # undefined symbols in object files. 1215 # -z defs, to forbid undefined symbols in object files
1216 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 1216 # -z noexecstack, to mark stack regions as non-executable
1217 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
1217 if test "x$DEBUG_LEVEL" = "xrelease"; then 1218 if test "x$DEBUG_LEVEL" = "xrelease"; then
1218 # When building release libraries, tell the linker optimize them. 1219 # When building release libraries, tell the linker optimize them.
1219 # Should this be supplied to the OSS linker as well? 1220 # Should this be supplied to the OSS linker as well?
1220 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" 1221 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
1221 fi 1222 fi

mercurial