nokogiri 1.6.8.rc3 → 1.6.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -3
  3. data/CHANGELOG.rdoc +27 -4
  4. data/CONTRIBUTING.md +1 -1
  5. data/Gemfile +7 -7
  6. data/Manifest.txt +1 -1
  7. data/README.md +0 -3
  8. data/Rakefile +10 -11
  9. data/dependencies.yml +29 -4
  10. data/ext/nokogiri/extconf.rb +74 -19
  11. data/ext/nokogiri/xml_node.c +22 -9
  12. data/ext/nokogiri/xml_reader.c +0 -13
  13. data/ext/nokogiri/xml_sax_parser.c +7 -7
  14. data/lib/nokogiri.rb +11 -7
  15. data/lib/nokogiri/html/document.rb +4 -2
  16. data/lib/nokogiri/version.rb +1 -1
  17. data/lib/nokogiri/xml/document.rb +1 -1
  18. data/lib/nokogiri/xml/parse_options.rb +22 -0
  19. data/ports/archives/libxml2-2.9.4.tar.gz +0 -0
  20. data/ports/archives/libxslt-1.1.29.tar.gz +0 -0
  21. data/tasks/test.rb +5 -0
  22. data/test/html/test_document.rb +26 -0
  23. data/test/html/test_document_encoding.rb +5 -0
  24. data/test/html/test_document_fragment.rb +5 -0
  25. data/test/test_encoding_handler.rb +2 -0
  26. data/test/test_xslt_transforms.rb +33 -0
  27. data/test/xml/sax/test_parser.rb +15 -7
  28. data/test/xml/test_document_encoding.rb +5 -0
  29. data/test/xml/test_document_fragment.rb +12 -0
  30. data/test/xml/test_node_attributes.rb +6 -0
  31. data/test/xml/test_node_reparenting.rb +193 -18
  32. data/test/xml/test_reader.rb +589 -0
  33. data/test/xml/test_unparented_node.rb +13 -0
  34. data/test_all +33 -42
  35. metadata +34 -51
  36. data/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch +0 -222
  37. data/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch +0 -53
  38. data/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch +0 -60
  39. data/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch +0 -42
  40. data/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch +0 -164
  41. data/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch +0 -587
  42. data/patches/libxslt/0008-Fix-direct-pattern-matching.patch +0 -80
  43. data/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch +0 -185
  44. data/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch +0 -126
  45. data/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch +0 -25
  46. data/patches/libxslt/0014-Fix-for-bug-436589.patch +0 -43
  47. data/patches/libxslt/0015-Fix-mkdir-for-mingw.patch +0 -41
  48. data/patches/libxslt/0016-Fix-for-type-confusion-in-preprocessing-attributes.patch +0 -29
  49. data/patches/libxslt/0017-Updated-config.guess.patch +0 -1226
  50. data/ports/archives/libxml2-2.9.3.tar.gz +0 -0
  51. data/ports/archives/libxslt-1.1.28.tar.gz +0 -0
  52. data/test/test_reader.rb +0 -577
