-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configure scripts for RISC-V in OMR (part1/misc)
The changes mainly include configure scripts to enable RISC-V 64bit from the OMR perspective. Issue: #4426 Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
- Loading branch information
Cheng Jin
committed
Oct 17, 2019
1 parent
812ab4e
commit f555644
Showing
8 changed files
with
181 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
example/glue/configure_includes/configure_linux_riscv.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
############################################################################### | ||
# Copyright (c) 2019, 2019 IBM Corp. and others | ||
# | ||
# This program and the accompanying materials are made available under | ||
# the terms of the Eclipse Public License 2.0 which accompanies this | ||
# distribution and is available at http://eclipse.org/legal/epl-2.0 | ||
# or the Apache License, Version 2.0 which accompanies this distribution | ||
# and is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# This Source Code may also be made available under the following Secondary | ||
# Licenses when the conditions for such availability set forth in the | ||
# Eclipse Public License, v. 2.0 are satisfied: GNU General Public License, | ||
# version 2 with the GNU Classpath Exception [1] and GNU General Public | ||
# License, version 2 with the OpenJDK Assembly Exception [2]. | ||
# | ||
# [1] https://www.gnu.org/software/classpath/license.html | ||
# [2] http://openjdk.java.net/legal/assembly-exception.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception | ||
############################################################################### | ||
|
||
include $(CONFIG_INCL_DIR)/configure_common.mk | ||
|
||
RISCV_CROSSTOOLS_PREFIX=riscv64-unknown-linux-gnu | ||
|
||
ifneq (,$(findstring _riscv64, $(SPEC))) | ||
RISCV_TARGET=riscv64-unknown-linux-gnu | ||
else | ||
RISCV_TARGET=riscv32-unknown-linux-gnu | ||
endif | ||
|
||
CONFIGURE_ARGS += \ | ||
--host=$(RISCV_TARGET) \ | ||
--target=$(RISCV_TARGET) | ||
|
||
ifneq (,$(findstring _cross, $(SPEC))) | ||
CONFIGURE_ARGS += \ | ||
--build=x86_64-pc-linux-gnu \ | ||
'OMR_CROSS_CONFIGURE=yes' | ||
else | ||
CONFIGURE_ARGS += \ | ||
--build=riscv64-pc-linux-gnu | ||
endif | ||
|
||
CONFIGURE_ARGS += \ | ||
--enable-OMR_EXAMPLE \ | ||
--enable-OMR_GC \ | ||
--enable-OMR_PORT \ | ||
--enable-OMR_TEST_COMPILER \ | ||
--enable-OMR_THREAD \ | ||
--enable-OMR_OMRSIG \ | ||
--enable-OMR_THR_THREE_TIER_LOCKING \ | ||
--enable-OMR_THR_YIELD_ALG \ | ||
--enable-OMR_THR_SPIN_WAKE_CONTROL \ | ||
--enable-OMRTHREAD_LIB_UNIX \ | ||
--enable-OMR_ARCH_RISCV \ | ||
--enable-OMR_ENV_LITTLE_ENDIAN \ | ||
--enable-OMR_GC_TLH_PREFETCH_FTA \ | ||
--enable-OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS \ | ||
--enable-OMR_THR_FORK_SUPPORT \ | ||
--enable-OMR_GC_ARRAYLETS | ||
|
||
ifneq (,$(findstring _riscv64, $(SPEC))) | ||
CONFIGURE_ARGS += \ | ||
--enable-OMR_ENV_DATA64 \ | ||
'OMR_TARGET_DATASIZE=64' | ||
else | ||
CONFIGURE_ARGS += \ | ||
'OMR_TARGET_DATASIZE=32' | ||
endif | ||
|
||
ifneq (,$(findstring _cmprssptrs, $(SPEC))) | ||
CONFIGURE_ARGS += \ | ||
--enable-OMR_GC_COMPRESSED_POINTERS \ | ||
--enable-OMR_INTERP_COMPRESSED_OBJECT_HEADER \ | ||
--enable-OMR_INTERP_SMALL_MONITOR_SLOT | ||
endif | ||
|
||
CONFIGURE_ARGS += libprefix=lib exeext= solibext=.so arlibext=.a objext=.o | ||
|
||
ifneq (,$(findstring _cross, $(SPEC))) | ||
AR=$(RISCV_CROSSTOOLS_PREFIX)-ar | ||
AS=$(RISCV_CROSSTOOLS_PREFIX)-as | ||
CC=$(RISCV_CROSSTOOLS_PREFIX)-gcc $(SYSROOT_CFLAGS) | ||
CXX=$(RISCV_CROSSTOOLS_PREFIX)-c++ $(SYSROOT_CFLAGS) | ||
OBJCOPY=$(RISCV_CROSSTOOLS_PREFIX)-objcopy | ||
else | ||
AR=ar | ||
AS=as | ||
CC=gcc | ||
CXX=c++ | ||
OBJCOPY=objcopy | ||
endif | ||
|
||
CONFIGURE_ARGS += 'AR=$(AR)' | ||
CONFIGURE_ARGS += 'AS=$(AS)' | ||
CONFIGURE_ARGS += 'CC=$(CC)' | ||
CONFIGURE_ARGS += 'CXX=$(CXX)' | ||
CONFIGURE_ARGS += 'OBJCOPY=$(OBJCOPY)' | ||
CONFIGURE_ARGS += 'CCLINK=$$(CC)' | ||
CONFIGURE_ARGS += 'CXXLINKSHARED=$$(CC)' | ||
CONFIGURE_ARGS += 'CXXLINKEXE=$$(CXX)' | ||
|
||
CONFIGURE_ARGS += 'OMR_HOST_OS=linux' | ||
CONFIGURE_ARGS += 'OMR_HOST_ARCH=riscv' | ||
CONFIGURE_ARGS += 'OMR_TOOLCHAIN=gcc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters