passenger 4.0.5 → 4.0.6

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

Potentially problematic release.


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

Files changed (162) hide show
  1. data.tar.gz.asc +7 -7
  2. data/.travis.yml +1 -2
  3. data/CONTRIBUTING.md +20 -5
  4. data/CONTRIBUTORS +67 -0
  5. data/LICENSE +1 -1
  6. data/NEWS +48 -0
  7. data/Rakefile +2 -2
  8. data/bin/passenger-config +18 -0
  9. data/bin/passenger-install-apache2-module +2 -0
  10. data/bin/passenger-install-nginx-module +11 -12
  11. data/bin/passenger-memory-stats +2 -0
  12. data/bin/passenger-status +152 -69
  13. data/build/agents.rb +1 -5
  14. data/build/basics.rb +26 -13
  15. data/build/cplusplus_support.rb +9 -0
  16. data/build/debian.rb +129 -0
  17. data/build/documentation.rb +6 -2
  18. data/build/integration_tests.rb +13 -2
  19. data/build/misc.rb +16 -0
  20. data/build/packaging.rb +67 -51
  21. data/build/preprocessor.rb +314 -0
  22. data/build/test_basics.rb +1 -0
  23. data/{debian → debian.template}/README.Debian +0 -0
  24. data/{debian → debian.template}/changelog +131 -0
  25. data/debian.template/compat +1 -0
  26. data/debian.template/control +71 -0
  27. data/debian.template/copyright +385 -0
  28. data/debian.template/libapache2-mod-passenger.install +3 -0
  29. data/{debian → debian.template}/libapache2-mod-passenger.postinst +0 -0
  30. data/{debian → debian.template}/libapache2-mod-passenger.prerm +0 -0
  31. data/debian.template/locations.ini +12 -0
  32. data/debian.template/passenger.conf +4 -0
  33. data/{debian → debian.template}/passenger.load +0 -0
  34. data/debian.template/patches/series +0 -0
  35. data/debian.template/repack.sh +42 -0
  36. data/debian.template/ruby-passenger-dev.install +3 -0
  37. data/debian.template/ruby-passenger-doc.install +2 -0
  38. data/debian.template/ruby-passenger.docs +4 -0
  39. data/debian.template/ruby-passenger.install +11 -0
  40. data/debian.template/ruby-passenger.manpages +4 -0
  41. data/debian.template/rules.template +35 -0
  42. data/debian.template/source/format +1 -0
  43. data/debian.template/watch +3 -0
  44. data/dev/run_travis.sh +46 -46
  45. data/doc/Architectural overview.html +2 -2
  46. data/doc/Packaging.html +27 -18
  47. data/doc/Packaging.txt.md +27 -18
  48. data/doc/Security of user switching support.html +2 -2
  49. data/doc/Users guide Apache.html +881 -95
  50. data/doc/Users guide Apache.idmap.txt +48 -6
  51. data/doc/Users guide Apache.txt +13 -1
  52. data/doc/Users guide Nginx.html +1063 -190
  53. data/doc/Users guide Nginx.idmap.txt +89 -45
  54. data/doc/Users guide Nginx.txt +45 -0
  55. data/doc/Users guide Standalone.html +7 -7
  56. data/doc/users_guide_snippets/alternative_for_flying_passenger.txt +1 -0
  57. data/doc/users_guide_snippets/environment_variables.txt +221 -0
  58. data/doc/users_guide_snippets/installation.txt +66 -17
  59. data/doc/users_guide_snippets/support_information.txt +3 -3
  60. data/doc/users_guide_snippets/tips.txt +352 -40
  61. data/ext/common/Account.h +4 -3
  62. data/ext/common/AccountsDatabase.h +6 -6
  63. data/ext/common/AgentsStarter.h +1 -13
  64. data/ext/common/ApplicationPool2/DirectSpawner.h +4 -4
  65. data/ext/common/ApplicationPool2/DummySpawner.h +1 -1
  66. data/ext/common/ApplicationPool2/Group.h +9 -4
  67. data/ext/common/ApplicationPool2/Implementation.cpp +6 -1
  68. data/ext/common/ApplicationPool2/Options.h +65 -37
  69. data/ext/common/ApplicationPool2/Pool.h +91 -41
  70. data/ext/common/ApplicationPool2/Process.h +6 -6
  71. data/ext/common/ApplicationPool2/SmartSpawner.h +14 -14
  72. data/ext/common/ApplicationPool2/Socket.h +1 -1
  73. data/ext/common/ApplicationPool2/Spawner.h +24 -16
  74. data/ext/common/ApplicationPool2/SpawnerFactory.h +9 -1
  75. data/ext/common/ApplicationPool2/SuperGroup.h +1 -1
  76. data/ext/common/Constants.h +1 -1
  77. data/ext/common/Logging.cpp +12 -7
  78. data/ext/common/MessageServer.h +7 -12
  79. data/ext/common/MultiLibeio.cpp +5 -5
  80. data/ext/common/ResourceLocator.h +2 -6
  81. data/ext/common/ServerInstanceDir.h +37 -10
  82. data/ext/common/UnionStation.h +10 -10
  83. data/ext/common/Utils.cpp +30 -4
  84. data/ext/common/Utils.h +7 -0
  85. data/ext/common/Utils/BlockingQueue.h +2 -2
  86. data/ext/common/Utils/Lock.h +2 -2
  87. data/ext/common/Utils/MessagePassing.h +2 -2
  88. data/ext/common/Utils/Timer.h +4 -4
  89. data/ext/common/agents/HelperAgent/AgentOptions.h +2 -0
  90. data/ext/common/agents/HelperAgent/Main.cpp +57 -16
  91. data/ext/common/agents/HelperAgent/RequestHandler.h +4 -1
  92. data/ext/common/agents/LoggingAgent/AdminController.h +91 -0
  93. data/ext/common/agents/LoggingAgent/LoggingServer.h +46 -29
  94. data/ext/common/agents/LoggingAgent/Main.cpp +43 -16
  95. data/ext/common/agents/LoggingAgent/RemoteSender.h +7 -7
  96. data/ext/common/agents/Watchdog/AgentWatcher.cpp +11 -11
  97. data/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp +3 -1
  98. data/ext/common/agents/Watchdog/Main.cpp +62 -0
  99. data/ext/libeio/config.guess +206 -167
  100. data/ext/libeio/config.sub +142 -68
  101. data/ext/libev/config.guess +304 -290
  102. data/ext/libev/config.sub +198 -77
  103. data/ext/nginx/config +4 -0
  104. data/ext/nginx/ngx_http_passenger_module.c +1 -0
  105. data/ext/oxt/implementation.cpp +4 -4
  106. data/lib/phusion_passenger.rb +14 -5
  107. data/lib/phusion_passenger/abstract_installer.rb +41 -0
  108. data/lib/phusion_passenger/admin_tools/server_instance.rb +48 -39
  109. data/lib/phusion_passenger/message_client.rb +31 -7
  110. data/lib/phusion_passenger/native_support.rb +35 -12
  111. data/lib/phusion_passenger/packaging.rb +16 -2
  112. data/lib/phusion_passenger/platform_info/binary_compatibility.rb +6 -31
  113. data/lib/phusion_passenger/platform_info/operating_system.rb +1 -1
  114. data/lib/phusion_passenger/preloader_shared_helpers.rb +3 -1
  115. data/lib/phusion_passenger/request_handler.rb +1 -1
  116. data/lib/phusion_passenger/standalone/command.rb +6 -6
  117. data/lib/phusion_passenger/standalone/main.rb +23 -8
  118. data/lib/phusion_passenger/standalone/package_runtime_command.rb +9 -5
  119. data/lib/phusion_passenger/standalone/runtime_installer.rb +9 -10
  120. data/lib/phusion_passenger/standalone/start_command.rb +20 -4
  121. data/resources/templates/installer_common/freebsd9_broken_cxx_runtime.txt.erb +19 -0
  122. data/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb +22 -0
  123. data/resources/templates/standalone/config.erb +3 -2
  124. data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +4 -4
  125. data/test/cxx/ApplicationPool2/PoolTest.cpp +1 -1
  126. data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +7 -7
  127. data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +9 -9
  128. data/test/cxx/EventedBufferedInputTest.cpp +17 -17
  129. data/test/cxx/RequestHandlerTest.cpp +5 -5
  130. data/test/cxx/ServerInstanceDirTest.cpp +3 -1
  131. data/test/cxx/TestSupport.h +4 -4
  132. data/test/cxx/UnionStationTest.cpp +3 -1
  133. data/test/cxx/UtilsTest.cpp +2 -0
  134. data/test/integration_tests/apache2_tests.rb +2 -2
  135. data/test/integration_tests/native_packaging_spec.rb +170 -0
  136. data/test/ruby/spec_helper.rb +0 -1
  137. data/test/stub/apache2/httpd.conf.erb +1 -1
  138. data/test/stub/nginx/nginx.conf.erb +1 -0
  139. data/test/support/apache2_controller.rb +1 -1
  140. data/test/support/placebo-preloader.rb +1 -1
  141. data/test/support/test_helper.rb +5 -2
  142. metadata +32 -26
  143. metadata.gz.asc +7 -7
  144. data/debian/compat +0 -1
  145. data/debian/control +0 -49
  146. data/debian/copyright +0 -20
  147. data/debian/libapache2-mod-passenger.install +0 -1
  148. data/debian/passenger-common.install +0 -4
  149. data/debian/passenger.conf +0 -4
  150. data/debian/prerm +0 -2
  151. data/debian/rules +0 -37
  152. data/debian/watch +0 -3
  153. data/dev/googlecode_upload.py +0 -265
  154. data/ext/common/agents/HelperAgent/BacktracesServer.h +0 -60
  155. data/resources/templates/nginx/not_available_when_natively_packaged.txt.erb +0 -8
  156. data/test/stub/rails3.1/app/assets/javascripts/application.js +0 -9
  157. data/test/stub/rails3.2/app/assets/javascripts/application.js +0 -15
  158. data/test/stub/rails_apps/2.3/mycook/public/javascripts/application.js +0 -2
  159. data/test/stub/rails_apps/2.3/mycook/public/javascripts/controls.js +0 -963
  160. data/test/stub/rails_apps/2.3/mycook/public/javascripts/dragdrop.js +0 -973
  161. data/test/stub/rails_apps/2.3/mycook/public/javascripts/effects.js +0 -1128
  162. data/test/stub/rails_apps/2.3/mycook/public/javascripts/prototype.js +0 -4320
