< prev index next >

make/autoconf/libraries.m4

Print this page
@@ -142,10 +142,17 @@
           test "x$OPENJDK_TARGET_CPU" = xsh); then
        BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
      fi
    fi
  
+   # Programs which use C11 or C++11 atomics, like #include <atomic>,
+   # generally must link against -latomic on RISC-V
+   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xriscv64; then
+     BASIC_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS -latomic"
+     BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
+   fi
+ 
    # perfstat lib
    if test "x$OPENJDK_TARGET_OS" = xaix; then
      BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lperfstat"
    fi
  
< prev index next >