Skip to content

Commit 1b3aa3a

Browse files
committed
8256831: MIPS Zero builds fail with undefined __atomic_compare_exchange_8
Reviewed-by: ihse
1 parent 734d3c3 commit 1b3aa3a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

make/autoconf/libraries.m4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ 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"
133+
fi
134+
127135
# perfstat lib
128136
if test "x$OPENJDK_TARGET_OS" = xaix; then
129137
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lperfstat"

0 commit comments

Comments
 (0)