The attached patches add 65c816, 65816, wdc65c816, and wc65c816 as aliases
for the w65 processor, to be consistent with handling in the rust crate
target-tuples <https://crates.io/crates/target-tuples>, and other uses. It
also adds the xo65 environment, similar to the elf and coff environments,
designating the object format produced by the cc65 toolchain, as well as
the snes "kernel" for designating code intended to be run on a Super
Nintendo Entertainment System or an emulator. It also adds tests for all
added cases. The modified test suite is confirmed to pass.
From 184042d9ca8c45b79bee6864a2d914d011d06640 Mon Sep 17 00:00:00 2001
From: Connor <[email protected]>
Date: Sun, 7 Feb 2021 21:23:53 -0500
Subject: [PATCH 1/2] Add 65816 target tuples
---
config.sub | 27 ++++++++++++++++++++-------
testsuite/config-sub.data | 3 +++
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/config.sub b/config.sub
index 7f7d0b0..84f5ab5 100755
--- a/config.sub
+++ b/config.sub
@@ -134,7 +134,9 @@ case $1 in
nto-qnx* | linux-* | uclinux-uclibc* \
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
- | storm-chaos* | os2-emx* | rtmk-nova*)
+ | storm-chaos* | os2-emx* | rtmk-nova* \
+ | phantom-kernel* | phantom-user* \
+ | snes*-elf* | snes*-xo65* | nes*-xo65* | snes*-coff*)
basic_machine=$field1
basic_os=$maybe_os
;;
@@ -172,7 +174,7 @@ case $1 in
| ultra | tti* | harris | dolphin | highlevel | gould \
| cbm | ns | masscomp | apple | axis | knuth | cray \
| microblaze* | sim | cisco \
- | oki | wec | wrs | winbond)
+ | oki | wec | wrs | winbond )
basic_machine=$field1-$field2
basic_os=
;;
@@ -508,6 +510,10 @@ case $1 in
basic_machine=i386-sequent
basic_os=
;;
+ snesdev)
+ basic_machine=wc65c816-snes
+ basic_os=elf
+ ;;
sps7)
basic_machine=m68k-bull
basic_os=sysv2
@@ -919,7 +925,6 @@ case $basic_machine in
cpu=sparc
vendor=$(echo "$basic_machine" | sed 's/-.*//')
;;
-
*-*)
# shellcheck disable=SC2162
IFS="-" read cpu vendor <<EOF
@@ -1008,7 +1013,6 @@ case $cpu-$vendor in
vendor=bull
basic_os=${basic_os:-bosx}
;;
-
# Here we normalize CPU types irrespective of the vendor
amd64-*)
cpu=x86_64
@@ -1107,7 +1111,6 @@ case $cpu-$vendor in
arm64-*)
cpu=aarch64
;;
-
# Recognize the canonical CPU Types that limit and/or modify the
# company names they are paired with.
cr16-*)
@@ -1151,7 +1154,9 @@ case $cpu-$vendor in
tile*-*)
basic_os=${basic_os:-linux-gnu}
;;
-
+ wc65c816-* | wdc65c816-* | 65816-* | 65C816-* | 65c816-* )
+ cpu=65816
+ ;;
*)
# Recognize the canonical CPU types that are allowed with any
# company name.
@@ -1313,6 +1318,10 @@ EOF
kernel=linux
os=$(echo $basic_os | sed -e 's|linux|gnu|')
;;
+ snes*)
+ kernel=$basic_os
+ os=elf
+ ;;
*)
kernel=
os=$basic_os
@@ -1725,7 +1734,8 @@ case $os in
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* \
+ | xo65* )
;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1760,6 +1770,9 @@ case $kernel-$os in
;;
os2-emx)
;;
+ snes*-elf* | snes*-xo65* | nes*-xo65* )
+ ;;
+
*-eabi* | *-gnueabi*)
;;
-*)
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index 101a4c4..7785b13 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -801,6 +801,9 @@ wasm32-emscripten wasm32-unknown-emscripten
wasm32-wasi wasm32-unknown-wasi
wasm64-emscripten wasm64-unknown-emscripten
wasm64-wasi wasm64-unknown-wasi
+wdc65c816-snes 65816-unknown-snes-elf
+wc65c816-snes-xo65 65816-unknown-snes-xo65
+65c816-snesdev-elf 65816-unknown-snesdev-elf
we32k we32k-att-sysv
x64 x86_64-pc-none
x64-linux x86_64-pc-linux-gnu
--
2.30.2
From 0b2d53ef8559717163edabe10e1777a8f5faff82 Mon Sep 17 00:00:00 2001
From: Connor <[email protected]>
Date: Fri, 11 Jun 2021 15:49:10 -0400
Subject: [PATCH 2/2] Other Changes
---
config.sub | 13 +++++++------
testsuite/config-sub.data | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/config.sub b/config.sub
index 84f5ab5..8b95f3c 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2021 Free Software Foundation, Inc.
-timestamp='2021-03-10'
+timestamp='2021-05-03'
# 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
@@ -904,7 +904,7 @@ case $basic_machine in
cpu=f301
vendor=fujitsu
;;
- w65)
+ w65 | 65816 | 65c816 | wdc65c816 | wc65c816 | wdc65816 | wc65816)
cpu=w65
vendor=wdc
;;
@@ -1154,9 +1154,10 @@ case $cpu-$vendor in
tile*-*)
basic_os=${basic_os:-linux-gnu}
;;
- wc65c816-* | wdc65c816-* | 65816-* | 65C816-* | 65c816-* )
- cpu=65816
- ;;
+
+ 65c816-* | wdc65c816-* | wc65c816-* | wdc65816-* | wc65816-* | 65816-*)
+ cpu=w65
+ ;;
*)
# Recognize the canonical CPU types that are allowed with any
# company name.
@@ -1254,7 +1255,7 @@ case $cpu-$vendor in
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
| vax \
| visium \
- | w65 \
+ | w65 | 65816 | 65c816 | w65c816 | wdc65c816 | wdc65816 \
| wasm32 | wasm64 \
| we32k \
| x86 | x86_64 | xc16x | xgate | xps100 \
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index 7785b13..5b0c0b6 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -801,9 +801,9 @@ wasm32-emscripten wasm32-unknown-emscripten
wasm32-wasi wasm32-unknown-wasi
wasm64-emscripten wasm64-unknown-emscripten
wasm64-wasi wasm64-unknown-wasi
-wdc65c816-snes 65816-unknown-snes-elf
-wc65c816-snes-xo65 65816-unknown-snes-xo65
-65c816-snesdev-elf 65816-unknown-snesdev-elf
+wdc65c816-snes w65-wdc-snes-elf
+wc65c816-snes-xo65 w65-wdc-snes-xo65
+65c816-snesdev-elf w65-wdc-snesdev-elf
we32k we32k-att-sysv
x64 x86_64-pc-none
x64-linux x86_64-pc-linux-gnu
--
2.30.2