567 Commits

Author SHA1 Message Date
Dmitry V. Levin
edcc7bbb5d config.guess: combine two heuristics to detect musl libc
Apparently, this is needed to correctly detect musl libc in different
versions of Alpine Linux.

According to
https://lists.gnu.org/archive/html/config-patches/2020-09/msg00002.html,
the ldd based check does not work for some old versions of the Alpine Linux,
and, according to
https://lists.gnu.org/archive/html/config-patches/2020-11/msg00002.html,
the compiler may not be available in a fresh Alpine container.

The ldd based check is essentially the same as the check that was
introduced by commit 3d00f60242f1726fc6eaa38e09435a969ee7ebe5, it is
performed iff the compiler based check could not give a definitive
answer.

Reported-by: Cheng XU <xucheng@me.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-11-17 08:00:00 +00:00
Ben Elliston
77632d92f2 Update timestamps. 2020-11-07 15:46:23 +11:00
Ben Elliston
95c8d9a294 * config.sub, config.guess: Replace backtick .. substitutions
with POSIX $(..) command substitutions throughout.
	* Makefile (shellcheck): Don't exclude message SC2006.
2020-11-07 15:38:19 +11:00
Rin Okuyama
1c43980155 * config.guess (*:NetBSD:*:*): Handle aarch64eb.
* testsuite/config-guess.data: Add test cases.

Signed-off-by: Ben Elliston <bje@gnu.org>
2020-10-22 00:05:38 +11:00
Bruno Haible
4aa554d72b * config.guess: Don't use 'ldd --version' to determine the presence of
musl libc, as this fails on Alpine Linux 3.10.

Signed-off-by: Ben Elliston <bje@gnu.org>
2020-09-20 14:21:00 +10:00
Issam E. Maghni
0b5188819b * config.guess: Replace "if [ EXPR ]" with "if test EXPR".
* config.sub: Likewise.
	* testsuite/config-guess.sh: Likewise.
	* testsuite/config-sub.sh: Likewise.

Signed-off-by: Ben Elliston <bje@gnu.org>
2020-08-17 13:36:41 +10:00
Ben Elliston
2593751ef2 * config.guess (arm64:Darwin:*:*): Recognise.
* testsuite/config-guess.data: Add a test case.
2020-07-12 18:21:33 +10:00
Jessica Clarke
bd1cbeed14 * config.guess (x86_64:Linux:*:*): Detect x32 ABI. This is
currently only supported when CC_FOR_BUILD is available, as that
	ultimately governs what the native ABI is.

Signed-off-by: Ben Elliston <bje@air.net.au>
2020-06-15 11:48:25 +10:00
Ben Elliston
fb5be05bb0 * config.guess: Instruct the user to send information about their
system only if the script they are running has a timestamped year
	of less than three years ago.
2020-04-26 13:27:26 +10:00
Ben Elliston
5256817ace * config.guess: Update copyright years.
* config.sub: Likewise.
	* doc/config.guess.1: Regenerate.
	* doc/config.sub.1: Likewise.
2020-01-01 19:36:58 +11:00
Ben Elliston
c542caa003 * config.guess (set_cc_for_build): Prevent multiple calls by
chechking if $tmp is already set. We can't check CC_FOR_BUILD as
	the user may set it externally. Thanks to Torbjörn Granlund for
	the bug report.
2019-12-21 13:01:01 +11:00
Torbjörn Granlund
6f5b719255 * config.guess (alpha:Linux:*:*): Guard against missing
/proc/cpuinfo by redirecting standard error to /dev/null.

Signed-off-by: Ben Elliston <bje@gnu.org>
2019-12-21 12:01:43 +11:00
Daniel Bittman
fadac5a0ed * config.guess (*:Twizzler:*:*): New.
* config.sub (-twizzler*): New.
	* testsuite/config-guess.data: Add test cases.
	* testsuite/config-sub.data: Ditto.

Signed-off-by: Ben Elliston <bje@gnu.org>
2019-09-12 09:56:40 +10:00
Ben Elliston
afb0b3e1d7 * config.guess (mips:OSF1:*.*): Whitespace cleanup. 2019-07-24 10:16:30 +10:00
Ben Elliston
f83dbaa146 * config.guess (*:OS108:*:*): Recognise new OS.
* testsuite/config-guess.data: Add a test case.
2019-06-10 23:36:57 +10:00
Ben Elliston
3f4274dfc2 * config.guess (*:Darwin:*:*): Run xcode-select to determine if a
system compiler is installed. If not, do not run set_cc_for_build,
	as the default cc will open a dialog box asking to install
	Xcode. If no C compiler is available, guess based on uname -p and
	uname -m.
