John Ericson
ca138e34d0
* config.sub: Cordon off two-component aliases.
...
Instead of just catching manufacturers as OSes across the board, catch
them just as the second of two components. This prevents nonsense
like:
$ ./config.sub amd64-unknown-ibm
x86_64-unknown-ibm-aix
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-23 11:31:46 +10:00
John Ericson
14ec0b015e
* config.sub: Cordon off single component aliases.
...
More detail from the patch author:
Currently there are number of aliases that expand both on their own
and as part of multi-component configurations. For example:
$ ./config.sub 386bsd-linux
i386-pc-bsd
This change moves all of those to just trigger on a single field
branch, preventing their matching as part of larger components:
$ ./config.sub 386bsd-linux
Invalid configuration `386bsd-linux': machine `386bsd' not recognized
This should increase correctness and avoid needless work in the common
case (as many of these are very, very old).
I was very conservative in deciding which patterns were such single
component aliases, as this does make config.sub less forgiving than
before. My criteria for patterns in this `case $basic_machine` were:
- the pattern doesn't contain any `-`
- the pattern doesn't contain any `*`
- `os` was assigned in the match body
- basic_machine wasn't essentially left as is.
The first rule is simple: if it contains a `-` it's not a
single-component pattern. The second rule is because any
`$basic_machine` pattern with an asterisk (`*`) could conceivably
match a two component string, even if the actual code strongly
signaled that was not the intent. The third rule was to indicate no
`os` was expected, as it is valid to omit a vendor in the two
component case so `basic_machine` is just one component without being
the entire configuration.
The 4th and last rule is the trickiest. If the basic_machine was left
as is, or appended with a vendor, I considered the pattern less of an
alias and more a defaulting of a canonical or near canonical
name. This seemed like a "higher quality" short-hand and thus one that
is valid as part of a larger config. Instead of just hard-assigning
`os`, however, I changed it to default `os` with:
os=${os:-DEFAULT}
so as to respect any more information the user passed. This gives us
more pleasant absurdities like:
$ ./config.sub j90
j90-cray-unicos
$ ./config.sub j90-linux
j90-cray-linux-gnu
rather than:
$ ./config.sub j90-linux
j90-cray-unicos
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-19 14:00:25 +10:00
John Ericson
5b1c9fc952
* config.sub: Don't prepend $os with '-' everywhere. Include
...
it in the output instead.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-14 07:21:35 +10:00
John Ericson
bb2048934b
* config.sub: Error if there is more than four components.
...
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-13 20:35:04 +10:00
Ben Elliston
c34561d03c
* config.sub: Remove do-nothing case.
2018-05-12 11:20:45 +10:00
Ben Elliston
2f8d0c496f
Typo fix from Paul Eggert.
2018-05-11 14:57:38 +10:00
Ben Elliston
b75cdc942a
* config.sub: Simplify an if expression.
2018-05-05 21:11:00 +10:00
John Ericson
09df750b99
* config.sub (arm*-*-none-eabi): Recognise.
...
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-05 21:09:43 +10:00
Ben Elliston
65463c5913
* config.sub: Pass the -r option to 'read'.
2018-05-05 21:00:21 +10:00
John Ericson
50a0413a5b
* config.sub: Properly recognise configuration types with four
...
components. Re-work the old logic to simplify the shell code.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-05 15:15:12 +10:00
Ben Elliston
76d82de19f
* config.sub: Whitespace tweak.
2018-05-03 04:49:10 +10:00
Ben Elliston
0bb25285e2
* config.sub (maybe_os): Reindent this block.
2018-05-01 15:45:14 +10:00
John Ericson
f3e464fb69
* config.sub: Rewrite basic_machine 'if' with 'case'.
...
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-01 15:41:39 +10:00
Francois H. Theron
d23f148145
* config.sub (nfp, nfp-*): New.
...
* testsuite/config-sub.data: Add test cases.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-05-01 15:29:04 +10:00
John Ericson
c62a41f36a
* config.sub (arm6m, armv[78][arm]): Recognise.
...
* testsuite/config-sub.data: Add tests.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-04-24 09:06:53 +10:00
Mao Han
63b4ce2e8c
* config.sub (csky, csky-*): Recognise.
...
* testsuite/config-sub.data: Add a test case.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-04-16 14:46:36 +10:00
John Darrington
c3818bbab0
* config.sub (s12z, hcs12z, m68hcs12z, m9s12z): New.
...
* testsuite/config-sub.data: Add test cases.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-04-16 14:33:13 +10:00
Paul Eggert
614ae20b93
* config.guess: Use before-save-hook not write-file-functions.
...
* config.sub: Ditto.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-03-08 11:29:55 +11:00
Rishi Khan
b69837cbbd
* config.sub (hcos-*): Recognise.
...
* testsuite/config-sub.data: Add a test case.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-02-28 09:15:47 +11:00
Ben Elliston
365ea7edee
Reported by Nelson H. F. Beebe:
...
* config.sub (os): Recognise midnightbsd*.
* testsuite/config-sub.data: Add a test case.
2018-02-22 13:50:09 +11:00
Ben Elliston
12c6a5c16e
* config.sub: Double quote variables to silence warning SC2086
...
(double quote to prevent globbing and word splitting).
2018-01-15 07:33:04 +11:00
Ben Elliston
391ea45d14
* config.sub (os): Move -es1800* case above -es*.
...
* testsuite/config-sub.data: Add several test cases.
2018-01-14 11:18:55 +11:00
Ben Elliston
8ca6442e66
* config.sub (os): Remove overlapping pattern -svr4*.
2018-01-14 11:01:37 +11:00
Ben Elliston
e8c56e37c2
* config.sub (maybe_os): Remove duplicate pattern -hms*.
...
* testsuite/config-sub.data: Add a test.
2018-01-14 10:57:24 +11:00
Ben Elliston
10438e2050
* config.sub (maybe_os): Remove duplicate pattern -beos*.
...
* testsuite/config-sub.data: Add a test.
2018-01-14 10:54:49 +11:00
Ben Elliston
d1a4abff22
* config.sub (maybe_os): Remove duplicated pattern -haiku*.
...
(basic_machine): Don't match haiku in the manufacturer field.
* testsuite/config-sub.data: Add a test.
2018-01-14 10:51:48 +11:00
Ben Elliston
aaaf06062a
* config.sub (maybe_os): Remove duplicated pattern -opened* which
...
prevents the more specific case matching on line 1427.
* testsuite/config-sub.data: Add a test.
2018-01-14 10:29:58 +11:00
Ben Elliston
53fa691097
* config.sub (maybe_os): Remove first and duplicate -none*
...
case. This is matched further down. Found by Shellcheck.
2018-01-14 08:31:27 +11:00
Ben Elliston
5960fa40b2
* config.sub (maybe_os): Remove duplicate case for z8k.
2018-01-13 23:10:33 +11:00
Ben Elliston
8af31e838c
* config.sub (maybe_os): Remove duplicate case for sh.
...
* testsuite/config-sub.data: Add test cases for sh and sh-elf.
2018-01-13 23:06:49 +11:00
Ben Elliston
f22522a600
* config.sub (maybe_os): Remove duplicate patterns for sparc,
...
sparcv8, sparcv9, sparcv9b and sparcv9v. Found by Shellcheck.
2018-01-13 22:12:38 +11:00
Ben Elliston
efc9a4d8d5
* config.sub (maybe_os): Remove cases z8k-*-coff and z80-*-coff as
...
these are never matched. Found by Shellcheck.
2018-01-13 22:09:07 +11:00
Ben Elliston
dea159d913
* config.sub (maybe_os): Remove duplicate m88k-omron* case.
...
Found by Shellcheck.
* testsuite/config-sub.data: Add a test case.
2018-01-13 22:06:51 +11:00
Ben Elliston
1ea2427f47
* config.sub (maybe_os): Remove pdp10 case as it is handled above.
...
Found by Shellcheck.
2018-01-13 21:45:29 +11:00
Ben Elliston
97447f42ae
* config.sub (basic_machine): Remove first pdp11 case so that the
...
second, specialised case will match instead. Found by Shellcheck.
* testsuite/config-sub.data: Adjust test case.
2018-01-13 21:43:46 +11:00
Ben Elliston
0ce3d2f0c0
* config.sub (maybe_os): Clean up 386BSD.
...
* testsuite/config-sub.data: Adjust test cases.
2018-01-13 21:37:16 +11:00
Ben Elliston
702204e47b
* config.sub (maybe_os): Remove sparclite-wrs pattern as it is
...
matched by sparclite-* above. Found by Shellcheck.
* testsuite/config-sub.data: Add test cases.
2018-01-13 21:00:55 +11:00
Ben Elliston
a592387de4
* config.sub (maybe_os): Remove -rtmk-nova* pattern as it is
...
matched by -rtmk* immediately preceding it. Found by Shellcheck.
2018-01-13 20:55:11 +11:00
Ben Elliston
e8ad65b91a
* config.sub (maybe_os): Remove duplicate sh64 case as it is
...
matched above. Found by Shellcheck.
2018-01-13 20:53:14 +11:00
Ben Elliston
f22c2fe826
* config.sub (maybe_os): Remove duplicate wasm32 case as it is
...
matched above. Found by Shellcheck.
2018-01-13 20:51:52 +11:00
Ben Elliston
6189f8e47a
* config.sub (maybe_os): Remove duplicate -osfrose* and -osf*
...
cases as these are matched above by -osf*. Found by Shellcheck.
2018-01-13 20:43:28 +11:00
Ben Elliston
8503c24298
* config.sub (maybe_os): Remove second and duplicate *-xenix case
...
as only the first will match. Found by Shellcheck.
* testsuite/config-sub.data: Add test case.
2018-01-13 20:12:27 +11:00
Ben Elliston
a9f681360d
* config.sub (maybe_os): Remove hppa-next which can never match
...
due to an earlier pattern. Found by Shellcheck.
* testsuite/config-sub.data: Add test cases.
2018-01-13 20:05:24 +11:00
Ben Elliston
e9fbad7e05
* config.sub (maybe_os): Remove i386-vsta which can never match
...
due to an earlier pattern (but retain vsta). Found by Shellcheck.
* testsuite/config-sub.data: Add test cases.
2018-01-13 20:01:54 +11:00
Ben Elliston
e9ecf4f360
* config.sub (maybe_os): Remove second and duplicate -aros*
...
case. Only the first will match. Found by Shellcheck.
2018-01-13 19:48:02 +11:00
Ben Elliston
b6b5d6c4c7
* config.sub (maybe_os): Remove second and duplicate *-next
...
case. Only the first will match. Found by Shellcheck.
2018-01-13 17:10:28 +11:00
Randall S. Becker
a69a8a3d51
* config.guess (NSV-*:NONSTOP_KERNEL:*:*): New.
...
* config.sub (nsv-tandem): New.
* testsuite/config-guess.data: Add a test case.
* testsuite/config-sub.data: Likewise.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-01-11 10:00:52 +11:00
Ben Elliston
6fc06f163a
* config.guess: Update copyright years.
...
* config.sub: Likewise.
* doc/config.guess.1: Regenerate.
* doc/config.sub.1: Likewise.
2018-01-01 17:10:32 +11:00
Ben Elliston
6adbbddf3a
Bump timestamp.
2017-12-31 11:18:41 +11:00
Andrew Pinski
cb7fee107e
* config.sub (-bme*): New.
...
* testsuite/config-sub.data: Add a test case.
Signed-off-by: Ben Elliston <bje@gnu.org>
2017-12-31 08:09:29 +11:00