@@ -1,10 +1,10 @@
1
1
  #! /bin/sh
2
2
  # Attempt to guess a canonical system name.
3
3
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
- # Free Software Foundation, Inc.
4
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
+ # 2011, 2012 Free Software Foundation, Inc.
6
6
 
7
- timestamp='2009-11-20'
7
+ timestamp='2012-02-10'
8
8
 
9
9
  # This file is free software; you can redistribute it and/or modify it
10
10
  # under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2009-11-20'
17
17
  # General Public License for more details.
18
18
  #
19
19
  # You should have received a copy of the GNU General Public License
20
- # along with this program; if not, write to the Free Software
21
- # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
- # 02110-1301, USA.
20
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
23
21
  #
24
22
  # As a special exception to the GNU General Public License, if you
25
23
  # distribute this file as part of a program that contains a
@@ -56,8 +54,9 @@ version="\
56
54
  GNU config.guess ($timestamp)
57
55
 
58
56
  Originally written by Per Bothner.
59
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
- 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
57
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
59
+ Free Software Foundation, Inc.
61
60
 
62
61
  This is free software; see the source for copying conditions. There is NO
63
62
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -139,12 +138,22 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139
138
  UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140
139
  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
140
 
141
+ case "${UNAME_MACHINE}" in
142
+ i?86)
143
+ test -z "$VENDOR" && VENDOR=pc
144
+ ;;
145
+ *)
146
+ test -z "$VENDOR" && VENDOR=unknown
147
+ ;;
148
+ esac
149
+ test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
150
+
142
151
  # Note: order is significant - the case branches are not exclusive.