2019-05-28 23:39:01 +10:00
Ben Elliston
bad92f031d Revert. Fix extraneous 'fi'. 2019-05-28 15:29:39 +10:00
Ben Elliston
9bbefc160a * config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR. 2019-05-28 12:59:21 +10:00
Paul Eggert
b98424c249 * config.guess: Remove space after "#endif", as Gnulib and some
other downstream projects frown on trailing white space.

Signed-off-by: Ben Elliston <bje@gnu.org>
2019-05-01 06:29:40 +10:00
Urs Janßen
798218fde9 * config.guess: Use utsname version instead of preprocessor macros
on vax-dec-ultrix and mips-dec-ultrix versions >= 3.0.

Signed-off-by: Ben Elliston <bje@gnu.org>
2019-04-28 12:22:19 +10:00
YunQiang Su
fe616913d7 * config.guess (mips:Linux:*:*): Detect ISA R6.
Signed-off-by: Ben Elliston <bje@gnu.org>
2019-03-08 13:12:21 +11:00
Urs Janßen
57c365fdb4 * config.guess (m68k-sony-newsos, mips-dec-ultrix3): Restore C
program that detects these systems.

Signed-off-by: Ben Elliston <bje@gnu.org>
2019-03-04 09:55:18 +11:00
Urs Janßen
6bf486266c * config.guess (i*86:*:5:[678]*): Fix Unixware output.
Signed-off-by: Ben Elliston <bje@gnu.org>
2019-02-19 16:07:32 +11:00
Ben Elliston
2221f7d58e Revert:
2019-01-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config.guess (sun4*:SunOS:5.*:*): Return sparcv9-sun-solaris2.*
	with 64-bit compiler.
	(tadpole*:SunOS:5.*:*): Likewise.
2019-01-15 10:26:10 +11:00
Ben Elliston
5fe51ffd1b * config.guess (sun4*:SunOS:5.*:*): Return sparcv9-sun-solaris2.*
with 64-bit compiler.
	(tadpole*:SunOS:5.*:*): Likewise.
2019-01-03 11:59:32 +11:00
Ben Elliston
c701dfb820 * config.guess: Update copyright years.
* config.sub: Likewise.
	* doc/config.guess.1: Regenerate.
	* doc/config.sub.1: Likewise.
2019-01-01 08:15:34 +11:00
Ben Elliston
9e514cc932 Revert 2018-07-18 change:
From Apostolos Syropoulos <asyropoulos@gmail.com>:
	* config.guess (i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*): Use the
	isainfo(1) command to guess what kind of system we have. Running
	isainfo -b returns either "32" or "64".
2018-12-21 12:22:29 +11:00
Ben Elliston
c262b492d5 * config.guess: No need to explicitly save $? in the EXIT trap
handler. This allows the same trap handler to be used as for other
	common signals.
2018-12-07 08:09:40 +11:00
Ben Elliston
058639be22 Bump timestamps. 2018-11-28 20:38:51 +11:00
Lauri Tirkkonen
dbd9d383bd * config.guess (*:Unleashed:*:*): New.
* config.sub (unleashed*): New.
	* testsuite/config-sub.data: Add a test case.
	* testsuite/config-guess.data: Likewise.

Signed-off-by: Ben Elliston <bje@gnu.org>
2018-11-26 22:04:32 +11:00
Ben Elliston
2fa97a8a0e * config.guess (amd64:CYGWIN*:*:*, x86_64:CYGWIN*:*:*): Set
manufacturer to 'pc'.
	* testsuite/config-guess.data: Update test cases.
