Skip to content

Commit e05f36f

Browse files
shipilevMatthias Klose
andcommitted
8259043: More Zero architectures need linkage with libatomic
Co-authored-by: Matthias Klose <[email protected]> Reviewed-by: erikj
1 parent 020ec84 commit e05f36f

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

make/autoconf/libraries.m4

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,18 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
124124
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
125125
fi
126126
127-
# Libatomic library
128-
# 32-bit MIPS needs fallback library for 8-byte atomic ops
129-
if test "x$OPENJDK_TARGET_OS" = xlinux &&
130-
(test "x$OPENJDK_TARGET_CPU" = xmips ||
131-
test "x$OPENJDK_TARGET_CPU" = xmipsel); then
132-
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
127+
# Atomic library
128+
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
129+
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
130+
if test "x$OPENJDK_TARGET_OS" = xlinux &&
131+
(test "x$OPENJDK_TARGET_CPU" = xarm ||
132+
test "x$OPENJDK_TARGET_CPU" = xm68k ||
133+
test "x$OPENJDK_TARGET_CPU" = xmips ||
134+
test "x$OPENJDK_TARGET_CPU" = xmipsel ||
135+
test "x$OPENJDK_TARGET_CPU" = xppc ||
136+
test "x$OPENJDK_TARGET_CPU" = xsh); then
137+
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
138+
fi
133139
fi
134140
135141
# perfstat lib

0 commit comments

Comments
 (0)