143
152
 
144
153
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145
154
  *:NetBSD:*:*)
146
155
  # NetBSD (nbsd) targets should (where applicable) match one or
147
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
156
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148
157
  # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149
158
  # switched to ELF, *-*-netbsd* would select the old
150
159
  # object file format. This provides both forward
@@ -180,7 +189,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
180
189
  fi
181
190
  ;;
182
191
  *)
183
- os=netbsd
192
+ os=netbsd
184
193
  ;;
185
194
  esac
186
195
  # The OS release
@@ -203,19 +212,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
203
212
  exit ;;
204
213
  *:OpenBSD:*:*)
205
214
  UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
215
+ echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
207
216
  exit ;;
208
217
  *:ekkoBSD:*:*)
209
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
218
+ echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
210
219
  exit ;;
211
220
  *:SolidBSD:*:*)
212
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
221
+ echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
213
222
  exit ;;
214
223
  macppc:MirBSD:*:*)
215
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
224
+ echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
216
225
  exit ;;
217
226
  *:MirBSD:*:*)
218
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
227
+ echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
219
228
  exit ;;
220
229
  alpha:OSF1:*:*)
221
230
  case $UNAME_RELEASE in
@@ -223,7 +232,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
223
232
  UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224
233
  ;;
225
234
  *5.*)
226
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
235
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227
236
  ;;
228
237
  esac
229
238
  # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +278,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
269
278
  # A Xn.n version is an unreleased experimental baselevel.
270
279
  # 1.2 uses "1.2" for uname -r.
271
280
  echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272
- exit ;;
281
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
282
+ exitcode=$?
283
+ trap '' 0
284
+ exit $exitcode ;;
273
285
  Alpha\ *:Windows_NT*:*)
274
286
  # How do we know it's Interix rather than the generic POSIX subsystem?
275
287
  # Should we change UNAME_MACHINE based on the output of uname instead
@@ -280,13 +292,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
280
292
  echo alpha-dec-winnt3.5
281
293
  exit ;;
282
294
  Amiga*:UNIX_System_V:4.0:*)
283
- echo m68k-unknown-sysv4
295
+ echo m68k-${VENDOR}-sysv4
284
296
  exit ;;
285
297
  *:[Aa]miga[Oo][Ss]:*:*)
286
- echo ${UNAME_MACHINE}-unknown-amigaos
298
+ echo ${UNAME_MACHINE}-${VENDOR}-amigaos
287
299
  exit ;;
288
300
  *:[Mm]orph[Oo][Ss]:*:*)
289
- echo ${UNAME_MACHINE}-unknown-morphos
301
+ echo ${UNAME_MACHINE}-${VENDOR}-morphos
290
302
  exit ;;
291
303
  *:OS/390:*:*)
292
304
  echo i370-ibm-openedition
@@ -295,13 +307,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
295
307
  echo s390-ibm-zvmoe
296
308
  exit ;;
297
309
  *:OS400:*:*)
298
- echo powerpc-ibm-os400
310
+ echo powerpc-ibm-os400
299
311
  exit ;;
300
312
  arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301
313
  echo arm-acorn-riscix${UNAME_RELEASE}
302
314
  exit ;;
303
315
  arm:riscos:*:*|arm:RISCOS:*:*)
304
- echo arm-unknown-riscos
316
+ echo arm-${VENDOR}-riscos
305
317
  exit ;;
306
318
  SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
307
319
  echo hppa1.1-hitachi-hiuxmpp
