Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support linux-loong64 native debug #3685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ihuang77
Copy link

@ihuang77 ihuang77 commented Mar 12, 2024

LoongArch is a new RISC ISA, which is independently designed by Loongson Technology.

LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit version (LA32S) and a 64-bit version (LA64), and loong64 is the 64-bit version of LoongArch.

LoongArch documentation: https://github.com/loongson/LoongArch-Documentation.git

Since version 1.19, golang upstream support for the LA architecture has been maintained.

LoongArch is a new RISC ISA, which is independently designed by Loongson Technology.

LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit version (LA32S)
and a 64-bit version (LA64), and loong64 is the 64-bit version of LoongArch.

LoongArch documentation: https://github.com/loongson/LoongArch-Documentation.git
@ihuang77
Copy link
Author

The arch project hasn't been integrated into the upstream yet, so I duplicated it to the vendor and submitted it.

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just dumping a bunch of changes in vendor that don't exist upstream is unacceptable, the x/arch changes need to be merged there first.

@@ -80,7 +80,7 @@ func goBuildArgs(debugname string, pkgs []string, buildflags string, isTest bool

args = append(args, "-o", debugname)
if isTest {
args = append([]string{"-c"}, args...)
args = append([]string{"-c", "-mod=vendor"}, args...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't force users to only build with -mod=vendor.

@@ -1,4 +1,4 @@
//go:build linux && !amd64 && !arm64 && !386 && !(ppc64le && exp.linuxppc64le)
//go:build linux && !amd64 && !arm64 && !386 && !(ppc64le && exp.linuxppc64le) && !loong64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless we can have a machine to run CI we shouldn't change this.

@aarzilli
Copy link
Member

PS. also see test failures.

@@ -1,4 +1,4 @@
//go:build (linux && amd64) || (linux && arm64) || (linux && ppc64le)
//go:build (linux && amd64) || (linux && arm64) || (linux && ppc64le) || (linux && loong64)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go:build (linux && (386 || ppc64le || loong64)) || (darwin && arm64) || (windows && arm64)

I think it's better this way

@derekparker
Copy link
Member

@ihuang77 any updates on this based on @aarzilli feedback?

@ihuang77
Copy link
Author

Hi @aarzilli @derekparker

The x/arch has submitted a PR to support loong64, but it has not yet been merged into the upstream repository.

I can provide machines running CI at any time.

Thanks.

@aarzilli
Copy link
Member

That's cool, we'll have to wait for that PR to be merged for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants