Skip to content

Commit 4b6389e

Browse files
author
Cheng Jin
committed
Add support to the installed cross-compiler for RISCV
The change is to ensure the installed cross-compiler is correctly set up on the host system from OpenJDK11 perspective by changing the prefix of the cross-toolchain if users prefer the installed cross-compiler rather than building a cross-compiler from the source. Issue: ibmruntimes#218 Signed-off-by: Cheng Jin <[email protected]>
1 parent cc6eef2 commit 4b6389e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

closed/autoconf/custom-spec.gmk.in

+8-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
# $1 the name of the makefile
2626
define IncludeCustomExtension
2727
ifndef OPENJDK
28-
custom_include_file := $(TOPDIR)/closed/custom/$(strip $1)
28+
custom_dir := closed/make
29+
custom_include_file := $$(TOPDIR)/$$(custom_dir)/$(strip $1)
2930
ifneq ($$(wildcard $$(custom_include_file)), )
3031
include $$(custom_include_file)
3132
endif
@@ -138,6 +139,12 @@ endif
138139
ifeq (riscv64,$(OPENJDK_TARGET_CPU))
139140
ifeq (cross,$(COMPILE_TYPE))
140141
export SYSROOT_CFLAGS
142+
export RISCV_CROSSTOOLS_PREFIX := riscv64-unknown-linux-gnu
143+
# change the prefix of the cross toolchain if the corresponding
144+
# software package is installed on the host system.
145+
ifeq (install,$(RISCV_TOOLCHAIN_TYPE))
146+
export RISCV_CROSSTOOLS_PREFIX := riscv64-linux-gnu
147+
endif
141148
else
142149
JAVA_FLAGS += -DserverStartupTimeout=36000
143150
endif

0 commit comments

Comments
 (0)