Skip to content

Commit 47a78e8

Browse files
committed
8256829: GNU hash style is not available on MIPS
Reviewed-by: ihse, aoqi, glaubitz
1 parent 7551c68 commit 47a78e8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

make/autoconf/flags-ldflags.m4

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
6666
# Add -z,defs, to forbid undefined symbols in object files.
6767
# add -z,relro (mark relocations read only) for all libs
6868
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
69-
BASIC_LDFLAGS="-Wl,--hash-style=gnu -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
69+
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
7070
# Linux : remove unused code+data in link step
7171
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
7272
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
@@ -172,6 +172,16 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
172172
$1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
173173
fi
174174
175+
# MIPS ABI does not support GNU hash style
176+
if test "x${OPENJDK_$1_CPU}" = xmips ||
177+
test "x${OPENJDK_$1_CPU}" = xmipsel ||
178+
test "x${OPENJDK_$1_CPU}" = xmips64 ||
179+
test "x${OPENJDK_$1_CPU}" = xmips64el; then
180+
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=sysv"
181+
else
182+
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=gnu"
183+
fi
184+
175185
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
176186
if test "x${OPENJDK_$1_CPU_BITS}" = "x32"; then
177187
$1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"

0 commit comments

Comments
 (0)