@@ -394,23 +406,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
394
406
  # MiNT. But MiNT is downward compatible to TOS, so this should
395
407
  # be no problem.
396
408
  atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
397
- echo m68k-atari-mint${UNAME_RELEASE}
409
+ echo m68k-atari-mint${UNAME_RELEASE}
398
410
  exit ;;
399
411
  atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
400
412
  echo m68k-atari-mint${UNAME_RELEASE}
401
- exit ;;
413
+ exit ;;
402
414
  *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
403
- echo m68k-atari-mint${UNAME_RELEASE}
415
+ echo m68k-atari-mint${UNAME_RELEASE}
404
416
  exit ;;
405
417
  milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
406
- echo m68k-milan-mint${UNAME_RELEASE}
407
- exit ;;
418
+ echo m68k-milan-mint${UNAME_RELEASE}
419
+ exit ;;
408
420
  hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
409
- echo m68k-hades-mint${UNAME_RELEASE}
410
- exit ;;
421
+ echo m68k-hades-mint${UNAME_RELEASE}
422
+ exit ;;
411
423
  *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
412
- echo m68k-unknown-mint${UNAME_RELEASE}
413
- exit ;;
424
+ echo m68k-${VENDOR}-mint${UNAME_RELEASE}
425
+ exit ;;
414
426
  m68k:machten:*:*)
415
427
  echo m68k-apple-machten${UNAME_RELEASE}
416
428
  exit ;;
@@ -480,8 +492,8 @@ EOF
480
492
  echo m88k-motorola-sysv3
481
493
  exit ;;
482
494
  AViiON:dgux:*:*)
483
- # DG/UX returns AViiON for all architectures
484
- UNAME_PROCESSOR=`/usr/bin/uname -p`
495
+ # DG/UX returns AViiON for all architectures
496
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
485
497
  if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
486
498
  then
487
499
  if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -494,7 +506,7 @@ EOF
494
506
  else
495
507
  echo i586-dg-dgux${UNAME_RELEASE}
496
508
  fi
497
- exit ;;
509
+ exit ;;
498
510
  M88*:DolphinOS:*:*) # DolphinOS (SVR3)
499
511
  echo m88k-dolphin-sysv3
500
512
  exit ;;
@@ -551,7 +563,7 @@ EOF
551
563
  echo rs6000-ibm-aix3.2
552
564
  fi
553
565
  exit ;;
554
- *:AIX:*:[456])
566
+ *:AIX:*:[4567])
555
567
  IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
556
568
  if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
557
569
  IBM_ARCH=rs6000
@@ -594,52 +606,52 @@ EOF
594
606
  9000/[678][0-9][0-9])
595
607
  if [ -x /usr/bin/getconf ]; then
596
608
  sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
597
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
598
- case "${sc_cpu_version}" in
599
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
600
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
601
- 532) # CPU_PA_RISC2_0
602
- case "${sc_kernel_bits}" in
603
- 32) HP_ARCH="hppa2.0n" ;;
604
- 64) HP_ARCH="hppa2.0w" ;;
609
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
610
+ case "${sc_cpu_version}" in
611
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
612
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
613
+ 532) # CPU_PA_RISC2_0
614
+ case "${sc_kernel_bits}" in
615
+ 32) HP_ARCH="hppa2.0n" ;;
616
+ 64) HP_ARCH="hppa2.0w" ;;
605
617
  '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
606
- esac ;;
607
- esac
618
+ esac ;;
619
+ esac
608
620
  fi
609
621
  if [ "${HP_ARCH}" = "" ]; then
610
622
  eval $set_cc_for_build
611
- sed 's/^ //' << EOF >$dummy.c
623
+ sed 's/^ //' << EOF >$dummy.c
612
624
 
613
- #define _HPUX_SOURCE
614
- #include <stdlib.h>
615
- #include <unistd.h>
625
+ #define _HPUX_SOURCE
626
+ #include <stdlib.h>
627
+ #include <unistd.h>
616
628
 
617
- int main ()
618
- {
619
- #if defined(_SC_KERNEL_BITS)
620
- long bits = sysconf(_SC_KERNEL_BITS);
621
- #endif
622
- long cpu = sysconf (_SC_CPU_VERSION);
629
+ int main ()
630
+ {
631
+ #if defined(_SC_KERNEL_BITS)
632
+ long bits = sysconf(_SC_KERNEL_BITS);
633
+ #endif
634
+ long cpu = sysconf (_SC_CPU_VERSION);
623
635
 
624
- switch (cpu)
625
- {
626
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
627
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
628
- case CPU_PA_RISC2_0:
629
- #if defined(_SC_KERNEL_BITS)
630
- switch (bits)
631
- {
632
- case 64: puts ("hppa2.0w"); break;
633
- case 32: puts ("hppa2.0n"); break;
634
- default: puts ("hppa2.0"); break;
635
- } break;
636
- #else /* !defined(_SC_KERNEL_BITS) */
637
- puts ("hppa2.0"); break;
638
- #endif
639
- default: puts ("hppa1.0"); break;
640
- }
641
- exit (0);
642
- }
636
+ switch (cpu)
637
+ {
638
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
639
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
640
+ case CPU_PA_RISC2_0:
641
+ #if defined(_SC_KERNEL_BITS)
642
+ switch (bits)
643
+ {
644
+ case 64: puts ("hppa2.0w"); break;
645
+ case 32: puts ("hppa2.0n"); break;
646
+ default: puts ("hppa2.0"); break;
647
+ } break;
648
+ #else /* !defined(_SC_KERNEL_BITS) */
649
+ puts ("hppa2.0"); break;
650
+ #endif
651
+ default: puts ("hppa1.0"); break;
652
+ }
653
+ exit (0);
654
+ }
643
655
  EOF
