Skip to content

Commit

Permalink
Fold
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Dec 20, 2024
1 parent 64f79ef commit 0bd58ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
34 changes: 16 additions & 18 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,22 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
FLAGS_SETUP_BRANCH_PROTECTION
if test "x$FLAGS_CPU" = xriscv64; then
AC_MSG_CHECKING([if RVV/vector sigcontext supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <linux/ptrace.h>],
[
return (int)sizeof(struct __riscv_v_ext_state);
])],
[
AC_MSG_RESULT([yes])
],
[
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -DNO_RVV_SIGCONTEXT"
AC_MSG_RESULT([no])
]
)
fi
# EXPORT to API
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
$TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \
Expand Down Expand Up @@ -916,24 +932,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
fi
fi
AC_SUBST($2SVE_CFLAGS)
if test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
AC_MSG_CHECKING([if RVV/vector sigcontext supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <linux/ptrace.h>],
[
return (int)sizeof(struct __riscv_v_ext_state);
])],
[
AC_MSG_RESULT([yes])
$2RVV_CFLAGS=""
],
[
AC_MSG_RESULT([no])
$2RVV_CFLAGS="-DNO_RVV_SIGCONTEXT"
]
)
fi
AC_SUBST($2RVV_CFLAGS)
])

AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
Expand Down
3 changes: 0 additions & 3 deletions make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,6 @@ OS_VERSION_MICRO := @OS_VERSION_MICRO@
# Arm SVE
SVE_CFLAGS := @SVE_CFLAGS@

# Riscv RVV
RVV_CFLAGS := @RVV_CFLAGS@

# Images directory definitions
JDK_IMAGE_SUBDIR := jdk
JRE_IMAGE_SUBDIR := jre
Expand Down
4 changes: 0 additions & 4 deletions make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ else ifeq ($(call isTargetCpu, x86_64), true)
JVM_EXCLUDE_PATTERNS += x86_32
endif

ifeq ($(call isTargetCpu, riscv64), true)
JVM_CFLAGS += $(RVV_CFLAGS)
endif

JVM_OPTIMIZATION ?= HIGHEST_JVM

# Need to set JVM_STRIPFLAGS to the default value from SPEC since the STRIPFLAGS
Expand Down

0 comments on commit 0bd58ab

Please sign in to comment.