dragonwell-releng / issues-repo

0 stars 0 forks source link

[riscv-8u]hotspot compile fails unrecognized command-line option ‘-m64’ #27

Closed sendaoYan closed 1 month ago

sendaoYan commented 1 month ago
/usr/bin/g++ -DLINUX -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/prims -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/x86/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_x86/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"25.412-b00\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"yansendao\"" -DHOTSPOT_LIB_ARCH=\"riscv64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\""  -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64  -pipe -fno-strict-aliasing  -fno-omit-frame-pointer -O3  -g -DVM_LITTLE_ENDIAN -D_LP64=1  -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type   -fstack-protector  -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/precompiled.hpp.gch.d -fpch-deps -x c++-header /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp -o precompiled.hpp.gch && { echo Done with ; }
g++: error: unrecognized command-line option ‘-m64’

make-jdk8u-riscv64.log

sendaoYan commented 1 month ago
diff --git a/hotspot/make/defs.make b/hotspot/make/defs.make
index a3573da56f3..0c65a9d4f47 100644
--- a/hotspot/make/defs.make
+++ b/hotspot/make/defs.make
@@ -285,7 +285,7 @@ ifneq ($(OSNAME),windows)

   # Use uname output for SRCARCH, but deal with platform differences. If ARCH
   # is not explicitly listed below, it is treated as x86.
-  SRCARCH    ?= $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64 ppc64le zero aarch64,$(ARCH)))
+  SRCARCH    ?= $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64 ppc64le zero aarch64 riscv,$(ARCH)))
   ARCH/       = x86
   ARCH/sparc  = sparc
   ARCH/sparc64= sparc
@@ -297,6 +297,7 @@ ifneq ($(OSNAME),windows)
   ARCH/ppc    = ppc
   ARCH/zero   = zero
   ARCH/aarch64 = aarch64
+  ARCH/riscv = riscv

   # BUILDARCH is usually the same as SRCARCH, except for sparcv9
   BUILDARCH ?= $(SRCARCH)
@@ -328,13 +329,14 @@ ifneq ($(OSNAME),windows)
   LIBARCH/i486    = i386
   LIBARCH/amd64   = amd64
   LIBARCH/aarch64 = aarch64
+  LIBARCH/riscv   = riscv
   LIBARCH/sparc   = sparc
   LIBARCH/sparcv9 = sparcv9
   LIBARCH/ia64    = ia64
   LIBARCH/ppc64   = ppc64
   LIBARCH/zero    = $(ZERO_LIBARCH)

-  LP64_ARCH += sparcv9 amd64 ia64 ppc64 aarch64 zero
+  LP64_ARCH += sparcv9 amd64 ia64 ppc64 aarch64 riscv zero
 endif

 # Required make macro settings for all platforms
sendaoYan commented 1 month ago

50fd5e77be6..acbff907f00 jbs8276799 -> jbs8276799

sendaoYan commented 1 month ago

make.log

sendaoYan commented 1 month ago

same to https://github.com/dragonwell-releng/issues-repo/issues/28