Your message dated Sat, 06 Jan 2024 00:10:12 +0000 with message-id <e1rlugs-006jd4...@fasolo.debian.org> and subject line Bug#1055087: fixed in golang-1.22 1.22~rc1-1 has caused the Debian Bug report #1055087, regarding golang-1.21: Add support for loong64 to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 1055087: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055087 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
--- Begin Message ---Package: golang-1.21 Version: 1.21.3 Severity: wishlist Tags: patch User: debian-loonga...@lists.debian.org Usertags: loong64 Hi, Golang upstream supports loong64 starting from Go1.19 version, and currently all dependencies for building golang-1.21 package on debian sid have been met. Golang-1.21 on loong64 can now be built. The three backport patches in the attachment are mainly to solve glibc dynamic linker path errors([1]) and relocation-related errors([2] [3]), otherwise related tests may fail. [1] https://go-review.googlesource.com/c/go/+/526535 [2] https://go-review.googlesource.com/c/go/+/528455 [3] https://go-review.googlesource.com/c/go/+/537615 -- thanks, Guoqi Chen>From 5af694637ec9d26dcf94c06a542724b3e15f9ff7 Mon Sep 17 00:00:00 2001 From: Guoqi Chen <chengu...@loongson.cn> Date: Fri, 27 Oct 2023 09:47:52 +0000 Subject: [PATCH] Add support for loong64 --- debian/control | 2 +- debian/control.in | 2 +- debian/helpers/goenv.sh | 2 +- ...l-loong64-correct-the-glibc-dynamic-.patch | 36 +++++ ...l-loadelf-correct-the-relocation-siz.patch | 38 +++++ ...nk-add-additional-relocations-for-lo.patch | 132 ++++++++++++++++++ debian/patches/series | 4 + 7 files changed, 213 insertions(+), 3 deletions(-) create mode 100644 debian/patches/0001-cmd-link-internal-loong64-correct-the-glibc-dynamic-.patch create mode 100644 debian/patches/0002-cmd-link-internal-loadelf-correct-the-relocation-siz.patch create mode 100644 debian/patches/0003-debug-elf-cmd-link-add-additional-relocations-for-lo.patch create mode 100644 debian/patches/series diff --git a/debian/control b/debian/control index 0fb79d3..426c59d 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Homepage: https://go.dev/ Rules-Requires-Root: no Package: golang-1.21-go -Architecture: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64 ppc64el riscv64 s390x +Architecture: amd64 arm64 armel armhf i386 loong64 mips mips64el mipsel ppc64 ppc64el riscv64 s390x Depends: golang-1.21-src (>= ${source:Version}), ${misc:Depends}, ${perl:Depends}, diff --git a/debian/control.in b/debian/control.in index c65794e..2ef1965 100644 --- a/debian/control.in +++ b/debian/control.in @@ -18,7 +18,7 @@ Homepage: https://go.dev/ Rules-Requires-Root: no Package: golang-X.Y-go -Architecture: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64 ppc64el riscv64 s390x +Architecture: amd64 arm64 armel armhf i386 loong64 mips mips64el mipsel ppc64 ppc64el riscv64 s390x Depends: golang-X.Y-src (>= ${source:Version}), ${misc:Depends}, ${perl:Depends}, diff --git a/debian/helpers/goenv.sh b/debian/helpers/goenv.sh index 172df51..488537a 100755 --- a/debian/helpers/goenv.sh +++ b/debian/helpers/goenv.sh @@ -11,7 +11,7 @@ __goos__deb_arch_os() { __goarch__deb_arch_cpu() { case "$1" in - amd64|arm|arm64|mips|ppc64|riscv64|s390x) echo "$1" ;; + amd64|arm|arm64|loong64|mips|ppc64|riscv64|s390x) echo "$1" ;; i386) echo 386 ;; mips64el) echo mips64le ;; mipsel) echo mipsle ;; diff --git a/debian/patches/0001-cmd-link-internal-loong64-correct-the-glibc-dynamic-.patch b/debian/patches/0001-cmd-link-internal-loong64-correct-the-glibc-dynamic-.patch new file mode 100644 index 0000000..3e42a7b --- /dev/null +++ b/debian/patches/0001-cmd-link-internal-loong64-correct-the-glibc-dynamic-.patch @@ -0,0 +1,36 @@ +From 050c02f1f0395c08583588a60d166a0f7562f322 Mon Sep 17 00:00:00 2001 +From: limeidan <limei...@loongson.cn> +Date: Wed, 6 Sep 2023 17:09:35 +0800 +Subject: [PATCH 1/3] cmd/link/internal/loong64: correct the glibc dynamic + linker path. + +Ref: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_program_interpreter_path + +Change-Id: Ic2598110cc091362cb09f877b6b86433cacf32c6 +Reviewed-on: https://go-review.googlesource.com/c/go/+/526535 +Reviewed-by: Ian Lance Taylor <i...@google.com> +Run-TryBot: Ian Lance Taylor <i...@google.com> +Auto-Submit: Ian Lance Taylor <i...@google.com> +TryBot-Result: Gopher Robot <go...@golang.org> +Reviewed-by: abner chenc <chengu...@loongson.cn> +Reviewed-by: Cherry Mui <cherr...@google.com> +--- + src/cmd/link/internal/loong64/obj.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cmd/link/internal/loong64/obj.go b/src/cmd/link/internal/loong64/obj.go +index c3f6ed9386..fd193a2445 100644 +--- a/src/cmd/link/internal/loong64/obj.go ++++ b/src/cmd/link/internal/loong64/obj.go +@@ -29,7 +29,7 @@ func Init() (*sys.Arch, ld.Arch) { + Gentext: gentext, + + ELF: ld.ELFArch{ +- Linuxdynld: "/lib64/ld.so.1", ++ Linuxdynld: "/lib64/ld-linux-loongarch-lp64d.so.1", + LinuxdynldMusl: "/lib64/ld-musl-loongarch.so.1", + Freebsddynld: "XXX", + Openbsddynld: "XXX", +-- +2.38.1 + diff --git a/debian/patches/0002-cmd-link-internal-loadelf-correct-the-relocation-siz.patch b/debian/patches/0002-cmd-link-internal-loadelf-correct-the-relocation-siz.patch new file mode 100644 index 0000000..40a2586 --- /dev/null +++ b/debian/patches/0002-cmd-link-internal-loadelf-correct-the-relocation-siz.patch @@ -0,0 +1,38 @@ +From 038503336f7560768aae5a740eff142b007b7234 Mon Sep 17 00:00:00 2001 +From: limeidan <limei...@loongson.cn> +Date: Thu, 14 Sep 2023 20:11:07 +0800 +Subject: [PATCH 2/3] cmd/link/internal/loadelf: correct the relocation size of + R_LARCH_64 + +Change-Id: If3eaca8b92e8f5265c7763d13021a6353b9df9b6 +Reviewed-on: https://go-review.googlesource.com/c/go/+/528455 +Reviewed-by: Cherry Mui <cherr...@google.com> +Reviewed-by: Than McIntosh <th...@google.com> +Reviewed-by: abner chenc <chengu...@loongson.cn> +LUCI-TryBot-Result: Go LUCI <golang-sco...@luci-project-accounts.iam.gserviceaccount.com> +--- + src/cmd/link/internal/loadelf/ldelf.go | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/cmd/link/internal/loadelf/ldelf.go b/src/cmd/link/internal/loadelf/ldelf.go +index 942d54c06c..5ab7cf2204 100644 +--- a/src/cmd/link/internal/loadelf/ldelf.go ++++ b/src/cmd/link/internal/loadelf/ldelf.go +@@ -1012,11 +1012,13 @@ func relSize(arch *sys.Arch, pn string, elftype uint32) (uint8, uint8, error) { + LOONG64 | uint32(elf.R_LARCH_SOP_PUSH_ABSOLUTE)<<16, + LOONG64 | uint32(elf.R_LARCH_MARK_LA)<<16, + LOONG64 | uint32(elf.R_LARCH_SOP_POP_32_S_0_10_10_16_S2)<<16, +- LOONG64 | uint32(elf.R_LARCH_64)<<16, + LOONG64 | uint32(elf.R_LARCH_MARK_PCREL)<<16, + LOONG64 | uint32(elf.R_LARCH_32_PCREL)<<16: + return 4, 4, nil + ++ case LOONG64 | uint32(elf.R_LARCH_64)<<16: ++ return 8, 8, nil ++ + case S390X | uint32(elf.R_390_8)<<16: + return 1, 1, nil + +-- +2.38.1 + diff --git a/debian/patches/0003-debug-elf-cmd-link-add-additional-relocations-for-lo.patch b/debian/patches/0003-debug-elf-cmd-link-add-additional-relocations-for-lo.patch new file mode 100644 index 0000000..99c11bb --- /dev/null +++ b/debian/patches/0003-debug-elf-cmd-link-add-additional-relocations-for-lo.patch @@ -0,0 +1,132 @@ +From e1c1bd1719e04b99990f3276cdef28ca36fa8bb1 Mon Sep 17 00:00:00 2001 +From: Guoqi Chen <chengu...@loongson.cn> +Date: Tue, 24 Oct 2023 16:24:39 +0800 +Subject: [PATCH 3/3] debug/elf,cmd/link: add additional relocations for + loong64 + +The Linker Relaxation feature on Loong64 is already supported in binutils 2.41. +The intermediate code generated after enabling this feature introduces three +reloc types R_LARCH_B26, R_LARCH_ADD32 and R_LARCH_SUB32. + +The other relocation types are not currently used when running all.bash, but +in order to avoid the host tool chain making the decision to use it we don't +have to catch it every time. + +The LoongArch ABI at here: +https://github.com/loongson/la-abi-specs/blob/release/la-abi.adoc + +Corresponding binutils implementation: +https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=be1ebb6710a8f707bd4b0eecbd00f4f4964050e5 +https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1b6fccd28db14fffe75ff6755307047ef932c81e + +Fixes #63725 + +Change-Id: I891115cfdbcf785ab494c881d5f9d1bf8748da8b +--- + api/next/63725.txt | 18 ++++++++++++++++++ + src/cmd/link/internal/loadelf/ldelf.go | 18 +++++++++++++++++- + src/debug/elf/elf.go | 18 ++++++++++++++++++ + 3 files changed, 53 insertions(+), 1 deletion(-) + create mode 100644 api/next/63725.txt + +diff --git a/api/next/63725.txt b/api/next/63725.txt +new file mode 100644 +index 0000000000..ff3e05348b +--- /dev/null ++++ b/api/next/63725.txt +@@ -0,0 +1,18 @@ ++pkg debug/elf, const R_LARCH_64_PCREL = 109 #63725 ++pkg debug/elf, const R_LARCH_64_PCREL R_LARCH #63725 ++pkg debug/elf, const R_LARCH_ADD6 = 105 #63725 ++pkg debug/elf, const R_LARCH_ADD6 R_LARCH #63725 ++pkg debug/elf, const R_LARCH_ADD_ULEB128 = 107 #63725 ++pkg debug/elf, const R_LARCH_ADD_ULEB128 R_LARCH #63725 ++pkg debug/elf, const R_LARCH_ALIGN = 102 #63725 ++pkg debug/elf, const R_LARCH_ALIGN R_LARCH #63725 ++pkg debug/elf, const R_LARCH_CFA = 104 #63725 ++pkg debug/elf, const R_LARCH_CFA R_LARCH #63725 ++pkg debug/elf, const R_LARCH_DELETE = 101 #63725 ++pkg debug/elf, const R_LARCH_DELETE R_LARCH #63725 ++pkg debug/elf, const R_LARCH_PCREL20_S2 = 103 #63725 ++pkg debug/elf, const R_LARCH_PCREL20_S2 R_LARCH #63725 ++pkg debug/elf, const R_LARCH_SUB6 = 106 #63725 ++pkg debug/elf, const R_LARCH_SUB6 R_LARCH #63725 ++pkg debug/elf, const R_LARCH_SUB_ULEB128 = 108 #63725 ++pkg debug/elf, const R_LARCH_SUB_ULEB128 R_LARCH #63725 +diff --git a/src/cmd/link/internal/loadelf/ldelf.go b/src/cmd/link/internal/loadelf/ldelf.go +index 5ab7cf2204..407c5d974a 100644 +--- a/src/cmd/link/internal/loadelf/ldelf.go ++++ b/src/cmd/link/internal/loadelf/ldelf.go +@@ -1007,16 +1007,32 @@ func relSize(arch *sys.Arch, pn string, elftype uint32) (uint8, uint8, error) { + MIPS64 | uint32(elf.R_MIPS_GOT_DISP)<<16: + return 4, 4, nil + ++ case LOONG64 | uint32(elf.R_LARCH_ADD8)<<16, ++ LOONG64 | uint32(elf.R_LARCH_SUB8)<<16: ++ return 1, 1, nil ++ ++ case LOONG64 | uint32(elf.R_LARCH_ADD16)<<16, ++ LOONG64 | uint32(elf.R_LARCH_SUB16)<<16: ++ return 2, 2, nil ++ + case LOONG64 | uint32(elf.R_LARCH_SOP_PUSH_PCREL)<<16, + LOONG64 | uint32(elf.R_LARCH_SOP_PUSH_GPREL)<<16, + LOONG64 | uint32(elf.R_LARCH_SOP_PUSH_ABSOLUTE)<<16, + LOONG64 | uint32(elf.R_LARCH_MARK_LA)<<16, + LOONG64 | uint32(elf.R_LARCH_SOP_POP_32_S_0_10_10_16_S2)<<16, + LOONG64 | uint32(elf.R_LARCH_MARK_PCREL)<<16, ++ LOONG64 | uint32(elf.R_LARCH_ADD24)<<16, ++ LOONG64 | uint32(elf.R_LARCH_ADD32)<<16, ++ LOONG64 | uint32(elf.R_LARCH_SUB24)<<16, ++ LOONG64 | uint32(elf.R_LARCH_SUB32)<<16, ++ LOONG64 | uint32(elf.R_LARCH_B26)<<16, + LOONG64 | uint32(elf.R_LARCH_32_PCREL)<<16: + return 4, 4, nil + +- case LOONG64 | uint32(elf.R_LARCH_64)<<16: ++ case LOONG64 | uint32(elf.R_LARCH_64)<<16, ++ LOONG64 | uint32(elf.R_LARCH_ADD64)<<16, ++ LOONG64 | uint32(elf.R_LARCH_SUB64)<<16, ++ LOONG64 | uint32(elf.R_LARCH_64_PCREL)<<16: + return 8, 8, nil + + case S390X | uint32(elf.R_390_8)<<16: +diff --git a/src/debug/elf/elf.go b/src/debug/elf/elf.go +index c982c684ba..63acddc166 100644 +--- a/src/debug/elf/elf.go ++++ b/src/debug/elf/elf.go +@@ -2365,6 +2365,15 @@ const ( + R_LARCH_TLS_GD_HI20 R_LARCH = 98 + R_LARCH_32_PCREL R_LARCH = 99 + R_LARCH_RELAX R_LARCH = 100 ++ R_LARCH_DELETE R_LARCH = 101 ++ R_LARCH_ALIGN R_LARCH = 102 ++ R_LARCH_PCREL20_S2 R_LARCH = 103 ++ R_LARCH_CFA R_LARCH = 104 ++ R_LARCH_ADD6 R_LARCH = 105 ++ R_LARCH_SUB6 R_LARCH = 106 ++ R_LARCH_ADD_ULEB128 R_LARCH = 107 ++ R_LARCH_SUB_ULEB128 R_LARCH = 108 ++ R_LARCH_64_PCREL R_LARCH = 109 + ) + + var rlarchStrings = []intName{ +@@ -2457,6 +2466,15 @@ var rlarchStrings = []intName{ + {98, "R_LARCH_TLS_GD_HI20"}, + {99, "R_LARCH_32_PCREL"}, + {100, "R_LARCH_RELAX"}, ++ {101, "R_LARCH_DELETE"}, ++ {102, "R_LARCH_ALIGN"}, ++ {103, "R_LARCH_PCREL20_S2"}, ++ {104, "R_LARCH_CFA"}, ++ {105, "R_LARCH_ADD6"}, ++ {106, "R_LARCH_SUB6"}, ++ {107, "R_LARCH_ADD_ULEB128"}, ++ {108, "R_LARCH_SUB_ULEB128"}, ++ {109, "R_LARCH_64_PCREL"}, + } + + func (i R_LARCH) String() string { return stringName(uint32(i), rlarchStrings, false) } +-- +2.38.1 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..34f38c9 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +#loong64 +0001-cmd-link-internal-loong64-correct-the-glibc-dynamic-.patch +0002-cmd-link-internal-loadelf-correct-the-relocation-siz.patch +0003-debug-elf-cmd-link-add-additional-relocations-for-lo.patch -- 2.42.0<<attachment: chenguoqi.vcf>>
--- End Message ---
--- Begin Message ---Source: golang-1.22 Source-Version: 1.22~rc1-1 Done: Shengjing Zhu <z...@debian.org> We believe that the bug you reported is fixed in the latest version of golang-1.22, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1055...@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Shengjing Zhu <z...@debian.org> (supplier of updated golang-1.22 package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmas...@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Thu, 04 Jan 2024 17:22:48 +0800 Source: golang-1.22 Binary: golang-1.22 golang-1.22-doc golang-1.22-go golang-1.22-src Architecture: source all amd64 Version: 1.22~rc1-1 Distribution: unstable Urgency: medium Maintainer: Debian Go Compiler Team <team+go-compi...@tracker.debian.org> Changed-By: Shengjing Zhu <z...@debian.org> Description: golang-1.22 - Go programming language compiler - metapackage golang-1.22-doc - Go programming language - documentation golang-1.22-go - Go programming language compiler, linker, compiled stdlib golang-1.22-src - Go programming language - source files Closes: 1055087 Changes: golang-1.22 (1.22~rc1-1) unstable; urgency=medium . * Team upload * New upstream version 1.22rc1 * Build loong64 binaries (Closes: #1055087) * Avoid downloading a newer toolchain when bootstrap Checksums-Sha1: d5716c5a16c0b554159566b74f8b7a3c1895a5a3 2589 golang-1.22_1.22~rc1-1.dsc 1ce5c50e7a034297b56e0ff510610b2b77981159 27625151 golang-1.22_1.22~rc1.orig.tar.gz 6c185299fc7131efc5847f64e10c2fbf240930ab 833 golang-1.22_1.22~rc1.orig.tar.gz.asc 39b0e0b584763121a252e847877eac4b5912fe67 36736 golang-1.22_1.22~rc1-1.debian.tar.xz 4013850fee9c5de172bb187f028b7dea09e75c9b 113812 golang-1.22-doc_1.22~rc1-1_all.deb 857187df14507e6feca6e1d2ca168bbab8c009a0 24733036 golang-1.22-go_1.22~rc1-1_amd64.deb 88a115a40ea4f0982e4df563e7b40ed5d4a583e7 18776688 golang-1.22-src_1.22~rc1-1_all.deb 80c7ba1f3891226b355ef7482c5d726382478f0b 14380 golang-1.22_1.22~rc1-1_all.deb a7504074fcce0e266669758629e7c1de232c57e3 6597 golang-1.22_1.22~rc1-1_amd64.buildinfo Checksums-Sha256: cb8ef151096223c5d73c3cf714d40b0a3a78bcd590a8365fbc99aa209c445eac 2589 golang-1.22_1.22~rc1-1.dsc 9aecbb8ebae41b93ea26ef5b014296fbbe70a07630249c0d8a275df3bd4d26ea 27625151 golang-1.22_1.22~rc1.orig.tar.gz 666af12a188625be9268893443f1a84bc9b188746d7617d208c49027ecb63f6d 833 golang-1.22_1.22~rc1.orig.tar.gz.asc 6022fad6d23b93a989f981acadd1913d73c73c768a24e42d32e2b08d794ce82a 36736 golang-1.22_1.22~rc1-1.debian.tar.xz 4d9c112c3bdf0af29bc8e19074773662bdc6366d03732ef028e4d12cefe39417 113812 golang-1.22-doc_1.22~rc1-1_all.deb f1c6d44d0bea837da14e34d328309c1bf58b24511a580b9c989bb67ec0156239 24733036 golang-1.22-go_1.22~rc1-1_amd64.deb f11c27d2046b25af8277d3c1187f63536334f3acd27079659e3833f9bdc8fa25 18776688 golang-1.22-src_1.22~rc1-1_all.deb 2e800ed0af3f4408f7c3650ec8c5c8b7cf0ac2e8381f9c1b67192d3beab07c25 14380 golang-1.22_1.22~rc1-1_all.deb 6e9654fedd33e3614e0982102b52429c5f24ba39426970643c385eeb751d05f8 6597 golang-1.22_1.22~rc1-1_amd64.buildinfo Files: 43d4f9e26a45aa3e81f78b0c19f1f679 2589 golang optional golang-1.22_1.22~rc1-1.dsc c08fdc7585d970dd4272def164a5bf99 27625151 golang optional golang-1.22_1.22~rc1.orig.tar.gz 1e295dba248214dd4634e881d8adedf2 833 golang optional golang-1.22_1.22~rc1.orig.tar.gz.asc 6a6785ce52b9407855152de565f4bf64 36736 golang optional golang-1.22_1.22~rc1-1.debian.tar.xz 4d017001b150e740c40db43037b95c57 113812 doc optional golang-1.22-doc_1.22~rc1-1_all.deb f82bd88ea0018b94fae4eb3a79f6e28c 24733036 golang optional golang-1.22-go_1.22~rc1-1_amd64.deb 029b0cb7ce0a197acc999d5acb3b5626 18776688 golang optional golang-1.22-src_1.22~rc1-1_all.deb 00959373200160a17e735053563f0bea 14380 golang optional golang-1.22_1.22~rc1-1_all.deb 16dfe31c2411adfa5e5b35add3364d29 6597 golang optional golang-1.22_1.22~rc1-1_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEc793ixFTU9Vien7Zh7Iv85yjO70FAmWWhrUACgkQh7Iv85yj O71oBAgAiV6+Vwks6yPXrKTFzkf3zxRziU92RX9apNSOv7u6Va3dl+Qyg/on1AGJ AzVSlprMR7HA5YZeAV4e32xK7C2yBh/hOI3q3qfUnJwPxX0fZg2bqnGYjTRguYcs N9c8cN0++a1QAamv0vcvK5ZqId+iMY7VMZXMAX7srsFzfeEahT4FElrF1J15zOaV 6RMdQ+jmQ7VTDX/uqxVWd+GCKFSS8IDj82HZn/LOwmCI2TCAv/ndDjKdWSwouOTU 6tTa0kmdXRonH9mzenppxq9TOSpU8LNsDTpnmU42M+GswDWfluI/cFwzSVLGm9XB Jt/6c+4OCTrBnLZIxqjjvmck9DjdwQ== =VoFp -----END PGP SIGNATURE-----
--- End Message ---