644
656
  (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
645
657
  test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -720,9 +732,9 @@ EOF
720
732
  exit ;;
721
733
  i*86:OSF1:*:*)
722
734
  if [ -x /usr/sbin/sysversion ] ; then
723
- echo ${UNAME_MACHINE}-unknown-osf1mk
735
+ echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
724
736
  else
725
- echo ${UNAME_MACHINE}-unknown-osf1
737
+ echo ${UNAME_MACHINE}-${VENDOR}-osf1
726
738
  fi
727
739
  exit ;;
728
740
  parisc*:Lites*:*:*)
@@ -730,22 +742,22 @@ EOF
730
742
  exit ;;
731
743
  C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
732
744
  echo c1-convex-bsd
733
- exit ;;
745
+ exit ;;
734
746
  C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
735
747
  if getsysinfo -f scalar_acc
736
748
  then echo c32-convex-bsd
737
749
  else echo c2-convex-bsd
738
750
  fi
739
- exit ;;
751
+ exit ;;
740
752
  C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
741
753
  echo c34-convex-bsd
742
- exit ;;
754
+ exit ;;
743
755
  C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
744
756
  echo c38-convex-bsd
745
- exit ;;
757
+ exit ;;
746
758
  C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
747
759
  echo c4-convex-bsd
748
- exit ;;
760
+ exit ;;
749
761
  CRAY*Y-MP:*:*:*)
750
762
  echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
751
763
  exit ;;
@@ -769,32 +781,31 @@ EOF
769
781
  exit ;;
770
782
  F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
771
783
  FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
772
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
773
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
774
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
775
- exit ;;
784
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
785
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
786
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
787
+ exit ;;
776
788
  5000:UNIX_System_V:4.*:*)
777
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
778
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
779
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
789
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
790
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
791
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
780
792
  exit ;;
781
793
  i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
782
794
  echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
783
795
  exit ;;
784
796
  sparc*:BSD/OS:*:*)
785
- echo sparc-unknown-bsdi${UNAME_RELEASE}
797
+ echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
786
798
  exit ;;
787
799
  *:BSD/OS:*:*)
788
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
800
+ echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
789
801
  exit ;;
790
802
  *:FreeBSD:*:*)
791
- case ${UNAME_MACHINE} in
792
- pc98)
793
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
803
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
804
+ case ${UNAME_PROCESSOR} in
794
805
  amd64)
795
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
806
+ echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
796
807
  *)
797
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
808
+ echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798
809
  esac
799
810
  exit ;;
800
811
  i*:CYGWIN*:*)
@@ -803,23 +814,26 @@ EOF
803
814
  *:MINGW*:*)
804
815
  echo ${UNAME_MACHINE}-pc-mingw32
805
816
  exit ;;
817
+ i*:MSYS*:*)
818
+ echo ${UNAME_MACHINE}-pc-msys
819
+ exit ;;
806
820
  i*:windows32*:*)
807
- # uname -m includes "-pc" on this system.
808
- echo ${UNAME_MACHINE}-mingw32
821
+ # uname -m includes "-pc" on this system.
822
+ echo ${UNAME_MACHINE}-mingw32
809
823
  exit ;;
810
824
  i*:PW*:*)
811
825
  echo ${UNAME_MACHINE}-pc-pw32
812
826
  exit ;;
813
827
  *:Interix*:*)
814
- case ${UNAME_MACHINE} in
828
+ case ${UNAME_MACHINE} in
815
829
  x86)
816
830
  echo i586-pc-interix${UNAME_RELEASE}
817
831
  exit ;;
818
832
  authenticamd | genuineintel | EM64T)
819
- echo x86_64-unknown-interix${UNAME_RELEASE}
833
+ echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
820
834
  exit ;;
821
835
  IA64)
822
- echo ia64-unknown-interix${UNAME_RELEASE}
836
+ echo ia64-${VENDOR}-interix${UNAME_RELEASE}
823
837
  exit ;;
824
838
  esac ;;
825
839
  [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@@ -838,25 +852,32 @@ EOF
838
852
  echo ${UNAME_MACHINE}-pc-uwin
839
853
  exit ;;
840
854
  amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
841
- echo x86_64-unknown-cygwin
855
+ echo x86_64-${VENDOR}-cygwin
842
856
  exit ;;
843
857
  p*:CYGWIN*:*)
844
- echo powerpcle-unknown-cygwin
858
+ echo powerpcle-${VENDOR}-cygwin
845
859
  exit ;;
846
860
  prep*:SunOS:5.*:*)
847
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
861
+ echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
848
862
  exit ;;
849
863
  *:GNU:*:*)
850
864
  # the GNU system
