Merge ~fnordahl/ubuntu/+source/openvswitch:ubuntu/jammy into ~ubuntu-server-dev/ubuntu/+source/openvswitch:ubuntu/jammy
- Git
- lp:~fnordahl/ubuntu/+source/openvswitch
- ubuntu/jammy
- Merge into ubuntu/jammy
Proposed by
Frode Nordahl
Status: | Merged |
---|---|
Merged at revision: | 16c83213ec0674bb7789244aecc3478b934cf600 |
Proposed branch: | ~fnordahl/ubuntu/+source/openvswitch:ubuntu/jammy |
Merge into: | ~ubuntu-server-dev/ubuntu/+source/openvswitch:ubuntu/jammy |
Diff against target: |
1036447 lines (+205848/-182837) 122 files modified
.ci/linux-build.sh (+1/-1) .cirrus.yml (+1/-1) Documentation/internals/maintainers.rst (+5/-0) Documentation/ref/ovs-actions.7.rst (+1/-1) Documentation/topics/dpdk/phy.rst (+7/-7) MAINTAINERS.rst (+15/-6) Makefile.in (+28/-13) NEWS (+10/-0) aclocal.m4 (+47/-32) build-aux/compile (+3/-3) build-aux/config.guess (+903/-611) build-aux/config.sub (+1325/-1268) build-aux/depcomp (+1/-1) build-aux/install-sh (+92/-69) build-aux/ltmain.sh (+574/-294) build-aux/missing (+1/-1) config.h.in (+79/-23) configure (+7898/-6581) configure.ac (+1/-1) datapath/Makefile.in (+7/-5) debian/changelog (+6/-0) include/openvswitch/meta-flow.h (+4/-0) include/openvswitch/version.h (+2/-2) include/sparse/numa.h (+17/-6) include/sparse/rte_memcpy.h (+1/-4) lib/classifier.c (+20/-5) lib/conntrack-tp.h (+7/-0) lib/conntrack.c (+89/-163) lib/cpu.c (+3/-1) lib/dpctl.c (+10/-12) lib/dpif-netdev.c (+1/-0) lib/dpif-netlink.c (+3/-2) lib/dpif-provider.h (+8/-0) lib/dpif.c (+7/-1) lib/dpif.h (+1/-0) lib/fatal-signal.c (+42/-8) lib/learning-switch.c (+1/-0) lib/meta-flow.c (+25/-0) lib/meta-flow.xml (+2/-2) lib/netdev-dpdk.c (+1/-1) lib/netdev-linux.c (+20/-6) lib/netdev-native-tnl.c (+22/-58) lib/netdev-offload-dpdk.c (+1/-1) lib/netdev-offload-tc.c (+131/-42) lib/netdev-offload.c (+38/-32) lib/netdev-vport-private.h (+6/-1) lib/netdev-vport.c (+108/-83) lib/netdev-windows.c (+11/-0) lib/netdev.h (+3/-1) lib/ofp-parse.c (+2/-5) lib/smap.c (+1/-1) lib/smap.h (+1/-1) lib/socket-util.c (+10/-3) lib/socket-util.h (+2/-1) lib/stream-ssl.c (+7/-1) lib/tc.c (+135/-62) lib/tc.h (+2/-2) m4/libtool.m4 (+129/-98) m4/ltoptions.m4 (+2/-2) m4/ltsugar.m4 (+1/-1) m4/ltversion.m4 (+7/-6) m4/lt~obsolete.m4 (+2/-2) ofproto/ofproto-dpif-ipfix.c (+105/-24) ofproto/ofproto-dpif-upcall.c (+67/-13) ofproto/ofproto-dpif-xlate.c (+14/-1) ofproto/ofproto-dpif.c (+9/-19) ofproto/ofproto-provider.h (+5/-0) ofproto/ofproto.c (+10/-0) ofproto/ofproto.h (+2/-0) ovsdb/jsonrpc-server.c (+27/-16) ovsdb/log.c (+17/-0) ovsdb/log.h (+3/-0) ovsdb/ovsdb-server.c (+44/-21) ovsdb/ovsdb-tool.c (+39/-4) ovsdb/ovsdb.c (+3/-0) ovsdb/relay.c (+18/-4) ovsdb/relay.h (+5/-2) ovsdb/storage.c (+16/-7) ovsdb/storage.h (+1/-1) ovsdb/transaction.c (+1/-1) ovsdb/transaction.h (+2/-1) ovsdb/trigger.c (+3/-2) package.m4 (+2/-2) python/ovs/stream.py (+2/-1) python/ovs/version.py (+1/-1) rhel/kmod-openvswitch-rhel6.spec (+1/-1) rhel/openvswitch-dkms.spec (+1/-1) rhel/openvswitch-fedora.spec (+1/-1) rhel/openvswitch-kmod-fedora.spec (+1/-1) rhel/openvswitch.spec (+1/-1) tests/automake.mk (+2/-1) tests/classifier.at (+88/-0) tests/dpctl.at (+16/-0) tests/learning-switch.at (+23/-0) tests/ofproto-dpif.at (+9/-9) tests/ofproto.at (+182/-0) tests/ovsdb-cluster-testsuite (+862/-816) tests/ovsdb-cluster.at (+7/-7) tests/ovsdb-server.at (+19/-1) tests/ovsdb-tool.at (+69/-0) tests/packet-type-aware.at (+1/-1) tests/system-afxdp-testsuite (+38804/-35849) tests/system-dpdk-testsuite (+584/-538) tests/system-interface.at (+59/-0) tests/system-kmod-macros.at (+10/-0) tests/system-kmod-testsuite (+26968/-23584) tests/system-layer3-tunnels.at (+2/-2) tests/system-offloads-testsuite (+3500/-472) tests/system-offloads-traffic.at (+183/-0) tests/system-traffic.at (+218/-0) tests/system-tso-testsuite (+40293/-37297) tests/system-userspace-macros.at (+8/-0) tests/system-userspace-testsuite (+28626/-25161) tests/testsuite (+52978/-49436) tests/testsuite.at (+1/-0) utilities/ovs-appctl-bashcomp.bash (+7/-0) utilities/ovs-sim.in (+3/-3) utilities/ovs-tcpdump.in (+11/-0) utilities/ovs-vsctl-bashcomp.bash (+7/-0) vswitchd/bridge.c (+3/-0) vswitchd/vswitch.xml (+13/-0) xenserver/openvswitch-xen.spec (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Pending | ||
Review via email: mp+445670@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh |
2 | index 392c7ee..7487275 100755 |
3 | --- a/.ci/linux-build.sh |
4 | +++ b/.ci/linux-build.sh |
5 | @@ -233,7 +233,7 @@ elif [ "$M32" ]; then |
6 | # difference on 'configure' and 'make' stages. |
7 | export CC="$CC -m32" |
8 | elif [ "$TRAVIS_ARCH" != "aarch64" ]; then |
9 | - OPTS="--enable-sparse" |
10 | + EXTRA_OPTS="$EXTRA_OPTS --enable-sparse" |
11 | if [ "$AFXDP" ]; then |
12 | # netdev-afxdp uses memset for 64M for umem initialization. |
13 | SPARSE_FLAGS="${SPARSE_FLAGS} -Wno-memcpy-max-count" |
14 | diff --git a/.cirrus.yml b/.cirrus.yml |
15 | index 29be500..2fadab6 100644 |
16 | --- a/.cirrus.yml |
17 | +++ b/.cirrus.yml |
18 | @@ -2,7 +2,7 @@ freebsd_build_task: |
19 | |
20 | freebsd_instance: |
21 | matrix: |
22 | - image_family: freebsd-12-3-snap |
23 | + image_family: freebsd-12-4-snap |
24 | image_family: freebsd-13-1-snap |
25 | cpu: 4 |
26 | memory: 4G |
27 | diff --git a/Documentation/internals/maintainers.rst b/Documentation/internals/maintainers.rst |
28 | index 172d684..0203bbe 100644 |
29 | --- a/Documentation/internals/maintainers.rst |
30 | +++ b/Documentation/internals/maintainers.rst |
31 | @@ -22,3 +22,8 @@ |
32 | Avoid deeper levels because they do not render well. |
33 | |
34 | .. include:: ../../MAINTAINERS.rst |
35 | + :end-before: Cut here for the Documentation/internals/maintainers.rst |
36 | + |
37 | +.. |responsibilities| replace:: :doc:`committer-responsibilities` |
38 | +.. |grant-revocation| replace:: :doc:`committer-grant-revocation` |
39 | +.. |emeritus-status| replace:: :doc:`committer-emeritus-status` |
40 | diff --git a/Documentation/ref/ovs-actions.7.rst b/Documentation/ref/ovs-actions.7.rst |
41 | index b59b763..d138956 100644 |
42 | --- a/Documentation/ref/ovs-actions.7.rst |
43 | +++ b/Documentation/ref/ovs-actions.7.rst |
44 | @@ -1380,7 +1380,7 @@ The ``delete_field`` action |
45 | | ``delete_field:``\ *field* |
46 | |
47 | The ``delete_field`` action deletes a *field* in the syntax described under |
48 | -`Field Specifications`_ above. Currently, only the ``tun_metadta`` fields are |
49 | +`Field Specifications`_ above. Currently, only the ``tun_metadata`` fields are |
50 | supported. |
51 | |
52 | This action was added in Open vSwitch 2.14. |
53 | diff --git a/Documentation/topics/dpdk/phy.rst b/Documentation/topics/dpdk/phy.rst |
54 | index 937f4c4..90c8691 100644 |
55 | --- a/Documentation/topics/dpdk/phy.rst |
56 | +++ b/Documentation/topics/dpdk/phy.rst |
57 | @@ -76,8 +76,8 @@ persist across reboots. In addition, there are two options available for this |
58 | kernel space driver - VFIO (Virtual Function I/O) and UIO (Userspace I/O) - |
59 | along with a number of drivers for each option. We will demonstrate examples of |
60 | both tools and will use the ``vfio-pci`` driver, which is the more secure, |
61 | -robust driver of those available. More information can be found in the `DPDK |
62 | -documentation <dpdk-drivers>`__. |
63 | +robust driver of those available. More information can be found in the |
64 | +`DPDK drivers documentation`_. |
65 | |
66 | To list devices using :command:`driverctl`, run:: |
67 | |
68 | @@ -115,9 +115,9 @@ tool:: |
69 | Open vSwitch 2.6.0 added support for DPDK 16.07, which in turn renamed the |
70 | former ``dpdk_nic_bind`` tool to ``dpdk-devbind``. |
71 | |
72 | -For more information, refer to the `DPDK documentation <dpdk-drivers>`__. |
73 | +For more information, refer to the `DPDK drivers documentation`_. |
74 | |
75 | -.. _dpdk-drivers: https://doc.dpdk.org/guides-21.11/linux_gsg/linux_drivers.html |
76 | +.. _DPDK drivers documentation: https://doc.dpdk.org/guides-21.11/linux_gsg/linux_drivers.html |
77 | |
78 | .. _dpdk-phy-multiqueue: |
79 | |
80 | @@ -394,14 +394,14 @@ in the ``options`` column of the ``Interface`` table. |
81 | |
82 | .. important:: |
83 | |
84 | - Some DPDK port use `bifurcated drivers <bifurcated-drivers>`__, |
85 | - which means that a kernel netdevice remains when Open vSwitch is stopped. |
86 | + Some DPDK port use `bifurcated drivers`_, which means that a kernel |
87 | + netdevice remains when Open vSwitch is stopped. |
88 | |
89 | In such case, any configuration applied to a VF would remain set on the |
90 | kernel netdevice, and be inherited from it when Open vSwitch is restarted, |
91 | even if the options described in this section are unset from Open vSwitch. |
92 | |
93 | -.. _bifurcated-drivers: https://doc.dpdk.org/guides-21.11/linux_gsg/linux_drivers.html#bifurcated-driver |
94 | +.. _bifurcated drivers: https://doc.dpdk.org/guides-21.11/linux_gsg/linux_drivers.html#bifurcated-driver |
95 | |
96 | - Configure the VF MAC address:: |
97 | |
98 | diff --git a/MAINTAINERS.rst b/MAINTAINERS.rst |
99 | index 27be4aa..1dc4061 100644 |
100 | --- a/MAINTAINERS.rst |
101 | +++ b/MAINTAINERS.rst |
102 | @@ -28,11 +28,11 @@ Committers |
103 | Open vSwitch committers are the people who have been granted access to push |
104 | changes to the Open vSwitch git repository. |
105 | |
106 | -The responsibilities of an Open vSwitch committer are documented |
107 | -`here <Documentation/internals/committer-responsibilities.rst>`__. |
108 | +The responsibilities of an Open vSwitch committer are documented here: |
109 | +|responsibilities|. |
110 | |
111 | -The process for adding or removing committers is documented |
112 | -`here <Documentation/internals/committer-grant-revocation.rst>`__. |
113 | +The process for adding or removing committers is documented here: |
114 | +|grant-revocation|. |
115 | |
116 | This is the current list of active Open vSwitch committers: |
117 | |
118 | @@ -77,8 +77,8 @@ This is the current list of active Open vSwitch committers: |
119 | - yamamoto@midokura.com |
120 | |
121 | The project also maintains a list of Emeritus Committers (or Maintainers). |
122 | -More information about Emeritus Committers can be found |
123 | -`here <Documentation/internals/committer-emeritus-status.rst>`__. |
124 | +More information about Emeritus Committers can be found here: |
125 | +|emeritus-status|. |
126 | |
127 | .. list-table:: OVS Emeritus Maintainers |
128 | :header-rows: 1 |
129 | @@ -91,3 +91,12 @@ More information about Emeritus Committers can be found |
130 | - ejj@eecs.berkeley.edu |
131 | * - Joe Stringer |
132 | - joe@ovn.org |
133 | + |
134 | +.. Cut here for the Documentation/internals/maintainers.rst |
135 | + |
136 | +.. |responsibilities| replace:: `Expectations for Developers with Open vSwitch |
137 | + Repo Access <Documentation/internals/committer-responsibilities.rst>`__ |
138 | +.. |grant-revocation| replace:: `OVS Committer Grant/Revocation Policy |
139 | + <Documentation/internals/committer-grant-revocation.rst>`__ |
140 | +.. |emeritus-status| replace:: `Emeritus Status for OVS Committers |
141 | + <Documentation/internals/committer-emeritus-status.rst>`__ |
142 | diff --git a/Makefile.in b/Makefile.in |
143 | index 16011c4..93c6e98 100644 |
144 | --- a/Makefile.in |
145 | +++ b/Makefile.in |
146 | @@ -1,7 +1,7 @@ |
147 | -# Makefile.in generated by automake 1.16.1 from Makefile.am. |
148 | +# Makefile.in generated by automake 1.16.5 from Makefile.am. |
149 | # @configure_input@ |
150 | |
151 | -# Copyright (C) 1994-2018 Free Software Foundation, Inc. |
152 | +# Copyright (C) 1994-2021 Free Software Foundation, Inc. |
153 | |
154 | # This Makefile.in is free software; the Free Software Foundation |
155 | # gives unlimited permission to copy and/or distribute it, |
156 | @@ -1242,8 +1242,8 @@ am__recursive_targets = \ |
157 | $(am__extra_recursive_targets) |
158 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ |
159 | cscope distdir distdir-am dist dist-all distcheck |
160 | -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ |
161 | - $(LISP)config.h.in |
162 | +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ |
163 | + config.h.in |
164 | # Read a list of newline-separated strings from the standard input, |
165 | # and print each of them once, without duplicates. Input order is |
166 | # *not* preserved. |
167 | @@ -1260,9 +1260,6 @@ am__define_uniq_tagged_files = \ |
168 | unique=`for i in $$list; do \ |
169 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
170 | done | $(am__uniquify_input)` |
171 | -ETAGS = etags |
172 | -CTAGS = ctags |
173 | -CSCOPE = cscope |
174 | DIST_SUBDIRS = $(SUBDIRS) |
175 | am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Documentation/automake.mk \ |
176 | $(srcdir)/Makefile.in $(srcdir)/build-aux/automake.mk \ |
177 | @@ -1347,6 +1344,8 @@ am__relativize = \ |
178 | DIST_ARCHIVES = $(distdir).tar.gz |
179 | GZIP_ENV = --best |
180 | DIST_TARGETS = dist-gzip |
181 | +# Exists only to be overridden by the user if desired. |
182 | +AM_DISTCHECK_DVI_TARGET = dvi |
183 | distuninstallcheck_listfiles = find . -type f -print |
184 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ |
185 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' |
186 | @@ -1367,6 +1366,8 @@ CFLAGS = @CFLAGS@ |
187 | CGCCFLAGS = @CGCCFLAGS@ |
188 | CPP = @CPP@ |
189 | CPPFLAGS = @CPPFLAGS@ |
190 | +CSCOPE = @CSCOPE@ |
191 | +CTAGS = @CTAGS@ |
192 | CXX = @CXX@ |
193 | CXXCPP = @CXXCPP@ |
194 | CXXDEPMODE = @CXXDEPMODE@ |
195 | @@ -1385,8 +1386,10 @@ ECHO_C = @ECHO_C@ |
196 | ECHO_N = @ECHO_N@ |
197 | ECHO_T = @ECHO_T@ |
198 | EGREP = @EGREP@ |
199 | +ETAGS = @ETAGS@ |
200 | EXEEXT = @EXEEXT@ |
201 | FGREP = @FGREP@ |
202 | +FILECMD = @FILECMD@ |
203 | FLAKE8_WERROR = @FLAKE8_WERROR@ |
204 | GREP = @GREP@ |
205 | HAVE_CXX11 = @HAVE_CXX11@ |
206 | @@ -1521,6 +1524,7 @@ pdfdir = @pdfdir@ |
207 | prefix = @prefix@ |
208 | program_transform_name = @program_transform_name@ |
209 | psdir = @psdir@ |
210 | +runstatedir = @runstatedir@ |
211 | sbindir = @sbindir@ |
212 | sharedstatedir = @sharedstatedir@ |
213 | srcdir = @srcdir@ |
214 | @@ -2625,7 +2629,8 @@ TESTSUITE_AT = \ |
215 | tests/mcast-snooping.at \ |
216 | tests/packet-type-aware.at \ |
217 | tests/nsh.at \ |
218 | - tests/drop-stats.at |
219 | + tests/drop-stats.at \ |
220 | + tests/learning-switch.at |
221 | |
222 | FUZZ_REGRESSION_TESTS = \ |
223 | tests/fuzz-regression/flow_extract_fuzzer-5112775280951296 \ |
224 | @@ -5500,7 +5505,6 @@ cscopelist-am: $(am__tagged_files) |
225 | distclean-tags: |
226 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
227 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files |
228 | - |
229 | distdir: $(BUILT_SOURCES) |
230 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
231 | |
232 | @@ -5587,6 +5591,10 @@ dist-xz: distdir |
233 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz |
234 | $(am__post_remove_distdir) |
235 | |
236 | +dist-zstd: distdir |
237 | + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst |
238 | + $(am__post_remove_distdir) |
239 | + |
240 | dist-tarZ: distdir |
241 | @echo WARNING: "Support for distribution archives compressed with" \ |
242 | "legacy program 'compress' is deprecated." >&2 |
243 | @@ -5629,6 +5637,8 @@ distcheck: dist |
244 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ |
245 | *.zip*) \ |
246 | unzip $(distdir).zip ;;\ |
247 | + *.tar.zst*) \ |
248 | + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ |
249 | esac |
250 | chmod -R a-w $(distdir) |
251 | chmod u+w $(distdir) |
252 | @@ -5644,7 +5654,7 @@ distcheck: dist |
253 | $(DISTCHECK_CONFIGURE_FLAGS) \ |
254 | --srcdir=../.. --prefix="$$dc_install_base" \ |
255 | && $(MAKE) $(AM_MAKEFLAGS) \ |
256 | - && $(MAKE) $(AM_MAKEFLAGS) dvi \ |
257 | + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ |
258 | && $(MAKE) $(AM_MAKEFLAGS) check \ |
259 | && $(MAKE) $(AM_MAKEFLAGS) install \ |
260 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ |
261 | @@ -5702,8 +5712,12 @@ check: $(BUILT_SOURCES) |
262 | $(MAKE) $(AM_MAKEFLAGS) check-recursive |
263 | all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \ |
264 | $(HEADERS) config.h all-local |
265 | +install-EXTRAPROGRAMS: install-libLTLIBRARIES |
266 | + |
267 | install-binPROGRAMS: install-libLTLIBRARIES |
268 | |
269 | +install-sbinPROGRAMS: install-libLTLIBRARIES |
270 | + |
271 | installdirs: installdirs-recursive |
272 | installdirs-am: |
273 | for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(completiondir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(openflowincludedir)" "$(DESTDIR)$(openvswitchincludedir)"; do \ |
274 | @@ -5711,7 +5725,8 @@ installdirs-am: |
275 | done |
276 | install: $(BUILT_SOURCES) |
277 | $(MAKE) $(AM_MAKEFLAGS) install-recursive |
278 | -install-exec: install-exec-recursive |
279 | +install-exec: $(BUILT_SOURCES) |
280 | + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive |
281 | install-data: install-data-recursive |
282 | uninstall: uninstall-recursive |
283 | |
284 | @@ -6539,7 +6554,7 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man7 \ |
285 | uninstall-man8 |
286 | |
287 | .MAKE: $(am__recursive_targets) all check check-am install install-am \ |
288 | - install-strip |
289 | + install-exec install-strip |
290 | |
291 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ |
292 | am--depfiles am--refresh check check-am check-local clean \ |
293 | @@ -6548,7 +6563,7 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man7 \ |
294 | clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ |
295 | clean-sbinPROGRAMS cscope cscopelist-am ctags ctags-am dist \ |
296 | dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ |
297 | - dist-tarZ dist-xz dist-zip distcheck distclean \ |
298 | + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ |
299 | distclean-compile distclean-generic distclean-hdr \ |
300 | distclean-libtool distclean-tags distcleancheck distdir \ |
301 | distuninstallcheck dvi dvi-am html html-am info info-am \ |
302 | diff --git a/NEWS b/NEWS |
303 | index 2ea9ac0..9c0f9c1 100644 |
304 | --- a/NEWS |
305 | +++ b/NEWS |
306 | @@ -1,3 +1,13 @@ |
307 | +v2.17.7 - 27 Jun 2023 |
308 | +--------------------- |
309 | + - Bug fixes |
310 | + |
311 | +v2.17.6 - 06 Apr 2023 |
312 | +--------------------- |
313 | + - Bug fixes |
314 | + - Security: |
315 | + * Fixed vulnerability CVE-2023-1668. |
316 | + |
317 | v2.17.5 - 20 Dec 2022 |
318 | --------------------- |
319 | - Bug fixes |
320 | diff --git a/aclocal.m4 b/aclocal.m4 |
321 | index 682f539..d11d4c3 100644 |
322 | --- a/aclocal.m4 |
323 | +++ b/aclocal.m4 |
324 | @@ -1,6 +1,6 @@ |
325 | -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- |
326 | +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- |
327 | |
328 | -# Copyright (C) 1996-2018 Free Software Foundation, Inc. |
329 | +# Copyright (C) 1996-2021 Free Software Foundation, Inc. |
330 | |
331 | # This file is free software; the Free Software Foundation |
332 | # gives unlimited permission to copy and/or distribute it, |
333 | @@ -14,13 +14,13 @@ |
334 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) |
335 | m4_ifndef([AC_AUTOCONF_VERSION], |
336 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
337 | -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, |
338 | -[m4_warning([this file was generated for autoconf 2.69. |
339 | +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, |
340 | +[m4_warning([this file was generated for autoconf 2.71. |
341 | You have another version of autoconf. It may work, but is not guaranteed to. |
342 | If you have problems, you may need to regenerate the build system entirely. |
343 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
344 | |
345 | -# Copyright (C) 2002-2018 Free Software Foundation, Inc. |
346 | +# Copyright (C) 2002-2021 Free Software Foundation, Inc. |
347 | # |
348 | # This file is free software; the Free Software Foundation |
349 | # gives unlimited permission to copy and/or distribute it, |
350 | @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], |
351 | [am__api_version='1.16' |
352 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
353 | dnl require some minimum version. Point them to the right macro. |
354 | -m4_if([$1], [1.16.1], [], |
355 | +m4_if([$1], [1.16.5], [], |
356 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
357 | ]) |
358 | |
359 | @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) |
360 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
361 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
362 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
363 | -[AM_AUTOMAKE_VERSION([1.16.1])dnl |
364 | +[AM_AUTOMAKE_VERSION([1.16.5])dnl |
365 | m4_ifndef([AC_AUTOCONF_VERSION], |
366 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
367 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
368 | |
369 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
370 | |
371 | -# Copyright (C) 2001-2018 Free Software Foundation, Inc. |
372 | +# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
373 | # |
374 | # This file is free software; the Free Software Foundation |
375 | # gives unlimited permission to copy and/or distribute it, |
376 | @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` |
377 | |
378 | # AM_CONDITIONAL -*- Autoconf -*- |
379 | |
380 | -# Copyright (C) 1997-2018 Free Software Foundation, Inc. |
381 | +# Copyright (C) 1997-2021 Free Software Foundation, Inc. |
382 | # |
383 | # This file is free software; the Free Software Foundation |
384 | # gives unlimited permission to copy and/or distribute it, |
385 | @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( |
386 | Usually this means the macro was only invoked conditionally.]]) |
387 | fi])]) |
388 | |
389 | -# Copyright (C) 1999-2018 Free Software Foundation, Inc. |
390 | +# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
391 | # |
392 | # This file is free software; the Free Software Foundation |
393 | # gives unlimited permission to copy and/or distribute it, |
394 | @@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl |
395 | |
396 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
397 | |
398 | -# Copyright (C) 1999-2018 Free Software Foundation, Inc. |
399 | +# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
400 | # |
401 | # This file is free software; the Free Software Foundation |
402 | # gives unlimited permission to copy and/or distribute it, |
403 | @@ -371,7 +371,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
404 | done |
405 | if test $am_rc -ne 0; then |
406 | AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments |
407 | - for automatic dependency tracking. Try re-running configure with the |
408 | + for automatic dependency tracking. If GNU make was not used, consider |
409 | + re-running the configure script with MAKE="gmake" (or whatever is |
410 | + necessary). You can also try re-running configure with the |
411 | '--disable-dependency-tracking' option to at least be able to build |
412 | the package (albeit without support for automatic dependency tracking).]) |
413 | fi |
414 | @@ -398,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
415 | |
416 | # Do all the work for Automake. -*- Autoconf -*- |
417 | |
418 | -# Copyright (C) 1996-2018 Free Software Foundation, Inc. |
419 | +# Copyright (C) 1996-2021 Free Software Foundation, Inc. |
420 | # |
421 | # This file is free software; the Free Software Foundation |
422 | # gives unlimited permission to copy and/or distribute it, |
423 | @@ -426,6 +428,10 @@ m4_defn([AC_PROG_CC]) |
424 | # release and drop the old call support. |
425 | AC_DEFUN([AM_INIT_AUTOMAKE], |
426 | [AC_PREREQ([2.65])dnl |
427 | +m4_ifdef([_$0_ALREADY_INIT], |
428 | + [m4_fatal([$0 expanded multiple times |
429 | +]m4_defn([_$0_ALREADY_INIT]))], |
430 | + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl |
431 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
432 | dnl the ones we care about. |
433 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
434 | @@ -462,7 +468,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
435 | [_AM_SET_OPTIONS([$1])dnl |
436 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
437 | m4_if( |
438 | - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), |
439 | + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), |
440 | [ok:ok],, |
441 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
442 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
443 | @@ -514,6 +520,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], |
444 | [m4_define([AC_PROG_OBJCXX], |
445 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl |
446 | ]) |
447 | +# Variables for tags utilities; see am/tags.am |
448 | +if test -z "$CTAGS"; then |
449 | + CTAGS=ctags |
450 | +fi |
451 | +AC_SUBST([CTAGS]) |
452 | +if test -z "$ETAGS"; then |
453 | + ETAGS=etags |
454 | +fi |
455 | +AC_SUBST([ETAGS]) |
456 | +if test -z "$CSCOPE"; then |
457 | + CSCOPE=cscope |
458 | +fi |
459 | +AC_SUBST([CSCOPE]) |
460 | + |
461 | AC_REQUIRE([AM_SILENT_RULES])dnl |
462 | dnl The testsuite driver may need to know about EXEEXT, so add the |
463 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This |
464 | @@ -595,7 +615,7 @@ for _am_header in $config_headers :; do |
465 | done |
466 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
467 | |
468 | -# Copyright (C) 2001-2018 Free Software Foundation, Inc. |
469 | +# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
470 | # |
471 | # This file is free software; the Free Software Foundation |
472 | # gives unlimited permission to copy and/or distribute it, |
473 | @@ -616,7 +636,7 @@ if test x"${install_sh+set}" != xset; then |
474 | fi |
475 | AC_SUBST([install_sh])]) |
476 | |
477 | -# Copyright (C) 2003-2018 Free Software Foundation, Inc. |
478 | +# Copyright (C) 2003-2021 Free Software Foundation, Inc. |
479 | # |
480 | # This file is free software; the Free Software Foundation |
481 | # gives unlimited permission to copy and/or distribute it, |
482 | @@ -637,7 +657,7 @@ AC_SUBST([am__leading_dot])]) |
483 | |
484 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
485 | |
486 | -# Copyright (C) 2001-2018 Free Software Foundation, Inc. |
487 | +# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
488 | # |
489 | # This file is free software; the Free Software Foundation |
490 | # gives unlimited permission to copy and/or distribute it, |
491 | @@ -680,7 +700,7 @@ AC_SUBST([am__quote])]) |
492 | |
493 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
494 | |
495 | -# Copyright (C) 1997-2018 Free Software Foundation, Inc. |
496 | +# Copyright (C) 1997-2021 Free Software Foundation, Inc. |
497 | # |
498 | # This file is free software; the Free Software Foundation |
499 | # gives unlimited permission to copy and/or distribute it, |
500 | @@ -701,12 +721,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN], |
501 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
502 | AC_REQUIRE_AUX_FILE([missing])dnl |
503 | if test x"${MISSING+set}" != xset; then |
504 | - case $am_aux_dir in |
505 | - *\ * | *\ *) |
506 | - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; |
507 | - *) |
508 | - MISSING="\${SHELL} $am_aux_dir/missing" ;; |
509 | - esac |
510 | + MISSING="\${SHELL} '$am_aux_dir/missing'" |
511 | fi |
512 | # Use eval to expand $SHELL |
513 | if eval "$MISSING --is-lightweight"; then |
514 | @@ -719,7 +734,7 @@ fi |
515 | |
516 | # Helper functions for option handling. -*- Autoconf -*- |
517 | |
518 | -# Copyright (C) 2001-2018 Free Software Foundation, Inc. |
519 | +# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
520 | # |
521 | # This file is free software; the Free Software Foundation |
522 | # gives unlimited permission to copy and/or distribute it, |
523 | @@ -748,7 +763,7 @@ AC_DEFUN([_AM_SET_OPTIONS], |
524 | AC_DEFUN([_AM_IF_OPTION], |
525 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
526 | |
527 | -# Copyright (C) 1999-2018 Free Software Foundation, Inc. |
528 | +# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
529 | # |
530 | # This file is free software; the Free Software Foundation |
531 | # gives unlimited permission to copy and/or distribute it, |
532 | @@ -795,7 +810,7 @@ AC_LANG_POP([C])]) |
533 | # For backward compatibility. |
534 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
535 | |
536 | -# Copyright (C) 2001-2018 Free Software Foundation, Inc. |
537 | +# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
538 | # |
539 | # This file is free software; the Free Software Foundation |
540 | # gives unlimited permission to copy and/or distribute it, |
541 | @@ -814,7 +829,7 @@ AC_DEFUN([AM_RUN_LOG], |
542 | |
543 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
544 | |
545 | -# Copyright (C) 1996-2018 Free Software Foundation, Inc. |
546 | +# Copyright (C) 1996-2021 Free Software Foundation, Inc. |
547 | # |
548 | # This file is free software; the Free Software Foundation |
549 | # gives unlimited permission to copy and/or distribute it, |
550 | @@ -895,7 +910,7 @@ AC_CONFIG_COMMANDS_PRE( |
551 | rm -f conftest.file |
552 | ]) |
553 | |
554 | -# Copyright (C) 2009-2018 Free Software Foundation, Inc. |
555 | +# Copyright (C) 2009-2021 Free Software Foundation, Inc. |
556 | # |
557 | # This file is free software; the Free Software Foundation |
558 | # gives unlimited permission to copy and/or distribute it, |
559 | @@ -955,7 +970,7 @@ AC_SUBST([AM_BACKSLASH])dnl |
560 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
561 | ]) |
562 | |
563 | -# Copyright (C) 2001-2018 Free Software Foundation, Inc. |
564 | +# Copyright (C) 2001-2021 Free Software Foundation, Inc. |
565 | # |
566 | # This file is free software; the Free Software Foundation |
567 | # gives unlimited permission to copy and/or distribute it, |
568 | @@ -983,7 +998,7 @@ fi |
569 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
570 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
571 | |
572 | -# Copyright (C) 2006-2018 Free Software Foundation, Inc. |
573 | +# Copyright (C) 2006-2021 Free Software Foundation, Inc. |
574 | # |
575 | # This file is free software; the Free Software Foundation |
576 | # gives unlimited permission to copy and/or distribute it, |
577 | @@ -1002,7 +1017,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
578 | |
579 | # Check how to create a tarball. -*- Autoconf -*- |
580 | |
581 | -# Copyright (C) 2004-2018 Free Software Foundation, Inc. |
582 | +# Copyright (C) 2004-2021 Free Software Foundation, Inc. |
583 | # |
584 | # This file is free software; the Free Software Foundation |
585 | # gives unlimited permission to copy and/or distribute it, |
586 | diff --git a/build-aux/compile b/build-aux/compile |
587 | index 99e5052..df363c8 100755 |
588 | --- a/build-aux/compile |
589 | +++ b/build-aux/compile |
590 | @@ -3,7 +3,7 @@ |
591 | |
592 | scriptversion=2018-03-07.03; # UTC |
593 | |
594 | -# Copyright (C) 1999-2018 Free Software Foundation, Inc. |
595 | +# Copyright (C) 1999-2021 Free Software Foundation, Inc. |
596 | # Written by Tom Tromey <tromey@cygnus.com>. |
597 | # |
598 | # This program is free software; you can redistribute it and/or modify |
599 | @@ -53,7 +53,7 @@ func_file_conv () |
600 | MINGW*) |
601 | file_conv=mingw |
602 | ;; |
603 | - CYGWIN*) |
604 | + CYGWIN* | MSYS*) |
605 | file_conv=cygwin |
606 | ;; |
607 | *) |
608 | @@ -67,7 +67,7 @@ func_file_conv () |
609 | mingw/*) |
610 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` |
611 | ;; |
612 | - cygwin/*) |
613 | + cygwin/* | msys/*) |
614 | file=`cygpath -m "$file" || echo "$file"` |
615 | ;; |
616 | wine/*) |
617 | diff --git a/build-aux/config.guess b/build-aux/config.guess |
618 | index 256083a..c7f17e8 100755 |
619 | --- a/build-aux/config.guess |
620 | +++ b/build-aux/config.guess |
621 | @@ -1,12 +1,14 @@ |
622 | -#! /bin/sh |
623 | +#!/usr/bin/sh |
624 | # Attempt to guess a canonical system name. |
625 | -# Copyright 1992-2018 Free Software Foundation, Inc. |
626 | +# Copyright 1992-2022 Free Software Foundation, Inc. |
627 | |
628 | -timestamp='2018-03-08' |
629 | +# shellcheck disable=SC2006,SC2268 # see below for rationale |
630 | + |
631 | +timestamp='2022-05-25' |
632 | |
633 | # This file is free software; you can redistribute it and/or modify it |
634 | # under the terms of the GNU General Public License as published by |
635 | -# the Free Software Foundation; either version 3 of the License, or |
636 | +# the Free Software Foundation, either version 3 of the License, or |
637 | # (at your option) any later version. |
638 | # |
639 | # This program is distributed in the hope that it will be useful, but |
640 | @@ -27,11 +29,19 @@ timestamp='2018-03-08' |
641 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
642 | # |
643 | # You can get the latest version of this script from: |
644 | -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
645 | +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
646 | # |
647 | # Please send patches to <config-patches@gnu.org>. |
648 | |
649 | |
650 | +# The "shellcheck disable" line above the timestamp inhibits complaints |
651 | +# about features and limitations of the classic Bourne shell that were |
652 | +# superseded or lifted in POSIX. However, this script identifies a wide |
653 | +# variety of pre-POSIX systems that do not have POSIX shells at all, and |
654 | +# even some reasonably current systems (Solaris 10 as case-in-point) still |
655 | +# have a pre-POSIX /bin/sh. |
656 | + |
657 | + |
658 | me=`echo "$0" | sed -e 's,.*/,,'` |
659 | |
660 | usage="\ |
661 | @@ -50,7 +60,7 @@ version="\ |
662 | GNU config.guess ($timestamp) |
663 | |
664 | Originally written by Per Bothner. |
665 | -Copyright 1992-2018 Free Software Foundation, Inc. |
666 | +Copyright 1992-2022 Free Software Foundation, Inc. |
667 | |
668 | This is free software; see the source for copying conditions. There is NO |
669 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
670 | @@ -84,7 +94,8 @@ if test $# != 0; then |
671 | exit 1 |
672 | fi |
673 | |
674 | -trap 'exit 1' 1 2 15 |
675 | +# Just in case it came from the environment. |
676 | +GUESS= |
677 | |
678 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
679 | # compiler to aid in system detection is discouraged as it requires |
680 | @@ -96,73 +107,90 @@ trap 'exit 1' 1 2 15 |
681 | |
682 | # Portable tmp directory creation inspired by the Autoconf team. |
683 | |
684 | -set_cc_for_build=' |
685 | -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; |
686 | -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; |
687 | -: ${TMPDIR=/tmp} ; |
688 | - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
689 | - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || |
690 | - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || |
691 | - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; |
692 | -dummy=$tmp/dummy ; |
693 | -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; |
694 | -case $CC_FOR_BUILD,$HOST_CC,$CC in |
695 | - ,,) echo "int x;" > "$dummy.c" ; |
696 | - for c in cc gcc c89 c99 ; do |
697 | - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then |
698 | - CC_FOR_BUILD="$c"; break ; |
699 | - fi ; |
700 | - done ; |
701 | - if test x"$CC_FOR_BUILD" = x ; then |
702 | - CC_FOR_BUILD=no_compiler_found ; |
703 | - fi |
704 | - ;; |
705 | - ,,*) CC_FOR_BUILD=$CC ;; |
706 | - ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
707 | -esac ; set_cc_for_build= ;' |
708 | +tmp= |
709 | +# shellcheck disable=SC2172 |
710 | +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 |
711 | + |
712 | +set_cc_for_build() { |
713 | + # prevent multiple calls if $tmp is already set |
714 | + test "$tmp" && return 0 |
715 | + : "${TMPDIR=/tmp}" |
716 | + # shellcheck disable=SC2039,SC3028 |
717 | + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
718 | + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || |
719 | + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || |
720 | + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } |
721 | + dummy=$tmp/dummy |
722 | + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in |
723 | + ,,) echo "int x;" > "$dummy.c" |
724 | + for driver in cc gcc c89 c99 ; do |
725 | + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then |
726 | + CC_FOR_BUILD=$driver |
727 | + break |
728 | + fi |
729 | + done |
730 | + if test x"$CC_FOR_BUILD" = x ; then |
731 | + CC_FOR_BUILD=no_compiler_found |
732 | + fi |
733 | + ;; |
734 | + ,,*) CC_FOR_BUILD=$CC ;; |
735 | + ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
736 | + esac |
737 | +} |
738 | |
739 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
740 | # (ghazi@noc.rutgers.edu 1994-08-24) |
741 | -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
742 | +if test -f /.attbin/uname ; then |
743 | PATH=$PATH:/.attbin ; export PATH |
744 | fi |
745 | |
746 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
747 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
748 | -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
749 | +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
750 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
751 | |
752 | -case "$UNAME_SYSTEM" in |
753 | +case $UNAME_SYSTEM in |
754 | Linux|GNU|GNU/*) |
755 | - # If the system lacks a compiler, then just pick glibc. |
756 | - # We could probably try harder. |
757 | - LIBC=gnu |
758 | + LIBC=unknown |
759 | |
760 | - eval "$set_cc_for_build" |
761 | + set_cc_for_build |
762 | cat <<-EOF > "$dummy.c" |
763 | #include <features.h> |
764 | #if defined(__UCLIBC__) |
765 | LIBC=uclibc |
766 | #elif defined(__dietlibc__) |
767 | LIBC=dietlibc |
768 | - #else |
769 | + #elif defined(__GLIBC__) |
770 | LIBC=gnu |
771 | + #else |
772 | + #include <stdarg.h> |
773 | + /* First heuristic to detect musl libc. */ |
774 | + #ifdef __DEFINED_va_list |
775 | + LIBC=musl |
776 | + #endif |
777 | #endif |
778 | EOF |
779 | - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" |
780 | + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
781 | + eval "$cc_set_libc" |
782 | |
783 | - # If ldd exists, use it to detect musl libc. |
784 | - if command -v ldd >/dev/null && \ |
785 | - ldd --version 2>&1 | grep -q ^musl |
786 | - then |
787 | - LIBC=musl |
788 | + # Second heuristic to detect musl libc. |
789 | + if [ "$LIBC" = unknown ] && |
790 | + command -v ldd >/dev/null && |
791 | + ldd --version 2>&1 | grep -q ^musl; then |
792 | + LIBC=musl |
793 | + fi |
794 | + |
795 | + # If the system lacks a compiler, then just pick glibc. |
796 | + # We could probably try harder. |
797 | + if [ "$LIBC" = unknown ]; then |
798 | + LIBC=gnu |
799 | fi |
800 | ;; |
801 | esac |
802 | |
803 | # Note: order is significant - the case branches are not exclusive. |
804 | |
805 | -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
806 | +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in |
807 | *:NetBSD:*:*) |
808 | # NetBSD (nbsd) targets should (where applicable) match one or |
809 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
810 | @@ -174,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
811 | # |
812 | # Note: NetBSD doesn't particularly care about the vendor |
813 | # portion of the name. We always set it to "unknown". |
814 | - sysctl="sysctl -n hw.machine_arch" |
815 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
816 | - "/sbin/$sysctl" 2>/dev/null || \ |
817 | - "/usr/sbin/$sysctl" 2>/dev/null || \ |
818 | + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
819 | + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
820 | echo unknown)` |
821 | - case "$UNAME_MACHINE_ARCH" in |
822 | + case $UNAME_MACHINE_ARCH in |
823 | + aarch64eb) machine=aarch64_be-unknown ;; |
824 | armeb) machine=armeb-unknown ;; |
825 | arm*) machine=arm-unknown ;; |
826 | sh3el) machine=shl-unknown ;; |
827 | @@ -188,18 +216,18 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
828 | earmv*) |
829 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
830 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
831 | - machine="${arch}${endian}"-unknown |
832 | + machine=${arch}${endian}-unknown |
833 | ;; |
834 | - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; |
835 | + *) machine=$UNAME_MACHINE_ARCH-unknown ;; |
836 | esac |
837 | # The Operating System including object format, if it has switched |
838 | # to ELF recently (or will in the future) and ABI. |
839 | - case "$UNAME_MACHINE_ARCH" in |
840 | + case $UNAME_MACHINE_ARCH in |
841 | earm*) |
842 | os=netbsdelf |
843 | ;; |
844 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
845 | - eval "$set_cc_for_build" |
846 | + set_cc_for_build |
847 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
848 | | grep -q __ELF__ |
849 | then |
850 | @@ -215,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
851 | ;; |
852 | esac |
853 | # Determine ABI tags. |
854 | - case "$UNAME_MACHINE_ARCH" in |
855 | + case $UNAME_MACHINE_ARCH in |
856 | earm*) |
857 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
858 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
859 | @@ -226,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
860 | # thus, need a distinct triplet. However, they do not need |
861 | # kernel version information, so it can be replaced with a |
862 | # suitable tag, in the style of linux-gnu. |
863 | - case "$UNAME_VERSION" in |
864 | + case $UNAME_VERSION in |
865 | Debian*) |
866 | release='-gnu' |
867 | ;; |
868 | @@ -237,45 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
869 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
870 | # contains redundant information, the shorter form: |
871 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
872 | - echo "$machine-${os}${release}${abi}" |
873 | - exit ;; |
874 | + GUESS=$machine-${os}${release}${abi-} |
875 | + ;; |
876 | *:Bitrig:*:*) |
877 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
878 | - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" |
879 | - exit ;; |
880 | + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE |
881 | + ;; |
882 | *:OpenBSD:*:*) |
883 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
884 | - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" |
885 | - exit ;; |
886 | + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE |
887 | + ;; |
888 | + *:SecBSD:*:*) |
889 | + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` |
890 | + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE |
891 | + ;; |
892 | *:LibertyBSD:*:*) |
893 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
894 | - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" |
895 | - exit ;; |
896 | + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE |
897 | + ;; |
898 | *:MidnightBSD:*:*) |
899 | - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" |
900 | - exit ;; |
901 | + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE |
902 | + ;; |
903 | *:ekkoBSD:*:*) |
904 | - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" |
905 | - exit ;; |
906 | + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE |
907 | + ;; |
908 | *:SolidBSD:*:*) |
909 | - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" |
910 | - exit ;; |
911 | + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE |
912 | + ;; |
913 | + *:OS108:*:*) |
914 | + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE |
915 | + ;; |
916 | macppc:MirBSD:*:*) |
917 | - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" |
918 | - exit ;; |
919 | + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE |
920 | + ;; |
921 | *:MirBSD:*:*) |
922 | - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" |
923 | - exit ;; |
924 | + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE |
925 | + ;; |
926 | *:Sortix:*:*) |
927 | - echo "$UNAME_MACHINE"-unknown-sortix |
928 | - exit ;; |
929 | + GUESS=$UNAME_MACHINE-unknown-sortix |
930 | + ;; |
931 | + *:Twizzler:*:*) |
932 | + GUESS=$UNAME_MACHINE-unknown-twizzler |
933 | + ;; |
934 | *:Redox:*:*) |
935 | - echo "$UNAME_MACHINE"-unknown-redox |
936 | - exit ;; |
937 | + GUESS=$UNAME_MACHINE-unknown-redox |
938 | + ;; |
939 | mips:OSF1:*.*) |
940 | - echo mips-dec-osf1 |
941 | - exit ;; |
942 | + GUESS=mips-dec-osf1 |
943 | + ;; |
944 | alpha:OSF1:*:*) |
945 | + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
946 | + trap '' 0 |
947 | case $UNAME_RELEASE in |
948 | *4.0) |
949 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
950 | @@ -289,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
951 | # covers most systems running today. This code pipes the CPU |
952 | # types through head -n 1, so we only detect the type of CPU 0. |
953 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
954 | - case "$ALPHA_CPU_TYPE" in |
955 | + case $ALPHA_CPU_TYPE in |
956 | "EV4 (21064)") |
957 | UNAME_MACHINE=alpha ;; |
958 | "EV4.5 (21064)") |
959 | @@ -326,117 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
960 | # A Tn.n version is a released field test version. |
961 | # A Xn.n version is an unreleased experimental baselevel. |
962 | # 1.2 uses "1.2" for uname -r. |
963 | - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" |
964 | - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
965 | - exitcode=$? |
966 | - trap '' 0 |
967 | - exit $exitcode ;; |
968 | + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
969 | + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL |
970 | + ;; |
971 | Amiga*:UNIX_System_V:4.0:*) |
972 | - echo m68k-unknown-sysv4 |
973 | - exit ;; |
974 | + GUESS=m68k-unknown-sysv4 |
975 | + ;; |
976 | *:[Aa]miga[Oo][Ss]:*:*) |
977 | - echo "$UNAME_MACHINE"-unknown-amigaos |
978 | - exit ;; |
979 | + GUESS=$UNAME_MACHINE-unknown-amigaos |
980 | + ;; |
981 | *:[Mm]orph[Oo][Ss]:*:*) |
982 | - echo "$UNAME_MACHINE"-unknown-morphos |
983 | - exit ;; |
984 | + GUESS=$UNAME_MACHINE-unknown-morphos |
985 | + ;; |
986 | *:OS/390:*:*) |
987 | - echo i370-ibm-openedition |
988 | - exit ;; |
989 | + GUESS=i370-ibm-openedition |
990 | + ;; |
991 | *:z/VM:*:*) |
992 | - echo s390-ibm-zvmoe |
993 | - exit ;; |
994 | + GUESS=s390-ibm-zvmoe |
995 | + ;; |
996 | *:OS400:*:*) |
997 | - echo powerpc-ibm-os400 |
998 | - exit ;; |
999 | + GUESS=powerpc-ibm-os400 |
1000 | + ;; |
1001 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
1002 | - echo arm-acorn-riscix"$UNAME_RELEASE" |
1003 | - exit ;; |
1004 | + GUESS=arm-acorn-riscix$UNAME_RELEASE |
1005 | + ;; |
1006 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
1007 | - echo arm-unknown-riscos |
1008 | - exit ;; |
1009 | + GUESS=arm-unknown-riscos |
1010 | + ;; |
1011 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
1012 | - echo hppa1.1-hitachi-hiuxmpp |
1013 | - exit ;; |
1014 | + GUESS=hppa1.1-hitachi-hiuxmpp |
1015 | + ;; |
1016 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
1017 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. |
1018 | - if test "`(/bin/universe) 2>/dev/null`" = att ; then |
1019 | - echo pyramid-pyramid-sysv3 |
1020 | - else |
1021 | - echo pyramid-pyramid-bsd |
1022 | - fi |
1023 | - exit ;; |
1024 | + case `(/bin/universe) 2>/dev/null` in |
1025 | + att) GUESS=pyramid-pyramid-sysv3 ;; |
1026 | + *) GUESS=pyramid-pyramid-bsd ;; |
1027 | + esac |
1028 | + ;; |
1029 | NILE*:*:*:dcosx) |
1030 | - echo pyramid-pyramid-svr4 |
1031 | - exit ;; |
1032 | + GUESS=pyramid-pyramid-svr4 |
1033 | + ;; |
1034 | DRS?6000:unix:4.0:6*) |
1035 | - echo sparc-icl-nx6 |
1036 | - exit ;; |
1037 | + GUESS=sparc-icl-nx6 |
1038 | + ;; |
1039 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
1040 | case `/usr/bin/uname -p` in |
1041 | - sparc) echo sparc-icl-nx7; exit ;; |
1042 | - esac ;; |
1043 | + sparc) GUESS=sparc-icl-nx7 ;; |
1044 | + esac |
1045 | + ;; |
1046 | s390x:SunOS:*:*) |
1047 | - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" |
1048 | - exit ;; |
1049 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
1050 | + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL |
1051 | + ;; |
1052 | sun4H:SunOS:5.*:*) |
1053 | - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
1054 | - exit ;; |
1055 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
1056 | + GUESS=sparc-hal-solaris2$SUN_REL |
1057 | + ;; |
1058 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
1059 | - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" |
1060 | - exit ;; |
1061 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
1062 | + GUESS=sparc-sun-solaris2$SUN_REL |
1063 | + ;; |
1064 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
1065 | - echo i386-pc-auroraux"$UNAME_RELEASE" |
1066 | - exit ;; |
1067 | + GUESS=i386-pc-auroraux$UNAME_RELEASE |
1068 | + ;; |
1069 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
1070 | - eval "$set_cc_for_build" |
1071 | + set_cc_for_build |
1072 | SUN_ARCH=i386 |
1073 | # If there is a compiler, see if it is configured for 64-bit objects. |
1074 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
1075 | # This test works for both compilers. |
1076 | - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
1077 | + if test "$CC_FOR_BUILD" != no_compiler_found; then |
1078 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1079 | - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
1080 | + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ |
1081 | grep IS_64BIT_ARCH >/dev/null |
1082 | then |
1083 | SUN_ARCH=x86_64 |
1084 | fi |
1085 | fi |
1086 | - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
1087 | - exit ;; |
1088 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
1089 | + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL |
1090 | + ;; |
1091 | sun4*:SunOS:6*:*) |
1092 | # According to config.sub, this is the proper way to canonicalize |
1093 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
1094 | # it's likely to be more like Solaris than SunOS4. |
1095 | - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
1096 | - exit ;; |
1097 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
1098 | + GUESS=sparc-sun-solaris3$SUN_REL |
1099 | + ;; |
1100 | sun4*:SunOS:*:*) |
1101 | - case "`/usr/bin/arch -k`" in |
1102 | + case `/usr/bin/arch -k` in |
1103 | Series*|S4*) |
1104 | UNAME_RELEASE=`uname -v` |
1105 | ;; |
1106 | esac |
1107 | # Japanese Language versions have a version number like `4.1.3-JL'. |
1108 | - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" |
1109 | - exit ;; |
1110 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` |
1111 | + GUESS=sparc-sun-sunos$SUN_REL |
1112 | + ;; |
1113 | sun3*:SunOS:*:*) |
1114 | - echo m68k-sun-sunos"$UNAME_RELEASE" |
1115 | - exit ;; |
1116 | + GUESS=m68k-sun-sunos$UNAME_RELEASE |
1117 | + ;; |
1118 | sun*:*:4.2BSD:*) |
1119 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
1120 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
1121 | - case "`/bin/arch`" in |
1122 | + case `/bin/arch` in |
1123 | sun3) |
1124 | - echo m68k-sun-sunos"$UNAME_RELEASE" |
1125 | + GUESS=m68k-sun-sunos$UNAME_RELEASE |
1126 | ;; |
1127 | sun4) |
1128 | - echo sparc-sun-sunos"$UNAME_RELEASE" |
1129 | + GUESS=sparc-sun-sunos$UNAME_RELEASE |
1130 | ;; |
1131 | esac |
1132 | - exit ;; |
1133 | + ;; |
1134 | aushp:SunOS:*:*) |
1135 | - echo sparc-auspex-sunos"$UNAME_RELEASE" |
1136 | - exit ;; |
1137 | + GUESS=sparc-auspex-sunos$UNAME_RELEASE |
1138 | + ;; |
1139 | # The situation for MiNT is a little confusing. The machine name |
1140 | # can be virtually everything (everything which is not |
1141 | # "atarist" or "atariste" at least should have a processor |
1142 | @@ -446,43 +490,43 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
1143 | # MiNT. But MiNT is downward compatible to TOS, so this should |
1144 | # be no problem. |
1145 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
1146 | - echo m68k-atari-mint"$UNAME_RELEASE" |
1147 | - exit ;; |
1148 | + GUESS=m68k-atari-mint$UNAME_RELEASE |
1149 | + ;; |
1150 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
1151 | - echo m68k-atari-mint"$UNAME_RELEASE" |
1152 | - exit ;; |
1153 | + GUESS=m68k-atari-mint$UNAME_RELEASE |
1154 | + ;; |
1155 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
1156 | - echo m68k-atari-mint"$UNAME_RELEASE" |
1157 | - exit ;; |
1158 | + GUESS=m68k-atari-mint$UNAME_RELEASE |
1159 | + ;; |
1160 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
1161 | - echo m68k-milan-mint"$UNAME_RELEASE" |
1162 | - exit ;; |
1163 | + GUESS=m68k-milan-mint$UNAME_RELEASE |
1164 | + ;; |
1165 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
1166 | - echo m68k-hades-mint"$UNAME_RELEASE" |
1167 | - exit ;; |
1168 | + GUESS=m68k-hades-mint$UNAME_RELEASE |
1169 | + ;; |
1170 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
1171 | - echo m68k-unknown-mint"$UNAME_RELEASE" |
1172 | - exit ;; |
1173 | + GUESS=m68k-unknown-mint$UNAME_RELEASE |
1174 | + ;; |
1175 | m68k:machten:*:*) |
1176 | - echo m68k-apple-machten"$UNAME_RELEASE" |
1177 | - exit ;; |
1178 | + GUESS=m68k-apple-machten$UNAME_RELEASE |
1179 | + ;; |
1180 | powerpc:machten:*:*) |
1181 | - echo powerpc-apple-machten"$UNAME_RELEASE" |
1182 | - exit ;; |
1183 | + GUESS=powerpc-apple-machten$UNAME_RELEASE |
1184 | + ;; |
1185 | RISC*:Mach:*:*) |
1186 | - echo mips-dec-mach_bsd4.3 |
1187 | - exit ;; |
1188 | + GUESS=mips-dec-mach_bsd4.3 |
1189 | + ;; |
1190 | RISC*:ULTRIX:*:*) |
1191 | - echo mips-dec-ultrix"$UNAME_RELEASE" |
1192 | - exit ;; |
1193 | + GUESS=mips-dec-ultrix$UNAME_RELEASE |
1194 | + ;; |
1195 | VAX*:ULTRIX*:*:*) |
1196 | - echo vax-dec-ultrix"$UNAME_RELEASE" |
1197 | - exit ;; |
1198 | + GUESS=vax-dec-ultrix$UNAME_RELEASE |
1199 | + ;; |
1200 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
1201 | - echo clipper-intergraph-clix"$UNAME_RELEASE" |
1202 | - exit ;; |
1203 | + GUESS=clipper-intergraph-clix$UNAME_RELEASE |
1204 | + ;; |
1205 | mips:*:*:UMIPS | mips:*:*:RISCos) |
1206 | - eval "$set_cc_for_build" |
1207 | + set_cc_for_build |
1208 | sed 's/^ //' << EOF > "$dummy.c" |
1209 | #ifdef __cplusplus |
1210 | #include <stdio.h> /* for printf() prototype */ |
1211 | @@ -508,78 +552,79 @@ EOF |
1212 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
1213 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
1214 | { echo "$SYSTEM_NAME"; exit; } |
1215 | - echo mips-mips-riscos"$UNAME_RELEASE" |
1216 | - exit ;; |
1217 | + GUESS=mips-mips-riscos$UNAME_RELEASE |
1218 | + ;; |
1219 | Motorola:PowerMAX_OS:*:*) |
1220 | - echo powerpc-motorola-powermax |
1221 | - exit ;; |
1222 | + GUESS=powerpc-motorola-powermax |
1223 | + ;; |
1224 | Motorola:*:4.3:PL8-*) |
1225 | - echo powerpc-harris-powermax |
1226 | - exit ;; |
1227 | + GUESS=powerpc-harris-powermax |
1228 | + ;; |
1229 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
1230 | - echo powerpc-harris-powermax |
1231 | - exit ;; |
1232 | + GUESS=powerpc-harris-powermax |
1233 | + ;; |
1234 | Night_Hawk:Power_UNIX:*:*) |
1235 | - echo powerpc-harris-powerunix |
1236 | - exit ;; |
1237 | + GUESS=powerpc-harris-powerunix |
1238 | + ;; |
1239 | m88k:CX/UX:7*:*) |
1240 | - echo m88k-harris-cxux7 |
1241 | - exit ;; |
1242 | + GUESS=m88k-harris-cxux7 |
1243 | + ;; |
1244 | m88k:*:4*:R4*) |
1245 | - echo m88k-motorola-sysv4 |
1246 | - exit ;; |
1247 | + GUESS=m88k-motorola-sysv4 |
1248 | + ;; |
1249 | m88k:*:3*:R3*) |
1250 | - echo m88k-motorola-sysv3 |
1251 | - exit ;; |
1252 | + GUESS=m88k-motorola-sysv3 |
1253 | + ;; |
1254 | AViiON:dgux:*:*) |
1255 | # DG/UX returns AViiON for all architectures |
1256 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
1257 | - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] |
1258 | + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 |
1259 | then |
1260 | - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ |
1261 | - [ "$TARGET_BINARY_INTERFACE"x = x ] |
1262 | + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ |
1263 | + test "$TARGET_BINARY_INTERFACE"x = x |
1264 | then |
1265 | - echo m88k-dg-dgux"$UNAME_RELEASE" |
1266 | + GUESS=m88k-dg-dgux$UNAME_RELEASE |
1267 | else |
1268 | - echo m88k-dg-dguxbcs"$UNAME_RELEASE" |
1269 | + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE |
1270 | fi |
1271 | else |
1272 | - echo i586-dg-dgux"$UNAME_RELEASE" |
1273 | + GUESS=i586-dg-dgux$UNAME_RELEASE |
1274 | fi |
1275 | - exit ;; |
1276 | + ;; |
1277 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
1278 | - echo m88k-dolphin-sysv3 |
1279 | - exit ;; |
1280 | + GUESS=m88k-dolphin-sysv3 |
1281 | + ;; |
1282 | M88*:*:R3*:*) |
1283 | # Delta 88k system running SVR3 |
1284 | - echo m88k-motorola-sysv3 |
1285 | - exit ;; |
1286 | + GUESS=m88k-motorola-sysv3 |
1287 | + ;; |
1288 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
1289 | - echo m88k-tektronix-sysv3 |
1290 | - exit ;; |
1291 | + GUESS=m88k-tektronix-sysv3 |
1292 | + ;; |
1293 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
1294 | - echo m68k-tektronix-bsd |
1295 | - exit ;; |
1296 | + GUESS=m68k-tektronix-bsd |
1297 | + ;; |
1298 | *:IRIX*:*:*) |
1299 | - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" |
1300 | - exit ;; |
1301 | + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` |
1302 | + GUESS=mips-sgi-irix$IRIX_REL |
1303 | + ;; |
1304 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
1305 | - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
1306 | - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
1307 | + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
1308 | + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
1309 | i*86:AIX:*:*) |
1310 | - echo i386-ibm-aix |
1311 | - exit ;; |
1312 | + GUESS=i386-ibm-aix |
1313 | + ;; |
1314 | ia64:AIX:*:*) |
1315 | - if [ -x /usr/bin/oslevel ] ; then |
1316 | + if test -x /usr/bin/oslevel ; then |
1317 | IBM_REV=`/usr/bin/oslevel` |
1318 | else |
1319 | - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
1320 | + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
1321 | fi |
1322 | - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" |
1323 | - exit ;; |
1324 | + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV |
1325 | + ;; |
1326 | *:AIX:2:3) |
1327 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
1328 | - eval "$set_cc_for_build" |
1329 | + set_cc_for_build |
1330 | sed 's/^ //' << EOF > "$dummy.c" |
1331 | #include <sys/systemcfg.h> |
1332 | |
1333 | @@ -593,16 +638,16 @@ EOF |
1334 | EOF |
1335 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
1336 | then |
1337 | - echo "$SYSTEM_NAME" |
1338 | + GUESS=$SYSTEM_NAME |
1339 | else |
1340 | - echo rs6000-ibm-aix3.2.5 |
1341 | + GUESS=rs6000-ibm-aix3.2.5 |
1342 | fi |
1343 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
1344 | - echo rs6000-ibm-aix3.2.4 |
1345 | + GUESS=rs6000-ibm-aix3.2.4 |
1346 | else |
1347 | - echo rs6000-ibm-aix3.2 |
1348 | + GUESS=rs6000-ibm-aix3.2 |
1349 | fi |
1350 | - exit ;; |
1351 | + ;; |
1352 | *:AIX:*:[4567]) |
1353 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
1354 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
1355 | @@ -610,57 +655,57 @@ EOF |
1356 | else |
1357 | IBM_ARCH=powerpc |
1358 | fi |
1359 | - if [ -x /usr/bin/lslpp ] ; then |
1360 | - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | |
1361 | + if test -x /usr/bin/lslpp ; then |
1362 | + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ |
1363 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
1364 | else |
1365 | - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
1366 | + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
1367 | fi |
1368 | - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" |
1369 | - exit ;; |
1370 | + GUESS=$IBM_ARCH-ibm-aix$IBM_REV |
1371 | + ;; |
1372 | *:AIX:*:*) |
1373 | - echo rs6000-ibm-aix |
1374 | - exit ;; |
1375 | + GUESS=rs6000-ibm-aix |
1376 | + ;; |
1377 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
1378 | - echo romp-ibm-bsd4.4 |
1379 | - exit ;; |
1380 | + GUESS=romp-ibm-bsd4.4 |
1381 | + ;; |
1382 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
1383 | - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to |
1384 | - exit ;; # report: romp-ibm BSD 4.3 |
1385 | + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to |
1386 | + ;; # report: romp-ibm BSD 4.3 |
1387 | *:BOSX:*:*) |
1388 | - echo rs6000-bull-bosx |
1389 | - exit ;; |
1390 | + GUESS=rs6000-bull-bosx |
1391 | + ;; |
1392 | DPX/2?00:B.O.S.:*:*) |
1393 | - echo m68k-bull-sysv3 |
1394 | - exit ;; |
1395 | + GUESS=m68k-bull-sysv3 |
1396 | + ;; |
1397 | 9000/[34]??:4.3bsd:1.*:*) |
1398 | - echo m68k-hp-bsd |
1399 | - exit ;; |
1400 | + GUESS=m68k-hp-bsd |
1401 | + ;; |
1402 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
1403 | - echo m68k-hp-bsd4.4 |
1404 | - exit ;; |
1405 | + GUESS=m68k-hp-bsd4.4 |
1406 | + ;; |
1407 | 9000/[34678]??:HP-UX:*:*) |
1408 | - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` |
1409 | - case "$UNAME_MACHINE" in |
1410 | + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
1411 | + case $UNAME_MACHINE in |
1412 | 9000/31?) HP_ARCH=m68000 ;; |
1413 | 9000/[34]??) HP_ARCH=m68k ;; |
1414 | 9000/[678][0-9][0-9]) |
1415 | - if [ -x /usr/bin/getconf ]; then |
1416 | + if test -x /usr/bin/getconf; then |
1417 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
1418 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
1419 | - case "$sc_cpu_version" in |
1420 | + case $sc_cpu_version in |
1421 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
1422 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
1423 | 532) # CPU_PA_RISC2_0 |
1424 | - case "$sc_kernel_bits" in |
1425 | + case $sc_kernel_bits in |
1426 | 32) HP_ARCH=hppa2.0n ;; |
1427 | 64) HP_ARCH=hppa2.0w ;; |
1428 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
1429 | esac ;; |
1430 | esac |
1431 | fi |
1432 | - if [ "$HP_ARCH" = "" ]; then |
1433 | - eval "$set_cc_for_build" |
1434 | + if test "$HP_ARCH" = ""; then |
1435 | + set_cc_for_build |
1436 | sed 's/^ //' << EOF > "$dummy.c" |
1437 | |
1438 | #define _HPUX_SOURCE |
1439 | @@ -698,9 +743,9 @@ EOF |
1440 | test -z "$HP_ARCH" && HP_ARCH=hppa |
1441 | fi ;; |
1442 | esac |
1443 | - if [ "$HP_ARCH" = hppa2.0w ] |
1444 | + if test "$HP_ARCH" = hppa2.0w |
1445 | then |
1446 | - eval "$set_cc_for_build" |
1447 | + set_cc_for_build |
1448 | |
1449 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
1450 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
1451 | @@ -719,14 +764,14 @@ EOF |
1452 | HP_ARCH=hppa64 |
1453 | fi |
1454 | fi |
1455 | - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" |
1456 | - exit ;; |
1457 | + GUESS=$HP_ARCH-hp-hpux$HPUX_REV |
1458 | + ;; |
1459 | ia64:HP-UX:*:*) |
1460 | - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` |
1461 | - echo ia64-hp-hpux"$HPUX_REV" |
1462 | - exit ;; |
1463 | + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
1464 | + GUESS=ia64-hp-hpux$HPUX_REV |
1465 | + ;; |
1466 | 3050*:HI-UX:*:*) |
1467 | - eval "$set_cc_for_build" |
1468 | + set_cc_for_build |
1469 | sed 's/^ //' << EOF > "$dummy.c" |
1470 | #include <unistd.h> |
1471 | int |
1472 | @@ -754,36 +799,36 @@ EOF |
1473 | EOF |
1474 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
1475 | { echo "$SYSTEM_NAME"; exit; } |
1476 | - echo unknown-hitachi-hiuxwe2 |
1477 | - exit ;; |
1478 | + GUESS=unknown-hitachi-hiuxwe2 |
1479 | + ;; |
1480 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
1481 | - echo hppa1.1-hp-bsd |
1482 | - exit ;; |
1483 | + GUESS=hppa1.1-hp-bsd |
1484 | + ;; |
1485 | 9000/8??:4.3bsd:*:*) |
1486 | - echo hppa1.0-hp-bsd |
1487 | - exit ;; |
1488 | + GUESS=hppa1.0-hp-bsd |
1489 | + ;; |
1490 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
1491 | - echo hppa1.0-hp-mpeix |
1492 | - exit ;; |
1493 | + GUESS=hppa1.0-hp-mpeix |
1494 | + ;; |
1495 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
1496 | - echo hppa1.1-hp-osf |
1497 | - exit ;; |
1498 | + GUESS=hppa1.1-hp-osf |
1499 | + ;; |
1500 | hp8??:OSF1:*:*) |
1501 | - echo hppa1.0-hp-osf |
1502 | - exit ;; |
1503 | + GUESS=hppa1.0-hp-osf |
1504 | + ;; |
1505 | i*86:OSF1:*:*) |
1506 | - if [ -x /usr/sbin/sysversion ] ; then |
1507 | - echo "$UNAME_MACHINE"-unknown-osf1mk |
1508 | + if test -x /usr/sbin/sysversion ; then |
1509 | + GUESS=$UNAME_MACHINE-unknown-osf1mk |
1510 | else |
1511 | - echo "$UNAME_MACHINE"-unknown-osf1 |
1512 | + GUESS=$UNAME_MACHINE-unknown-osf1 |
1513 | fi |
1514 | - exit ;; |
1515 | + ;; |
1516 | parisc*:Lites*:*:*) |
1517 | - echo hppa1.1-hp-lites |
1518 | - exit ;; |
1519 | + GUESS=hppa1.1-hp-lites |
1520 | + ;; |
1521 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
1522 | - echo c1-convex-bsd |
1523 | - exit ;; |
1524 | + GUESS=c1-convex-bsd |
1525 | + ;; |
1526 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
1527 | if getsysinfo -f scalar_acc |
1528 | then echo c32-convex-bsd |
1529 | @@ -791,17 +836,18 @@ EOF |
1530 | fi |
1531 | exit ;; |
1532 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
1533 | - echo c34-convex-bsd |
1534 | - exit ;; |
1535 | + GUESS=c34-convex-bsd |
1536 | + ;; |
1537 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
1538 | - echo c38-convex-bsd |
1539 | - exit ;; |
1540 | + GUESS=c38-convex-bsd |
1541 | + ;; |
1542 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
1543 | - echo c4-convex-bsd |
1544 | - exit ;; |
1545 | + GUESS=c4-convex-bsd |
1546 | + ;; |
1547 | CRAY*Y-MP:*:*:*) |
1548 | - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
1549 | - exit ;; |
1550 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
1551 | + GUESS=ymp-cray-unicos$CRAY_REL |
1552 | + ;; |
1553 | CRAY*[A-Z]90:*:*:*) |
1554 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
1555 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
1556 | @@ -809,103 +855,129 @@ EOF |
1557 | -e 's/\.[^.]*$/.X/' |
1558 | exit ;; |
1559 | CRAY*TS:*:*:*) |
1560 | - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
1561 | - exit ;; |
1562 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
1563 | + GUESS=t90-cray-unicos$CRAY_REL |
1564 | + ;; |
1565 | CRAY*T3E:*:*:*) |
1566 | - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
1567 | - exit ;; |
1568 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
1569 | + GUESS=alphaev5-cray-unicosmk$CRAY_REL |
1570 | + ;; |
1571 | CRAY*SV1:*:*:*) |
1572 | - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
1573 | - exit ;; |
1574 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
1575 | + GUESS=sv1-cray-unicos$CRAY_REL |
1576 | + ;; |
1577 | *:UNICOS/mp:*:*) |
1578 | - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
1579 | - exit ;; |
1580 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
1581 | + GUESS=craynv-cray-unicosmp$CRAY_REL |
1582 | + ;; |
1583 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
1584 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
1585 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
1586 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
1587 | - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
1588 | - exit ;; |
1589 | + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
1590 | + ;; |
1591 | 5000:UNIX_System_V:4.*:*) |
1592 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
1593 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
1594 | - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
1595 | - exit ;; |
1596 | + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
1597 | + ;; |
1598 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
1599 | - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" |
1600 | - exit ;; |
1601 | + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE |
1602 | + ;; |
1603 | sparc*:BSD/OS:*:*) |
1604 | - echo sparc-unknown-bsdi"$UNAME_RELEASE" |
1605 | - exit ;; |
1606 | + GUESS=sparc-unknown-bsdi$UNAME_RELEASE |
1607 | + ;; |
1608 | *:BSD/OS:*:*) |
1609 | - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" |
1610 | - exit ;; |
1611 | + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE |
1612 | + ;; |
1613 | + arm:FreeBSD:*:*) |
1614 | + UNAME_PROCESSOR=`uname -p` |
1615 | + set_cc_for_build |
1616 | + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
1617 | + | grep -q __ARM_PCS_VFP |
1618 | + then |
1619 | + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
1620 | + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi |
1621 | + else |
1622 | + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
1623 | + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf |
1624 | + fi |
1625 | + ;; |
1626 | *:FreeBSD:*:*) |
1627 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
1628 | - case "$UNAME_PROCESSOR" in |
1629 | + case $UNAME_PROCESSOR in |
1630 | amd64) |
1631 | UNAME_PROCESSOR=x86_64 ;; |
1632 | i386) |
1633 | UNAME_PROCESSOR=i586 ;; |
1634 | esac |
1635 | - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" |
1636 | - exit ;; |
1637 | + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
1638 | + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL |
1639 | + ;; |
1640 | i*:CYGWIN*:*) |
1641 | - echo "$UNAME_MACHINE"-pc-cygwin |
1642 | - exit ;; |
1643 | + GUESS=$UNAME_MACHINE-pc-cygwin |
1644 | + ;; |
1645 | *:MINGW64*:*) |
1646 | - echo "$UNAME_MACHINE"-pc-mingw64 |
1647 | - exit ;; |
1648 | + GUESS=$UNAME_MACHINE-pc-mingw64 |
1649 | + ;; |
1650 | *:MINGW*:*) |
1651 | - echo "$UNAME_MACHINE"-pc-mingw32 |
1652 | - exit ;; |
1653 | + GUESS=$UNAME_MACHINE-pc-mingw32 |
1654 | + ;; |
1655 | *:MSYS*:*) |
1656 | - echo "$UNAME_MACHINE"-pc-msys |
1657 | - exit ;; |
1658 | + GUESS=$UNAME_MACHINE-pc-msys |
1659 | + ;; |
1660 | i*:PW*:*) |
1661 | - echo "$UNAME_MACHINE"-pc-pw32 |
1662 | - exit ;; |
1663 | + GUESS=$UNAME_MACHINE-pc-pw32 |
1664 | + ;; |
1665 | + *:SerenityOS:*:*) |
1666 | + GUESS=$UNAME_MACHINE-pc-serenity |
1667 | + ;; |
1668 | *:Interix*:*) |
1669 | - case "$UNAME_MACHINE" in |
1670 | + case $UNAME_MACHINE in |
1671 | x86) |
1672 | - echo i586-pc-interix"$UNAME_RELEASE" |
1673 | - exit ;; |
1674 | + GUESS=i586-pc-interix$UNAME_RELEASE |
1675 | + ;; |
1676 | authenticamd | genuineintel | EM64T) |
1677 | - echo x86_64-unknown-interix"$UNAME_RELEASE" |
1678 | - exit ;; |
1679 | + GUESS=x86_64-unknown-interix$UNAME_RELEASE |
1680 | + ;; |
1681 | IA64) |
1682 | - echo ia64-unknown-interix"$UNAME_RELEASE" |
1683 | - exit ;; |
1684 | + GUESS=ia64-unknown-interix$UNAME_RELEASE |
1685 | + ;; |
1686 | esac ;; |
1687 | i*:UWIN*:*) |
1688 | - echo "$UNAME_MACHINE"-pc-uwin |
1689 | - exit ;; |
1690 | + GUESS=$UNAME_MACHINE-pc-uwin |
1691 | + ;; |
1692 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
1693 | - echo x86_64-unknown-cygwin |
1694 | - exit ;; |
1695 | + GUESS=x86_64-pc-cygwin |
1696 | + ;; |
1697 | prep*:SunOS:5.*:*) |
1698 | - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
1699 | - exit ;; |
1700 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
1701 | + GUESS=powerpcle-unknown-solaris2$SUN_REL |
1702 | + ;; |
1703 | *:GNU:*:*) |
1704 | # the GNU system |
1705 | - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" |
1706 | - exit ;; |
1707 | + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` |
1708 | + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` |
1709 | + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL |
1710 | + ;; |
1711 | *:GNU/*:*:*) |
1712 | # other systems with GNU libc and userland |
1713 | - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" |
1714 | - exit ;; |
1715 | - i*86:Minix:*:*) |
1716 | - echo "$UNAME_MACHINE"-pc-minix |
1717 | - exit ;; |
1718 | + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` |
1719 | + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
1720 | + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC |
1721 | + ;; |
1722 | + *:Minix:*:*) |
1723 | + GUESS=$UNAME_MACHINE-unknown-minix |
1724 | + ;; |
1725 | aarch64:Linux:*:*) |
1726 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1727 | - exit ;; |
1728 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1729 | + ;; |
1730 | aarch64_be:Linux:*:*) |
1731 | UNAME_MACHINE=aarch64_be |
1732 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1733 | - exit ;; |
1734 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1735 | + ;; |
1736 | alpha:Linux:*:*) |
1737 | - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
1738 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in |
1739 | EV5) UNAME_MACHINE=alphaev5 ;; |
1740 | EV56) UNAME_MACHINE=alphaev56 ;; |
1741 | PCA56) UNAME_MACHINE=alphapca56 ;; |
1742 | @@ -916,183 +988,236 @@ EOF |
1743 | esac |
1744 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
1745 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
1746 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1747 | - exit ;; |
1748 | - arc:Linux:*:* | arceb:Linux:*:*) |
1749 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1750 | - exit ;; |
1751 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1752 | + ;; |
1753 | + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) |
1754 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1755 | + ;; |
1756 | arm*:Linux:*:*) |
1757 | - eval "$set_cc_for_build" |
1758 | + set_cc_for_build |
1759 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
1760 | | grep -q __ARM_EABI__ |
1761 | then |
1762 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1763 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1764 | else |
1765 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
1766 | | grep -q __ARM_PCS_VFP |
1767 | then |
1768 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi |
1769 | + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi |
1770 | else |
1771 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf |
1772 | + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf |
1773 | fi |
1774 | fi |
1775 | - exit ;; |
1776 | + ;; |
1777 | avr32*:Linux:*:*) |
1778 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1779 | - exit ;; |
1780 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1781 | + ;; |
1782 | cris:Linux:*:*) |
1783 | - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" |
1784 | - exit ;; |
1785 | + GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
1786 | + ;; |
1787 | crisv32:Linux:*:*) |
1788 | - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" |
1789 | - exit ;; |
1790 | + GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
1791 | + ;; |
1792 | e2k:Linux:*:*) |
1793 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1794 | - exit ;; |
1795 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1796 | + ;; |
1797 | frv:Linux:*:*) |
1798 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1799 | - exit ;; |
1800 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1801 | + ;; |
1802 | hexagon:Linux:*:*) |
1803 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1804 | - exit ;; |
1805 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1806 | + ;; |
1807 | i*86:Linux:*:*) |
1808 | - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" |
1809 | - exit ;; |
1810 | + GUESS=$UNAME_MACHINE-pc-linux-$LIBC |
1811 | + ;; |
1812 | ia64:Linux:*:*) |
1813 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1814 | - exit ;; |
1815 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1816 | + ;; |
1817 | k1om:Linux:*:*) |
1818 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1819 | - exit ;; |
1820 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1821 | + ;; |
1822 | + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) |
1823 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1824 | + ;; |
1825 | m32r*:Linux:*:*) |
1826 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1827 | - exit ;; |
1828 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1829 | + ;; |
1830 | m68*:Linux:*:*) |
1831 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1832 | - exit ;; |
1833 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1834 | + ;; |
1835 | mips:Linux:*:* | mips64:Linux:*:*) |
1836 | - eval "$set_cc_for_build" |
1837 | + set_cc_for_build |
1838 | + IS_GLIBC=0 |
1839 | + test x"${LIBC}" = xgnu && IS_GLIBC=1 |
1840 | sed 's/^ //' << EOF > "$dummy.c" |
1841 | #undef CPU |
1842 | - #undef ${UNAME_MACHINE} |
1843 | - #undef ${UNAME_MACHINE}el |
1844 | + #undef mips |
1845 | + #undef mipsel |
1846 | + #undef mips64 |
1847 | + #undef mips64el |
1848 | + #if ${IS_GLIBC} && defined(_ABI64) |
1849 | + LIBCABI=gnuabi64 |
1850 | + #else |
1851 | + #if ${IS_GLIBC} && defined(_ABIN32) |
1852 | + LIBCABI=gnuabin32 |
1853 | + #else |
1854 | + LIBCABI=${LIBC} |
1855 | + #endif |
1856 | + #endif |
1857 | + |
1858 | + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 |
1859 | + CPU=mipsisa64r6 |
1860 | + #else |
1861 | + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 |
1862 | + CPU=mipsisa32r6 |
1863 | + #else |
1864 | + #if defined(__mips64) |
1865 | + CPU=mips64 |
1866 | + #else |
1867 | + CPU=mips |
1868 | + #endif |
1869 | + #endif |
1870 | + #endif |
1871 | + |
1872 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
1873 | - CPU=${UNAME_MACHINE}el |
1874 | + MIPS_ENDIAN=el |
1875 | #else |
1876 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
1877 | - CPU=${UNAME_MACHINE} |
1878 | + MIPS_ENDIAN= |
1879 | #else |
1880 | - CPU= |
1881 | + MIPS_ENDIAN= |
1882 | #endif |
1883 | #endif |
1884 | EOF |
1885 | - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" |
1886 | - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } |
1887 | + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` |
1888 | + eval "$cc_set_vars" |
1889 | + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } |
1890 | ;; |
1891 | mips64el:Linux:*:*) |
1892 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1893 | - exit ;; |
1894 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1895 | + ;; |
1896 | openrisc*:Linux:*:*) |
1897 | - echo or1k-unknown-linux-"$LIBC" |
1898 | - exit ;; |
1899 | + GUESS=or1k-unknown-linux-$LIBC |
1900 | + ;; |
1901 | or32:Linux:*:* | or1k*:Linux:*:*) |
1902 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1903 | - exit ;; |
1904 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1905 | + ;; |
1906 | padre:Linux:*:*) |
1907 | - echo sparc-unknown-linux-"$LIBC" |
1908 | - exit ;; |
1909 | + GUESS=sparc-unknown-linux-$LIBC |
1910 | + ;; |
1911 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
1912 | - echo hppa64-unknown-linux-"$LIBC" |
1913 | - exit ;; |
1914 | + GUESS=hppa64-unknown-linux-$LIBC |
1915 | + ;; |
1916 | parisc:Linux:*:* | hppa:Linux:*:*) |
1917 | # Look for CPU level |
1918 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
1919 | - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; |
1920 | - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; |
1921 | - *) echo hppa-unknown-linux-"$LIBC" ;; |
1922 | + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; |
1923 | + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; |
1924 | + *) GUESS=hppa-unknown-linux-$LIBC ;; |
1925 | esac |
1926 | - exit ;; |
1927 | + ;; |
1928 | ppc64:Linux:*:*) |
1929 | - echo powerpc64-unknown-linux-"$LIBC" |
1930 | - exit ;; |
1931 | + GUESS=powerpc64-unknown-linux-$LIBC |
1932 | + ;; |
1933 | ppc:Linux:*:*) |
1934 | - echo powerpc-unknown-linux-"$LIBC" |
1935 | - exit ;; |
1936 | + GUESS=powerpc-unknown-linux-$LIBC |
1937 | + ;; |
1938 | ppc64le:Linux:*:*) |
1939 | - echo powerpc64le-unknown-linux-"$LIBC" |
1940 | - exit ;; |
1941 | + GUESS=powerpc64le-unknown-linux-$LIBC |
1942 | + ;; |
1943 | ppcle:Linux:*:*) |
1944 | - echo powerpcle-unknown-linux-"$LIBC" |
1945 | - exit ;; |
1946 | - riscv32:Linux:*:* | riscv64:Linux:*:*) |
1947 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1948 | - exit ;; |
1949 | + GUESS=powerpcle-unknown-linux-$LIBC |
1950 | + ;; |
1951 | + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) |
1952 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1953 | + ;; |
1954 | s390:Linux:*:* | s390x:Linux:*:*) |
1955 | - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" |
1956 | - exit ;; |
1957 | + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC |
1958 | + ;; |
1959 | sh64*:Linux:*:*) |
1960 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1961 | - exit ;; |
1962 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1963 | + ;; |
1964 | sh*:Linux:*:*) |
1965 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1966 | - exit ;; |
1967 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1968 | + ;; |
1969 | sparc:Linux:*:* | sparc64:Linux:*:*) |
1970 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1971 | - exit ;; |
1972 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1973 | + ;; |
1974 | tile*:Linux:*:*) |
1975 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
1976 | - exit ;; |
1977 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
1978 | + ;; |
1979 | vax:Linux:*:*) |
1980 | - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" |
1981 | - exit ;; |
1982 | + GUESS=$UNAME_MACHINE-dec-linux-$LIBC |
1983 | + ;; |
1984 | x86_64:Linux:*:*) |
1985 | - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" |
1986 | - exit ;; |
1987 | + set_cc_for_build |
1988 | + CPU=$UNAME_MACHINE |
1989 | + LIBCABI=$LIBC |
1990 | + if test "$CC_FOR_BUILD" != no_compiler_found; then |
1991 | + ABI=64 |
1992 | + sed 's/^ //' << EOF > "$dummy.c" |
1993 | + #ifdef __i386__ |
1994 | + ABI=x86 |
1995 | + #else |
1996 | + #ifdef __ILP32__ |
1997 | + ABI=x32 |
1998 | + #endif |
1999 | + #endif |
2000 | +EOF |
2001 | + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` |
2002 | + eval "$cc_set_abi" |
2003 | + case $ABI in |
2004 | + x86) CPU=i686 ;; |
2005 | + x32) LIBCABI=${LIBC}x32 ;; |
2006 | + esac |
2007 | + fi |
2008 | + GUESS=$CPU-pc-linux-$LIBCABI |
2009 | + ;; |
2010 | xtensa*:Linux:*:*) |
2011 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
2012 | - exit ;; |
2013 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
2014 | + ;; |
2015 | i*86:DYNIX/ptx:4*:*) |
2016 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
2017 | # earlier versions are messed up and put the nodename in both |
2018 | # sysname and nodename. |
2019 | - echo i386-sequent-sysv4 |
2020 | - exit ;; |
2021 | + GUESS=i386-sequent-sysv4 |
2022 | + ;; |
2023 | i*86:UNIX_SV:4.2MP:2.*) |
2024 | # Unixware is an offshoot of SVR4, but it has its own version |
2025 | # number series starting with 2... |
2026 | # I am not positive that other SVR4 systems won't match this, |
2027 | # I just have to hope. -- rms. |
2028 | # Use sysv4.2uw... so that sysv4* matches it. |
2029 | - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" |
2030 | - exit ;; |
2031 | + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION |
2032 | + ;; |
2033 | i*86:OS/2:*:*) |
2034 | # If we were able to find `uname', then EMX Unix compatibility |
2035 | # is probably installed. |
2036 | - echo "$UNAME_MACHINE"-pc-os2-emx |
2037 | - exit ;; |
2038 | + GUESS=$UNAME_MACHINE-pc-os2-emx |
2039 | + ;; |
2040 | i*86:XTS-300:*:STOP) |
2041 | - echo "$UNAME_MACHINE"-unknown-stop |
2042 | - exit ;; |
2043 | + GUESS=$UNAME_MACHINE-unknown-stop |
2044 | + ;; |
2045 | i*86:atheos:*:*) |
2046 | - echo "$UNAME_MACHINE"-unknown-atheos |
2047 | - exit ;; |
2048 | + GUESS=$UNAME_MACHINE-unknown-atheos |
2049 | + ;; |
2050 | i*86:syllable:*:*) |
2051 | - echo "$UNAME_MACHINE"-pc-syllable |
2052 | - exit ;; |
2053 | + GUESS=$UNAME_MACHINE-pc-syllable |
2054 | + ;; |
2055 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
2056 | - echo i386-unknown-lynxos"$UNAME_RELEASE" |
2057 | - exit ;; |
2058 | + GUESS=i386-unknown-lynxos$UNAME_RELEASE |
2059 | + ;; |
2060 | i*86:*DOS:*:*) |
2061 | - echo "$UNAME_MACHINE"-pc-msdosdjgpp |
2062 | - exit ;; |
2063 | + GUESS=$UNAME_MACHINE-pc-msdosdjgpp |
2064 | + ;; |
2065 | i*86:*:4.*:*) |
2066 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
2067 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
2068 | - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" |
2069 | + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL |
2070 | else |
2071 | - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" |
2072 | + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL |
2073 | fi |
2074 | - exit ;; |
2075 | + ;; |
2076 | i*86:*:5:[678]*) |
2077 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
2078 | case `/bin/uname -X | grep "^Machine"` in |
2079 | @@ -1100,12 +1225,12 @@ EOF |
2080 | *Pentium) UNAME_MACHINE=i586 ;; |
2081 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
2082 | esac |
2083 | - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" |
2084 | - exit ;; |
2085 | + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
2086 | + ;; |
2087 | i*86:*:3.2:*) |
2088 | if test -f /usr/options/cb.name; then |
2089 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
2090 | - echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" |
2091 | + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL |
2092 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
2093 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
2094 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
2095 | @@ -1115,11 +1240,11 @@ EOF |
2096 | && UNAME_MACHINE=i686 |
2097 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
2098 | && UNAME_MACHINE=i686 |
2099 | - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" |
2100 | + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL |
2101 | else |
2102 | - echo "$UNAME_MACHINE"-pc-sysv32 |
2103 | + GUESS=$UNAME_MACHINE-pc-sysv32 |
2104 | fi |
2105 | - exit ;; |
2106 | + ;; |
2107 | pc:*:*:*) |
2108 | # Left here for compatibility: |
2109 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
2110 | @@ -1127,31 +1252,31 @@ EOF |
2111 | # Note: whatever this is, it MUST be the same as what config.sub |
2112 | # prints for the "djgpp" host, or else GDB configure will decide that |
2113 | # this is a cross-build. |
2114 | - echo i586-pc-msdosdjgpp |
2115 | - exit ;; |
2116 | + GUESS=i586-pc-msdosdjgpp |
2117 | + ;; |
2118 | Intel:Mach:3*:*) |
2119 | - echo i386-pc-mach3 |
2120 | - exit ;; |
2121 | + GUESS=i386-pc-mach3 |
2122 | + ;; |
2123 | paragon:*:*:*) |
2124 | - echo i860-intel-osf1 |
2125 | - exit ;; |
2126 | + GUESS=i860-intel-osf1 |
2127 | + ;; |
2128 | i860:*:4.*:*) # i860-SVR4 |
2129 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
2130 | - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 |
2131 | + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 |
2132 | else # Add other i860-SVR4 vendors below as they are discovered. |
2133 | - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 |
2134 | + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 |
2135 | fi |
2136 | - exit ;; |
2137 | + ;; |
2138 | mini*:CTIX:SYS*5:*) |
2139 | # "miniframe" |
2140 | - echo m68010-convergent-sysv |
2141 | - exit ;; |
2142 | + GUESS=m68010-convergent-sysv |
2143 | + ;; |
2144 | mc68k:UNIX:SYSTEM5:3.51m) |
2145 | - echo m68k-convergent-sysv |
2146 | - exit ;; |
2147 | + GUESS=m68k-convergent-sysv |
2148 | + ;; |
2149 | M680?0:D-NIX:5.3:*) |
2150 | - echo m68k-diab-dnix |
2151 | - exit ;; |
2152 | + GUESS=m68k-diab-dnix |
2153 | + ;; |
2154 | M68*:*:R3V[5678]*:*) |
2155 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
2156 | 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) |
2157 | @@ -1176,249 +1301,407 @@ EOF |
2158 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
2159 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
2160 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
2161 | - echo m68k-unknown-lynxos"$UNAME_RELEASE" |
2162 | - exit ;; |
2163 | + GUESS=m68k-unknown-lynxos$UNAME_RELEASE |
2164 | + ;; |
2165 | mc68030:UNIX_System_V:4.*:*) |
2166 | - echo m68k-atari-sysv4 |
2167 | - exit ;; |
2168 | + GUESS=m68k-atari-sysv4 |
2169 | + ;; |
2170 | TSUNAMI:LynxOS:2.*:*) |
2171 | - echo sparc-unknown-lynxos"$UNAME_RELEASE" |
2172 | - exit ;; |
2173 | + GUESS=sparc-unknown-lynxos$UNAME_RELEASE |
2174 | + ;; |
2175 | rs6000:LynxOS:2.*:*) |
2176 | - echo rs6000-unknown-lynxos"$UNAME_RELEASE" |
2177 | - exit ;; |
2178 | + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE |
2179 | + ;; |
2180 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
2181 | - echo powerpc-unknown-lynxos"$UNAME_RELEASE" |
2182 | - exit ;; |
2183 | + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE |
2184 | + ;; |
2185 | SM[BE]S:UNIX_SV:*:*) |
2186 | - echo mips-dde-sysv"$UNAME_RELEASE" |
2187 | - exit ;; |
2188 | + GUESS=mips-dde-sysv$UNAME_RELEASE |
2189 | + ;; |
2190 | RM*:ReliantUNIX-*:*:*) |
2191 | - echo mips-sni-sysv4 |
2192 | - exit ;; |
2193 | + GUESS=mips-sni-sysv4 |
2194 | + ;; |
2195 | RM*:SINIX-*:*:*) |
2196 | - echo mips-sni-sysv4 |
2197 | - exit ;; |
2198 | + GUESS=mips-sni-sysv4 |
2199 | + ;; |
2200 | *:SINIX-*:*:*) |
2201 | if uname -p 2>/dev/null >/dev/null ; then |
2202 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
2203 | - echo "$UNAME_MACHINE"-sni-sysv4 |
2204 | + GUESS=$UNAME_MACHINE-sni-sysv4 |
2205 | else |
2206 | - echo ns32k-sni-sysv |
2207 | + GUESS=ns32k-sni-sysv |
2208 | fi |
2209 | - exit ;; |
2210 | + ;; |
2211 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
2212 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
2213 | - echo i586-unisys-sysv4 |
2214 | - exit ;; |
2215 | + GUESS=i586-unisys-sysv4 |
2216 | + ;; |
2217 | *:UNIX_System_V:4*:FTX*) |
2218 | # From Gerald Hewes <hewes@openmarket.com>. |
2219 | # How about differentiating between stratus architectures? -djm |
2220 | - echo hppa1.1-stratus-sysv4 |
2221 | - exit ;; |
2222 | + GUESS=hppa1.1-stratus-sysv4 |
2223 | + ;; |
2224 | *:*:*:FTX*) |
2225 | # From seanf@swdc.stratus.com. |
2226 | - echo i860-stratus-sysv4 |
2227 | - exit ;; |
2228 | + GUESS=i860-stratus-sysv4 |
2229 | + ;; |
2230 | i*86:VOS:*:*) |
2231 | # From Paul.Green@stratus.com. |
2232 | - echo "$UNAME_MACHINE"-stratus-vos |
2233 | - exit ;; |
2234 | + GUESS=$UNAME_MACHINE-stratus-vos |
2235 | + ;; |
2236 | *:VOS:*:*) |
2237 | # From Paul.Green@stratus.com. |
2238 | - echo hppa1.1-stratus-vos |
2239 | - exit ;; |
2240 | + GUESS=hppa1.1-stratus-vos |
2241 | + ;; |
2242 | mc68*:A/UX:*:*) |
2243 | - echo m68k-apple-aux"$UNAME_RELEASE" |
2244 | - exit ;; |
2245 | + GUESS=m68k-apple-aux$UNAME_RELEASE |
2246 | + ;; |
2247 | news*:NEWS-OS:6*:*) |
2248 | - echo mips-sony-newsos6 |
2249 | - exit ;; |
2250 | + GUESS=mips-sony-newsos6 |
2251 | + ;; |
2252 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
2253 | - if [ -d /usr/nec ]; then |
2254 | - echo mips-nec-sysv"$UNAME_RELEASE" |
2255 | + if test -d /usr/nec; then |
2256 | + GUESS=mips-nec-sysv$UNAME_RELEASE |
2257 | else |
2258 | - echo mips-unknown-sysv"$UNAME_RELEASE" |
2259 | + GUESS=mips-unknown-sysv$UNAME_RELEASE |
2260 | fi |
2261 | - exit ;; |
2262 | + ;; |
2263 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
2264 | - echo powerpc-be-beos |
2265 | - exit ;; |
2266 | + GUESS=powerpc-be-beos |
2267 | + ;; |
2268 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
2269 | - echo powerpc-apple-beos |
2270 | - exit ;; |
2271 | + GUESS=powerpc-apple-beos |
2272 | + ;; |
2273 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
2274 | - echo i586-pc-beos |
2275 | - exit ;; |
2276 | + GUESS=i586-pc-beos |
2277 | + ;; |
2278 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
2279 | - echo i586-pc-haiku |
2280 | - exit ;; |
2281 | - x86_64:Haiku:*:*) |
2282 | - echo x86_64-unknown-haiku |
2283 | - exit ;; |
2284 | + GUESS=i586-pc-haiku |
2285 | + ;; |
2286 | + ppc:Haiku:*:*) # Haiku running on Apple PowerPC |
2287 | + GUESS=powerpc-apple-haiku |
2288 | + ;; |
2289 | + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) |
2290 | + GUESS=$UNAME_MACHINE-unknown-haiku |
2291 | + ;; |
2292 | SX-4:SUPER-UX:*:*) |
2293 | - echo sx4-nec-superux"$UNAME_RELEASE" |
2294 | - exit ;; |
2295 | + GUESS=sx4-nec-superux$UNAME_RELEASE |
2296 | + ;; |
2297 | SX-5:SUPER-UX:*:*) |
2298 | - echo sx5-nec-superux"$UNAME_RELEASE" |
2299 | - exit ;; |
2300 | + GUESS=sx5-nec-superux$UNAME_RELEASE |
2301 | + ;; |
2302 | SX-6:SUPER-UX:*:*) |
2303 | - echo sx6-nec-superux"$UNAME_RELEASE" |
2304 | - exit ;; |
2305 | + GUESS=sx6-nec-superux$UNAME_RELEASE |
2306 | + ;; |
2307 | SX-7:SUPER-UX:*:*) |
2308 | - echo sx7-nec-superux"$UNAME_RELEASE" |
2309 | - exit ;; |
2310 | + GUESS=sx7-nec-superux$UNAME_RELEASE |
2311 | + ;; |
2312 | SX-8:SUPER-UX:*:*) |
2313 | - echo sx8-nec-superux"$UNAME_RELEASE" |
2314 | - exit ;; |
2315 | + GUESS=sx8-nec-superux$UNAME_RELEASE |
2316 | + ;; |
2317 | SX-8R:SUPER-UX:*:*) |
2318 | - echo sx8r-nec-superux"$UNAME_RELEASE" |
2319 | - exit ;; |
2320 | + GUESS=sx8r-nec-superux$UNAME_RELEASE |
2321 | + ;; |
2322 | SX-ACE:SUPER-UX:*:*) |
2323 | - echo sxace-nec-superux"$UNAME_RELEASE" |
2324 | - exit ;; |
2325 | + GUESS=sxace-nec-superux$UNAME_RELEASE |
2326 | + ;; |
2327 | Power*:Rhapsody:*:*) |
2328 | - echo powerpc-apple-rhapsody"$UNAME_RELEASE" |
2329 | - exit ;; |
2330 | + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE |
2331 | + ;; |
2332 | *:Rhapsody:*:*) |
2333 | - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" |
2334 | - exit ;; |
2335 | + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE |
2336 | + ;; |
2337 | + arm64:Darwin:*:*) |
2338 | + GUESS=aarch64-apple-darwin$UNAME_RELEASE |
2339 | + ;; |
2340 | *:Darwin:*:*) |
2341 | - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
2342 | - eval "$set_cc_for_build" |
2343 | - if test "$UNAME_PROCESSOR" = unknown ; then |
2344 | - UNAME_PROCESSOR=powerpc |
2345 | + UNAME_PROCESSOR=`uname -p` |
2346 | + case $UNAME_PROCESSOR in |
2347 | + unknown) UNAME_PROCESSOR=powerpc ;; |
2348 | + esac |
2349 | + if command -v xcode-select > /dev/null 2> /dev/null && \ |
2350 | + ! xcode-select --print-path > /dev/null 2> /dev/null ; then |
2351 | + # Avoid executing cc if there is no toolchain installed as |
2352 | + # cc will be a stub that puts up a graphical alert |
2353 | + # prompting the user to install developer tools. |
2354 | + CC_FOR_BUILD=no_compiler_found |
2355 | + else |
2356 | + set_cc_for_build |
2357 | fi |
2358 | - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then |
2359 | - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
2360 | - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
2361 | - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
2362 | - grep IS_64BIT_ARCH >/dev/null |
2363 | - then |
2364 | - case $UNAME_PROCESSOR in |
2365 | - i386) UNAME_PROCESSOR=x86_64 ;; |
2366 | - powerpc) UNAME_PROCESSOR=powerpc64 ;; |
2367 | - esac |
2368 | - fi |
2369 | - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc |
2370 | - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ |
2371 | - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
2372 | - grep IS_PPC >/dev/null |
2373 | - then |
2374 | - UNAME_PROCESSOR=powerpc |
2375 | - fi |
2376 | + if test "$CC_FOR_BUILD" != no_compiler_found; then |
2377 | + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
2378 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
2379 | + grep IS_64BIT_ARCH >/dev/null |
2380 | + then |
2381 | + case $UNAME_PROCESSOR in |
2382 | + i386) UNAME_PROCESSOR=x86_64 ;; |
2383 | + powerpc) UNAME_PROCESSOR=powerpc64 ;; |
2384 | + esac |
2385 | + fi |
2386 | + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc |
2387 | + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ |
2388 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
2389 | + grep IS_PPC >/dev/null |
2390 | + then |
2391 | + UNAME_PROCESSOR=powerpc |
2392 | fi |
2393 | elif test "$UNAME_PROCESSOR" = i386 ; then |
2394 | - # Avoid executing cc on OS X 10.9, as it ships with a stub |
2395 | - # that puts up a graphical alert prompting to install |
2396 | - # developer tools. Any system running Mac OS X 10.7 or |
2397 | - # later (Darwin 11 and later) is required to have a 64-bit |
2398 | - # processor. This is not true of the ARM version of Darwin |
2399 | - # that Apple uses in portable devices. |
2400 | - UNAME_PROCESSOR=x86_64 |
2401 | + # uname -m returns i386 or x86_64 |
2402 | + UNAME_PROCESSOR=$UNAME_MACHINE |
2403 | fi |
2404 | - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" |
2405 | - exit ;; |
2406 | + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE |
2407 | + ;; |
2408 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
2409 | UNAME_PROCESSOR=`uname -p` |
2410 | if test "$UNAME_PROCESSOR" = x86; then |
2411 | UNAME_PROCESSOR=i386 |
2412 | UNAME_MACHINE=pc |
2413 | fi |
2414 | - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" |
2415 | - exit ;; |
2416 | + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE |
2417 | + ;; |
2418 | *:QNX:*:4*) |
2419 | - echo i386-pc-qnx |
2420 | - exit ;; |
2421 | + GUESS=i386-pc-qnx |
2422 | + ;; |
2423 | NEO-*:NONSTOP_KERNEL:*:*) |
2424 | - echo neo-tandem-nsk"$UNAME_RELEASE" |
2425 | - exit ;; |
2426 | + GUESS=neo-tandem-nsk$UNAME_RELEASE |
2427 | + ;; |
2428 | NSE-*:NONSTOP_KERNEL:*:*) |
2429 | - echo nse-tandem-nsk"$UNAME_RELEASE" |
2430 | - exit ;; |
2431 | + GUESS=nse-tandem-nsk$UNAME_RELEASE |
2432 | + ;; |
2433 | NSR-*:NONSTOP_KERNEL:*:*) |
2434 | - echo nsr-tandem-nsk"$UNAME_RELEASE" |
2435 | - exit ;; |
2436 | + GUESS=nsr-tandem-nsk$UNAME_RELEASE |
2437 | + ;; |
2438 | NSV-*:NONSTOP_KERNEL:*:*) |
2439 | - echo nsv-tandem-nsk"$UNAME_RELEASE" |
2440 | - exit ;; |
2441 | + GUESS=nsv-tandem-nsk$UNAME_RELEASE |
2442 | + ;; |
2443 | NSX-*:NONSTOP_KERNEL:*:*) |
2444 | - echo nsx-tandem-nsk"$UNAME_RELEASE" |
2445 | - exit ;; |
2446 | + GUESS=nsx-tandem-nsk$UNAME_RELEASE |
2447 | + ;; |
2448 | *:NonStop-UX:*:*) |
2449 | - echo mips-compaq-nonstopux |
2450 | - exit ;; |
2451 | + GUESS=mips-compaq-nonstopux |
2452 | + ;; |
2453 | BS2000:POSIX*:*:*) |
2454 | - echo bs2000-siemens-sysv |
2455 | - exit ;; |
2456 | + GUESS=bs2000-siemens-sysv |
2457 | + ;; |
2458 | DS/*:UNIX_System_V:*:*) |
2459 | - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" |
2460 | - exit ;; |
2461 | + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE |
2462 | + ;; |
2463 | *:Plan9:*:*) |
2464 | # "uname -m" is not consistent, so use $cputype instead. 386 |
2465 | # is converted to i386 for consistency with other x86 |
2466 | # operating systems. |
2467 | - if test "$cputype" = 386; then |
2468 | + if test "${cputype-}" = 386; then |
2469 | UNAME_MACHINE=i386 |
2470 | - else |
2471 | - UNAME_MACHINE="$cputype" |
2472 | + elif test "x${cputype-}" != x; then |
2473 | + UNAME_MACHINE=$cputype |
2474 | fi |
2475 | - echo "$UNAME_MACHINE"-unknown-plan9 |
2476 | - exit ;; |
2477 | + GUESS=$UNAME_MACHINE-unknown-plan9 |
2478 | + ;; |
2479 | *:TOPS-10:*:*) |
2480 | - echo pdp10-unknown-tops10 |
2481 | - exit ;; |
2482 | + GUESS=pdp10-unknown-tops10 |
2483 | + ;; |
2484 | *:TENEX:*:*) |
2485 | - echo pdp10-unknown-tenex |
2486 | - exit ;; |
2487 | + GUESS=pdp10-unknown-tenex |
2488 | + ;; |
2489 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
2490 | - echo pdp10-dec-tops20 |
2491 | - exit ;; |
2492 | + GUESS=pdp10-dec-tops20 |
2493 | + ;; |
2494 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
2495 | - echo pdp10-xkl-tops20 |
2496 | - exit ;; |
2497 | + GUESS=pdp10-xkl-tops20 |
2498 | + ;; |
2499 | *:TOPS-20:*:*) |
2500 | - echo pdp10-unknown-tops20 |
2501 | - exit ;; |
2502 | + GUESS=pdp10-unknown-tops20 |
2503 | + ;; |
2504 | *:ITS:*:*) |
2505 | - echo pdp10-unknown-its |
2506 | - exit ;; |
2507 | + GUESS=pdp10-unknown-its |
2508 | + ;; |
2509 | SEI:*:*:SEIUX) |
2510 | - echo mips-sei-seiux"$UNAME_RELEASE" |
2511 | - exit ;; |
2512 | + GUESS=mips-sei-seiux$UNAME_RELEASE |
2513 | + ;; |
2514 | *:DragonFly:*:*) |
2515 | - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" |
2516 | - exit ;; |
2517 | + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
2518 | + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL |
2519 | + ;; |
2520 | *:*VMS:*:*) |
2521 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
2522 | - case "$UNAME_MACHINE" in |
2523 | - A*) echo alpha-dec-vms ; exit ;; |
2524 | - I*) echo ia64-dec-vms ; exit ;; |
2525 | - V*) echo vax-dec-vms ; exit ;; |
2526 | + case $UNAME_MACHINE in |
2527 | + A*) GUESS=alpha-dec-vms ;; |
2528 | + I*) GUESS=ia64-dec-vms ;; |
2529 | + V*) GUESS=vax-dec-vms ;; |
2530 | esac ;; |
2531 | *:XENIX:*:SysV) |
2532 | - echo i386-pc-xenix |
2533 | - exit ;; |
2534 | + GUESS=i386-pc-xenix |
2535 | + ;; |
2536 | i*86:skyos:*:*) |
2537 | - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" |
2538 | - exit ;; |
2539 | + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` |
2540 | + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL |
2541 | + ;; |
2542 | i*86:rdos:*:*) |
2543 | - echo "$UNAME_MACHINE"-pc-rdos |
2544 | - exit ;; |
2545 | - i*86:AROS:*:*) |
2546 | - echo "$UNAME_MACHINE"-pc-aros |
2547 | - exit ;; |
2548 | + GUESS=$UNAME_MACHINE-pc-rdos |
2549 | + ;; |
2550 | + i*86:Fiwix:*:*) |
2551 | + GUESS=$UNAME_MACHINE-pc-fiwix |
2552 | + ;; |
2553 | + *:AROS:*:*) |
2554 | + GUESS=$UNAME_MACHINE-unknown-aros |
2555 | + ;; |
2556 | x86_64:VMkernel:*:*) |
2557 | - echo "$UNAME_MACHINE"-unknown-esx |
2558 | - exit ;; |
2559 | + GUESS=$UNAME_MACHINE-unknown-esx |
2560 | + ;; |
2561 | amd64:Isilon\ OneFS:*:*) |
2562 | - echo x86_64-unknown-onefs |
2563 | - exit ;; |
2564 | + GUESS=x86_64-unknown-onefs |
2565 | + ;; |
2566 | + *:Unleashed:*:*) |
2567 | + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE |
2568 | + ;; |
2569 | esac |
2570 | |
2571 | +# Do we have a guess based on uname results? |
2572 | +if test "x$GUESS" != x; then |
2573 | + echo "$GUESS" |
2574 | + exit |
2575 | +fi |
2576 | + |
2577 | +# No uname command or uname output not recognized. |
2578 | +set_cc_for_build |
2579 | +cat > "$dummy.c" <<EOF |
2580 | +#ifdef _SEQUENT_ |
2581 | +#include <sys/types.h> |
2582 | +#include <sys/utsname.h> |
2583 | +#endif |
2584 | +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) |
2585 | +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) |
2586 | +#include <signal.h> |
2587 | +#if defined(_SIZE_T_) || defined(SIGLOST) |
2588 | +#include <sys/utsname.h> |
2589 | +#endif |
2590 | +#endif |
2591 | +#endif |
2592 | +main () |
2593 | +{ |
2594 | +#if defined (sony) |
2595 | +#if defined (MIPSEB) |
2596 | + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
2597 | + I don't know.... */ |
2598 | + printf ("mips-sony-bsd\n"); exit (0); |
2599 | +#else |
2600 | +#include <sys/param.h> |
2601 | + printf ("m68k-sony-newsos%s\n", |
2602 | +#ifdef NEWSOS4 |
2603 | + "4" |
2604 | +#else |
2605 | + "" |
2606 | +#endif |
2607 | + ); exit (0); |
2608 | +#endif |
2609 | +#endif |
2610 | + |
2611 | +#if defined (NeXT) |
2612 | +#if !defined (__ARCHITECTURE__) |
2613 | +#define __ARCHITECTURE__ "m68k" |
2614 | +#endif |
2615 | + int version; |
2616 | + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
2617 | + if (version < 4) |
2618 | + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
2619 | + else |
2620 | + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
2621 | + exit (0); |
2622 | +#endif |
2623 | + |
2624 | +#if defined (MULTIMAX) || defined (n16) |
2625 | +#if defined (UMAXV) |
2626 | + printf ("ns32k-encore-sysv\n"); exit (0); |
2627 | +#else |
2628 | +#if defined (CMU) |
2629 | + printf ("ns32k-encore-mach\n"); exit (0); |
2630 | +#else |
2631 | + printf ("ns32k-encore-bsd\n"); exit (0); |
2632 | +#endif |
2633 | +#endif |
2634 | +#endif |
2635 | + |
2636 | +#if defined (__386BSD__) |
2637 | + printf ("i386-pc-bsd\n"); exit (0); |
2638 | +#endif |
2639 | + |
2640 | +#if defined (sequent) |
2641 | +#if defined (i386) |
2642 | + printf ("i386-sequent-dynix\n"); exit (0); |
2643 | +#endif |
2644 | +#if defined (ns32000) |
2645 | + printf ("ns32k-sequent-dynix\n"); exit (0); |
2646 | +#endif |
2647 | +#endif |
2648 | + |
2649 | +#if defined (_SEQUENT_) |
2650 | + struct utsname un; |
2651 | + |
2652 | + uname(&un); |
2653 | + if (strncmp(un.version, "V2", 2) == 0) { |
2654 | + printf ("i386-sequent-ptx2\n"); exit (0); |
2655 | + } |
2656 | + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
2657 | + printf ("i386-sequent-ptx1\n"); exit (0); |
2658 | + } |
2659 | + printf ("i386-sequent-ptx\n"); exit (0); |
2660 | +#endif |
2661 | + |
2662 | +#if defined (vax) |
2663 | +#if !defined (ultrix) |
2664 | +#include <sys/param.h> |
2665 | +#if defined (BSD) |
2666 | +#if BSD == 43 |
2667 | + printf ("vax-dec-bsd4.3\n"); exit (0); |
2668 | +#else |
2669 | +#if BSD == 199006 |
2670 | + printf ("vax-dec-bsd4.3reno\n"); exit (0); |
2671 | +#else |
2672 | + printf ("vax-dec-bsd\n"); exit (0); |
2673 | +#endif |
2674 | +#endif |
2675 | +#else |
2676 | + printf ("vax-dec-bsd\n"); exit (0); |
2677 | +#endif |
2678 | +#else |
2679 | +#if defined(_SIZE_T_) || defined(SIGLOST) |
2680 | + struct utsname un; |
2681 | + uname (&un); |
2682 | + printf ("vax-dec-ultrix%s\n", un.release); exit (0); |
2683 | +#else |
2684 | + printf ("vax-dec-ultrix\n"); exit (0); |
2685 | +#endif |
2686 | +#endif |
2687 | +#endif |
2688 | +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) |
2689 | +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) |
2690 | +#if defined(_SIZE_T_) || defined(SIGLOST) |
2691 | + struct utsname *un; |
2692 | + uname (&un); |
2693 | + printf ("mips-dec-ultrix%s\n", un.release); exit (0); |
2694 | +#else |
2695 | + printf ("mips-dec-ultrix\n"); exit (0); |
2696 | +#endif |
2697 | +#endif |
2698 | +#endif |
2699 | + |
2700 | +#if defined (alliant) && defined (i860) |
2701 | + printf ("i860-alliant-bsd\n"); exit (0); |
2702 | +#endif |
2703 | + |
2704 | + exit (1); |
2705 | +} |
2706 | +EOF |
2707 | + |
2708 | +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && |
2709 | + { echo "$SYSTEM_NAME"; exit; } |
2710 | + |
2711 | +# Apollos put the system type in the environment. |
2712 | +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } |
2713 | + |
2714 | echo "$0: unable to guess system type" >&2 |
2715 | |
2716 | -case "$UNAME_MACHINE:$UNAME_SYSTEM" in |
2717 | +case $UNAME_MACHINE:$UNAME_SYSTEM in |
2718 | mips:Linux | mips64:Linux) |
2719 | # If we got here on MIPS GNU/Linux, output extra information. |
2720 | cat >&2 <<EOF |
2721 | @@ -1435,9 +1718,17 @@ This script (version $timestamp), has failed to recognize the |
2722 | operating system you are using. If your script is old, overwrite *all* |
2723 | copies of config.guess and config.sub with the latest versions from: |
2724 | |
2725 | - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
2726 | + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
2727 | and |
2728 | - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
2729 | + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
2730 | +EOF |
2731 | + |
2732 | +our_year=`echo $timestamp | sed 's,-.*,,'` |
2733 | +thisyear=`date +%Y` |
2734 | +# shellcheck disable=SC2003 |
2735 | +script_age=`expr "$thisyear" - "$our_year"` |
2736 | +if test "$script_age" -lt 3 ; then |
2737 | + cat >&2 <<EOF |
2738 | |
2739 | If $0 has already been updated, send the following data and any |
2740 | information you think might be pertinent to config-patches@gnu.org to |
2741 | @@ -1465,6 +1756,7 @@ UNAME_RELEASE = "$UNAME_RELEASE" |
2742 | UNAME_SYSTEM = "$UNAME_SYSTEM" |
2743 | UNAME_VERSION = "$UNAME_VERSION" |
2744 | EOF |
2745 | +fi |
2746 | |
2747 | exit 1 |
2748 | |
2749 | diff --git a/build-aux/config.sub b/build-aux/config.sub |
2750 | index 20f7cf2..b41da55 100755 |
2751 | --- a/build-aux/config.sub |
2752 | +++ b/build-aux/config.sub |
2753 | @@ -1,12 +1,14 @@ |
2754 | -#! /bin/sh |
2755 | +#!/usr/bin/sh |
2756 | # Configuration validation subroutine script. |
2757 | -# Copyright 1992-2018 Free Software Foundation, Inc. |
2758 | +# Copyright 1992-2022 Free Software Foundation, Inc. |
2759 | |
2760 | -timestamp='2018-05-05' |
2761 | +# shellcheck disable=SC2006,SC2268 # see below for rationale |
2762 | + |
2763 | +timestamp='2022-01-03' |
2764 | |
2765 | # This file is free software; you can redistribute it and/or modify it |
2766 | # under the terms of the GNU General Public License as published by |
2767 | -# the Free Software Foundation; either version 3 of the License, or |
2768 | +# the Free Software Foundation, either version 3 of the License, or |
2769 | # (at your option) any later version. |
2770 | # |
2771 | # This program is distributed in the hope that it will be useful, but |
2772 | @@ -33,7 +35,7 @@ timestamp='2018-05-05' |
2773 | # Otherwise, we print the canonical config type on stdout and succeed. |
2774 | |
2775 | # You can get the latest version of this script from: |
2776 | -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
2777 | +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
2778 | |
2779 | # This file is supposed to be the same for all GNU packages |
2780 | # and recognize all the CPU types, system types and aliases |
2781 | @@ -50,6 +52,13 @@ timestamp='2018-05-05' |
2782 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
2783 | # It is wrong to echo any other type of specification. |
2784 | |
2785 | +# The "shellcheck disable" line above the timestamp inhibits complaints |
2786 | +# about features and limitations of the classic Bourne shell that were |
2787 | +# superseded or lifted in POSIX. However, this script identifies a wide |
2788 | +# variety of pre-POSIX systems that do not have POSIX shells at all, and |
2789 | +# even some reasonably current systems (Solaris 10 as case-in-point) still |
2790 | +# have a pre-POSIX /bin/sh. |
2791 | + |
2792 | me=`echo "$0" | sed -e 's,.*/,,'` |
2793 | |
2794 | usage="\ |
2795 | @@ -67,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>." |
2796 | version="\ |
2797 | GNU config.sub ($timestamp) |
2798 | |
2799 | -Copyright 1992-2018 Free Software Foundation, Inc. |
2800 | +Copyright 1992-2022 Free Software Foundation, Inc. |
2801 | |
2802 | This is free software; see the source for copying conditions. There is NO |
2803 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
2804 | @@ -89,7 +98,7 @@ while test $# -gt 0 ; do |
2805 | - ) # Use stdin as input. |
2806 | break ;; |
2807 | -* ) |
2808 | - echo "$me: invalid option $1$help" |
2809 | + echo "$me: invalid option $1$help" >&2 |
2810 | exit 1 ;; |
2811 | |
2812 | *local*) |
2813 | @@ -110,1249 +119,1186 @@ case $# in |
2814 | exit 1;; |
2815 | esac |
2816 | |
2817 | -# Spilt fields of configuration type |
2818 | -IFS="-" read -r field1 field2 field3 field4 <<EOF |
2819 | +# Split fields of configuration type |
2820 | +# shellcheck disable=SC2162 |
2821 | +saved_IFS=$IFS |
2822 | +IFS="-" read field1 field2 field3 field4 <<EOF |
2823 | $1 |
2824 | EOF |
2825 | +IFS=$saved_IFS |
2826 | |
2827 | # Separate into logical components for further validation |
2828 | case $1 in |
2829 | + *-*-*-*-*) |
2830 | + echo Invalid configuration \`"$1"\': more than four components >&2 |
2831 | + exit 1 |
2832 | + ;; |
2833 | *-*-*-*) |
2834 | basic_machine=$field1-$field2 |
2835 | - os=-$field3-$field4 |
2836 | + basic_os=$field3-$field4 |
2837 | ;; |
2838 | *-*-*) |
2839 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two |
2840 | # parts |
2841 | maybe_os=$field2-$field3 |
2842 | case $maybe_os in |
2843 | - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ |
2844 | - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ |
2845 | + nto-qnx* | linux-* | uclinux-uclibc* \ |
2846 | | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ |
2847 | | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ |
2848 | | storm-chaos* | os2-emx* | rtmk-nova*) |
2849 | basic_machine=$field1 |
2850 | - os=-$maybe_os |
2851 | + basic_os=$maybe_os |
2852 | ;; |
2853 | android-linux) |
2854 | basic_machine=$field1-unknown |
2855 | - os=-linux-android |
2856 | + basic_os=linux-android |
2857 | ;; |
2858 | *) |
2859 | basic_machine=$field1-$field2 |
2860 | - os=-$field3 |
2861 | + basic_os=$field3 |
2862 | ;; |
2863 | esac |
2864 | ;; |
2865 | *-*) |
2866 | - basic_machine=$field1 |
2867 | - os=-$field2 |
2868 | + # A lone config we happen to match not fitting any pattern |
2869 | + case $field1-$field2 in |
2870 | + decstation-3100) |
2871 | + basic_machine=mips-dec |
2872 | + basic_os= |
2873 | + ;; |
2874 | + *-*) |
2875 | + # Second component is usually, but not always the OS |
2876 | + case $field2 in |
2877 | + # Prevent following clause from handling this valid os |
2878 | + sun*os*) |
2879 | + basic_machine=$field1 |
2880 | + basic_os=$field2 |
2881 | + ;; |
2882 | + zephyr*) |
2883 | + basic_machine=$field1-unknown |
2884 | + basic_os=$field2 |
2885 | + ;; |
2886 | + # Manufacturers |
2887 | + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ |
2888 | + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ |
2889 | + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ |
2890 | + | convergent* | ncr* | news | 32* | 3600* | 3100* \ |
2891 | + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ |
2892 | + | ultra | tti* | harris | dolphin | highlevel | gould \ |
2893 | + | cbm | ns | masscomp | apple | axis | knuth | cray \ |
2894 | + | microblaze* | sim | cisco \ |
2895 | + | oki | wec | wrs | winbond) |
2896 | + basic_machine=$field1-$field2 |
2897 | + basic_os= |
2898 | + ;; |
2899 | + *) |
2900 | + basic_machine=$field1 |
2901 | + basic_os=$field2 |
2902 | + ;; |
2903 | + esac |
2904 | + ;; |
2905 | + esac |
2906 | ;; |
2907 | *) |
2908 | - basic_machine=$1 |
2909 | - os= |
2910 | - ;; |
2911 | -esac |
2912 | - |
2913 | -### Let's recognize common machines as not being operating systems so |
2914 | -### that things like config.sub decstation-3100 work. We also |
2915 | -### recognize some manufacturers as not being operating systems, so we |
2916 | -### can provide default operating systems below. |
2917 | -case $os in |
2918 | - -sun*os*) |
2919 | - # Prevent following clause from handling this invalid input. |
2920 | - ;; |
2921 | - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
2922 | - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ |
2923 | - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
2924 | - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
2925 | - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
2926 | - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
2927 | - -apple | -axis | -knuth | -cray | -microblaze*) |
2928 | - os= |
2929 | - basic_machine=$1 |
2930 | - ;; |
2931 | - -bluegene*) |
2932 | - os=-cnk |
2933 | - ;; |
2934 | - -sim | -cisco | -oki | -wec | -winbond) |
2935 | - os= |
2936 | - basic_machine=$1 |
2937 | - ;; |
2938 | - -scout) |
2939 | - ;; |
2940 | - -wrs) |
2941 | - os=-vxworks |
2942 | - basic_machine=$1 |
2943 | - ;; |
2944 | - -chorusos*) |
2945 | - os=-chorusos |
2946 | - basic_machine=$1 |
2947 | - ;; |
2948 | - -chorusrdb) |
2949 | - os=-chorusrdb |
2950 | - basic_machine=$1 |
2951 | - ;; |
2952 | - -hiux*) |
2953 | - os=-hiuxwe2 |
2954 | - ;; |
2955 | - -sco6) |
2956 | - os=-sco5v6 |
2957 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2958 | - ;; |
2959 | - -sco5) |
2960 | - os=-sco3.2v5 |
2961 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2962 | - ;; |
2963 | - -sco4) |
2964 | - os=-sco3.2v4 |
2965 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2966 | - ;; |
2967 | - -sco3.2.[4-9]*) |
2968 | - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
2969 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2970 | - ;; |
2971 | - -sco3.2v[4-9]*) |
2972 | - # Don't forget version if it is 3.2v4 or newer. |
2973 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2974 | - ;; |
2975 | - -sco5v6*) |
2976 | - # Don't forget version if it is 3.2v4 or newer. |
2977 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2978 | - ;; |
2979 | - -sco*) |
2980 | - os=-sco3.2v2 |
2981 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2982 | - ;; |
2983 | - -udk*) |
2984 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2985 | - ;; |
2986 | - -isc) |
2987 | - os=-isc2.2 |
2988 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2989 | - ;; |
2990 | - -clix*) |
2991 | - basic_machine=clipper-intergraph |
2992 | - ;; |
2993 | - -isc*) |
2994 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
2995 | - ;; |
2996 | - -lynx*178) |
2997 | - os=-lynxos178 |
2998 | - ;; |
2999 | - -lynx*5) |
3000 | - os=-lynxos5 |
3001 | - ;; |
3002 | - -lynx*) |
3003 | - os=-lynxos |
3004 | - ;; |
3005 | - -ptx*) |
3006 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` |
3007 | - ;; |
3008 | - -psos*) |
3009 | - os=-psos |
3010 | - ;; |
3011 | - -mint | -mint[0-9]*) |
3012 | - basic_machine=m68k-atari |
3013 | - os=-mint |
3014 | + # Convert single-component short-hands not valid as part of |
3015 | + # multi-component configurations. |
3016 | + case $field1 in |
3017 | + 386bsd) |
3018 | + basic_machine=i386-pc |
3019 | + basic_os=bsd |
3020 | + ;; |
3021 | + a29khif) |
3022 | + basic_machine=a29k-amd |
3023 | + basic_os=udi |
3024 | + ;; |
3025 | + adobe68k) |
3026 | + basic_machine=m68010-adobe |
3027 | + basic_os=scout |
3028 | + ;; |
3029 | + alliant) |
3030 | + basic_machine=fx80-alliant |
3031 | + basic_os= |
3032 | + ;; |
3033 | + altos | altos3068) |
3034 | + basic_machine=m68k-altos |
3035 | + basic_os= |
3036 | + ;; |
3037 | + am29k) |
3038 | + basic_machine=a29k-none |
3039 | + basic_os=bsd |
3040 | + ;; |
3041 | + amdahl) |
3042 | + basic_machine=580-amdahl |
3043 | + basic_os=sysv |
3044 | + ;; |
3045 | + amiga) |
3046 | + basic_machine=m68k-unknown |
3047 | + basic_os= |
3048 | + ;; |
3049 | + amigaos | amigados) |
3050 | + basic_machine=m68k-unknown |
3051 | + basic_os=amigaos |
3052 | + ;; |
3053 | + amigaunix | amix) |
3054 | + basic_machine=m68k-unknown |
3055 | + basic_os=sysv4 |
3056 | + ;; |
3057 | + apollo68) |
3058 | + basic_machine=m68k-apollo |
3059 | + basic_os=sysv |
3060 | + ;; |
3061 | + apollo68bsd) |
3062 | + basic_machine=m68k-apollo |
3063 | + basic_os=bsd |
3064 | + ;; |
3065 | + aros) |
3066 | + basic_machine=i386-pc |
3067 | + basic_os=aros |
3068 | + ;; |
3069 | + aux) |
3070 | + basic_machine=m68k-apple |
3071 | + basic_os=aux |
3072 | + ;; |
3073 | + balance) |
3074 | + basic_machine=ns32k-sequent |
3075 | + basic_os=dynix |
3076 | + ;; |
3077 | + blackfin) |
3078 | + basic_machine=bfin-unknown |
3079 | + basic_os=linux |
3080 | + ;; |
3081 | + cegcc) |
3082 | + basic_machine=arm-unknown |
3083 | + basic_os=cegcc |
3084 | + ;; |
3085 | + convex-c1) |
3086 | + basic_machine=c1-convex |
3087 | + basic_os=bsd |
3088 | + ;; |
3089 | + convex-c2) |
3090 | + basic_machine=c2-convex |
3091 | + basic_os=bsd |
3092 | + ;; |
3093 | + convex-c32) |
3094 | + basic_machine=c32-convex |
3095 | + basic_os=bsd |
3096 | + ;; |
3097 | + convex-c34) |
3098 | + basic_machine=c34-convex |
3099 | + basic_os=bsd |
3100 | + ;; |
3101 | + convex-c38) |
3102 | + basic_machine=c38-convex |
3103 | + basic_os=bsd |
3104 | + ;; |
3105 | + cray) |
3106 | + basic_machine=j90-cray |
3107 | + basic_os=unicos |
3108 | + ;; |
3109 | + crds | unos) |
3110 | + basic_machine=m68k-crds |
3111 | + basic_os= |
3112 | + ;; |
3113 | + da30) |
3114 | + basic_machine=m68k-da30 |
3115 | + basic_os= |
3116 | + ;; |
3117 | + decstation | pmax | pmin | dec3100 | decstatn) |
3118 | + basic_machine=mips-dec |
3119 | + basic_os= |
3120 | + ;; |
3121 | + delta88) |
3122 | + basic_machine=m88k-motorola |
3123 | + basic_os=sysv3 |
3124 | + ;; |
3125 | + dicos) |
3126 | + basic_machine=i686-pc |
3127 | + basic_os=dicos |
3128 | + ;; |
3129 | + djgpp) |
3130 | + basic_machine=i586-pc |
3131 | + basic_os=msdosdjgpp |
3132 | + ;; |
3133 | + ebmon29k) |
3134 | + basic_machine=a29k-amd |
3135 | + basic_os=ebmon |
3136 | + ;; |
3137 | + es1800 | OSE68k | ose68k | ose | OSE) |
3138 | + basic_machine=m68k-ericsson |
3139 | + basic_os=ose |
3140 | + ;; |
3141 | + gmicro) |
3142 | + basic_machine=tron-gmicro |
3143 | + basic_os=sysv |
3144 | + ;; |
3145 | + go32) |
3146 | + basic_machine=i386-pc |
3147 | + basic_os=go32 |
3148 | + ;; |
3149 | + h8300hms) |
3150 | + basic_machine=h8300-hitachi |
3151 | + basic_os=hms |
3152 | + ;; |
3153 | + h8300xray) |
3154 | + basic_machine=h8300-hitachi |
3155 | + basic_os=xray |
3156 | + ;; |
3157 | + h8500hms) |
3158 | + basic_machine=h8500-hitachi |
3159 | + basic_os=hms |
3160 | + ;; |
3161 | + harris) |
3162 | + basic_machine=m88k-harris |
3163 | + basic_os=sysv3 |
3164 | + ;; |
3165 | + hp300 | hp300hpux) |
3166 | + basic_machine=m68k-hp |
3167 | + basic_os=hpux |
3168 | + ;; |
3169 | + hp300bsd) |
3170 | + basic_machine=m68k-hp |
3171 | + basic_os=bsd |
3172 | + ;; |
3173 | + hppaosf) |
3174 | + basic_machine=hppa1.1-hp |
3175 | + basic_os=osf |
3176 | + ;; |
3177 | + hppro) |
3178 | + basic_machine=hppa1.1-hp |
3179 | + basic_os=proelf |
3180 | + ;; |
3181 | + i386mach) |
3182 | + basic_machine=i386-mach |
3183 | + basic_os=mach |
3184 | + ;; |
3185 | + isi68 | isi) |
3186 | + basic_machine=m68k-isi |
3187 | + basic_os=sysv |
3188 | + ;; |
3189 | + m68knommu) |
3190 | + basic_machine=m68k-unknown |
3191 | + basic_os=linux |
3192 | + ;; |
3193 | + magnum | m3230) |
3194 | + basic_machine=mips-mips |
3195 | + basic_os=sysv |
3196 | + ;; |
3197 | + merlin) |
3198 | + basic_machine=ns32k-utek |
3199 | + basic_os=sysv |
3200 | + ;; |
3201 | + mingw64) |
3202 | + basic_machine=x86_64-pc |
3203 | + basic_os=mingw64 |
3204 | + ;; |
3205 | + mingw32) |
3206 | + basic_machine=i686-pc |
3207 | + basic_os=mingw32 |
3208 | + ;; |
3209 | + mingw32ce) |
3210 | + basic_machine=arm-unknown |
3211 | + basic_os=mingw32ce |
3212 | + ;; |
3213 | + monitor) |
3214 | + basic_machine=m68k-rom68k |
3215 | + basic_os=coff |
3216 | + ;; |
3217 | + morphos) |
3218 | + basic_machine=powerpc-unknown |
3219 | + basic_os=morphos |
3220 | + ;; |
3221 | + moxiebox) |
3222 | + basic_machine=moxie-unknown |
3223 | + basic_os=moxiebox |
3224 | + ;; |
3225 | + msdos) |
3226 | + basic_machine=i386-pc |
3227 | + basic_os=msdos |
3228 | + ;; |
3229 | + msys) |
3230 | + basic_machine=i686-pc |
3231 | + basic_os=msys |
3232 | + ;; |
3233 | + mvs) |
3234 | + basic_machine=i370-ibm |
3235 | + basic_os=mvs |
3236 | + ;; |
3237 | + nacl) |
3238 | + basic_machine=le32-unknown |
3239 | + basic_os=nacl |
3240 | + ;; |
3241 | + ncr3000) |
3242 | + basic_machine=i486-ncr |
3243 | + basic_os=sysv4 |
3244 | + ;; |
3245 | + netbsd386) |
3246 | + basic_machine=i386-pc |
3247 | + basic_os=netbsd |
3248 | + ;; |
3249 | + netwinder) |
3250 | + basic_machine=armv4l-rebel |
3251 | + basic_os=linux |
3252 | + ;; |
3253 | + news | news700 | news800 | news900) |
3254 | + basic_machine=m68k-sony |
3255 | + basic_os=newsos |
3256 | + ;; |
3257 | + news1000) |
3258 | + basic_machine=m68030-sony |
3259 | + basic_os=newsos |
3260 | + ;; |
3261 | + necv70) |
3262 | + basic_machine=v70-nec |
3263 | + basic_os=sysv |
3264 | + ;; |
3265 | + nh3000) |
3266 | + basic_machine=m68k-harris |
3267 | + basic_os=cxux |
3268 | + ;; |
3269 | + nh[45]000) |
3270 | + basic_machine=m88k-harris |
3271 | + basic_os=cxux |
3272 | + ;; |
3273 | + nindy960) |
3274 | + basic_machine=i960-intel |
3275 | + basic_os=nindy |
3276 | + ;; |
3277 | + mon960) |
3278 | + basic_machine=i960-intel |
3279 | + basic_os=mon960 |
3280 | + ;; |
3281 | + nonstopux) |
3282 | + basic_machine=mips-compaq |
3283 | + basic_os=nonstopux |
3284 | + ;; |
3285 | + os400) |
3286 | + basic_machine=powerpc-ibm |
3287 | + basic_os=os400 |
3288 | + ;; |
3289 | + OSE68000 | ose68000) |
3290 | + basic_machine=m68000-ericsson |
3291 | + basic_os=ose |
3292 | + ;; |
3293 | + os68k) |
3294 | + basic_machine=m68k-none |
3295 | + basic_os=os68k |
3296 | + ;; |
3297 | + paragon) |
3298 | + basic_machine=i860-intel |
3299 | + basic_os=osf |
3300 | + ;; |
3301 | + parisc) |
3302 | + basic_machine=hppa-unknown |
3303 | + basic_os=linux |
3304 | + ;; |
3305 | + psp) |
3306 | + basic_machine=mipsallegrexel-sony |
3307 | + basic_os=psp |
3308 | + ;; |
3309 | + pw32) |
3310 | + basic_machine=i586-unknown |
3311 | + basic_os=pw32 |
3312 | + ;; |
3313 | + rdos | rdos64) |
3314 | + basic_machine=x86_64-pc |
3315 | + basic_os=rdos |
3316 | + ;; |
3317 | + rdos32) |
3318 | + basic_machine=i386-pc |
3319 | + basic_os=rdos |
3320 | + ;; |
3321 | + rom68k) |
3322 | + basic_machine=m68k-rom68k |
3323 | + basic_os=coff |
3324 | + ;; |
3325 | + sa29200) |
3326 | + basic_machine=a29k-amd |
3327 | + basic_os=udi |
3328 | + ;; |
3329 | + sei) |
3330 | + basic_machine=mips-sei |
3331 | + basic_os=seiux |
3332 | + ;; |
3333 | + sequent) |
3334 | + basic_machine=i386-sequent |
3335 | + basic_os= |
3336 | + ;; |
3337 | + sps7) |
3338 | + basic_machine=m68k-bull |
3339 | + basic_os=sysv2 |
3340 | + ;; |
3341 | + st2000) |
3342 | + basic_machine=m68k-tandem |
3343 | + basic_os= |
3344 | + ;; |
3345 | + stratus) |
3346 | + basic_machine=i860-stratus |
3347 | + basic_os=sysv4 |
3348 | + ;; |
3349 | + sun2) |
3350 | + basic_machine=m68000-sun |
3351 | + basic_os= |
3352 | + ;; |
3353 | + sun2os3) |
3354 | + basic_machine=m68000-sun |
3355 | + basic_os=sunos3 |
3356 | + ;; |
3357 | + sun2os4) |
3358 | + basic_machine=m68000-sun |
3359 | + basic_os=sunos4 |
3360 | + ;; |
3361 | + sun3) |
3362 | + basic_machine=m68k-sun |
3363 | + basic_os= |
3364 | + ;; |
3365 | + sun3os3) |
3366 | + basic_machine=m68k-sun |
3367 | + basic_os=sunos3 |
3368 | + ;; |
3369 | + sun3os4) |
3370 | + basic_machine=m68k-sun |
3371 | + basic_os=sunos4 |
3372 | + ;; |
3373 | + sun4) |
3374 | + basic_machine=sparc-sun |
3375 | + basic_os= |
3376 | + ;; |
3377 | + sun4os3) |
3378 | + basic_machine=sparc-sun |
3379 | + basic_os=sunos3 |
3380 | + ;; |
3381 | + sun4os4) |
3382 | + basic_machine=sparc-sun |
3383 | + basic_os=sunos4 |
3384 | + ;; |
3385 | + sun4sol2) |
3386 | + basic_machine=sparc-sun |
3387 | + basic_os=solaris2 |
3388 | + ;; |
3389 | + sun386 | sun386i | roadrunner) |
3390 | + basic_machine=i386-sun |
3391 | + basic_os= |
3392 | + ;; |
3393 | + sv1) |
3394 | + basic_machine=sv1-cray |
3395 | + basic_os=unicos |
3396 | + ;; |
3397 | + symmetry) |
3398 | + basic_machine=i386-sequent |
3399 | + basic_os=dynix |
3400 | + ;; |
3401 | + t3e) |
3402 | + basic_machine=alphaev5-cray |
3403 | + basic_os=unicos |
3404 | + ;; |
3405 | + t90) |
3406 | + basic_machine=t90-cray |
3407 | + basic_os=unicos |
3408 | + ;; |
3409 | + toad1) |
3410 | + basic_machine=pdp10-xkl |
3411 | + basic_os=tops20 |
3412 | + ;; |
3413 | + tpf) |
3414 | + basic_machine=s390x-ibm |
3415 | + basic_os=tpf |
3416 | + ;; |
3417 | + udi29k) |
3418 | + basic_machine=a29k-amd |
3419 | + basic_os=udi |
3420 | + ;; |
3421 | + ultra3) |
3422 | + basic_machine=a29k-nyu |
3423 | + basic_os=sym1 |
3424 | + ;; |
3425 | + v810 | necv810) |
3426 | + basic_machine=v810-nec |
3427 | + basic_os=none |
3428 | + ;; |
3429 | + vaxv) |
3430 | + basic_machine=vax-dec |
3431 | + basic_os=sysv |
3432 | + ;; |
3433 | + vms) |
3434 | + basic_machine=vax-dec |
3435 | + basic_os=vms |
3436 | + ;; |
3437 | + vsta) |
3438 | + basic_machine=i386-pc |
3439 | + basic_os=vsta |
3440 | + ;; |
3441 | + vxworks960) |
3442 | + basic_machine=i960-wrs |
3443 | + basic_os=vxworks |
3444 | + ;; |
3445 | + vxworks68) |
3446 | + basic_machine=m68k-wrs |
3447 | + basic_os=vxworks |
3448 | + ;; |
3449 | + vxworks29k) |
3450 | + basic_machine=a29k-wrs |
3451 | + basic_os=vxworks |
3452 | + ;; |
3453 | + xbox) |
3454 | + basic_machine=i686-pc |
3455 | + basic_os=mingw32 |
3456 | + ;; |
3457 | + ymp) |
3458 | + basic_machine=ymp-cray |
3459 | + basic_os=unicos |
3460 | + ;; |
3461 | + *) |
3462 | + basic_machine=$1 |
3463 | + basic_os= |
3464 | + ;; |
3465 | + esac |
3466 | ;; |
3467 | esac |
3468 | |
3469 | -# Decode aliases for certain CPU-COMPANY combinations. |
3470 | +# Decode 1-component or ad-hoc basic machines |
3471 | case $basic_machine in |
3472 | - # Recognize the basic CPU types without company name. |
3473 | - # Some are omitted here because they have special meanings below. |
3474 | - 1750a | 580 \ |
3475 | - | a29k \ |
3476 | - | aarch64 | aarch64_be \ |
3477 | - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
3478 | - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
3479 | - | am33_2.0 \ |
3480 | - | arc | arceb \ |
3481 | - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ |
3482 | - | avr | avr32 \ |
3483 | - | ba \ |
3484 | - | be32 | be64 \ |
3485 | - | bfin \ |
3486 | - | c4x | c8051 | clipper | csky \ |
3487 | - | d10v | d30v | dlx | dsp16xx \ |
3488 | - | e2k | epiphany \ |
3489 | - | fido | fr30 | frv | ft32 \ |
3490 | - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
3491 | - | hexagon \ |
3492 | - | i370 | i860 | i960 | ia16 | ia64 \ |
3493 | - | ip2k | iq2000 \ |
3494 | - | k1om \ |
3495 | - | le32 | le64 \ |
3496 | - | lm32 \ |
3497 | - | m32c | m32r | m32rle | m68000 | m68k | m88k \ |
3498 | - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ |
3499 | - | mips | mipsbe | mipseb | mipsel | mipsle \ |
3500 | - | mips16 \ |
3501 | - | mips64 | mips64el \ |
3502 | - | mips64octeon | mips64octeonel \ |
3503 | - | mips64orion | mips64orionel \ |
3504 | - | mips64r5900 | mips64r5900el \ |
3505 | - | mips64vr | mips64vrel \ |
3506 | - | mips64vr4100 | mips64vr4100el \ |
3507 | - | mips64vr4300 | mips64vr4300el \ |
3508 | - | mips64vr5000 | mips64vr5000el \ |
3509 | - | mips64vr5900 | mips64vr5900el \ |
3510 | - | mipsisa32 | mipsisa32el \ |
3511 | - | mipsisa32r2 | mipsisa32r2el \ |
3512 | - | mipsisa32r6 | mipsisa32r6el \ |
3513 | - | mipsisa64 | mipsisa64el \ |
3514 | - | mipsisa64r2 | mipsisa64r2el \ |
3515 | - | mipsisa64r6 | mipsisa64r6el \ |
3516 | - | mipsisa64sb1 | mipsisa64sb1el \ |
3517 | - | mipsisa64sr71k | mipsisa64sr71kel \ |
3518 | - | mipsr5900 | mipsr5900el \ |
3519 | - | mipstx39 | mipstx39el \ |
3520 | - | mn10200 | mn10300 \ |
3521 | - | moxie \ |
3522 | - | mt \ |
3523 | - | msp430 \ |
3524 | - | nds32 | nds32le | nds32be \ |
3525 | - | nfp \ |
3526 | - | nios | nios2 | nios2eb | nios2el \ |
3527 | - | ns16k | ns32k \ |
3528 | - | open8 | or1k | or1knd | or32 \ |
3529 | - | pdp10 | pj | pjl \ |
3530 | - | powerpc | powerpc64 | powerpc64le | powerpcle \ |
3531 | - | pru \ |
3532 | - | pyramid \ |
3533 | - | riscv32 | riscv64 \ |
3534 | - | rl78 | rx \ |
3535 | - | score \ |
3536 | - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
3537 | - | sh64 | sh64le \ |
3538 | - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
3539 | - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
3540 | - | spu \ |
3541 | - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ |
3542 | - | ubicom32 \ |
3543 | - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ |
3544 | - | visium \ |
3545 | - | wasm32 \ |
3546 | - | x86 | xc16x | xstormy16 | xtensa \ |
3547 | - | z8k | z80) |
3548 | - basic_machine=$basic_machine-unknown |
3549 | - ;; |
3550 | - c54x) |
3551 | - basic_machine=tic54x-unknown |
3552 | - ;; |
3553 | - c55x) |
3554 | - basic_machine=tic55x-unknown |
3555 | - ;; |
3556 | - c6x) |
3557 | - basic_machine=tic6x-unknown |
3558 | - ;; |
3559 | - leon|leon[3-9]) |
3560 | - basic_machine=sparc-$basic_machine |
3561 | - ;; |
3562 | - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) |
3563 | - basic_machine=$basic_machine-unknown |
3564 | - os=-none |
3565 | - ;; |
3566 | - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) |
3567 | + # Here we handle the default manufacturer of certain CPU types. It is in |
3568 | + # some cases the only manufacturer, in others, it is the most popular. |
3569 | + w89k) |
3570 | + cpu=hppa1.1 |
3571 | + vendor=winbond |
3572 | ;; |
3573 | - m9s12z | m68hcs12z | hcs12z | s12z) |
3574 | - basic_machine=s12z-unknown |
3575 | - os=-none |
3576 | + op50n) |
3577 | + cpu=hppa1.1 |
3578 | + vendor=oki |
3579 | ;; |
3580 | - ms1) |
3581 | - basic_machine=mt-unknown |
3582 | + op60c) |
3583 | + cpu=hppa1.1 |
3584 | + vendor=oki |
3585 | ;; |
3586 | - |
3587 | - strongarm | thumb | xscale) |
3588 | - basic_machine=arm-unknown |
3589 | + ibm*) |
3590 | + cpu=i370 |
3591 | + vendor=ibm |
3592 | ;; |
3593 | - xgate) |
3594 | - basic_machine=$basic_machine-unknown |
3595 | - os=-none |
3596 | + orion105) |
3597 | + cpu=clipper |
3598 | + vendor=highlevel |
3599 | ;; |
3600 | - xscaleeb) |
3601 | - basic_machine=armeb-unknown |
3602 | + mac | mpw | mac-mpw) |
3603 | + cpu=m68k |
3604 | + vendor=apple |
3605 | ;; |
3606 | - |
3607 | - xscaleel) |
3608 | - basic_machine=armel-unknown |
3609 | + pmac | pmac-mpw) |
3610 | + cpu=powerpc |
3611 | + vendor=apple |
3612 | ;; |
3613 | |
3614 | - # We use `pc' rather than `unknown' |
3615 | - # because (1) that's what they normally are, and |
3616 | - # (2) the word "unknown" tends to confuse beginning users. |
3617 | - i*86 | x86_64) |
3618 | - basic_machine=$basic_machine-pc |
3619 | - ;; |
3620 | - # Object if more than one company name word. |
3621 | - *-*-*) |
3622 | - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 |
3623 | - exit 1 |
3624 | - ;; |
3625 | - # Recognize the basic CPU types with company name. |
3626 | - 580-* \ |
3627 | - | a29k-* \ |
3628 | - | aarch64-* | aarch64_be-* \ |
3629 | - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ |
3630 | - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ |
3631 | - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ |
3632 | - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
3633 | - | avr-* | avr32-* \ |
3634 | - | ba-* \ |
3635 | - | be32-* | be64-* \ |
3636 | - | bfin-* | bs2000-* \ |
3637 | - | c[123]* | c30-* | [cjt]90-* | c4x-* \ |
3638 | - | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ |
3639 | - | d10v-* | d30v-* | dlx-* \ |
3640 | - | e2k-* | elxsi-* \ |
3641 | - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ |
3642 | - | h8300-* | h8500-* \ |
3643 | - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ |
3644 | - | hexagon-* \ |
3645 | - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ |
3646 | - | ip2k-* | iq2000-* \ |
3647 | - | k1om-* \ |
3648 | - | le32-* | le64-* \ |
3649 | - | lm32-* \ |
3650 | - | m32c-* | m32r-* | m32rle-* \ |
3651 | - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
3652 | - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ |
3653 | - | microblaze-* | microblazeel-* \ |
3654 | - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
3655 | - | mips16-* \ |
3656 | - | mips64-* | mips64el-* \ |
3657 | - | mips64octeon-* | mips64octeonel-* \ |
3658 | - | mips64orion-* | mips64orionel-* \ |
3659 | - | mips64r5900-* | mips64r5900el-* \ |
3660 | - | mips64vr-* | mips64vrel-* \ |
3661 | - | mips64vr4100-* | mips64vr4100el-* \ |
3662 | - | mips64vr4300-* | mips64vr4300el-* \ |
3663 | - | mips64vr5000-* | mips64vr5000el-* \ |
3664 | - | mips64vr5900-* | mips64vr5900el-* \ |
3665 | - | mipsisa32-* | mipsisa32el-* \ |
3666 | - | mipsisa32r2-* | mipsisa32r2el-* \ |
3667 | - | mipsisa32r6-* | mipsisa32r6el-* \ |
3668 | - | mipsisa64-* | mipsisa64el-* \ |
3669 | - | mipsisa64r2-* | mipsisa64r2el-* \ |
3670 | - | mipsisa64r6-* | mipsisa64r6el-* \ |
3671 | - | mipsisa64sb1-* | mipsisa64sb1el-* \ |
3672 | - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
3673 | - | mipsr5900-* | mipsr5900el-* \ |
3674 | - | mipstx39-* | mipstx39el-* \ |
3675 | - | mmix-* \ |
3676 | - | mt-* \ |
3677 | - | msp430-* \ |
3678 | - | nds32-* | nds32le-* | nds32be-* \ |
3679 | - | nfp-* \ |
3680 | - | nios-* | nios2-* | nios2eb-* | nios2el-* \ |
3681 | - | none-* | np1-* | ns16k-* | ns32k-* \ |
3682 | - | open8-* \ |
3683 | - | or1k*-* \ |
3684 | - | orion-* \ |
3685 | - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
3686 | - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ |
3687 | - | pru-* \ |
3688 | - | pyramid-* \ |
3689 | - | riscv32-* | riscv64-* \ |
3690 | - | rl78-* | romp-* | rs6000-* | rx-* \ |
3691 | - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ |
3692 | - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
3693 | - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ |
3694 | - | sparclite-* \ |
3695 | - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ |
3696 | - | tahoe-* \ |
3697 | - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ |
3698 | - | tile*-* \ |
3699 | - | tron-* \ |
3700 | - | ubicom32-* \ |
3701 | - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ |
3702 | - | vax-* \ |
3703 | - | visium-* \ |
3704 | - | wasm32-* \ |
3705 | - | we32k-* \ |
3706 | - | x86-* | x86_64-* | xc16x-* | xps100-* \ |
3707 | - | xstormy16-* | xtensa*-* \ |
3708 | - | ymp-* \ |
3709 | - | z8k-* | z80-*) |
3710 | - ;; |
3711 | - # Recognize the basic CPU types without company name, with glob match. |
3712 | - xtensa*) |
3713 | - basic_machine=$basic_machine-unknown |
3714 | - ;; |
3715 | # Recognize the various machine names and aliases which stand |
3716 | # for a CPU type and a company and sometimes even an OS. |
3717 | - 386bsd) |
3718 | - basic_machine=i386-pc |
3719 | - os=-bsd |
3720 | - ;; |
3721 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
3722 | - basic_machine=m68000-att |
3723 | + cpu=m68000 |
3724 | + vendor=att |
3725 | ;; |
3726 | 3b*) |
3727 | - basic_machine=we32k-att |
3728 | - ;; |
3729 | - a29khif) |
3730 | - basic_machine=a29k-amd |
3731 | - os=-udi |
3732 | - ;; |
3733 | - abacus) |
3734 | - basic_machine=abacus-unknown |
3735 | - ;; |
3736 | - adobe68k) |
3737 | - basic_machine=m68010-adobe |
3738 | - os=-scout |
3739 | - ;; |
3740 | - alliant | fx80) |
3741 | - basic_machine=fx80-alliant |
3742 | - ;; |
3743 | - altos | altos3068) |
3744 | - basic_machine=m68k-altos |
3745 | - ;; |
3746 | - am29k) |
3747 | - basic_machine=a29k-none |
3748 | - os=-bsd |
3749 | - ;; |
3750 | - amd64) |
3751 | - basic_machine=x86_64-pc |
3752 | - ;; |
3753 | - amd64-*) |
3754 | - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
3755 | - ;; |
3756 | - amdahl) |
3757 | - basic_machine=580-amdahl |
3758 | - os=-sysv |
3759 | - ;; |
3760 | - amiga | amiga-*) |
3761 | - basic_machine=m68k-unknown |
3762 | - ;; |
3763 | - amigaos | amigados) |
3764 | - basic_machine=m68k-unknown |
3765 | - os=-amigaos |
3766 | - ;; |
3767 | - amigaunix | amix) |
3768 | - basic_machine=m68k-unknown |
3769 | - os=-sysv4 |
3770 | - ;; |
3771 | - apollo68) |
3772 | - basic_machine=m68k-apollo |
3773 | - os=-sysv |
3774 | - ;; |
3775 | - apollo68bsd) |
3776 | - basic_machine=m68k-apollo |
3777 | - os=-bsd |
3778 | - ;; |
3779 | - aros) |
3780 | - basic_machine=i386-pc |
3781 | - os=-aros |
3782 | - ;; |
3783 | - asmjs) |
3784 | - basic_machine=asmjs-unknown |
3785 | - ;; |
3786 | - aux) |
3787 | - basic_machine=m68k-apple |
3788 | - os=-aux |
3789 | - ;; |
3790 | - balance) |
3791 | - basic_machine=ns32k-sequent |
3792 | - os=-dynix |
3793 | - ;; |
3794 | - blackfin) |
3795 | - basic_machine=bfin-unknown |
3796 | - os=-linux |
3797 | - ;; |
3798 | - blackfin-*) |
3799 | - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
3800 | - os=-linux |
3801 | + cpu=we32k |
3802 | + vendor=att |
3803 | ;; |
3804 | bluegene*) |
3805 | - basic_machine=powerpc-ibm |
3806 | - os=-cnk |
3807 | - ;; |
3808 | - c54x-*) |
3809 | - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
3810 | - ;; |
3811 | - c55x-*) |
3812 | - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
3813 | - ;; |
3814 | - c6x-*) |
3815 | - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
3816 | - ;; |
3817 | - c90) |
3818 | - basic_machine=c90-cray |
3819 | - os=-unicos |
3820 | - ;; |
3821 | - cegcc) |
3822 | - basic_machine=arm-unknown |
3823 | - os=-cegcc |
3824 | - ;; |
3825 | - convex-c1) |
3826 | - basic_machine=c1-convex |
3827 | - os=-bsd |
3828 | - ;; |
3829 | - convex-c2) |
3830 | - basic_machine=c2-convex |
3831 | - os=-bsd |
3832 | - ;; |
3833 | - convex-c32) |
3834 | - basic_machine=c32-convex |
3835 | - os=-bsd |
3836 | - ;; |
3837 | - convex-c34) |
3838 | - basic_machine=c34-convex |
3839 | - os=-bsd |
3840 | - ;; |
3841 | - convex-c38) |
3842 | - basic_machine=c38-convex |
3843 | - os=-bsd |
3844 | - ;; |
3845 | - cray | j90) |
3846 | - basic_machine=j90-cray |
3847 | - os=-unicos |
3848 | - ;; |
3849 | - craynv) |
3850 | - basic_machine=craynv-cray |
3851 | - os=-unicosmp |
3852 | - ;; |
3853 | - cr16 | cr16-*) |
3854 | - basic_machine=cr16-unknown |
3855 | - os=-elf |
3856 | - ;; |
3857 | - crds | unos) |
3858 | - basic_machine=m68k-crds |
3859 | - ;; |
3860 | - crisv32 | crisv32-* | etraxfs*) |
3861 | - basic_machine=crisv32-axis |
3862 | - ;; |
3863 | - cris | cris-* | etrax*) |
3864 | - basic_machine=cris-axis |
3865 | - ;; |
3866 | - crx) |
3867 | - basic_machine=crx-unknown |
3868 | - os=-elf |
3869 | - ;; |
3870 | - da30 | da30-*) |
3871 | - basic_machine=m68k-da30 |
3872 | - ;; |
3873 | - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) |
3874 | - basic_machine=mips-dec |
3875 | + cpu=powerpc |
3876 | + vendor=ibm |
3877 | + basic_os=cnk |
3878 | ;; |
3879 | decsystem10* | dec10*) |
3880 | - basic_machine=pdp10-dec |
3881 | - os=-tops10 |
3882 | + cpu=pdp10 |
3883 | + vendor=dec |
3884 | + basic_os=tops10 |
3885 | ;; |
3886 | decsystem20* | dec20*) |
3887 | - basic_machine=pdp10-dec |
3888 | - os=-tops20 |
3889 | + cpu=pdp10 |
3890 | + vendor=dec |
3891 | + basic_os=tops20 |
3892 | ;; |
3893 | delta | 3300 | motorola-3300 | motorola-delta \ |
3894 | | 3300-motorola | delta-motorola) |
3895 | - basic_machine=m68k-motorola |
3896 | - ;; |
3897 | - delta88) |
3898 | - basic_machine=m88k-motorola |
3899 | - os=-sysv3 |
3900 | - ;; |
3901 | - dicos) |
3902 | - basic_machine=i686-pc |
3903 | - os=-dicos |
3904 | - ;; |
3905 | - djgpp) |
3906 | - basic_machine=i586-pc |
3907 | - os=-msdosdjgpp |
3908 | - ;; |
3909 | - dpx20 | dpx20-*) |
3910 | - basic_machine=rs6000-bull |
3911 | - os=-bosx |
3912 | + cpu=m68k |
3913 | + vendor=motorola |
3914 | ;; |
3915 | dpx2*) |
3916 | - basic_machine=m68k-bull |
3917 | - os=-sysv3 |
3918 | - ;; |
3919 | - e500v[12]) |
3920 | - basic_machine=powerpc-unknown |
3921 | - os=$os"spe" |
3922 | - ;; |
3923 | - e500v[12]-*) |
3924 | - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
3925 | - os=$os"spe" |
3926 | - ;; |
3927 | - ebmon29k) |
3928 | - basic_machine=a29k-amd |
3929 | - os=-ebmon |
3930 | - ;; |
3931 | - elxsi) |
3932 | - basic_machine=elxsi-elxsi |
3933 | - os=-bsd |
3934 | + cpu=m68k |
3935 | + vendor=bull |
3936 | + basic_os=sysv3 |
3937 | ;; |
3938 | encore | umax | mmax) |
3939 | - basic_machine=ns32k-encore |
3940 | + cpu=ns32k |
3941 | + vendor=encore |
3942 | ;; |
3943 | - es1800 | OSE68k | ose68k | ose | OSE) |
3944 | - basic_machine=m68k-ericsson |
3945 | - os=-ose |
3946 | + elxsi) |
3947 | + cpu=elxsi |
3948 | + vendor=elxsi |
3949 | + basic_os=${basic_os:-bsd} |
3950 | ;; |
3951 | fx2800) |
3952 | - basic_machine=i860-alliant |
3953 | + cpu=i860 |
3954 | + vendor=alliant |
3955 | ;; |
3956 | genix) |
3957 | - basic_machine=ns32k-ns |
3958 | - ;; |
3959 | - gmicro) |
3960 | - basic_machine=tron-gmicro |
3961 | - os=-sysv |
3962 | - ;; |
3963 | - go32) |
3964 | - basic_machine=i386-pc |
3965 | - os=-go32 |
3966 | + cpu=ns32k |
3967 | + vendor=ns |
3968 | ;; |
3969 | h3050r* | hiux*) |
3970 | - basic_machine=hppa1.1-hitachi |
3971 | - os=-hiuxwe2 |
3972 | - ;; |
3973 | - h8300hms) |
3974 | - basic_machine=h8300-hitachi |
3975 | - os=-hms |
3976 | - ;; |
3977 | - h8300xray) |
3978 | - basic_machine=h8300-hitachi |
3979 | - os=-xray |
3980 | - ;; |
3981 | - h8500hms) |
3982 | - basic_machine=h8500-hitachi |
3983 | - os=-hms |
3984 | - ;; |
3985 | - harris) |
3986 | - basic_machine=m88k-harris |
3987 | - os=-sysv3 |
3988 | - ;; |
3989 | - hp300-*) |
3990 | - basic_machine=m68k-hp |
3991 | - ;; |
3992 | - hp300bsd) |
3993 | - basic_machine=m68k-hp |
3994 | - os=-bsd |
3995 | - ;; |
3996 | - hp300hpux) |
3997 | - basic_machine=m68k-hp |
3998 | - os=-hpux |
3999 | + cpu=hppa1.1 |
4000 | + vendor=hitachi |
4001 | + basic_os=hiuxwe2 |
4002 | ;; |
4003 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
4004 | - basic_machine=hppa1.0-hp |
4005 | + cpu=hppa1.0 |
4006 | + vendor=hp |
4007 | ;; |
4008 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
4009 | - basic_machine=m68000-hp |
4010 | + cpu=m68000 |
4011 | + vendor=hp |
4012 | ;; |
4013 | hp9k3[2-9][0-9]) |
4014 | - basic_machine=m68k-hp |
4015 | + cpu=m68k |
4016 | + vendor=hp |
4017 | ;; |
4018 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
4019 | - basic_machine=hppa1.0-hp |
4020 | + cpu=hppa1.0 |
4021 | + vendor=hp |
4022 | ;; |
4023 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
4024 | - basic_machine=hppa1.1-hp |
4025 | + cpu=hppa1.1 |
4026 | + vendor=hp |
4027 | ;; |
4028 | hp9k78[0-9] | hp78[0-9]) |
4029 | # FIXME: really hppa2.0-hp |
4030 | - basic_machine=hppa1.1-hp |
4031 | + cpu=hppa1.1 |
4032 | + vendor=hp |
4033 | ;; |
4034 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
4035 | # FIXME: really hppa2.0-hp |
4036 | - basic_machine=hppa1.1-hp |
4037 | + cpu=hppa1.1 |
4038 | + vendor=hp |
4039 | ;; |
4040 | hp9k8[0-9][13679] | hp8[0-9][13679]) |
4041 | - basic_machine=hppa1.1-hp |
4042 | + cpu=hppa1.1 |
4043 | + vendor=hp |
4044 | ;; |
4045 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
4046 | - basic_machine=hppa1.0-hp |
4047 | - ;; |
4048 | - hppaosf) |
4049 | - basic_machine=hppa1.1-hp |
4050 | - os=-osf |
4051 | - ;; |
4052 | - hppro) |
4053 | - basic_machine=hppa1.1-hp |
4054 | - os=-proelf |
4055 | - ;; |
4056 | - i370-ibm* | ibm*) |
4057 | - basic_machine=i370-ibm |
4058 | + cpu=hppa1.0 |
4059 | + vendor=hp |
4060 | ;; |
4061 | i*86v32) |
4062 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
4063 | - os=-sysv32 |
4064 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` |
4065 | + vendor=pc |
4066 | + basic_os=sysv32 |
4067 | ;; |
4068 | i*86v4*) |
4069 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
4070 | - os=-sysv4 |
4071 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` |
4072 | + vendor=pc |
4073 | + basic_os=sysv4 |
4074 | ;; |
4075 | i*86v) |
4076 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
4077 | - os=-sysv |
4078 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` |
4079 | + vendor=pc |
4080 | + basic_os=sysv |
4081 | ;; |
4082 | i*86sol2) |
4083 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
4084 | - os=-solaris2 |
4085 | - ;; |
4086 | - i386mach) |
4087 | - basic_machine=i386-mach |
4088 | - os=-mach |
4089 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` |
4090 | + vendor=pc |
4091 | + basic_os=solaris2 |
4092 | ;; |
4093 | - vsta) |
4094 | - basic_machine=i386-unknown |
4095 | - os=-vsta |
4096 | + j90 | j90-cray) |
4097 | + cpu=j90 |
4098 | + vendor=cray |
4099 | + basic_os=${basic_os:-unicos} |
4100 | ;; |
4101 | iris | iris4d) |
4102 | - basic_machine=mips-sgi |
4103 | - case $os in |
4104 | - -irix*) |
4105 | + cpu=mips |
4106 | + vendor=sgi |
4107 | + case $basic_os in |
4108 | + irix*) |
4109 | ;; |
4110 | *) |
4111 | - os=-irix4 |
4112 | + basic_os=irix4 |
4113 | ;; |
4114 | esac |
4115 | ;; |
4116 | - isi68 | isi) |
4117 | - basic_machine=m68k-isi |
4118 | - os=-sysv |
4119 | - ;; |
4120 | - leon-*|leon[3-9]-*) |
4121 | - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` |
4122 | - ;; |
4123 | - m68knommu) |
4124 | - basic_machine=m68k-unknown |
4125 | - os=-linux |
4126 | - ;; |
4127 | - m68knommu-*) |
4128 | - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4129 | - os=-linux |
4130 | - ;; |
4131 | - magnum | m3230) |
4132 | - basic_machine=mips-mips |
4133 | - os=-sysv |
4134 | - ;; |
4135 | - merlin) |
4136 | - basic_machine=ns32k-utek |
4137 | - os=-sysv |
4138 | - ;; |
4139 | - microblaze*) |
4140 | - basic_machine=microblaze-xilinx |
4141 | - ;; |
4142 | - mingw64) |
4143 | - basic_machine=x86_64-pc |
4144 | - os=-mingw64 |
4145 | - ;; |
4146 | - mingw32) |
4147 | - basic_machine=i686-pc |
4148 | - os=-mingw32 |
4149 | - ;; |
4150 | - mingw32ce) |
4151 | - basic_machine=arm-unknown |
4152 | - os=-mingw32ce |
4153 | - ;; |
4154 | miniframe) |
4155 | - basic_machine=m68000-convergent |
4156 | - ;; |
4157 | - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) |
4158 | - basic_machine=m68k-atari |
4159 | - os=-mint |
4160 | - ;; |
4161 | - mips3*-*) |
4162 | - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` |
4163 | - ;; |
4164 | - mips3*) |
4165 | - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown |
4166 | - ;; |
4167 | - monitor) |
4168 | - basic_machine=m68k-rom68k |
4169 | - os=-coff |
4170 | - ;; |
4171 | - morphos) |
4172 | - basic_machine=powerpc-unknown |
4173 | - os=-morphos |
4174 | - ;; |
4175 | - moxiebox) |
4176 | - basic_machine=moxie-unknown |
4177 | - os=-moxiebox |
4178 | - ;; |
4179 | - msdos) |
4180 | - basic_machine=i386-pc |
4181 | - os=-msdos |
4182 | - ;; |
4183 | - ms1-*) |
4184 | - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` |
4185 | - ;; |
4186 | - msys) |
4187 | - basic_machine=i686-pc |
4188 | - os=-msys |
4189 | - ;; |
4190 | - mvs) |
4191 | - basic_machine=i370-ibm |
4192 | - os=-mvs |
4193 | - ;; |
4194 | - nacl) |
4195 | - basic_machine=le32-unknown |
4196 | - os=-nacl |
4197 | - ;; |
4198 | - ncr3000) |
4199 | - basic_machine=i486-ncr |
4200 | - os=-sysv4 |
4201 | + cpu=m68000 |
4202 | + vendor=convergent |
4203 | ;; |
4204 | - netbsd386) |
4205 | - basic_machine=i386-unknown |
4206 | - os=-netbsd |
4207 | - ;; |
4208 | - netwinder) |
4209 | - basic_machine=armv4l-rebel |
4210 | - os=-linux |
4211 | - ;; |
4212 | - news | news700 | news800 | news900) |
4213 | - basic_machine=m68k-sony |
4214 | - os=-newsos |
4215 | - ;; |
4216 | - news1000) |
4217 | - basic_machine=m68030-sony |
4218 | - os=-newsos |
4219 | + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) |
4220 | + cpu=m68k |
4221 | + vendor=atari |
4222 | + basic_os=mint |
4223 | ;; |
4224 | news-3600 | risc-news) |
4225 | - basic_machine=mips-sony |
4226 | - os=-newsos |
4227 | - ;; |
4228 | - necv70) |
4229 | - basic_machine=v70-nec |
4230 | - os=-sysv |
4231 | + cpu=mips |
4232 | + vendor=sony |
4233 | + basic_os=newsos |
4234 | ;; |
4235 | next | m*-next) |
4236 | - basic_machine=m68k-next |
4237 | - case $os in |
4238 | - -nextstep* ) |
4239 | + cpu=m68k |
4240 | + vendor=next |
4241 | + case $basic_os in |
4242 | + openstep*) |
4243 | + ;; |
4244 | + nextstep*) |
4245 | ;; |
4246 | - -ns2*) |
4247 | - os=-nextstep2 |
4248 | + ns2*) |
4249 | + basic_os=nextstep2 |
4250 | ;; |
4251 | *) |
4252 | - os=-nextstep3 |
4253 | + basic_os=nextstep3 |
4254 | ;; |
4255 | esac |
4256 | ;; |
4257 | - nh3000) |
4258 | - basic_machine=m68k-harris |
4259 | - os=-cxux |
4260 | - ;; |
4261 | - nh[45]000) |
4262 | - basic_machine=m88k-harris |
4263 | - os=-cxux |
4264 | - ;; |
4265 | - nindy960) |
4266 | - basic_machine=i960-intel |
4267 | - os=-nindy |
4268 | - ;; |
4269 | - mon960) |
4270 | - basic_machine=i960-intel |
4271 | - os=-mon960 |
4272 | - ;; |
4273 | - nonstopux) |
4274 | - basic_machine=mips-compaq |
4275 | - os=-nonstopux |
4276 | - ;; |
4277 | np1) |
4278 | - basic_machine=np1-gould |
4279 | - ;; |
4280 | - neo-tandem) |
4281 | - basic_machine=neo-tandem |
4282 | - ;; |
4283 | - nse-tandem) |
4284 | - basic_machine=nse-tandem |
4285 | - ;; |
4286 | - nsr-tandem) |
4287 | - basic_machine=nsr-tandem |
4288 | - ;; |
4289 | - nsv-tandem) |
4290 | - basic_machine=nsv-tandem |
4291 | - ;; |
4292 | - nsx-tandem) |
4293 | - basic_machine=nsx-tandem |
4294 | + cpu=np1 |
4295 | + vendor=gould |
4296 | ;; |
4297 | op50n-* | op60c-*) |
4298 | - basic_machine=hppa1.1-oki |
4299 | - os=-proelf |
4300 | - ;; |
4301 | - openrisc | openrisc-*) |
4302 | - basic_machine=or32-unknown |
4303 | - ;; |
4304 | - os400) |
4305 | - basic_machine=powerpc-ibm |
4306 | - os=-os400 |
4307 | - ;; |
4308 | - OSE68000 | ose68000) |
4309 | - basic_machine=m68000-ericsson |
4310 | - os=-ose |
4311 | - ;; |
4312 | - os68k) |
4313 | - basic_machine=m68k-none |
4314 | - os=-os68k |
4315 | + cpu=hppa1.1 |
4316 | + vendor=oki |
4317 | + basic_os=proelf |
4318 | ;; |
4319 | pa-hitachi) |
4320 | - basic_machine=hppa1.1-hitachi |
4321 | - os=-hiuxwe2 |
4322 | - ;; |
4323 | - paragon) |
4324 | - basic_machine=i860-intel |
4325 | - os=-osf |
4326 | - ;; |
4327 | - parisc) |
4328 | - basic_machine=hppa-unknown |
4329 | - os=-linux |
4330 | - ;; |
4331 | - parisc-*) |
4332 | - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4333 | - os=-linux |
4334 | + cpu=hppa1.1 |
4335 | + vendor=hitachi |
4336 | + basic_os=hiuxwe2 |
4337 | ;; |
4338 | pbd) |
4339 | - basic_machine=sparc-tti |
4340 | + cpu=sparc |
4341 | + vendor=tti |
4342 | ;; |
4343 | pbb) |
4344 | - basic_machine=m68k-tti |
4345 | - ;; |
4346 | - pc532 | pc532-*) |
4347 | - basic_machine=ns32k-pc532 |
4348 | - ;; |
4349 | - pc98) |
4350 | - basic_machine=i386-pc |
4351 | + cpu=m68k |
4352 | + vendor=tti |
4353 | ;; |
4354 | - pc98-*) |
4355 | - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4356 | - ;; |
4357 | - pentium | p5 | k5 | k6 | nexgen | viac3) |
4358 | - basic_machine=i586-pc |
4359 | - ;; |
4360 | - pentiumpro | p6 | 6x86 | athlon | athlon_*) |
4361 | - basic_machine=i686-pc |
4362 | - ;; |
4363 | - pentiumii | pentium2 | pentiumiii | pentium3) |
4364 | - basic_machine=i686-pc |
4365 | - ;; |
4366 | - pentium4) |
4367 | - basic_machine=i786-pc |
4368 | - ;; |
4369 | - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
4370 | - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4371 | - ;; |
4372 | - pentiumpro-* | p6-* | 6x86-* | athlon-*) |
4373 | - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4374 | - ;; |
4375 | - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
4376 | - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4377 | - ;; |
4378 | - pentium4-*) |
4379 | - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4380 | + pc532) |
4381 | + cpu=ns32k |
4382 | + vendor=pc532 |
4383 | ;; |
4384 | pn) |
4385 | - basic_machine=pn-gould |
4386 | - ;; |
4387 | - power) basic_machine=power-ibm |
4388 | - ;; |
4389 | - ppc | ppcbe) basic_machine=powerpc-unknown |
4390 | - ;; |
4391 | - ppc-* | ppcbe-*) |
4392 | - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4393 | + cpu=pn |
4394 | + vendor=gould |
4395 | ;; |
4396 | - ppcle | powerpclittle) |
4397 | - basic_machine=powerpcle-unknown |
4398 | + power) |
4399 | + cpu=power |
4400 | + vendor=ibm |
4401 | ;; |
4402 | - ppcle-* | powerpclittle-*) |
4403 | - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4404 | + ps2) |
4405 | + cpu=i386 |
4406 | + vendor=ibm |
4407 | ;; |
4408 | - ppc64) basic_machine=powerpc64-unknown |
4409 | + rm[46]00) |
4410 | + cpu=mips |
4411 | + vendor=siemens |
4412 | ;; |
4413 | - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4414 | + rtpc | rtpc-*) |
4415 | + cpu=romp |
4416 | + vendor=ibm |
4417 | ;; |
4418 | - ppc64le | powerpc64little) |
4419 | - basic_machine=powerpc64le-unknown |
4420 | + sde) |
4421 | + cpu=mipsisa32 |
4422 | + vendor=sde |
4423 | + basic_os=${basic_os:-elf} |
4424 | ;; |
4425 | - ppc64le-* | powerpc64little-*) |
4426 | - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4427 | + simso-wrs) |
4428 | + cpu=sparclite |
4429 | + vendor=wrs |
4430 | + basic_os=vxworks |
4431 | ;; |
4432 | - ps2) |
4433 | - basic_machine=i386-ibm |
4434 | + tower | tower-32) |
4435 | + cpu=m68k |
4436 | + vendor=ncr |
4437 | ;; |
4438 | - pw32) |
4439 | - basic_machine=i586-unknown |
4440 | - os=-pw32 |
4441 | + vpp*|vx|vx-*) |
4442 | + cpu=f301 |
4443 | + vendor=fujitsu |
4444 | ;; |
4445 | - rdos | rdos64) |
4446 | - basic_machine=x86_64-pc |
4447 | - os=-rdos |
4448 | + w65) |
4449 | + cpu=w65 |
4450 | + vendor=wdc |
4451 | ;; |
4452 | - rdos32) |
4453 | - basic_machine=i386-pc |
4454 | - os=-rdos |
4455 | + w89k-*) |
4456 | + cpu=hppa1.1 |
4457 | + vendor=winbond |
4458 | + basic_os=proelf |
4459 | ;; |
4460 | - rom68k) |
4461 | - basic_machine=m68k-rom68k |
4462 | - os=-coff |
4463 | + none) |
4464 | + cpu=none |
4465 | + vendor=none |
4466 | ;; |
4467 | - rm[46]00) |
4468 | - basic_machine=mips-siemens |
4469 | + leon|leon[3-9]) |
4470 | + cpu=sparc |
4471 | + vendor=$basic_machine |
4472 | ;; |
4473 | - rtpc | rtpc-*) |
4474 | - basic_machine=romp-ibm |
4475 | + leon-*|leon[3-9]-*) |
4476 | + cpu=sparc |
4477 | + vendor=`echo "$basic_machine" | sed 's/-.*//'` |
4478 | ;; |
4479 | - s390 | s390-*) |
4480 | - basic_machine=s390-ibm |
4481 | + |
4482 | + *-*) |
4483 | + # shellcheck disable=SC2162 |
4484 | + saved_IFS=$IFS |
4485 | + IFS="-" read cpu vendor <<EOF |
4486 | +$basic_machine |
4487 | +EOF |
4488 | + IFS=$saved_IFS |
4489 | ;; |
4490 | - s390x | s390x-*) |
4491 | - basic_machine=s390x-ibm |
4492 | + # We use `pc' rather than `unknown' |
4493 | + # because (1) that's what they normally are, and |
4494 | + # (2) the word "unknown" tends to confuse beginning users. |
4495 | + i*86 | x86_64) |
4496 | + cpu=$basic_machine |
4497 | + vendor=pc |
4498 | ;; |
4499 | - sa29200) |
4500 | - basic_machine=a29k-amd |
4501 | - os=-udi |
4502 | + # These rules are duplicated from below for sake of the special case above; |
4503 | + # i.e. things that normalized to x86 arches should also default to "pc" |
4504 | + pc98) |
4505 | + cpu=i386 |
4506 | + vendor=pc |
4507 | ;; |
4508 | - sb1) |
4509 | - basic_machine=mipsisa64sb1-unknown |
4510 | + x64 | amd64) |
4511 | + cpu=x86_64 |
4512 | + vendor=pc |
4513 | ;; |
4514 | - sb1el) |
4515 | - basic_machine=mipsisa64sb1el-unknown |
4516 | + # Recognize the basic CPU types without company name. |
4517 | + *) |
4518 | + cpu=$basic_machine |
4519 | + vendor=unknown |
4520 | ;; |
4521 | - sde) |
4522 | - basic_machine=mipsisa32-sde |
4523 | - os=-elf |
4524 | +esac |
4525 | + |
4526 | +unset -v basic_machine |
4527 | + |
4528 | +# Decode basic machines in the full and proper CPU-Company form. |
4529 | +case $cpu-$vendor in |
4530 | + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in |
4531 | + # some cases the only manufacturer, in others, it is the most popular. |
4532 | + craynv-unknown) |
4533 | + vendor=cray |
4534 | + basic_os=${basic_os:-unicosmp} |
4535 | ;; |
4536 | - sei) |
4537 | - basic_machine=mips-sei |
4538 | - os=-seiux |
4539 | + c90-unknown | c90-cray) |
4540 | + vendor=cray |
4541 | + basic_os=${Basic_os:-unicos} |
4542 | ;; |
4543 | - sequent) |
4544 | - basic_machine=i386-sequent |
4545 | + fx80-unknown) |
4546 | + vendor=alliant |
4547 | ;; |
4548 | - sh5el) |
4549 | - basic_machine=sh5le-unknown |
4550 | + romp-unknown) |
4551 | + vendor=ibm |
4552 | ;; |
4553 | - simso-wrs) |
4554 | - basic_machine=sparclite-wrs |
4555 | - os=-vxworks |
4556 | + mmix-unknown) |
4557 | + vendor=knuth |
4558 | ;; |
4559 | - sps7) |
4560 | - basic_machine=m68k-bull |
4561 | - os=-sysv2 |
4562 | + microblaze-unknown | microblazeel-unknown) |
4563 | + vendor=xilinx |
4564 | ;; |
4565 | - spur) |
4566 | - basic_machine=spur-unknown |
4567 | + rs6000-unknown) |
4568 | + vendor=ibm |
4569 | ;; |
4570 | - st2000) |
4571 | - basic_machine=m68k-tandem |
4572 | + vax-unknown) |
4573 | + vendor=dec |
4574 | ;; |
4575 | - stratus) |
4576 | - basic_machine=i860-stratus |
4577 | - os=-sysv4 |
4578 | + pdp11-unknown) |
4579 | + vendor=dec |
4580 | ;; |
4581 | - strongarm-* | thumb-*) |
4582 | - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
4583 | + we32k-unknown) |
4584 | + vendor=att |
4585 | ;; |
4586 | - sun2) |
4587 | - basic_machine=m68000-sun |
4588 | + cydra-unknown) |
4589 | + vendor=cydrome |
4590 | ;; |
4591 | - sun2os3) |
4592 | - basic_machine=m68000-sun |
4593 | - os=-sunos3 |
4594 | + i370-ibm*) |
4595 | + vendor=ibm |
4596 | ;; |
4597 | - sun2os4) |
4598 | - basic_machine=m68000-sun |
4599 | - os=-sunos4 |
4600 | + orion-unknown) |
4601 | + vendor=highlevel |
4602 | ;; |
4603 | - sun3os3) |
4604 | - basic_machine=m68k-sun |
4605 | - os=-sunos3 |
4606 | + xps-unknown | xps100-unknown) |
4607 | + cpu=xps100 |
4608 | + vendor=honeywell |
4609 | ;; |
4610 | - sun3os4) |
4611 | - basic_machine=m68k-sun |
4612 | - os=-sunos4 |
4613 | + |
4614 | + # Here we normalize CPU types with a missing or matching vendor |
4615 | + armh-unknown | armh-alt) |
4616 | + cpu=armv7l |
4617 | + vendor=alt |
4618 | + basic_os=${basic_os:-linux-gnueabihf} |
4619 | ;; |
4620 | - sun4os3) |
4621 | - basic_machine=sparc-sun |
4622 | - os=-sunos3 |
4623 | + dpx20-unknown | dpx20-bull) |
4624 | + cpu=rs6000 |
4625 | + vendor=bull |
4626 | + basic_os=${basic_os:-bosx} |
4627 | ;; |
4628 | - sun4os4) |
4629 | - basic_machine=sparc-sun |
4630 | - os=-sunos4 |
4631 | + |
4632 | + # Here we normalize CPU types irrespective of the vendor |
4633 | + amd64-*) |
4634 | + cpu=x86_64 |
4635 | ;; |
4636 | - sun4sol2) |
4637 | - basic_machine=sparc-sun |
4638 | - os=-solaris2 |
4639 | + blackfin-*) |
4640 | + cpu=bfin |
4641 | + basic_os=linux |
4642 | ;; |
4643 | - sun3 | sun3-*) |
4644 | - basic_machine=m68k-sun |
4645 | + c54x-*) |
4646 | + cpu=tic54x |
4647 | ;; |
4648 | - sun4) |
4649 | - basic_machine=sparc-sun |
4650 | + c55x-*) |
4651 | + cpu=tic55x |
4652 | ;; |
4653 | - sun386 | sun386i | roadrunner) |
4654 | - basic_machine=i386-sun |
4655 | + c6x-*) |
4656 | + cpu=tic6x |
4657 | ;; |
4658 | - sv1) |
4659 | - basic_machine=sv1-cray |
4660 | - os=-unicos |
4661 | + e500v[12]-*) |
4662 | + cpu=powerpc |
4663 | + basic_os=${basic_os}"spe" |
4664 | ;; |
4665 | - symmetry) |
4666 | - basic_machine=i386-sequent |
4667 | - os=-dynix |
4668 | + mips3*-*) |
4669 | + cpu=mips64 |
4670 | ;; |
4671 | - t3e) |
4672 | - basic_machine=alphaev5-cray |
4673 | - os=-unicos |
4674 | + ms1-*) |
4675 | + cpu=mt |
4676 | ;; |
4677 | - t90) |
4678 | - basic_machine=t90-cray |
4679 | - os=-unicos |
4680 | + m68knommu-*) |
4681 | + cpu=m68k |
4682 | + basic_os=linux |
4683 | ;; |
4684 | - tile*) |
4685 | - basic_machine=$basic_machine-unknown |
4686 | - os=-linux-gnu |
4687 | + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) |
4688 | + cpu=s12z |
4689 | ;; |
4690 | - tx39) |
4691 | - basic_machine=mipstx39-unknown |
4692 | + openrisc-*) |
4693 | + cpu=or32 |
4694 | ;; |
4695 | - tx39el) |
4696 | - basic_machine=mipstx39el-unknown |
4697 | + parisc-*) |
4698 | + cpu=hppa |
4699 | + basic_os=linux |
4700 | ;; |
4701 | - toad1) |
4702 | - basic_machine=pdp10-xkl |
4703 | - os=-tops20 |
4704 | + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
4705 | + cpu=i586 |
4706 | ;; |
4707 | - tower | tower-32) |
4708 | - basic_machine=m68k-ncr |
4709 | + pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) |
4710 | + cpu=i686 |
4711 | ;; |
4712 | - tpf) |
4713 | - basic_machine=s390x-ibm |
4714 | - os=-tpf |
4715 | + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
4716 | + cpu=i686 |
4717 | ;; |
4718 | - udi29k) |
4719 | - basic_machine=a29k-amd |
4720 | - os=-udi |
4721 | + pentium4-*) |
4722 | + cpu=i786 |
4723 | ;; |
4724 | - ultra3) |
4725 | - basic_machine=a29k-nyu |
4726 | - os=-sym1 |
4727 | + pc98-*) |
4728 | + cpu=i386 |
4729 | ;; |
4730 | - v810 | necv810) |
4731 | - basic_machine=v810-nec |
4732 | - os=-none |
4733 | + ppc-* | ppcbe-*) |
4734 | + cpu=powerpc |
4735 | ;; |
4736 | - vaxv) |
4737 | - basic_machine=vax-dec |
4738 | - os=-sysv |
4739 | + ppcle-* | powerpclittle-*) |
4740 | + cpu=powerpcle |
4741 | ;; |
4742 | - vms) |
4743 | - basic_machine=vax-dec |
4744 | - os=-vms |
4745 | + ppc64-*) |
4746 | + cpu=powerpc64 |
4747 | ;; |
4748 | - vpp*|vx|vx-*) |
4749 | - basic_machine=f301-fujitsu |
4750 | + ppc64le-* | powerpc64little-*) |
4751 | + cpu=powerpc64le |
4752 | ;; |
4753 | - vxworks960) |
4754 | - basic_machine=i960-wrs |
4755 | - os=-vxworks |
4756 | + sb1-*) |
4757 | + cpu=mipsisa64sb1 |
4758 | ;; |
4759 | - vxworks68) |
4760 | - basic_machine=m68k-wrs |
4761 | - os=-vxworks |
4762 | + sb1el-*) |
4763 | + cpu=mipsisa64sb1el |
4764 | ;; |
4765 | - vxworks29k) |
4766 | - basic_machine=a29k-wrs |
4767 | - os=-vxworks |
4768 | + sh5e[lb]-*) |
4769 | + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` |
4770 | ;; |
4771 | - w65*) |
4772 | - basic_machine=w65-wdc |
4773 | - os=-none |
4774 | + spur-*) |
4775 | + cpu=spur |
4776 | ;; |
4777 | - w89k-*) |
4778 | - basic_machine=hppa1.1-winbond |
4779 | - os=-proelf |
4780 | + strongarm-* | thumb-*) |
4781 | + cpu=arm |
4782 | ;; |
4783 | - x64) |
4784 | - basic_machine=x86_64-pc |
4785 | + tx39-*) |
4786 | + cpu=mipstx39 |
4787 | ;; |
4788 | - xbox) |
4789 | - basic_machine=i686-pc |
4790 | - os=-mingw32 |
4791 | + tx39el-*) |
4792 | + cpu=mipstx39el |
4793 | ;; |
4794 | - xps | xps100) |
4795 | - basic_machine=xps100-honeywell |
4796 | + x64-*) |
4797 | + cpu=x86_64 |
4798 | ;; |
4799 | xscale-* | xscalee[bl]-*) |
4800 | - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` |
4801 | + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` |
4802 | ;; |
4803 | - ymp) |
4804 | - basic_machine=ymp-cray |
4805 | - os=-unicos |
4806 | - ;; |
4807 | - none) |
4808 | - basic_machine=none-none |
4809 | - os=-none |
4810 | + arm64-* | aarch64le-*) |
4811 | + cpu=aarch64 |
4812 | ;; |
4813 | |
4814 | -# Here we handle the default manufacturer of certain CPU types. It is in |
4815 | -# some cases the only manufacturer, in others, it is the most popular. |
4816 | - w89k) |
4817 | - basic_machine=hppa1.1-winbond |
4818 | - ;; |
4819 | - op50n) |
4820 | - basic_machine=hppa1.1-oki |
4821 | - ;; |
4822 | - op60c) |
4823 | - basic_machine=hppa1.1-oki |
4824 | - ;; |
4825 | - romp) |
4826 | - basic_machine=romp-ibm |
4827 | + # Recognize the canonical CPU Types that limit and/or modify the |
4828 | + # company names they are paired with. |
4829 | + cr16-*) |
4830 | + basic_os=${basic_os:-elf} |
4831 | ;; |
4832 | - mmix) |
4833 | - basic_machine=mmix-knuth |
4834 | + crisv32-* | etraxfs*-*) |
4835 | + cpu=crisv32 |
4836 | + vendor=axis |
4837 | ;; |
4838 | - rs6000) |
4839 | - basic_machine=rs6000-ibm |
4840 | + cris-* | etrax*-*) |
4841 | + cpu=cris |
4842 | + vendor=axis |
4843 | ;; |
4844 | - vax) |
4845 | - basic_machine=vax-dec |
4846 | + crx-*) |
4847 | + basic_os=${basic_os:-elf} |
4848 | ;; |
4849 | - pdp11) |
4850 | - basic_machine=pdp11-dec |
4851 | - ;; |
4852 | - we32k) |
4853 | - basic_machine=we32k-att |
4854 | - ;; |
4855 | - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) |
4856 | - basic_machine=sh-unknown |
4857 | + neo-tandem) |
4858 | + cpu=neo |
4859 | + vendor=tandem |
4860 | ;; |
4861 | - cydra) |
4862 | - basic_machine=cydra-cydrome |
4863 | + nse-tandem) |
4864 | + cpu=nse |
4865 | + vendor=tandem |
4866 | ;; |
4867 | - orion) |
4868 | - basic_machine=orion-highlevel |
4869 | + nsr-tandem) |
4870 | + cpu=nsr |
4871 | + vendor=tandem |
4872 | ;; |
4873 | - orion105) |
4874 | - basic_machine=clipper-highlevel |
4875 | + nsv-tandem) |
4876 | + cpu=nsv |
4877 | + vendor=tandem |
4878 | ;; |
4879 | - mac | mpw | mac-mpw) |
4880 | - basic_machine=m68k-apple |
4881 | + nsx-tandem) |
4882 | + cpu=nsx |
4883 | + vendor=tandem |
4884 | ;; |
4885 | - pmac | pmac-mpw) |
4886 | - basic_machine=powerpc-apple |
4887 | + mipsallegrexel-sony) |
4888 | + cpu=mipsallegrexel |
4889 | + vendor=sony |
4890 | ;; |
4891 | - *-unknown) |
4892 | - # Make sure to match an already-canonicalized machine name. |
4893 | + tile*-*) |
4894 | + basic_os=${basic_os:-linux-gnu} |
4895 | ;; |
4896 | + |
4897 | *) |
4898 | - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 |
4899 | - exit 1 |
4900 | + # Recognize the canonical CPU types that are allowed with any |
4901 | + # company name. |
4902 | + case $cpu in |
4903 | + 1750a | 580 \ |
4904 | + | a29k \ |
4905 | + | aarch64 | aarch64_be \ |
4906 | + | abacus \ |
4907 | + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ |
4908 | + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ |
4909 | + | alphapca5[67] | alpha64pca5[67] \ |
4910 | + | am33_2.0 \ |
4911 | + | amdgcn \ |
4912 | + | arc | arceb | arc32 | arc64 \ |
4913 | + | arm | arm[lb]e | arme[lb] | armv* \ |
4914 | + | avr | avr32 \ |
4915 | + | asmjs \ |
4916 | + | ba \ |
4917 | + | be32 | be64 \ |
4918 | + | bfin | bpf | bs2000 \ |
4919 | + | c[123]* | c30 | [cjt]90 | c4x \ |
4920 | + | c8051 | clipper | craynv | csky | cydra \ |
4921 | + | d10v | d30v | dlx | dsp16xx \ |
4922 | + | e2k | elxsi | epiphany \ |
4923 | + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ |
4924 | + | h8300 | h8500 \ |
4925 | + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
4926 | + | hexagon \ |
4927 | + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ |
4928 | + | ip2k | iq2000 \ |
4929 | + | k1om \ |
4930 | + | le32 | le64 \ |
4931 | + | lm32 \ |
4932 | + | loongarch32 | loongarch64 | loongarchx32 \ |
4933 | + | m32c | m32r | m32rle \ |
4934 | + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ |
4935 | + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ |
4936 | + | m88110 | m88k | maxq | mb | mcore | mep | metag \ |
4937 | + | microblaze | microblazeel \ |
4938 | + | mips | mipsbe | mipseb | mipsel | mipsle \ |
4939 | + | mips16 \ |
4940 | + | mips64 | mips64eb | mips64el \ |
4941 | + | mips64octeon | mips64octeonel \ |
4942 | + | mips64orion | mips64orionel \ |
4943 | + | mips64r5900 | mips64r5900el \ |
4944 | + | mips64vr | mips64vrel \ |
4945 | + | mips64vr4100 | mips64vr4100el \ |
4946 | + | mips64vr4300 | mips64vr4300el \ |
4947 | + | mips64vr5000 | mips64vr5000el \ |
4948 | + | mips64vr5900 | mips64vr5900el \ |
4949 | + | mipsisa32 | mipsisa32el \ |
4950 | + | mipsisa32r2 | mipsisa32r2el \ |
4951 | + | mipsisa32r3 | mipsisa32r3el \ |
4952 | + | mipsisa32r5 | mipsisa32r5el \ |
4953 | + | mipsisa32r6 | mipsisa32r6el \ |
4954 | + | mipsisa64 | mipsisa64el \ |
4955 | + | mipsisa64r2 | mipsisa64r2el \ |
4956 | + | mipsisa64r3 | mipsisa64r3el \ |
4957 | + | mipsisa64r5 | mipsisa64r5el \ |
4958 | + | mipsisa64r6 | mipsisa64r6el \ |
4959 | + | mipsisa64sb1 | mipsisa64sb1el \ |
4960 | + | mipsisa64sr71k | mipsisa64sr71kel \ |
4961 | + | mipsr5900 | mipsr5900el \ |
4962 | + | mipstx39 | mipstx39el \ |
4963 | + | mmix \ |
4964 | + | mn10200 | mn10300 \ |
4965 | + | moxie \ |
4966 | + | mt \ |
4967 | + | msp430 \ |
4968 | + | nds32 | nds32le | nds32be \ |
4969 | + | nfp \ |
4970 | + | nios | nios2 | nios2eb | nios2el \ |
4971 | + | none | np1 | ns16k | ns32k | nvptx \ |
4972 | + | open8 \ |
4973 | + | or1k* \ |
4974 | + | or32 \ |
4975 | + | orion \ |
4976 | + | picochip \ |
4977 | + | pdp10 | pdp11 | pj | pjl | pn | power \ |
4978 | + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ |
4979 | + | pru \ |
4980 | + | pyramid \ |
4981 | + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ |
4982 | + | rl78 | romp | rs6000 | rx \ |
4983 | + | s390 | s390x \ |
4984 | + | score \ |
4985 | + | sh | shl \ |
4986 | + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ |
4987 | + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ |
4988 | + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ |
4989 | + | sparclite \ |
4990 | + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ |
4991 | + | spu \ |
4992 | + | tahoe \ |
4993 | + | thumbv7* \ |
4994 | + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ |
4995 | + | tron \ |
4996 | + | ubicom32 \ |
4997 | + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ |
4998 | + | vax \ |
4999 | + | visium \ |
5000 | + | w65 \ |
The diff has been truncated for viewing.