A simple patch that supports identifying sw_64 targets to avoid endless porting work during downstream distribution builds.
sw_64(sunway) is a private cpu architecture that inspired by DEC/Alpha. The toolchains of sunway are hosted in https://gitcode.com/openEuler-SW. All checks passed.
From 37ad7a9c24a9d31f07497a3cca308e2fab9f84e2 Mon Sep 17 00:00:00 2001 From: Changwei Miao <[email protected]> Date: Mon, 27 Apr 2026 18:22:23 +0800 Subject: [PATCH 1/1] Add support for sunway This adds the sw_64 targets. $ make check cd testsuite && bash config-guess.sh && rm uname PASS: config.guess checks (154 tests) cd testsuite && bash config-sub.sh PASS: config.sub checks (1183 tests) PASS: config.sub idempotency checks (1065 tests) PASS: config.sub canonicalise each config.guess testcase (154 tests) * config.guess (sw_64:Linux:*:*): Recognize. * config.sub (sw_64): Likewise. * doc/config.guess.1: Regenerate. * doc/config.sub.1: Likewise. * testsuite/config-guess.data: Add test case for sw_64. * testsuite/config-sub.data (sw_64): Add test cases. Signed-off-by: Changwei Miao <[email protected]> --- config.guess | 5 ++++- config.sub | 3 ++- doc/config.guess.1 | 4 ++-- doc/config.sub.1 | 4 ++-- testsuite/config-guess.data | 1 + testsuite/config-sub.data | 3 +++ 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/config.guess b/config.guess index a9d01fd..9bc78bd 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2025-07-10' +timestamp='2026-04-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1186,6 +1186,9 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; + sw_64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; diff --git a/config.sub b/config.sub index 3d35cde..6357a5f 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale -timestamp='2025-07-10' +timestamp='2026-04-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1432,6 +1432,7 @@ case $cpu-$vendor in | sparcv9v \ | spu \ | sv1 \ + | sw_64 \ | sx* \ | tahoe \ | thumbv7* \ diff --git a/doc/config.guess.1 b/doc/config.guess.1 index 421f4be..69be8db 100644 --- a/doc/config.guess.1 +++ b/doc/config.guess.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. -.TH CONFIG.GUESS "1" "July 2025" "GNU config.guess (2025-07-10)" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH CONFIG.GUESS "1" "April 2026" "GNU config.guess (2026-04-27)" "User Commands" .SH NAME config.guess \- guess the build system triplet .SH SYNOPSIS diff --git a/doc/config.sub.1 b/doc/config.sub.1 index 567bdd3..74720c2 100644 --- a/doc/config.sub.1 +++ b/doc/config.sub.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. -.TH CONFIG.SUB "1" "July 2025" "GNU config.sub (2025-07-10)" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH CONFIG.SUB "1" "April 2026" "GNU config.sub (2026-04-27)" "User Commands" .SH NAME config.sub \- validate and canonicalize a configuration triplet .SH SYNOPSIS diff --git a/testsuite/config-guess.data b/testsuite/config-guess.data index b968943..f6c7a9a 100644 --- a/testsuite/config-guess.data +++ b/testsuite/config-guess.data @@ -127,6 +127,7 @@ riscv64be | ignored | Linux | ignored | ignored | riscv64be-unknown-linux-gnu s390x | 5.6 | SunOS | ignored | ignored | s390x-ibm-solaris2.6 sun3 | 4.0 | SunOS | ignored | ignored | m68k-sun-sunos4.0 sun4 | 5.6 | SunOS | ignored | ignored | sparc-sun-solaris2.6 +sw_64 | ignored | Linux | ignored | ignored | sw_64-unknown-linux-gnu tadpole | 5.6 | SunOS | ignored | ignored | sparc-sun-solaris2.6 tile | 2.6.36 | Linux | ignored | ignored | tile-unknown-linux-gnu tilegx | 2.6.36 | Linux | ignored | ignored | tilegx-unknown-linux-gnu diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data index 93b403c..a1be055 100644 --- a/testsuite/config-sub.data +++ b/testsuite/config-sub.data @@ -1037,6 +1037,9 @@ sun4os3 sparc-sun-sunos3 sun4os4 sparc-sun-sunos4 sun4sol2 sparc-sun-solaris2 sv1 sv1-cray-unicos +sw_64 sw_64-unknown-none +sw_64-linux sw_64-unknown-linux-gnu +sw_64-sunway-linux sw_64-sunway-linux-gnu symmetry i386-sequent-bsd t3e alphaev5-cray-unicos t90 t90-cray-unicos -- 2.54.0