851
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
865
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
852
866
  exit ;;
853
867
  *:GNU/*:*:*)
854
868
  # other systems with GNU libc and userland
855
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
869
+ echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
856
870
  exit ;;
857
871
  i*86:Minix:*:*)
858
872
  echo ${UNAME_MACHINE}-pc-minix
859
873
  exit ;;
874
+ aarch64:Linux:*:*)
875
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
876
+ exit ;;
877
+ aarch64_be:Linux:*:*)
878
+ UNAME_MACHINE=aarch64_be
879
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
880
+ exit ;;
860
881
  alpha:Linux:*:*)
861
882
  case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
862
883
  EV5) UNAME_MACHINE=alphaev5 ;;
@@ -866,32 +887,41 @@ EOF
866
887
  EV6) UNAME_MACHINE=alphaev6 ;;
867
888
  EV67) UNAME_MACHINE=alphaev67 ;;
868
889
  EV68*) UNAME_MACHINE=alphaev68 ;;
869
- esac
890
+ esac
870
891
  objdump --private-headers /bin/sh | grep -q ld.so.1
871
892
  if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
893
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
873
894
  exit ;;
874
895
  arm*:Linux:*:*)
875
896
  eval $set_cc_for_build
876
897
  if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
877
898
  | grep -q __ARM_EABI__
878
899
  then
879
- echo ${UNAME_MACHINE}-unknown-linux-gnu
900
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
880
901
  else
881
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
902
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
903
+ | grep -q __ARM_PCS_VFP
904
+ then
905
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
906
+ else
907
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabihf
908
+ fi
882
909
  fi
883
910
  exit ;;
884
911
  avr32*:Linux:*:*)
885
- echo ${UNAME_MACHINE}-unknown-linux-gnu
912
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
886
913
  exit ;;
887
914
  cris:Linux:*:*)
888
- echo cris-axis-linux-gnu
915
+ echo ${UNAME_MACHINE}-axis-linux-gnu
889
916
  exit ;;
890
917
  crisv32:Linux:*:*)
891
- echo crisv32-axis-linux-gnu
918
+ echo ${UNAME_MACHINE}-axis-linux-gnu
892
919
  exit ;;
893
920
  frv:Linux:*:*)
894
- echo frv-unknown-linux-gnu
921
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
922
+ exit ;;
923
+ hexagon:Linux:*:*)
924
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
895
925
  exit ;;
896
926
  i*86:Linux:*:*)
897
927
  LIBC=gnu
@@ -905,13 +935,13 @@ EOF
905
935
  echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
906
936
  exit ;;
907
937
  ia64:Linux:*:*)
908
- echo ${UNAME_MACHINE}-unknown-linux-gnu
938
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
909
939
  exit ;;
910
940
  m32r*:Linux:*:*)
911
- echo ${UNAME_MACHINE}-unknown-linux-gnu
941
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
912
942
  exit ;;
913
943
  m68*:Linux:*:*)
914
- echo ${UNAME_MACHINE}-unknown-linux-gnu
944
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
915
945
  exit ;;
916
946
  mips:Linux:*:* | mips64:Linux:*:*)
917
947
  eval $set_cc_for_build
@@ -930,51 +960,54 @@ EOF
930
960
  #endif
931
961
  EOF
932
962
  eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
933
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
963
+ test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
934
964
  ;;
935
965
  or32:Linux:*:*)
936
- echo or32-unknown-linux-gnu
966
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
937
967
  exit ;;
938
968
  padre:Linux:*:*)
939
- echo sparc-unknown-linux-gnu
969
+ echo sparc-${VENDOR}-linux-gnu
940
970
  exit ;;
941
971
  parisc64:Linux:*:* | hppa64:Linux:*:*)
942
- echo hppa64-unknown-linux-gnu
972
+ echo hppa64-${VENDOR}-linux-gnu
943
973
  exit ;;
944
974
  parisc:Linux:*:* | hppa:Linux:*:*)
945
975
  # Look for CPU level
946
976
  case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
947
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
948
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
949
- *) echo hppa-unknown-linux-gnu ;;
977
+ PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
978
+ PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
979
+ *) echo hppa-${VENDOR}-linux-gnu ;;
950
980
  esac
951
981
  exit ;;
952
982
  ppc64:Linux:*:*)
953
- echo powerpc64-unknown-linux-gnu
983
+ echo powerpc64-${VENDOR}-linux-gnu
954
984
  exit ;;
955
985
  ppc:Linux:*:*)
956
- echo powerpc-unknown-linux-gnu
986
+ echo powerpc-${VENDOR}-linux-gnu
957
987
  exit ;;
958
988
  s390:Linux:*:* | s390x:Linux:*:*)
959
989
  echo ${UNAME_MACHINE}-ibm-linux
960
990
  exit ;;
961
991
  sh64*:Linux:*:*)
962
- echo ${UNAME_MACHINE}-unknown-linux-gnu
992
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
963
993
  exit ;;
964
994
  sh*:Linux:*:*)
965
- echo ${UNAME_MACHINE}-unknown-linux-gnu
995
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
966
996
  exit ;;
967
997
  sparc:Linux:*:* | sparc64:Linux:*:*)
968
- echo ${UNAME_MACHINE}-unknown-linux-gnu
998
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
999
+ exit ;;
1000
+ tile*:Linux:*:*)
1001
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
969
1002
  exit ;;
970
1003
  vax:Linux:*:*)
971
1004
  echo ${UNAME_MACHINE}-dec-linux-gnu
972
1005
  exit ;;
973
1006
  x86_64:Linux:*:*)
974
- echo x86_64-unknown-linux-gnu
1007
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
975
1008
  exit ;;
976
1009
  xtensa*:Linux:*:*)
977
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1010
+ echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
978
1011
  exit ;;
979
1012
  i*86:DYNIX/ptx:4*:*)
980
1013
  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -983,11 +1016,11 @@ EOF
983
1016
  echo i386-sequent-sysv4
984
1017
  exit ;;
985
1018
  i*86:UNIX_SV:4.2MP:2.*)
986
- # Unixware is an offshoot of SVR4, but it has its own version
987
- # number series starting with 2...
988
- # I am not positive that other SVR4 systems won't match this,
1019
+ # Unixware is an offshoot of SVR4, but it has its own version
1020
+ # number series starting with 2...
1021
+ # I am not positive that other SVR4 systems won't match this,
989
1022
  # I just have to hope. -- rms.
990
- # Use sysv4.2uw... so that sysv4* matches it.
1023
+ # Use sysv4.2uw... so that sysv4* matches it.
991
1024
  echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
992
1025
  exit ;;
993
1026
  i*86:OS/2:*:*)
@@ -996,16 +1029,16 @@ EOF
996
1029
  echo ${UNAME_MACHINE}-pc-os2-emx
997
1030
  exit ;;
998
1031
  i*86:XTS-300:*:STOP)
999
- echo ${UNAME_MACHINE}-unknown-stop
1032
+ echo ${UNAME_MACHINE}-${VENDOR}-stop
1000
1033
  exit ;;
1001
1034
  i*86:atheos:*:*)
1002
- echo ${UNAME_MACHINE}-unknown-atheos
1035
+ echo ${UNAME_MACHINE}-${VENDOR}-atheos
1003
1036
  exit ;;
1004
1037
  i*86:syllable:*:*)
1005
1038
  echo ${UNAME_MACHINE}-pc-syllable
1006
1039
  exit ;;
1007
1040
  i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1008
- echo i386-unknown-lynxos${UNAME_RELEASE}
1041
+ echo i386-${VENODR}-lynxos${UNAME_RELEASE}
1009
1042
  exit ;;
1010
1043
  i*86:*DOS:*:*)
1011
1044
  echo ${UNAME_MACHINE}-pc-msdosdjgpp
@@ -1019,13 +1052,13 @@ EOF
1019
1052
  fi
1020
1053
  exit ;;
1021
1054
  i*86:*:5:[678]*)
1022
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
1055
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
1023
1056
  case `/bin/uname -X | grep "^Machine"` in
1024
1057
  *486*) UNAME_MACHINE=i486 ;;
1025
1058
  *Pentium) UNAME_MACHINE=i586 ;;
1026
1059
  *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1027
1060
  esac
1028
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1061
+ echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1029
1062
  exit ;;
1030
1063
  i*86:*:3.2:*)
1031
1064
  if test -f /usr/options/cb.name; then
@@ -1047,13 +1080,13 @@ EOF
1047
1080
  exit ;;
1048
1081
  pc:*:*:*)
1049
1082
  # Left here for compatibility:
1050
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
1051
- # the processor, so we play safe by assuming i586.
1083
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
1084
+ # the processor, so we play safe by assuming i586.
1052
1085
  # Note: whatever this is, it MUST be the same as what config.sub
1053
1086
  # prints for the "djgpp" host, or else GDB configury will decide that
1054
1087
  # this is a cross-build.
1055
1088
  echo i586-pc-msdosdjgpp
1056
- exit ;;
1089
+ exit ;;
1057
1090
  Intel:Mach:3*:*)
1058
1091
  echo i386-pc-mach3
1059
1092
  exit ;;
@@ -1064,7 +1097,7 @@ EOF
1064
1097
  if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1065
1098
  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1066
1099
  else # Add other i860-SVR4 vendors below as they are discovered.
1067
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1100
+ echo i860-${VENODR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1068
1101
  fi
1069
1102
  exit ;;
1070
1103
  mini*:CTIX:SYS*5:*)
@@ -1088,8 +1121,8 @@ EOF
1088
1121
  /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1089
1122
  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1090
1123
  3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1091
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1092
- && { echo i486-ncr-sysv4; exit; } ;;
1124
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1125
+ && { echo i486-ncr-sysv4; exit; } ;;
1093
1126
  NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1094
1127
  OS_REL='.3'
1095
1128
  test -r /etc/.relid \
@@ -1101,19 +1134,19 @@ EOF
1101
1134
  /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1102
1135
  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1103
1136
  m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1104
- echo m68k-unknown-lynxos${UNAME_RELEASE}
1137
+ echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
1105
1138
  exit ;;
1106
1139
  mc68030:UNIX_System_V:4.*:*)
1107
1140
  echo m68k-atari-sysv4
1108
1141
  exit ;;
1109
1142
  TSUNAMI:LynxOS:2.*:*)
1110
- echo sparc-unknown-lynxos${UNAME_RELEASE}
1143
+ echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
1111
1144
  exit ;;
1112
1145
  rs6000:LynxOS:2.*:*)
1113
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
1146
+ echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
1114
1147
  exit ;;
1115
1148
  PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1116
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
1149
+ echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
1117
1150
  exit ;;
1118
1151
  SM[BE]S:UNIX_SV:*:*)
1119
1152
  echo mips-dde-sysv${UNAME_RELEASE}
@@ -1132,10 +1165,10 @@ EOF
1132
1165
  echo ns32k-sni-sysv
1133
1166
  fi
1134
1167
  exit ;;
1135
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1136
- # says <Richard.M.Bartel@ccMail.Census.GOV>
1137
- echo i586-unisys-sysv4
1138
- exit ;;
1168
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1169
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
1170
+ echo i586-unisys-sysv4
1171
+ exit ;;
1139
1172
  *:UNIX_System_V:4*:FTX*)
1140
1173
  # From Gerald Hewes <hewes@openmarket.com>.
1141
1174
  # How about differentiating between stratus architectures? -djm
@@ -1161,11 +1194,11 @@ EOF
1161
1194
  exit ;;
1162
1195
  R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1163
1196
  if [ -d /usr/nec ]; then
1164
- echo mips-nec-sysv${UNAME_RELEASE}
1197
+ echo mips-nec-sysv${UNAME_RELEASE}
1165
1198
  else
1166
- echo mips-unknown-sysv${UNAME_RELEASE}
1199
+ echo mips-${VENDOR}-sysv${UNAME_RELEASE}
1167
1200
  fi
1168
- exit ;;
1201
+ exit ;;
1169
1202
  BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1170
1203
  echo powerpc-be-beos
1171
1204
  exit ;;
@@ -1230,6 +1263,9 @@ EOF
1230
1263
  *:QNX:*:4*)
1231
1264
  echo i386-pc-qnx
1232
1265
  exit ;;
1266
+ NEO-?:NONSTOP_KERNEL:*:*)
1267
+ echo neo-tandem-nsk${UNAME_RELEASE}
1268
+ exit ;;
1233
1269
  NSE-?:NONSTOP_KERNEL:*:*)
1234
1270
  echo nse-tandem-nsk${UNAME_RELEASE}
1235
1271
  exit ;;
@@ -1254,13 +1290,13 @@ EOF
1254
1290
  else
1255
1291
  UNAME_MACHINE="$cputype"
1256
1292
  fi
1257
- echo ${UNAME_MACHINE}-unknown-plan9
1293
+ echo ${UNAME_MACHINE}-${VENDOR}-plan9
1258
1294
  exit ;;
1259
1295
  *:TOPS-10:*:*)
1260
- echo pdp10-unknown-tops10
1296
+ echo pdp10-${VENDOR}-tops10
1261
1297
  exit ;;
1262
1298
  *:TENEX:*:*)
1263
- echo pdp10-unknown-tenex
1299
+ echo pdp10-${VENDOR}-tenex
1264
1300
  exit ;;
1265
1301
  KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1266
1302
  echo pdp10-dec-tops20
@@ -1269,19 +1305,19 @@ EOF
1269
1305
  echo pdp10-xkl-tops20
1270
1306
  exit ;;
1271
1307
  *:TOPS-20:*:*)
1272
- echo pdp10-unknown-tops20
1308
+ echo pdp10-${VENDOR}-tops20
1273
1309
  exit ;;
1274
1310
  *:ITS:*:*)
1275
- echo pdp10-unknown-its
1311
+ echo pdp10-${VENDOR}-its
1276
1312
  exit ;;
1277
1313
  SEI:*:*:SEIUX)
1278
- echo mips-sei-seiux${UNAME_RELEASE}
1314
+ echo mips-sei-seiux${UNAME_RELEASE}
1279
1315
  exit ;;
1280
1316
  *:DragonFly:*:*)
1281
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1317
+ echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1282
1318
  exit ;;
1283
1319
  *:*VMS:*:*)
1284
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
1320
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
1285
1321
  case "${UNAME_MACHINE}" in
1286
1322
  A*) echo alpha-dec-vms ; exit ;;
1287
1323
  I*) echo ia64-dec-vms ; exit ;;
@@ -1299,6 +1335,9 @@ EOF
1299
1335
  i*86:AROS:*:*)
1300
1336
  echo ${UNAME_MACHINE}-pc-aros
1301
1337
  exit ;;
1338
+ x86_64:VMkernel:*:*)
1339
+ echo ${UNAME_MACHINE}-${VENDOR}-esx
1340
+ exit ;;
1302
1341
  esac
1303
1342
 
1304
1343
  #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1321,11 +1360,11 @@ main ()
1321
1360
  #include <sys/param.h>
1322
1361
  printf ("m68k-sony-newsos%s\n",
1323
1362
  #ifdef NEWSOS4
1324
- "4"
1363
+ "4"
1325
1364
  #else
1326
- ""
1365
+ ""
1327
1366
  #endif
1328
- ); exit (0);
1367
+ ); exit (0);
1329
1368
  #endif
1330
1369
  #endif
1331
1370