Ah, sorry I didn't notice that. Here then is patch making the change
which I requested, for your consideration.
Thanks,
John
On 6/26/20 8:19 AM, Ben Elliston wrote:
On Wed, Jun 24, 2020 at 10:56:08AM -0400, John Ericson wrote:
(disclaimer: I am not the official maintainer, just someone who put
a in a bunch of time reorganizing `config.sub`.)
I applied Alexander's patch last Sunday.
Ben
>From a0a90e796221c6dadc10de1af304a8e0b182bdf6 Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Sat, 27 Jun 2020 11:16:11 -0400
Subject: [PATCH 1/2] * config.sub: Allow CPU to influence vendor defaulting
too.
---
ChangeLog | 4 ++++
config.sub | 46 +++++++++++++++++++++++-----------------------
2 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c8f6d72..0e33f9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-06-27 John Ericson <john.ericson@obsidian.systems>
+
+ * config.sub: Allow CPU to influence vendor defaulting too.
+
2020-06-26 John Ericson <john.ericson@obsidian.systems>
* config.sub: Move OS whitelist to the bottom of the case as
diff --git a/config.sub b/config.sub
index 186616a..304e71d 100755
--- a/config.sub
+++ b/config.sub
@@ -1720,71 +1720,71 @@ fi
# manufacturer. We pick the logical manufacturer.
case $vendor in
unknown)
- case $os in
- riscix*)
+ case $cpu-$os in
+ *-riscix*)
vendor=acorn
;;
- sunos*)
+ *-sunos*)
vendor=sun
;;
- cnk*|-aix*)
+ *-cnk* | *-aix*)
vendor=ibm
;;
- beos*)
+ *-beos*)
vendor=be
;;
- hpux*)
+ *-hpux*)
vendor=hp
;;
- mpeix*)
+ *-mpeix*)
vendor=hp
;;
- hiux*)
+ *-hiux*)
vendor=hitachi
;;
- unos*)
+ *-unos*)
vendor=crds
;;
- dgux*)
+ *-dgux*)
vendor=dg
;;
- luna*)
+ *-luna*)
vendor=omron
;;
- genix*)
+ *-genix*)
vendor=ns
;;
- clix*)
+ *-clix*)
vendor=intergraph
;;
- mvs* | opened*)
+ *-mvs* | *-opened*)
vendor=ibm
;;
- os400*)
+ *-os400*)
vendor=ibm
;;
- ptx*)
+ *-ptx*)
vendor=sequent
;;
- tpf*)
+ *-tpf*)
vendor=ibm
;;
- vxsim* | vxworks* | windiss*)
+ *-vxsim* | *-vxworks* | *-windiss*)
vendor=wrs
;;
- aux*)
+ *-aux*)
vendor=apple
;;
- hms*)
+ *-hms*)
vendor=hitachi
;;
- mpw* | macos*)
+ *-mpw* | *-macos*)
vendor=apple
;;
- *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
vendor=atari
;;
- vos*)
+ *-vos*)
vendor=stratus
;;
esac
--
2.25.4
>From 7865fcc9131ba149f0518b88e3b03f6323851a32 Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Sat, 27 Jun 2020 12:14:10 -0400
Subject: [PATCH 2/2] * config.sub: Restore s390{,x} IBM defaulting
---
ChangeLog | 15 +++++++++++++++
config.sub | 3 +++
testsuite/config-sub.data | 10 ++++++----
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0e33f9d..ca18be2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2020-06-27 John Ericson <john.ericson@obsidian.systems>
+
+ * config.sub: Restore s390{,x} IBM defaulting.
+
+ Previously, "ibm" was *forced*, which caused problems when someone wanted
+ to use "busybox" as a vendor and cross compile with a slightly different
+ toolchain. But the fix changed behavior such that without any vendor, it
+ would use to plain "unknown" rather than "IBM" was before.
+
+ This patch tries to compromise between the old and new behavior by making
+ "ibm" a *default* for those CPUs when no vendor is specified, but if the
+ user explicitly gives a vendor that is used instead. This sort of vendor
+ defaulting has plenty of precedent in config.sub, already, so it seemed
+ like a good appraoch.
+
2020-06-27 John Ericson <john.ericson@obsidian.systems>
* config.sub: Allow CPU to influence vendor defaulting too.
diff --git a/config.sub b/config.sub
index 304e71d..6093b0b 100755
--- a/config.sub
+++ b/config.sub
@@ -1763,6 +1763,9 @@ case $vendor in
*-os400*)
vendor=ibm
;;
+ s390-* | s390x-*)
+ vendor=ibm
+ ;;
*-ptx*)
vendor=sequent
;;
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index c4fe79d..d9639bc 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -581,10 +581,12 @@ rs6000 rs6000-ibm-aix
rx-linux rx-unknown-linux-gnu
rx rx-unknown-none
s12z s12z-unknown-none
-s390 s390-unknown-none
-s390x s390x-unknown-none
-s390-linux s390-unknown-linux-gnu
-s390x-linux s390x-unknown-linux-gnu
+s390 s390-ibm-none
+s390x s390x-ibm-none
+s390-linux s390-ibm-linux-gnu
+s390x-linux s390x-ibm-linux-gnu
+s390-busybox-linux s390-busybox-linux-gnu
+s390x-busybox-linux s390x-busybox-linux-gnu
s390-ibm-zvmoe s390-ibm-zvmoe
s390x-ibm-zvmoe s390x-ibm-zvmoe
sa29200 a29k-amd-udi
--
2.25.4