4 Star 0 Fork 34

src-openEuler/hadoop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1002-Added-support-for-building-the-riscv64-protoc-binari.patch 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
From bf28c79d4fcf26a517bf35020162770ab28374b8 Mon Sep 17 00:00:00 2001
From: Dingli Zhang <dingli@iscas.ac.cn>
Date: Fri, 31 May 2024 02:09:02 +0000
Subject: [PATCH] Added support for building the riscv64 protoc binaries with
Kokoro
diff --git a/kokoro/release/protoc/linux/build.sh b/kokoro/release/protoc/linux/build.sh
index d165a896b..cd84a3cdb 100755
--- a/kokoro/release/protoc/linux/build.sh
+++ b/kokoro/release/protoc/linux/build.sh
@@ -22,6 +22,9 @@ protoc-artifacts/build-protoc.sh linux aarch_64 protoc
sudo apt install -y g++-powerpc64le-linux-gnu
protoc-artifacts/build-protoc.sh linux ppcle_64 protoc
+sudo apt install -y g++-riscv64-linux-gnu
+protoc-artifacts/build-protoc.sh linux riscv64 protoc
+
sudo apt install -y g++-s390x-linux-gnu
protoc-artifacts/build-protoc.sh linux s390x_64 protoc
diff --git a/protoc-artifacts/build-protoc.sh b/protoc-artifacts/build-protoc.sh
index 6ad2ea1a1..a9df70f2d 100755
--- a/protoc-artifacts/build-protoc.sh
+++ b/protoc-artifacts/build-protoc.sh
@@ -93,6 +93,8 @@ checkArch ()
assertEq $format "elf64-x86-64" $LINENO
elif [[ "$ARCH" == aarch_64 ]]; then
assertEq $format "elf64-little" $LINENO
+ elif [[ "$ARCH" == riscv64 ]]; then
+ assertEq $format "elf64-littleriscv" $LINENO
elif [[ "$ARCH" == s390x_64 ]]; then
if [[ $host_machine == s390x ]];then
assertEq $format "elf64-s390" $LINENO
@@ -162,6 +164,9 @@ checkDependencies ()
elif [[ "$ARCH" == aarch_64 ]]; then
dump_cmd='objdump -p '"$1"' | grep NEEDED'
white_list="libpthread\.so\.0\|libm\.so\.6\|libc\.so\.6\|ld-linux-aarch64\.so\.1"
+ elif [[ "$ARCH" == riscv64 ]]; then
+ dump_cmd='objdump -p '"$1"' | grep NEEDED'
+ white_list="libz\.so\.1\|libm\.so\.6\|libc\.so\.6\|ld-linux-riscv64-lp64d\.so\.1"
fi
elif [[ "$OS" == osx ]]; then
dump_cmd='otool -L '"$1"' | fgrep dylib'
@@ -226,6 +231,8 @@ elif [[ "$(uname)" == Linux* ]]; then
elif [[ "$ARCH" == ppcle_64 ]]; then
CXXFLAGS="$CXXFLAGS -m64"
CONFIGURE_ARGS="$CONFIGURE_ARGS --host=powerpc64le-linux-gnu"
+ elif [[ "$ARCH" == riscv64 ]]; then
+ CONFIGURE_ARGS="$CONFIGURE_ARGS --host=riscv64-linux-gnu"
elif [[ "$ARCH" == s390x_64 ]]; then
CXXFLAGS="$CXXFLAGS -m64"
CONFIGURE_ARGS="$CONFIGURE_ARGS --host=s390x-linux-gnu"
--
2.41.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/hadoop.git
git@gitee.com:src-openeuler/hadoop.git
src-openeuler
hadoop
hadoop
master

搜索帮助

371d5123 14472233 46e8bd33 14472233