On Sat, 2023-01-14 at 18:29:12 +0800, 张丹丹 wrote:
> Package: dpkg
> Version: 1.21.17
> Severity: wishlist
> Tags: patch
> User: debian-de...@lists.debian.org
> Usertags: loongarch64
 
> - I have added loongarch64 architecture GNU triplet to match the change in 
> gcc-12.
> This patch can fix problems when cross-building and ensure gcc and dpkg use 
> matched combination.
> Please consider the patch attached. (Reference from rabenda...@gmail.com)

Hmm, why was the triplet changed? I mean it's not been too long since
it got added into dpkg, and supposedly backwards compatibility should
not be much of an issue (?), but why is this really necessary?

What does the unqualified triplet stand for now, which is supposed to
be considered the baseline?

> - The change of gcc-12 for loongarch64, please see the bleow BugID request:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1027278 

> - Are there any missing? Please tell me.

See above. Also the patch (if it ends up being really necessary) does
not look entirely correct, the entries should be placed before the
more general match. Attached the modified one which now also passes
the test suite («make check»).

Thanks,
Guillem
diff --git i/data/ostable w/data/ostable
index 7fd2bff08..c1f9d7a7c 100644
--- i/data/ostable
+++ w/data/ostable
@@ -24,6 +24,7 @@ eabihf-gnu-linux	linux-gnueabihf		linux[^-]*-gnueabihf
 eabi-gnu-linux		linux-gnueabi		linux[^-]*-gnueabi
 abin32-gnu-linux	linux-gnuabin32		linux[^-]*-gnuabin32
 abi64-gnu-linux		linux-gnuabi64		linux[^-]*-gnuabi64
+f64-gnu-linux		linux-gnuf64		linux[^-]*-gnuf64
 spe-gnu-linux		linux-gnuspe		linux[^-]*-gnuspe
 x32-gnu-linux		linux-gnux32		linux[^-]*-gnux32
 ilp32-gnu-linux		linux-gnu_ilp32		linux[^-]*-gnu_ilp32
diff --git i/data/tupletable w/data/tupletable
index a7a878f5b..06d2c4e7f 100644
--- i/data/tupletable
+++ w/data/tupletable
@@ -27,6 +27,7 @@ base-musl-linux-<cpu>		musl-linux-<cpu>
 ilp32-gnu-linux-arm64		arm64ilp32
 eabihf-gnu-linux-arm		armhf
 eabi-gnu-linux-arm		armel
+f64-gnu-linux-loong64		loong64
 abin32-gnu-linux-mips64r6el	mipsn32r6el
 abin32-gnu-linux-mips64r6	mipsn32r6
 abin32-gnu-linux-mips64el	mipsn32el
diff --git i/scripts/t/Dpkg_Arch.t w/scripts/t/Dpkg_Arch.t
index 59855dfa4..f9e080f4e 100644
--- i/scripts/t/Dpkg_Arch.t
+++ w/scripts/t/Dpkg_Arch.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 18900;
+use Test::More tests => 18907;
 
 use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
                         debarch_eq debarch_is debarch_is_wildcard

Reply via email to