@@ -1,41 +0,0 @@
1
- From a7ff3f0043f02d4ade966b6ac05b8be39166daa7 Mon Sep 17 00:00:00 2001
2
- From: Lars Kanis <lars@greiz-reinsdorf.de>
3
- Date: Sun, 6 Oct 2013 22:04:46 +0200
4
- Subject: [PATCH] Use mkdir macro also in case if mingw32.
5
-
6
- This fixes bug 676511.
7
- ---
8
- libxslt/libxslt.h | 6 ++++++
9
- libxslt/win32config.h | 1 -
10
- 2 files changed, 6 insertions(+), 1 deletion(-)
11
-
12
- diff --git a/libxslt/libxslt.h b/libxslt/libxslt.h
13
- index 2f6f20d..e6d4c83 100644
14
- --- a/libxslt/libxslt.h
15
- +++ b/libxslt/libxslt.h
16
- @@ -27,4 +27,10 @@
17
- #endif
18
- #endif
19
-
20
- +#if defined(_MSC_VER) || defined(__MINGW32__)
21
- +#include <io.h>
22
- +#include <direct.h>
23
- +#define mkdir(p,m) _mkdir(p)
24
- +#endif
25
- +
26
- #endif /* ! __XSLT_LIBXSLT_H__ */
27
- diff --git a/libxslt/win32config.h b/libxslt/win32config.h
28
- index 9f60e55..e1ceae1 100644
29
- --- a/libxslt/win32config.h
30
- +++ b/libxslt/win32config.h
31
- @@ -78,7 +78,6 @@ static int isnan (double d) {
32
-
33
- #include <direct.h>
34
- #if defined(_MSC_VER) || defined(__MINGW32__)
35
- -#define mkdir(p,m) _mkdir(p)
36
- #define snprintf _snprintf
37
- #if _MSC_VER < 1500
38
- #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
39
- --
40
- 1.8.3.2
41
-
@@ -1,29 +0,0 @@
1
- From 5865b9545891a38608374ff6458663e483a0dfb5 Mon Sep 17 00:00:00 2001
2
- From: Daniel Veillard <veillard@redhat.com>
3
- Date: Thu, 29 Oct 2015 19:33:23 +0800
4
- Subject: [PATCH] Fix for type confusion in preprocessing attributes
5
-
6
- CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
7
- We need to check that the parent node is an element before dereferencing
8
- its namespace
9
- ---
10
- libxslt/preproc.c | 3 ++-
11
- 1 file changed, 2 insertions(+), 1 deletion(-)
12
-
13
- diff --git a/libxslt/preproc.c b/libxslt/preproc.c
14
- index 4ef3f63..dac6acb 100644
15
- --- a/libxslt/preproc.c
16
- +++ b/libxslt/preproc.c
17
- @@ -2245,7 +2245,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
18
- } else if (IS_XSLT_NAME(inst, "attribute")) {
19
- xmlNodePtr parent = inst->parent;
20
-
21
- - if ((parent == NULL) || (parent->ns == NULL) ||
22
- + if ((parent == NULL) ||
23
- + (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) ||
24
- ((parent->ns != inst->ns) &&
25
- (!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
26
- (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) {
27
- --
28
- 2.5.0
29
-
@@ -1,1226 +0,0 @@
1
- From ccad29dec09d5f25ed0a1a2a6fa18173ca90a70f Mon Sep 17 00:00:00 2001
2
- From: Hernan Erasmo <dherasmo@gmail.com>
3
- Date: Fri, 6 Nov 2015 08:10:07 -0300
4
- Subject: [PATCH] Updated config.guess
5
-
6
- config.guess has been updated to the latest version (now
7
- recognizes ppc64le architecture)
8
- ---
9
- config.guess | 786 +++++++++++++++++++++++++++--------------------------------
10
- 1 file changed, 357 insertions(+), 429 deletions(-)
11
- mode change 100755 => 100644 config.guess
12
-
13
- diff --git a/config.guess b/config.guess
14
- old mode 100755
15
- new mode 100644
16
- index 951383e..b3f9053
17
- --- a/config.guess
18
- +++ b/config.guess
19
- @@ -1,14 +1,12 @@
20
- #! /bin/sh
21
- # Attempt to guess a canonical system name.
22
- -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
23
- -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
24
- -# Inc.
25
- +# Copyright 1992-2015 Free Software Foundation, Inc.
26
-
27
- -timestamp='2007-05-17'
28
- +timestamp='2015-10-21'
29
-
30
- # This file is free software; you can redistribute it and/or modify it
31
- # under the terms of the GNU General Public License as published by
32
- -# the Free Software Foundation; either version 2 of the License, or
33
- +# the Free Software Foundation; either version 3 of the License, or
34
- # (at your option) any later version.
35
- #
36
- # This program is distributed in the hope that it will be useful, but
37
- @@ -17,26 +15,22 @@ timestamp='2007-05-17'
38
- # General Public License for more details.
39
- #
40
- # You should have received a copy of the GNU General Public License
41
- -# along with this program; if not, write to the Free Software
42
- -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
43
- -# 02110-1301, USA.
44
- +# along with this program; if not, see <http://www.gnu.org/licenses/>.
45
- #
46
- # As a special exception to the GNU General Public License, if you
47
- # distribute this file as part of a program that contains a
48
- # configuration script generated by Autoconf, you may include it under
49
- -# the same distribution terms that you use for the rest of that program.
50
- -
51
- -
52
- -# Originally written by Per Bothner <per@bothner.com>.
53
- -# Please send patches to <config-patches@gnu.org>. Submit a context
54
- -# diff and a properly formatted ChangeLog entry.
55
- +# the same distribution terms that you use for the rest of that
56
- +# program. This Exception is an additional permission under section 7
57
- +# of the GNU General Public License, version 3 ("GPLv3").
58
- #
59
- -# This script attempts to guess a canonical system name similar to
60
- -# config.sub. If it succeeds, it prints the system name on stdout, and
61
- -# exits with 0. Otherwise, it exits with 1.
62
- +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
63
- #
64
- -# The plan is that this can be called by configure scripts if you
65
- -# don't specify an explicit build system type.
66
- +# You can get the latest version of this script from:
67
- +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
68
- +#
69
- +# Please send patches to <config-patches@gnu.org>.
70
- +
71
-
72
- me=`echo "$0" | sed -e 's,.*/,,'`
73
-
74
- @@ -56,8 +50,7 @@ version="\
75
- GNU config.guess ($timestamp)
76
-
77
- Originally written by Per Bothner.
78
- -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
79
- -Free Software Foundation, Inc.
80
- +Copyright 1992-2015 Free Software Foundation, Inc.
81
-
82
- This is free software; see the source for copying conditions. There is NO
83
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
84
- @@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
85
- UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
86
- UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
87
-
88
- +case "${UNAME_SYSTEM}" in
89
- +Linux|GNU|GNU/*)
90
- + # If the system lacks a compiler, then just pick glibc.
91
- + # We could probably try harder.
92
- + LIBC=gnu
93
- +
94
- + eval $set_cc_for_build
95
- + cat <<-EOF > $dummy.c
96
- + #include <features.h>
97
- + #if defined(__UCLIBC__)
98
- + LIBC=uclibc
99
- + #elif defined(__dietlibc__)
100
- + LIBC=dietlibc
101
- + #else
102
- + LIBC=gnu
103
- + #endif
104
- + EOF
105
- + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
106
- + ;;
107
- +esac
108
- +
109
- # Note: order is significant - the case branches are not exclusive.
110
-
111
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
112
- *:NetBSD:*:*)
113
- # NetBSD (nbsd) targets should (where applicable) match one or
114
- - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
115
- + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
116
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
117
- # switched to ELF, *-*-netbsd* would select the old
118
- # object file format. This provides both forward
119
- @@ -154,23 +168,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
120
- # Note: NetBSD doesn't particularly care about the vendor
121
- # portion of the name. We always set it to "unknown".
122
- sysctl="sysctl -n hw.machine_arch"
123
- - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
124
- - /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
125
- + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
126
- + /sbin/$sysctl 2>/dev/null || \
127
- + /usr/sbin/$sysctl 2>/dev/null || \
128
- + echo unknown)`
129
- case "${UNAME_MACHINE_ARCH}" in
130
- armeb) machine=armeb-unknown ;;
131
- arm*) machine=arm-unknown ;;
132
- sh3el) machine=shl-unknown ;;
133
- sh3eb) machine=sh-unknown ;;
134
- sh5el) machine=sh5le-unknown ;;
135
- + earmv*)
136
- + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
137
- + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
138
- + machine=${arch}${endian}-unknown
139
- + ;;
140
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
141
- esac
142
- # The Operating System including object format, if it has switched
143
- # to ELF recently, or will in the future.
144
- case "${UNAME_MACHINE_ARCH}" in
145
- - arm*|i386|m68k|ns32k|sh3*|sparc|vax)
146
- + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
147
- eval $set_cc_for_build
148
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
149
- - | grep __ELF__ >/dev/null
150
- + | grep -q __ELF__
151
- then
152
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
153
- # Return netbsd for either. FIX?
154
- @@ -180,7 +201,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
155
- fi
156
- ;;
157
- *)
158
- - os=netbsd
159
- + os=netbsd
160
- + ;;
161
- + esac
162
- + # Determine ABI tags.
163
- + case "${UNAME_MACHINE_ARCH}" in
164
- + earm*)
165
- + expr='s/^earmv[0-9]/-eabi/;s/eb$//'
166
- + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
167
- ;;
168
- esac
169
- # The OS release
170
- @@ -193,13 +221,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
171
- release='-gnu'
172
- ;;
173
- *)
174
- - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
175
- + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
176
- ;;
177
- esac
178
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
179
- # contains redundant information, the shorter form:
180
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
181
- - echo "${machine}-${os}${release}"
182
- + echo "${machine}-${os}${release}${abi}"
183
- + exit ;;
184
- + *:Bitrig:*:*)
185
- + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
186
- + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
187
- exit ;;
188
- *:OpenBSD:*:*)
189
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
190
- @@ -217,13 +249,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
191
- *:MirBSD:*:*)
192
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
193
- exit ;;
194
- + *:Sortix:*:*)
195
- + echo ${UNAME_MACHINE}-unknown-sortix
196
- + exit ;;
197
- alpha:OSF1:*:*)
198
- case $UNAME_RELEASE in
199
- *4.0)
200
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
201
- ;;
202
- *5.*)
203
- - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
204
- + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
205
- ;;
206
- esac
207
- # According to Compaq, /usr/sbin/psrinfo has been available on
208
- @@ -269,7 +304,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
209
- # A Xn.n version is an unreleased experimental baselevel.
210
- # 1.2 uses "1.2" for uname -r.
211
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
212
- - exit ;;
213
- + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
214
- + exitcode=$?
215
- + trap '' 0
216
- + exit $exitcode ;;
217
- Alpha\ *:Windows_NT*:*)
218
- # How do we know it's Interix rather than the generic POSIX subsystem?
219
- # Should we change UNAME_MACHINE based on the output of uname instead
220
- @@ -295,12 +333,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
221
- echo s390-ibm-zvmoe
222
- exit ;;
223
- *:OS400:*:*)
224
- - echo powerpc-ibm-os400
225
- + echo powerpc-ibm-os400
226
- exit ;;
227
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
228
- echo arm-acorn-riscix${UNAME_RELEASE}
229
- exit ;;
230
- - arm:riscos:*:*|arm:RISCOS:*:*)
231
- + arm*:riscos:*:*|arm*:RISCOS:*:*)
232
- echo arm-unknown-riscos
233
- exit ;;
234
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
235
- @@ -324,14 +362,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
236
- case `/usr/bin/uname -p` in
237
- sparc) echo sparc-icl-nx7; exit ;;
238
- esac ;;
239
- + s390x:SunOS:*:*)
240
- + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
241
- + exit ;;
242
- sun4H:SunOS:5.*:*)
243
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
244
- exit ;;
245
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
246
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
247
- exit ;;
248
- - i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
249
- - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
250
- + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
251
- + echo i386-pc-auroraux${UNAME_RELEASE}
252
- + exit ;;
253
- + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
254
- + eval $set_cc_for_build
255
- + SUN_ARCH="i386"
256
- + # If there is a compiler, see if it is configured for 64-bit objects.
257
- + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
258
- + # This test works for both compilers.
259
- + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
260
- + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
261
- + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
262
- + grep IS_64BIT_ARCH >/dev/null
263
- + then
264
- + SUN_ARCH="x86_64"
265
- + fi
266
- + fi
267
- + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
268
- exit ;;
269
- sun4*:SunOS:6*:*)
270
- # According to config.sub, this is the proper way to canonicalize
271
- @@ -375,23 +432,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
272
- # MiNT. But MiNT is downward compatible to TOS, so this should
273
- # be no problem.
274
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
275
- - echo m68k-atari-mint${UNAME_RELEASE}
276
- + echo m68k-atari-mint${UNAME_RELEASE}
277
- exit ;;
278
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
279
- echo m68k-atari-mint${UNAME_RELEASE}
280
- - exit ;;
281
- + exit ;;
282
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
283
- - echo m68k-atari-mint${UNAME_RELEASE}
284
- + echo m68k-atari-mint${UNAME_RELEASE}
285
- exit ;;
286
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
287
- - echo m68k-milan-mint${UNAME_RELEASE}
288
- - exit ;;
289
- + echo m68k-milan-mint${UNAME_RELEASE}
290
- + exit ;;
291
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
292
- - echo m68k-hades-mint${UNAME_RELEASE}
293
- - exit ;;
294
- + echo m68k-hades-mint${UNAME_RELEASE}
295
- + exit ;;
296
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
297
- - echo m68k-unknown-mint${UNAME_RELEASE}
298
- - exit ;;
299
- + echo m68k-unknown-mint${UNAME_RELEASE}
300
- + exit ;;
301
- m68k:machten:*:*)
302
- echo m68k-apple-machten${UNAME_RELEASE}
303
- exit ;;
304
- @@ -461,8 +518,8 @@ EOF
305
- echo m88k-motorola-sysv3
306
- exit ;;
307
- AViiON:dgux:*:*)
308
- - # DG/UX returns AViiON for all architectures
309
- - UNAME_PROCESSOR=`/usr/bin/uname -p`
310
- + # DG/UX returns AViiON for all architectures
311
- + UNAME_PROCESSOR=`/usr/bin/uname -p`
312
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
313
- then
314
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
315
- @@ -475,7 +532,7 @@ EOF
316
- else
317
- echo i586-dg-dgux${UNAME_RELEASE}
318
- fi
319
- - exit ;;
320
- + exit ;;
321
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
322
- echo m88k-dolphin-sysv3
323
- exit ;;
324
- @@ -532,15 +589,16 @@ EOF
325
- echo rs6000-ibm-aix3.2
326
- fi
327
- exit ;;
328
- - *:AIX:*:[45])
329
- + *:AIX:*:[4567])
330
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
331
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
332
- IBM_ARCH=rs6000
333
- else
334
- IBM_ARCH=powerpc
335
- fi
336
- - if [ -x /usr/bin/oslevel ] ; then
337
- - IBM_REV=`/usr/bin/oslevel`
338
- + if [ -x /usr/bin/lslpp ] ; then
339
- + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
340
- + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
341
- else
342
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
343
- fi
344
- @@ -575,52 +633,52 @@ EOF
345
- 9000/[678][0-9][0-9])
346
- if [ -x /usr/bin/getconf ]; then
347
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
348
- - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
349
- - case "${sc_cpu_version}" in
350
- - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
351
- - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
352
- - 532) # CPU_PA_RISC2_0
353
- - case "${sc_kernel_bits}" in
354
- - 32) HP_ARCH="hppa2.0n" ;;
355
- - 64) HP_ARCH="hppa2.0w" ;;
356
- + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
357
- + case "${sc_cpu_version}" in
358
- + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
359
- + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
360
- + 532) # CPU_PA_RISC2_0
361
- + case "${sc_kernel_bits}" in
362
- + 32) HP_ARCH="hppa2.0n" ;;
363
- + 64) HP_ARCH="hppa2.0w" ;;
364
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
365
- - esac ;;
366
- - esac
367
- + esac ;;
368
- + esac
369
- fi
370
- if [ "${HP_ARCH}" = "" ]; then
371
- eval $set_cc_for_build
372
- - sed 's/^ //' << EOF >$dummy.c
373
- + sed 's/^ //' << EOF >$dummy.c
374
-
375
- - #define _HPUX_SOURCE
376
- - #include <stdlib.h>
377
- - #include <unistd.h>
378
- + #define _HPUX_SOURCE
379
- + #include <stdlib.h>
380
- + #include <unistd.h>
381
-
382
- - int main ()
383
- - {
384
- - #if defined(_SC_KERNEL_BITS)
385
- - long bits = sysconf(_SC_KERNEL_BITS);
386
- - #endif
387
- - long cpu = sysconf (_SC_CPU_VERSION);
388
- + int main ()
389
- + {
390
- + #if defined(_SC_KERNEL_BITS)
391
- + long bits = sysconf(_SC_KERNEL_BITS);
392
- + #endif
393
- + long cpu = sysconf (_SC_CPU_VERSION);
394
-
395
- - switch (cpu)
396
- - {
397
- - case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
398
- - case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
399
- - case CPU_PA_RISC2_0:
400
- - #if defined(_SC_KERNEL_BITS)
401
- - switch (bits)
402
- - {
403
- - case 64: puts ("hppa2.0w"); break;
404
- - case 32: puts ("hppa2.0n"); break;
405
- - default: puts ("hppa2.0"); break;
406
- - } break;
407
- - #else /* !defined(_SC_KERNEL_BITS) */
408
- - puts ("hppa2.0"); break;
409
- - #endif
410
- - default: puts ("hppa1.0"); break;
411
- - }
412
- - exit (0);
413
- - }
414
- + switch (cpu)
415
- + {
416
- + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
417
- + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
418
- + case CPU_PA_RISC2_0:
419
- + #if defined(_SC_KERNEL_BITS)
420
- + switch (bits)
421
- + {
422
- + case 64: puts ("hppa2.0w"); break;
423
- + case 32: puts ("hppa2.0n"); break;
424
- + default: puts ("hppa2.0"); break;
425
- + } break;
426
- + #else /* !defined(_SC_KERNEL_BITS) */
427
- + puts ("hppa2.0"); break;
428
- + #endif
429
- + default: puts ("hppa1.0"); break;
430
- + }
431
- + exit (0);
432
- + }
433
- EOF
434
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
435
- test -z "$HP_ARCH" && HP_ARCH=hppa
436
- @@ -640,7 +698,7 @@ EOF
437
- # => hppa64-hp-hpux11.23
438
-
439
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
440
- - grep __LP64__ >/dev/null
441
- + grep -q __LP64__
442
- then
443
- HP_ARCH="hppa2.0w"
444
- else
445
- @@ -711,22 +769,22 @@ EOF
446
- exit ;;
447
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
448
- echo c1-convex-bsd
449
- - exit ;;
450
- + exit ;;
451
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
452
- if getsysinfo -f scalar_acc
453
- then echo c32-convex-bsd
454
- else echo c2-convex-bsd
455
- fi
456
- - exit ;;
457
- + exit ;;
458
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
459
- echo c34-convex-bsd
460
- - exit ;;
461
- + exit ;;
462
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
463
- echo c38-convex-bsd
464
- - exit ;;
465
- + exit ;;
466
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
467
- echo c4-convex-bsd
468
- - exit ;;
469
- + exit ;;
470
- CRAY*Y-MP:*:*:*)
471
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
472
- exit ;;
473
- @@ -750,14 +808,14 @@ EOF
474
- exit ;;
475
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
476
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
477
- - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
478
- - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
479
- - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
480
- - exit ;;
481
- + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
482
- + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
483
- + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
484
- + exit ;;
485
- 5000:UNIX_System_V:4.*:*)
486
- - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
487
- - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
488
- - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
489
- + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
490
- + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
491
- + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
492
- exit ;;
493
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
494
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
495
- @@ -769,40 +827,51 @@ EOF
496
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
497
- exit ;;
498
- *:FreeBSD:*:*)
499
- - case ${UNAME_MACHINE} in
500
- - pc98)
501
- - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
502
- + UNAME_PROCESSOR=`/usr/bin/uname -p`
503
- + case ${UNAME_PROCESSOR} in
504
- amd64)
505
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
506
- *)
507
- - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
508
- + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
509
- esac
510
- exit ;;
511
- i*:CYGWIN*:*)
512
- echo ${UNAME_MACHINE}-pc-cygwin
513
- exit ;;
514
- + *:MINGW64*:*)
515
- + echo ${UNAME_MACHINE}-pc-mingw64
516
- + exit ;;
517
- *:MINGW*:*)
518
- echo ${UNAME_MACHINE}-pc-mingw32
519
- exit ;;
520
- + *:MSYS*:*)
521
- + echo ${UNAME_MACHINE}-pc-msys
522
- + exit ;;
523
- i*:windows32*:*)
524
- - # uname -m includes "-pc" on this system.
525
- - echo ${UNAME_MACHINE}-mingw32
526
- + # uname -m includes "-pc" on this system.
527
- + echo ${UNAME_MACHINE}-mingw32
528
- exit ;;
529
- i*:PW*:*)
530
- echo ${UNAME_MACHINE}-pc-pw32
531
- exit ;;
532
- - *:Interix*:[3456]*)
533
- - case ${UNAME_MACHINE} in
534
- - x86)
535
- + *:Interix*:*)
536
- + case ${UNAME_MACHINE} in
537
- + x86)
538
- echo i586-pc-interix${UNAME_RELEASE}
539
- exit ;;
540
- - EM64T | authenticamd)
541
- + authenticamd | genuineintel | EM64T)
542
- echo x86_64-unknown-interix${UNAME_RELEASE}
543
- exit ;;
544
- + IA64)
545
- + echo ia64-unknown-interix${UNAME_RELEASE}
546
- + exit ;;
547
- esac ;;
548
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
549
- echo i${UNAME_MACHINE}-pc-mks
550
- exit ;;
551
- + 8664:Windows_NT:*)
552
- + echo x86_64-pc-mks
553
- + exit ;;
554
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
555
- # How do we know it's Interix rather than the generic POSIX subsystem?
556
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
557
- @@ -823,203 +892,163 @@ EOF
558
- exit ;;
559
- *:GNU:*:*)
560
- # the GNU system
561
- - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
562
- + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
563
- exit ;;
564
- *:GNU/*:*:*)
565
- # other systems with GNU libc and userland
566
- - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
567
- + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
568
- exit ;;
569
- i*86:Minix:*:*)
570
- echo ${UNAME_MACHINE}-pc-minix
571
- exit ;;
572
- + aarch64:Linux:*:*)
573
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
574
- + exit ;;
575
- + aarch64_be:Linux:*:*)
576
- + UNAME_MACHINE=aarch64_be
577
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
578
- + exit ;;
579
- + alpha:Linux:*:*)
580
- + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
581
- + EV5) UNAME_MACHINE=alphaev5 ;;
582
- + EV56) UNAME_MACHINE=alphaev56 ;;
583
- + PCA56) UNAME_MACHINE=alphapca56 ;;
584
- + PCA57) UNAME_MACHINE=alphapca56 ;;
585
- + EV6) UNAME_MACHINE=alphaev6 ;;
586
- + EV67) UNAME_MACHINE=alphaev67 ;;
587
- + EV68*) UNAME_MACHINE=alphaev68 ;;
588
- + esac
589
- + objdump --private-headers /bin/sh | grep -q ld.so.1
590
- + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
591
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
592
- + exit ;;
593
- + arc:Linux:*:* | arceb:Linux:*:*)
594
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
595
- + exit ;;
596
- arm*:Linux:*:*)
597
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
598
- + eval $set_cc_for_build
599
- + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
600
- + | grep -q __ARM_EABI__
601
- + then
602
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
603
- + else
604
- + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
605
- + | grep -q __ARM_PCS_VFP
606
- + then
607
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
608
- + else
609
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
610
- + fi
611
- + fi
612
- exit ;;
613
- avr32*:Linux:*:*)
614
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
615
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
616
- exit ;;
617
- cris:Linux:*:*)
618
- - echo cris-axis-linux-gnu
619
- + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
620
- exit ;;
621
- crisv32:Linux:*:*)
622
- - echo crisv32-axis-linux-gnu
623
- + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
624
- + exit ;;
625
- + e2k:Linux:*:*)
626
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
627
- exit ;;
628
- frv:Linux:*:*)
629
- - echo frv-unknown-linux-gnu
630
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
631
- + exit ;;
632
- + hexagon:Linux:*:*)
633
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
634
- + exit ;;
635
- + i*86:Linux:*:*)
636
- + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
637
- exit ;;
638
- ia64:Linux:*:*)
639
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
640
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
641
- + exit ;;
642
- + k1om:Linux:*:*)
643
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
644
- exit ;;
645
- m32r*:Linux:*:*)
646
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
647
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
648
- exit ;;
649
- m68*:Linux:*:*)
650
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
651
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
652
- exit ;;
653
- - mips:Linux:*:*)
654
- + mips:Linux:*:* | mips64:Linux:*:*)
655
- eval $set_cc_for_build
656
- sed 's/^ //' << EOF >$dummy.c
657
- #undef CPU
658
- - #undef mips
659
- - #undef mipsel
660
- + #undef ${UNAME_MACHINE}
661
- + #undef ${UNAME_MACHINE}el
662
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
663
- - CPU=mipsel
664
- + CPU=${UNAME_MACHINE}el
665
- #else
666
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
667
- - CPU=mips
668
- + CPU=${UNAME_MACHINE}
669
- #else
670
- CPU=
671
- #endif
672
- #endif
673
- EOF
674
- - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
675
- - /^CPU/{
676
- - s: ::g
677
- - p
678
- - }'`"
679
- - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
680
- + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
681
- + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
682
- ;;
683
- - mips64:Linux:*:*)
684
- - eval $set_cc_for_build
685
- - sed 's/^ //' << EOF >$dummy.c
686
- - #undef CPU
687
- - #undef mips64
688
- - #undef mips64el
689
- - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
690
- - CPU=mips64el
691
- - #else
692
- - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
693
- - CPU=mips64
694
- - #else
695
- - CPU=
696
- - #endif
697
- - #endif
698
- -EOF
699
- - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
700
- - /^CPU/{
701
- - s: ::g
702
- - p
703
- - }'`"
704
- - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
705
- - ;;
706
- - or32:Linux:*:*)
707
- - echo or32-unknown-linux-gnu
708
- + openrisc*:Linux:*:*)
709
- + echo or1k-unknown-linux-${LIBC}
710
- exit ;;
711
- - ppc:Linux:*:*)
712
- - echo powerpc-unknown-linux-gnu
713
- + or32:Linux:*:* | or1k*:Linux:*:*)
714
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
715
- exit ;;
716
- - ppc64:Linux:*:*)
717
- - echo powerpc64-unknown-linux-gnu
718
- + padre:Linux:*:*)
719
- + echo sparc-unknown-linux-${LIBC}
720
- exit ;;
721
- - alpha:Linux:*:*)
722
- - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
723
- - EV5) UNAME_MACHINE=alphaev5 ;;
724
- - EV56) UNAME_MACHINE=alphaev56 ;;
725
- - PCA56) UNAME_MACHINE=alphapca56 ;;
726
- - PCA57) UNAME_MACHINE=alphapca56 ;;
727
- - EV6) UNAME_MACHINE=alphaev6 ;;
728
- - EV67) UNAME_MACHINE=alphaev67 ;;
729
- - EV68*) UNAME_MACHINE=alphaev68 ;;
730
- - esac
731
- - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
732
- - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
733
- - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
734
- + parisc64:Linux:*:* | hppa64:Linux:*:*)
735
- + echo hppa64-unknown-linux-${LIBC}
736
- exit ;;
737
- parisc:Linux:*:* | hppa:Linux:*:*)
738
- # Look for CPU level
739
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
740
- - PA7*) echo hppa1.1-unknown-linux-gnu ;;
741
- - PA8*) echo hppa2.0-unknown-linux-gnu ;;
742
- - *) echo hppa-unknown-linux-gnu ;;
743
- + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
744
- + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
745
- + *) echo hppa-unknown-linux-${LIBC} ;;
746
- esac
747
- exit ;;
748
- - parisc64:Linux:*:* | hppa64:Linux:*:*)
749
- - echo hppa64-unknown-linux-gnu
750
- + ppc64:Linux:*:*)
751
- + echo powerpc64-unknown-linux-${LIBC}
752
- + exit ;;
753
- + ppc:Linux:*:*)
754
- + echo powerpc-unknown-linux-${LIBC}
755
- + exit ;;
756
- + ppc64le:Linux:*:*)
757
- + echo powerpc64le-unknown-linux-${LIBC}
758
- + exit ;;
759
- + ppcle:Linux:*:*)
760
- + echo powerpcle-unknown-linux-${LIBC}
761
- exit ;;
762
- s390:Linux:*:* | s390x:Linux:*:*)
763
- - echo ${UNAME_MACHINE}-ibm-linux
764
- + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
765
- exit ;;
766
- sh64*:Linux:*:*)
767
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
768
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
769
- exit ;;
770
- sh*:Linux:*:*)
771
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
772
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
773
- exit ;;
774
- sparc:Linux:*:* | sparc64:Linux:*:*)
775
- - echo ${UNAME_MACHINE}-unknown-linux-gnu
776
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
777
- + exit ;;
778
- + tile*:Linux:*:*)
779
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
780
- exit ;;
781
- vax:Linux:*:*)
782
- - echo ${UNAME_MACHINE}-dec-linux-gnu
783
- + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
784
- exit ;;
785
- x86_64:Linux:*:*)
786
- - echo x86_64-unknown-linux-gnu
787
- + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
788
- exit ;;
789
- - xtensa:Linux:*:*)
790
- - echo xtensa-unknown-linux-gnu
791
- + xtensa*:Linux:*:*)
792
- + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
793
- exit ;;
794
- - i*86:Linux:*:*)
795
- - # The BFD linker knows what the default object file format is, so
796
- - # first see if it will tell us. cd to the root directory to prevent
797
- - # problems with other programs or directories called `ld' in the path.
798
- - # Set LC_ALL=C to ensure ld outputs messages in English.
799
- - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
800
- - | sed -ne '/supported targets:/!d
801
- - s/[ ][ ]*/ /g
802
- - s/.*supported targets: *//
803
- - s/ .*//
804
- - p'`
805
- - case "$ld_supported_targets" in
806
- - elf32-i386)
807
- - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
808
- - ;;
809
- - a.out-i386-linux)
810
- - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
811
- - exit ;;
812
- - coff-i386)
813
- - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
814
- - exit ;;
815
- - "")
816
- - # Either a pre-BFD a.out linker (linux-gnuoldld) or
817
- - # one that does not give us useful --help.
818
- - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
819
- - exit ;;
820
- - esac
821
- - # Determine whether the default compiler is a.out or elf
822
- - eval $set_cc_for_build
823
- - sed 's/^ //' << EOF >$dummy.c
824
- - #include <features.h>
825
- - #ifdef __ELF__
826
- - # ifdef __GLIBC__
827
- - # if __GLIBC__ >= 2
828
- - LIBC=gnu
829
- - # else
830
- - LIBC=gnulibc1
831
- - # endif
832
- - # else
833
- - LIBC=gnulibc1
834
- - # endif
835
- - #else
836
- - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
837
- - LIBC=gnu
838
- - #else
839
- - LIBC=gnuaout
840
- - #endif
841
- - #endif
842
- - #ifdef __dietlibc__
843
- - LIBC=dietlibc
844
- - #endif
845
- -EOF
846
- - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
847
- - /^LIBC/{
848
- - s: ::g
849
- - p
850
- - }'`"
851
- - test x"${LIBC}" != x && {
852
- - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
853
- - exit
854
- - }
855
- - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
856
- - ;;
857
- i*86:DYNIX/ptx:4*:*)
858
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
859
- # earlier versions are messed up and put the nodename in both
860
- @@ -1027,11 +1056,11 @@ EOF
861
- echo i386-sequent-sysv4
862
- exit ;;
863
- i*86:UNIX_SV:4.2MP:2.*)
864
- - # Unixware is an offshoot of SVR4, but it has its own version
865
- - # number series starting with 2...
866
- - # I am not positive that other SVR4 systems won't match this,
867
- + # Unixware is an offshoot of SVR4, but it has its own version
868
- + # number series starting with 2...
869
- + # I am not positive that other SVR4 systems won't match this,
870
- # I just have to hope. -- rms.
871
- - # Use sysv4.2uw... so that sysv4* matches it.
872
- + # Use sysv4.2uw... so that sysv4* matches it.
873
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
874
- exit ;;
875
- i*86:OS/2:*:*)
876
- @@ -1048,7 +1077,7 @@ EOF
877
- i*86:syllable:*:*)
878
- echo ${UNAME_MACHINE}-pc-syllable
879
- exit ;;
880
- - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
881
- + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
882
- echo i386-unknown-lynxos${UNAME_RELEASE}
883
- exit ;;
884
- i*86:*DOS:*:*)
885
- @@ -1063,7 +1092,7 @@ EOF
886
- fi
887
- exit ;;
888
- i*86:*:5:[678]*)
889
- - # UnixWare 7.x, OpenUNIX and OpenServer 6.
890
- + # UnixWare 7.x, OpenUNIX and OpenServer 6.
891
- case `/bin/uname -X | grep "^Machine"` in
892
- *486*) UNAME_MACHINE=i486 ;;
893
- *Pentium) UNAME_MACHINE=i586 ;;
894
- @@ -1091,10 +1120,13 @@ EOF
895
- exit ;;
896
- pc:*:*:*)
897
- # Left here for compatibility:
898
- - # uname -m prints for DJGPP always 'pc', but it prints nothing about
899
- - # the processor, so we play safe by assuming i386.
900
- - echo i386-pc-msdosdjgpp
901
- - exit ;;
902
- + # uname -m prints for DJGPP always 'pc', but it prints nothing about
903
- + # the processor, so we play safe by assuming i586.
904
- + # Note: whatever this is, it MUST be the same as what config.sub
905
- + # prints for the "djgpp" host, or else GDB configure will decide that
906
- + # this is a cross-build.
907
- + echo i586-pc-msdosdjgpp
908
- + exit ;;
909
- Intel:Mach:3*:*)
910
- echo i386-pc-mach3
911
- exit ;;
912
- @@ -1129,8 +1161,18 @@ EOF
913
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
914
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
915
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
916
- - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
917
- - && { echo i486-ncr-sysv4; exit; } ;;
918
- + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
919
- + && { echo i486-ncr-sysv4; exit; } ;;
920
- + NCR*:*:4.2:* | MPRAS*:*:4.2:*)
921
- + OS_REL='.3'
922
- + test -r /etc/.relid \
923
- + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
924
- + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
925
- + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
926
- + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
927
- + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
928
- + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
929
- + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
930
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
931
- echo m68k-unknown-lynxos${UNAME_RELEASE}
932
- exit ;;
933
- @@ -1143,7 +1185,7 @@ EOF
934
- rs6000:LynxOS:2.*:*)
935
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
936
- exit ;;
937
- - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
938
- + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
939
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
940
- exit ;;
941
- SM[BE]S:UNIX_SV:*:*)
942
- @@ -1163,10 +1205,10 @@ EOF
943
- echo ns32k-sni-sysv
944
- fi
945
- exit ;;
946
- - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
947
- - # says <Richard.M.Bartel@ccMail.Census.GOV>
948
- - echo i586-unisys-sysv4
949
- - exit ;;
950
- + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
951
- + # says <Richard.M.Bartel@ccMail.Census.GOV>
952
- + echo i586-unisys-sysv4
953
- + exit ;;
954
- *:UNIX_System_V:4*:FTX*)
955
- # From Gerald Hewes <hewes@openmarket.com>.
956
- # How about differentiating between stratus architectures? -djm
957
- @@ -1192,11 +1234,11 @@ EOF
958
- exit ;;
959
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
960
- if [ -d /usr/nec ]; then
961
- - echo mips-nec-sysv${UNAME_RELEASE}
962
- + echo mips-nec-sysv${UNAME_RELEASE}
963
- else
964
- - echo mips-unknown-sysv${UNAME_RELEASE}
965
- + echo mips-unknown-sysv${UNAME_RELEASE}
966
- fi
967
- - exit ;;
968
- + exit ;;
969
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
970
- echo powerpc-be-beos
971
- exit ;;
972
- @@ -1206,6 +1248,12 @@ EOF
973
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
974
- echo i586-pc-beos
975
- exit ;;
976
- + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
977
- + echo i586-pc-haiku
978
- + exit ;;
979
- + x86_64:Haiku:*:*)
980
- + echo x86_64-unknown-haiku
981
- + exit ;;
982
- SX-4:SUPER-UX:*:*)
983
- echo sx4-nec-superux${UNAME_RELEASE}
984
- exit ;;
985
- @@ -1232,9 +1280,31 @@ EOF
986
- exit ;;
987
- *:Darwin:*:*)
988
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
989
- - case $UNAME_PROCESSOR in
990
- - unknown) UNAME_PROCESSOR=powerpc ;;
991
- - esac
992
- + eval $set_cc_for_build
993
- + if test "$UNAME_PROCESSOR" = unknown ; then
994
- + UNAME_PROCESSOR=powerpc
995
- + fi
996
- + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
997
- + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
998
- + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
999
- + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1000
- + grep IS_64BIT_ARCH >/dev/null
1001
- + then
1002
- + case $UNAME_PROCESSOR in
1003
- + i386) UNAME_PROCESSOR=x86_64 ;;
1004
- + powerpc) UNAME_PROCESSOR=powerpc64 ;;
1005
- + esac
1006
- + fi
1007
- + fi
1008
- + elif test "$UNAME_PROCESSOR" = i386 ; then
1009
- + # Avoid executing cc on OS X 10.9, as it ships with a stub
1010
- + # that puts up a graphical alert prompting to install
1011
- + # developer tools. Any system running Mac OS X 10.7 or
1012
- + # later (Darwin 11 and later) is required to have a 64-bit
1013
- + # processor. This is not true of the ARM version of Darwin
1014
- + # that Apple uses in portable devices.
1015
- + UNAME_PROCESSOR=x86_64
1016
- + fi
1017
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1018
- exit ;;
1019
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
1020
- @@ -1248,7 +1318,10 @@ EOF
1021
- *:QNX:*:4*)
1022
- echo i386-pc-qnx
1023
- exit ;;
1024
- - NSE-?:NONSTOP_KERNEL:*:*)
1025
- + NEO-?:NONSTOP_KERNEL:*:*)
1026
- + echo neo-tandem-nsk${UNAME_RELEASE}
1027
- + exit ;;
1028
- + NSE-*:NONSTOP_KERNEL:*:*)
1029
- echo nse-tandem-nsk${UNAME_RELEASE}
1030
- exit ;;
1031
- NSR-?:NONSTOP_KERNEL:*:*)
1032
- @@ -1293,13 +1366,13 @@ EOF
1033
- echo pdp10-unknown-its
1034
- exit ;;
1035
- SEI:*:*:SEIUX)
1036
- - echo mips-sei-seiux${UNAME_RELEASE}
1037
- + echo mips-sei-seiux${UNAME_RELEASE}
1038
- exit ;;
1039
- *:DragonFly:*:*)
1040
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1041
- exit ;;
1042
- *:*VMS:*:*)
1043
- - UNAME_MACHINE=`(uname -p) 2>/dev/null`
1044
- + UNAME_MACHINE=`(uname -p) 2>/dev/null`
1045
- case "${UNAME_MACHINE}" in
1046
- A*) echo alpha-dec-vms ; exit ;;
1047
- I*) echo ia64-dec-vms ; exit ;;
1048
- @@ -1314,158 +1387,13 @@ EOF
1049
- i*86:rdos:*:*)
1050
- echo ${UNAME_MACHINE}-pc-rdos
1051
- exit ;;
1052
- -esac
1053
- -
1054
- -#echo '(No uname command or uname output not recognized.)' 1>&2
1055
- -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1056
- -
1057
- -eval $set_cc_for_build
1058
- -cat >$dummy.c <<EOF
1059
- -#ifdef _SEQUENT_
1060
- -# include <sys/types.h>
1061
- -# include <sys/utsname.h>
1062
- -#endif
1063
- -main ()
1064
- -{
1065
- -#if defined (sony)
1066
- -#if defined (MIPSEB)
1067
- - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1068
- - I don't know.... */
1069
- - printf ("mips-sony-bsd\n"); exit (0);
1070
- -#else
1071
- -#include <sys/param.h>
1072
- - printf ("m68k-sony-newsos%s\n",
1073
- -#ifdef NEWSOS4
1074
- - "4"
1075
- -#else
1076
- - ""
1077
- -#endif
1078
- - ); exit (0);
1079
- -#endif
1080
- -#endif
1081
- -
1082
- -#if defined (__arm) && defined (__acorn) && defined (__unix)
1083
- - printf ("arm-acorn-riscix\n"); exit (0);
1084
- -#endif
1085
- -
1086
- -#if defined (hp300) && !defined (hpux)
1087
- - printf ("m68k-hp-bsd\n"); exit (0);
1088
- -#endif
1089
- -
1090
- -#if defined (NeXT)
1091
- -#if !defined (__ARCHITECTURE__)
1092
- -#define __ARCHITECTURE__ "m68k"
1093
- -#endif
1094
- - int version;
1095
- - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1096
- - if (version < 4)
1097
- - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1098
- - else
1099
- - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1100
- - exit (0);
1101
- -#endif
1102
- -
1103
- -#if defined (MULTIMAX) || defined (n16)
1104
- -#if defined (UMAXV)
1105
- - printf ("ns32k-encore-sysv\n"); exit (0);
1106
- -#else
1107
- -#if defined (CMU)
1108
- - printf ("ns32k-encore-mach\n"); exit (0);
1109
- -#else
1110
- - printf ("ns32k-encore-bsd\n"); exit (0);
1111
- -#endif
1112
- -#endif
1113
- -#endif
1114
- -
1115
- -#if defined (__386BSD__)
1116
- - printf ("i386-pc-bsd\n"); exit (0);
1117
- -#endif
1118
- -
1119
- -#if defined (sequent)
1120
- -#if defined (i386)
1121
- - printf ("i386-sequent-dynix\n"); exit (0);
1122
- -#endif
1123
- -#if defined (ns32000)
1124
- - printf ("ns32k-sequent-dynix\n"); exit (0);
1125
- -#endif
1126
- -#endif
1127
- -
1128
- -#if defined (_SEQUENT_)
1129
- - struct utsname un;
1130
- -
1131
- - uname(&un);
1132
- -
1133
- - if (strncmp(un.version, "V2", 2) == 0) {
1134
- - printf ("i386-sequent-ptx2\n"); exit (0);
1135
- - }
1136
- - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1137
- - printf ("i386-sequent-ptx1\n"); exit (0);
1138
- - }
1139
- - printf ("i386-sequent-ptx\n"); exit (0);
1140
- -
1141
- -#endif
1142
- -
1143
- -#if defined (vax)
1144
- -# if !defined (ultrix)
1145
- -# include <sys/param.h>
1146
- -# if defined (BSD)
1147
- -# if BSD == 43
1148
- - printf ("vax-dec-bsd4.3\n"); exit (0);
1149
- -# else
1150
- -# if BSD == 199006
1151
- - printf ("vax-dec-bsd4.3reno\n"); exit (0);
1152
- -# else
1153
- - printf ("vax-dec-bsd\n"); exit (0);
1154
- -# endif
1155
- -# endif
1156
- -# else
1157
- - printf ("vax-dec-bsd\n"); exit (0);
1158
- -# endif
1159
- -# else
1160
- - printf ("vax-dec-ultrix\n"); exit (0);
1161
- -# endif
1162
- -#endif
1163
- -
1164
- -#if defined (alliant) && defined (i860)
1165
- - printf ("i860-alliant-bsd\n"); exit (0);
1166
- -#endif
1167
- -
1168
- - exit (1);
1169
- -}
1170
- -EOF
1171
- -
1172
- -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1173
- - { echo "$SYSTEM_NAME"; exit; }
1174
- -
1175
- -# Apollos put the system type in the environment.
1176
- -
1177
- -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1178
- -
1179
- -# Convex versions that predate uname can use getsysinfo(1)
1180
- -
1181
- -if [ -x /usr/convex/getsysinfo ]
1182
- -then
1183
- - case `getsysinfo -f cpu_type` in
1184
- - c1*)
1185
- - echo c1-convex-bsd
1186
- - exit ;;
1187
- - c2*)
1188
- - if getsysinfo -f scalar_acc
1189
- - then echo c32-convex-bsd
1190
- - else echo c2-convex-bsd
1191
- - fi
1192
- - exit ;;
1193
- - c34*)
1194
- - echo c34-convex-bsd
1195
- - exit ;;
1196
- - c38*)
1197
- - echo c38-convex-bsd
1198
- + i*86:AROS:*:*)
1199
- + echo ${UNAME_MACHINE}-pc-aros
1200
- exit ;;
1201
- - c4*)
1202
- - echo c4-convex-bsd
1203
- + x86_64:VMkernel:*:*)
1204
- + echo ${UNAME_MACHINE}-unknown-esx
1205
- exit ;;
1206
- - esac
1207
- -fi
1208
- +esac
1209
-
1210
- cat >&2 <<EOF
1211
- $0: unable to guess system type
1212
- @@ -1474,9 +1402,9 @@ This script, last modified $timestamp, has failed to recognize
1213
- the operating system you are using. It is advised that you
1214
- download the most up to date version of the config scripts from
1215
-
1216
- - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1217
- + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1218
- and
1219
- - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1220
- + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1221
-
1222
- If the version you run ($0) is already up to date, please
1223
- send the following data and any information you think might be
1224
- --
1225
- 2.1.4
1226
-