ruby-libstorj 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +1 -0
  5. data/Gemfile +23 -0
  6. data/Gemfile.lock +111 -0
  7. data/Guardfile +21 -0
  8. data/LICENSE +502 -0
  9. data/README.md +262 -0
  10. data/Rakefile +76 -0
  11. data/ext/libstorj/.gitignore +47 -0
  12. data/ext/libstorj/.travis.yml +27 -0
  13. data/ext/libstorj/Doxyfile +2427 -0
  14. data/ext/libstorj/LICENSE +502 -0
  15. data/ext/libstorj/Makefile.am +6 -0
  16. data/ext/libstorj/README.md +198 -0
  17. data/ext/libstorj/autogen.sh +3 -0
  18. data/ext/libstorj/configure.ac +64 -0
  19. data/ext/libstorj/depends/Makefile +153 -0
  20. data/ext/libstorj/depends/config.guess +1462 -0
  21. data/ext/libstorj/depends/config.sub +1823 -0
  22. data/ext/libstorj/depends/extract-osx-sdk.sh +33 -0
  23. data/ext/libstorj/depends/packages/cctools.mk +7 -0
  24. data/ext/libstorj/depends/packages/clang.mk +7 -0
  25. data/ext/libstorj/depends/packages/gmp.mk +23 -0
  26. data/ext/libstorj/depends/packages/gnutls.mk +25 -0
  27. data/ext/libstorj/depends/packages/json-c.mk +7 -0
  28. data/ext/libstorj/depends/packages/libcurl.mk +39 -0
  29. data/ext/libstorj/depends/packages/libmicrohttpd.mk +7 -0
  30. data/ext/libstorj/depends/packages/libuv.mk +7 -0
  31. data/ext/libstorj/depends/packages/nettle.mk +30 -0
  32. data/ext/libstorj/libstorj.pc.in +11 -0
  33. data/ext/libstorj/src/Makefile.am +23 -0
  34. data/ext/libstorj/src/bip39.c +233 -0
  35. data/ext/libstorj/src/bip39.h +64 -0
  36. data/ext/libstorj/src/bip39_english.h +2074 -0
  37. data/ext/libstorj/src/cli.c +1494 -0
  38. data/ext/libstorj/src/crypto.c +525 -0
  39. data/ext/libstorj/src/crypto.h +178 -0
  40. data/ext/libstorj/src/downloader.c +1923 -0
  41. data/ext/libstorj/src/downloader.h +163 -0
  42. data/ext/libstorj/src/http.c +688 -0
  43. data/ext/libstorj/src/http.h +175 -0
  44. data/ext/libstorj/src/rs.c +962 -0
  45. data/ext/libstorj/src/rs.h +99 -0
  46. data/ext/libstorj/src/storj.c +1523 -0
  47. data/ext/libstorj/src/storj.h +1014 -0
  48. data/ext/libstorj/src/uploader.c +2736 -0
  49. data/ext/libstorj/src/uploader.h +181 -0
  50. data/ext/libstorj/src/utils.c +336 -0
  51. data/ext/libstorj/src/utils.h +65 -0
  52. data/ext/libstorj/test/Makefile.am +27 -0
  53. data/ext/libstorj/test/mockbridge.c +260 -0
  54. data/ext/libstorj/test/mockbridge.json +687 -0
  55. data/ext/libstorj/test/mockbridgeinfo.json +1836 -0
  56. data/ext/libstorj/test/mockfarmer.c +358 -0
  57. data/ext/libstorj/test/storjtests.h +41 -0
  58. data/ext/libstorj/test/tests.c +1617 -0
  59. data/ext/libstorj/test/tests_rs.c +869 -0
  60. data/ext/ruby-libstorj/extconf.rb +8 -0
  61. data/ext/ruby-libstorj/ruby-libstorj.cc +17 -0
  62. data/lib/ruby-libstorj.rb +1 -0
  63. data/lib/ruby-libstorj/arg_forwarding_task.rb +58 -0
  64. data/lib/ruby-libstorj/env.rb +178 -0
  65. data/lib/ruby-libstorj/ext/bucket.rb +71 -0
  66. data/lib/ruby-libstorj/ext/create_bucket_request.rb +53 -0
  67. data/lib/ruby-libstorj/ext/curl_code.rb +139 -0
  68. data/lib/ruby-libstorj/ext/ext.rb +71 -0
  69. data/lib/ruby-libstorj/ext/file.rb +84 -0
  70. data/lib/ruby-libstorj/ext/get_bucket_request.rb +45 -0
  71. data/lib/ruby-libstorj/ext/json_request.rb +51 -0
  72. data/lib/ruby-libstorj/ext/list_files_request.rb +63 -0
  73. data/lib/ruby-libstorj/ext/types.rb +226 -0
  74. data/lib/ruby-libstorj/ext/upload_options.rb +38 -0
  75. data/lib/ruby-libstorj/libstorj.rb +22 -0
  76. data/lib/ruby-libstorj/mixins/storj.rb +27 -0
  77. data/lib/ruby-libstorj/struct.rb +42 -0
  78. data/ruby-libstorj.gemspec +57 -0
  79. data/spec/helpers/options.yml.example +22 -0
  80. data/spec/helpers/shared_rake_examples.rb +132 -0
  81. data/spec/helpers/storj_options.rb +96 -0
  82. data/spec/helpers/upload.data +3 -0
  83. data/spec/helpers/upload.data.sha256 +1 -0
  84. data/spec/libstorj_spec.rb +0 -0
  85. data/spec/ruby-libstorj/arg_forwarding_task_spec.rb +311 -0
  86. data/spec/ruby-libstorj/env_spec.rb +353 -0
  87. data/spec/ruby-libstorj/ext_spec.rb +75 -0
  88. data/spec/ruby-libstorj/json_request_spec.rb +13 -0
  89. data/spec/ruby-libstorj/libstorj_spec.rb +81 -0
  90. data/spec/ruby-libstorj/struct_spec.rb +64 -0
  91. data/spec/spec_helper.rb +113 -0
  92. metadata +136 -0
@@ -0,0 +1,1823 @@
1
+ #! /bin/sh
2
+ # Configuration validation subroutine script.
3
+ # Copyright 1992-2017 Free Software Foundation, Inc.
4
+
5
+ timestamp='2017-01-01'
6
+
7
+ # This file is free software; you can redistribute it and/or modify it
8
+ # under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful, but
13
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
19
+ #
20
+ # As a special exception to the GNU General Public License, if you
21
+ # distribute this file as part of a program that contains a
22
+ # configuration script generated by Autoconf, you may include it under
23
+ # the same distribution terms that you use for the rest of that
24
+ # program. This Exception is an additional permission under section 7
25
+ # of the GNU General Public License, version 3 ("GPLv3").
26
+
27
+
28
+ # Please send patches to <config-patches@gnu.org>.
29
+ #
30
+ # Configuration subroutine to validate and canonicalize a configuration type.
31
+ # Supply the specified configuration type as an argument.
32
+ # If it is invalid, we print an error message on stderr and exit with code 1.
33
+ # Otherwise, we print the canonical config type on stdout and succeed.
34
+
35
+ # You can get the latest version of this script from:
36
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
37
+
38
+ # This file is supposed to be the same for all GNU packages
39
+ # and recognize all the CPU types, system types and aliases
40
+ # that are meaningful with *any* GNU software.
41
+ # Each package is responsible for reporting which valid configurations
42
+ # it does not support. The user should be able to distinguish
43
+ # a failure to support a valid configuration from a meaningless
44
+ # configuration.
45
+
46
+ # The goal of this file is to map all the various variations of a given
47
+ # machine specification into a single specification in the form:
48
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49
+ # or in some cases, the newer four-part form:
50
+ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51
+ # It is wrong to echo any other type of specification.
52
+
53
+ me=`echo "$0" | sed -e 's,.*/,,'`
54
+
55
+ usage="\
56
+ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
57
+ Canonicalize a configuration name.
58
+ Operation modes:
59
+ -h, --help print this help, then exit
60
+ -t, --time-stamp print date of last modification, then exit
61
+ -v, --version print version number, then exit
62
+ Report bugs and patches to <config-patches@gnu.org>."
63
+
64
+ version="\
65
+ GNU config.sub ($timestamp)
66
+ Copyright 1992-2017 Free Software Foundation, Inc.
67
+ This is free software; see the source for copying conditions. There is NO
68
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
69
+
70
+ help="
71
+ Try \`$me --help' for more information."
72
+
73
+ # Parse command line
74
+ while test $# -gt 0 ; do
75
+ case $1 in
76
+ --time-stamp | --time* | -t )
77
+ echo "$timestamp" ; exit ;;
78
+ --version | -v )
79
+ echo "$version" ; exit ;;
80
+ --help | --h* | -h )
81
+ echo "$usage"; exit ;;
82
+ -- ) # Stop option processing
83
+ shift; break ;;
84
+ - ) # Use stdin as input.
85
+ break ;;
86
+ -* )
87
+ echo "$me: invalid option $1$help"
88
+ exit 1 ;;
89
+
90
+ *local*)
91
+ # First pass through any local machine types.
92
+ echo $1
93
+ exit ;;
94
+
95
+ * )
96
+ break ;;
97
+ esac
98
+ done
99
+
100
+ case $# in
101
+ 0) echo "$me: missing argument$help" >&2
102
+ exit 1;;
103
+ 1) ;;
104
+ *) echo "$me: too many arguments$help" >&2
105
+ exit 1;;
106
+ esac
107
+
108
+ # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
109
+ # Here we must recognize all the valid KERNEL-OS combinations.
110
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
111
+ case $maybe_os in
112
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
113
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
114
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
115
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
116
+ storm-chaos* | os2-emx* | rtmk-nova*)
117
+ os=-$maybe_os
118
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
119
+ ;;
120
+ android-linux)
121
+ os=-linux-android
122
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
123
+ ;;
124
+ *)
125
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
126
+ if [ $basic_machine != $1 ]
127
+ then os=`echo $1 | sed 's/.*-/-/'`
128
+ else os=; fi
129
+ ;;
130
+ esac
131
+
132
+ ### Let's recognize common machines as not being operating systems so
133
+ ### that things like config.sub decstation-3100 work. We also
134
+ ### recognize some manufacturers as not being operating systems, so we
135
+ ### can provide default operating systems below.
136
+ case $os in
137
+ -sun*os*)
138
+ # Prevent following clause from handling this invalid input.
139
+ ;;
140
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
141
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
142
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
143
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
144
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
145
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
146
+ -apple | -axis | -knuth | -cray | -microblaze*)
147
+ os=
148
+ basic_machine=$1
149
+ ;;
150
+ -bluegene*)
151
+ os=-cnk
152
+ ;;
153
+ -sim | -cisco | -oki | -wec | -winbond)
154
+ os=
155
+ basic_machine=$1
156
+ ;;
157
+ -scout)
158
+ ;;
159
+ -wrs)
160
+ os=-vxworks
161
+ basic_machine=$1
162
+ ;;
163
+ -chorusos*)
164
+ os=-chorusos
165
+ basic_machine=$1
166
+ ;;
167
+ -chorusrdb)
168
+ os=-chorusrdb
169
+ basic_machine=$1
170
+ ;;
171
+ -hiux*)
172
+ os=-hiuxwe2
173
+ ;;
174
+ -sco6)
175
+ os=-sco5v6
176
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
177
+ ;;
178
+ -sco5)
179
+ os=-sco3.2v5
180
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
181
+ ;;
182
+ -sco4)
183
+ os=-sco3.2v4
184
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185
+ ;;
186
+ -sco3.2.[4-9]*)
187
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
188
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189
+ ;;
190
+ -sco3.2v[4-9]*)
191
+ # Don't forget version if it is 3.2v4 or newer.
192
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193
+ ;;
194
+ -sco5v6*)
195
+ # Don't forget version if it is 3.2v4 or newer.
196
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197
+ ;;
198
+ -sco*)
199
+ os=-sco3.2v2
200
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201
+ ;;
202
+ -udk*)
203
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204
+ ;;
205
+ -isc)
206
+ os=-isc2.2
207
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
208
+ ;;
209
+ -clix*)
210
+ basic_machine=clipper-intergraph
211
+ ;;
212
+ -isc*)
213
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214
+ ;;
215
+ -lynx*178)
216
+ os=-lynxos178
217
+ ;;
218
+ -lynx*5)
219
+ os=-lynxos5
220
+ ;;
221
+ -lynx*)
222
+ os=-lynxos
223
+ ;;
224
+ -ptx*)
225
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
226
+ ;;
227
+ -windowsnt*)
228
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
229
+ ;;
230
+ -psos*)
231
+ os=-psos
232
+ ;;
233
+ -mint | -mint[0-9]*)
234
+ basic_machine=m68k-atari
235
+ os=-mint
236
+ ;;
237
+ esac
238
+
239
+ # Decode aliases for certain CPU-COMPANY combinations.
240
+ case $basic_machine in
241
+ # Recognize the basic CPU types without company name.
242
+ # Some are omitted here because they have special meanings below.
243
+ 1750a | 580 \
244
+ | a29k \
245
+ | aarch64 | aarch64_be \
246
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
247
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
248
+ | am33_2.0 \
249
+ | arc | arceb \
250
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
251
+ | avr | avr32 \
252
+ | ba \
253
+ | be32 | be64 \
254
+ | bfin \
255
+ | c4x | c8051 | clipper \
256
+ | d10v | d30v | dlx | dsp16xx \
257
+ | e2k | epiphany \
258
+ | fido | fr30 | frv | ft32 \
259
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
260
+ | hexagon \
261
+ | i370 | i860 | i960 | ia64 \
262
+ | ip2k | iq2000 \
263
+ | k1om \
264
+ | le32 | le64 \
265
+ | lm32 \
266
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
267
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
268
+ | mips | mipsbe | mipseb | mipsel | mipsle \
269
+ | mips16 \
270
+ | mips64 | mips64el \
271
+ | mips64octeon | mips64octeonel \
272
+ | mips64orion | mips64orionel \
273
+ | mips64r5900 | mips64r5900el \
274
+ | mips64vr | mips64vrel \
275
+ | mips64vr4100 | mips64vr4100el \
276
+ | mips64vr4300 | mips64vr4300el \
277
+ | mips64vr5000 | mips64vr5000el \
278
+ | mips64vr5900 | mips64vr5900el \
279
+ | mipsisa32 | mipsisa32el \
280
+ | mipsisa32r2 | mipsisa32r2el \
281
+ | mipsisa32r6 | mipsisa32r6el \
282
+ | mipsisa64 | mipsisa64el \
283
+ | mipsisa64r2 | mipsisa64r2el \
284
+ | mipsisa64r6 | mipsisa64r6el \
285
+ | mipsisa64sb1 | mipsisa64sb1el \
286
+ | mipsisa64sr71k | mipsisa64sr71kel \
287
+ | mipsr5900 | mipsr5900el \
288
+ | mipstx39 | mipstx39el \
289
+ | mn10200 | mn10300 \
290
+ | moxie \
291
+ | mt \
292
+ | msp430 \
293
+ | nds32 | nds32le | nds32be \
294
+ | nios | nios2 | nios2eb | nios2el \
295
+ | ns16k | ns32k \
296
+ | open8 | or1k | or1knd | or32 \
297
+ | pdp10 | pdp11 | pj | pjl \
298
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
299
+ | pru \
300
+ | pyramid \
301
+ | riscv32 | riscv64 \
302
+ | rl78 | rx \
303
+ | score \
304
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
305
+ | sh64 | sh64le \
306
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
307
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
308
+ | spu \
309
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
310
+ | ubicom32 \
311
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
312
+ | visium \
313
+ | we32k \
314
+ | x86 | xc16x | xstormy16 | xtensa \
315
+ | z8k | z80)
316
+ basic_machine=$basic_machine-unknown
317
+ ;;
318
+ c54x)
319
+ basic_machine=tic54x-unknown
320
+ ;;
321
+ c55x)
322
+ basic_machine=tic55x-unknown
323
+ ;;
324
+ c6x)
325
+ basic_machine=tic6x-unknown
326
+ ;;
327
+ leon|leon[3-9])
328
+ basic_machine=sparc-$basic_machine
329
+ ;;
330
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
331
+ basic_machine=$basic_machine-unknown
332
+ os=-none
333
+ ;;
334
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
335
+ ;;
336
+ ms1)
337
+ basic_machine=mt-unknown
338
+ ;;
339
+
340
+ strongarm | thumb | xscale)
341
+ basic_machine=arm-unknown
342
+ ;;
343
+ xgate)
344
+ basic_machine=$basic_machine-unknown
345
+ os=-none
346
+ ;;
347
+ xscaleeb)
348
+ basic_machine=armeb-unknown
349
+ ;;
350
+
351
+ xscaleel)
352
+ basic_machine=armel-unknown
353
+ ;;
354
+
355
+ # We use `pc' rather than `unknown'
356
+ # because (1) that's what they normally are, and
357
+ # (2) the word "unknown" tends to confuse beginning users.
358
+ i*86 | x86_64)
359
+ basic_machine=$basic_machine-pc
360
+ ;;
361
+ # Object if more than one company name word.
362
+ *-*-*)
363
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
364
+ exit 1
365
+ ;;
366
+ # Recognize the basic CPU types with company name.
367
+ 580-* \
368
+ | a29k-* \
369
+ | aarch64-* | aarch64_be-* \
370
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
371
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
372
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
373
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
374
+ | avr-* | avr32-* \
375
+ | ba-* \
376
+ | be32-* | be64-* \
377
+ | bfin-* | bs2000-* \
378
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
379
+ | c8051-* | clipper-* | craynv-* | cydra-* \
380
+ | d10v-* | d30v-* | dlx-* \
381
+ | e2k-* | elxsi-* \
382
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
383
+ | h8300-* | h8500-* \
384
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
385
+ | hexagon-* \
386
+ | i*86-* | i860-* | i960-* | ia64-* \
387
+ | ip2k-* | iq2000-* \
388
+ | k1om-* \
389
+ | le32-* | le64-* \
390
+ | lm32-* \
391
+ | m32c-* | m32r-* | m32rle-* \
392
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
393
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
394
+ | microblaze-* | microblazeel-* \
395
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
396
+ | mips16-* \
397
+ | mips64-* | mips64el-* \
398
+ | mips64octeon-* | mips64octeonel-* \
399
+ | mips64orion-* | mips64orionel-* \
400
+ | mips64r5900-* | mips64r5900el-* \
401
+ | mips64vr-* | mips64vrel-* \
402
+ | mips64vr4100-* | mips64vr4100el-* \
403
+ | mips64vr4300-* | mips64vr4300el-* \
404
+ | mips64vr5000-* | mips64vr5000el-* \
405
+ | mips64vr5900-* | mips64vr5900el-* \
406
+ | mipsisa32-* | mipsisa32el-* \
407
+ | mipsisa32r2-* | mipsisa32r2el-* \
408
+ | mipsisa32r6-* | mipsisa32r6el-* \
409
+ | mipsisa64-* | mipsisa64el-* \
410
+ | mipsisa64r2-* | mipsisa64r2el-* \
411
+ | mipsisa64r6-* | mipsisa64r6el-* \
412
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
413
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
414
+ | mipsr5900-* | mipsr5900el-* \
415
+ | mipstx39-* | mipstx39el-* \
416
+ | mmix-* \
417
+ | mt-* \
418
+ | msp430-* \
419
+ | nds32-* | nds32le-* | nds32be-* \
420
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
421
+ | none-* | np1-* | ns16k-* | ns32k-* \
422
+ | open8-* \
423
+ | or1k*-* \
424
+ | orion-* \
425
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
426
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
427
+ | pru-* \
428
+ | pyramid-* \
429
+ | riscv32-* | riscv64-* \
430
+ | rl78-* | romp-* | rs6000-* | rx-* \
431
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
432
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
433
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
434
+ | sparclite-* \
435
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
436
+ | tahoe-* \
437
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
438
+ | tile*-* \
439
+ | tron-* \
440
+ | ubicom32-* \
441
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
442
+ | vax-* \
443
+ | visium-* \
444
+ | we32k-* \
445
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
446
+ | xstormy16-* | xtensa*-* \
447
+ | ymp-* \
448
+ | z8k-* | z80-*)
449
+ ;;
450
+ # Recognize the basic CPU types without company name, with glob match.
451
+ xtensa*)
452
+ basic_machine=$basic_machine-unknown
453
+ ;;
454
+ # Recognize the various machine names and aliases which stand
455
+ # for a CPU type and a company and sometimes even an OS.
456
+ 386bsd)
457
+ basic_machine=i386-unknown
458
+ os=-bsd
459
+ ;;
460
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
461
+ basic_machine=m68000-att
462
+ ;;
463
+ 3b*)
464
+ basic_machine=we32k-att
465
+ ;;
466
+ a29khif)
467
+ basic_machine=a29k-amd
468
+ os=-udi
469
+ ;;
470
+ abacus)
471
+ basic_machine=abacus-unknown
472
+ ;;
473
+ adobe68k)
474
+ basic_machine=m68010-adobe
475
+ os=-scout
476
+ ;;
477
+ alliant | fx80)
478
+ basic_machine=fx80-alliant
479
+ ;;
480
+ altos | altos3068)
481
+ basic_machine=m68k-altos
482
+ ;;
483
+ am29k)
484
+ basic_machine=a29k-none
485
+ os=-bsd
486
+ ;;
487
+ amd64)
488
+ basic_machine=x86_64-pc
489
+ ;;
490
+ amd64-*)
491
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
492
+ ;;
493
+ amdahl)
494
+ basic_machine=580-amdahl
495
+ os=-sysv
496
+ ;;
497
+ amiga | amiga-*)
498
+ basic_machine=m68k-unknown
499
+ ;;
500
+ amigaos | amigados)
501
+ basic_machine=m68k-unknown
502
+ os=-amigaos
503
+ ;;
504
+ amigaunix | amix)
505
+ basic_machine=m68k-unknown
506
+ os=-sysv4
507
+ ;;
508
+ apollo68)
509
+ basic_machine=m68k-apollo
510
+ os=-sysv
511
+ ;;
512
+ apollo68bsd)
513
+ basic_machine=m68k-apollo
514
+ os=-bsd
515
+ ;;
516
+ aros)
517
+ basic_machine=i386-pc
518
+ os=-aros
519
+ ;;
520
+ asmjs)
521
+ basic_machine=asmjs-unknown
522
+ ;;
523
+ aux)
524
+ basic_machine=m68k-apple
525
+ os=-aux
526
+ ;;
527
+ balance)
528
+ basic_machine=ns32k-sequent
529
+ os=-dynix
530
+ ;;
531
+ blackfin)
532
+ basic_machine=bfin-unknown
533
+ os=-linux
534
+ ;;
535
+ blackfin-*)
536
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
537
+ os=-linux
538
+ ;;
539
+ bluegene*)
540
+ basic_machine=powerpc-ibm
541
+ os=-cnk
542
+ ;;
543
+ c54x-*)
544
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
545
+ ;;
546
+ c55x-*)
547
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
548
+ ;;
549
+ c6x-*)
550
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
551
+ ;;
552
+ c90)
553
+ basic_machine=c90-cray
554
+ os=-unicos
555
+ ;;
556
+ cegcc)
557
+ basic_machine=arm-unknown
558
+ os=-cegcc
559
+ ;;
560
+ convex-c1)
561
+ basic_machine=c1-convex
562
+ os=-bsd
563
+ ;;
564
+ convex-c2)
565
+ basic_machine=c2-convex
566
+ os=-bsd
567
+ ;;
568
+ convex-c32)
569
+ basic_machine=c32-convex
570
+ os=-bsd
571
+ ;;
572
+ convex-c34)
573
+ basic_machine=c34-convex
574
+ os=-bsd
575
+ ;;
576
+ convex-c38)
577
+ basic_machine=c38-convex
578
+ os=-bsd
579
+ ;;
580
+ cray | j90)
581
+ basic_machine=j90-cray
582
+ os=-unicos
583
+ ;;
584
+ craynv)
585
+ basic_machine=craynv-cray
586
+ os=-unicosmp
587
+ ;;
588
+ cr16 | cr16-*)
589
+ basic_machine=cr16-unknown
590
+ os=-elf
591
+ ;;
592
+ crds | unos)
593
+ basic_machine=m68k-crds
594
+ ;;
595
+ crisv32 | crisv32-* | etraxfs*)
596
+ basic_machine=crisv32-axis
597
+ ;;
598
+ cris | cris-* | etrax*)
599
+ basic_machine=cris-axis
600
+ ;;
601
+ crx)
602
+ basic_machine=crx-unknown
603
+ os=-elf
604
+ ;;
605
+ da30 | da30-*)
606
+ basic_machine=m68k-da30
607
+ ;;
608
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
609
+ basic_machine=mips-dec
610
+ ;;
611
+ decsystem10* | dec10*)
612
+ basic_machine=pdp10-dec
613
+ os=-tops10
614
+ ;;
615
+ decsystem20* | dec20*)
616
+ basic_machine=pdp10-dec
617
+ os=-tops20
618
+ ;;
619
+ delta | 3300 | motorola-3300 | motorola-delta \
620
+ | 3300-motorola | delta-motorola)
621
+ basic_machine=m68k-motorola
622
+ ;;
623
+ delta88)
624
+ basic_machine=m88k-motorola
625
+ os=-sysv3
626
+ ;;
627
+ dicos)
628
+ basic_machine=i686-pc
629
+ os=-dicos
630
+ ;;
631
+ djgpp)
632
+ basic_machine=i586-pc
633
+ os=-msdosdjgpp
634
+ ;;
635
+ dpx20 | dpx20-*)
636
+ basic_machine=rs6000-bull
637
+ os=-bosx
638
+ ;;
639
+ dpx2* | dpx2*-bull)
640
+ basic_machine=m68k-bull
641
+ os=-sysv3
642
+ ;;
643
+ e500v[12])
644
+ basic_machine=powerpc-unknown
645
+ os=$os"spe"
646
+ ;;
647
+ e500v[12]-*)
648
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
649
+ os=$os"spe"
650
+ ;;
651
+ ebmon29k)
652
+ basic_machine=a29k-amd
653
+ os=-ebmon
654
+ ;;
655
+ elxsi)
656
+ basic_machine=elxsi-elxsi
657
+ os=-bsd
658
+ ;;
659
+ encore | umax | mmax)
660
+ basic_machine=ns32k-encore
661
+ ;;
662
+ es1800 | OSE68k | ose68k | ose | OSE)
663
+ basic_machine=m68k-ericsson
664
+ os=-ose
665
+ ;;
666
+ fx2800)
667
+ basic_machine=i860-alliant
668
+ ;;
669
+ genix)
670
+ basic_machine=ns32k-ns
671
+ ;;
672
+ gmicro)
673
+ basic_machine=tron-gmicro
674
+ os=-sysv
675
+ ;;
676
+ go32)
677
+ basic_machine=i386-pc
678
+ os=-go32
679
+ ;;
680
+ h3050r* | hiux*)
681
+ basic_machine=hppa1.1-hitachi
682
+ os=-hiuxwe2
683
+ ;;
684
+ h8300hms)
685
+ basic_machine=h8300-hitachi
686
+ os=-hms
687
+ ;;
688
+ h8300xray)
689
+ basic_machine=h8300-hitachi
690
+ os=-xray
691
+ ;;
692
+ h8500hms)
693
+ basic_machine=h8500-hitachi
694
+ os=-hms
695
+ ;;
696
+ harris)
697
+ basic_machine=m88k-harris
698
+ os=-sysv3
699
+ ;;
700
+ hp300-*)
701
+ basic_machine=m68k-hp
702
+ ;;
703
+ hp300bsd)
704
+ basic_machine=m68k-hp
705
+ os=-bsd
706
+ ;;
707
+ hp300hpux)
708
+ basic_machine=m68k-hp
709
+ os=-hpux
710
+ ;;
711
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
712
+ basic_machine=hppa1.0-hp
713
+ ;;
714
+ hp9k2[0-9][0-9] | hp9k31[0-9])
715
+ basic_machine=m68000-hp
716
+ ;;
717
+ hp9k3[2-9][0-9])
718
+ basic_machine=m68k-hp
719
+ ;;
720
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
721
+ basic_machine=hppa1.0-hp
722
+ ;;
723
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
724
+ basic_machine=hppa1.1-hp
725
+ ;;
726
+ hp9k78[0-9] | hp78[0-9])
727
+ # FIXME: really hppa2.0-hp
728
+ basic_machine=hppa1.1-hp
729
+ ;;
730
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
731
+ # FIXME: really hppa2.0-hp
732
+ basic_machine=hppa1.1-hp
733
+ ;;
734
+ hp9k8[0-9][13679] | hp8[0-9][13679])
735
+ basic_machine=hppa1.1-hp
736
+ ;;
737
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
738
+ basic_machine=hppa1.0-hp
739
+ ;;
740
+ hppa-next)
741
+ os=-nextstep3
742
+ ;;
743
+ hppaosf)
744
+ basic_machine=hppa1.1-hp
745
+ os=-osf
746
+ ;;
747
+ hppro)
748
+ basic_machine=hppa1.1-hp
749
+ os=-proelf
750
+ ;;
751
+ i370-ibm* | ibm*)
752
+ basic_machine=i370-ibm
753
+ ;;
754
+ i*86v32)
755
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
756
+ os=-sysv32
757
+ ;;
758
+ i*86v4*)
759
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
760
+ os=-sysv4
761
+ ;;
762
+ i*86v)
763
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
764
+ os=-sysv
765
+ ;;
766
+ i*86sol2)
767
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
768
+ os=-solaris2
769
+ ;;
770
+ i386mach)
771
+ basic_machine=i386-mach
772
+ os=-mach
773
+ ;;
774
+ i386-vsta | vsta)
775
+ basic_machine=i386-unknown
776
+ os=-vsta
777
+ ;;
778
+ iris | iris4d)
779
+ basic_machine=mips-sgi
780
+ case $os in
781
+ -irix*)
782
+ ;;
783
+ *)
784
+ os=-irix4
785
+ ;;
786
+ esac
787
+ ;;
788
+ isi68 | isi)
789
+ basic_machine=m68k-isi
790
+ os=-sysv
791
+ ;;
792
+ leon-*|leon[3-9]-*)
793
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
794
+ ;;
795
+ m68knommu)
796
+ basic_machine=m68k-unknown
797
+ os=-linux
798
+ ;;
799
+ m68knommu-*)
800
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
801
+ os=-linux
802
+ ;;
803
+ m88k-omron*)
804
+ basic_machine=m88k-omron
805
+ ;;
806
+ magnum | m3230)
807
+ basic_machine=mips-mips
808
+ os=-sysv
809
+ ;;
810
+ merlin)
811
+ basic_machine=ns32k-utek
812
+ os=-sysv
813
+ ;;
814
+ microblaze*)
815
+ basic_machine=microblaze-xilinx
816
+ ;;
817
+ mingw64)
818
+ basic_machine=x86_64-pc
819
+ os=-mingw64
820
+ ;;
821
+ mingw32)
822
+ basic_machine=i686-pc
823
+ os=-mingw32
824
+ ;;
825
+ mingw32ce)
826
+ basic_machine=arm-unknown
827
+ os=-mingw32ce
828
+ ;;
829
+ miniframe)
830
+ basic_machine=m68000-convergent
831
+ ;;
832
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
833
+ basic_machine=m68k-atari
834
+ os=-mint
835
+ ;;
836
+ mips3*-*)
837
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
838
+ ;;
839
+ mips3*)
840
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
841
+ ;;
842
+ monitor)
843
+ basic_machine=m68k-rom68k
844
+ os=-coff
845
+ ;;
846
+ morphos)
847
+ basic_machine=powerpc-unknown
848
+ os=-morphos
849
+ ;;
850
+ moxiebox)
851
+ basic_machine=moxie-unknown
852
+ os=-moxiebox
853
+ ;;
854
+ msdos)
855
+ basic_machine=i386-pc
856
+ os=-msdos
857
+ ;;
858
+ ms1-*)
859
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
860
+ ;;
861
+ msys)
862
+ basic_machine=i686-pc
863
+ os=-msys
864
+ ;;
865
+ mvs)
866
+ basic_machine=i370-ibm
867
+ os=-mvs
868
+ ;;
869
+ nacl)
870
+ basic_machine=le32-unknown
871
+ os=-nacl
872
+ ;;
873
+ ncr3000)
874
+ basic_machine=i486-ncr
875
+ os=-sysv4
876
+ ;;
877
+ netbsd386)
878
+ basic_machine=i386-unknown
879
+ os=-netbsd
880
+ ;;
881
+ netwinder)
882
+ basic_machine=armv4l-rebel
883
+ os=-linux
884
+ ;;
885
+ news | news700 | news800 | news900)
886
+ basic_machine=m68k-sony
887
+ os=-newsos
888
+ ;;
889
+ news1000)
890
+ basic_machine=m68030-sony
891
+ os=-newsos
892
+ ;;
893
+ news-3600 | risc-news)
894
+ basic_machine=mips-sony
895
+ os=-newsos
896
+ ;;
897
+ necv70)
898
+ basic_machine=v70-nec
899
+ os=-sysv
900
+ ;;
901
+ next | m*-next )
902
+ basic_machine=m68k-next
903
+ case $os in
904
+ -nextstep* )
905
+ ;;
906
+ -ns2*)
907
+ os=-nextstep2
908
+ ;;
909
+ *)
910
+ os=-nextstep3
911
+ ;;
912
+ esac
913
+ ;;
914
+ nh3000)
915
+ basic_machine=m68k-harris
916
+ os=-cxux
917
+ ;;
918
+ nh[45]000)
919
+ basic_machine=m88k-harris
920
+ os=-cxux
921
+ ;;
922
+ nindy960)
923
+ basic_machine=i960-intel
924
+ os=-nindy
925
+ ;;
926
+ mon960)
927
+ basic_machine=i960-intel
928
+ os=-mon960
929
+ ;;
930
+ nonstopux)
931
+ basic_machine=mips-compaq
932
+ os=-nonstopux
933
+ ;;
934
+ np1)
935
+ basic_machine=np1-gould
936
+ ;;
937
+ neo-tandem)
938
+ basic_machine=neo-tandem
939
+ ;;
940
+ nse-tandem)
941
+ basic_machine=nse-tandem
942
+ ;;
943
+ nsr-tandem)
944
+ basic_machine=nsr-tandem
945
+ ;;
946
+ op50n-* | op60c-*)
947
+ basic_machine=hppa1.1-oki
948
+ os=-proelf
949
+ ;;
950
+ openrisc | openrisc-*)
951
+ basic_machine=or32-unknown
952
+ ;;
953
+ os400)
954
+ basic_machine=powerpc-ibm
955
+ os=-os400
956
+ ;;
957
+ OSE68000 | ose68000)
958
+ basic_machine=m68000-ericsson
959
+ os=-ose
960
+ ;;
961
+ os68k)
962
+ basic_machine=m68k-none
963
+ os=-os68k
964
+ ;;
965
+ pa-hitachi)
966
+ basic_machine=hppa1.1-hitachi
967
+ os=-hiuxwe2
968
+ ;;
969
+ paragon)
970
+ basic_machine=i860-intel
971
+ os=-osf
972
+ ;;
973
+ parisc)
974
+ basic_machine=hppa-unknown
975
+ os=-linux
976
+ ;;
977
+ parisc-*)
978
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
979
+ os=-linux
980
+ ;;
981
+ pbd)
982
+ basic_machine=sparc-tti
983
+ ;;
984
+ pbb)
985
+ basic_machine=m68k-tti
986
+ ;;
987
+ pc532 | pc532-*)
988
+ basic_machine=ns32k-pc532
989
+ ;;
990
+ pc98)
991
+ basic_machine=i386-pc
992
+ ;;
993
+ pc98-*)
994
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
995
+ ;;
996
+ pentium | p5 | k5 | k6 | nexgen | viac3)
997
+ basic_machine=i586-pc
998
+ ;;
999
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
1000
+ basic_machine=i686-pc
1001
+ ;;
1002
+ pentiumii | pentium2 | pentiumiii | pentium3)
1003
+ basic_machine=i686-pc
1004
+ ;;
1005
+ pentium4)
1006
+ basic_machine=i786-pc
1007
+ ;;
1008
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1009
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1010
+ ;;
1011
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
1012
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1013
+ ;;
1014
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1015
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1016
+ ;;
1017
+ pentium4-*)
1018
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1019
+ ;;
1020
+ pn)
1021
+ basic_machine=pn-gould
1022
+ ;;
1023
+ power) basic_machine=power-ibm
1024
+ ;;
1025
+ ppc | ppcbe) basic_machine=powerpc-unknown
1026
+ ;;
1027
+ ppc-* | ppcbe-*)
1028
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1029
+ ;;
1030
+ ppcle | powerpclittle)
1031
+ basic_machine=powerpcle-unknown
1032
+ ;;
1033
+ ppcle-* | powerpclittle-*)
1034
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1035
+ ;;
1036
+ ppc64) basic_machine=powerpc64-unknown
1037
+ ;;
1038
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1039
+ ;;
1040
+ ppc64le | powerpc64little)
1041
+ basic_machine=powerpc64le-unknown
1042
+ ;;
1043
+ ppc64le-* | powerpc64little-*)
1044
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1045
+ ;;
1046
+ ps2)
1047
+ basic_machine=i386-ibm
1048
+ ;;
1049
+ pw32)
1050
+ basic_machine=i586-unknown
1051
+ os=-pw32
1052
+ ;;
1053
+ rdos | rdos64)
1054
+ basic_machine=x86_64-pc
1055
+ os=-rdos
1056
+ ;;
1057
+ rdos32)
1058
+ basic_machine=i386-pc
1059
+ os=-rdos
1060
+ ;;
1061
+ rom68k)
1062
+ basic_machine=m68k-rom68k
1063
+ os=-coff
1064
+ ;;
1065
+ rm[46]00)
1066
+ basic_machine=mips-siemens
1067
+ ;;
1068
+ rtpc | rtpc-*)
1069
+ basic_machine=romp-ibm
1070
+ ;;
1071
+ s390 | s390-*)
1072
+ basic_machine=s390-ibm
1073
+ ;;
1074
+ s390x | s390x-*)
1075
+ basic_machine=s390x-ibm
1076
+ ;;
1077
+ sa29200)
1078
+ basic_machine=a29k-amd
1079
+ os=-udi
1080
+ ;;
1081
+ sb1)
1082
+ basic_machine=mipsisa64sb1-unknown
1083
+ ;;
1084
+ sb1el)
1085
+ basic_machine=mipsisa64sb1el-unknown
1086
+ ;;
1087
+ sde)
1088
+ basic_machine=mipsisa32-sde
1089
+ os=-elf
1090
+ ;;
1091
+ sei)
1092
+ basic_machine=mips-sei
1093
+ os=-seiux
1094
+ ;;
1095
+ sequent)
1096
+ basic_machine=i386-sequent
1097
+ ;;
1098
+ sh)
1099
+ basic_machine=sh-hitachi
1100
+ os=-hms
1101
+ ;;
1102
+ sh5el)
1103
+ basic_machine=sh5le-unknown
1104
+ ;;
1105
+ sh64)
1106
+ basic_machine=sh64-unknown
1107
+ ;;
1108
+ sparclite-wrs | simso-wrs)
1109
+ basic_machine=sparclite-wrs
1110
+ os=-vxworks
1111
+ ;;
1112
+ sps7)
1113
+ basic_machine=m68k-bull
1114
+ os=-sysv2
1115
+ ;;
1116
+ spur)
1117
+ basic_machine=spur-unknown
1118
+ ;;
1119
+ st2000)
1120
+ basic_machine=m68k-tandem
1121
+ ;;
1122
+ stratus)
1123
+ basic_machine=i860-stratus
1124
+ os=-sysv4
1125
+ ;;
1126
+ strongarm-* | thumb-*)
1127
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1128
+ ;;
1129
+ sun2)
1130
+ basic_machine=m68000-sun
1131
+ ;;
1132
+ sun2os3)
1133
+ basic_machine=m68000-sun
1134
+ os=-sunos3
1135
+ ;;
1136
+ sun2os4)
1137
+ basic_machine=m68000-sun
1138
+ os=-sunos4
1139
+ ;;
1140
+ sun3os3)
1141
+ basic_machine=m68k-sun
1142
+ os=-sunos3
1143
+ ;;
1144
+ sun3os4)
1145
+ basic_machine=m68k-sun
1146
+ os=-sunos4
1147
+ ;;
1148
+ sun4os3)
1149
+ basic_machine=sparc-sun
1150
+ os=-sunos3
1151
+ ;;
1152
+ sun4os4)
1153
+ basic_machine=sparc-sun
1154
+ os=-sunos4
1155
+ ;;
1156
+ sun4sol2)
1157
+ basic_machine=sparc-sun
1158
+ os=-solaris2
1159
+ ;;
1160
+ sun3 | sun3-*)
1161
+ basic_machine=m68k-sun
1162
+ ;;
1163
+ sun4)
1164
+ basic_machine=sparc-sun
1165
+ ;;
1166
+ sun386 | sun386i | roadrunner)
1167
+ basic_machine=i386-sun
1168
+ ;;
1169
+ sv1)
1170
+ basic_machine=sv1-cray
1171
+ os=-unicos
1172
+ ;;
1173
+ symmetry)
1174
+ basic_machine=i386-sequent
1175
+ os=-dynix
1176
+ ;;
1177
+ t3e)
1178
+ basic_machine=alphaev5-cray
1179
+ os=-unicos
1180
+ ;;
1181
+ t90)
1182
+ basic_machine=t90-cray
1183
+ os=-unicos
1184
+ ;;
1185
+ tile*)
1186
+ basic_machine=$basic_machine-unknown
1187
+ os=-linux-gnu
1188
+ ;;
1189
+ tx39)
1190
+ basic_machine=mipstx39-unknown
1191
+ ;;
1192
+ tx39el)
1193
+ basic_machine=mipstx39el-unknown
1194
+ ;;
1195
+ toad1)
1196
+ basic_machine=pdp10-xkl
1197
+ os=-tops20
1198
+ ;;
1199
+ tower | tower-32)
1200
+ basic_machine=m68k-ncr
1201
+ ;;
1202
+ tpf)
1203
+ basic_machine=s390x-ibm
1204
+ os=-tpf
1205
+ ;;
1206
+ udi29k)
1207
+ basic_machine=a29k-amd
1208
+ os=-udi
1209
+ ;;
1210
+ ultra3)
1211
+ basic_machine=a29k-nyu
1212
+ os=-sym1
1213
+ ;;
1214
+ v810 | necv810)
1215
+ basic_machine=v810-nec
1216
+ os=-none
1217
+ ;;
1218
+ vaxv)
1219
+ basic_machine=vax-dec
1220
+ os=-sysv
1221
+ ;;
1222
+ vms)
1223
+ basic_machine=vax-dec
1224
+ os=-vms
1225
+ ;;
1226
+ vpp*|vx|vx-*)
1227
+ basic_machine=f301-fujitsu
1228
+ ;;
1229
+ vxworks960)
1230
+ basic_machine=i960-wrs
1231
+ os=-vxworks
1232
+ ;;
1233
+ vxworks68)
1234
+ basic_machine=m68k-wrs
1235
+ os=-vxworks
1236
+ ;;
1237
+ vxworks29k)
1238
+ basic_machine=a29k-wrs
1239
+ os=-vxworks
1240
+ ;;
1241
+ w65*)
1242
+ basic_machine=w65-wdc
1243
+ os=-none
1244
+ ;;
1245
+ w89k-*)
1246
+ basic_machine=hppa1.1-winbond
1247
+ os=-proelf
1248
+ ;;
1249
+ xbox)
1250
+ basic_machine=i686-pc
1251
+ os=-mingw32
1252
+ ;;
1253
+ xps | xps100)
1254
+ basic_machine=xps100-honeywell
1255
+ ;;
1256
+ xscale-* | xscalee[bl]-*)
1257
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1258
+ ;;
1259
+ ymp)
1260
+ basic_machine=ymp-cray
1261
+ os=-unicos
1262
+ ;;
1263
+ z8k-*-coff)
1264
+ basic_machine=z8k-unknown
1265
+ os=-sim
1266
+ ;;
1267
+ z80-*-coff)
1268
+ basic_machine=z80-unknown
1269
+ os=-sim
1270
+ ;;
1271
+ none)
1272
+ basic_machine=none-none
1273
+ os=-none
1274
+ ;;
1275
+
1276
+ # Here we handle the default manufacturer of certain CPU types. It is in
1277
+ # some cases the only manufacturer, in others, it is the most popular.
1278
+ w89k)
1279
+ basic_machine=hppa1.1-winbond
1280
+ ;;
1281
+ op50n)
1282
+ basic_machine=hppa1.1-oki
1283
+ ;;
1284
+ op60c)
1285
+ basic_machine=hppa1.1-oki
1286
+ ;;
1287
+ romp)
1288
+ basic_machine=romp-ibm
1289
+ ;;
1290
+ mmix)
1291
+ basic_machine=mmix-knuth
1292
+ ;;
1293
+ rs6000)
1294
+ basic_machine=rs6000-ibm
1295
+ ;;
1296
+ vax)
1297
+ basic_machine=vax-dec
1298
+ ;;
1299
+ pdp10)
1300
+ # there are many clones, so DEC is not a safe bet
1301
+ basic_machine=pdp10-unknown
1302
+ ;;
1303
+ pdp11)
1304
+ basic_machine=pdp11-dec
1305
+ ;;
1306
+ we32k)
1307
+ basic_machine=we32k-att
1308
+ ;;
1309
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1310
+ basic_machine=sh-unknown
1311
+ ;;
1312
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1313
+ basic_machine=sparc-sun
1314
+ ;;
1315
+ cydra)
1316
+ basic_machine=cydra-cydrome
1317
+ ;;
1318
+ orion)
1319
+ basic_machine=orion-highlevel
1320
+ ;;
1321
+ orion105)
1322
+ basic_machine=clipper-highlevel
1323
+ ;;
1324
+ mac | mpw | mac-mpw)
1325
+ basic_machine=m68k-apple
1326
+ ;;
1327
+ pmac | pmac-mpw)
1328
+ basic_machine=powerpc-apple
1329
+ ;;
1330
+ *-unknown)
1331
+ # Make sure to match an already-canonicalized machine name.
1332
+ ;;
1333
+ *)
1334
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1335
+ exit 1
1336
+ ;;
1337
+ esac
1338
+
1339
+ # Here we canonicalize certain aliases for manufacturers.
1340
+ case $basic_machine in
1341
+ *-digital*)
1342
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1343
+ ;;
1344
+ *-commodore*)
1345
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1346
+ ;;
1347
+ *)
1348
+ ;;
1349
+ esac
1350
+
1351
+ # Decode manufacturer-specific aliases for certain operating systems.
1352
+
1353
+ if [ x"$os" != x"" ]
1354
+ then
1355
+ case $os in
1356
+ # First match some system type aliases
1357
+ # that might get confused with valid system types.
1358
+ # -solaris* is a basic system type, with this one exception.
1359
+ -auroraux)
1360
+ os=-auroraux
1361
+ ;;
1362
+ -solaris1 | -solaris1.*)
1363
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
1364
+ ;;
1365
+ -solaris)
1366
+ os=-solaris2
1367
+ ;;
1368
+ -svr4*)
1369
+ os=-sysv4
1370
+ ;;
1371
+ -unixware*)
1372
+ os=-sysv4.2uw
1373
+ ;;
1374
+ -gnu/linux*)
1375
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1376
+ ;;
1377
+ # First accept the basic system types.
1378
+ # The portable systems comes first.
1379
+ # Each alternative MUST END IN A *, to match a version number.
1380
+ # -sysv* is not here because it comes later, after sysvr4.
1381
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1382
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1383
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1384
+ | -sym* | -kopensolaris* | -plan9* \
1385
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1386
+ | -aos* | -aros* | -cloudabi* | -sortix* \
1387
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1388
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1389
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1390
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1391
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1392
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1393
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1394
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1395
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
1396
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1397
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1398
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1399
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1400
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1401
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1402
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1403
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1404
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1405
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1406
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1407
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
1408
+ # Remember, each alternative MUST END IN *, to match a version number.
1409
+ ;;
1410
+ -qnx*)
1411
+ case $basic_machine in
1412
+ x86-* | i*86-*)
1413
+ ;;
1414
+ *)
1415
+ os=-nto$os
1416
+ ;;
1417
+ esac
1418
+ ;;
1419
+ -nto-qnx*)
1420
+ ;;
1421
+ -nto*)
1422
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
1423
+ ;;
1424
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1425
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1426
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1427
+ ;;
1428
+ -mac*)
1429
+ os=`echo $os | sed -e 's|mac|macos|'`
1430
+ ;;
1431
+ -linux-dietlibc)
1432
+ os=-linux-dietlibc
1433
+ ;;
1434
+ -linux*)
1435
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
1436
+ ;;
1437
+ -sunos5*)
1438
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
1439
+ ;;
1440
+ -sunos6*)
1441
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
1442
+ ;;
1443
+ -opened*)
1444
+ os=-openedition
1445
+ ;;
1446
+ -os400*)
1447
+ os=-os400
1448
+ ;;
1449
+ -wince*)
1450
+ os=-wince
1451
+ ;;
1452
+ -osfrose*)
1453
+ os=-osfrose
1454
+ ;;
1455
+ -osf*)
1456
+ os=-osf
1457
+ ;;
1458
+ -utek*)
1459
+ os=-bsd
1460
+ ;;
1461
+ -dynix*)
1462
+ os=-bsd
1463
+ ;;
1464
+ -acis*)
1465
+ os=-aos
1466
+ ;;
1467
+ -atheos*)
1468
+ os=-atheos
1469
+ ;;
1470
+ -syllable*)
1471
+ os=-syllable
1472
+ ;;
1473
+ -386bsd)
1474
+ os=-bsd
1475
+ ;;
1476
+ -ctix* | -uts*)
1477
+ os=-sysv
1478
+ ;;
1479
+ -nova*)
1480
+ os=-rtmk-nova
1481
+ ;;
1482
+ -ns2 )
1483
+ os=-nextstep2
1484
+ ;;
1485
+ -nsk*)
1486
+ os=-nsk
1487
+ ;;
1488
+ # Preserve the version number of sinix5.
1489
+ -sinix5.*)
1490
+ os=`echo $os | sed -e 's|sinix|sysv|'`
1491
+ ;;
1492
+ -sinix*)
1493
+ os=-sysv4
1494
+ ;;
1495
+ -tpf*)
1496
+ os=-tpf
1497
+ ;;
1498
+ -triton*)
1499
+ os=-sysv3
1500
+ ;;
1501
+ -oss*)
1502
+ os=-sysv3
1503
+ ;;
1504
+ -svr4)
1505
+ os=-sysv4
1506
+ ;;
1507
+ -svr3)
1508
+ os=-sysv3
1509
+ ;;
1510
+ -sysvr4)
1511
+ os=-sysv4
1512
+ ;;
1513
+ # This must come after -sysvr4.
1514
+ -sysv*)
1515
+ ;;
1516
+ -ose*)
1517
+ os=-ose
1518
+ ;;
1519
+ -es1800*)
1520
+ os=-ose
1521
+ ;;
1522
+ -xenix)
1523
+ os=-xenix
1524
+ ;;
1525
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1526
+ os=-mint
1527
+ ;;
1528
+ -aros*)
1529
+ os=-aros
1530
+ ;;
1531
+ -zvmoe)
1532
+ os=-zvmoe
1533
+ ;;
1534
+ -dicos*)
1535
+ os=-dicos
1536
+ ;;
1537
+ -nacl*)
1538
+ ;;
1539
+ -ios)
1540
+ ;;
1541
+ -none)
1542
+ ;;
1543
+ *)
1544
+ # Get rid of the `-' at the beginning of $os.
1545
+ os=`echo $os | sed 's/[^-]*-//'`
1546
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1547
+ exit 1
1548
+ ;;
1549
+ esac
1550
+ else
1551
+
1552
+ # Here we handle the default operating systems that come with various machines.
1553
+ # The value should be what the vendor currently ships out the door with their
1554
+ # machine or put another way, the most popular os provided with the machine.
1555
+
1556
+ # Note that if you're going to try to match "-MANUFACTURER" here (say,
1557
+ # "-sun"), then you have to tell the case statement up towards the top
1558
+ # that MANUFACTURER isn't an operating system. Otherwise, code above
1559
+ # will signal an error saying that MANUFACTURER isn't an operating
1560
+ # system, and we'll never get to this point.
1561
+
1562
+ case $basic_machine in
1563
+ score-*)
1564
+ os=-elf
1565
+ ;;
1566
+ spu-*)
1567
+ os=-elf
1568
+ ;;
1569
+ *-acorn)
1570
+ os=-riscix1.2
1571
+ ;;
1572
+ arm*-rebel)
1573
+ os=-linux
1574
+ ;;
1575
+ arm*-semi)
1576
+ os=-aout
1577
+ ;;
1578
+ c4x-* | tic4x-*)
1579
+ os=-coff
1580
+ ;;
1581
+ c8051-*)
1582
+ os=-elf
1583
+ ;;
1584
+ hexagon-*)
1585
+ os=-elf
1586
+ ;;
1587
+ tic54x-*)
1588
+ os=-coff
1589
+ ;;
1590
+ tic55x-*)
1591
+ os=-coff
1592
+ ;;
1593
+ tic6x-*)
1594
+ os=-coff
1595
+ ;;
1596
+ # This must come before the *-dec entry.
1597
+ pdp10-*)
1598
+ os=-tops20
1599
+ ;;
1600
+ pdp11-*)
1601
+ os=-none
1602
+ ;;
1603
+ *-dec | vax-*)
1604
+ os=-ultrix4.2
1605
+ ;;
1606
+ m68*-apollo)
1607
+ os=-domain
1608
+ ;;
1609
+ i386-sun)
1610
+ os=-sunos4.0.2
1611
+ ;;
1612
+ m68000-sun)
1613
+ os=-sunos3
1614
+ ;;
1615
+ m68*-cisco)
1616
+ os=-aout
1617
+ ;;
1618
+ mep-*)
1619
+ os=-elf
1620
+ ;;
1621
+ mips*-cisco)
1622
+ os=-elf
1623
+ ;;
1624
+ mips*-*)
1625
+ os=-elf
1626
+ ;;
1627
+ or32-*)
1628
+ os=-coff
1629
+ ;;
1630
+ *-tti) # must be before sparc entry or we get the wrong os.
1631
+ os=-sysv3
1632
+ ;;
1633
+ sparc-* | *-sun)
1634
+ os=-sunos4.1.1
1635
+ ;;
1636
+ pru-*)
1637
+ os=-elf
1638
+ ;;
1639
+ *-be)
1640
+ os=-beos
1641
+ ;;
1642
+ *-haiku)
1643
+ os=-haiku
1644
+ ;;
1645
+ *-ibm)
1646
+ os=-aix
1647
+ ;;
1648
+ *-knuth)
1649
+ os=-mmixware
1650
+ ;;
1651
+ *-wec)
1652
+ os=-proelf
1653
+ ;;
1654
+ *-winbond)
1655
+ os=-proelf
1656
+ ;;
1657
+ *-oki)
1658
+ os=-proelf
1659
+ ;;
1660
+ *-hp)
1661
+ os=-hpux
1662
+ ;;
1663
+ *-hitachi)
1664
+ os=-hiux
1665
+ ;;
1666
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1667
+ os=-sysv
1668
+ ;;
1669
+ *-cbm)
1670
+ os=-amigaos
1671
+ ;;
1672
+ *-dg)
1673
+ os=-dgux
1674
+ ;;
1675
+ *-dolphin)
1676
+ os=-sysv3
1677
+ ;;
1678
+ m68k-ccur)
1679
+ os=-rtu
1680
+ ;;
1681
+ m88k-omron*)
1682
+ os=-luna
1683
+ ;;
1684
+ *-next )
1685
+ os=-nextstep
1686
+ ;;
1687
+ *-sequent)
1688
+ os=-ptx
1689
+ ;;
1690
+ *-crds)
1691
+ os=-unos
1692
+ ;;
1693
+ *-ns)
1694
+ os=-genix
1695
+ ;;
1696
+ i370-*)
1697
+ os=-mvs
1698
+ ;;
1699
+ *-next)
1700
+ os=-nextstep3
1701
+ ;;
1702
+ *-gould)
1703
+ os=-sysv
1704
+ ;;
1705
+ *-highlevel)
1706
+ os=-bsd
1707
+ ;;
1708
+ *-encore)
1709
+ os=-bsd
1710
+ ;;
1711
+ *-sgi)
1712
+ os=-irix
1713
+ ;;
1714
+ *-siemens)
1715
+ os=-sysv4
1716
+ ;;
1717
+ *-masscomp)
1718
+ os=-rtu
1719
+ ;;
1720
+ f30[01]-fujitsu | f700-fujitsu)
1721
+ os=-uxpv
1722
+ ;;
1723
+ *-rom68k)
1724
+ os=-coff
1725
+ ;;
1726
+ *-*bug)
1727
+ os=-coff
1728
+ ;;
1729
+ *-apple)
1730
+ os=-macos
1731
+ ;;
1732
+ *-atari*)
1733
+ os=-mint
1734
+ ;;
1735
+ *)
1736
+ os=-none
1737
+ ;;
1738
+ esac
1739
+ fi
1740
+
1741
+ # Here we handle the case where we know the os, and the CPU type, but not the
1742
+ # manufacturer. We pick the logical manufacturer.
1743
+ vendor=unknown
1744
+ case $basic_machine in
1745
+ *-unknown)
1746
+ case $os in
1747
+ -riscix*)
1748
+ vendor=acorn
1749
+ ;;
1750
+ -sunos*)
1751
+ vendor=sun
1752
+ ;;
1753
+ -cnk*|-aix*)
1754
+ vendor=ibm
1755
+ ;;
1756
+ -beos*)
1757
+ vendor=be
1758
+ ;;
1759
+ -hpux*)
1760
+ vendor=hp
1761
+ ;;
1762
+ -mpeix*)
1763
+ vendor=hp
1764
+ ;;
1765
+ -hiux*)
1766
+ vendor=hitachi
1767
+ ;;
1768
+ -unos*)
1769
+ vendor=crds
1770
+ ;;
1771
+ -dgux*)
1772
+ vendor=dg
1773
+ ;;
1774
+ -luna*)
1775
+ vendor=omron
1776
+ ;;
1777
+ -genix*)
1778
+ vendor=ns
1779
+ ;;
1780
+ -mvs* | -opened*)
1781
+ vendor=ibm
1782
+ ;;
1783
+ -os400*)
1784
+ vendor=ibm
1785
+ ;;
1786
+ -ptx*)
1787
+ vendor=sequent
1788
+ ;;
1789
+ -tpf*)
1790
+ vendor=ibm
1791
+ ;;
1792
+ -vxsim* | -vxworks* | -windiss*)
1793
+ vendor=wrs
1794
+ ;;
1795
+ -aux*)
1796
+ vendor=apple
1797
+ ;;
1798
+ -hms*)
1799
+ vendor=hitachi
1800
+ ;;
1801
+ -mpw* | -macos*)
1802
+ vendor=apple
1803
+ ;;
1804
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1805
+ vendor=atari
1806
+ ;;
1807
+ -vos*)
1808
+ vendor=stratus
1809
+ ;;
1810
+ esac
1811
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1812
+ ;;
1813
+ esac
1814
+
1815
+ echo $basic_machine$os
1816
+ exit
1817
+
1818
+ # Local variables:
1819
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
1820
+ # time-stamp-start: "timestamp='"
1821
+ # time-stamp-format: "%:y-%02m-%02d"
1822
+ # time-stamp-end: "'"
1823
+ # End: