1 Star 0 Fork 9

openMajun/bishengjdk-riscv

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
buildforc.sh 3.06 KB
一键复制 编辑 原始数据 按行查看 历史
majun-bot 提交于 2022-12-29 08:47 . update buildforc.sh.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# shellcheck disable=SC2154,SC2034
# env
export RISCV64=/opt/riscv_toolchain_linux
export LD_LIBRARY_PATH=$RISCV64/lib64
export PATH="$RISCV64/bin:$PATH"
export CC=$RISCV64/bin/riscv64-unknown-linux-gnu-gcc
export CXX=$RISCV64/bin/riscv64-unknown-linux-gnu-g++
# common config options
common_config="--openjdk-target=riscv64-unknown-linux-gnu"
common_config="${common_config} --disable-warnings-as-errors"
common_config="${common_config} --with-sysroot=/opt/fedora28_riscv_root"
common_config="${common_config} --with-jvm-features=shenandoahgc"
# common_config="${common_config} --with-boot-jdk=/usr/lib/jvm/jdk-16"
common_config="${common_config} --with-boot-jdk=/usr/lib/jvm/jre-1.8.0-openjdk"
common_config="${common_config} --with-version-pre=no"
common_config="${common_config} --with-vendor-version-string=Bisheng"
common_config="${common_config} --with-vendor-name=Bisheng"
# cd ${GIT_CHECKOUT_DIR}
build() {
if [ "$1" == "release" ]; then
debug_level=release
common_config="${common_config} --with-debug-level=release"
elif [ "$1" == "slowdebug" ]; then
debug_level=slowdebug
common_config="${common_config} --with-debug-level=slowdebug"
else
debug_level=fastdebug
common_config="${common_config} --with-debug-level=fastdebug"
fi
echo "building ${debug_level}"
if [ -d "${debug_level}" ]; then
rm -rf ${debug_level}
fi
mkdir ${debug_level} && cd ${debug_level}
common_config="${common_config} --prefix=$PWD/install-${debug_level}"
# configure && make
bash ../configure ${common_config}
[ $? -ne 0 ] && echo "${debug_level} configure failed" && exit 1
echo "${debug_level} configure success"
make install
[ $? -ne 0 ] && echo "[${debug_level}]make failed, exit" && exit 1
echo "[${debug_level}] make success"
cd ..
}
versiontest() {
if [ "$1" == "release" ]; then
find_path="release/install-release/jvm"
elif [ "$1" == "slowdebug" ]; then
find_path="slowdebug/install-slowdebug/jvm"
else
find_path="fastdebug/install-fastdebug/jvm"
fi
jdk_path=$(find $find_path -name java)
# java -version test
export LD_LIBRARY_PATH=/opt/fedora28_riscv_root/usr/lib:/opt/fedora28_riscv_root/usr/lib64:$LD_LIBRARY_PATH
qemu-riscv64 ${jdk_path} -version
[ $? -ne 0 ] && echo "version test failed, exit" && exit 1
echo "version test passed"
}
# configure and build
build release && versiontest release
#build slowdebug && versiontest slowdebug
#build fastdebug && versiontest fastdbeug
[ $? -ne 0 ] && echo "pipelien failed, exit" && exit 1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openMajun/bishengjdk-riscv.git
git@gitee.com:openMajun/bishengjdk-riscv.git
openMajun
bishengjdk-riscv
bishengjdk-riscv
master

搜索帮助