-
Notifications
You must be signed in to change notification settings - Fork 56
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
Added LoongArch architecture name #112
Conversation
this is already merged in main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OTOH the official Go name is loong64. Hmm.
@@ -310,7 +310,7 @@ func GetArchFromString(arch string) (ScmpArch, error) { | |||
return ArchPARISC64, nil | |||
case "riscv64": | |||
return ArchRISCV64, nil | |||
case "loongarch64": | |||
case "loong64", "loongarch64": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see, the official name is loongarch64
. While I find the arch
substring redundant, it is what it is. For example, see https://github.com/seccomp/libseccomp/blob/7db46d72f13c172b290818f624c2966bd0db5677/src/arch.c#L210 in which we only have loongarch64
and not loong64
.
It doesn't matter, really. Say GOARCH is |
IOW, this library should support the same names as libseccomp. |
As you said, GOARCH is ` ` For LoongArch, GOARCH is loong64 and seccomp is loongarch64. Similarly, we should include loong64 and loongarch64 in the case branch to solve the name inconsistency problem, runc is a good example, and this problem has blocked the runc test build upstream of debian. |
Currently only loongarch64 is included, loong64 is missing: For this problem, the relevant patch has been merged into Debian in advance(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1095452). |
When running the runc test, an error message is reported: "enosys_linux_test.go:179: unknown libseccomp architecture "loong64": could convert unrecognized string "loong64"". After checking, it was found that the error was caused by the missing "loong64" in the seccomp.go file.