2018-10-26 11:21:25 +11:00
Mikaël Urankar
59e2ce0e6b * config.guess (arm:FreeBSD:*:*): Match on 'arm' not 'arm*'.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-08-29 20:40:37 +10:00
Ben Elliston
8de5d27282 * config.guess: Fix SC2234 diagnostic from Shellcheck ("Remove
superfluous (..) around test command". Also remove redirection as
	test(1) should never produce any output.
2018-08-02 19:42:42 +10:00
Ben Elliston
c85e3fc03c From Apostolos Syropoulos <asyropoulos@gmail.com>:
* config.guess (i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*): Use the
	isainfo(1) command to guess what kind of system we have. Running
	isainfo -b returns either "32" or "64".
2018-07-19 08:04:09 +10:00
Mikaël Urankar
afe1fa96bf * config.guess (arm*:FreeBSD:*:*): New.
* testsuite/config-guess.data: Add a test case.

Signed-off-by: Ben Elliston <bje@gnu.org>
2018-07-18 22:38:44 +10:00
Ben Elliston
09da403c82 * config.guess (set_cc_for_build): Disable SC2039 ("In POSIX sh,
RANDOM is undefined").
	* Makefile (shellcheck): Don't disable SC2039 globally.
2018-07-13 21:43:28 +10:00
Ben Elliston
a4b36a6939 * config.guess: Disable SC2154 and SC2172 Shellcheck warnings.
* Makefile (shellcheck): Don't disable SC2172 globally.
2018-07-13 21:37:46 +10:00
Ben Elliston
1e826a0344 * config.guess: Replace large 'set_cc_for_build' shell variable,
that is executed via eval, with a POSIX shell function.
	* Makefile (shellcheck): Ignore SC2039 diagnostics ("In POSIX sh,
	RANDOM is undefined") and SC2172 ("Trapping signals by number is
	not well defined. Prefer signal names").
2018-07-12 07:56:15 +10:00
Ben Elliston
ba47464ef7 * config.guess (set_cc_for_build): Suppress possible mkdir output. 2018-07-06 22:45:59 +10:00
Sevan Janiyan
0388bdcb11 * config.guess (*:Minix:*:*): Accept any machine.
* testsuite/config-guess.data: Add a test case.

Signed-off-by: Ben Elliston <bje@gnu.org>
2018-06-26 11:54:17 +10:00
Ben Elliston
382847f038 * config.guess (set_cc_for_build): Guard against $CC_FOR_BUILD,
$HOST_CC and $CC being undefined by using ${var-} style expansion.
	(*:NetBSD:*:*): Likewise for $abi.
	* testsuite/config-guess.sh: Run config.guess under `sh -eu'.
2018-05-19 18:58:37 +10:00
Paul Eggert
614ae20b93 * config.guess: Use before-save-hook not write-file-functions.
* config.sub: Ditto.

Signed-off-by: Ben Elliston <bje@gnu.org>
2018-03-08 11:29:55 +11:00
Ben Elliston
6b2374c795 Fix config.guess timestamp. 2018-03-01 07:09:48 +11:00
Ben Elliston
8d4e4ce15b Revert for now:
2018-02-24  James Clarke  <jrtc27@jrtc27.com>

	* config.guess (x86_64:Linux:*:*): Detect x32 ABI.
2018-03-01 07:08:40 +11:00
James Clarke
bd9626458c * config.guess (x86_64:Linux:*:*): Detect x32 ABI.
Signed-off-by: Ben Elliston <bje@gnu.org>
2018-02-24 12:34:33 +11:00
Henri Menke
3d00f60242 * config.guess: Try to detect musl libc on GNU/Linux systems using
ldd --version.

Signed-off-by: Ben Elliston <bje@gnu.org>
2018-01-26 14:04:08 +11:00
Ben Elliston
827c77253b * config.guess: Use double quotes on any remaining unquoted
variables to prevent globbing and word splitting.
2018-01-16 18:09:53 +11:00
Ben Elliston
9ca5f17e49 * config.guess: Change most ${foo} expansions to "$foo" to:
(1) double quote to prevent globbing and word splitting; and
	(2) remove extraneous braces.
2018-01-16 12:06:26 +11:00
Ben Elliston
68b4eebf4d * config.guess: Quote $dummy.c, $dummy.o and $dummy to prevent
globbing and word splitting in the filename.
2018-01-16 11:32:22 +11:00
Randall S. Becker
a69a8a3d51 * config.guess (NSV-*:NONSTOP_KERNEL:*:*): New.
* config.sub (nsv-tandem): New.
	* testsuite/config-guess.data: Add a test case.
	* testsuite/config-sub.data: Likewise.

Signed-off-by: Ben Elliston <bje@gnu.org>
2018-01-11 10:00:52 +11:00