Refresh from GCC
[libffi.git] / patches / stand-alone
1 Index: libffi/ChangeLog.libffi
2 ===================================================================
3 --- /dev/null
4 +++ libffi/ChangeLog.libffi
5 @@ -0,0 +1,580 @@
6 +2009-12-25  Samuli Suominen  <ssuominen@gentoo.org>
7 +
8 +       * configure.ac: Undefine _AC_ARG_VAR_PRECIOUS for autoconf 2.64.
9 +       * configure: Rebuilt.
10 +       * fficonfig.h.in: Rebuilt.
11 +
12 +2009-06-16  Andrew Haley  <aph@redhat.com>
13 +
14 +       * testsuite/libffi.call/cls_align_sint64.c,
15 +       testsuite/libffi.call/cls_align_uint64.c,
16 +       testsuite/libffi.call/cls_longdouble_va.c,
17 +       testsuite/libffi.call/cls_ulonglong.c,
18 +       testsuite/libffi.call/return_ll1.c,
19 +       testsuite/libffi.call/stret_medium2.c: Fix printf format
20 +       specifiers.
21 +       * testsuite/libffi.call/huge_struct.c: Ad x86 XFAILs.
22 +       * testsuite/libffi.call/float2.c: Fix dg-excess-errors.
23 +       * testsuite/libffi.call/ffitest.h,
24 +       testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
25 +
26 +2009-06-12  Andrew Haley  <aph@redhat.com>
27 +
28 +       * testsuite/libffi.call/cls_align_sint64.c,
29 +       testsuite/libffi.call/cls_align_uint64.c,
30 +       testsuite/libffi.call/cls_ulonglong.c,
31 +       testsuite/libffi.call/return_ll1.c,
32 +       testsuite/libffi.call/stret_medium2.c: Fix printf format
33 +       specifiers.
34 +       testsuite/libffi.special/unwindtest.cc: include stdint.h.
35 +
36 +2009-06-11  Timothy Wall  <twall@users.sf.net>
37 +
38 +       * Makefile.am,
39 +        configure.ac,
40 +        include/ffi.h.in,
41 +        include/ffi_common.h,
42 +        src/closures.c,
43 +        src/dlmalloc.c,
44 +        src/x86/ffi.c,
45 +        src/x86/ffitarget.h,
46 +        src/x86/win64.S (new),
47 +       README: Added win64 support (mingw or MSVC)
48 +        * Makefile.in,
49 +        include/Makefile.in,
50 +        man/Makefile.in,
51 +        testsuite/Makefile.in,
52 +        configure,
53 +        aclocal.m4: Regenerated
54 +        * ltcf-c.sh: properly escape cygwin/w32 path
55 +        * man/ffi_call.3: Clarify size requirements for return value.
56 +        * src/x86/ffi64.c: Fix filename in comment.
57 +        * src/x86/win32.S: Remove unused extern.
58 +
59 +        * testsuite/libffi.call/closure_fn0.c,
60 +        testsuite/libffi.call/closure_fn1.c,
61 +        testsuite/libffi.call/closure_fn2.c,
62 +        testsuite/libffi.call/closure_fn3.c,
63 +        testsuite/libffi.call/closure_fn4.c,
64 +        testsuite/libffi.call/closure_fn5.c,
65 +        testsuite/libffi.call/closure_fn6.c,
66 +       testsuite/libffi.call/closure_stdcall.c,
67 +       testsuite/libffi.call/cls_12byte.c,
68 +       testsuite/libffi.call/cls_16byte.c,
69 +       testsuite/libffi.call/cls_18byte.c,
70 +       testsuite/libffi.call/cls_19byte.c,
71 +       testsuite/libffi.call/cls_1_1byte.c,
72 +       testsuite/libffi.call/cls_20byte.c,
73 +       testsuite/libffi.call/cls_20byte1.c,
74 +       testsuite/libffi.call/cls_24byte.c,
75 +       testsuite/libffi.call/cls_2byte.c,
76 +       testsuite/libffi.call/cls_3_1byte.c,
77 +       testsuite/libffi.call/cls_3byte1.c,
78 +       testsuite/libffi.call/cls_3byte2.c,
79 +       testsuite/libffi.call/cls_4_1byte.c,
80 +       testsuite/libffi.call/cls_4byte.c,
81 +       testsuite/libffi.call/cls_5_1_byte.c,
82 +       testsuite/libffi.call/cls_5byte.c,
83 +       testsuite/libffi.call/cls_64byte.c,
84 +       testsuite/libffi.call/cls_6_1_byte.c,
85 +       testsuite/libffi.call/cls_6byte.c,
86 +       testsuite/libffi.call/cls_7_1_byte.c,
87 +       testsuite/libffi.call/cls_7byte.c,
88 +       testsuite/libffi.call/cls_8byte.c,
89 +       testsuite/libffi.call/cls_9byte1.c,
90 +       testsuite/libffi.call/cls_9byte2.c,
91 +       testsuite/libffi.call/cls_align_double.c,
92 +       testsuite/libffi.call/cls_align_float.c,
93 +       testsuite/libffi.call/cls_align_longdouble.c,
94 +       testsuite/libffi.call/cls_align_longdouble_split.c,
95 +       testsuite/libffi.call/cls_align_longdouble_split2.c,
96 +       testsuite/libffi.call/cls_align_pointer.c,
97 +       testsuite/libffi.call/cls_align_sint16.c,
98 +       testsuite/libffi.call/cls_align_sint32.c,
99 +       testsuite/libffi.call/cls_align_sint64.c,
100 +       testsuite/libffi.call/cls_align_uint16.c,
101 +       testsuite/libffi.call/cls_align_uint32.c,
102 +       testsuite/libffi.call/cls_align_uint64.c,
103 +       testsuite/libffi.call/cls_dbls_struct.c,
104 +       testsuite/libffi.call/cls_double.c,
105 +       testsuite/libffi.call/cls_double_va.c,
106 +       testsuite/libffi.call/cls_float.c,
107 +       testsuite/libffi.call/cls_longdouble.c,
108 +       testsuite/libffi.call/cls_longdouble_va.c,
109 +       testsuite/libffi.call/cls_multi_schar.c,
110 +       testsuite/libffi.call/cls_multi_sshort.c,
111 +       testsuite/libffi.call/cls_multi_sshortchar.c,
112 +       testsuite/libffi.call/cls_multi_uchar.c,
113 +       testsuite/libffi.call/cls_multi_ushort.c,
114 +       testsuite/libffi.call/cls_multi_ushortchar.c,
115 +       testsuite/libffi.call/cls_pointer.c,
116 +       testsuite/libffi.call/cls_pointer_stack.c,
117 +       testsuite/libffi.call/cls_schar.c,
118 +       testsuite/libffi.call/cls_sint.c,
119 +       testsuite/libffi.call/cls_sshort.c,
120 +       testsuite/libffi.call/cls_uchar.c,
121 +       testsuite/libffi.call/cls_uint.c,
122 +       testsuite/libffi.call/cls_ulonglong.c,
123 +       testsuite/libffi.call/cls_ushort.c,
124 +       testsuite/libffi.call/err_bad_abi.c,
125 +       testsuite/libffi.call/err_bad_typedef.c,
126 +       testsuite/libffi.call/float2.c,
127 +       testsuite/libffi.call/huge_struct.c,
128 +       testsuite/libffi.call/nested_struct.c,
129 +       testsuite/libffi.call/nested_struct1.c,
130 +       testsuite/libffi.call/nested_struct10.c,
131 +       testsuite/libffi.call/nested_struct2.c,
132 +       testsuite/libffi.call/nested_struct3.c,
133 +       testsuite/libffi.call/nested_struct4.c,
134 +       testsuite/libffi.call/nested_struct5.c,
135 +       testsuite/libffi.call/nested_struct6.c,
136 +       testsuite/libffi.call/nested_struct7.c,
137 +       testsuite/libffi.call/nested_struct8.c,
138 +       testsuite/libffi.call/nested_struct9.c,
139 +       testsuite/libffi.call/problem1.c,
140 +       testsuite/libffi.call/return_ldl.c,
141 +       testsuite/libffi.call/return_ll1.c,
142 +       testsuite/libffi.call/stret_large.c,
143 +       testsuite/libffi.call/stret_large2.c,
144 +       testsuite/libffi.call/stret_medium.c,
145 +       testsuite/libffi.call/stret_medium2.c,
146 +        testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
147 +        of checking for MMAP.  Use intptr_t instead of long casts.
148 +
149 +2009-06-04  Andrew Haley  <aph@redhat.com>
150 +
151 +       * src/powerpc/ffitarget.h: Fix misapplied merge from gcc.
152 +
153 +2009-06-04  Andrew Haley  <aph@redhat.com>
154 +
155 +       * src/mips/o32.S,
156 +       src/mips/n32.S: Fix licence formatting.
157 +
158 +2009-06-04  Andrew Haley  <aph@redhat.com>
159 +
160 +       * src/x86/darwin.S: Fix licence formatting.
161 +       src/x86/win32.S: Likewise.
162 +       src/sh64/sysv.S: Likewise.
163 +       src/sh/sysv.S: Likewise.
164 +
165 +2009-06-04  Andrew Haley  <aph@redhat.com>
166 +
167 +       * src/sh64/ffi.c: Remove lint directives.  Was missing from merge
168 +       of Andreas Tobler's patch from 2006-04-22.
169 +       
170 +2009-06-04  Andrew Haley  <aph@redhat.com>
171 +
172 +       * src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of
173 +       2007-03-07.
174 +
175 +2008-12-26  Timothy Wall  <twall@users.sf.net>
176 +
177 +       * testsuite/libffi.call/cls_longdouble.c,
178 +        testsuite/libffi.call/cls_longdouble_va.c,
179 +        testsuite/libffi.call/cls_align_longdouble.c,
180 +        testsuite/libffi.call/cls_align_longdouble_split.c,
181 +        testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
182 +        failures on x86_64 cygwin/mingw.
183 +
184 +2008-12-22  Timothy Wall  <twall@users.sf.net>
185 +
186 +       * testsuite/libffi.call/closure_fn0.c,
187 +        testsuite/libffi.call/closure_fn1.c,    
188 +        testsuite/libffi.call/closure_fn2.c,    
189 +        testsuite/libffi.call/closure_fn3.c,    
190 +        testsuite/libffi.call/closure_fn4.c,    
191 +        testsuite/libffi.call/closure_fn5.c,    
192 +        testsuite/libffi.call/closure_fn6.c,    
193 +        testsuite/libffi.call/closure_loc_fn0.c,    
194 +        testsuite/libffi.call/closure_stdcall.c,    
195 +        testsuite/libffi.call/cls_align_pointer.c,    
196 +        testsuite/libffi.call/cls_pointer.c,    
197 +        testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
198 +        pointer to integer (intptr_t).
199 +        * testsuite/libffi.call/cls_longdouble.c: disable for win64.
200 +       
201 +2008-12-19  Anthony Green  <green@redhat.com>
202 +
203 +       * configure.ac: Bump version to 3.0.8.
204 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
205 +       * libtool-version: Increment revision.
206 +       * README: Update for new release.
207 +
208 +2008-11-11  Anthony Green  <green@redhat.com>
209 +
210 +       * configure.ac: Bump version to 3.0.7.
211 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
212 +       * libtool-version: Increment revision.
213 +       * README: Update for new release.
214 +
215 +2008-08-25  Andreas Tobler  <a.tobler@schweiz.org>
216 +
217 +       * src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
218 +       FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
219 +       Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
220 +       Adjust copyright notice.
221 +       * src/powerpc/ffi.c: Add two new flags to indicate if we have one
222 +       register or two register to use for FFI_SYSV structs.
223 +       (ffi_prep_cif_machdep): Pass the right register flag introduced above.
224 +       (ffi_closure_helper_SYSV): Fix the return type for
225 +       FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
226 +       Adjust copyright notice.
227 +
228 +2008-07-24  Anthony Green  <green@redhat.com>
229 +
230 +       * testsuite/libffi.call/cls_dbls_struct.c,
231 +       testsuite/libffi.call/cls_double_va.c,
232 +       testsuite/libffi.call/cls_longdouble.c,
233 +       testsuite/libffi.call/cls_longdouble_va.c,
234 +       testsuite/libffi.call/cls_pointer.c,
235 +       testsuite/libffi.call/cls_pointer_stack.c,
236 +       testsuite/libffi.call/err_bad_abi.c: Clean up failures from
237 +       compiler warnings.
238 +
239 +2008-07-17  Anthony Green  <green@redhat.com>
240 +
241 +       * configure.ac: Bump version to 3.0.6.
242 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
243 +       * libtool-version: Increment revision.  Add documentation.
244 +       * README: Update for new release.
245 +
246 +2008-07-16  Kaz Kojima  <kkojima@gcc.gnu.org>
247 +
248 +       * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
249 +       int.
250 +
251 +2008-07-16  Kaz Kojima  <kkojima@gcc.gnu.org>
252 +
253 +       * src/sh/sysv.S: Add .note.GNU-stack on Linux.
254 +       * src/sh64/sysv.S: Likewise.
255 +
256 +2008-04-03  Anthony Green  <green@redhat.com>
257 +
258 +       * libffi.pc.in (Libs): Add -L${libdir}.
259 +       * configure.ac: Bump version to 3.0.5.
260 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
261 +       * libtool-version: Increment revision.
262 +       * README: Update for new release.
263 +
264 +2008-04-03  Anthony Green  <green@redhat.com>
265 +           Xerces Ranby  <xerxes@zafena.se>
266 +
267 +       * include/ffi.h.in: Wrap definition of target architecture to
268 +       protect from double definitions.
269 +
270 +2008-03-22  Moriyoshi Koizumi  <moriyoshi@gmail.com>
271 +
272 +       * src/x86/ffi.c (ffi_prep_closure_loc): Fix for bug revealed in
273 +       closure_loc_fn0.c.
274 +       * testsuite/libffi.call/closure_loc_fn0.c (closure_loc_test_fn0):
275 +       New test.
276 +
277 +2008-03-04  Anthony Green  <green@redhat.com>
278 +           Blake Chaffin
279 +           hos@tamanegi.org
280 +
281 +       * testsuite/libffi.call/cls_align_longdouble_split2.c
282 +          testsuite/libffi.call/cls_align_longdouble_split.c
283 +          testsuite/libffi.call/cls_dbls_struct.c
284 +          testsuite/libffi.call/cls_double_va.c
285 +          testsuite/libffi.call/cls_longdouble.c
286 +          testsuite/libffi.call/cls_longdouble_va.c
287 +          testsuite/libffi.call/cls_pointer.c
288 +          testsuite/libffi.call/cls_pointer_stack.c
289 +          testsuite/libffi.call/err_bad_abi.c
290 +          testsuite/libffi.call/err_bad_typedef.c
291 +          testsuite/libffi.call/huge_struct.c
292 +          testsuite/libffi.call/stret_large2.c
293 +          testsuite/libffi.call/stret_large.c
294 +          testsuite/libffi.call/stret_medium2.c
295 +          testsuite/libffi.call/stret_medium.c: New tests from Apple.
296 +
297 +2008-02-26  Jakub Jelinek  <jakub@redhat.com>
298 +            Anthony Green  <green@redhat.com>
299 +
300 +       * src/alpha/osf.S: Add .note.GNU-stack on Linux.
301 +       * src/s390/sysv.S: Likewise.
302 +       * src/powerpc/linux64.S: Likewise.
303 +       * src/powerpc/linux64_closure.S: Likewise.
304 +       * src/powerpc/ppc_closure.S: Likewise.
305 +       * src/powerpc/sysv.S: Likewise.
306 +       * src/x86/unix64.S: Likewise.
307 +       * src/x86/sysv.S: Likewise.
308 +       * src/sparc/v8.S: Likewise.
309 +       * src/sparc/v9.S: Likewise.
310 +       * src/m68k/sysv.S: Likewise.
311 +       * src/ia64/unix.S: Likewise.
312 +       * src/arm/sysv.S: Likewise.
313 +
314 +2008-02-26  Anthony Green  <green@redhat.com>
315 +            Thomas Heller  <theller@ctypes.org>
316 +
317 +       * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
318 +       comment.
319 +
320 +2008-02-26  Anthony Green  <green@redhat.org>
321 +            Thomas Heller  <theller@ctypes.org>
322 +
323 +       * include/ffi.h.in: Change void (*)() to void (*)(void).
324 +
325 +2008-02-26  Anthony Green  <green@redhat.org>
326 +            Thomas Heller  <theller@ctypes.org>
327 +
328 +       * src/alpha/ffi.c: Change void (*)() to void (*)(void).
329 +       src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c,
330 +       src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c,
331 +       src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S,
332 +       src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c,
333 +       src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c,
334 +       src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,
335 +       src/x86/ffi64.c: Ditto.
336 +
337 +2008-02-24  Anthony Green  <green@redhat.org>
338 +
339 +       * configure.ac: Accept openbsd*, not just openbsd.
340 +       Bump version to 3.0.4.
341 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
342 +       * libtool-version: Increment revision.
343 +       * README: Update for new release.
344 +
345 +2008-02-22  Anthony Green  <green@redhat.com>
346 +
347 +       * README: Clean up list of tested platforms.
348 +
349 +2008-02-22  Anthony Green  <green@redhat.com>
350 +
351 +       * configure.ac: Bump version to 3.0.3.
352 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
353 +       * libtool-version: Increment revision.
354 +       * README: Update for new release.  Clean up test docs.
355 +
356 +2008-02-22  Bjoern Koenig  <bkoenig@alpha-tierchen.de>
357 +           Andreas Tobler  <a.tobler@schweiz.org>
358 +
359 +       * configure.ac: Add amd64-*-freebsd* target.
360 +       * configure: Regenerate.
361 +
362 +2008-02-22  Thomas Heller <theller@ctypes.org>
363 +
364 +       * configure.ac: Add x86 OpenBSD support.
365 +       * configure: Rebuilt.
366 +
367 +2008-02-21  Thomas Heller <theller@ctypes.org>
368 +
369 +       * README: Change "make test" to "make check".
370 +
371 +2008-02-21  Anthony Green  <green@redhat.com>
372 +
373 +       * configure.ac: Bump version to 3.0.2.
374 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
375 +       * libtool-version: Increment revision.
376 +       * README: Update for new release.
377 +
378 +2008-02-21  Björn König <bkoenig@alpha-tierchen.de>
379 +
380 +       * src/x86/freebsd.S: New file.
381 +       * configure.ac: Add x86 FreeBSD support.
382 +       * Makefile.am: Ditto.
383 +
384 +2008-02-15  Anthony Green  <green@redhat.com>
385 +
386 +       * configure.ac: Bump version to 3.0.1.
387 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
388 +       * libtool-version: Increment revision.
389 +       * README: Update for new release.
390 +
391 +2008-02-15  David Daney         <ddaney@avtrex.com>
392 +
393 +       * src/mips/ffi.c: Remove extra '>' from include directive.
394 +       (ffi_prep_closure_loc): Use clear_location instead of tramp.
395 +
396 +2008-02-15  Anthony Green  <green@redhat.com>
397 +
398 +       * configure.ac: Bump version to 3.0.0.
399 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
400 +
401 +2008-02-15  David Daney         <ddaney@avtrex.com>
402 +
403 +       * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
404 +       Define (conditionally), and use it to include cachectl.h.
405 +       (ffi_prep_closure_loc): Fix cache flushing.
406 +       * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
407 +
408 +2008-02-15  Anthony Green  <green@redhat.com>
409 +
410 +        * man/ffi_call.3, man/ffi_prep_cif.3, man/ffi.3:
411 +       Update dates and remove all references to ffi_prep_closure.
412 +       * configure.ac: Bump version to 2.99.9.
413 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
414 +
415 +2008-02-15  Anthony Green  <green@redhat.com>
416 +
417 +       * man/ffi_prep_closure.3: Delete.
418 +       * man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3.
419 +       (man_MANS): Ditto.
420 +       * man/Makefile.in: Rebuilt.
421 +       * configure.ac: Bump version to 2.99.8.
422 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
423 +
424 +2008-02-14  Anthony Green  <green@redhat.com>
425 +
426 +       * configure.ac: Bump version to 2.99.7.
427 +       * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
428 +       * include/ffi.h.in LICENSE src/debug.c src/closures.c
429 +          src/ffitest.c src/s390/sysv.S src/s390/ffitarget.h
430 +          src/types.c src/m68k/ffitarget.h src/raw_api.c src/frv/ffi.c
431 +          src/frv/ffitarget.h src/sh/ffi.c src/sh/sysv.S
432 +          src/sh/ffitarget.h src/powerpc/ffitarget.h src/pa/ffi.c
433 +          src/pa/ffitarget.h src/pa/linux.S src/java_raw_api.c
434 +          src/cris/ffitarget.h src/x86/ffi.c src/x86/sysv.S
435 +          src/x86/unix64.S src/x86/win32.S src/x86/ffitarget.h
436 +          src/x86/ffi64.c src/x86/darwin.S src/ia64/ffi.c
437 +          src/ia64/ffitarget.h src/ia64/ia64_flags.h src/ia64/unix.S
438 +          src/sparc/ffi.c src/sparc/v9.S src/sparc/ffitarget.h
439 +          src/sparc/v8.S src/alpha/ffi.c src/alpha/ffitarget.h
440 +          src/alpha/osf.S src/sh64/ffi.c src/sh64/sysv.S
441 +          src/sh64/ffitarget.h src/mips/ffi.c src/mips/ffitarget.h
442 +          src/mips/n32.S src/mips/o32.S src/arm/ffi.c src/arm/sysv.S
443 +          src/arm/ffitarget.h src/prep_cif.c: Update license text.
444 +
445 +2008-02-14  Anthony Green  <green@redhat.com>
446 +
447 +       * README: Update tested platforms.
448 +       * configure.ac: Bump version to 2.99.6.
449 +       * configure: Rebuilt.
450 +
451 +2008-02-14  Anthony Green  <green@redhat.com>
452 +
453 +       * configure.ac: Bump version to 2.99.5.
454 +       * configure: Rebuilt.
455 +       * Makefile.am (EXTRA_DIST): Add darwin64.S
456 +       * Makefile.in: Rebuilt.
457 +       * testsuite/lib/libffi-dg.exp: Remove libstdc++ bits from GCC tree.
458 +       * LICENSE: Update WARRANTY.
459 +
460 +2008-02-14  Anthony Green  <green@redhat.com>
461 +
462 +       * libffi.pc.in (libdir): Fix libdir definition.
463 +       * configure.ac: Bump version to 2.99.4.
464 +       * configure: Rebuilt.
465 +
466 +2008-02-14  Anthony Green  <green@redhat.com>
467 +
468 +       * README: Update.
469 +       * libffi.info: New file.
470 +       * doc/stamp-vti: New file.
471 +       * configure.ac: Bump version to 2.99.3.
472 +       * configure: Rebuilt.
473 +
474 +2008-02-14  Anthony Green  <green@redhat.com>
475 +
476 +       * Makefile.am (SUBDIRS): Add man dir.
477 +       * Makefile.in: Rebuilt.
478 +       * configure.ac: Create Makefile.
479 +       * configure: Rebuilt.
480 +        * man/ffi_call.3 man/ffi_prep_cif.3 man/ffi_prep_closure.3
481 +          man/Makefile.am man/Makefile.in: New files.
482 +
483 +2008-02-14  Tom Tromey  <tromey@redhat.com>
484 +
485 +       * aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
486 +       * mdate-sh, texinfo.tex: New files.
487 +       * Makefile.am (info_TEXINFOS): New variable.
488 +       * doc/libffi.texi: New file.
489 +       * doc/version.texi: Likewise.
490 +
491 +2008-02-14  Anthony Green  <green@redhat.com>
492 +
493 +       * Makefile.am (AM_CFLAGS): Don't compile with -D$(TARGET).
494 +       (lib_LTLIBRARIES): Define.
495 +       (toolexeclib_LIBRARIES): Undefine.
496 +       * Makefile.in: Rebuilt.
497 +       * configure.ac: Reset version to 2.99.1.
498 +       * configure.in: Rebuilt.
499 +
500 +2008-02-14  Anthony Green  <green@redhat.com>
501 +
502 +       * libffi.pc.in: Use @PACKAGE_NAME@ and @PACKAGE_VERSION@.
503 +       * configure.ac: Reset version to 2.99.1.
504 +       * configure.in: Rebuilt.
505 +       * Makefile.am (EXTRA_DIST): Add ChangeLog.libffi.
506 +       * Makefile.in: Rebuilt.
507 +       * LICENSE: Update copyright notice.
508 +
509 +2008-02-14  Anthony Green  <green@redhat.com>
510 +
511 +       * include/Makefile.am (nodist_includes_HEADERS): Define.  Don't
512 +       distribute ffitarget.h or ffi.h from the build include dir.
513 +       * Makefile.in: Rebuilt.
514 +
515 +2008-02-14  Anthony Green  <green@redhat.com>
516 +
517 +       * include/Makefile.am (includesdir): Install headers under libdir.
518 +       (pkgconfigdir): Define. Install libffi.pc.
519 +       * include/Makefile.in: Rebuilt.
520 +       * libffi.pc.in: Create.
521 +       * libtool-version: Increment CURRENT
522 +       * configure.ac: Add libffi.pc.in
523 +       * configure: Rebuilt.
524 +
525 +2008-02-03  Anthony Green  <green@redhat.com>
526 +
527 +       * include/Makefile.am (includesdir): Fix header install with
528 +       DESTDIR.
529 +       * include/Makefile.in: Rebuilt.
530 +
531 +2008-02-03  Timothy Wall  <twall@users.sf.net>
532 +
533 +       * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
534 +          offset based on code pointer, not data pointer.
535 +
536 +2008-02-01  Anthony Green  <green@redhat.com>
537 +
538 +       * include/Makefile.am: Fix header installs.
539 +       * Makefile.am: Ditto.
540 +       * include/Makefile.in: Rebuilt.
541 +       * Makefile.in: Ditto.
542 +
543 +2008-02-01  Anthony Green  <green@redhat.com>
544 +
545 +       * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL,
546 +       FFI_INIT_TRAMPOLINE): Revert my broken changes to twall's last
547 +       patch.
548 +
549 +2008-01-31  Anthony Green  <green@redhat.com>
550 +
551 +       * Makefile.am (EXTRA_DIST): Add missing files.
552 +       * testsuite/Makefile.am: Ditto.
553 +       * Makefile.in, testsuite/Makefile.in: Rebuilt.
554 +
555 +2008-01-31  Timothy Wall <twall@users.sf.net>
556 +
557 +       * testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
558 +       closures.
559 +       * src/x86/ffitarget.h: Increase size of trampoline for stdcall
560 +       closures.
561 +       * src/x86/win32.S: Add assembly for stdcall closure.
562 +       * src/x86/ffi.c: Initialize stdcall closure trampoline.
563 +
564 +2008-01-30  H.J. Lu <hongjiu.lu@intel.com>
565 +
566 +       PR libffi/34612
567 +       * src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
568 +       returning struct.
569 +
570 +       * testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
571 +       tests.
572 +
573 +2008-01-30  Anthony Green  <green@redhat.com>
574 +
575 +       * Makefile.am, include/Makefile.am: Move headers to
576 +       libffi_la_SOURCES for new automake.
577 +       * Makefile.in, include/Makefile.in: Rebuilt.
578 +       
579 +       * testsuite/lib/wrapper.exp: Copied from gcc tree to allow for 
580 +       execution outside of gcc tree.
581 +       * testsuite/lib/target-libpath.exp: Ditto.
582 +
583 +       * testsuite/lib/libffi-dg.exp: Many changes to allow for execution
584 +       outside of gcc tree.
585 +
586 Index: libffi/LICENSE
587 ===================================================================
588 --- libffi.orig/LICENSE
589 +++ libffi/LICENSE
590 @@ -1,4 +1,5 @@
591 -libffi - Copyright (c) 1996-2003  Red Hat, Inc.
592 +libffi - Copyright (c) 1996-2009  Anthony Green, Red Hat, Inc and others.  
593 +See source files for details.
594  
595  Permission is hereby granted, free of charge, to any person obtaining
596  a copy of this software and associated documentation files (the
597 @@ -11,10 +12,10 @@ the following conditions:
598  The above copyright notice and this permission notice shall be included
599  in all copies or substantial portions of the Software.
600  
601 -THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
602 -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
603 +THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
604 +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
605  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
606 -IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
607 -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
608 -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
609 -OTHER DEALINGS IN THE SOFTWARE.
610 +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
611 +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
612 +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
613 +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
614 Index: libffi/Makefile.am
615 ===================================================================
616 --- libffi.orig/Makefile.am
617 +++ libffi/Makefile.am
618 @@ -1,7 +1,6 @@
619  ## Process this with automake to create Makefile.in
620  
621  AUTOMAKE_OPTIONS = foreign subdir-objects
622 -ACLOCAL_AMFLAGS = -I .. -I ../config
623  
624  SUBDIRS = include testsuite man
625  
626 @@ -27,10 +26,17 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
627         src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
628         src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
629         src/sparc/ffi.c src/x86/darwin64.S \
630 -       src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/darwin.S \
631 +       src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/win64.S \
632 +       src/x86/darwin.S src/x86/freebsd.S \
633         src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \
634         src/pa/ffitarget.h src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
635 -       src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c
636 +       src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h \
637 +       src/dlmalloc.c \
638 +       src/moxie/ffi.c src/moxie/eabi.S \
639 +       libtool-version ChangeLog.libffi m4/libtool.m4 \
640 +       m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
641 +
642 +info_TEXINFOS = doc/libffi.texi
643  
644  ## ################################################################
645  
646 @@ -78,12 +84,17 @@ AM_MAKEFLAGS = \
647  
648  MAKEOVERRIDES=
649  
650 -toolexeclib_LTLIBRARIES = libffi.la
651 +ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
652 +
653 +lib_LTLIBRARIES = libffi.la
654  noinst_LTLIBRARIES = libffi_convenience.la
655  
656  libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
657                 src/raw_api.c src/java_raw_api.c src/closures.c
658  
659 +pkgconfigdir = $(libdir)/pkgconfig
660 +pkgconfig_DATA = libffi.pc
661 +
662  nodist_libffi_la_SOURCES =
663  
664  if MIPS
665 @@ -167,17 +178,12 @@ nodist_libffi_convenience_la_SOURCES = $
666  
667  AM_CFLAGS = -Wall -g -fexceptions
668  
669 -LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
670 -
671  libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
672  
673  AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
674  AM_CCASFLAGS = $(AM_CPPFLAGS)
675  
676 -# Multilib support.  Automake should provide these on its own.
677 -all-recursive: all-multi
678 -install-recursive: install-multi
679 -mostlyclean-recursive: mostlyclean-multi
680 -clean-recursive: clean-multi
681 -distclean-recursive: distclean-multi
682 -maintainer-clean-recursive: maintainer-clean-multi
683 +# No install-html or install-pdf support in automake yet
684 +.PHONY: install-html install-pdf
685 +install-html:
686 +install-pdf:
687 Index: libffi/compile
688 ===================================================================
689 --- /dev/null
690 +++ libffi/compile
691 @@ -0,0 +1,142 @@
692 +#! /bin/sh
693 +# Wrapper for compilers which do not understand `-c -o'.
694 +
695 +scriptversion=2005-05-14.22
696 +
697 +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
698 +# Written by Tom Tromey <tromey@cygnus.com>.
699 +#
700 +# This program is free software; you can redistribute it and/or modify
701 +# it under the terms of the GNU General Public License as published by
702 +# the Free Software Foundation; either version 2, or (at your option)
703 +# any later version.
704 +#
705 +# This program is distributed in the hope that it will be useful,
706 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
707 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
708 +# GNU General Public License for more details.
709 +#
710 +# You should have received a copy of the GNU General Public License
711 +# along with this program; if not, write to the Free Software
712 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
713 +
714 +# As a special exception to the GNU General Public License, if you
715 +# distribute this file as part of a program that contains a
716 +# configuration script generated by Autoconf, you may include it under
717 +# the same distribution terms that you use for the rest of that program.
718 +
719 +# This file is maintained in Automake, please report
720 +# bugs to <bug-automake@gnu.org> or send patches to
721 +# <automake-patches@gnu.org>.
722 +
723 +case $1 in
724 +  '')
725 +     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
726 +     exit 1;
727 +     ;;
728 +  -h | --h*)
729 +    cat <<\EOF
730 +Usage: compile [--help] [--version] PROGRAM [ARGS]
731 +
732 +Wrapper for compilers which do not understand `-c -o'.
733 +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
734 +arguments, and rename the output as expected.
735 +
736 +If you are trying to build a whole package this is not the
737 +right script to run: please start by reading the file `INSTALL'.
738 +
739 +Report bugs to <bug-automake@gnu.org>.
740 +EOF
741 +    exit $?
742 +    ;;
743 +  -v | --v*)
744 +    echo "compile $scriptversion"
745 +    exit $?
746 +    ;;
747 +esac
748 +
749 +ofile=
750 +cfile=
751 +eat=
752 +
753 +for arg
754 +do
755 +  if test -n "$eat"; then
756 +    eat=
757 +  else
758 +    case $1 in
759 +      -o)
760 +       # configure might choose to run compile as `compile cc -o foo foo.c'.
761 +       # So we strip `-o arg' only if arg is an object.
762 +       eat=1
763 +       case $2 in
764 +         *.o | *.obj)
765 +           ofile=$2
766 +           ;;
767 +         *)
768 +           set x "$@" -o "$2"
769 +           shift
770 +           ;;
771 +       esac
772 +       ;;
773 +      *.c)
774 +       cfile=$1
775 +       set x "$@" "$1"
776 +       shift
777 +       ;;
778 +      *)
779 +       set x "$@" "$1"
780 +       shift
781 +       ;;
782 +    esac
783 +  fi
784 +  shift
785 +done
786 +
787 +if test -z "$ofile" || test -z "$cfile"; then
788 +  # If no `-o' option was seen then we might have been invoked from a
789 +  # pattern rule where we don't need one.  That is ok -- this is a
790 +  # normal compilation that the losing compiler can handle.  If no
791 +  # `.c' file was seen then we are probably linking.  That is also
792 +  # ok.
793 +  exec "$@"
794 +fi
795 +
796 +# Name of file we expect compiler to create.
797 +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
798 +
799 +# Create the lock directory.
800 +# Note: use `[/.-]' here to ensure that we don't use the same name
801 +# that we are using for the .o file.  Also, base the name on the expected
802 +# object file name, since that is what matters with a parallel build.
803 +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
804 +while true; do
805 +  if mkdir "$lockdir" >/dev/null 2>&1; then
806 +    break
807 +  fi
808 +  sleep 1
809 +done
810 +# FIXME: race condition here if user kills between mkdir and trap.
811 +trap "rmdir '$lockdir'; exit 1" 1 2 15
812 +
813 +# Run the compile.
814 +"$@"
815 +ret=$?
816 +
817 +if test -f "$cofile"; then
818 +  mv "$cofile" "$ofile"
819 +elif test -f "${cofile}bj"; then
820 +  mv "${cofile}bj" "$ofile"
821 +fi
822 +
823 +rmdir "$lockdir"
824 +exit $ret
825 +
826 +# Local Variables:
827 +# mode: shell-script
828 +# sh-indentation: 2
829 +# eval: (add-hook 'write-file-hooks 'time-stamp)
830 +# time-stamp-start: "scriptversion="
831 +# time-stamp-format: "%:y-%02m-%02d.%02H"
832 +# time-stamp-end: "$"
833 +# End:
834 Index: libffi/config.guess
835 ===================================================================
836 --- /dev/null
837 +++ libffi/config.guess
838 @@ -0,0 +1,1501 @@
839 +#! /bin/sh
840 +# Attempt to guess a canonical system name.
841 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
842 +#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
843 +#   Free Software Foundation, Inc.
844 +
845 +timestamp='2009-11-20'
846 +
847 +# This file is free software; you can redistribute it and/or modify it
848 +# under the terms of the GNU General Public License as published by
849 +# the Free Software Foundation; either version 2 of the License, or
850 +# (at your option) any later version.
851 +#
852 +# This program is distributed in the hope that it will be useful, but
853 +# WITHOUT ANY WARRANTY; without even the implied warranty of
854 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
855 +# General Public License for more details.
856 +#
857 +# You should have received a copy of the GNU General Public License
858 +# along with this program; if not, write to the Free Software
859 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
860 +# 02110-1301, USA.
861 +#
862 +# As a special exception to the GNU General Public License, if you
863 +# distribute this file as part of a program that contains a
864 +# configuration script generated by Autoconf, you may include it under
865 +# the same distribution terms that you use for the rest of that program.
866 +
867 +
868 +# Originally written by Per Bothner.  Please send patches (context
869 +# diff format) to <config-patches@gnu.org> and include a ChangeLog
870 +# entry.
871 +#
872 +# This script attempts to guess a canonical system name similar to
873 +# config.sub.  If it succeeds, it prints the system name on stdout, and
874 +# exits with 0.  Otherwise, it exits with 1.
875 +#
876 +# You can get the latest version of this script from:
877 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
878 +
879 +me=`echo "$0" | sed -e 's,.*/,,'`
880 +
881 +usage="\
882 +Usage: $0 [OPTION]
883 +
884 +Output the configuration name of the system \`$me' is run on.
885 +
886 +Operation modes:
887 +  -h, --help         print this help, then exit
888 +  -t, --time-stamp   print date of last modification, then exit
889 +  -v, --version      print version number, then exit
890 +
891 +Report bugs and patches to <config-patches@gnu.org>."
892 +
893 +version="\
894 +GNU config.guess ($timestamp)
895 +
896 +Originally written by Per Bothner.
897 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
898 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
899 +
900 +This is free software; see the source for copying conditions.  There is NO
901 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
902 +
903 +help="
904 +Try \`$me --help' for more information."
905 +
906 +# Parse command line
907 +while test $# -gt 0 ; do
908 +  case $1 in
909 +    --time-stamp | --time* | -t )
910 +       echo "$timestamp" ; exit ;;
911 +    --version | -v )
912 +       echo "$version" ; exit ;;
913 +    --help | --h* | -h )
914 +       echo "$usage"; exit ;;
915 +    -- )     # Stop option processing
916 +       shift; break ;;
917 +    - )        # Use stdin as input.
918 +       break ;;
919 +    -* )
920 +       echo "$me: invalid option $1$help" >&2
921 +       exit 1 ;;
922 +    * )
923 +       break ;;
924 +  esac
925 +done
926 +
927 +if test $# != 0; then
928 +  echo "$me: too many arguments$help" >&2
929 +  exit 1
930 +fi
931 +
932 +trap 'exit 1' 1 2 15
933 +
934 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
935 +# compiler to aid in system detection is discouraged as it requires
936 +# temporary files to be created and, as you can see below, it is a
937 +# headache to deal with in a portable fashion.
938 +
939 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
940 +# use `HOST_CC' if defined, but it is deprecated.
941 +
942 +# Portable tmp directory creation inspired by the Autoconf team.
943 +
944 +set_cc_for_build='
945 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
946 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
947 +: ${TMPDIR=/tmp} ;
948 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
949 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
950 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
951 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
952 +dummy=$tmp/dummy ;
953 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
954 +case $CC_FOR_BUILD,$HOST_CC,$CC in
955 + ,,)    echo "int x;" > $dummy.c ;
956 +       for c in cc gcc c89 c99 ; do
957 +         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
958 +            CC_FOR_BUILD="$c"; break ;
959 +         fi ;
960 +       done ;
961 +       if test x"$CC_FOR_BUILD" = x ; then
962 +         CC_FOR_BUILD=no_compiler_found ;
963 +       fi
964 +       ;;
965 + ,,*)   CC_FOR_BUILD=$CC ;;
966 + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
967 +esac ; set_cc_for_build= ;'
968 +
969 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
970 +# (ghazi@noc.rutgers.edu 1994-08-24)
971 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
972 +       PATH=$PATH:/.attbin ; export PATH
973 +fi
974 +
975 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
976 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
977 +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
978 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
979 +
980 +# Note: order is significant - the case branches are not exclusive.
981 +
982 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
983 +    *:NetBSD:*:*)
984 +       # NetBSD (nbsd) targets should (where applicable) match one or
985 +       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
986 +       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
987 +       # switched to ELF, *-*-netbsd* would select the old
988 +       # object file format.  This provides both forward
989 +       # compatibility and a consistent mechanism for selecting the
990 +       # object file format.
991 +       #
992 +       # Note: NetBSD doesn't particularly care about the vendor
993 +       # portion of the name.  We always set it to "unknown".
994 +       sysctl="sysctl -n hw.machine_arch"
995 +       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
996 +           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
997 +       case "${UNAME_MACHINE_ARCH}" in
998 +           armeb) machine=armeb-unknown ;;
999 +           arm*) machine=arm-unknown ;;
1000 +           sh3el) machine=shl-unknown ;;
1001 +           sh3eb) machine=sh-unknown ;;
1002 +           sh5el) machine=sh5le-unknown ;;
1003 +           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
1004 +       esac
1005 +       # The Operating System including object format, if it has switched
1006 +       # to ELF recently, or will in the future.
1007 +       case "${UNAME_MACHINE_ARCH}" in
1008 +           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1009 +               eval $set_cc_for_build
1010 +               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1011 +                       | grep -q __ELF__
1012 +               then
1013 +                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
1014 +                   # Return netbsd for either.  FIX?
1015 +                   os=netbsd
1016 +               else
1017 +                   os=netbsdelf
1018 +               fi
1019 +               ;;
1020 +           *)
1021 +               os=netbsd
1022 +               ;;
1023 +       esac
1024 +       # The OS release
1025 +       # Debian GNU/NetBSD machines have a different userland, and
1026 +       # thus, need a distinct triplet. However, they do not need
1027 +       # kernel version information, so it can be replaced with a
1028 +       # suitable tag, in the style of linux-gnu.
1029 +       case "${UNAME_VERSION}" in
1030 +           Debian*)
1031 +               release='-gnu'
1032 +               ;;
1033 +           *)
1034 +               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1035 +               ;;
1036 +       esac
1037 +       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
1038 +       # contains redundant information, the shorter form:
1039 +       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
1040 +       echo "${machine}-${os}${release}"
1041 +       exit ;;
1042 +    *:OpenBSD:*:*)
1043 +       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
1044 +       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
1045 +       exit ;;
1046 +    *:ekkoBSD:*:*)
1047 +       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
1048 +       exit ;;
1049 +    *:SolidBSD:*:*)
1050 +       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
1051 +       exit ;;
1052 +    macppc:MirBSD:*:*)
1053 +       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
1054 +       exit ;;
1055 +    *:MirBSD:*:*)
1056 +       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
1057 +       exit ;;
1058 +    alpha:OSF1:*:*)
1059 +       case $UNAME_RELEASE in
1060 +       *4.0)
1061 +               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
1062 +               ;;
1063 +       *5.*)
1064 +               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
1065 +               ;;
1066 +       esac
1067 +       # According to Compaq, /usr/sbin/psrinfo has been available on
1068 +       # OSF/1 and Tru64 systems produced since 1995.  I hope that
1069 +       # covers most systems running today.  This code pipes the CPU
1070 +       # types through head -n 1, so we only detect the type of CPU 0.
1071 +       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
1072 +       case "$ALPHA_CPU_TYPE" in
1073 +           "EV4 (21064)")
1074 +               UNAME_MACHINE="alpha" ;;
1075 +           "EV4.5 (21064)")
1076 +               UNAME_MACHINE="alpha" ;;
1077 +           "LCA4 (21066/21068)")
1078 +               UNAME_MACHINE="alpha" ;;
1079 +           "EV5 (21164)")
1080 +               UNAME_MACHINE="alphaev5" ;;
1081 +           "EV5.6 (21164A)")
1082 +               UNAME_MACHINE="alphaev56" ;;
1083 +           "EV5.6 (21164PC)")
1084 +               UNAME_MACHINE="alphapca56" ;;
1085 +           "EV5.7 (21164PC)")
1086 +               UNAME_MACHINE="alphapca57" ;;
1087 +           "EV6 (21264)")
1088 +               UNAME_MACHINE="alphaev6" ;;
1089 +           "EV6.7 (21264A)")
1090 +               UNAME_MACHINE="alphaev67" ;;
1091 +           "EV6.8CB (21264C)")
1092 +               UNAME_MACHINE="alphaev68" ;;
1093 +           "EV6.8AL (21264B)")
1094 +               UNAME_MACHINE="alphaev68" ;;
1095 +           "EV6.8CX (21264D)")
1096 +               UNAME_MACHINE="alphaev68" ;;
1097 +           "EV6.9A (21264/EV69A)")
1098 +               UNAME_MACHINE="alphaev69" ;;
1099 +           "EV7 (21364)")
1100 +               UNAME_MACHINE="alphaev7" ;;
1101 +           "EV7.9 (21364A)")
1102 +               UNAME_MACHINE="alphaev79" ;;
1103 +       esac
1104 +       # A Pn.n version is a patched version.
1105 +       # A Vn.n version is a released version.
1106 +       # A Tn.n version is a released field test version.
1107 +       # A Xn.n version is an unreleased experimental baselevel.
1108 +       # 1.2 uses "1.2" for uname -r.
1109 +       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1110 +       exit ;;
1111 +    Alpha\ *:Windows_NT*:*)
1112 +       # How do we know it's Interix rather than the generic POSIX subsystem?
1113 +       # Should we change UNAME_MACHINE based on the output of uname instead
1114 +       # of the specific Alpha model?
1115 +       echo alpha-pc-interix
1116 +       exit ;;
1117 +    21064:Windows_NT:50:3)
1118 +       echo alpha-dec-winnt3.5
1119 +       exit ;;
1120 +    Amiga*:UNIX_System_V:4.0:*)
1121 +       echo m68k-unknown-sysv4
1122 +       exit ;;
1123 +    *:[Aa]miga[Oo][Ss]:*:*)
1124 +       echo ${UNAME_MACHINE}-unknown-amigaos
1125 +       exit ;;
1126 +    *:[Mm]orph[Oo][Ss]:*:*)
1127 +       echo ${UNAME_MACHINE}-unknown-morphos
1128 +       exit ;;
1129 +    *:OS/390:*:*)
1130 +       echo i370-ibm-openedition
1131 +       exit ;;
1132 +    *:z/VM:*:*)
1133 +       echo s390-ibm-zvmoe
1134 +       exit ;;
1135 +    *:OS400:*:*)
1136 +        echo powerpc-ibm-os400
1137 +       exit ;;
1138 +    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
1139 +       echo arm-acorn-riscix${UNAME_RELEASE}
1140 +       exit ;;
1141 +    arm:riscos:*:*|arm:RISCOS:*:*)
1142 +       echo arm-unknown-riscos
1143 +       exit ;;
1144 +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
1145 +       echo hppa1.1-hitachi-hiuxmpp
1146 +       exit ;;
1147 +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
1148 +       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
1149 +       if test "`(/bin/universe) 2>/dev/null`" = att ; then
1150 +               echo pyramid-pyramid-sysv3
1151 +       else
1152 +               echo pyramid-pyramid-bsd
1153 +       fi
1154 +       exit ;;
1155 +    NILE*:*:*:dcosx)
1156 +       echo pyramid-pyramid-svr4
1157 +       exit ;;
1158 +    DRS?6000:unix:4.0:6*)
1159 +       echo sparc-icl-nx6
1160 +       exit ;;
1161 +    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
1162 +       case `/usr/bin/uname -p` in
1163 +           sparc) echo sparc-icl-nx7; exit ;;
1164 +       esac ;;
1165 +    s390x:SunOS:*:*)
1166 +       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1167 +       exit ;;
1168 +    sun4H:SunOS:5.*:*)
1169 +       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1170 +       exit ;;
1171 +    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
1172 +       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1173 +       exit ;;
1174 +    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
1175 +       echo i386-pc-auroraux${UNAME_RELEASE}
1176 +       exit ;;
1177 +    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
1178 +       eval $set_cc_for_build
1179 +       SUN_ARCH="i386"
1180 +       # If there is a compiler, see if it is configured for 64-bit objects.
1181 +       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
1182 +       # This test works for both compilers.
1183 +       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1184 +           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
1185 +               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1186 +               grep IS_64BIT_ARCH >/dev/null
1187 +           then
1188 +               SUN_ARCH="x86_64"
1189 +           fi
1190 +       fi
1191 +       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1192 +       exit ;;
1193 +    sun4*:SunOS:6*:*)
1194 +       # According to config.sub, this is the proper way to canonicalize
1195 +       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
1196 +       # it's likely to be more like Solaris than SunOS4.
1197 +       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1198 +       exit ;;
1199 +    sun4*:SunOS:*:*)
1200 +       case "`/usr/bin/arch -k`" in
1201 +           Series*|S4*)
1202 +               UNAME_RELEASE=`uname -v`
1203 +               ;;
1204 +       esac
1205 +       # Japanese Language versions have a version number like `4.1.3-JL'.
1206 +       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
1207 +       exit ;;
1208 +    sun3*:SunOS:*:*)
1209 +       echo m68k-sun-sunos${UNAME_RELEASE}
1210 +       exit ;;
1211 +    sun*:*:4.2BSD:*)
1212 +       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
1213 +       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
1214 +       case "`/bin/arch`" in
1215 +           sun3)
1216 +               echo m68k-sun-sunos${UNAME_RELEASE}
1217 +               ;;
1218 +           sun4)
1219 +               echo sparc-sun-sunos${UNAME_RELEASE}
1220 +               ;;
1221 +       esac
1222 +       exit ;;
1223 +    aushp:SunOS:*:*)
1224 +       echo sparc-auspex-sunos${UNAME_RELEASE}
1225 +       exit ;;
1226 +    # The situation for MiNT is a little confusing.  The machine name
1227 +    # can be virtually everything (everything which is not
1228 +    # "atarist" or "atariste" at least should have a processor
1229 +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
1230 +    # to the lowercase version "mint" (or "freemint").  Finally
1231 +    # the system name "TOS" denotes a system which is actually not
1232 +    # MiNT.  But MiNT is downward compatible to TOS, so this should
1233 +    # be no problem.
1234 +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
1235 +        echo m68k-atari-mint${UNAME_RELEASE}
1236 +       exit ;;
1237 +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
1238 +       echo m68k-atari-mint${UNAME_RELEASE}
1239 +        exit ;;
1240 +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
1241 +        echo m68k-atari-mint${UNAME_RELEASE}
1242 +       exit ;;
1243 +    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
1244 +        echo m68k-milan-mint${UNAME_RELEASE}
1245 +        exit ;;
1246 +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
1247 +        echo m68k-hades-mint${UNAME_RELEASE}
1248 +        exit ;;
1249 +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
1250 +        echo m68k-unknown-mint${UNAME_RELEASE}
1251 +        exit ;;
1252 +    m68k:machten:*:*)
1253 +       echo m68k-apple-machten${UNAME_RELEASE}
1254 +       exit ;;
1255 +    powerpc:machten:*:*)
1256 +       echo powerpc-apple-machten${UNAME_RELEASE}
1257 +       exit ;;
1258 +    RISC*:Mach:*:*)
1259 +       echo mips-dec-mach_bsd4.3
1260 +       exit ;;
1261 +    RISC*:ULTRIX:*:*)
1262 +       echo mips-dec-ultrix${UNAME_RELEASE}
1263 +       exit ;;
1264 +    VAX*:ULTRIX*:*:*)
1265 +       echo vax-dec-ultrix${UNAME_RELEASE}
1266 +       exit ;;
1267 +    2020:CLIX:*:* | 2430:CLIX:*:*)
1268 +       echo clipper-intergraph-clix${UNAME_RELEASE}
1269 +       exit ;;
1270 +    mips:*:*:UMIPS | mips:*:*:RISCos)
1271 +       eval $set_cc_for_build
1272 +       sed 's/^        //' << EOF >$dummy.c
1273 +#ifdef __cplusplus
1274 +#include <stdio.h>  /* for printf() prototype */
1275 +       int main (int argc, char *argv[]) {
1276 +#else
1277 +       int main (argc, argv) int argc; char *argv[]; {
1278 +#endif
1279 +       #if defined (host_mips) && defined (MIPSEB)
1280 +       #if defined (SYSTYPE_SYSV)
1281 +         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
1282 +       #endif
1283 +       #if defined (SYSTYPE_SVR4)
1284 +         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
1285 +       #endif
1286 +       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
1287 +         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
1288 +       #endif
1289 +       #endif
1290 +         exit (-1);
1291 +       }
1292 +EOF
1293 +       $CC_FOR_BUILD -o $dummy $dummy.c &&
1294 +         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
1295 +         SYSTEM_NAME=`$dummy $dummyarg` &&
1296 +           { echo "$SYSTEM_NAME"; exit; }
1297 +       echo mips-mips-riscos${UNAME_RELEASE}
1298 +       exit ;;
1299 +    Motorola:PowerMAX_OS:*:*)
1300 +       echo powerpc-motorola-powermax
1301 +       exit ;;
1302 +    Motorola:*:4.3:PL8-*)
1303 +       echo powerpc-harris-powermax
1304 +       exit ;;
1305 +    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
1306 +       echo powerpc-harris-powermax
1307 +       exit ;;
1308 +    Night_Hawk:Power_UNIX:*:*)
1309 +       echo powerpc-harris-powerunix
1310 +       exit ;;
1311 +    m88k:CX/UX:7*:*)
1312 +       echo m88k-harris-cxux7
1313 +       exit ;;
1314 +    m88k:*:4*:R4*)
1315 +       echo m88k-motorola-sysv4
1316 +       exit ;;
1317 +    m88k:*:3*:R3*)
1318 +       echo m88k-motorola-sysv3
1319 +       exit ;;
1320 +    AViiON:dgux:*:*)
1321 +        # DG/UX returns AViiON for all architectures
1322 +        UNAME_PROCESSOR=`/usr/bin/uname -p`
1323 +       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
1324 +       then
1325 +           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
1326 +              [ ${TARGET_BINARY_INTERFACE}x = x ]
1327 +           then
1328 +               echo m88k-dg-dgux${UNAME_RELEASE}
1329 +           else
1330 +               echo m88k-dg-dguxbcs${UNAME_RELEASE}
1331 +           fi
1332 +       else
1333 +           echo i586-dg-dgux${UNAME_RELEASE}
1334 +       fi
1335 +       exit ;;
1336 +    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
1337 +       echo m88k-dolphin-sysv3
1338 +       exit ;;
1339 +    M88*:*:R3*:*)
1340 +       # Delta 88k system running SVR3
1341 +       echo m88k-motorola-sysv3
1342 +       exit ;;
1343 +    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
1344 +       echo m88k-tektronix-sysv3
1345 +       exit ;;
1346 +    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
1347 +       echo m68k-tektronix-bsd
1348 +       exit ;;
1349 +    *:IRIX*:*:*)
1350 +       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
1351 +       exit ;;
1352 +    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
1353 +       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
1354 +       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
1355 +    i*86:AIX:*:*)
1356 +       echo i386-ibm-aix
1357 +       exit ;;
1358 +    ia64:AIX:*:*)
1359 +       if [ -x /usr/bin/oslevel ] ; then
1360 +               IBM_REV=`/usr/bin/oslevel`
1361 +       else
1362 +               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
1363 +       fi
1364 +       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
1365 +       exit ;;
1366 +    *:AIX:2:3)
1367 +       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
1368 +               eval $set_cc_for_build
1369 +               sed 's/^                //' << EOF >$dummy.c
1370 +               #include <sys/systemcfg.h>
1371 +
1372 +               main()
1373 +                       {
1374 +                       if (!__power_pc())
1375 +                               exit(1);
1376 +                       puts("powerpc-ibm-aix3.2.5");
1377 +                       exit(0);
1378 +                       }
1379 +EOF
1380 +               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
1381 +               then
1382 +                       echo "$SYSTEM_NAME"
1383 +               else
1384 +                       echo rs6000-ibm-aix3.2.5
1385 +               fi
1386 +       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
1387 +               echo rs6000-ibm-aix3.2.4
1388 +       else
1389 +               echo rs6000-ibm-aix3.2
1390 +       fi
1391 +       exit ;;
1392 +    *:AIX:*:[456])
1393 +       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
1394 +       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
1395 +               IBM_ARCH=rs6000
1396 +       else
1397 +               IBM_ARCH=powerpc
1398 +       fi
1399 +       if [ -x /usr/bin/oslevel ] ; then
1400 +               IBM_REV=`/usr/bin/oslevel`
1401 +       else
1402 +               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
1403 +       fi
1404 +       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
1405 +       exit ;;
1406 +    *:AIX:*:*)
1407 +       echo rs6000-ibm-aix
1408 +       exit ;;
1409 +    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
1410 +       echo romp-ibm-bsd4.4
1411 +       exit ;;
1412 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
1413 +       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
1414 +       exit ;;                             # report: romp-ibm BSD 4.3
1415 +    *:BOSX:*:*)
1416 +       echo rs6000-bull-bosx
1417 +       exit ;;
1418 +    DPX/2?00:B.O.S.:*:*)
1419 +       echo m68k-bull-sysv3
1420 +       exit ;;
1421 +    9000/[34]??:4.3bsd:1.*:*)
1422 +       echo m68k-hp-bsd
1423 +       exit ;;
1424 +    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
1425 +       echo m68k-hp-bsd4.4
1426 +       exit ;;
1427 +    9000/[34678]??:HP-UX:*:*)
1428 +       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
1429 +       case "${UNAME_MACHINE}" in
1430 +           9000/31? )            HP_ARCH=m68000 ;;
1431 +           9000/[34]?? )         HP_ARCH=m68k ;;
1432 +           9000/[678][0-9][0-9])
1433 +               if [ -x /usr/bin/getconf ]; then
1434 +                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
1435 +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
1436 +                    case "${sc_cpu_version}" in
1437 +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
1438 +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
1439 +                      532)                      # CPU_PA_RISC2_0
1440 +                        case "${sc_kernel_bits}" in
1441 +                          32) HP_ARCH="hppa2.0n" ;;
1442 +                          64) HP_ARCH="hppa2.0w" ;;
1443 +                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
1444 +                        esac ;;
1445 +                    esac
1446 +               fi
1447 +               if [ "${HP_ARCH}" = "" ]; then
1448 +                   eval $set_cc_for_build
1449 +                   sed 's/^              //' << EOF >$dummy.c
1450 +
1451 +              #define _HPUX_SOURCE
1452 +              #include <stdlib.h>
1453 +              #include <unistd.h>
1454 +
1455 +              int main ()
1456 +              {
1457 +              #if defined(_SC_KERNEL_BITS)
1458 +                  long bits = sysconf(_SC_KERNEL_BITS);
1459 +              #endif
1460 +                  long cpu  = sysconf (_SC_CPU_VERSION);
1461 +
1462 +                  switch (cpu)
1463 +               {
1464 +               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
1465 +               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
1466 +               case CPU_PA_RISC2_0:
1467 +              #if defined(_SC_KERNEL_BITS)
1468 +                   switch (bits)
1469 +                       {
1470 +                       case 64: puts ("hppa2.0w"); break;
1471 +                       case 32: puts ("hppa2.0n"); break;
1472 +                       default: puts ("hppa2.0"); break;
1473 +                       } break;
1474 +              #else  /* !defined(_SC_KERNEL_BITS) */
1475 +                   puts ("hppa2.0"); break;
1476 +              #endif
1477 +               default: puts ("hppa1.0"); break;
1478 +               }
1479 +                  exit (0);
1480 +              }
1481 +EOF
1482 +                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
1483 +                   test -z "$HP_ARCH" && HP_ARCH=hppa
1484 +               fi ;;
1485 +       esac
1486 +       if [ ${HP_ARCH} = "hppa2.0w" ]
1487 +       then
1488 +           eval $set_cc_for_build
1489 +
1490 +           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
1491 +           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
1492 +           # generating 64-bit code.  GNU and HP use different nomenclature:
1493 +           #
1494 +           # $ CC_FOR_BUILD=cc ./config.guess
1495 +           # => hppa2.0w-hp-hpux11.23
1496 +           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
1497 +           # => hppa64-hp-hpux11.23
1498 +
1499 +           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
1500 +               grep -q __LP64__
1501 +           then
1502 +               HP_ARCH="hppa2.0w"
1503 +           else
1504 +               HP_ARCH="hppa64"
1505 +           fi
1506 +       fi
1507 +       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
1508 +       exit ;;
1509 +    ia64:HP-UX:*:*)
1510 +       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
1511 +       echo ia64-hp-hpux${HPUX_REV}
1512 +       exit ;;
1513 +    3050*:HI-UX:*:*)
1514 +       eval $set_cc_for_build
1515 +       sed 's/^        //' << EOF >$dummy.c
1516 +       #include <unistd.h>
1517 +       int
1518 +       main ()
1519 +       {
1520 +         long cpu = sysconf (_SC_CPU_VERSION);
1521 +         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
1522 +            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
1523 +            results, however.  */
1524 +         if (CPU_IS_PA_RISC (cpu))
1525 +           {
1526 +             switch (cpu)
1527 +               {
1528 +                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
1529 +                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
1530 +                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
1531 +                 default: puts ("hppa-hitachi-hiuxwe2"); break;
1532 +               }
1533 +           }
1534 +         else if (CPU_IS_HP_MC68K (cpu))
1535 +           puts ("m68k-hitachi-hiuxwe2");
1536 +         else puts ("unknown-hitachi-hiuxwe2");
1537 +         exit (0);
1538 +       }
1539 +EOF
1540 +       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
1541 +               { echo "$SYSTEM_NAME"; exit; }
1542 +       echo unknown-hitachi-hiuxwe2
1543 +       exit ;;
1544 +    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
1545 +       echo hppa1.1-hp-bsd
1546 +       exit ;;
1547 +    9000/8??:4.3bsd:*:*)
1548 +       echo hppa1.0-hp-bsd
1549 +       exit ;;
1550 +    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
1551 +       echo hppa1.0-hp-mpeix
1552 +       exit ;;
1553 +    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
1554 +       echo hppa1.1-hp-osf
1555 +       exit ;;
1556 +    hp8??:OSF1:*:*)
1557 +       echo hppa1.0-hp-osf
1558 +       exit ;;
1559 +    i*86:OSF1:*:*)
1560 +       if [ -x /usr/sbin/sysversion ] ; then
1561 +           echo ${UNAME_MACHINE}-unknown-osf1mk
1562 +       else
1563 +           echo ${UNAME_MACHINE}-unknown-osf1
1564 +       fi
1565 +       exit ;;
1566 +    parisc*:Lites*:*:*)
1567 +       echo hppa1.1-hp-lites
1568 +       exit ;;
1569 +    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
1570 +       echo c1-convex-bsd
1571 +        exit ;;
1572 +    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
1573 +       if getsysinfo -f scalar_acc
1574 +       then echo c32-convex-bsd
1575 +       else echo c2-convex-bsd
1576 +       fi
1577 +        exit ;;
1578 +    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
1579 +       echo c34-convex-bsd
1580 +        exit ;;
1581 +    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
1582 +       echo c38-convex-bsd
1583 +        exit ;;
1584 +    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
1585 +       echo c4-convex-bsd
1586 +        exit ;;
1587 +    CRAY*Y-MP:*:*:*)
1588 +       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1589 +       exit ;;
1590 +    CRAY*[A-Z]90:*:*:*)
1591 +       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
1592 +       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
1593 +             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
1594 +             -e 's/\.[^.]*$/.X/'
1595 +       exit ;;
1596 +    CRAY*TS:*:*:*)
1597 +       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1598 +       exit ;;
1599 +    CRAY*T3E:*:*:*)
1600 +       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1601 +       exit ;;
1602 +    CRAY*SV1:*:*:*)
1603 +       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1604 +       exit ;;
1605 +    *:UNICOS/mp:*:*)
1606 +       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
1607 +       exit ;;
1608 +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
1609 +       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
1610 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
1611 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
1612 +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
1613 +        exit ;;
1614 +    5000:UNIX_System_V:4.*:*)
1615 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
1616 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
1617 +        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
1618 +       exit ;;
1619 +    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
1620 +       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
1621 +       exit ;;
1622 +    sparc*:BSD/OS:*:*)
1623 +       echo sparc-unknown-bsdi${UNAME_RELEASE}
1624 +       exit ;;
1625 +    *:BSD/OS:*:*)
1626 +       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
1627 +       exit ;;
1628 +    *:FreeBSD:*:*)
1629 +       case ${UNAME_MACHINE} in
1630 +           pc98)
1631 +               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
1632 +           amd64)
1633 +               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
1634 +           *)
1635 +               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
1636 +       esac
1637 +       exit ;;
1638 +    i*:CYGWIN*:*)
1639 +       echo ${UNAME_MACHINE}-pc-cygwin
1640 +       exit ;;
1641 +    *:MINGW*:*)
1642 +       echo ${UNAME_MACHINE}-pc-mingw32
1643 +       exit ;;
1644 +    i*:windows32*:*)
1645 +       # uname -m includes "-pc" on this system.
1646 +       echo ${UNAME_MACHINE}-mingw32
1647 +       exit ;;
1648 +    i*:PW*:*)
1649 +       echo ${UNAME_MACHINE}-pc-pw32
1650 +       exit ;;
1651 +    *:Interix*:*)
1652 +       case ${UNAME_MACHINE} in
1653 +           x86)
1654 +               echo i586-pc-interix${UNAME_RELEASE}
1655 +               exit ;;
1656 +           authenticamd | genuineintel | EM64T)
1657 +               echo x86_64-unknown-interix${UNAME_RELEASE}
1658 +               exit ;;
1659 +           IA64)
1660 +               echo ia64-unknown-interix${UNAME_RELEASE}
1661 +               exit ;;
1662 +       esac ;;
1663 +    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
1664 +       echo i${UNAME_MACHINE}-pc-mks
1665 +       exit ;;
1666 +    8664:Windows_NT:*)
1667 +       echo x86_64-pc-mks
1668 +       exit ;;
1669 +    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
1670 +       # How do we know it's Interix rather than the generic POSIX subsystem?
1671 +       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
1672 +       # UNAME_MACHINE based on the output of uname instead of i386?
1673 +       echo i586-pc-interix
1674 +       exit ;;
1675 +    i*:UWIN*:*)
1676 +       echo ${UNAME_MACHINE}-pc-uwin
1677 +       exit ;;
1678 +    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
1679 +       echo x86_64-unknown-cygwin
1680 +       exit ;;
1681 +    p*:CYGWIN*:*)
1682 +       echo powerpcle-unknown-cygwin
1683 +       exit ;;
1684 +    prep*:SunOS:5.*:*)
1685 +       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
1686 +       exit ;;
1687 +    *:GNU:*:*)
1688 +       # the GNU system
1689 +       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
1690 +       exit ;;
1691 +    *:GNU/*:*:*)
1692 +       # other systems with GNU libc and userland
1693 +       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
1694 +       exit ;;
1695 +    i*86:Minix:*:*)
1696 +       echo ${UNAME_MACHINE}-pc-minix
1697 +       exit ;;
1698 +    alpha:Linux:*:*)
1699 +       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
1700 +         EV5)   UNAME_MACHINE=alphaev5 ;;
1701 +         EV56)  UNAME_MACHINE=alphaev56 ;;
1702 +         PCA56) UNAME_MACHINE=alphapca56 ;;
1703 +         PCA57) UNAME_MACHINE=alphapca56 ;;
1704 +         EV6)   UNAME_MACHINE=alphaev6 ;;
1705 +         EV67)  UNAME_MACHINE=alphaev67 ;;
1706 +         EV68*) UNAME_MACHINE=alphaev68 ;;
1707 +        esac
1708 +       objdump --private-headers /bin/sh | grep -q ld.so.1
1709 +       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
1710 +       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
1711 +       exit ;;
1712 +    arm*:Linux:*:*)
1713 +       eval $set_cc_for_build
1714 +       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
1715 +           | grep -q __ARM_EABI__
1716 +       then
1717 +           echo ${UNAME_MACHINE}-unknown-linux-gnu
1718 +       else
1719 +           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
1720 +       fi
1721 +       exit ;;
1722 +    avr32*:Linux:*:*)
1723 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1724 +       exit ;;
1725 +    cris:Linux:*:*)
1726 +       echo cris-axis-linux-gnu
1727 +       exit ;;
1728 +    crisv32:Linux:*:*)
1729 +       echo crisv32-axis-linux-gnu
1730 +       exit ;;
1731 +    frv:Linux:*:*)
1732 +       echo frv-unknown-linux-gnu
1733 +       exit ;;
1734 +    i*86:Linux:*:*)
1735 +       LIBC=gnu
1736 +       eval $set_cc_for_build
1737 +       sed 's/^        //' << EOF >$dummy.c
1738 +       #ifdef __dietlibc__
1739 +       LIBC=dietlibc
1740 +       #endif
1741 +EOF
1742 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
1743 +       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1744 +       exit ;;
1745 +    ia64:Linux:*:*)
1746 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1747 +       exit ;;
1748 +    m32r*:Linux:*:*)
1749 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1750 +       exit ;;
1751 +    m68*:Linux:*:*)
1752 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1753 +       exit ;;
1754 +    mips:Linux:*:* | mips64:Linux:*:*)
1755 +       eval $set_cc_for_build
1756 +       sed 's/^        //' << EOF >$dummy.c
1757 +       #undef CPU
1758 +       #undef ${UNAME_MACHINE}
1759 +       #undef ${UNAME_MACHINE}el
1760 +       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1761 +       CPU=${UNAME_MACHINE}el
1762 +       #else
1763 +       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1764 +       CPU=${UNAME_MACHINE}
1765 +       #else
1766 +       CPU=
1767 +       #endif
1768 +       #endif
1769 +EOF
1770 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1771 +       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
1772 +       ;;
1773 +    or32:Linux:*:*)
1774 +       echo or32-unknown-linux-gnu
1775 +       exit ;;
1776 +    padre:Linux:*:*)
1777 +       echo sparc-unknown-linux-gnu
1778 +       exit ;;
1779 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
1780 +       echo hppa64-unknown-linux-gnu
1781 +       exit ;;
1782 +    parisc:Linux:*:* | hppa:Linux:*:*)
1783 +       # Look for CPU level
1784 +       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1785 +         PA7*) echo hppa1.1-unknown-linux-gnu ;;
1786 +         PA8*) echo hppa2.0-unknown-linux-gnu ;;
1787 +         *)    echo hppa-unknown-linux-gnu ;;
1788 +       esac
1789 +       exit ;;
1790 +    ppc64:Linux:*:*)
1791 +       echo powerpc64-unknown-linux-gnu
1792 +       exit ;;
1793 +    ppc:Linux:*:*)
1794 +       echo powerpc-unknown-linux-gnu
1795 +       exit ;;
1796 +    s390:Linux:*:* | s390x:Linux:*:*)
1797 +       echo ${UNAME_MACHINE}-ibm-linux
1798 +       exit ;;
1799 +    sh64*:Linux:*:*)
1800 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1801 +       exit ;;
1802 +    sh*:Linux:*:*)
1803 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1804 +       exit ;;
1805 +    sparc:Linux:*:* | sparc64:Linux:*:*)
1806 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1807 +       exit ;;
1808 +    vax:Linux:*:*)
1809 +       echo ${UNAME_MACHINE}-dec-linux-gnu
1810 +       exit ;;
1811 +    x86_64:Linux:*:*)
1812 +       echo x86_64-unknown-linux-gnu
1813 +       exit ;;
1814 +    xtensa*:Linux:*:*)
1815 +       echo ${UNAME_MACHINE}-unknown-linux-gnu
1816 +       exit ;;
1817 +    i*86:DYNIX/ptx:4*:*)
1818 +       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1819 +       # earlier versions are messed up and put the nodename in both
1820 +       # sysname and nodename.
1821 +       echo i386-sequent-sysv4
1822 +       exit ;;
1823 +    i*86:UNIX_SV:4.2MP:2.*)
1824 +        # Unixware is an offshoot of SVR4, but it has its own version
1825 +        # number series starting with 2...
1826 +        # I am not positive that other SVR4 systems won't match this,
1827 +       # I just have to hope.  -- rms.
1828 +        # Use sysv4.2uw... so that sysv4* matches it.
1829 +       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1830 +       exit ;;
1831 +    i*86:OS/2:*:*)
1832 +       # If we were able to find `uname', then EMX Unix compatibility
1833 +       # is probably installed.
1834 +       echo ${UNAME_MACHINE}-pc-os2-emx
1835 +       exit ;;
1836 +    i*86:XTS-300:*:STOP)
1837 +       echo ${UNAME_MACHINE}-unknown-stop
1838 +       exit ;;
1839 +    i*86:atheos:*:*)
1840 +       echo ${UNAME_MACHINE}-unknown-atheos
1841 +       exit ;;
1842 +    i*86:syllable:*:*)
1843 +       echo ${UNAME_MACHINE}-pc-syllable
1844 +       exit ;;
1845 +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1846 +       echo i386-unknown-lynxos${UNAME_RELEASE}
1847 +       exit ;;
1848 +    i*86:*DOS:*:*)
1849 +       echo ${UNAME_MACHINE}-pc-msdosdjgpp
1850 +       exit ;;
1851 +    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1852 +       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1853 +       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1854 +               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1855 +       else
1856 +               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1857 +       fi
1858 +       exit ;;
1859 +    i*86:*:5:[678]*)
1860 +       # UnixWare 7.x, OpenUNIX and OpenServer 6.
1861 +       case `/bin/uname -X | grep "^Machine"` in
1862 +           *486*)           UNAME_MACHINE=i486 ;;
1863 +           *Pentium)        UNAME_MACHINE=i586 ;;
1864 +           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1865 +       esac
1866 +       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1867 +       exit ;;
1868 +    i*86:*:3.2:*)
1869 +       if test -f /usr/options/cb.name; then
1870 +               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1871 +               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1872 +       elif /bin/uname -X 2>/dev/null >/dev/null ; then
1873 +               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1874 +               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1875 +               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1876 +                       && UNAME_MACHINE=i586
1877 +               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1878 +                       && UNAME_MACHINE=i686
1879 +               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1880 +                       && UNAME_MACHINE=i686
1881 +               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1882 +       else
1883 +               echo ${UNAME_MACHINE}-pc-sysv32
1884 +       fi
1885 +       exit ;;
1886 +    pc:*:*:*)
1887 +       # Left here for compatibility:
1888 +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1889 +        # the processor, so we play safe by assuming i586.
1890 +       # Note: whatever this is, it MUST be the same as what config.sub
1891 +       # prints for the "djgpp" host, or else GDB configury will decide that
1892 +       # this is a cross-build.
1893 +       echo i586-pc-msdosdjgpp
1894 +        exit ;;
1895 +    Intel:Mach:3*:*)
1896 +       echo i386-pc-mach3
1897 +       exit ;;
1898 +    paragon:*:*:*)
1899 +       echo i860-intel-osf1
1900 +       exit ;;
1901 +    i860:*:4.*:*) # i860-SVR4
1902 +       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1903 +         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1904 +       else # Add other i860-SVR4 vendors below as they are discovered.
1905 +         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1906 +       fi
1907 +       exit ;;
1908 +    mini*:CTIX:SYS*5:*)
1909 +       # "miniframe"
1910 +       echo m68010-convergent-sysv
1911 +       exit ;;
1912 +    mc68k:UNIX:SYSTEM5:3.51m)
1913 +       echo m68k-convergent-sysv
1914 +       exit ;;
1915 +    M680?0:D-NIX:5.3:*)
1916 +       echo m68k-diab-dnix
1917 +       exit ;;
1918 +    M68*:*:R3V[5678]*:*)
1919 +       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1920 +    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)
1921 +       OS_REL=''
1922 +       test -r /etc/.relid \
1923 +       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1924 +       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1925 +         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1926 +       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1927 +         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1928 +    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1929 +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1930 +          && { echo i486-ncr-sysv4; exit; } ;;
1931 +    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1932 +       OS_REL='.3'
1933 +       test -r /etc/.relid \
1934 +           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1935 +       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1936 +           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1937 +       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1938 +           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1939 +       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1940 +           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1941 +    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1942 +       echo m68k-unknown-lynxos${UNAME_RELEASE}
1943 +       exit ;;
1944 +    mc68030:UNIX_System_V:4.*:*)
1945 +       echo m68k-atari-sysv4
1946 +       exit ;;
1947 +    TSUNAMI:LynxOS:2.*:*)
1948 +       echo sparc-unknown-lynxos${UNAME_RELEASE}
1949 +       exit ;;
1950 +    rs6000:LynxOS:2.*:*)
1951 +       echo rs6000-unknown-lynxos${UNAME_RELEASE}
1952 +       exit ;;
1953 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1954 +       echo powerpc-unknown-lynxos${UNAME_RELEASE}
1955 +       exit ;;
1956 +    SM[BE]S:UNIX_SV:*:*)
1957 +       echo mips-dde-sysv${UNAME_RELEASE}
1958 +       exit ;;
1959 +    RM*:ReliantUNIX-*:*:*)
1960 +       echo mips-sni-sysv4
1961 +       exit ;;
1962 +    RM*:SINIX-*:*:*)
1963 +       echo mips-sni-sysv4
1964 +       exit ;;
1965 +    *:SINIX-*:*:*)
1966 +       if uname -p 2>/dev/null >/dev/null ; then
1967 +               UNAME_MACHINE=`(uname -p) 2>/dev/null`
1968 +               echo ${UNAME_MACHINE}-sni-sysv4
1969 +       else
1970 +               echo ns32k-sni-sysv
1971 +       fi
1972 +       exit ;;
1973 +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1974 +                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1975 +        echo i586-unisys-sysv4
1976 +        exit ;;
1977 +    *:UNIX_System_V:4*:FTX*)
1978 +       # From Gerald Hewes <hewes@openmarket.com>.
1979 +       # How about differentiating between stratus architectures? -djm
1980 +       echo hppa1.1-stratus-sysv4
1981 +       exit ;;
1982 +    *:*:*:FTX*)
1983 +       # From seanf@swdc.stratus.com.
1984 +       echo i860-stratus-sysv4
1985 +       exit ;;
1986 +    i*86:VOS:*:*)
1987 +       # From Paul.Green@stratus.com.
1988 +       echo ${UNAME_MACHINE}-stratus-vos
1989 +       exit ;;
1990 +    *:VOS:*:*)
1991 +       # From Paul.Green@stratus.com.
1992 +       echo hppa1.1-stratus-vos
1993 +       exit ;;
1994 +    mc68*:A/UX:*:*)
1995 +       echo m68k-apple-aux${UNAME_RELEASE}
1996 +       exit ;;
1997 +    news*:NEWS-OS:6*:*)
1998 +       echo mips-sony-newsos6
1999 +       exit ;;
2000 +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
2001 +       if [ -d /usr/nec ]; then
2002 +               echo mips-nec-sysv${UNAME_RELEASE}
2003 +       else
2004 +               echo mips-unknown-sysv${UNAME_RELEASE}
2005 +       fi
2006 +        exit ;;
2007 +    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
2008 +       echo powerpc-be-beos
2009 +       exit ;;
2010 +    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
2011 +       echo powerpc-apple-beos
2012 +       exit ;;
2013 +    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
2014 +       echo i586-pc-beos
2015 +       exit ;;
2016 +    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
2017 +       echo i586-pc-haiku
2018 +       exit ;;
2019 +    SX-4:SUPER-UX:*:*)
2020 +       echo sx4-nec-superux${UNAME_RELEASE}
2021 +       exit ;;
2022 +    SX-5:SUPER-UX:*:*)
2023 +       echo sx5-nec-superux${UNAME_RELEASE}
2024 +       exit ;;
2025 +    SX-6:SUPER-UX:*:*)
2026 +       echo sx6-nec-superux${UNAME_RELEASE}
2027 +       exit ;;
2028 +    SX-7:SUPER-UX:*:*)
2029 +       echo sx7-nec-superux${UNAME_RELEASE}
2030 +       exit ;;
2031 +    SX-8:SUPER-UX:*:*)
2032 +       echo sx8-nec-superux${UNAME_RELEASE}
2033 +       exit ;;
2034 +    SX-8R:SUPER-UX:*:*)
2035 +       echo sx8r-nec-superux${UNAME_RELEASE}
2036 +       exit ;;
2037 +    Power*:Rhapsody:*:*)
2038 +       echo powerpc-apple-rhapsody${UNAME_RELEASE}
2039 +       exit ;;
2040 +    *:Rhapsody:*:*)
2041 +       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
2042 +       exit ;;
2043 +    *:Darwin:*:*)
2044 +       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
2045 +       case $UNAME_PROCESSOR in
2046 +           i386)
2047 +               eval $set_cc_for_build
2048 +               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
2049 +                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
2050 +                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
2051 +                     grep IS_64BIT_ARCH >/dev/null
2052 +                 then
2053 +                     UNAME_PROCESSOR="x86_64"
2054 +                 fi
2055 +               fi ;;
2056 +           unknown) UNAME_PROCESSOR=powerpc ;;
2057 +       esac
2058 +       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
2059 +       exit ;;
2060 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
2061 +       UNAME_PROCESSOR=`uname -p`
2062 +       if test "$UNAME_PROCESSOR" = "x86"; then
2063 +               UNAME_PROCESSOR=i386
2064 +               UNAME_MACHINE=pc
2065 +       fi
2066 +       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
2067 +       exit ;;
2068 +    *:QNX:*:4*)
2069 +       echo i386-pc-qnx
2070 +       exit ;;
2071 +    NSE-?:NONSTOP_KERNEL:*:*)
2072 +       echo nse-tandem-nsk${UNAME_RELEASE}
2073 +       exit ;;
2074 +    NSR-?:NONSTOP_KERNEL:*:*)
2075 +       echo nsr-tandem-nsk${UNAME_RELEASE}
2076 +       exit ;;
2077 +    *:NonStop-UX:*:*)
2078 +       echo mips-compaq-nonstopux
2079 +       exit ;;
2080 +    BS2000:POSIX*:*:*)
2081 +       echo bs2000-siemens-sysv
2082 +       exit ;;
2083 +    DS/*:UNIX_System_V:*:*)
2084 +       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
2085 +       exit ;;
2086 +    *:Plan9:*:*)
2087 +       # "uname -m" is not consistent, so use $cputype instead. 386
2088 +       # is converted to i386 for consistency with other x86
2089 +       # operating systems.
2090 +       if test "$cputype" = "386"; then
2091 +           UNAME_MACHINE=i386
2092 +       else
2093 +           UNAME_MACHINE="$cputype"
2094 +       fi
2095 +       echo ${UNAME_MACHINE}-unknown-plan9
2096 +       exit ;;
2097 +    *:TOPS-10:*:*)
2098 +       echo pdp10-unknown-tops10
2099 +       exit ;;
2100 +    *:TENEX:*:*)
2101 +       echo pdp10-unknown-tenex
2102 +       exit ;;
2103 +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
2104 +       echo pdp10-dec-tops20
2105 +       exit ;;
2106 +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
2107 +       echo pdp10-xkl-tops20
2108 +       exit ;;
2109 +    *:TOPS-20:*:*)
2110 +       echo pdp10-unknown-tops20
2111 +       exit ;;
2112 +    *:ITS:*:*)
2113 +       echo pdp10-unknown-its
2114 +       exit ;;
2115 +    SEI:*:*:SEIUX)
2116 +        echo mips-sei-seiux${UNAME_RELEASE}
2117 +       exit ;;
2118 +    *:DragonFly:*:*)
2119 +       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
2120 +       exit ;;
2121 +    *:*VMS:*:*)
2122 +       UNAME_MACHINE=`(uname -p) 2>/dev/null`
2123 +       case "${UNAME_MACHINE}" in
2124 +           A*) echo alpha-dec-vms ; exit ;;
2125 +           I*) echo ia64-dec-vms ; exit ;;
2126 +           V*) echo vax-dec-vms ; exit ;;
2127 +       esac ;;
2128 +    *:XENIX:*:SysV)
2129 +       echo i386-pc-xenix
2130 +       exit ;;
2131 +    i*86:skyos:*:*)
2132 +       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
2133 +       exit ;;
2134 +    i*86:rdos:*:*)
2135 +       echo ${UNAME_MACHINE}-pc-rdos
2136 +       exit ;;
2137 +    i*86:AROS:*:*)
2138 +       echo ${UNAME_MACHINE}-pc-aros
2139 +       exit ;;
2140 +esac
2141 +
2142 +#echo '(No uname command or uname output not recognized.)' 1>&2
2143 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
2144 +
2145 +eval $set_cc_for_build
2146 +cat >$dummy.c <<EOF
2147 +#ifdef _SEQUENT_
2148 +# include <sys/types.h>
2149 +# include <sys/utsname.h>
2150 +#endif
2151 +main ()
2152 +{
2153 +#if defined (sony)
2154 +#if defined (MIPSEB)
2155 +  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
2156 +     I don't know....  */
2157 +  printf ("mips-sony-bsd\n"); exit (0);
2158 +#else
2159 +#include <sys/param.h>
2160 +  printf ("m68k-sony-newsos%s\n",
2161 +#ifdef NEWSOS4
2162 +          "4"
2163 +#else
2164 +         ""
2165 +#endif
2166 +         ); exit (0);
2167 +#endif
2168 +#endif
2169 +
2170 +#if defined (__arm) && defined (__acorn) && defined (__unix)
2171 +  printf ("arm-acorn-riscix\n"); exit (0);
2172 +#endif
2173 +
2174 +#if defined (hp300) && !defined (hpux)
2175 +  printf ("m68k-hp-bsd\n"); exit (0);
2176 +#endif
2177 +
2178 +#if defined (NeXT)
2179 +#if !defined (__ARCHITECTURE__)
2180 +#define __ARCHITECTURE__ "m68k"
2181 +#endif
2182 +  int version;
2183 +  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
2184 +  if (version < 4)
2185 +    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
2186 +  else
2187 +    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
2188 +  exit (0);
2189 +#endif
2190 +
2191 +#if defined (MULTIMAX) || defined (n16)
2192 +#if defined (UMAXV)
2193 +  printf ("ns32k-encore-sysv\n"); exit (0);
2194 +#else
2195 +#if defined (CMU)
2196 +  printf ("ns32k-encore-mach\n"); exit (0);
2197 +#else
2198 +  printf ("ns32k-encore-bsd\n"); exit (0);
2199 +#endif
2200 +#endif
2201 +#endif
2202 +
2203 +#if defined (__386BSD__)
2204 +  printf ("i386-pc-bsd\n"); exit (0);
2205 +#endif
2206 +
2207 +#if defined (sequent)
2208 +#if defined (i386)
2209 +  printf ("i386-sequent-dynix\n"); exit (0);
2210 +#endif
2211 +#if defined (ns32000)
2212 +  printf ("ns32k-sequent-dynix\n"); exit (0);
2213 +#endif
2214 +#endif
2215 +
2216 +#if defined (_SEQUENT_)
2217 +    struct utsname un;
2218 +
2219 +    uname(&un);
2220 +
2221 +    if (strncmp(un.version, "V2", 2) == 0) {
2222 +       printf ("i386-sequent-ptx2\n"); exit (0);
2223 +    }
2224 +    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
2225 +       printf ("i386-sequent-ptx1\n"); exit (0);
2226 +    }
2227 +    printf ("i386-sequent-ptx\n"); exit (0);
2228 +
2229 +#endif
2230 +
2231 +#if defined (vax)
2232 +# if !defined (ultrix)
2233 +#  include <sys/param.h>
2234 +#  if defined (BSD)
2235 +#   if BSD == 43
2236 +      printf ("vax-dec-bsd4.3\n"); exit (0);
2237 +#   else
2238 +#    if BSD == 199006
2239 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
2240 +#    else
2241 +      printf ("vax-dec-bsd\n"); exit (0);
2242 +#    endif
2243 +#   endif
2244 +#  else
2245 +    printf ("vax-dec-bsd\n"); exit (0);
2246 +#  endif
2247 +# else
2248 +    printf ("vax-dec-ultrix\n"); exit (0);
2249 +# endif
2250 +#endif
2251 +
2252 +#if defined (alliant) && defined (i860)
2253 +  printf ("i860-alliant-bsd\n"); exit (0);
2254 +#endif
2255 +
2256 +  exit (1);
2257 +}
2258 +EOF
2259 +
2260 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
2261 +       { echo "$SYSTEM_NAME"; exit; }
2262 +
2263 +# Apollos put the system type in the environment.
2264 +
2265 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
2266 +
2267 +# Convex versions that predate uname can use getsysinfo(1)
2268 +
2269 +if [ -x /usr/convex/getsysinfo ]
2270 +then
2271 +    case `getsysinfo -f cpu_type` in
2272 +    c1*)
2273 +       echo c1-convex-bsd
2274 +       exit ;;
2275 +    c2*)
2276 +       if getsysinfo -f scalar_acc
2277 +       then echo c32-convex-bsd
2278 +       else echo c2-convex-bsd
2279 +       fi
2280 +       exit ;;
2281 +    c34*)
2282 +       echo c34-convex-bsd
2283 +       exit ;;
2284 +    c38*)
2285 +       echo c38-convex-bsd
2286 +       exit ;;
2287 +    c4*)
2288 +       echo c4-convex-bsd
2289 +       exit ;;
2290 +    esac
2291 +fi
2292 +
2293 +cat >&2 <<EOF
2294 +$0: unable to guess system type
2295 +
2296 +This script, last modified $timestamp, has failed to recognize
2297 +the operating system you are using. It is advised that you
2298 +download the most up to date version of the config scripts from
2299 +
2300 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
2301 +and
2302 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
2303 +
2304 +If the version you run ($0) is already up to date, please
2305 +send the following data and any information you think might be
2306 +pertinent to <config-patches@gnu.org> in order to provide the needed
2307 +information to handle your system.
2308 +
2309 +config.guess timestamp = $timestamp
2310 +
2311 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
2312 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
2313 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
2314 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
2315 +
2316 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
2317 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
2318 +
2319 +hostinfo               = `(hostinfo) 2>/dev/null`
2320 +/bin/universe          = `(/bin/universe) 2>/dev/null`
2321 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
2322 +/bin/arch              = `(/bin/arch) 2>/dev/null`
2323 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
2324 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
2325 +
2326 +UNAME_MACHINE = ${UNAME_MACHINE}
2327 +UNAME_RELEASE = ${UNAME_RELEASE}
2328 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
2329 +UNAME_VERSION = ${UNAME_VERSION}
2330 +EOF
2331 +
2332 +exit 1
2333 +
2334 +# Local variables:
2335 +# eval: (add-hook 'write-file-hooks 'time-stamp)
2336 +# time-stamp-start: "timestamp='"
2337 +# time-stamp-format: "%:y-%02m-%02d"
2338 +# time-stamp-end: "'"
2339 +# End:
2340 Index: libffi/config.sub
2341 ===================================================================
2342 --- /dev/null
2343 +++ libffi/config.sub
2344 @@ -0,0 +1,1705 @@
2345 +#! /bin/sh
2346 +# Configuration validation subroutine script.
2347 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2348 +#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
2349 +#   Free Software Foundation, Inc.
2350 +
2351 +timestamp='2009-11-20'
2352 +
2353 +# This file is (in principle) common to ALL GNU software.
2354 +# The presence of a machine in this file suggests that SOME GNU software
2355 +# can handle that machine.  It does not imply ALL GNU software can.
2356 +#
2357 +# This file is free software; you can redistribute it and/or modify
2358 +# it under the terms of the GNU General Public License as published by
2359 +# the Free Software Foundation; either version 2 of the License, or
2360 +# (at your option) any later version.
2361 +#
2362 +# This program is distributed in the hope that it will be useful,
2363 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
2364 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2365 +# GNU General Public License for more details.
2366 +#
2367 +# You should have received a copy of the GNU General Public License
2368 +# along with this program; if not, write to the Free Software
2369 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2370 +# 02110-1301, USA.
2371 +#
2372 +# As a special exception to the GNU General Public License, if you
2373 +# distribute this file as part of a program that contains a
2374 +# configuration script generated by Autoconf, you may include it under
2375 +# the same distribution terms that you use for the rest of that program.
2376 +
2377 +
2378 +# Please send patches to <config-patches@gnu.org>.  Submit a context
2379 +# diff and a properly formatted GNU ChangeLog entry.
2380 +#
2381 +# Configuration subroutine to validate and canonicalize a configuration type.
2382 +# Supply the specified configuration type as an argument.
2383 +# If it is invalid, we print an error message on stderr and exit with code 1.
2384 +# Otherwise, we print the canonical config type on stdout and succeed.
2385 +
2386 +# You can get the latest version of this script from:
2387 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
2388 +
2389 +# This file is supposed to be the same for all GNU packages
2390 +# and recognize all the CPU types, system types and aliases
2391 +# that are meaningful with *any* GNU software.
2392 +# Each package is responsible for reporting which valid configurations
2393 +# it does not support.  The user should be able to distinguish
2394 +# a failure to support a valid configuration from a meaningless
2395 +# configuration.
2396 +
2397 +# The goal of this file is to map all the various variations of a given
2398 +# machine specification into a single specification in the form:
2399 +#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
2400 +# or in some cases, the newer four-part form:
2401 +#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
2402 +# It is wrong to echo any other type of specification.
2403 +
2404 +me=`echo "$0" | sed -e 's,.*/,,'`
2405 +
2406 +usage="\
2407 +Usage: $0 [OPTION] CPU-MFR-OPSYS
2408 +       $0 [OPTION] ALIAS
2409 +
2410 +Canonicalize a configuration name.
2411 +
2412 +Operation modes:
2413 +  -h, --help         print this help, then exit
2414 +  -t, --time-stamp   print date of last modification, then exit
2415 +  -v, --version      print version number, then exit
2416 +
2417 +Report bugs and patches to <config-patches@gnu.org>."
2418 +
2419 +version="\
2420 +GNU config.sub ($timestamp)
2421 +
2422 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2423 +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2424 +
2425 +This is free software; see the source for copying conditions.  There is NO
2426 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
2427 +
2428 +help="
2429 +Try \`$me --help' for more information."
2430 +
2431 +# Parse command line
2432 +while test $# -gt 0 ; do
2433 +  case $1 in
2434 +    --time-stamp | --time* | -t )
2435 +       echo "$timestamp" ; exit ;;
2436 +    --version | -v )
2437 +       echo "$version" ; exit ;;
2438 +    --help | --h* | -h )
2439 +       echo "$usage"; exit ;;
2440 +    -- )     # Stop option processing
2441 +       shift; break ;;
2442 +    - )        # Use stdin as input.
2443 +       break ;;
2444 +    -* )
2445 +       echo "$me: invalid option $1$help"
2446 +       exit 1 ;;
2447 +
2448 +    *local*)
2449 +       # First pass through any local machine types.
2450 +       echo $1
2451 +       exit ;;
2452 +
2453 +    * )
2454 +       break ;;
2455 +  esac
2456 +done
2457 +
2458 +case $# in
2459 + 0) echo "$me: missing argument$help" >&2
2460 +    exit 1;;
2461 + 1) ;;
2462 + *) echo "$me: too many arguments$help" >&2
2463 +    exit 1;;
2464 +esac
2465 +
2466 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
2467 +# Here we must recognize all the valid KERNEL-OS combinations.
2468 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
2469 +case $maybe_os in
2470 +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
2471 +  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
2472 +  kopensolaris*-gnu* | \
2473 +  storm-chaos* | os2-emx* | rtmk-nova*)
2474 +    os=-$maybe_os
2475 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
2476 +    ;;
2477 +  *)
2478 +    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
2479 +    if [ $basic_machine != $1 ]
2480 +    then os=`echo $1 | sed 's/.*-/-/'`
2481 +    else os=; fi
2482 +    ;;
2483 +esac
2484 +
2485 +### Let's recognize common machines as not being operating systems so
2486 +### that things like config.sub decstation-3100 work.  We also
2487 +### recognize some manufacturers as not being operating systems, so we
2488 +### can provide default operating systems below.
2489 +case $os in
2490 +       -sun*os*)
2491 +               # Prevent following clause from handling this invalid input.
2492 +               ;;
2493 +       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
2494 +       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
2495 +       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
2496 +       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
2497 +       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
2498 +       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
2499 +       -apple | -axis | -knuth | -cray | -microblaze)
2500 +               os=
2501 +               basic_machine=$1
2502 +               ;;
2503 +        -bluegene*)
2504 +               os=-cnk
2505 +               ;;
2506 +       -sim | -cisco | -oki | -wec | -winbond)
2507 +               os=
2508 +               basic_machine=$1
2509 +               ;;
2510 +       -scout)
2511 +               ;;
2512 +       -wrs)
2513 +               os=-vxworks
2514 +               basic_machine=$1
2515 +               ;;
2516 +       -chorusos*)
2517 +               os=-chorusos
2518 +               basic_machine=$1
2519 +               ;;
2520 +       -chorusrdb)
2521 +               os=-chorusrdb
2522 +               basic_machine=$1
2523 +               ;;
2524 +       -hiux*)
2525 +               os=-hiuxwe2
2526 +               ;;
2527 +       -sco6)
2528 +               os=-sco5v6
2529 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2530 +               ;;
2531 +       -sco5)
2532 +               os=-sco3.2v5
2533 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2534 +               ;;
2535 +       -sco4)
2536 +               os=-sco3.2v4
2537 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2538 +               ;;
2539 +       -sco3.2.[4-9]*)
2540 +               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
2541 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2542 +               ;;
2543 +       -sco3.2v[4-9]*)
2544 +               # Don't forget version if it is 3.2v4 or newer.
2545 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2546 +               ;;
2547 +       -sco5v6*)
2548 +               # Don't forget version if it is 3.2v4 or newer.
2549 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2550 +               ;;
2551 +       -sco*)
2552 +               os=-sco3.2v2
2553 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2554 +               ;;
2555 +       -udk*)
2556 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2557 +               ;;
2558 +       -isc)
2559 +               os=-isc2.2
2560 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2561 +               ;;
2562 +       -clix*)
2563 +               basic_machine=clipper-intergraph
2564 +               ;;
2565 +       -isc*)
2566 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2567 +               ;;
2568 +       -lynx*)
2569 +               os=-lynxos
2570 +               ;;
2571 +       -ptx*)
2572 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
2573 +               ;;
2574 +       -windowsnt*)
2575 +               os=`echo $os | sed -e 's/windowsnt/winnt/'`
2576 +               ;;
2577 +       -psos*)
2578 +               os=-psos
2579 +               ;;
2580 +       -mint | -mint[0-9]*)
2581 +               basic_machine=m68k-atari
2582 +               os=-mint
2583 +               ;;
2584 +esac
2585 +
2586 +# Decode aliases for certain CPU-COMPANY combinations.
2587 +case $basic_machine in
2588 +       # Recognize the basic CPU types without company name.
2589 +       # Some are omitted here because they have special meanings below.
2590 +       1750a | 580 \
2591 +       | a29k \
2592 +       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
2593 +       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
2594 +       | am33_2.0 \
2595 +       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
2596 +       | bfin \
2597 +       | c4x | clipper \
2598 +       | d10v | d30v | dlx | dsp16xx \
2599 +       | fido | fr30 | frv \
2600 +       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
2601 +       | i370 | i860 | i960 | ia64 \
2602 +       | ip2k | iq2000 \
2603 +       | lm32 \
2604 +       | m32c | m32r | m32rle | m68000 | m68k | m88k \
2605 +       | maxq | mb | microblaze | mcore | mep | metag \
2606 +       | mips | mipsbe | mipseb | mipsel | mipsle \
2607 +       | mips16 \
2608 +       | mips64 | mips64el \
2609 +       | mips64octeon | mips64octeonel \
2610 +       | mips64orion | mips64orionel \
2611 +       | mips64r5900 | mips64r5900el \
2612 +       | mips64vr | mips64vrel \
2613 +       | mips64vr4100 | mips64vr4100el \
2614 +       | mips64vr4300 | mips64vr4300el \
2615 +       | mips64vr5000 | mips64vr5000el \
2616 +       | mips64vr5900 | mips64vr5900el \
2617 +       | mipsisa32 | mipsisa32el \
2618 +       | mipsisa32r2 | mipsisa32r2el \
2619 +       | mipsisa64 | mipsisa64el \
2620 +       | mipsisa64r2 | mipsisa64r2el \
2621 +       | mipsisa64sb1 | mipsisa64sb1el \
2622 +       | mipsisa64sr71k | mipsisa64sr71kel \
2623 +       | mipstx39 | mipstx39el \
2624 +       | mn10200 | mn10300 \
2625 +       | moxie \
2626 +       | mt \
2627 +       | msp430 \
2628 +       | nios | nios2 \
2629 +       | ns16k | ns32k \
2630 +       | or32 \
2631 +       | pdp10 | pdp11 | pj | pjl \
2632 +       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
2633 +       | pyramid \
2634 +       | rx \
2635 +       | score \
2636 +       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
2637 +       | sh64 | sh64le \
2638 +       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
2639 +       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
2640 +       | spu | strongarm \
2641 +       | tahoe | thumb | tic4x | tic80 | tron \
2642 +       | ubicom32 \
2643 +       | v850 | v850e \
2644 +       | we32k \
2645 +       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
2646 +       | z8k | z80)
2647 +               basic_machine=$basic_machine-unknown
2648 +               ;;
2649 +       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
2650 +               # Motorola 68HC11/12.
2651 +               basic_machine=$basic_machine-unknown
2652 +               os=-none
2653 +               ;;
2654 +       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
2655 +               ;;
2656 +       ms1)
2657 +               basic_machine=mt-unknown
2658 +               ;;
2659 +
2660 +       # We use `pc' rather than `unknown'
2661 +       # because (1) that's what they normally are, and
2662 +       # (2) the word "unknown" tends to confuse beginning users.
2663 +       i*86 | x86_64)
2664 +         basic_machine=$basic_machine-pc
2665 +         ;;
2666 +       # Object if more than one company name word.
2667 +       *-*-*)
2668 +               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
2669 +               exit 1
2670 +               ;;
2671 +       # Recognize the basic CPU types with company name.
2672 +       580-* \
2673 +       | a29k-* \
2674 +       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
2675 +       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
2676 +       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
2677 +       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
2678 +       | avr-* | avr32-* \
2679 +       | bfin-* | bs2000-* \
2680 +       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
2681 +       | clipper-* | craynv-* | cydra-* \
2682 +       | d10v-* | d30v-* | dlx-* \
2683 +       | elxsi-* \
2684 +       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
2685 +       | h8300-* | h8500-* \
2686 +       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
2687 +       | i*86-* | i860-* | i960-* | ia64-* \
2688 +       | ip2k-* | iq2000-* \
2689 +       | lm32-* \
2690 +       | m32c-* | m32r-* | m32rle-* \
2691 +       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
2692 +       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
2693 +       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
2694 +       | mips16-* \
2695 +       | mips64-* | mips64el-* \
2696 +       | mips64octeon-* | mips64octeonel-* \
2697 +       | mips64orion-* | mips64orionel-* \
2698 +       | mips64r5900-* | mips64r5900el-* \
2699 +       | mips64vr-* | mips64vrel-* \
2700 +       | mips64vr4100-* | mips64vr4100el-* \
2701 +       | mips64vr4300-* | mips64vr4300el-* \
2702 +       | mips64vr5000-* | mips64vr5000el-* \
2703 +       | mips64vr5900-* | mips64vr5900el-* \
2704 +       | mipsisa32-* | mipsisa32el-* \
2705 +       | mipsisa32r2-* | mipsisa32r2el-* \
2706 +       | mipsisa64-* | mipsisa64el-* \
2707 +       | mipsisa64r2-* | mipsisa64r2el-* \
2708 +       | mipsisa64sb1-* | mipsisa64sb1el-* \
2709 +       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
2710 +       | mipstx39-* | mipstx39el-* \
2711 +       | mmix-* \
2712 +       | mt-* \
2713 +       | msp430-* \
2714 +       | nios-* | nios2-* \
2715 +       | none-* | np1-* | ns16k-* | ns32k-* \
2716 +       | orion-* \
2717 +       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
2718 +       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
2719 +       | pyramid-* \
2720 +       | romp-* | rs6000-* | rx-* \
2721 +       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
2722 +       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
2723 +       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
2724 +       | sparclite-* \
2725 +       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
2726 +       | tahoe-* | thumb-* \
2727 +       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
2728 +       | tron-* \
2729 +       | ubicom32-* \
2730 +       | v850-* | v850e-* | vax-* \
2731 +       | we32k-* \
2732 +       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
2733 +       | xstormy16-* | xtensa*-* \
2734 +       | ymp-* \
2735 +       | z8k-* | z80-*)
2736 +               ;;
2737 +       # Recognize the basic CPU types without company name, with glob match.
2738 +       xtensa*)
2739 +               basic_machine=$basic_machine-unknown
2740 +               ;;
2741 +       # Recognize the various machine names and aliases which stand
2742 +       # for a CPU type and a company and sometimes even an OS.
2743 +       386bsd)
2744 +               basic_machine=i386-unknown
2745 +               os=-bsd
2746 +               ;;
2747 +       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
2748 +               basic_machine=m68000-att
2749 +               ;;
2750 +       3b*)
2751 +               basic_machine=we32k-att
2752 +               ;;
2753 +       a29khif)
2754 +               basic_machine=a29k-amd
2755 +               os=-udi
2756 +               ;;
2757 +       abacus)
2758 +               basic_machine=abacus-unknown
2759 +               ;;
2760 +       adobe68k)
2761 +               basic_machine=m68010-adobe
2762 +               os=-scout
2763 +               ;;
2764 +       alliant | fx80)
2765 +               basic_machine=fx80-alliant
2766 +               ;;
2767 +       altos | altos3068)
2768 +               basic_machine=m68k-altos
2769 +               ;;
2770 +       am29k)
2771 +               basic_machine=a29k-none
2772 +               os=-bsd
2773 +               ;;
2774 +       amd64)
2775 +               basic_machine=x86_64-pc
2776 +               ;;
2777 +       amd64-*)
2778 +               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
2779 +               ;;
2780 +       amdahl)
2781 +               basic_machine=580-amdahl
2782 +               os=-sysv
2783 +               ;;
2784 +       amiga | amiga-*)
2785 +               basic_machine=m68k-unknown
2786 +               ;;
2787 +       amigaos | amigados)
2788 +               basic_machine=m68k-unknown
2789 +               os=-amigaos
2790 +               ;;
2791 +       amigaunix | amix)
2792 +               basic_machine=m68k-unknown
2793 +               os=-sysv4
2794 +               ;;
2795 +       apollo68)
2796 +               basic_machine=m68k-apollo
2797 +               os=-sysv
2798 +               ;;
2799 +       apollo68bsd)
2800 +               basic_machine=m68k-apollo
2801 +               os=-bsd
2802 +               ;;
2803 +       aros)
2804 +               basic_machine=i386-pc
2805 +               os=-aros
2806 +               ;;
2807 +       aux)
2808 +               basic_machine=m68k-apple
2809 +               os=-aux
2810 +               ;;
2811 +       balance)
2812 +               basic_machine=ns32k-sequent
2813 +               os=-dynix
2814 +               ;;
2815 +       blackfin)
2816 +               basic_machine=bfin-unknown
2817 +               os=-linux
2818 +               ;;
2819 +       blackfin-*)
2820 +               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
2821 +               os=-linux
2822 +               ;;
2823 +       bluegene*)
2824 +               basic_machine=powerpc-ibm
2825 +               os=-cnk
2826 +               ;;
2827 +       c90)
2828 +               basic_machine=c90-cray
2829 +               os=-unicos
2830 +               ;;
2831 +        cegcc)
2832 +               basic_machine=arm-unknown
2833 +               os=-cegcc
2834 +               ;;
2835 +       convex-c1)
2836 +               basic_machine=c1-convex
2837 +               os=-bsd
2838 +               ;;
2839 +       convex-c2)
2840 +               basic_machine=c2-convex
2841 +               os=-bsd
2842 +               ;;
2843 +       convex-c32)
2844 +               basic_machine=c32-convex
2845 +               os=-bsd
2846 +               ;;
2847 +       convex-c34)
2848 +               basic_machine=c34-convex
2849 +               os=-bsd
2850 +               ;;
2851 +       convex-c38)
2852 +               basic_machine=c38-convex
2853 +               os=-bsd
2854 +               ;;
2855 +       cray | j90)
2856 +               basic_machine=j90-cray
2857 +               os=-unicos
2858 +               ;;
2859 +       craynv)
2860 +               basic_machine=craynv-cray
2861 +               os=-unicosmp
2862 +               ;;
2863 +       cr16)
2864 +               basic_machine=cr16-unknown
2865 +               os=-elf
2866 +               ;;
2867 +       crds | unos)
2868 +               basic_machine=m68k-crds
2869 +               ;;
2870 +       crisv32 | crisv32-* | etraxfs*)
2871 +               basic_machine=crisv32-axis
2872 +               ;;
2873 +       cris | cris-* | etrax*)
2874 +               basic_machine=cris-axis
2875 +               ;;
2876 +       crx)
2877 +               basic_machine=crx-unknown
2878 +               os=-elf
2879 +               ;;
2880 +       da30 | da30-*)
2881 +               basic_machine=m68k-da30
2882 +               ;;
2883 +       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
2884 +               basic_machine=mips-dec
2885 +               ;;
2886 +       decsystem10* | dec10*)
2887 +               basic_machine=pdp10-dec
2888 +               os=-tops10
2889 +               ;;
2890 +       decsystem20* | dec20*)
2891 +               basic_machine=pdp10-dec
2892 +               os=-tops20
2893 +               ;;
2894 +       delta | 3300 | motorola-3300 | motorola-delta \
2895 +             | 3300-motorola | delta-motorola)
2896 +               basic_machine=m68k-motorola
2897 +               ;;
2898 +       delta88)
2899 +               basic_machine=m88k-motorola
2900 +               os=-sysv3
2901 +               ;;
2902 +       dicos)
2903 +               basic_machine=i686-pc
2904 +               os=-dicos
2905 +               ;;
2906 +       djgpp)
2907 +               basic_machine=i586-pc
2908 +               os=-msdosdjgpp
2909 +               ;;
2910 +       dpx20 | dpx20-*)
2911 +               basic_machine=rs6000-bull
2912 +               os=-bosx
2913 +               ;;
2914 +       dpx2* | dpx2*-bull)
2915 +               basic_machine=m68k-bull
2916 +               os=-sysv3
2917 +               ;;
2918 +       ebmon29k)
2919 +               basic_machine=a29k-amd
2920 +               os=-ebmon
2921 +               ;;
2922 +       elxsi)
2923 +               basic_machine=elxsi-elxsi
2924 +               os=-bsd
2925 +               ;;
2926 +       encore | umax | mmax)
2927 +               basic_machine=ns32k-encore
2928 +               ;;
2929 +       es1800 | OSE68k | ose68k | ose | OSE)
2930 +               basic_machine=m68k-ericsson
2931 +               os=-ose
2932 +               ;;
2933 +       fx2800)
2934 +               basic_machine=i860-alliant
2935 +               ;;
2936 +       genix)
2937 +               basic_machine=ns32k-ns
2938 +               ;;
2939 +       gmicro)
2940 +               basic_machine=tron-gmicro
2941 +               os=-sysv
2942 +               ;;
2943 +       go32)
2944 +               basic_machine=i386-pc
2945 +               os=-go32
2946 +               ;;
2947 +       h3050r* | hiux*)
2948 +               basic_machine=hppa1.1-hitachi
2949 +               os=-hiuxwe2
2950 +               ;;
2951 +       h8300hms)
2952 +               basic_machine=h8300-hitachi
2953 +               os=-hms
2954 +               ;;
2955 +       h8300xray)
2956 +               basic_machine=h8300-hitachi
2957 +               os=-xray
2958 +               ;;
2959 +       h8500hms)
2960 +               basic_machine=h8500-hitachi
2961 +               os=-hms
2962 +               ;;
2963 +       harris)
2964 +               basic_machine=m88k-harris
2965 +               os=-sysv3
2966 +               ;;
2967 +       hp300-*)
2968 +               basic_machine=m68k-hp
2969 +               ;;
2970 +       hp300bsd)
2971 +               basic_machine=m68k-hp
2972 +               os=-bsd
2973 +               ;;
2974 +       hp300hpux)
2975 +               basic_machine=m68k-hp
2976 +               os=-hpux
2977 +               ;;
2978 +       hp3k9[0-9][0-9] | hp9[0-9][0-9])
2979 +               basic_machine=hppa1.0-hp
2980 +               ;;
2981 +       hp9k2[0-9][0-9] | hp9k31[0-9])
2982 +               basic_machine=m68000-hp
2983 +               ;;
2984 +       hp9k3[2-9][0-9])
2985 +               basic_machine=m68k-hp
2986 +               ;;
2987 +       hp9k6[0-9][0-9] | hp6[0-9][0-9])
2988 +               basic_machine=hppa1.0-hp
2989 +               ;;
2990 +       hp9k7[0-79][0-9] | hp7[0-79][0-9])
2991 +               basic_machine=hppa1.1-hp
2992 +               ;;
2993 +       hp9k78[0-9] | hp78[0-9])
2994 +               # FIXME: really hppa2.0-hp
2995 +               basic_machine=hppa1.1-hp
2996 +               ;;
2997 +       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
2998 +               # FIXME: really hppa2.0-hp
2999 +               basic_machine=hppa1.1-hp
3000 +               ;;
3001 +       hp9k8[0-9][13679] | hp8[0-9][13679])
3002 +               basic_machine=hppa1.1-hp
3003 +               ;;
3004 +       hp9k8[0-9][0-9] | hp8[0-9][0-9])
3005 +               basic_machine=hppa1.0-hp
3006 +               ;;
3007 +       hppa-next)
3008 +               os=-nextstep3
3009 +               ;;
3010 +       hppaosf)
3011 +               basic_machine=hppa1.1-hp
3012 +               os=-osf
3013 +               ;;
3014 +       hppro)
3015 +               basic_machine=hppa1.1-hp
3016 +               os=-proelf
3017 +               ;;
3018 +       i370-ibm* | ibm*)
3019 +               basic_machine=i370-ibm
3020 +               ;;
3021 +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
3022 +       i*86v32)
3023 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
3024 +               os=-sysv32
3025 +               ;;
3026 +       i*86v4*)
3027 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
3028 +               os=-sysv4
3029 +               ;;
3030 +       i*86v)
3031 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
3032 +               os=-sysv
3033 +               ;;
3034 +       i*86sol2)
3035 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
3036 +               os=-solaris2
3037 +               ;;
3038 +       i386mach)
3039 +               basic_machine=i386-mach
3040 +               os=-mach
3041 +               ;;
3042 +       i386-vsta | vsta)
3043 +               basic_machine=i386-unknown
3044 +               os=-vsta
3045 +               ;;
3046 +       iris | iris4d)
3047 +               basic_machine=mips-sgi
3048 +               case $os in
3049 +                   -irix*)
3050 +                       ;;
3051 +                   *)
3052 +                       os=-irix4
3053 +                       ;;
3054 +               esac
3055 +               ;;
3056 +       isi68 | isi)
3057 +               basic_machine=m68k-isi
3058 +               os=-sysv
3059 +               ;;
3060 +       m68knommu)
3061 +               basic_machine=m68k-unknown
3062 +               os=-linux
3063 +               ;;
3064 +       m68knommu-*)
3065 +               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
3066 +               os=-linux
3067 +               ;;
3068 +       m88k-omron*)
3069 +               basic_machine=m88k-omron
3070 +               ;;
3071 +       magnum | m3230)
3072 +               basic_machine=mips-mips
3073 +               os=-sysv
3074 +               ;;
3075 +       merlin)
3076 +               basic_machine=ns32k-utek
3077 +               os=-sysv
3078 +               ;;
3079 +        microblaze)
3080 +               basic_machine=microblaze-xilinx
3081 +               ;;
3082 +       mingw32)
3083 +               basic_machine=i386-pc
3084 +               os=-mingw32
3085 +               ;;
3086 +       mingw32ce)
3087 +               basic_machine=arm-unknown
3088 +               os=-mingw32ce
3089 +               ;;
3090 +       miniframe)
3091 +               basic_machine=m68000-convergent
3092 +               ;;
3093 +       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
3094 +               basic_machine=m68k-atari
3095 +               os=-mint
3096 +               ;;
3097 +       mips3*-*)
3098 +               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
3099 +               ;;
3100 +       mips3*)
3101 +               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
3102 +               ;;
3103 +       monitor)
3104 +               basic_machine=m68k-rom68k
3105 +               os=-coff
3106 +               ;;
3107 +       morphos)
3108 +               basic_machine=powerpc-unknown
3109 +               os=-morphos
3110 +               ;;
3111 +       msdos)
3112 +               basic_machine=i386-pc
3113 +               os=-msdos
3114 +               ;;
3115 +       ms1-*)
3116 +               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
3117 +               ;;
3118 +       mvs)
3119 +               basic_machine=i370-ibm
3120 +               os=-mvs
3121 +               ;;
3122 +       ncr3000)
3123 +               basic_machine=i486-ncr
3124 +               os=-sysv4
3125 +               ;;
3126 +       netbsd386)
3127 +               basic_machine=i386-unknown
3128 +               os=-netbsd
3129 +               ;;
3130 +       netwinder)
3131 +               basic_machine=armv4l-rebel
3132 +               os=-linux
3133 +               ;;
3134 +       news | news700 | news800 | news900)
3135 +               basic_machine=m68k-sony
3136 +               os=-newsos
3137 +               ;;
3138 +       news1000)
3139 +               basic_machine=m68030-sony
3140 +               os=-newsos
3141 +               ;;
3142 +       news-3600 | risc-news)
3143 +               basic_machine=mips-sony
3144 +               os=-newsos
3145 +               ;;
3146 +       necv70)
3147 +               basic_machine=v70-nec
3148 +               os=-sysv
3149 +               ;;
3150 +       next | m*-next )
3151 +               basic_machine=m68k-next
3152 +               case $os in
3153 +                   -nextstep* )
3154 +                       ;;
3155 +                   -ns2*)
3156 +                     os=-nextstep2
3157 +                       ;;
3158 +                   *)
3159 +                     os=-nextstep3
3160 +                       ;;
3161 +               esac
3162 +               ;;
3163 +       nh3000)
3164 +               basic_machine=m68k-harris
3165 +               os=-cxux
3166 +               ;;
3167 +       nh[45]000)
3168 +               basic_machine=m88k-harris
3169 +               os=-cxux
3170 +               ;;
3171 +       nindy960)
3172 +               basic_machine=i960-intel
3173 +               os=-nindy
3174 +               ;;
3175 +       mon960)
3176 +               basic_machine=i960-intel
3177 +               os=-mon960
3178 +               ;;
3179 +       nonstopux)
3180 +               basic_machine=mips-compaq
3181 +               os=-nonstopux
3182 +               ;;
3183 +       np1)
3184 +               basic_machine=np1-gould
3185 +               ;;
3186 +       nsr-tandem)
3187 +               basic_machine=nsr-tandem
3188 +               ;;
3189 +       op50n-* | op60c-*)
3190 +               basic_machine=hppa1.1-oki
3191 +               os=-proelf
3192 +               ;;
3193 +       openrisc | openrisc-*)
3194 +               basic_machine=or32-unknown
3195 +               ;;
3196 +       os400)
3197 +               basic_machine=powerpc-ibm
3198 +               os=-os400
3199 +               ;;
3200 +       OSE68000 | ose68000)
3201 +               basic_machine=m68000-ericsson
3202 +               os=-ose
3203 +               ;;
3204 +       os68k)
3205 +               basic_machine=m68k-none
3206 +               os=-os68k
3207 +               ;;
3208 +       pa-hitachi)
3209 +               basic_machine=hppa1.1-hitachi
3210 +               os=-hiuxwe2
3211 +               ;;
3212 +       paragon)
3213 +               basic_machine=i860-intel
3214 +               os=-osf
3215 +               ;;
3216 +       parisc)
3217 +               basic_machine=hppa-unknown
3218 +               os=-linux
3219 +               ;;
3220 +       parisc-*)
3221 +               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
3222 +               os=-linux
3223 +               ;;
3224 +       pbd)
3225 +               basic_machine=sparc-tti
3226 +               ;;
3227 +       pbb)
3228 +               basic_machine=m68k-tti
3229 +               ;;
3230 +       pc532 | pc532-*)
3231 +               basic_machine=ns32k-pc532
3232 +               ;;
3233 +       pc98)
3234 +               basic_machine=i386-pc
3235 +               ;;
3236 +       pc98-*)
3237 +               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
3238 +               ;;
3239 +       pentium | p5 | k5 | k6 | nexgen | viac3)
3240 +               basic_machine=i586-pc
3241 +               ;;
3242 +       pentiumpro | p6 | 6x86 | athlon | athlon_*)
3243 +               basic_machine=i686-pc
3244 +               ;;
3245 +       pentiumii | pentium2 | pentiumiii | pentium3)
3246 +               basic_machine=i686-pc
3247 +               ;;
3248 +       pentium4)
3249 +               basic_machine=i786-pc
3250 +               ;;
3251 +       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
3252 +               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
3253 +               ;;
3254 +       pentiumpro-* | p6-* | 6x86-* | athlon-*)
3255 +               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
3256 +               ;;
3257 +       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
3258 +               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
3259 +               ;;
3260 +       pentium4-*)
3261 +               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
3262 +               ;;
3263 +       pn)
3264 +               basic_machine=pn-gould
3265 +               ;;
3266 +       power)  basic_machine=power-ibm
3267 +               ;;
3268 +       ppc)    basic_machine=powerpc-unknown
3269 +               ;;
3270 +       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
3271 +               ;;
3272 +       ppcle | powerpclittle | ppc-le | powerpc-little)
3273 +               basic_machine=powerpcle-unknown
3274 +               ;;
3275 +       ppcle-* | powerpclittle-*)
3276 +               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
3277 +               ;;
3278 +       ppc64)  basic_machine=powerpc64-unknown
3279 +               ;;
3280 +       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
3281 +               ;;
3282 +       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
3283 +               basic_machine=powerpc64le-unknown
3284 +               ;;
3285 +       ppc64le-* | powerpc64little-*)
3286 +               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
3287 +               ;;
3288 +       ps2)
3289 +               basic_machine=i386-ibm
3290 +               ;;
3291 +       pw32)
3292 +               basic_machine=i586-unknown
3293 +               os=-pw32
3294 +               ;;
3295 +       rdos)
3296 +               basic_machine=i386-pc
3297 +               os=-rdos
3298 +               ;;
3299 +       rom68k)
3300 +               basic_machine=m68k-rom68k
3301 +               os=-coff
3302 +               ;;
3303 +       rm[46]00)
3304 +               basic_machine=mips-siemens
3305 +               ;;
3306 +       rtpc | rtpc-*)
3307 +               basic_machine=romp-ibm
3308 +               ;;
3309 +       s390 | s390-*)
3310 +               basic_machine=s390-ibm
3311 +               ;;
3312 +       s390x | s390x-*)
3313 +               basic_machine=s390x-ibm
3314 +               ;;
3315 +       sa29200)
3316 +               basic_machine=a29k-amd
3317 +               os=-udi
3318 +               ;;
3319 +       sb1)
3320 +               basic_machine=mipsisa64sb1-unknown
3321 +               ;;
3322 +       sb1el)
3323 +               basic_machine=mipsisa64sb1el-unknown
3324 +               ;;
3325 +       sde)
3326 +               basic_machine=mipsisa32-sde
3327 +               os=-elf
3328 +               ;;
3329 +       sei)
3330 +               basic_machine=mips-sei
3331 +               os=-seiux
3332 +               ;;
3333 +       sequent)
3334 +               basic_machine=i386-sequent
3335 +               ;;
3336 +       sh)
3337 +               basic_machine=sh-hitachi
3338 +               os=-hms
3339 +               ;;
3340 +       sh5el)
3341 +               basic_machine=sh5le-unknown
3342 +               ;;
3343 +       sh64)
3344 +               basic_machine=sh64-unknown
3345 +               ;;
3346 +       sparclite-wrs | simso-wrs)
3347 +               basic_machine=sparclite-wrs
3348 +               os=-vxworks
3349 +               ;;
3350 +       sps7)
3351 +               basic_machine=m68k-bull
3352 +               os=-sysv2
3353 +               ;;
3354 +       spur)
3355 +               basic_machine=spur-unknown
3356 +               ;;
3357 +       st2000)
3358 +               basic_machine=m68k-tandem
3359 +               ;;
3360 +       stratus)
3361 +               basic_machine=i860-stratus
3362 +               os=-sysv4
3363 +               ;;
3364 +       sun2)
3365 +               basic_machine=m68000-sun
3366 +               ;;
3367 +       sun2os3)
3368 +               basic_machine=m68000-sun
3369 +               os=-sunos3
3370 +               ;;
3371 +       sun2os4)
3372 +               basic_machine=m68000-sun
3373 +               os=-sunos4
3374 +               ;;
3375 +       sun3os3)
3376 +               basic_machine=m68k-sun
3377 +               os=-sunos3
3378 +               ;;
3379 +       sun3os4)
3380 +               basic_machine=m68k-sun
3381 +               os=-sunos4
3382 +               ;;
3383 +       sun4os3)
3384 +               basic_machine=sparc-sun
3385 +               os=-sunos3
3386 +               ;;
3387 +       sun4os4)
3388 +               basic_machine=sparc-sun
3389 +               os=-sunos4
3390 +               ;;
3391 +       sun4sol2)
3392 +               basic_machine=sparc-sun
3393 +               os=-solaris2
3394 +               ;;
3395 +       sun3 | sun3-*)
3396 +               basic_machine=m68k-sun
3397 +               ;;
3398 +       sun4)
3399 +               basic_machine=sparc-sun
3400 +               ;;
3401 +       sun386 | sun386i | roadrunner)
3402 +               basic_machine=i386-sun
3403 +               ;;
3404 +       sv1)
3405 +               basic_machine=sv1-cray
3406 +               os=-unicos
3407 +               ;;
3408 +       symmetry)
3409 +               basic_machine=i386-sequent
3410 +               os=-dynix
3411 +               ;;
3412 +       t3e)
3413 +               basic_machine=alphaev5-cray
3414 +               os=-unicos
3415 +               ;;
3416 +       t90)
3417 +               basic_machine=t90-cray
3418 +               os=-unicos
3419 +               ;;
3420 +       tic54x | c54x*)
3421 +               basic_machine=tic54x-unknown
3422 +               os=-coff
3423 +               ;;
3424 +       tic55x | c55x*)
3425 +               basic_machine=tic55x-unknown
3426 +               os=-coff
3427 +               ;;
3428 +       tic6x | c6x*)
3429 +               basic_machine=tic6x-unknown
3430 +               os=-coff
3431 +               ;;
3432 +       tile*)
3433 +               basic_machine=tile-unknown
3434 +               os=-linux-gnu
3435 +               ;;
3436 +       tx39)
3437 +               basic_machine=mipstx39-unknown
3438 +               ;;
3439 +       tx39el)
3440 +               basic_machine=mipstx39el-unknown
3441 +               ;;
3442 +       toad1)
3443 +               basic_machine=pdp10-xkl
3444 +               os=-tops20
3445 +               ;;
3446 +       tower | tower-32)
3447 +               basic_machine=m68k-ncr
3448 +               ;;
3449 +       tpf)
3450 +               basic_machine=s390x-ibm
3451 +               os=-tpf
3452 +               ;;
3453 +       udi29k)
3454 +               basic_machine=a29k-amd
3455 +               os=-udi
3456 +               ;;
3457 +       ultra3)
3458 +               basic_machine=a29k-nyu
3459 +               os=-sym1
3460 +               ;;
3461 +       v810 | necv810)
3462 +               basic_machine=v810-nec
3463 +               os=-none
3464 +               ;;
3465 +       vaxv)
3466 +               basic_machine=vax-dec
3467 +               os=-sysv
3468 +               ;;
3469 +       vms)
3470 +               basic_machine=vax-dec
3471 +               os=-vms
3472 +               ;;
3473 +       vpp*|vx|vx-*)
3474 +               basic_machine=f301-fujitsu
3475 +               ;;
3476 +       vxworks960)
3477 +               basic_machine=i960-wrs
3478 +               os=-vxworks
3479 +               ;;
3480 +       vxworks68)
3481 +               basic_machine=m68k-wrs
3482 +               os=-vxworks
3483 +               ;;
3484 +       vxworks29k)
3485 +               basic_machine=a29k-wrs
3486 +               os=-vxworks
3487 +               ;;
3488 +       w65*)
3489 +               basic_machine=w65-wdc
3490 +               os=-none
3491 +               ;;
3492 +       w89k-*)
3493 +               basic_machine=hppa1.1-winbond
3494 +               os=-proelf
3495 +               ;;
3496 +       xbox)
3497 +               basic_machine=i686-pc
3498 +               os=-mingw32
3499 +               ;;
3500 +       xps | xps100)
3501 +               basic_machine=xps100-honeywell
3502 +               ;;
3503 +       ymp)
3504 +               basic_machine=ymp-cray
3505 +               os=-unicos
3506 +               ;;
3507 +       z8k-*-coff)
3508 +               basic_machine=z8k-unknown
3509 +               os=-sim
3510 +               ;;
3511 +       z80-*-coff)
3512 +               basic_machine=z80-unknown
3513 +               os=-sim
3514 +               ;;
3515 +       none)
3516 +               basic_machine=none-none
3517 +               os=-none
3518 +               ;;
3519 +
3520 +# Here we handle the default manufacturer of certain CPU types.  It is in
3521 +# some cases the only manufacturer, in others, it is the most popular.
3522 +       w89k)
3523 +               basic_machine=hppa1.1-winbond
3524 +               ;;
3525 +       op50n)
3526 +               basic_machine=hppa1.1-oki
3527 +               ;;
3528 +       op60c)
3529 +               basic_machine=hppa1.1-oki
3530 +               ;;
3531 +       romp)
3532 +               basic_machine=romp-ibm
3533 +               ;;
3534 +       mmix)
3535 +               basic_machine=mmix-knuth
3536 +               ;;
3537 +       rs6000)
3538 +               basic_machine=rs6000-ibm
3539 +               ;;
3540 +       vax)
3541 +               basic_machine=vax-dec
3542 +               ;;
3543 +       pdp10)
3544 +               # there are many clones, so DEC is not a safe bet
3545 +               basic_machine=pdp10-unknown
3546 +               ;;
3547 +       pdp11)
3548 +               basic_machine=pdp11-dec
3549 +               ;;
3550 +       we32k)
3551 +               basic_machine=we32k-att
3552 +               ;;
3553 +       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
3554 +               basic_machine=sh-unknown
3555 +               ;;
3556 +       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
3557 +               basic_machine=sparc-sun
3558 +               ;;
3559 +       cydra)
3560 +               basic_machine=cydra-cydrome
3561 +               ;;
3562 +       orion)
3563 +               basic_machine=orion-highlevel
3564 +               ;;
3565 +       orion105)
3566 +               basic_machine=clipper-highlevel
3567 +               ;;
3568 +       mac | mpw | mac-mpw)
3569 +               basic_machine=m68k-apple
3570 +               ;;
3571 +       pmac | pmac-mpw)
3572 +               basic_machine=powerpc-apple
3573 +               ;;
3574 +       *-unknown)
3575 +               # Make sure to match an already-canonicalized machine name.
3576 +               ;;
3577 +       *)
3578 +               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
3579 +               exit 1
3580 +               ;;
3581 +esac
3582 +
3583 +# Here we canonicalize certain aliases for manufacturers.
3584 +case $basic_machine in
3585 +       *-digital*)
3586 +               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
3587 +               ;;
3588 +       *-commodore*)
3589 +               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
3590 +               ;;
3591 +       *)
3592 +               ;;
3593 +esac
3594 +
3595 +# Decode manufacturer-specific aliases for certain operating systems.
3596 +
3597 +if [ x"$os" != x"" ]
3598 +then
3599 +case $os in
3600 +        # First match some system type aliases
3601 +        # that might get confused with valid system types.
3602 +       # -solaris* is a basic system type, with this one exception.
3603 +        -auroraux)
3604 +               os=-auroraux
3605 +               ;;
3606 +       -solaris1 | -solaris1.*)
3607 +               os=`echo $os | sed -e 's|solaris1|sunos4|'`
3608 +               ;;
3609 +       -solaris)
3610 +               os=-solaris2
3611 +               ;;
3612 +       -svr4*)
3613 +               os=-sysv4
3614 +               ;;
3615 +       -unixware*)
3616 +               os=-sysv4.2uw
3617 +               ;;
3618 +       -gnu/linux*)
3619 +               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
3620 +               ;;
3621 +       # First accept the basic system types.
3622 +       # The portable systems comes first.
3623 +       # Each alternative MUST END IN A *, to match a version number.
3624 +       # -sysv* is not here because it comes later, after sysvr4.
3625 +       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
3626 +             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
3627 +             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
3628 +             | -sym* | -kopensolaris* \
3629 +             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
3630 +             | -aos* | -aros* \
3631 +             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
3632 +             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
3633 +             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
3634 +             | -openbsd* | -solidbsd* \
3635 +             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
3636 +             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
3637 +             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
3638 +             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
3639 +             | -chorusos* | -chorusrdb* | -cegcc* \
3640 +             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
3641 +             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
3642 +             | -uxpv* | -beos* | -mpeix* | -udk* \
3643 +             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
3644 +             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
3645 +             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
3646 +             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
3647 +             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
3648 +             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
3649 +             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
3650 +       # Remember, each alternative MUST END IN *, to match a version number.
3651 +               ;;
3652 +       -qnx*)
3653 +               case $basic_machine in
3654 +                   x86-* | i*86-*)
3655 +                       ;;
3656 +                   *)
3657 +                       os=-nto$os
3658 +                       ;;
3659 +               esac
3660 +               ;;
3661 +       -nto-qnx*)
3662 +               ;;
3663 +       -nto*)
3664 +               os=`echo $os | sed -e 's|nto|nto-qnx|'`
3665 +               ;;
3666 +       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
3667 +             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
3668 +             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
3669 +               ;;
3670 +       -mac*)
3671 +               os=`echo $os | sed -e 's|mac|macos|'`
3672 +               ;;
3673 +       -linux-dietlibc)
3674 +               os=-linux-dietlibc
3675 +               ;;
3676 +       -linux*)
3677 +               os=`echo $os | sed -e 's|linux|linux-gnu|'`
3678 +               ;;
3679 +       -sunos5*)
3680 +               os=`echo $os | sed -e 's|sunos5|solaris2|'`
3681 +               ;;
3682 +       -sunos6*)
3683 +               os=`echo $os | sed -e 's|sunos6|solaris3|'`
3684 +               ;;
3685 +       -opened*)
3686 +               os=-openedition
3687 +               ;;
3688 +        -os400*)
3689 +               os=-os400
3690 +               ;;
3691 +       -wince*)
3692 +               os=-wince
3693 +               ;;
3694 +       -osfrose*)
3695 +               os=-osfrose
3696 +               ;;
3697 +       -osf*)
3698 +               os=-osf
3699 +               ;;
3700 +       -utek*)
3701 +               os=-bsd
3702 +               ;;
3703 +       -dynix*)
3704 +               os=-bsd
3705 +               ;;
3706 +       -acis*)
3707 +               os=-aos
3708 +               ;;
3709 +       -atheos*)
3710 +               os=-atheos
3711 +               ;;
3712 +       -syllable*)
3713 +               os=-syllable
3714 +               ;;
3715 +       -386bsd)
3716 +               os=-bsd
3717 +               ;;
3718 +       -ctix* | -uts*)
3719 +               os=-sysv
3720 +               ;;
3721 +       -nova*)
3722 +               os=-rtmk-nova
3723 +               ;;
3724 +       -ns2 )
3725 +               os=-nextstep2
3726 +               ;;
3727 +       -nsk*)
3728 +               os=-nsk
3729 +               ;;
3730 +       # Preserve the version number of sinix5.
3731 +       -sinix5.*)
3732 +               os=`echo $os | sed -e 's|sinix|sysv|'`
3733 +               ;;
3734 +       -sinix*)
3735 +               os=-sysv4
3736 +               ;;
3737 +        -tpf*)
3738 +               os=-tpf
3739 +               ;;
3740 +       -triton*)
3741 +               os=-sysv3
3742 +               ;;
3743 +       -oss*)
3744 +               os=-sysv3
3745 +               ;;
3746 +       -svr4)
3747 +               os=-sysv4
3748 +               ;;
3749 +       -svr3)
3750 +               os=-sysv3
3751 +               ;;
3752 +       -sysvr4)
3753 +               os=-sysv4
3754 +               ;;
3755 +       # This must come after -sysvr4.
3756 +       -sysv*)
3757 +               ;;
3758 +       -ose*)
3759 +               os=-ose
3760 +               ;;
3761 +       -es1800*)
3762 +               os=-ose
3763 +               ;;
3764 +       -xenix)
3765 +               os=-xenix
3766 +               ;;
3767 +       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
3768 +               os=-mint
3769 +               ;;
3770 +       -aros*)
3771 +               os=-aros
3772 +               ;;
3773 +       -kaos*)
3774 +               os=-kaos
3775 +               ;;
3776 +       -zvmoe)
3777 +               os=-zvmoe
3778 +               ;;
3779 +       -dicos*)
3780 +               os=-dicos
3781 +               ;;
3782 +       -none)
3783 +               ;;
3784 +       *)
3785 +               # Get rid of the `-' at the beginning of $os.
3786 +               os=`echo $os | sed 's/[^-]*-//'`
3787 +               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
3788 +               exit 1
3789 +               ;;
3790 +esac
3791 +else
3792 +
3793 +# Here we handle the default operating systems that come with various machines.
3794 +# The value should be what the vendor currently ships out the door with their
3795 +# machine or put another way, the most popular os provided with the machine.
3796 +
3797 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
3798 +# "-sun"), then you have to tell the case statement up towards the top
3799 +# that MANUFACTURER isn't an operating system.  Otherwise, code above
3800 +# will signal an error saying that MANUFACTURER isn't an operating
3801 +# system, and we'll never get to this point.
3802 +
3803 +case $basic_machine in
3804 +        score-*)
3805 +               os=-elf
3806 +               ;;
3807 +        spu-*)
3808 +               os=-elf
3809 +               ;;
3810 +       *-acorn)
3811 +               os=-riscix1.2
3812 +               ;;
3813 +       arm*-rebel)
3814 +               os=-linux
3815 +               ;;
3816 +       arm*-semi)
3817 +               os=-aout
3818 +               ;;
3819 +        c4x-* | tic4x-*)
3820 +               os=-coff
3821 +               ;;
3822 +       # This must come before the *-dec entry.
3823 +       pdp10-*)
3824 +               os=-tops20
3825 +               ;;
3826 +       pdp11-*)
3827 +               os=-none
3828 +               ;;
3829 +       *-dec | vax-*)
3830 +               os=-ultrix4.2
3831 +               ;;
3832 +       m68*-apollo)
3833 +               os=-domain
3834 +               ;;
3835 +       i386-sun)
3836 +               os=-sunos4.0.2
3837 +               ;;
3838 +       m68000-sun)
3839 +               os=-sunos3
3840 +               # This also exists in the configure program, but was not the
3841 +               # default.
3842 +               # os=-sunos4
3843 +               ;;
3844 +       m68*-cisco)
3845 +               os=-aout
3846 +               ;;
3847 +        mep-*)
3848 +               os=-elf
3849 +               ;;
3850 +       mips*-cisco)
3851 +               os=-elf
3852 +               ;;
3853 +       mips*-*)
3854 +               os=-elf
3855 +               ;;
3856 +       or32-*)
3857 +               os=-coff
3858 +               ;;
3859 +       *-tti)  # must be before sparc entry or we get the wrong os.
3860 +               os=-sysv3
3861 +               ;;
3862 +       sparc-* | *-sun)
3863 +               os=-sunos4.1.1
3864 +               ;;
3865 +       *-be)
3866 +               os=-beos
3867 +               ;;
3868 +       *-haiku)
3869 +               os=-haiku
3870 +               ;;
3871 +       *-ibm)
3872 +               os=-aix
3873 +               ;;
3874 +       *-knuth)
3875 +               os=-mmixware
3876 +               ;;
3877 +       *-wec)
3878 +               os=-proelf
3879 +               ;;
3880 +       *-winbond)
3881 +               os=-proelf
3882 +               ;;
3883 +       *-oki)
3884 +               os=-proelf
3885 +               ;;
3886 +       *-hp)
3887 +               os=-hpux
3888 +               ;;
3889 +       *-hitachi)
3890 +               os=-hiux
3891 +               ;;
3892 +       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
3893 +               os=-sysv
3894 +               ;;
3895 +       *-cbm)
3896 +               os=-amigaos
3897 +               ;;
3898 +       *-dg)
3899 +               os=-dgux
3900 +               ;;
3901 +       *-dolphin)
3902 +               os=-sysv3
3903 +               ;;
3904 +       m68k-ccur)
3905 +               os=-rtu
3906 +               ;;
3907 +       m88k-omron*)
3908 +               os=-luna
3909 +               ;;
3910 +       *-next )
3911 +               os=-nextstep
3912 +               ;;
3913 +       *-sequent)
3914 +               os=-ptx
3915 +               ;;
3916 +       *-crds)
3917 +               os=-unos
3918 +               ;;
3919 +       *-ns)
3920 +               os=-genix
3921 +               ;;
3922 +       i370-*)
3923 +               os=-mvs
3924 +               ;;
3925 +       *-next)
3926 +               os=-nextstep3
3927 +               ;;
3928 +       *-gould)
3929 +               os=-sysv
3930 +               ;;
3931 +       *-highlevel)
3932 +               os=-bsd
3933 +               ;;
3934 +       *-encore)
3935 +               os=-bsd
3936 +               ;;
3937 +       *-sgi)
3938 +               os=-irix
3939 +               ;;
3940 +       *-siemens)
3941 +               os=-sysv4
3942 +               ;;
3943 +       *-masscomp)
3944 +               os=-rtu
3945 +               ;;
3946 +       f30[01]-fujitsu | f700-fujitsu)
3947 +               os=-uxpv
3948 +               ;;
3949 +       *-rom68k)
3950 +               os=-coff
3951 +               ;;
3952 +       *-*bug)
3953 +               os=-coff
3954 +               ;;
3955 +       *-apple)
3956 +               os=-macos
3957 +               ;;
3958 +       *-atari*)
3959 +               os=-mint
3960 +               ;;
3961 +       *)
3962 +               os=-none
3963 +               ;;
3964 +esac
3965 +fi
3966 +
3967 +# Here we handle the case where we know the os, and the CPU type, but not the
3968 +# manufacturer.  We pick the logical manufacturer.
3969 +vendor=unknown
3970 +case $basic_machine in
3971 +       *-unknown)
3972 +               case $os in
3973 +                       -riscix*)
3974 +                               vendor=acorn
3975 +                               ;;
3976 +                       -sunos*)
3977 +                               vendor=sun
3978 +                               ;;
3979 +                       -cnk*|-aix*)
3980 +                               vendor=ibm
3981 +                               ;;
3982 +                       -beos*)
3983 +                               vendor=be
3984 +                               ;;
3985 +                       -hpux*)
3986 +                               vendor=hp
3987 +                               ;;
3988 +                       -mpeix*)
3989 +                               vendor=hp
3990 +                               ;;
3991 +                       -hiux*)
3992 +                               vendor=hitachi
3993 +                               ;;
3994 +                       -unos*)
3995 +                               vendor=crds
3996 +                               ;;
3997 +                       -dgux*)
3998 +                               vendor=dg
3999 +                               ;;
4000 +                       -luna*)
4001 +                               vendor=omron
4002 +                               ;;
4003 +                       -genix*)
4004 +                               vendor=ns
4005 +                               ;;
4006 +                       -mvs* | -opened*)
4007 +                               vendor=ibm
4008 +                               ;;
4009 +                       -os400*)
4010 +                               vendor=ibm
4011 +                               ;;
4012 +                       -ptx*)
4013 +                               vendor=sequent
4014 +                               ;;
4015 +                       -tpf*)
4016 +                               vendor=ibm
4017 +                               ;;
4018 +                       -vxsim* | -vxworks* | -windiss*)
4019 +                               vendor=wrs
4020 +                               ;;
4021 +                       -aux*)
4022 +                               vendor=apple
4023 +                               ;;
4024 +                       -hms*)
4025 +                               vendor=hitachi
4026 +                               ;;
4027 +                       -mpw* | -macos*)
4028 +                               vendor=apple
4029 +                               ;;
4030 +                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
4031 +                               vendor=atari
4032 +                               ;;
4033 +                       -vos*)
4034 +                               vendor=stratus
4035 +                               ;;
4036 +               esac
4037 +               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
4038 +               ;;
4039 +esac
4040 +
4041 +echo $basic_machine$os
4042 +exit
4043 +
4044 +# Local variables:
4045 +# eval: (add-hook 'write-file-hooks 'time-stamp)
4046 +# time-stamp-start: "timestamp='"
4047 +# time-stamp-format: "%:y-%02m-%02d"
4048 +# time-stamp-end: "'"
4049 +# End:
4050 Index: libffi/configure
4051 ===================================================================
4052 --- libffi.orig/configure
4053 +++ libffi/configure
4054 @@ -1,22 +1,20 @@
4055  #! /bin/sh
4056  # Guess values for system-dependent variables and create Makefiles.
4057 -# Generated by GNU Autoconf 2.64 for libffi 3.0.9.
4058 +# Generated by GNU Autoconf 2.63 for libffi 3.0.10rc0.
4059  #
4060  # Report bugs to <http://gcc.gnu.org/bugs.html>.
4061  #
4062  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
4063 -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
4064 -# Foundation, Inc.
4065 -#
4066 +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4067  # This configure script is free software; the Free Software Foundation
4068  # gives unlimited permission to copy, distribute and modify it.
4069 -## -------------------- ##
4070 -## M4sh Initialization. ##
4071 -## -------------------- ##
4072 +## --------------------- ##
4073 +## M4sh Initialization.  ##
4074 +## --------------------- ##
4075  
4076  # Be more Bourne compatible
4077  DUALCASE=1; export DUALCASE # for MKS sh
4078 -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
4079 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
4080    emulate sh
4081    NULLCMD=:
4082    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
4083 @@ -24,15 +22,23 @@ if test -n "${ZSH_VERSION+set}" && (emul
4084    alias -g '${1+"$@"}'='"$@"'
4085    setopt NO_GLOB_SUBST
4086  else
4087 -  case `(set -o) 2>/dev/null` in #(
4088 -  *posix*) :