1 Star 0 Fork 76

ChendongSun/golang

forked from src-openEuler/golang 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-Enable-go-plugin-support-for-riscv64-based-on-work-b.patch 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
hc 提交于 2023-06-21 22:36 . update: update to go1.20.5
From 57777dcbc3d05c12ac2b227e7afd5435bf84128c Mon Sep 17 00:00:00 2001
From: hanchao <hanchao63@huawei.com>
Date: Mon, 3 Jul 2023 21:20:32 +0800
Subject: [PATCH] Enable go plugin support for riscv64 (based on work by
yangjinghua)
---
src/cmd/link/internal/ld/config.go | 2 +-
src/internal/platform/supported.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go
index ba74b6f..836c10d 100644
--- a/src/cmd/link/internal/ld/config.go
+++ b/src/cmd/link/internal/ld/config.go
@@ -84,7 +84,7 @@ func (mode *BuildMode) Set(s string) error {
switch buildcfg.GOOS {
case "linux":
switch buildcfg.GOARCH {
- case "386", "amd64", "arm", "arm64", "ppc64le", "s390x":
+ case "386", "amd64", "arm", "arm64", "riscv64", "ppc64le", "s390x":
default:
return badmode()
}
diff --git a/src/internal/platform/supported.go b/src/internal/platform/supported.go
index 046352f..644822f 100644
--- a/src/internal/platform/supported.go
+++ b/src/internal/platform/supported.go
@@ -180,7 +180,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool {
case "plugin":
switch platform {
- case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/s390x", "linux/ppc64le",
+ case "linux/amd64", "linux/arm", "linux/arm64", "linux/riscv64", "linux/386", "linux/s390x", "linux/ppc64le",
"android/amd64", "android/arm", "android/arm64", "android/386",
"darwin/amd64", "darwin/arm64",
"freebsd/amd64":
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ChendongSun/golang.git
git@gitee.com:ChendongSun/golang.git
ChendongSun
golang
golang
master

搜索帮助