Re: [PATCH] * config.sub: Simplify OS checking
On Sat, May 19, 2018 at 10:15:49PM -0400, John Ericson wrote: > The removed case did a variety of things. Here's each and what I did: Can you break this patch up into smaller parts, please? Thanks, Ben signature.asc Description: PGP signature ___ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches
[PATCH 3/6] * config.sub: No more os-driven subsitiion of -pc with sed
I'm not sure why this was originally added. It's certainly not needed anymore because the `os` will never be duplicated onto the send of the `basic_machine`. If the user passed `unknown` or no vender, this will already be filled in. If they passed something more specific, it's customary to respect that. --- ChangeLog | 1 + config.sub | 14 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbb62cf..99a80b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * testsuite/config-sub.data: Add clipper-clix and m68k-mint tests. * config.sub: Cordon off two component aliases * config.sub: Simplify *-wrs hanlding + * config.sub: No more os-driven subsitiion of -pc with sed 2018-05-19 Ben Ellistondiff --git a/config.sub b/config.sub index 9c219af..b0eae2c 100755 --- a/config.sub +++ b/config.sub @@ -585,45 +585,31 @@ case $os in ;; sco6) os=sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; sco5) os=sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; sco4) os=sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; sco*) os=sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; isc) os=isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; clix*) basic_machine=clipper-intergraph ;; - isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; lynx*178) os=lynxos178 ;; -- 2.16.3 ___ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches
[PATCH 2/6] * config.sub: Simplify *-wrs hanlding
"wrs" is just a vendor that can be handled with all the other vendors exceptions for two component cases. `wrs) os=vxworks` can instead be put with the other OS defaults down below. --- ChangeLog | 1 + config.sub | 9 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e937e6..dbb62cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * testsuite/config-sub.data: Add clipper-clix and m68k-mint tests. * config.sub: Cordon off two component aliases + * config.sub: Simplify *-wrs hanlding 2018-05-19 Ben Ellistondiff --git a/config.sub b/config.sub index c36dd49..9c219af 100755 --- a/config.sub +++ b/config.sub @@ -164,7 +164,7 @@ case $1 in | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \ | harris | dolphin | highlevel | gould | cbm | ns | masscomp \ | apple | axis | knuth | cray | microblaze* \ - | sim | cisco | oki | wec | winbond) + | sim | cisco | oki | wec | wrs | winbond) basic_machine=$field1-$field2 os= ;; @@ -572,10 +572,6 @@ case $os in ;; scout) ;; - wrs) - os=vxworks - basic_machine=$1 - ;; chorusos*) os=chorusos basic_machine=$1 @@ -1749,6 +1745,9 @@ case $basic_machine in *-atari*) os=mint ;; + *-wrs) + os=vxworks + ;; *) os=none ;; -- 2.16.3 ___ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches
[PATCH 1/6] * config.sub: Cordon off two component aliases
Instead of just catching manufactures as OSes across the board, catch them just as the second of two components. The prevent nonsense like: $ ./config.sub amd64-unknown-ibm x86_64-unknown-ibm-aix --- ChangeLog | 1 + config.sub | 45 + 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index f21c330..6e937e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2018-05-21 John Ericson* testsuite/config-sub.data: Add clipper-clix and m68k-mint tests. + * config.sub: Cordon off two component aliases 2018-05-19 Ben Elliston diff --git a/config.sub b/config.sub index f38250f..c36dd49 100755 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-05-19' +timestamp='2018-05-21' # 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 @@ -149,8 +149,30 @@ case $1 in esac ;; *-*) - basic_machine=$field1 - os=$field2 + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \ + | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \ + | harris | dolphin | highlevel | gould | cbm | ns | masscomp \ + | apple | axis | knuth | cray | microblaze* \ + | sim | cisco | oki | wec | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac ;; *) # Convert single-component short-hands not valid as part of @@ -545,26 +567,9 @@ esac ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in - sun*os*) - # Prevent following clause from handling this invalid input. - ;; - dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* | \ - att* | 7300* | 3300* | delta* | motorola* | sun[234]* | \ - unicom* | ibm* | next | hp | isi* | apollo | altos* | \ - convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* |\ - c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* | \ - harris | dolphin | highlevel | gould | cbm | ns | masscomp | \ - apple | axis | knuth | cray | microblaze*) - os= - basic_machine=$1 - ;; bluegene*) os=cnk ;; - sim | cisco | oki | wec | winbond) - os= - basic_machine=$1 - ;; scout) ;; wrs) -- 2.16.3 ___ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches
[PATCH 6/6] * config.sub: Consolidate OS version checking
This is all that remains of the case at the top, and it can now be straight-forwardly merged with the rest down at the bottom. --- ChangeLog | 1 + config.sub | 127 +++-- 2 files changed, 58 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d00a3a..75249ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ * config.sub: No more os-driven subsitiion of -pc with sed * config.sub: No more forced "-sequent" in the `basic_machine` for "ipx" * config.sub: Don't Force `basic_machine` based on `os` just for "mint" and "clix" + * config.sub: Consolidate OS version checking 2018-05-19 Ben Ellistondiff --git a/config.sub b/config.sub index 99bf891..7e701bf 100755 --- a/config.sub +++ b/config.sub @@ -562,65 +562,6 @@ case $1 in ;; esac -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - bluegene*) - os=cnk - ;; - scout) - ;; - chorusos*) - os=chorusos - basic_machine=$1 - ;; - chorusrdb) - os=chorusrdb - basic_machine=$1 - ;; - hiux*) - os=hiuxwe2 - ;; - sco6) - os=sco5v6 - ;; - sco5) - os=sco3.2v5 - ;; - sco4) - os=sco3.2v4 - ;; - sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - ;; - sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - ;; - sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - sco*) - os=sco3.2v2 - ;; - isc) - os=isc2.2 - ;; - lynx*178) - os=lynxos178 - ;; - lynx*5) - os=lynxos5 - ;; - lynx*) - os=lynxos - ;; - psos*) - os=psos - ;; -esac - # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. @@ -1354,6 +1295,9 @@ case $os in auroraux) os=auroraux ;; + bluegene*) + os=cnk + ;; solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1370,26 +1314,57 @@ case $os in es1800*) os=ose ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. # sysv* is not here because it comes later, after sysvr4. gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ -| *vms* | sco* | esix* | isc* | aix* | cnk* | sunos | sunos[34]*\ +| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | kopensolaris* | plan9* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \ -| hiux* | knetbsd* | mirbsd* | netbsd* \ +| knetbsd* | mirbsd* | netbsd* \ | bitrig* | openbsd* | solidbsd* | libertybsd* \ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ -| chorusos* | chorusrdb* | cegcc* | glidix* \ -| cygwin* | msys* |
[PATCH 4/6] * config.sub: No more forced "-sequent" in the `basic_machine` for "ipx"
"unknown" will be defaulted to "sequent" per existing code below. "pc" won't be, but I rather handle that inconsistency separately --- e.g. should we default to "pc" at all, or if we do should we allow vendor refinement anyways. --- ChangeLog | 1 + config.sub | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99a80b7..eaf8ee7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ * config.sub: Cordon off two component aliases * config.sub: Simplify *-wrs hanlding * config.sub: No more os-driven subsitiion of -pc with sed + * config.sub: No more forced "-sequent" in the `basic_machine` for "ipx" 2018-05-19 Ben Ellistondiff --git a/config.sub b/config.sub index b0eae2c..80d2b1c 100755 --- a/config.sub +++ b/config.sub @@ -619,9 +619,6 @@ case $os in lynx*) os=lynxos ;; - ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; psos*) os=psos ;; -- 2.16.3 ___ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches
[PATCH 5/6] * config.sub: Don't Force `basic_machine` based on `os` just for "mint" and "clix"
I just got rid of this forcing, as it can hide the user's errors from the user and is unlike how other OSes are treated. I added fallbacks for clix (MiNT already had some) such that at least the following stil work: $ ./config.sub clipper-clix clipper-intergraph-clix $ ./config.sub m68k-mint m68k-atari-mint $ ./config.sub mint m68k-atari-mint "clix" (as opposed to "nonsense-clix", i.e. with at least one "-" before) never worked, so I didn't add a short-hand to make it work like "mint". --- ChangeLog | 1 + config.sub | 13 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index eaf8ee7..0d00a3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * config.sub: Simplify *-wrs hanlding * config.sub: No more os-driven subsitiion of -pc with sed * config.sub: No more forced "-sequent" in the `basic_machine` for "ipx" + * config.sub: Don't Force `basic_machine` based on `os` just for "mint" and "clix" 2018-05-19 Ben Ellistondiff --git a/config.sub b/config.sub index 80d2b1c..99bf891 100755 --- a/config.sub +++ b/config.sub @@ -607,9 +607,6 @@ case $os in isc) os=isc2.2 ;; - clix*) - basic_machine=clipper-intergraph - ;; lynx*178) os=lynxos178 ;; @@ -622,10 +619,6 @@ case $os in psos*) os=psos ;; - mint | mint[0-9]*) - basic_machine=m68k-atari - os=mint - ;; esac # Decode aliases for certain CPU-COMPANY combinations. @@ -1583,6 +1576,9 @@ case $basic_machine in c8051-*) os=elf ;; + clipper-intergraph) + os=clix + ;; hexagon-*) os=elf ;; @@ -1776,6 +1772,9 @@ case $basic_machine in genix*) vendor=ns ;; + clix*) + vendor=intergraph + ;; mvs* | opened*) vendor=ibm ;; -- 2.16.3 ___ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches