golang/0001-Enable-go-plugin-support-for-riscv64-based-on-work-b.patch

41 lines
1.5 KiB
Diff
Raw Normal View History

2023-06-21 22:36:24 +08:00
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 +-
2023-06-21 22:36:24 +08:00
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
2023-06-21 22:36:24 +08:00
index ba74b6f..836c10d 100644
--- a/src/cmd/link/internal/ld/config.go
+++ b/src/cmd/link/internal/ld/config.go
2023-06-21 22:36:24 +08:00
@@ -84,7 +84,7 @@ func (mode *BuildMode) Set(s string) error {
switch buildcfg.GOOS {
case "linux":
switch buildcfg.GOARCH {
2023-06-21 22:36:24 +08:00
- case "386", "amd64", "arm", "arm64", "ppc64le", "s390x":
+ case "386", "amd64", "arm", "arm64", "riscv64", "ppc64le", "s390x":
default:
return badmode()
}
2023-06-21 22:36:24 +08:00
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":
--
2023-06-21 22:36:24 +08:00
2.33.0