diff options
| author | Enji Cooper <ngie@FreeBSD.org> | 2026-09-21 00:46:29 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-09-21 00:46:29 +0000 |
| commit | ac2d088aae92e811771d276775577fab4968e386 (patch) | |
| tree | c00a38cf2d5ed722777a5670f21b32b966ee5fb0 | |
| parent | b385e49173e199c5da702e0758fa21d17b35d4f9 (diff) | |
atf: import atf-0.26-rc1vendor/atf/atf-0.26-rc1
This change adds atf atf-0.26-rc1 from [upstream][1].
The atf-0.26-rc1 artifact was been verified by [SHA256 checksum][3].
This release contains the upstreamed version of `require.kmods` support
provided by des@ in [freebsd@83a1ee57][require-kmods-support].
More information about the release (from a high level) can be found in
the [release notes][4].
Updated via [`update_atf.sh`][4] `update_atf.sh 0.26-rc1 atf-0.26`.
1: https://github.com/freebsd/atf/releases/download/atf-0.26-rc1/atf-0.26-rc1.tar.gz
2: https://github.com/freebsd/atf/releases/download/atf-0.26-rc1/atf-0.26-rc1.tar.gz.sha256
3: https://github.com/freebsd/atf/blob/atf-0.26-rc1/NEWS.md
4: https://codeberg.org/ngie/freebsd-powertools:shell/update_atf.sh@10a04edb
require-kmods-support: https://cgit.freebsd.org/src/commit/?id=83a1ee578c9d1ab7013e997289c7cd470c0e6902
| -rw-r--r-- | INSTALL.md | 116 | ||||
| -rw-r--r-- | Makefile.in | 70 | ||||
| -rw-r--r-- | NEWS | 19 | ||||
| -rwxr-xr-x | admin/config.guess | 1529 | ||||
| -rwxr-xr-x | admin/config.sub | 2220 | ||||
| -rw-r--r-- | admin/ltmain.sh | 325 | ||||
| -rw-r--r-- | atf-c++/atf-c++.3 | 10 | ||||
| -rw-r--r-- | atf-c++/tests.cpp | 7 | ||||
| -rw-r--r-- | atf-c++/tests.hpp | 1 | ||||
| -rw-r--r-- | atf-c++/tests_test.cpp | 4 | ||||
| -rw-r--r-- | atf-c/atf-c.3 | 15 | ||||
| -rw-r--r-- | atf-c/detail/process.c | 5 | ||||
| -rw-r--r-- | atf-c/tc.c | 68 | ||||
| -rw-r--r-- | atf-c/tc.h | 1 | ||||
| -rw-r--r-- | atf-c/tc_test.c | 86 | ||||
| -rw-r--r-- | atf-sh/Kyuafile | 1 | ||||
| -rw-r--r-- | atf-sh/Kyuafile.in | 11 | ||||
| -rw-r--r-- | atf-sh/Makefile.am.inc | 30 | ||||
| -rw-r--r-- | atf-sh/atf-sh.3 | 13 | ||||
| -rw-r--r-- | atf-sh/integration_test.sh | 19 | ||||
| -rw-r--r-- | atf-sh/kmod_test.sh | 55 | ||||
| -rw-r--r-- | atf-sh/libatf-sh.subr | 40 | ||||
| -rw-r--r-- | bootstrap/package.m4 | 4 | ||||
| -rwxr-xr-x | bootstrap/testsuite | 10 | ||||
| -rwxr-xr-x | configure | 669 | ||||
| -rw-r--r-- | configure.ac | 11 | ||||
| -rw-r--r-- | m4/libtool.m4 | 760 | ||||
| -rw-r--r-- | m4/ltoptions.m4 | 56 | ||||
| -rw-r--r-- | m4/ltsugar.m4 | 2 | ||||
| -rw-r--r-- | m4/ltversion.m4 | 12 | ||||
| -rw-r--r-- | m4/lt~obsolete.m4 | 2 |
31 files changed, 2411 insertions, 3760 deletions
diff --git a/INSTALL.md b/INSTALL.md index 50cda870ca76..86a6ce4ba23b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,4 @@ -# Installation instructions - -## Introduction +# Introduction ATF uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as its build system. These are used only when compiling the application from the @@ -9,86 +7,48 @@ do not need to read this document. For the impatient: - $ ./configure - $ make - Gain root privileges - # make install - Drop root privileges - $ make installcheck +```shell +$ ./configure +$ make +$ make check +$ sudo make install # or `make install` with root privileges +$ make installcheck +``` Or alternatively, install as a regular user into your home directory: - $ ./configure --prefix ~/local - $ make - $ make install - $ make installcheck - -## Dependencies +```shell +$ ./configure --prefix ~/local +$ make +$ make check +$ make install +$ make installcheck +``` +# Dependencies To build and use ATF successfully you need: -- A standards-compliant C/C++ complier. For example, GNU GCC 2.95 will not - work. - -- A POSIX shell interpreter. - -- A make(1) utility. - -If you are building ATF from the code on the repository, you will also need -to have GNU autoconf, automake and libtool installed. - -## Regenerating the build system - -If you are building ATF from code extracted from the repository, you must -first regenerate the files used by the build system. You will also need to -do this if you modify `configure.ac`, `Makefile.am` or any of the other build -system files. To do this, simply run: +* A C++-20 standards-compliant compiler. +* pkg-config or an equivalent tool, e.g., pkgconf. +* A POSIX shell interpreter. +* A make(1) utility. - $ autoreconf -i -s +Optionally, if you want to build and run the tests (recommended), you +need: -For release builds, no extra steps are needed. +* Kyua 0.5 or greater. -## General build procedure +If you are building ATF from the code on the repository, you will also +need the following tools: -To build and install the source package, you must follow these steps: +* GNU Autoconf 2.68 (or later). +* GNU Automake 1.9 (or later). +* GNU Libtool. -1. Configure the sources to adapt to your operating system. This is done - using the `configure` script located on the sources' top directory, - and it is usually invoked without arguments unless you want to change - the installation prefix. More details on this procedure are given on a - later section. +# Regenerating the build system -2. Build the sources to generate the binaries and scripts. Simply run - `make` on the sources' top directory after configuring them. No - problems should arise. - -3. Install the program by running `make install`. You may need to become - root to issue this step. - -4. Issue any manual installation steps that may be required. These are - described later in their own section. - -5. Check that the installed programs work by running `make installcheck`. - You do not need to be root to do this, even though some checks will not - be run otherwise. - -## Configuration flags - -The most common, standard flags given to `configure` are: - -- `--prefix=directory`: - - **Possible values:** Any path - - **Default:** `/usr/local` - - Specifies where the program (binaries and all associated files) will - be installed. - -- `--help`: - - Shows information about all available flags and exits immediately, - without running any configuration tasks. +This is not necessary if you are building from a formal release +distribution file. The following environment variables are specific to ATF's `configure` script: @@ -159,9 +119,21 @@ script: library. If empty, the configure script will try to find a suitable interpreter for you. +# Configuration flags + +The most common, standard flags given to `configure` are: + +- `--prefix=directory` + + **Possible values**: any path + **Default**: "/usr/local" + + Specifies where the library (binaries and all associated files) will be + installed. + The following flags are specific to ATF's `configure` script: -- `--enable-developer`: +- `--enable-developer` **Default:** `yes` in HEAD builds; `no` in release builds. diff --git a/Makefile.in b/Makefile.in index 25acef282adb..f948736c1131 100644 --- a/Makefile.in +++ b/Makefile.in @@ -373,15 +373,20 @@ tests_atf_c___detail_PROGRAMS = \ atf-c++/detail/process_test$(EXEEXT) \ atf-c++/detail/text_test$(EXEEXT) \ atf-c++/detail/version_helper$(EXEEXT) +@FreeBSD_TRUE@am__append_1 = atf-sh/libatf-sh/FreeBSD.subr +@FreeBSD_FALSE@am__append_2 = atf-sh/libatf-sh/os_stubs.subr +@FreeBSD_TRUE@am__append_3 = atf-sh/kmod_test +@FreeBSD_TRUE@am__append_4 = atf-sh/kmod_test +@FreeBSD_TRUE@am__append_5 = atf-sh/kmod_test.sh check_PROGRAMS = bootstrap/h_tp_basic_c$(EXEEXT) \ bootstrap/h_tp_basic_cpp$(EXEEXT) tests_test_programs_PROGRAMS = test-programs/c_helpers$(EXEEXT) \ test-programs/cpp_helpers$(EXEEXT) -@HAVE_ASAN_TRUE@am__append_1 = ASAN_OPTIONS=${ASAN_OPTIONS} -@HAVE_UBSAN_TRUE@am__append_2 = UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 -@HAVE_KYUA_TRUE@am__append_3 = installcheck-kyua -@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@am__append_4 = installcheck-kyua-lcov -@CODE_COVERAGE_TRUE@am__append_5 = mostlyclean-code-coverage +@HAVE_ASAN_TRUE@am__append_6 = ASAN_OPTIONS=${ASAN_OPTIONS} +@HAVE_UBSAN_TRUE@am__append_7 = UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 +@HAVE_KYUA_TRUE@am__append_8 = installcheck-kyua +@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@am__append_9 = installcheck-kyua-lcov +@CODE_COVERAGE_TRUE@am__append_10 = mostlyclean-code-coverage subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_compile_stdcxx.m4 \ @@ -1097,8 +1102,9 @@ atf_aclocal_DATA = atf-c/atf-common.m4 atf-c/atf-c.m4 \ atf-c++/atf-c++.m4 atf-sh/atf-sh.m4 BUILT_SOURCES = CLEANFILES = atf-c/atf-c.pc atf-c/pkg_config_test atf-c++/atf-c++.pc \ - atf-c++/pkg_config_test atf-sh/atf-sh.pc atf-sh/misc_helpers \ - atf-sh/atf_check_test atf-sh/atf-check_test atf-sh/config_test \ + atf-c++/pkg_config_test atf-sh/libatf-sh.subr atf-sh/atf-sh.pc \ + atf-sh/Kyuafile atf-sh/misc_helpers atf-sh/atf_check_test \ + atf-sh/atf-check_test atf-sh/config_test $(am__append_4) \ atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \ atf-sh/tp_test bootstrap/h_tp_basic_sh \ bootstrap/h_tp_atf_check_sh bootstrap/h_tp_fail \ @@ -1117,19 +1123,20 @@ EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \ atf-c++/atf-c++.pc.in $(tests_atf_c___DATA) \ atf-c++/pkg_config_test.sh $(tests_atf_c___detail_DATA) \ $(atf_sh_DATA) atf-sh/atf-sh.m4 atf-sh/atf-sh.pc.in \ - $(tests_atf_sh_DATA) atf-sh/misc_helpers.sh \ + atf-sh/Kyuafile.in $(tests_atf_sh_DATA) atf-sh/misc_helpers.sh \ atf-sh/atf_check_test.sh atf-sh/atf-check_test.sh \ - atf-sh/config_test.sh atf-sh/integration_test.sh \ - atf-sh/normalize_test.sh atf-sh/tc_test.sh atf-sh/tp_test.sh \ - bootstrap/h_tp_basic_sh.sh bootstrap/h_tp_atf_check_sh.sh \ - bootstrap/h_tp_fail.sh bootstrap/h_tp_pass.sh \ - bootstrap/testsuite bootstrap/package.m4 \ - bootstrap/testsuite.at $(testsuite_incs) doc/atf.7.in \ - $(tests_test_programs_DATA) test-programs/common.sh \ - test-programs/sh_helpers.sh test-programs/config_test.sh \ - test-programs/expect_test.sh test-programs/meta_data_test.sh \ - test-programs/result_test.sh test-programs/srcdir_test.sh \ - $(doc_DATA) INSTALL.md README.md $(pkgtests_DATA) + atf-sh/config_test.sh $(am__append_5) \ + atf-sh/integration_test.sh atf-sh/normalize_test.sh \ + atf-sh/tc_test.sh atf-sh/tp_test.sh bootstrap/h_tp_basic_sh.sh \ + bootstrap/h_tp_atf_check_sh.sh bootstrap/h_tp_fail.sh \ + bootstrap/h_tp_pass.sh bootstrap/testsuite \ + bootstrap/package.m4 bootstrap/testsuite.at $(testsuite_incs) \ + doc/atf.7.in $(tests_test_programs_DATA) \ + test-programs/common.sh test-programs/sh_helpers.sh \ + test-programs/config_test.sh test-programs/expect_test.sh \ + test-programs/meta_data_test.sh test-programs/result_test.sh \ + test-programs/srcdir_test.sh $(doc_DATA) INSTALL.md README.md \ + $(pkgtests_DATA) dist_man_MANS = atf-c/atf-c.3 atf-c++/atf-c++.3 atf-sh/atf-check.1 \ atf-sh/atf-sh.1 atf-sh/atf-sh.3 doc/atf-test-case.7 \ doc/atf-test-program.1 @@ -1139,14 +1146,14 @@ man_MANS = doc/atf.7 noinst_DATA = INSTALL.md README.md noinst_LTLIBRARIES = atf-c/detail/libtest_helpers.la \ atf-c++/detail/libtest_helpers.la -INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_3) \ - $(am__append_4) +INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_8) \ + $(am__append_9) # # Custom targets. # PHONY_TARGETS = check-style installcheck-bootstrap installcheck-kyua \ - $(am__append_5) clean-all + $(am__append_10) clean-all ACLOCAL_AMFLAGS = -I m4 libatf_c_la_SOURCES = atf-c/build.c atf-c/build.h atf-c/check.c \ atf-c/check.h atf-c/error.c atf-c/error.h atf-c/error_fwd.h \ @@ -1318,13 +1325,15 @@ atf_sh_atf_sh_CPPFLAGS = -DATF_LIBEXECDIR=\"$(libexecdir)\" \ atf_sh_atf_sh_LDADD = $(ATF_CXX_LIBS) atf_sh_DATA = atf-sh/libatf-sh.subr +libatf_subr_sources = atf-sh/libatf-sh/common.subr $(am__append_1) \ + $(am__append_2) atf_shdir = $(pkgdatadir) atf_shpkgconfigdir = $(atf_pkgconfigdir) atf_shpkgconfig_DATA = atf-sh/atf-sh.pc tests_atf_sh_DATA = atf-sh/Kyuafile tests_atf_shdir = $(pkgtestsdir)/atf-sh tests_atf_sh_SCRIPTS = atf-sh/misc_helpers atf-sh/atf_check_test \ - atf-sh/atf-check_test atf-sh/config_test \ + atf-sh/atf-check_test atf-sh/config_test $(am__append_3) \ atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \ atf-sh/tp_test bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c @@ -1365,8 +1374,8 @@ doc_DATA = AUTHORS COPYING NEWS README.md # Supporting logic to run our custom testsuite. # TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \ - PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig $(am__append_1) \ - $(am__append_2) + PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig $(am__append_6) \ + $(am__append_7) @HAVE_ASAN_TRUE@@HAVE_LSAN_FALSE@LSAN_OPTIONS = # NB: the trailing comma is intentional. I hate automake not allowing `:=` use on subsequent lines. @@ -3946,12 +3955,20 @@ atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 +atf-sh/libatf-sh.subr: + $(AM_V_GEN)cat ${libatf_subr_sources} > atf-sh/libatf-sh.subr.tmp; \ + mv atf-sh/libatf-sh.subr.tmp atf-sh/libatf-sh.subr atf-sh/atf-sh.pc: $(srcdir)/atf-sh/atf-sh.pc.in Makefile $(AM_V_GEN)test -d atf-sh || mkdir -p atf-sh; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__EXEC_PREFIX__#$(exec_prefix)#g' \ <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp; \ mv atf-sh/atf-sh.pc.tmp atf-sh/atf-sh.pc +atf-sh/Kyuafile: $(srcdir)/atf-sh/Kyuafile.in Makefile + $(AM_V_GEN)test -d atf-sh || mkdir -p atf-sh; \ + cat $(srcdir)/atf-sh/Kyuafile.in > atf-sh/Kyuafile.tmp +@FreeBSD_TRUE@ $(AM_V_GEN)printf 'atf_test_program{name="kmod_test"}\n' >> atf-sh/Kyuafile.tmp + $(AM_V_GEN)mv atf-sh/Kyuafile.tmp atf-sh/Kyuafile atf-sh/misc_helpers: $(srcdir)/atf-sh/misc_helpers.sh $(AM_V_GEN)src="$(srcdir)/atf-sh/misc_helpers.sh"; \ dst="atf-sh/misc_helpers"; $(BUILD_SH_TP) @@ -3964,6 +3981,9 @@ atf-sh/atf-check_test: $(srcdir)/atf-sh/atf-check_test.sh atf-sh/config_test: $(srcdir)/atf-sh/config_test.sh $(AM_V_GEN)src="$(srcdir)/atf-sh/config_test.sh"; \ dst="atf-sh/config_test"; $(BUILD_SH_TP) +@FreeBSD_TRUE@atf-sh/kmod_test: $(srcdir)/atf-sh/kmod_test.sh +@FreeBSD_TRUE@ $(AM_V_GEN)src="$(srcdir)/atf-sh/kmod_test.sh"; \ +@FreeBSD_TRUE@ dst="atf-sh/kmod_test"; $(BUILD_SH_TP) atf-sh/integration_test: $(srcdir)/atf-sh/integration_test.sh $(AM_V_GEN)src="$(srcdir)/atf-sh/integration_test.sh"; \ dst="atf-sh/integration_test"; \ @@ -1,5 +1,24 @@ # Major changes between releases +## Changes in version 0.26 + +Released on 2026/XX/YY. + +**Full Changelog**: https://github.com/freebsd/atf/compare/atf-0.25...atf-0.26 + +## Changes in version 0.25 + +Released on 2026/09/02. + +### Bugfixes +* Issue #187: Fix the build on NetBSD by renaming a variable added in + version 0.24. + +### Developer Workflow Changes +* #185: The version of LLVM used in macOS runners was bumped from 19 to 20 + +**Full Changelog**: https://github.com/freebsd/atf/compare/atf-0.24...atf-0.25 + ## Changes in version 0.24 Released on August, 17, 2026 diff --git a/admin/config.guess b/admin/config.guess index 48a684601bd2..b1f709e5aa0f 100755 --- a/admin/config.guess +++ b/admin/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -# shellcheck disable=SC2006,SC2268 # see below for rationale - -timestamp='2024-07-27' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -29,25 +27,17 @@ timestamp='2024-07-27' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to <config-patches@gnu.org>. -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - - me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system '$me' is run on. +Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +50,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try '$me --help' for more information." +Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -94,28 +84,24 @@ if test $# != 0; then exit 1 fi -# Just in case it came from the environment. -GUESS= - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still -# use 'HOST_CC' if defined, but it is deprecated. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 set_cc_for_build() { - # prevent multiple calls if $tmp is already set - test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039,SC3028 + # shellcheck disable=SC2039 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -123,9 +109,9 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c17 c99 c89 ; do + for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=$driver + CC_FOR_BUILD="$driver" break fi done @@ -146,57 +132,40 @@ fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case $UNAME_SYSTEM in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - LIBC=unknown + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu set_cc_for_build cat <<-EOF > "$dummy.c" - #if defined(__ANDROID__) - LIBC=android - #else #include <features.h> #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #elif defined(__GLIBC__) - LIBC=gnu - #elif defined(__LLVM_LIBC__) - LIBC=llvm #else - #include <stdarg.h> - /* First heuristic to detect musl libc. */ - #ifdef __DEFINED_va_list - LIBC=musl - #endif - #endif + LIBC=gnu #endif EOF - cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - eval "$cc_set_libc" - - # Second heuristic to detect musl libc. - if [ "$LIBC" = unknown ] && - command -v ldd >/dev/null && - ldd --version 2>&1 | grep -q ^musl; then - LIBC=musl - fi + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - if [ "$LIBC" = unknown ]; then - LIBC=gnu + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. -case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -208,12 +177,12 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case $UNAME_MACHINE_ARCH in - aarch64eb) machine=aarch64_be-unknown ;; + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -222,13 +191,13 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + machine="${arch}${endian}"-unknown ;; - *) machine=$UNAME_MACHINE_ARCH-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case $UNAME_MACHINE_ARCH in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; @@ -249,7 +218,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in ;; esac # Determine ABI tags. - case $UNAME_MACHINE_ARCH in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -260,7 +229,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case $UNAME_VERSION in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; @@ -271,57 +240,45 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - GUESS=$machine-${os}${release}${abi-} - ;; + echo "$machine-${os}${release}${abi-}" + exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE - ;; - *:SecBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; *:ekkoBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; *:SolidBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE - ;; - *:OS108:*:*) - GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) - GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE - ;; + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; *:MirBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; *:Sortix:*:*) - GUESS=$UNAME_MACHINE-unknown-sortix - ;; - *:Twizzler:*:*) - GUESS=$UNAME_MACHINE-unknown-twizzler - ;; + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; *:Redox:*:*) - GUESS=$UNAME_MACHINE-unknown-redox - ;; + echo "$UNAME_MACHINE"-unknown-redox + exit ;; mips:OSF1:*.*) - GUESS=mips-dec-osf1 - ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -335,7 +292,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case $ALPHA_CPU_TYPE in + case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -372,121 +329,112 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - GUESS=$UNAME_MACHINE-dec-osf$OSF_REL - ;; + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) - GUESS=m68k-unknown-sysv4 - ;; + echo m68k-unknown-sysv4 + exit ;; *:[Aa]miga[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-amigaos - ;; + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; *:[Mm]orph[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-morphos - ;; + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; *:OS/390:*:*) - GUESS=i370-ibm-openedition - ;; + echo i370-ibm-openedition + exit ;; *:z/VM:*:*) - GUESS=s390-ibm-zvmoe - ;; + echo s390-ibm-zvmoe + exit ;; *:OS400:*:*) - GUESS=powerpc-ibm-os400 - ;; + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - GUESS=arm-acorn-riscix$UNAME_RELEASE - ;; + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - GUESS=arm-unknown-riscos - ;; + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - GUESS=hppa1.1-hitachi-hiuxmpp - ;; + echo hppa1.1-hitachi-hiuxmpp + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - case `(/bin/universe) 2>/dev/null` in - att) GUESS=pyramid-pyramid-sysv3 ;; - *) GUESS=pyramid-pyramid-bsd ;; - esac - ;; + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; NILE*:*:*:dcosx) - GUESS=pyramid-pyramid-svr4 - ;; + echo pyramid-pyramid-svr4 + exit ;; DRS?6000:unix:4.0:6*) - GUESS=sparc-icl-nx6 - ;; + echo sparc-icl-nx6 + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) GUESS=sparc-icl-nx7 ;; - esac - ;; + sparc) echo sparc-icl-nx7; exit ;; + esac ;; s390x:SunOS:*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL - ;; + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; sun4H:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-hal-solaris2$SUN_REL - ;; + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris2$SUN_REL - ;; + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - GUESS=i386-pc-auroraux$UNAME_RELEASE - ;; + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$SUN_ARCH-pc-solaris2$SUN_REL - ;; + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris3$SUN_REL - ;; + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:*:*) - case `/usr/bin/arch -k` in + case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like '4.1.3-JL'. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` - GUESS=sparc-sun-sunos$SUN_REL - ;; + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; sun3*:SunOS:*:*) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case `/bin/arch` in + case "`/bin/arch`" in sun3) - GUESS=m68k-sun-sunos$UNAME_RELEASE + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - GUESS=sparc-sun-sunos$UNAME_RELEASE + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac - ;; + exit ;; aushp:SunOS:*:*) - GUESS=sparc-auspex-sunos$UNAME_RELEASE - ;; + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -496,41 +444,41 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - GUESS=m68k-milan-mint$UNAME_RELEASE - ;; + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - GUESS=m68k-hades-mint$UNAME_RELEASE - ;; + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - GUESS=m68k-unknown-mint$UNAME_RELEASE - ;; + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; m68k:machten:*:*) - GUESS=m68k-apple-machten$UNAME_RELEASE - ;; + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; powerpc:machten:*:*) - GUESS=powerpc-apple-machten$UNAME_RELEASE - ;; + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; RISC*:Mach:*:*) - GUESS=mips-dec-mach_bsd4.3 - ;; + echo mips-dec-mach_bsd4.3 + exit ;; RISC*:ULTRIX:*:*) - GUESS=mips-dec-ultrix$UNAME_RELEASE - ;; + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; VAX*:ULTRIX*:*:*) - GUESS=vax-dec-ultrix$UNAME_RELEASE - ;; + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - GUESS=clipper-intergraph-clix$UNAME_RELEASE - ;; + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -558,84 +506,82 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - GUESS=mips-mips-riscos$UNAME_RELEASE - ;; + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; Motorola:PowerMAX_OS:*:*) - GUESS=powerpc-motorola-powermax - ;; + echo powerpc-motorola-powermax + exit ;; Motorola:*:4.3:PL8-*) - GUESS=powerpc-harris-powermax - ;; + echo powerpc-harris-powermax + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - GUESS=powerpc-harris-powermax - ;; + echo powerpc-harris-powermax + exit ;; Night_Hawk:Power_UNIX:*:*) - GUESS=powerpc-harris-powerunix - ;; + echo powerpc-harris-powerunix + exit ;; m88k:CX/UX:7*:*) - GUESS=m88k-harris-cxux7 - ;; + echo m88k-harris-cxux7 + exit ;; m88k:*:4*:R4*) - GUESS=m88k-motorola-sysv4 - ;; + echo m88k-motorola-sysv4 + exit ;; m88k:*:3*:R3*) - GUESS=m88k-motorola-sysv3 - ;; + echo m88k-motorola-sysv3 + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ - test "$TARGET_BINARY_INTERFACE"x = x + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - GUESS=m88k-dg-dgux$UNAME_RELEASE + echo m88k-dg-dgux"$UNAME_RELEASE" else - GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - GUESS=i586-dg-dgux$UNAME_RELEASE + echo i586-dg-dgux"$UNAME_RELEASE" fi - ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - GUESS=m88k-dolphin-sysv3 - ;; + echo m88k-dolphin-sysv3 + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - GUESS=m88k-motorola-sysv3 - ;; + echo m88k-motorola-sysv3 + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - GUESS=m88k-tektronix-sysv3 - ;; + echo m88k-tektronix-sysv3 + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - GUESS=m68k-tektronix-bsd - ;; + echo m68k-tektronix-bsd + exit ;; *:IRIX*:*:*) - IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` - GUESS=mips-sgi-irix$IRIX_REL - ;; + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id - ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - GUESS=i386-ibm-aix - ;; + echo i386-ibm-aix + exit ;; ia64:AIX:*:*) - if test -x /usr/bin/oslevel ; then + if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV - ;; + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include <sys/systemcfg.h> - int - main () + main() { if (!__power_pc()) exit(1); @@ -645,16 +591,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - GUESS=$SYSTEM_NAME + echo "$SYSTEM_NAME" else - GUESS=rs6000-ibm-aix3.2.5 + echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - GUESS=rs6000-ibm-aix3.2.4 + echo rs6000-ibm-aix3.2.4 else - GUESS=rs6000-ibm-aix3.2 + echo rs6000-ibm-aix3.2 fi - ;; + exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -662,56 +608,56 @@ EOF else IBM_ARCH=powerpc fi - if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - GUESS=$IBM_ARCH-ibm-aix$IBM_REV - ;; + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; *:AIX:*:*) - GUESS=rs6000-ibm-aix - ;; + echo rs6000-ibm-aix + exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - GUESS=romp-ibm-bsd4.4 - ;; + echo romp-ibm-bsd4.4 + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to - ;; # report: romp-ibm BSD 4.3 + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - GUESS=rs6000-bull-bosx - ;; + echo rs6000-bull-bosx + exit ;; DPX/2?00:B.O.S.:*:*) - GUESS=m68k-bull-sysv3 - ;; + echo m68k-bull-sysv3 + exit ;; 9000/[34]??:4.3bsd:1.*:*) - GUESS=m68k-hp-bsd - ;; + echo m68k-hp-bsd + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - GUESS=m68k-hp-bsd4.4 - ;; + echo m68k-hp-bsd4.4 + exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - case $UNAME_MACHINE in + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if test -x /usr/bin/getconf; then + if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case $sc_cpu_version in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case $sc_kernel_bits in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if test "$HP_ARCH" = ""; then + if [ "$HP_ARCH" = "" ]; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -719,8 +665,7 @@ EOF #include <stdlib.h> #include <unistd.h> - int - main () + int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -751,7 +696,7 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if test "$HP_ARCH" = hppa2.0w + if [ "$HP_ARCH" = hppa2.0w ] then set_cc_for_build @@ -772,12 +717,12 @@ EOF HP_ARCH=hppa64 fi fi - GUESS=$HP_ARCH-hp-hpux$HPUX_REV - ;; + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - GUESS=ia64-hp-hpux$HPUX_REV - ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -807,36 +752,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - GUESS=unknown-hitachi-hiuxwe2 - ;; + echo unknown-hitachi-hiuxwe2 + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - GUESS=hppa1.1-hp-bsd - ;; + echo hppa1.1-hp-bsd + exit ;; 9000/8??:4.3bsd:*:*) - GUESS=hppa1.0-hp-bsd - ;; + echo hppa1.0-hp-bsd + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - GUESS=hppa1.0-hp-mpeix - ;; + echo hppa1.0-hp-mpeix + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - GUESS=hppa1.1-hp-osf - ;; + echo hppa1.1-hp-osf + exit ;; hp8??:OSF1:*:*) - GUESS=hppa1.0-hp-osf - ;; + echo hppa1.0-hp-osf + exit ;; i*86:OSF1:*:*) - if test -x /usr/sbin/sysversion ; then - GUESS=$UNAME_MACHINE-unknown-osf1mk + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk else - GUESS=$UNAME_MACHINE-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi - ;; + exit ;; parisc*:Lites*:*:*) - GUESS=hppa1.1-hp-lites - ;; + echo hppa1.1-hp-lites + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - GUESS=c1-convex-bsd - ;; + echo c1-convex-bsd + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -844,18 +789,17 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - GUESS=c34-convex-bsd - ;; + echo c34-convex-bsd + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - GUESS=c38-convex-bsd - ;; + echo c38-convex-bsd + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - GUESS=c4-convex-bsd - ;; + echo c4-convex-bsd + exit ;; CRAY*Y-MP:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=ymp-cray-unicos$CRAY_REL - ;; + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -863,155 +807,108 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=t90-cray-unicos$CRAY_REL - ;; + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*T3E:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=alphaev5-cray-unicosmk$CRAY_REL - ;; + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*SV1:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=sv1-cray-unicos$CRAY_REL - ;; + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; *:UNICOS/mp:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=craynv-cray-unicosmp$CRAY_REL - ;; + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; sparc*:BSD/OS:*:*) - GUESS=sparc-unknown-bsdi$UNAME_RELEASE - ;; + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; *:BSD/OS:*:*) - GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi else - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf fi - ;; + exit ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL - ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; i*:CYGWIN*:*) - GUESS=$UNAME_MACHINE-pc-cygwin - ;; + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; *:MINGW64*:*) - GUESS=$UNAME_MACHINE-pc-mingw64 - ;; + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; *:MINGW*:*) - GUESS=$UNAME_MACHINE-pc-mingw32 - ;; + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; *:MSYS*:*) - GUESS=$UNAME_MACHINE-pc-msys - ;; + echo "$UNAME_MACHINE"-pc-msys + exit ;; i*:PW*:*) - GUESS=$UNAME_MACHINE-pc-pw32 - ;; - *:SerenityOS:*:*) - GUESS=$UNAME_MACHINE-pc-serenity - ;; + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; *:Interix*:*) - case $UNAME_MACHINE in + case "$UNAME_MACHINE" in x86) - GUESS=i586-pc-interix$UNAME_RELEASE - ;; + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; authenticamd | genuineintel | EM64T) - GUESS=x86_64-unknown-interix$UNAME_RELEASE - ;; + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; IA64) - GUESS=ia64-unknown-interix$UNAME_RELEASE - ;; + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; esac ;; i*:UWIN*:*) - GUESS=$UNAME_MACHINE-pc-uwin - ;; + echo "$UNAME_MACHINE"-pc-uwin + exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - GUESS=x86_64-pc-cygwin - ;; + echo x86_64-unknown-cygwin + exit ;; prep*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=powerpcle-unknown-solaris2$SUN_REL - ;; + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; *:GNU:*:*) # the GNU system - GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` - GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL - ;; + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC - ;; - x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-pc-managarm-mlibc" - ;; - *:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" - ;; + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; *:Minix:*:*) - GUESS=$UNAME_MACHINE-unknown-minix - ;; + echo "$UNAME_MACHINE"-unknown-minix + exit ;; aarch64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __ARM_EABI__ - #ifdef __ARM_PCS_VFP - ABI=eabihf - #else - ABI=eabi - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; - esac - fi - GUESS=$CPU-unknown-linux-$LIBCABI - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -1022,245 +919,183 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi - ;; + exit ;; avr32*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; cris:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; crisv32:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; e2k:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; frv:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; hexagon:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; i*86:Linux:*:*) - GUESS=$UNAME_MACHINE-pc-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; ia64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; k1om:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - kvx:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - kvx:cos:*:*) - GUESS=$UNAME_MACHINE-unknown-cos - ;; - kvx:mbr:*:*) - GUESS=$UNAME_MACHINE-unknown-mbr - ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m32r*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m68*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= + CPU=${UNAME_MACHINE} #else - MIPS_ENDIAN= + CPU= #endif #endif EOF - cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` - eval "$cc_set_vars" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; openrisc*:Linux:*:*) - GUESS=or1k-unknown-linux-$LIBC - ;; + echo or1k-unknown-linux-"$LIBC" + exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; padre:Linux:*:*) - GUESS=sparc-unknown-linux-$LIBC - ;; + echo sparc-unknown-linux-"$LIBC" + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - GUESS=hppa64-unknown-linux-$LIBC - ;; + echo hppa64-unknown-linux-"$LIBC" + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; - PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; - *) GUESS=hppa-unknown-linux-$LIBC ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac - ;; + exit ;; ppc64:Linux:*:*) - GUESS=powerpc64-unknown-linux-$LIBC - ;; + echo powerpc64-unknown-linux-"$LIBC" + exit ;; ppc:Linux:*:*) - GUESS=powerpc-unknown-linux-$LIBC - ;; + echo powerpc-unknown-linux-"$LIBC" + exit ;; ppc64le:Linux:*:*) - GUESS=powerpc64le-unknown-linux-$LIBC - ;; + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; ppcle:Linux:*:*) - GUESS=powerpcle-unknown-linux-$LIBC - ;; - riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; s390:Linux:*:* | s390x:Linux:*:*) - GUESS=$UNAME_MACHINE-ibm-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; sh64*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; sh*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; tile*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; vax:Linux:*:*) - GUESS=$UNAME_MACHINE-dec-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; x86_64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __i386__ - ABI=x86 - #else - #ifdef __ILP32__ - ABI=x32 - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - x86) CPU=i686 ;; - x32) LIBCABI=${LIBC}x32 ;; - esac - fi - GUESS=$CPU-pc-linux-$LIBCABI - ;; + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; xtensa*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - GUESS=i386-sequent-sysv4 - ;; + echo i386-sequent-sysv4 + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION - ;; + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; i*86:OS/2:*:*) - # If we were able to find 'uname', then EMX Unix compatibility + # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - GUESS=$UNAME_MACHINE-pc-os2-emx - ;; + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; i*86:XTS-300:*:STOP) - GUESS=$UNAME_MACHINE-unknown-stop - ;; + echo "$UNAME_MACHINE"-unknown-stop + exit ;; i*86:atheos:*:*) - GUESS=$UNAME_MACHINE-unknown-atheos - ;; + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; i*86:syllable:*:*) - GUESS=$UNAME_MACHINE-pc-syllable - ;; + echo "$UNAME_MACHINE"-pc-syllable + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - GUESS=i386-unknown-lynxos$UNAME_RELEASE - ;; + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; i*86:*DOS:*:*) - GUESS=$UNAME_MACHINE-pc-msdosdjgpp - ;; + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi - ;; + exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1268,12 +1103,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - ;; + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL + echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1283,11 +1118,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - GUESS=$UNAME_MACHINE-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi - ;; + exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1295,31 +1130,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - GUESS=i586-pc-msdosdjgpp - ;; + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) - GUESS=i386-pc-mach3 - ;; + echo i386-pc-mach3 + exit ;; paragon:*:*:*) - GUESS=i860-intel-osf1 - ;; + echo i860-intel-osf1 + exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi - ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" - GUESS=m68010-convergent-sysv - ;; + echo m68010-convergent-sysv + exit ;; mc68k:UNIX:SYSTEM5:3.51m) - GUESS=m68k-convergent-sysv - ;; + echo m68k-convergent-sysv + exit ;; M680?0:D-NIX:5.3:*) - GUESS=m68k-diab-dnix - ;; + echo m68k-diab-dnix + exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1344,411 +1179,250 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - GUESS=m68k-unknown-lynxos$UNAME_RELEASE - ;; + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; mc68030:UNIX_System_V:4.*:*) - GUESS=m68k-atari-sysv4 - ;; + echo m68k-atari-sysv4 + exit ;; TSUNAMI:LynxOS:2.*:*) - GUESS=sparc-unknown-lynxos$UNAME_RELEASE - ;; + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; rs6000:LynxOS:2.*:*) - GUESS=rs6000-unknown-lynxos$UNAME_RELEASE - ;; + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - GUESS=powerpc-unknown-lynxos$UNAME_RELEASE - ;; + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; SM[BE]S:UNIX_SV:*:*) - GUESS=mips-dde-sysv$UNAME_RELEASE - ;; + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; RM*:ReliantUNIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; + echo mips-sni-sysv4 + exit ;; RM*:SINIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; + echo mips-sni-sysv4 + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - GUESS=$UNAME_MACHINE-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else - GUESS=ns32k-sni-sysv + echo ns32k-sni-sysv fi - ;; - PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> - GUESS=i586-unisys-sysv4 - ;; + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm - GUESS=hppa1.1-stratus-sysv4 - ;; + echo hppa1.1-stratus-sysv4 + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - GUESS=i860-stratus-sysv4 - ;; + echo i860-stratus-sysv4 + exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - GUESS=$UNAME_MACHINE-stratus-vos - ;; + echo "$UNAME_MACHINE"-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. - GUESS=hppa1.1-stratus-vos - ;; + echo hppa1.1-stratus-vos + exit ;; mc68*:A/UX:*:*) - GUESS=m68k-apple-aux$UNAME_RELEASE - ;; + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; news*:NEWS-OS:6*:*) - GUESS=mips-sony-newsos6 - ;; + echo mips-sony-newsos6 + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if test -d /usr/nec; then - GUESS=mips-nec-sysv$UNAME_RELEASE + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" else - GUESS=mips-unknown-sysv$UNAME_RELEASE + echo mips-unknown-sysv"$UNAME_RELEASE" fi - ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - GUESS=powerpc-be-beos - ;; + echo powerpc-be-beos + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - GUESS=powerpc-apple-beos - ;; + echo powerpc-apple-beos + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - GUESS=i586-pc-beos - ;; + echo i586-pc-beos + exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - GUESS=i586-pc-haiku - ;; - ppc:Haiku:*:*) # Haiku running on Apple PowerPC - GUESS=powerpc-apple-haiku - ;; - *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) - GUESS=$UNAME_MACHINE-unknown-haiku - ;; + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) - GUESS=sx4-nec-superux$UNAME_RELEASE - ;; + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; SX-5:SUPER-UX:*:*) - GUESS=sx5-nec-superux$UNAME_RELEASE - ;; + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; SX-6:SUPER-UX:*:*) - GUESS=sx6-nec-superux$UNAME_RELEASE - ;; + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; SX-7:SUPER-UX:*:*) - GUESS=sx7-nec-superux$UNAME_RELEASE - ;; + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; SX-8:SUPER-UX:*:*) - GUESS=sx8-nec-superux$UNAME_RELEASE - ;; + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; SX-8R:SUPER-UX:*:*) - GUESS=sx8r-nec-superux$UNAME_RELEASE - ;; + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; SX-ACE:SUPER-UX:*:*) - GUESS=sxace-nec-superux$UNAME_RELEASE - ;; + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; Power*:Rhapsody:*:*) - GUESS=powerpc-apple-rhapsody$UNAME_RELEASE - ;; + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; *:Rhapsody:*:*) - GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE - ;; - arm64:Darwin:*:*) - GUESS=aarch64-apple-darwin$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc fi - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi - GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE - ;; + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE - ;; + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; *:QNX:*:4*) - GUESS=i386-pc-qnx - ;; + echo i386-pc-qnx + exit ;; NEO-*:NONSTOP_KERNEL:*:*) - GUESS=neo-tandem-nsk$UNAME_RELEASE - ;; + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; NSE-*:NONSTOP_KERNEL:*:*) - GUESS=nse-tandem-nsk$UNAME_RELEASE - ;; + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; NSR-*:NONSTOP_KERNEL:*:*) - GUESS=nsr-tandem-nsk$UNAME_RELEASE - ;; + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; NSV-*:NONSTOP_KERNEL:*:*) - GUESS=nsv-tandem-nsk$UNAME_RELEASE - ;; + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; NSX-*:NONSTOP_KERNEL:*:*) - GUESS=nsx-tandem-nsk$UNAME_RELEASE - ;; + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; *:NonStop-UX:*:*) - GUESS=mips-compaq-nonstopux - ;; + echo mips-compaq-nonstopux + exit ;; BS2000:POSIX*:*:*) - GUESS=bs2000-siemens-sysv - ;; + echo bs2000-siemens-sysv + exit ;; DS/*:UNIX_System_V:*:*) - GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "${cputype-}" = 386; then + # shellcheck disable=SC2154 + if test "$cputype" = 386; then UNAME_MACHINE=i386 - elif test "x${cputype-}" != x; then - UNAME_MACHINE=$cputype + else + UNAME_MACHINE="$cputype" fi - GUESS=$UNAME_MACHINE-unknown-plan9 - ;; + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; *:TOPS-10:*:*) - GUESS=pdp10-unknown-tops10 - ;; + echo pdp10-unknown-tops10 + exit ;; *:TENEX:*:*) - GUESS=pdp10-unknown-tenex - ;; + echo pdp10-unknown-tenex + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - GUESS=pdp10-dec-tops20 - ;; + echo pdp10-dec-tops20 + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - GUESS=pdp10-xkl-tops20 - ;; + echo pdp10-xkl-tops20 + exit ;; *:TOPS-20:*:*) - GUESS=pdp10-unknown-tops20 - ;; + echo pdp10-unknown-tops20 + exit ;; *:ITS:*:*) - GUESS=pdp10-unknown-its - ;; + echo pdp10-unknown-its + exit ;; SEI:*:*:SEIUX) - GUESS=mips-sei-seiux$UNAME_RELEASE - ;; + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; *:DragonFly:*:*) - DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL - ;; + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case $UNAME_MACHINE in - A*) GUESS=alpha-dec-vms ;; - I*) GUESS=ia64-dec-vms ;; - V*) GUESS=vax-dec-vms ;; + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) - GUESS=i386-pc-xenix - ;; + echo i386-pc-xenix + exit ;; i*86:skyos:*:*) - SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` - GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL - ;; + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; i*86:rdos:*:*) - GUESS=$UNAME_MACHINE-pc-rdos - ;; - i*86:Fiwix:*:*) - GUESS=$UNAME_MACHINE-pc-fiwix - ;; - *:AROS:*:*) - GUESS=$UNAME_MACHINE-unknown-aros - ;; + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; x86_64:VMkernel:*:*) - GUESS=$UNAME_MACHINE-unknown-esx - ;; + echo "$UNAME_MACHINE"-unknown-esx + exit ;; amd64:Isilon\ OneFS:*:*) - GUESS=x86_64-unknown-onefs - ;; - *:Unleashed:*:*) - GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE - ;; - *:Ironclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad - ;; + echo x86_64-unknown-onefs + exit ;; esac -# Do we have a guess based on uname results? -if test "x$GUESS" != x; then - echo "$GUESS" - exit -fi - -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" <<EOF -#ifdef _SEQUENT_ -#include <sys/types.h> -#include <sys/utsname.h> -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include <signal.h> -#if defined(_SIZE_T_) || defined(SIGLOST) -#include <sys/utsname.h> -#endif -#endif -#endif -int -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include <sys/param.h> -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - echo "$0: unable to guess system type" >&2 -case $UNAME_MACHINE:$UNAME_SYSTEM in +case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <<EOF @@ -1765,17 +1439,9 @@ This script (version $timestamp), has failed to recognize the operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/cgit/config.git/plain/config.guess + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and - https://git.savannah.gnu.org/cgit/config.git/plain/config.sub -EOF - -our_year=`echo $timestamp | sed 's,-.*,,'` -thisyear=`date +%Y` -# shellcheck disable=SC2003 -script_age=`expr "$thisyear" - "$our_year"` -if test "$script_age" -lt 3 ; then - cat >&2 <<EOF + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub If $0 has already been updated, send the following data and any information you think might be pertinent to config-patches@gnu.org to @@ -1803,7 +1469,6 @@ UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF -fi exit 1 diff --git a/admin/config.sub b/admin/config.sub index 4aaae46f6f74..dad71239a8f8 100755 --- a/admin/config.sub +++ b/admin/config.sub @@ -1,14 +1,12 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale - -timestamp='2024-05-27' +timestamp='2018-05-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -35,7 +33,7 @@ timestamp='2024-05-27' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -52,13 +50,6 @@ timestamp='2024-05-27' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -76,13 +67,13 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try '$me --help' for more information." +Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -98,7 +89,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" >&2 + echo "$me: invalid option $1$help" exit 1 ;; *local*) @@ -120,157 +111,67 @@ case $# in esac # Split fields of configuration type -saved_IFS=$IFS -IFS="-" read field1 field2 field3 field4 <<EOF +IFS="-" read -r field1 field2 field3 field4 <<EOF $1 EOF -IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo "Invalid configuration '$1': more than four components" >&2 + echo Invalid configuration \`"$1"\': more than four components >&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 - basic_os=$field3-$field4 + os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in - cloudabi*-eabi* \ - | kfreebsd*-gnu* \ - | knetbsd*-gnu* \ - | kopensolaris*-gnu* \ - | linux-* \ - | managarm-* \ - | netbsd*-eabi* \ - | netbsd*-gnu* \ - | nto-qnx* \ - | os2-emx* \ - | rtmk-nova* \ - | storm-chaos* \ - | uclinux-gnu* \ - | uclinux-uclibc* \ - | windows-* ) + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 - basic_os=$maybe_os + os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - basic_os=linux-android + os=linux-android ;; *) basic_machine=$field1-$field2 - basic_os=$field3 + os=$field3 ;; esac ;; *-*) - case $field1-$field2 in - # Shorthands that happen to contain a single dash - convex-c[12] | convex-c3[248]) - basic_machine=$field2-convex - basic_os= + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 ;; - decstation-3100) - basic_machine=mips-dec - basic_os= + # Manufacturers + dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \ + | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \ + | harris | dolphin | highlevel | gould | cbm | ns | masscomp \ + | apple | axis | knuth | cray | microblaze* \ + | sim | cisco | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Do not treat sunos as a manufacturer - sun*os*) - basic_machine=$field1 - basic_os=$field2 - ;; - # Manufacturers - 3100* \ - | 32* \ - | 3300* \ - | 3600* \ - | 7300* \ - | acorn \ - | altos* \ - | apollo \ - | apple \ - | atari \ - | att* \ - | axis \ - | be \ - | bull \ - | cbm \ - | ccur \ - | cisco \ - | commodore \ - | convergent* \ - | convex* \ - | cray \ - | crds \ - | dec* \ - | delta* \ - | dg \ - | digital \ - | dolphin \ - | encore* \ - | gould \ - | harris \ - | highlevel \ - | hitachi* \ - | hp \ - | ibm* \ - | intergraph \ - | isi* \ - | knuth \ - | masscomp \ - | microblaze* \ - | mips* \ - | motorola* \ - | ncr* \ - | news \ - | next \ - | ns \ - | oki \ - | omron* \ - | pc533* \ - | rebel \ - | rom68k \ - | rombug \ - | semi \ - | sequent* \ - | siemens \ - | sgi* \ - | siemens \ - | sim \ - | sni \ - | sony* \ - | stratus \ - | sun \ - | sun[234]* \ - | tektronix \ - | tti* \ - | ultra \ - | unicom* \ - | wec \ - | winbond \ - | wrs) - basic_machine=$field1-$field2 - basic_os= - ;; - zephyr*) - basic_machine=$field1-unknown - basic_os=$field2 - ;; - *) - basic_machine=$field1 - basic_os=$field2 - ;; - esac - ;; esac ;; *) @@ -279,1211 +180,1099 @@ case $1 in case $field1 in 386bsd) basic_machine=i386-pc - basic_os=bsd + os=bsd ;; a29khif) basic_machine=a29k-amd - basic_os=udi + os=udi ;; adobe68k) basic_machine=m68010-adobe - basic_os=scout - ;; - alliant) - basic_machine=fx80-alliant - basic_os= - ;; - altos | altos3068) - basic_machine=m68k-altos - basic_os= + os=scout ;; am29k) basic_machine=a29k-none - basic_os=bsd + os=bsd ;; amdahl) basic_machine=580-amdahl - basic_os=sysv - ;; - amiga) - basic_machine=m68k-unknown - basic_os= + os=sysv ;; amigaos | amigados) basic_machine=m68k-unknown - basic_os=amigaos + os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown - basic_os=sysv4 + os=sysv4 ;; apollo68) basic_machine=m68k-apollo - basic_os=sysv + os=sysv ;; apollo68bsd) basic_machine=m68k-apollo - basic_os=bsd + os=bsd ;; aros) basic_machine=i386-pc - basic_os=aros + os=aros ;; aux) basic_machine=m68k-apple - basic_os=aux + os=aux ;; balance) basic_machine=ns32k-sequent - basic_os=dynix + os=dynix ;; blackfin) basic_machine=bfin-unknown - basic_os=linux + os=linux ;; cegcc) basic_machine=arm-unknown - basic_os=cegcc + os=cegcc ;; cray) basic_machine=j90-cray - basic_os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - basic_os= - ;; - da30) - basic_machine=m68k-da30 - basic_os= + os=unicos ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - basic_os= + craynv) + basic_machine=craynv-cray + os=unicosmp ;; delta88) basic_machine=m88k-motorola - basic_os=sysv3 + os=sysv3 ;; dicos) basic_machine=i686-pc - basic_os=dicos + os=dicos ;; djgpp) basic_machine=i586-pc - basic_os=msdosdjgpp + os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd - basic_os=ebmon + os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson - basic_os=ose + os=ose ;; gmicro) basic_machine=tron-gmicro - basic_os=sysv + os=sysv ;; go32) basic_machine=i386-pc - basic_os=go32 + os=go32 ;; h8300hms) basic_machine=h8300-hitachi - basic_os=hms + os=hms ;; h8300xray) basic_machine=h8300-hitachi - basic_os=xray + os=xray ;; h8500hms) basic_machine=h8500-hitachi - basic_os=hms + os=hms ;; harris) basic_machine=m88k-harris - basic_os=sysv3 + os=sysv3 ;; - hp300 | hp300hpux) + hp300bsd) basic_machine=m68k-hp - basic_os=hpux + os=bsd ;; - hp300bsd) + hp300hpux) basic_machine=m68k-hp - basic_os=bsd + os=hpux ;; hppaosf) basic_machine=hppa1.1-hp - basic_os=osf + os=osf ;; hppro) basic_machine=hppa1.1-hp - basic_os=proelf + os=proelf ;; i386mach) basic_machine=i386-mach - basic_os=mach + os=mach + ;; + vsta) + basic_machine=i386-unknown + os=vsta ;; isi68 | isi) basic_machine=m68k-isi - basic_os=sysv + os=sysv ;; m68knommu) basic_machine=m68k-unknown - basic_os=linux + os=linux ;; magnum | m3230) basic_machine=mips-mips - basic_os=sysv + os=sysv ;; merlin) basic_machine=ns32k-utek - basic_os=sysv + os=sysv ;; mingw64) basic_machine=x86_64-pc - basic_os=mingw64 + os=mingw64 ;; mingw32) basic_machine=i686-pc - basic_os=mingw32 + os=mingw32 ;; mingw32ce) basic_machine=arm-unknown - basic_os=mingw32ce + os=mingw32ce ;; monitor) basic_machine=m68k-rom68k - basic_os=coff + os=coff ;; morphos) basic_machine=powerpc-unknown - basic_os=morphos + os=morphos ;; moxiebox) basic_machine=moxie-unknown - basic_os=moxiebox + os=moxiebox ;; msdos) basic_machine=i386-pc - basic_os=msdos + os=msdos ;; msys) basic_machine=i686-pc - basic_os=msys + os=msys ;; mvs) basic_machine=i370-ibm - basic_os=mvs + os=mvs ;; nacl) basic_machine=le32-unknown - basic_os=nacl + os=nacl ;; ncr3000) basic_machine=i486-ncr - basic_os=sysv4 + os=sysv4 ;; netbsd386) - basic_machine=i386-pc - basic_os=netbsd + basic_machine=i386-unknown + os=netbsd ;; netwinder) basic_machine=armv4l-rebel - basic_os=linux + os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony - basic_os=newsos + os=newsos ;; news1000) basic_machine=m68030-sony - basic_os=newsos + os=newsos ;; necv70) basic_machine=v70-nec - basic_os=sysv + os=sysv ;; nh3000) basic_machine=m68k-harris - basic_os=cxux + os=cxux ;; nh[45]000) basic_machine=m88k-harris - basic_os=cxux + os=cxux ;; nindy960) basic_machine=i960-intel - basic_os=nindy + os=nindy ;; mon960) basic_machine=i960-intel - basic_os=mon960 + os=mon960 ;; nonstopux) basic_machine=mips-compaq - basic_os=nonstopux + os=nonstopux ;; os400) basic_machine=powerpc-ibm - basic_os=os400 + os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson - basic_os=ose + os=ose ;; os68k) basic_machine=m68k-none - basic_os=os68k + os=os68k ;; paragon) basic_machine=i860-intel - basic_os=osf + os=osf ;; parisc) basic_machine=hppa-unknown - basic_os=linux - ;; - psp) - basic_machine=mipsallegrexel-sony - basic_os=psp + os=linux ;; pw32) basic_machine=i586-unknown - basic_os=pw32 + os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc - basic_os=rdos + os=rdos ;; rdos32) basic_machine=i386-pc - basic_os=rdos + os=rdos ;; rom68k) basic_machine=m68k-rom68k - basic_os=coff + os=coff ;; sa29200) basic_machine=a29k-amd - basic_os=udi + os=udi ;; sei) basic_machine=mips-sei - basic_os=seiux - ;; - sequent) - basic_machine=i386-sequent - basic_os= + os=seiux ;; sps7) basic_machine=m68k-bull - basic_os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - basic_os= + os=sysv2 ;; stratus) basic_machine=i860-stratus - basic_os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - basic_os= + os=sysv4 ;; sun2os3) basic_machine=m68000-sun - basic_os=sunos3 + os=sunos3 ;; sun2os4) basic_machine=m68000-sun - basic_os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - basic_os= + os=sunos4 ;; sun3os3) basic_machine=m68k-sun - basic_os=sunos3 + os=sunos3 ;; sun3os4) basic_machine=m68k-sun - basic_os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - basic_os= + os=sunos4 ;; sun4os3) basic_machine=sparc-sun - basic_os=sunos3 + os=sunos3 ;; sun4os4) basic_machine=sparc-sun - basic_os=sunos4 + os=sunos4 ;; sun4sol2) basic_machine=sparc-sun - basic_os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - basic_os= + os=solaris2 ;; sv1) basic_machine=sv1-cray - basic_os=unicos + os=unicos ;; symmetry) basic_machine=i386-sequent - basic_os=dynix + os=dynix ;; t3e) basic_machine=alphaev5-cray - basic_os=unicos + os=unicos ;; t90) basic_machine=t90-cray - basic_os=unicos + os=unicos ;; toad1) basic_machine=pdp10-xkl - basic_os=tops20 + os=tops20 ;; tpf) basic_machine=s390x-ibm - basic_os=tpf + os=tpf ;; udi29k) basic_machine=a29k-amd - basic_os=udi + os=udi ;; ultra3) basic_machine=a29k-nyu - basic_os=sym1 + os=sym1 ;; v810 | necv810) basic_machine=v810-nec - basic_os=none + os=none ;; vaxv) basic_machine=vax-dec - basic_os=sysv + os=sysv ;; vms) basic_machine=vax-dec - basic_os=vms - ;; - vsta) - basic_machine=i386-pc - basic_os=vsta + os=vms ;; vxworks960) basic_machine=i960-wrs - basic_os=vxworks + os=vxworks ;; vxworks68) basic_machine=m68k-wrs - basic_os=vxworks + os=vxworks ;; vxworks29k) basic_machine=a29k-wrs - basic_os=vxworks + os=vxworks ;; xbox) basic_machine=i686-pc - basic_os=mingw32 + os=mingw32 ;; ymp) basic_machine=ymp-cray - basic_os=unicos + os=unicos ;; *) basic_machine=$1 - basic_os= + os= ;; esac ;; esac -# Decode 1-component or ad-hoc basic machines +# Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper | csky \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown ;; - op50n) - cpu=hppa1.1 - vendor=oki + c54x) + basic_machine=tic54x-unknown ;; - op60c) - cpu=hppa1.1 - vendor=oki + c55x) + basic_machine=tic55x-unknown ;; - ibm*) - cpu=i370 - vendor=ibm + c6x) + basic_machine=tic6x-unknown ;; - orion105) - cpu=clipper - vendor=highlevel + leon|leon[3-9]) + basic_machine=sparc-$basic_machine ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=${os:-none} ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + m9s12z | m68hcs12z | hcs12z | s12z) + basic_machine=s12z-unknown + os=${os:-none} + ;; + ms1) + basic_machine=mt-unknown + ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=${os:-none} + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nfp-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | powerpcspe-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att + basic_machine=m68000-att ;; 3b*) - cpu=we32k - vendor=att + basic_machine=we32k-att + ;; + abacus) + basic_machine=abacus-unknown + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=linux ;; bluegene*) - cpu=powerpc - vendor=ibm - basic_os=cnk + basic_machine=powerpc-ibm + os=cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=${os:-unicos} + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=${os:-elf} + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=${os:-elf} + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec ;; decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - basic_os=tops10 + basic_machine=pdp10-dec + os=tops10 ;; decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - basic_os=tops20 + basic_machine=pdp10-dec + os=tops20 ;; - delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) - cpu=m68k - vendor=motorola + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola ;; - # This used to be dpx2*, but that gets the RS6000-based - # DPX/20 and the x86-based DPX/2-100 wrong. See - # https://oldskool.silicium.org/stations/bull_dpx20.htm - # https://www.feb-patrimoine.com/english/bull_dpx2.htm - # https://www.feb-patrimoine.com/english/unix_and_bull.htm - dpx2 | dpx2[23]00 | dpx2[23]xx) - cpu=m68k - vendor=bull + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=${os:-bosx} + ;; + dpx2*) + basic_machine=m68k-bull + os=sysv3 ;; - dpx2100 | dpx21xx) - cpu=i386 - vendor=bull + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" ;; - dpx20) - cpu=rs6000 - vendor=bull + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" ;; encore | umax | mmax) - cpu=ns32k - vendor=encore + basic_machine=ns32k-encore ;; elxsi) - cpu=elxsi - vendor=elxsi - basic_os=${basic_os:-bsd} + basic_machine=elxsi-elxsi + os=${os:-bsd} ;; fx2800) - cpu=i860 - vendor=alliant + basic_machine=i860-alliant ;; genix) - cpu=ns32k - vendor=ns + basic_machine=ns32k-ns ;; h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 + basic_machine=hppa1.1-hitachi + os=hiuxwe2 + ;; + hp300-*) + basic_machine=m68k-hp ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp + basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp + basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp + basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp + basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp + basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp + basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp + basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp + basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp + basic_machine=hppa1.0-hp + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm ;; i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv32 + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=sysv32 ;; i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv4 + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=sysv4 ;; i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=sysv ;; i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=solaris2 + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=solaris2 ;; j90 | j90-cray) - cpu=j90 - vendor=cray - basic_os=${basic_os:-unicos} + basic_machine=j90-cray + os=${os:-unicos} ;; iris | iris4d) - cpu=mips - vendor=sgi - case $basic_os in + basic_machine=mips-sgi + case $os in irix*) ;; *) - basic_os=irix4 + os=irix4 ;; esac ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - basic_os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - basic_os=newsos + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; - next | m*-next) - cpu=m68k - vendor=next + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=linux ;; - np1) - cpu=np1 - vendor=gould + microblaze*) + basic_machine=microblaze-xilinx ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - basic_os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 + miniframe) + basic_machine=m68000-convergent ;; - pbd) - cpu=sparc - vendor=tti + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=mint ;; - pbb) - cpu=m68k - vendor=tti + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; - pc532) - cpu=ns32k - vendor=pc532 + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; - pn) - cpu=pn - vendor=gould + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; - power) - cpu=power - vendor=ibm + news-3600 | risc-news) + basic_machine=mips-sony + os=newsos ;; - ps2) - cpu=i386 - vendor=ibm + next | m*-next) + basic_machine=m68k-next + case $os in + nextstep* ) + ;; + ns2*) + os=nextstep2 + ;; + *) + os=nextstep3 + ;; + esac ;; - rm[46]00) - cpu=mips - vendor=siemens + np1) + basic_machine=np1-gould ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm + neo-tandem) + basic_machine=neo-tandem ;; - sde) - cpu=mipsisa32 - vendor=sde - basic_os=${basic_os:-elf} + nse-tandem) + basic_machine=nse-tandem ;; - simso-wrs) - cpu=sparclite - vendor=wrs - basic_os=vxworks + nsr-tandem) + basic_machine=nsr-tandem ;; - tower | tower-32) - cpu=m68k - vendor=ncr + nsv-tandem) + basic_machine=nsv-tandem ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu + nsx-tandem) + basic_machine=nsx-tandem ;; - w65) - cpu=w65 - vendor=wdc + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=proelf ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - basic_os=proelf + openrisc | openrisc-*) + basic_machine=or32-unknown ;; - none) - cpu=none - vendor=none + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=hiuxwe2 ;; - leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=linux ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` + pbd) + basic_machine=sparc-tti ;; - - *-*) - saved_IFS=$IFS - IFS="-" read cpu vendor <<EOF -$basic_machine -EOF - IFS=$saved_IFS + pbb) + basic_machine=m68k-tti ;; - # We use 'pc' rather than 'unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - cpu=$basic_machine - vendor=pc + pc532 | pc532-*) + basic_machine=ns32k-pc532 ;; - # These rules are duplicated from below for sake of the special case above; - # i.e. things that normalized to x86 arches should also default to "pc" pc98) - cpu=i386 - vendor=pc + basic_machine=i386-pc ;; - x64 | amd64) - cpu=x86_64 - vendor=pc - ;; - # Recognize the basic CPU types without company name. - *) - cpu=$basic_machine - vendor=unknown + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; -esac - -unset -v basic_machine - -# Decode basic machines in the full and proper CPU-Company form. -case $cpu-$vendor in - # Here we handle the default manufacturer of certain CPU types in canonical form. - # It is in some cases the only manufacturer, in others, it is the most popular. - c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown) - vendor=convex - basic_os=${basic_os:-bsd} + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc ;; - craynv-unknown) - vendor=cray - basic_os=${basic_os:-unicosmp} + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc ;; - c90-unknown | c90-cray) - vendor=cray - basic_os=${basic_os:-unicos} + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc ;; - fx80-unknown) - vendor=alliant + pentium4) + basic_machine=i786-pc ;; - romp-unknown) - vendor=ibm + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - mmix-unknown) - vendor=knuth + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - microblaze-unknown | microblazeel-unknown) - vendor=xilinx + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - rs6000-unknown) - vendor=ibm + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - vax-unknown) - vendor=dec + pn) + basic_machine=pn-gould ;; - pdp11-unknown) - vendor=dec + power) basic_machine=power-ibm ;; - we32k-unknown) - vendor=att + ppc | ppcbe) basic_machine=powerpc-unknown ;; - cydra-unknown) - vendor=cydrome + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - i370-ibm*) - vendor=ibm + ppcle | powerpclittle) + basic_machine=powerpcle-unknown ;; - orion-unknown) - vendor=highlevel + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - xps-unknown | xps100-unknown) - cpu=xps100 - vendor=honeywell + ppc64) basic_machine=powerpc64-unknown ;; - - # Here we normalize CPU types with a missing or matching vendor - armh-unknown | armh-alt) - cpu=armv7l - vendor=alt - basic_os=${basic_os:-linux-gnueabihf} + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - - # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified - m68k-isi) - basic_os=${basic_os:-sysv} + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown ;; - m68k-sony) - basic_os=${basic_os:-newsos} + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - m68k-tektronix) - basic_os=${basic_os:-bsd} + ps2) + basic_machine=i386-ibm ;; - m88k-harris) - basic_os=${basic_os:-sysv3} + rm[46]00) + basic_machine=mips-siemens ;; - i386-bull | m68k-bull) - basic_os=${basic_os:-sysv3} + rtpc | rtpc-*) + basic_machine=romp-ibm ;; - rs6000-bull) - basic_os=${basic_os:-bosx} + s390 | s390-*) + basic_machine=s390-ibm ;; - mips-sni) - basic_os=${basic_os:-sysv4} + s390x | s390x-*) + basic_machine=s390x-ibm ;; - - # Here we normalize CPU types irrespective of the vendor - amd64-*) - cpu=x86_64 + sb1) + basic_machine=mipsisa64sb1-unknown ;; - blackfin-*) - cpu=bfin - basic_os=${basic_os:-linux} + sb1el) + basic_machine=mipsisa64sb1el-unknown ;; - c54x-*) - cpu=tic54x + sde) + basic_machine=mipsisa32-sde + os=${os:-elf} ;; - c55x-*) - cpu=tic55x + sequent) + basic_machine=i386-sequent ;; - c6x-*) - cpu=tic6x + sh5el) + basic_machine=sh5le-unknown ;; - e500v[12]-*) - cpu=powerpc - basic_os=${basic_os}"spe" + simso-wrs) + basic_machine=sparclite-wrs + os=vxworks ;; - mips3*-*) - cpu=mips64 + spur) + basic_machine=spur-unknown ;; - ms1-*) - cpu=mt + st2000) + basic_machine=m68k-tandem ;; - m68knommu-*) - cpu=m68k - basic_os=${basic_os:-linux} + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) - cpu=s12z + sun2) + basic_machine=m68000-sun ;; - openrisc-*) - cpu=or32 + sun3 | sun3-*) + basic_machine=m68k-sun ;; - parisc-*) - cpu=hppa - basic_os=${basic_os:-linux} + sun4) + basic_machine=sparc-sun ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - cpu=i586 + sun386 | sun386i | roadrunner) + basic_machine=i386-sun ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) - cpu=i686 + tile*) + basic_machine=$basic_machine-unknown + os=linux-gnu ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - cpu=i686 + tx39) + basic_machine=mipstx39-unknown ;; - pentium4-*) - cpu=i786 + tx39el) + basic_machine=mipstx39el-unknown ;; - ppc-* | ppcbe-*) - cpu=powerpc + tower | tower-32) + basic_machine=m68k-ncr ;; - ppcle-* | powerpclittle-*) - cpu=powerpcle + vpp*|vx|vx-*) + basic_machine=f301-fujitsu ;; - ppc64-*) - cpu=powerpc64 + w65*) + basic_machine=w65-wdc + os=none ;; - ppc64le-* | powerpc64little-*) - cpu=powerpc64le + w89k-*) + basic_machine=hppa1.1-winbond + os=proelf ;; - sb1-*) - cpu=mipsisa64sb1 + x64) + basic_machine=x86_64-pc ;; - sb1el-*) - cpu=mipsisa64sb1el + xps | xps100) + basic_machine=xps100-honeywell ;; - sh5e[lb]-*) - cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; - spur-*) - cpu=spur + none) + basic_machine=none-none + os=${os:-none} ;; - strongarm-* | thumb-*) - cpu=arm + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond ;; - tx39-*) - cpu=mipstx39 + op50n) + basic_machine=hppa1.1-oki ;; - tx39el-*) - cpu=mipstx39el + op60c) + basic_machine=hppa1.1-oki ;; - xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + romp) + basic_machine=romp-ibm ;; - arm64-* | aarch64le-*) - cpu=aarch64 + mmix) + basic_machine=mmix-knuth ;; - - # Recognize the canonical CPU Types that limit and/or modify the - # company names they are paired with. - cr16-*) - basic_os=${basic_os:-elf} + rs6000) + basic_machine=rs6000-ibm ;; - crisv32-* | etraxfs*-*) - cpu=crisv32 - vendor=axis + vax) + basic_machine=vax-dec ;; - cris-* | etrax*-*) - cpu=cris - vendor=axis + pdp11) + basic_machine=pdp11-dec ;; - crx-*) - basic_os=${basic_os:-elf} + we32k) + basic_machine=we32k-att ;; - neo-tandem) - cpu=neo - vendor=tandem + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown ;; - nse-tandem) - cpu=nse - vendor=tandem + cydra) + basic_machine=cydra-cydrome ;; - nsr-tandem) - cpu=nsr - vendor=tandem + orion) + basic_machine=orion-highlevel ;; - nsv-tandem) - cpu=nsv - vendor=tandem + orion105) + basic_machine=clipper-highlevel ;; - nsx-tandem) - cpu=nsx - vendor=tandem + mac | mpw | mac-mpw) + basic_machine=m68k-apple ;; - mipsallegrexel-sony) - cpu=mipsallegrexel - vendor=sony + pmac | pmac-mpw) + basic_machine=powerpc-apple ;; - tile*-*) - basic_os=${basic_os:-linux-gnu} + *-unknown) + # Make sure to match an already-canonicalized machine name. ;; - *) - # Recognize the canonical CPU types that are allowed with any - # company name. - case $cpu in - 1750a \ - | 580 \ - | [cjt]90 \ - | a29k \ - | aarch64 \ - | aarch64_be \ - | aarch64c \ - | abacus \ - | alpha \ - | alpha64 \ - | alpha64ev56 \ - | alpha64ev6[78] \ - | alpha64ev[4-8] \ - | alpha64pca5[67] \ - | alphaev56 \ - | alphaev6[78] \ - | alphaev[4-8] \ - | alphapca5[67] \ - | am33_2.0 \ - | amdgcn \ - | arc \ - | arc32 \ - | arc64 \ - | arceb \ - | arm \ - | arm64e \ - | arm64ec \ - | arm[lb]e \ - | arme[lb] \ - | armv* \ - | asmjs \ - | avr \ - | avr32 \ - | ba \ - | be32 \ - | be64 \ - | bfin \ - | bpf \ - | bs2000 \ - | c30 \ - | c4x \ - | c8051 \ - | c[123]* \ - | clipper \ - | craynv \ - | csky \ - | cydra \ - | d10v \ - | d30v \ - | dlx \ - | dsp16xx \ - | e2k \ - | elxsi \ - | epiphany \ - | f30[01] \ - | f700 \ - | fido \ - | fr30 \ - | frv \ - | ft32 \ - | fx80 \ - | h8300 \ - | h8500 \ - | hexagon \ - | hppa \ - | hppa1.[01] \ - | hppa2.0 \ - | hppa2.0[nw] \ - | hppa64 \ - | i*86 \ - | i370 \ - | i860 \ - | i960 \ - | ia16 \ - | ia64 \ - | ip2k \ - | iq2000 \ - | javascript \ - | k1om \ - | kvx \ - | le32 \ - | le64 \ - | lm32 \ - | loongarch32 \ - | loongarch64 \ - | m32c \ - | m32r \ - | m32rle \ - | m5200 \ - | m68000 \ - | m680[012346]0 \ - | m6811 \ - | m6812 \ - | m68360 \ - | m683?2 \ - | m68hc11 \ - | m68hc12 \ - | m68hcs12x \ - | m68k \ - | m88110 \ - | m88k \ - | maxq \ - | mb \ - | mcore \ - | mep \ - | metag \ - | microblaze \ - | microblazeel \ - | mips* \ - | mmix \ - | mn10200 \ - | mn10300 \ - | moxie \ - | msp430 \ - | mt \ - | nanomips* \ - | nds32 \ - | nds32be \ - | nds32le \ - | nfp \ - | nios \ - | nios2 \ - | nios2eb \ - | nios2el \ - | none \ - | np1 \ - | ns16k \ - | ns32k \ - | nvptx \ - | open8 \ - | or1k* \ - | or32 \ - | orion \ - | pdp10 \ - | pdp11 \ - | picochip \ - | pj \ - | pjl \ - | pn \ - | power \ - | powerpc \ - | powerpc64 \ - | powerpc64le \ - | powerpcle \ - | powerpcspe \ - | pru \ - | pyramid \ - | riscv \ - | riscv32 \ - | riscv32be \ - | riscv64 \ - | riscv64be \ - | rl78 \ - | romp \ - | rs6000 \ - | rx \ - | s390 \ - | s390x \ - | score \ - | sh \ - | sh64 \ - | sh64le \ - | sh[12345][lb]e \ - | sh[1234] \ - | sh[1234]e[lb] \ - | sh[23]e \ - | sh[23]ele \ - | sh[24]a \ - | sh[24]ae[lb] \ - | sh[lb]e \ - | she[lb] \ - | shl \ - | sparc \ - | sparc64 \ - | sparc64b \ - | sparc64v \ - | sparc86x \ - | sparclet \ - | sparclite \ - | sparcv8 \ - | sparcv9 \ - | sparcv9b \ - | sparcv9v \ - | spu \ - | sv1 \ - | sx* \ - | tahoe \ - | thumbv7* \ - | tic30 \ - | tic4x \ - | tic54x \ - | tic55x \ - | tic6x \ - | tic80 \ - | tron \ - | ubicom32 \ - | v70 \ - | v810 \ - | v850 \ - | v850e \ - | v850e1 \ - | v850e2 \ - | v850e2v3 \ - | v850es \ - | vax \ - | vc4 \ - | visium \ - | w65 \ - | wasm32 \ - | wasm64 \ - | we32k \ - | x86 \ - | x86_64 \ - | xc16x \ - | xgate \ - | xps100 \ - | xstormy16 \ - | xtensa* \ - | ymp \ - | z80 \ - | z8k) - ;; - - *) - echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 - exit 1 - ;; - esac + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; - commodore*) - vendor=cbm + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1491,53 +1280,8 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x"$basic_os" != x +if [ x$os != x ] then - -# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just -# set os. -obj= -case $basic_os in - gnu/linux*) - kernel=linux - os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` - ;; - os2-emx) - kernel=os2 - os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` - ;; - nto-qnx*) - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` - ;; - *-*) - saved_IFS=$IFS - IFS="-" read kernel os <<EOF -$basic_os -EOF - IFS=$saved_IFS - ;; - # Default OS when just kernel was specified - nto*) - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto|qnx|'` - ;; - linux*) - kernel=linux - os=`echo "$basic_os" | sed -e 's|linux|gnu|'` - ;; - managarm*) - kernel=managarm - os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` - ;; - *) - kernel= - os=$basic_os - ;; -esac - -# Now, normalize the OS (knowing we just have one component, it's not a kernel, -# etc.) case $os in # First match some system type aliases that might get confused # with valid system types. @@ -1549,7 +1293,7 @@ case $os in os=cnk ;; solaris1 | solaris1.*) - os=`echo "$os" | sed -e 's|solaris1|sunos4|'` + os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; solaris) os=solaris2 @@ -1557,22 +1301,8 @@ case $os in unixware*) os=sysv4.2uw ;; - # The marketing names for NeXT's operating systems were - # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is - # mapped to 'openstep3', but 'openstep1' and 'openstep2' are - # mapped to 'nextstep' and 'nextstep2', consistent with the - # treatment of SunOS/Solaris. - ns | ns1 | nextstep | nextstep1 | openstep1) - os=nextstep - ;; - ns2 | nextstep2 | openstep2) - os=nextstep2 - ;; - ns3 | nextstep3 | openstep | openstep3) - os=openstep3 - ;; - ns4 | nextstep4 | openstep4) - os=openstep4 + gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) es1800*) @@ -1595,9 +1325,12 @@ case $os in os=sco3.2v4 ;; sco3.2.[4-9]*) - os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. ;; - sco*v* | scout) + scout) # Don't match below ;; sco*) @@ -1606,25 +1339,77 @@ case $os in psos*) os=psos ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; qnx*) - os=qnx + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=nto-$os + ;; + esac ;; hiux*) os=hiuxwe2 ;; + nto-qnx*) + ;; + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; lynx*178) os=lynxos178 ;; lynx*5) os=lynxos5 ;; - lynxos*) - # don't get caught up in next wildcard - ;; lynx*) os=lynxos ;; - mac[0-9]*) + mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) @@ -1644,7 +1429,6 @@ case $os in ;; utek*) os=bsd - vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'` ;; dynix*) os=bsd @@ -1661,25 +1445,24 @@ case $os in 386bsd) os=bsd ;; - ctix*) - os=sysv - vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'` - ;; - uts*) + ctix* | uts*) os=sysv ;; nova*) - kernel=rtmk - os=nova + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + nsk*) + os=nsk ;; # Preserve the version number of sinix5. sinix5.*) - os=`echo "$os" | sed -e 's|sinix|sysv|'` - vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'` + os=`echo $os | sed -e 's|sinix|sysv|'` ;; sinix*) os=sysv4 - vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'` ;; tpf*) os=tpf @@ -1699,12 +1482,18 @@ case $os in sysvr4) os=sysv4 ;; + # This must come after sysvr4. + sysv*) + ;; ose*) os=ose ;; *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) os=mint ;; + zvmoe) + os=zvmoe + ;; dicos*) os=dicos ;; @@ -1712,26 +1501,28 @@ case $os in # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $cpu in + case $basic_machine in arm*) os=eabi ;; *) - os= - obj=elf + os=elf ;; esac ;; - aout* | coff* | elf* | pe*) - # These are machine code file formats, not OSes - obj=$os - os= + nacl*) + ;; + ios) + ;; + none) + ;; + *-eabi) ;; *) - # No normalization, but not necessarily accepted, that comes below. + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 ;; esac - else # Here we handle the default operating systems that come with various machines. @@ -1744,54 +1535,42 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -kernel= -obj= -case $cpu-$vendor in +case $basic_machine in score-*) - os= - obj=elf + os=elf ;; spu-*) - os= - obj=elf + os=elf ;; *-acorn) os=riscix1.2 ;; arm*-rebel) - kernel=linux - os=gnu + os=linux ;; arm*-semi) - os= - obj=aout + os=aout ;; c4x-* | tic4x-*) - os= - obj=coff + os=coff ;; c8051-*) - os= - obj=elf + os=elf ;; clipper-intergraph) os=clix ;; hexagon-*) - os= - obj=elf + os=elf ;; tic54x-*) - os= - obj=coff + os=coff ;; tic55x-*) - os= - obj=coff + os=coff ;; tic6x-*) - os= - obj=coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1813,43 +1592,28 @@ case $cpu-$vendor in os=sunos3 ;; m68*-cisco) - os= - obj=aout + os=aout ;; mep-*) - os= - obj=elf - ;; - # The -sgi and -siemens entries must be before the mips- entry - # or we get the wrong os. - *-sgi) - os=irix - ;; - *-siemens) - os=sysv4 + os=elf ;; mips*-cisco) - os= - obj=elf + os=elf ;; - mips*-*|nanomips*-*) - os= - obj=elf + mips*-*) + os=elf ;; or32-*) - os= - obj=coff + os=coff ;; - # This must be before the sparc-* entry or we get the wrong os. - *-tti) + *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 ;; sparc-* | *-sun) os=sunos4.1.1 ;; pru-*) - os= - obj=elf + os=elf ;; *-be) os=beos @@ -1873,7 +1637,7 @@ case $cpu-$vendor in os=hpux ;; *-hitachi) - os=hiuxwe2 + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=sysv @@ -1917,6 +1681,12 @@ case $cpu-$vendor in *-encore) os=bsd ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; *-masscomp) os=rtu ;; @@ -1924,12 +1694,10 @@ case $cpu-$vendor in os=uxpv ;; *-rom68k) - os= - obj=coff + os=coff ;; *-*bug) - os= - obj=coff + os=coff ;; *-apple) os=macos @@ -1944,406 +1712,86 @@ case $cpu-$vendor in os=none ;; esac - fi -# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). - -case $os in - # Sometimes we do "kernel-libc", so those need to count as OSes. - llvm* | musl* | newlib* | relibc* | uclibc*) - ;; - # Likewise for "kernel-abi" - eabi* | gnueabi*) - ;; - # VxWorks passes extra cpu info in the 4th filed. - simlinux | simwindows | spe) - ;; - # See `case $cpu-$os` validation below - ghcjs) - ;; - # Now accept the basic system types. - # Each alternative MUST end in a * to match a version number. - abug \ - | aix* \ - | amdhsa* \ - | amigados* \ - | amigaos* \ - | android* \ - | aof* \ - | aos* \ - | aros* \ - | atheos* \ - | auroraux* \ - | aux* \ - | beos* \ - | bitrig* \ - | bme* \ - | bosx* \ - | bsd* \ - | cegcc* \ - | chorusos* \ - | chorusrdb* \ - | clix* \ - | cloudabi* \ - | cnk* \ - | conix* \ - | cos* \ - | cxux* \ - | cygwin* \ - | darwin* \ - | dgux* \ - | dicos* \ - | dnix* \ - | domain* \ - | dragonfly* \ - | drops* \ - | ebmon* \ - | ecoff* \ - | ekkobsd* \ - | emscripten* \ - | emx* \ - | es* \ - | fiwix* \ - | freebsd* \ - | fuchsia* \ - | genix* \ - | genode* \ - | glidix* \ - | gnu* \ - | go32* \ - | haiku* \ - | hcos* \ - | hiux* \ - | hms* \ - | hpux* \ - | ieee* \ - | interix* \ - | ios* \ - | iris* \ - | irix* \ - | ironclad* \ - | isc* \ - | its* \ - | l4re* \ - | libertybsd* \ - | lites* \ - | lnews* \ - | luna* \ - | lynxos* \ - | mach* \ - | macos* \ - | magic* \ - | mbr* \ - | midipix* \ - | midnightbsd* \ - | mingw32* \ - | mingw64* \ - | minix* \ - | mint* \ - | mirbsd* \ - | mks* \ - | mlibc* \ - | mmixware* \ - | mon960* \ - | morphos* \ - | moss* \ - | moxiebox* \ - | mpeix* \ - | mpw* \ - | msdos* \ - | msys* \ - | mvs* \ - | nacl* \ - | netbsd* \ - | netware* \ - | newsos* \ - | nextstep* \ - | nindy* \ - | nonstopux* \ - | nova* \ - | nsk* \ - | nucleus* \ - | nx6 \ - | nx7 \ - | oabi* \ - | ohos* \ - | onefs* \ - | openbsd* \ - | openedition* \ - | openstep* \ - | os108* \ - | os2* \ - | os400* \ - | os68k* \ - | os9* \ - | ose* \ - | osf* \ - | oskit* \ - | osx* \ - | palmos* \ - | phoenix* \ - | plan9* \ - | powermax* \ - | powerunix* \ - | proelf* \ - | psos* \ - | psp* \ - | ptx* \ - | pw32* \ - | qnx* \ - | rdos* \ - | redox* \ - | rhapsody* \ - | riscix* \ - | riscos* \ - | rtems* \ - | rtmk* \ - | rtu* \ - | scout* \ - | secbsd* \ - | sei* \ - | serenity* \ - | sim* \ - | skyos* \ - | solaris* \ - | solidbsd* \ - | sortix* \ - | storm-chaos* \ - | sunos \ - | sunos[34]* \ - | superux* \ - | syllable* \ - | sym* \ - | sysv* \ - | tenex* \ - | tirtos* \ - | toppers* \ - | tops10* \ - | tops20* \ - | tpf* \ - | tvos* \ - | twizzler* \ - | uclinux* \ - | udi* \ - | udk* \ - | ultrix* \ - | unicos* \ - | uniplus* \ - | unleashed* \ - | unos* \ - | uwin* \ - | uxpv* \ - | v88r* \ - |*vms* \ - | vos* \ - | vsta* \ - | vxsim* \ - | vxworks* \ - | wasi* \ - | watchos* \ - | wince* \ - | windiss* \ - | windows* \ - | winnt* \ - | xenix* \ - | xray* \ - | zephyr* \ - | zvmoe* ) - ;; - # This one is extra strict with allowed versions - sco3.2v2 | sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - # This refers to builds using the UEFI calling convention - # (which depends on the architecture) and PE file format. - # Note that this is both a different calling convention and - # different file format than that of GNU-EFI - # (x86_64-w64-mingw32). - uefi) - ;; - none) - ;; - kernel* | msvc* ) - # Restricted further below - ;; - '') - if test x"$obj" = x - then - echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 - fi - ;; - *) - echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 - exit 1 - ;; -esac - -case $obj in - aout* | coff* | elf* | pe*) - ;; - '') - # empty is fine - ;; - *) - echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 - exit 1 - ;; -esac - -# Here we handle the constraint that a (synthetic) cpu and os are -# valid only in combination with each other and nowhere else. -case $cpu-$os in - # The "javascript-unknown-ghcjs" triple is used by GHC; we - # accept it here in order to tolerate that, but reject any - # variations. - javascript-ghcjs) - ;; - javascript-* | *-ghcjs) - echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 - exit 1 - ;; -esac - -# As a final step for OS-related things, validate the OS-kernel combination -# (given a valid OS), if there is a kernel. -case $kernel-$os-$obj in - linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ - | linux-mlibc*- | linux-musl*- | linux-newlib*- \ - | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) - ;; - uclinux-uclibc*- | uclinux-gnu*- ) - ;; - managarm-mlibc*- | managarm-kernel*- ) - ;; - windows*-msvc*-) - ;; - -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ - | -uclibc*- ) - # These are just libc implementations, not actual OSes, and thus - # require a kernel. - echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - -kernel*- ) - echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - *-kernel*- ) - echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 - exit 1 - ;; - *-msvc*- ) - echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 - exit 1 - ;; - kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) - ;; - vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) - ;; - nto-qnx*-) - ;; - os2-emx-) - ;; - rtmk-nova-) - ;; - *-eabi*- | *-gnueabi*-) - ;; - none--*) - # None (no kernel, i.e. freestanding / bare metal), - # can be paired with an machine code file format - ;; - -*-) - # Blank kernel with real OS is always fine. - ;; - --*) - # Blank kernel and OS with real machine code file format is always fine. - ;; - *-*-*) - echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 - exit 1 - ;; -esac - # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) - case $cpu-$os in - *-riscix*) +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + riscix*) vendor=acorn ;; - *-sunos* | *-solaris*) + sunos*) vendor=sun ;; - *-cnk* | *-aix*) + cnk*|-aix*) vendor=ibm ;; - *-beos*) + beos*) vendor=be ;; - *-hpux*) + hpux*) vendor=hp ;; - *-mpeix*) + mpeix*) vendor=hp ;; - *-hiux*) + hiux*) vendor=hitachi ;; - *-unos*) + unos*) vendor=crds ;; - *-dgux*) + dgux*) vendor=dg ;; - *-luna*) + luna*) vendor=omron ;; - *-genix*) + genix*) vendor=ns ;; - *-clix*) + clix*) vendor=intergraph ;; - *-mvs* | *-opened*) - vendor=ibm - ;; - *-os400*) + mvs* | opened*) vendor=ibm ;; - s390-* | s390x-*) + os400*) vendor=ibm ;; - *-ptx*) + ptx*) vendor=sequent ;; - *-tpf*) + tpf*) vendor=ibm ;; - *-vxsim* | *-vxworks* | *-windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - *-aux*) + aux*) vendor=apple ;; - *-hms*) + hms*) vendor=hitachi ;; - *-mpw* | *-macos*) + mpw* | macos*) vendor=apple ;; - *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - *-vos*) + vos*) vendor=stratus ;; esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" +echo "$basic_machine-$os" exit # Local variables: diff --git a/admin/ltmain.sh b/admin/ltmain.sh index b84a6849cf4b..3e6a3db3a5a1 100644 --- a/admin/ltmain.sh +++ b/admin/ltmain.sh @@ -2,11 +2,11 @@ ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.6.2 +# libtool (GNU libtool) 2.5.4 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996-2019, 2021-2026 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -26,13 +26,13 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. PROGRAM=libtool PACKAGE=libtool -VERSION=2.6.2 -package_revision=2.6.2 +VERSION=2.5.4 +package_revision=2.5.4 ## ------ ## @@ -2215,7 +2215,7 @@ func_version () # End: # Set a version string. -scriptversion='(GNU libtool) 2.6.2' +scriptversion='(GNU libtool) 2.5.4' # func_version # ------------ @@ -2299,22 +2299,6 @@ func_help () func_usage_message $ECHO "$long_help_message -If a TAG is supplied, it must use one of the tag names below: - - Tag Name Language Name - CC C - CXX C++ - OBJC Objective-C - OBJCXX Objective-C++ - GCJ Java - F77 Fortran 77 - FC Fortran - GO Go - RC Windows Resource - -If you do not see a tag name associated with your programming language, then -you are using a compiler that $progname does not support. - MODE must be one of the following: clean remove files from the build directory @@ -2737,9 +2721,9 @@ libtool_validate_options () test : = "$debug_cmd" || func_append preserve_args " --debug" case $host_os in - # Solaris2 added to fix https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2* | *linux*) + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; @@ -3015,9 +2999,8 @@ func_infer_tag () # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then - func_echo "unable to infer tagged configuration with compiler." - func_echo "Possible use of unsupported compiler." - func_fatal_error "specify a tag with '--tag'. For more information, try '$progname --help'." + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -3179,41 +3162,13 @@ func_convert_core_msys_to_w32 () { $debug_cmd - # Compatibility for original MSYS - if test "Xone" = "X$lt_cv_cmd_slashes"; then - func_convert_core_msys_to_w32_result=`( cmd /c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` - else # Assume 'lt_cv_cmd_slashes = "two"' + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` - fi - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_convert_core_msys_to_w32_result= - fi } #end: func_convert_core_msys_to_w32 -# func_convert_core_msys_to_w32_with_cygpath ARG -# Convert file name or path ARG with cygpath from MSYS format to w32 -# format. Return result in func_convert_core_msys_to_w32_with_cygpath_result. -func_convert_core_msys_to_w32_with_cygpath () -{ - $debug_cmd - - # Since MSYS2 is packaged with cygpath, call cygpath in $PATH; no need - # to use LT_CYGPATH in this case. - func_convert_core_msys_to_w32_with_cygpath_result=`cygpath "$@" 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_convert_core_msys_to_w32_with_cygpath_result= - fi -} -#end: func_convert_core_msys_to_w32_with_cygpath - - # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting @@ -3348,13 +3303,8 @@ func_convert_file_msys_to_w32 () func_to_host_file_result=$1 if test -n "$1"; then - if test "Xyes" = "X$cygpath_installed"; then - func_convert_core_msys_to_w32_with_cygpath -w "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_with_cygpath_result - else - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -3405,13 +3355,8 @@ func_convert_file_msys_to_cygwin () func_to_host_file_result=$1 if test -n "$1"; then - if test "Xyes" = "X$cygpath_installed"; then - func_convert_core_msys_to_w32_with_cygpath -w "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_with_cygpath_result" - else - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - fi + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" @@ -3512,13 +3457,8 @@ func_convert_path_msys_to_w32 () # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result - if test "Xyes" = "X$cygpath_installed"; then - func_convert_core_msys_to_w32_with_cygpath -w -p "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_with_cygpath_result - else - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - fi + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -3582,13 +3522,8 @@ func_convert_path_msys_to_cygwin () # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result - if test "Xyes" = "X$cygpath_installed"; then - func_convert_core_msys_to_w32_with_cygpath -w -p "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_with_cygpath_result" - else - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - fi + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" @@ -4520,14 +4455,6 @@ func_mode_finish () fi echo - echo "After a 'make install' for many GNU/Linux systems, 'ldconfig LIBDIR'" - echo "may need to be executed to help locate newly installed libraries," - echo "but you should consult with a system administrator before updating" - echo "the shared library cache as this should be done with great care" - echo "and consideration. (See the 'Platform-specific configuration notes'" - echo "section of the documentation for more information.)" - echo - echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) @@ -4602,7 +4529,7 @@ func_mode_install () prev=$arg fi ;; - -g | -m | -o | -S | -t) + -g | -m | -o) prev=$arg ;; -s) @@ -5118,7 +5045,7 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.expsym + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' @@ -5131,8 +5058,8 @@ extern \"C\" { } else $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.expsym"' - eval '$GREP -f "$output_objdir/$outputname.expsym" < "$nlist" > "$nlist"T' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *windows* | *cegcc* ) @@ -5655,7 +5582,7 @@ func_extract_archives () $RM -rf unfat-$$ cd "$darwin_orig_dir" else - cd "$darwin_orig_dir" + cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run @@ -6052,7 +5979,6 @@ int setenv (const char *, const char *, int); # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# define MSVC_ISDIR(m)(((m) & S_IFMT) == S_IFDIR) #elif defined __MINGW32__ # define setmode _setmode # define stat _stat @@ -6448,13 +6374,8 @@ check_executable (const char *path) if ((!path) || (!*path)) return 0; -#ifdef _MSC_VER - if ((stat (path, &st) >= 0) && !MSVC_ISDIR (st.st_mode) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) -#else - if ((stat (path, &st) >= 0) && !S_ISDIR (st.st_mode) + if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) -#endif return 1; else return 0; @@ -6988,15 +6909,7 @@ func_mode_link () # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. - case $host in - *-*-os2*) - # OS/2 does not allow undefined symbols at all when linking a dll. - allow_undefined=no - ;; - *) - allow_undefined=yes - ;; - esac + allow_undefined=yes ;; *) allow_undefined=yes @@ -7068,7 +6981,7 @@ func_mode_link () build_old_libs=no break ;; - -all-static | -static | -static-libtool-libs | --static | -Bstatic) + -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then @@ -7085,7 +6998,7 @@ func_mode_link () fi prefer_static_libs=built ;; - -static-libtool-libs | --static | -Bstatic) + -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi @@ -7102,16 +7015,6 @@ func_mode_link () # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes - # make sure "-Xpreprocessor -fopenmp" is processed as one token - case $@ in - *-Xpreprocessor\ -fopenmp*) - fopenmp_match="-Xpreprocessor -fopenmp" - ;; - *) - fopenmp_match=-fopenmp - ;; - esac - # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 @@ -7377,13 +7280,8 @@ func_mode_link () continue ;; xlinker) - func_append linker_flags "$qarg," - # Args in the var 'compiler_flags' causes warnings in MSVC - func_cc_basename "$CC" - case $func_cc_basename_result in - cl|cl.exe) ;; - *) func_append compiler_flags " $wl$qarg" ;; - esac + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -7601,7 +7499,7 @@ func_mode_link () continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ - |-threads|$fopenmp_match|fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -7627,6 +7525,8 @@ func_mode_link () *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -7748,11 +7648,6 @@ func_mode_link () arg=$func_stripname_result ;; - -Wl,--as-needed|-Wl,--no-as-needed) - deplibs="$deplibs $arg" - continue - ;; - -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result @@ -7762,13 +7657,8 @@ func_mode_link () IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $wl$func_quote_arg_result" - # Args in the var 'compiler_flags' causes warnings in MSVC - func_cc_basename "$CC" - case $func_cc_basename_result in - cl|cl.exe) ;; - *) func_append compiler_flags " $wl$func_quote_arg_result" ;; - esac - func_append linker_flags "$func_quote_arg_result," + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7814,7 +7704,6 @@ func_mode_link () # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # --target=* for target architecture support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang @@ -7828,20 +7717,19 @@ func_mode_link () # -fuse-ld=* Linker select flags for GCC # -static-* direct GCC to link specific libraries statically # -fcilkplus Cilk Plus language extension features for C/C++ - # -resource-dir=* for selecting compiler resource directory with clang # -rtlib=* select c runtime lib with clang # --unwindlib=* select unwinder library with clang # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking # -Wa,* Pass flags directly to the assembler - # -W* Warnings, needed for lto + # -Werror, -Werror=* Report (specified) warnings as errors -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \ - -stdlib=*|-resource-dir=*|-rtlib=*|--unwindlib=*| \ + -stdlib=*|-rtlib=*|--unwindlib=*| \ -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \ -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \ -fdiagnostics-color*|-frecord-gcc-switches| \ - -fuse-ld=*|-static-*|-fcilkplus|-W*) + -fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" @@ -7963,9 +7851,10 @@ func_mode_link () fi ;; - *.$libext|*.so) - # An archive or an explicit shared library. + *.$libext) + # An archive. func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; @@ -8181,17 +8070,8 @@ func_mode_link () lib= found=false case $deplib in - -Wl,--as-needed|-Wl,--no-as-needed) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - fi - continue - ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|$fopenmp_match|fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -8341,43 +8221,15 @@ func_mode_link () func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; - *.so) - case $linkmode,$pass in - lib,*) - deplibs="$deplib $deplibs" - newdependency_libs="$deplib $newdependency_libs" - ;; - prog,link) - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - ;; - prog,*) - deplibs="$deplib $deplibs" - ;; - *) - func_warning "'$deplib' is ignored for archives/objects" - ;; - esac - continue - ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue - else - func_append old_deplibs " $deplib" fi case $linkmode in lib) - # Linking convenience modules and compiler provided static libraries - # into shared libraries is allowed, but linking other static - # libraries is non-portable. - case $deplib in - */libgcc*.$libext | */libclang_rt*.$libext) - deplibs="$deplib $deplibs" - continue - ;; - esac + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) @@ -8396,9 +8248,7 @@ func_mode_link () ;; esac if $valid_a_lib; then - if test yes != "$build_old_libs"; then - func_warning "Linking the shared library $output against the static library $deplib is not portable!" - fi + func_warning "Linking the shared library $output against the static library $deplib is not portable!" deplibs="$deplib $deplibs" else func_warning "Trying to link with static lib archive $deplib." @@ -8500,19 +8350,19 @@ func_mode_link () # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done continue fi # $pass = conv @@ -9337,6 +9187,7 @@ func_mode_link () # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output + func_append objs "$old_deplibs" ;; lib) @@ -9461,21 +9312,29 @@ func_mode_link () esac # Check that each of the things are valid numbers. - if echo "$current" | $EGREP -v '(^0$)|(^[1-9]$)|(^[1-9][0-9]{1,4}$)' > /dev/null; then - func_error "CURRENT '$current' must be a nonnegative integer and <= 5 digits" + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" - fi + ;; + esac - # Currently limiting revision length by Unix epoch time in nanoseconds. - if echo "$revision" | $EGREP -v '(^0$)|(^[1-9]$)|(^[1-9][0-9]{1,18}$)' > /dev/null; then - func_error "REVISION '$revision' must be a nonnegative integer and <= 19 digits" + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" - fi + ;; + esac - if echo "$age" | $EGREP -v '(^0$)|(^[1-9]$)|(^[1-9][0-9]{1,4}$)' > /dev/null; then - func_error "AGE '$age' must be a nonnegative integer and <= 5 digits" + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" - fi + ;; + esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" @@ -10163,7 +10022,7 @@ func_mode_link () if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.expsym + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' @@ -10429,7 +10288,7 @@ func_mode_link () ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.expsym + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -11059,13 +10918,7 @@ func_mode_link () # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { - func_cc_basename "$LTCC" - case $func_cc_basename_result in - cl|cl.exe) - $LTCC $LTCFLAGS -Fe$cwrapper $cwrappersource ;; - *) - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource ;; - esac + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } @@ -11110,11 +10963,7 @@ func_mode_link () build_libtool_libs=no ;; *) - oldobjs=$non_pic_objects - # This is not correct to add old_deplibs creating an archive - # so append them only when creating an executable or a shared - # library. - test yes != "$build_old_libs" && oldobjs="$oldobjs $old_deplibs" + oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience @@ -11375,20 +11224,6 @@ func_mode_link () done dlprefiles=$newdlprefiles fi - - # Forward old library dependencies only when no shared - # library is being built. When building the shared library, - # the linker uses $deplibs to link the archives into it, but - # then we don't want to add it as transitive dependency. - if test -z "$library_names"; then - for lib in $old_deplibs; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append dependency_libs " $abs" - done - fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target diff --git a/atf-c++/atf-c++.3 b/atf-c++/atf-c++.3 index c39d905567b8..2254d481efff 100644 --- a/atf-c++/atf-c++.3 +++ b/atf-c++/atf-c++.3 @@ -277,6 +277,16 @@ It is possible to get the path to the test case's source directory from any of its three components by querying the .Sq srcdir configuration variable. +.Ss Requiring kernel modules +Aside from the +.Va require.kmods +meta-data variable available in the header only, one can also check for +additional kernel modules in the test case's body by using the +.Fn require_kmod +function, which takes the name of a single module. +If it is not found, the test case will be automatically skipped. +This feature is only available on +.Fx . .Ss Requiring programs Aside from the .Va require.progs diff --git a/atf-c++/tests.cpp b/atf-c++/tests.cpp index 9edd89c69f02..cb0d735f5a06 100644 --- a/atf-c++/tests.cpp +++ b/atf-c++/tests.cpp @@ -313,6 +313,13 @@ impl::tc::cleanup(void) } void +impl::tc::require_kmod(const std::string& kmod) + const +{ + atf_tc_require_kmod(kmod.c_str()); +} + +void impl::tc::require_prog(const std::string& prog) const { diff --git a/atf-c++/tests.hpp b/atf-c++/tests.hpp index a03cc852dcf8..8fdf15a9f05d 100644 --- a/atf-c++/tests.hpp +++ b/atf-c++/tests.hpp @@ -80,6 +80,7 @@ protected: virtual void body(void) const = 0; virtual void cleanup(void) const; + void require_kmod(const std::string&) const; void require_prog(const std::string&) const; friend struct tc_impl; diff --git a/atf-c++/tests_test.cpp b/atf-c++/tests_test.cpp index ed9fef0d0140..98b4da70d247 100644 --- a/atf-c++/tests_test.cpp +++ b/atf-c++/tests_test.cpp @@ -163,6 +163,10 @@ ATF_TEST_CASE_BODY(atf_tp_writer) expss << "descr: second test case\n"; CHECK; + w.tc_meta_data("require.kmods", "/nonexistent"); + expss << "require.kmods: /nonexistent\n"; + CHECK; + w.tc_meta_data("require.progs", "/bin/cp"); expss << "require.progs: /bin/cp\n"; CHECK; diff --git a/atf-c/atf-c.3 b/atf-c/atf-c.3 index 612f9e943687..02f06483646f 100644 --- a/atf-c/atf-c.3 +++ b/atf-c/atf-c.3 @@ -77,6 +77,7 @@ .Nm atf_tc_fail , .Nm atf_tc_fail_nonfatal , .Nm atf_tc_pass , +.Nm atf_tc_require_kmod , .Nm atf_tc_require_prog , .Nm atf_tc_skip , .Nm atf_utils_cat_file , @@ -211,6 +212,10 @@ .Fa "void" .Fc .Ft void +.Fo atf_tc_require_kmod +.Fa "const char *kmod" +.Fc +.Ft void .Fo atf_tc_require_prog .Fa "const char *prog" .Fc @@ -434,6 +439,16 @@ It is possible to get the path to the test case's source directory from any of its three components by querying the .Sq srcdir configuration variable. +.Ss Requiring kernel modules +Aside from the +.Va require.kmods +meta-data variable available in the header only, one can also check for +additional kernel modules in the test case's body by using the +.Fn atf_tc_require_kmod +function, which takes the name of a single kernel module. +If it is not found, the test case will be automatically skipped. +This feature is only available on +.Fx . .Ss Requiring programs Aside from the .Va require.progs diff --git a/atf-c/detail/process.c b/atf-c/detail/process.c index c19e27e4694d..539e39ac058b 100644 --- a/atf-c/detail/process.c +++ b/atf-c/detail/process.c @@ -218,8 +218,9 @@ atf_process_status_exitstatus(const atf_process_status_t *s) bool atf_process_status_signaled(const atf_process_status_t *s) { - int si_code = s->m_info.si_code; - return si_code == CLD_KILLED || si_code == CLD_DUMPED; + /* Issue #187: `si_code` is a macro on NetBSD. */ + int code = s->m_info.si_code; + return code == CLD_KILLED || code == CLD_DUMPED; } int diff --git a/atf-c/tc.c b/atf-c/tc.c index 00c4bd9c8213..6ba0a7f2a3c8 100644 --- a/atf-c/tc.c +++ b/atf-c/tc.c @@ -26,6 +26,10 @@ #include "atf-c/tc.h" #include <sys/types.h> +#if defined(__FreeBSD__) +#include <sys/linker.h> +#include <sys/module.h> +#endif #include <sys/stat.h> #include <sys/uio.h> @@ -103,6 +107,7 @@ static void format_reason_fmt(atf_dynstr_t *, const char *, const size_t, static void errno_test(struct context *, const char *, const size_t, const int, const char *, const bool, void (*)(struct context *, atf_dynstr_t *)); +static atf_error_t check_kmod(struct context *, const char *); static atf_error_t check_prog_in_dir(const char *, void *); static atf_error_t check_prog(struct context *, const char *); @@ -460,6 +465,54 @@ errno_test(struct context *ctx, const char *file, const size_t line, } } +#if defined(__FreeBSD__) +atf_error_t +check_kmod(struct context *ctx, const char *kmod) +{ + struct kld_file_stat fstat = { .version = sizeof(fstat) }; + struct module_stat mstat = { .version = sizeof(mstat) }; + atf_dynstr_t reason; + size_t len = strlen(kmod); + int fid, mid; + + for (fid = kldnext(0); fid > 0; fid = kldnext(fid)) { + if (kldstat(fid, &fstat) != 0) + continue; + + if (strcmp(fstat.name, kmod) == 0) + goto done; + + if (strncmp(fstat.name, kmod, len) == 0 && + strcmp(fstat.name + len, ".ko") == 0) + goto done; + + for (mid = kldfirstmod(fid); mid > 0; mid = modfnext(mid)) { + if (modstat(mid, &mstat) != 0) + continue; + if (strcmp(mstat.name, kmod) == 0) + goto done; + } + } + format_reason_fmt(&reason, NULL, 0, + "The required kmod %s is not loaded", kmod); + fail_requirement(ctx, &reason); + +done: + return atf_no_error(); +} +#else +atf_error_t +check_kmod(struct context *ctx, const char *kmod ATF_DEFS_ATTRIBUTE_UNUSED) +{ + atf_dynstr_t reason; + + format_reason_fmt(&reason, NULL, 0, + "This API is only available on FreeBSD"); + fail_requirement(ctx, &reason); + return atf_no_error(); +} +#endif + struct prog_found_pair { const char *prog; bool found; @@ -833,6 +886,7 @@ static void _atf_tc_fail_check(struct context *, const char *, const size_t, static void _atf_tc_fail_requirement(struct context *, const char *, const size_t, const char *, va_list) ATF_DEFS_ATTRIBUTE_NORETURN; static void _atf_tc_pass(struct context *) ATF_DEFS_ATTRIBUTE_NORETURN; +static void _atf_tc_require_kmod(struct context *, const char *); static void _atf_tc_require_prog(struct context *, const char *); static void _atf_tc_skip(struct context *, const char *, va_list) ATF_DEFS_ATTRIBUTE_NORETURN; @@ -913,6 +967,12 @@ _atf_tc_pass(struct context *ctx) } static void +_atf_tc_require_kmod(struct context *ctx, const char *prog) +{ + check_fatal_error(check_kmod(ctx, prog)); +} + +static void _atf_tc_require_prog(struct context *ctx, const char *prog) { check_fatal_error(check_prog(ctx, prog)); @@ -1159,6 +1219,14 @@ atf_tc_pass(void) } void +atf_tc_require_kmod(const char *kmod) +{ + PRE(Current.tc != NULL); + + _atf_tc_require_kmod(&Current, kmod); +} + +void atf_tc_require_prog(const char *prog) { PRE(Current.tc != NULL); diff --git a/atf-c/tc.h b/atf-c/tc.h index 3fb695562ac8..dda704f8cff8 100644 --- a/atf-c/tc.h +++ b/atf-c/tc.h @@ -106,6 +106,7 @@ void atf_tc_fail_nonfatal(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2); void atf_tc_pass(void) ATF_DEFS_ATTRIBUTE_NORETURN; +void atf_tc_require_kmod(const char *); void atf_tc_require_prog(const char *); void atf_tc_skip(const char *, ...) ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2) diff --git a/atf-c/tc_test.c b/atf-c/tc_test.c index 616c37e94e68..e896c6b3c2a1 100644 --- a/atf-c/tc_test.c +++ b/atf-c/tc_test.c @@ -156,6 +156,84 @@ ATF_TC_BODY(config, tcin) atf_tc_fini(&tc); } +#if defined(__FreeBSD__) +ATF_TC(require_kmod_basic); +ATF_TC_HEAD(require_kmod_basic, tc) +{ + atf_tc_set_md_var(tc, "descr", + "atf_require_kmod: ensures that a test continues if the target kmod " + "is found."); +} +ATF_TC_BODY(require_kmod_basic, tc) +{ +#if 0 + atf_tc_require_kmod("kernel"); +#endif +} + +ATF_TC(require_kmod_negative); +ATF_TC_HEAD(require_kmod_negative, tc) +{ + atf_tc_set_md_var(tc, "descr", + "atf_require_kmod: skips test if the target kmod is not found."); +} +ATF_TC_BODY(require_kmod_negative, tc) +{ + atf_tc_expect_fail("This should fail."); + atf_tc_require_kmod("nonexistent"); +} +#endif + +ATF_TC(require_prog_absolute); +ATF_TC_HEAD(require_prog_absolute, tc) +{ + atf_tc_set_md_var(tc, "descr", + "atf_require_prog: ensures that a test continues if the target program " + "is found (absolute)."); +} +ATF_TC_BODY(require_prog_absolute, tc) +{ + atf_tc_require_prog("/bin/sh"); +} + +ATF_TC(require_prog_negative_absolute); +ATF_TC_HEAD(require_prog_negative_absolute, tc) +{ + atf_tc_set_md_var(tc, "descr", + "atf_require_prog: skips test if the target program is not found " + "(absolute)."); +} +ATF_TC_BODY(require_prog_negative_absolute, tc) +{ + atf_tc_expect_fail("This should fail."); + atf_tc_require_prog("/nonexistent"); +} + +ATF_TC(require_prog_negative_nonabsolute); +ATF_TC_HEAD(require_prog_negative_nonabsolute, tc) +{ + atf_tc_set_md_var(tc, "descr", + "atf_require_prog: skips test if the target program is not found " + "(non-absolute)."); +} +ATF_TC_BODY(require_prog_negative_nonabsolute, tc) +{ + atf_tc_expect_fail("This should fail."); + atf_tc_require_prog("nonexistent"); +} + +ATF_TC(require_prog_nonabsolute); +ATF_TC_HEAD(require_prog_nonabsolute, tc) +{ + atf_tc_set_md_var(tc, "descr", + "atf_require_prog: ensures that a test continues if the target program " + "is found (non-absolute)."); +} +ATF_TC_BODY(require_prog_nonabsolute, tc) +{ + atf_tc_require_prog("true"); +} + /* --------------------------------------------------------------------- * Test cases for the free functions. * --------------------------------------------------------------------- */ @@ -175,6 +253,14 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, init_pack); ATF_TP_ADD_TC(tp, vars); ATF_TP_ADD_TC(tp, config); +#if defined(__FreeBSD__) + ATF_TP_ADD_TC(tp, require_kmod_basic); + ATF_TP_ADD_TC(tp, require_kmod_negative); +#endif + ATF_TP_ADD_TC(tp, require_prog_absolute); + ATF_TP_ADD_TC(tp, require_prog_negative_absolute); + ATF_TP_ADD_TC(tp, require_prog_negative_nonabsolute); + ATF_TP_ADD_TC(tp, require_prog_nonabsolute); /* Add the test cases for the free functions. */ /* TODO */ diff --git a/atf-sh/Kyuafile b/atf-sh/Kyuafile index 01a9253e7ebd..f128e3cb88a9 100644 --- a/atf-sh/Kyuafile +++ b/atf-sh/Kyuafile @@ -9,3 +9,4 @@ atf_test_program{name="config_test"} atf_test_program{name="atf-check_test"} atf_test_program{name="atf_check_test"} atf_test_program{name="integration_test"} +atf_test_program{name="kmod_test"} diff --git a/atf-sh/Kyuafile.in b/atf-sh/Kyuafile.in new file mode 100644 index 000000000000..01a9253e7ebd --- /dev/null +++ b/atf-sh/Kyuafile.in @@ -0,0 +1,11 @@ +syntax("kyuafile", 1) + +test_suite("atf") + +atf_test_program{name="tc_test"} +atf_test_program{name="tp_test"} +atf_test_program{name="normalize_test"} +atf_test_program{name="config_test"} +atf_test_program{name="atf-check_test"} +atf_test_program{name="atf_check_test"} +atf_test_program{name="integration_test"} diff --git a/atf-sh/Makefile.am.inc b/atf-sh/Makefile.am.inc index 50a5213288e7..8eaa5cecee7e 100644 --- a/atf-sh/Makefile.am.inc +++ b/atf-sh/Makefile.am.inc @@ -40,9 +40,20 @@ atf_sh_atf_sh_LDADD = $(ATF_CXX_LIBS) dist_man_MANS += atf-sh/atf-sh.1 atf_sh_DATA = atf-sh/libatf-sh.subr +libatf_subr_sources = atf-sh/libatf-sh/common.subr +if FreeBSD +libatf_subr_sources += atf-sh/libatf-sh/FreeBSD.subr +else +libatf_subr_sources += atf-sh/libatf-sh/os_stubs.subr +endif atf_shdir = $(pkgdatadir) EXTRA_DIST += $(atf_sh_DATA) +CLEANFILES += atf-sh/libatf-sh.subr +atf-sh/libatf-sh.subr: + $(AM_V_GEN)cat ${libatf_subr_sources} > atf-sh/libatf-sh.subr.tmp; \ + mv atf-sh/libatf-sh.subr.tmp atf-sh/libatf-sh.subr + dist_man_MANS += atf-sh/atf-sh.3 atf_aclocal_DATA += atf-sh/atf-sh.m4 @@ -60,6 +71,16 @@ atf-sh/atf-sh.pc: $(srcdir)/atf-sh/atf-sh.pc.in Makefile mv atf-sh/atf-sh.pc.tmp atf-sh/atf-sh.pc tests_atf_sh_DATA = atf-sh/Kyuafile +CLEANFILES += atf-sh/Kyuafile +EXTRA_DIST += atf-sh/Kyuafile.in +atf-sh/Kyuafile: $(srcdir)/atf-sh/Kyuafile.in Makefile + $(AM_V_GEN)test -d atf-sh || mkdir -p atf-sh; \ + cat $(srcdir)/atf-sh/Kyuafile.in > atf-sh/Kyuafile.tmp +if FreeBSD + $(AM_V_GEN)printf 'atf_test_program{name="kmod_test"}\n' >> atf-sh/Kyuafile.tmp +endif + $(AM_V_GEN)mv atf-sh/Kyuafile.tmp atf-sh/Kyuafile + tests_atf_shdir = $(pkgtestsdir)/atf-sh EXTRA_DIST += $(tests_atf_sh_DATA) @@ -91,6 +112,15 @@ atf-sh/config_test: $(srcdir)/atf-sh/config_test.sh $(AM_V_GEN)src="$(srcdir)/atf-sh/config_test.sh"; \ dst="atf-sh/config_test"; $(BUILD_SH_TP) +if FreeBSD +tests_atf_sh_SCRIPTS += atf-sh/kmod_test +CLEANFILES += atf-sh/kmod_test +EXTRA_DIST += atf-sh/kmod_test.sh +atf-sh/kmod_test: $(srcdir)/atf-sh/kmod_test.sh + $(AM_V_GEN)src="$(srcdir)/atf-sh/kmod_test.sh"; \ + dst="atf-sh/kmod_test"; $(BUILD_SH_TP) +endif + tests_atf_sh_SCRIPTS += atf-sh/integration_test CLEANFILES += atf-sh/integration_test EXTRA_DIST += atf-sh/integration_test.sh diff --git a/atf-sh/atf-sh.3 b/atf-sh/atf-sh.3 index cde67225c6db..46700941a97e 100644 --- a/atf-sh/atf-sh.3 +++ b/atf-sh/atf-sh.3 @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd January 27, 2021 +.Dd May 11, 2025 .Dt ATF-SH 3 .Os .Sh NAME @@ -42,6 +42,7 @@ .Nm atf_get , .Nm atf_get_srcdir , .Nm atf_pass , +.Nm atf_require_kmod , .Nm atf_require_prog , .Nm atf_set , .Nm atf_skip , @@ -87,6 +88,8 @@ .Qq var_name .Nm atf_get_srcdir .Nm atf_pass +.Nm atf_require_kmod +.Qq kmod_name .Nm atf_require_prog .Qq prog_name .Nm atf_set @@ -202,6 +205,14 @@ function. It is interesting to note that this can be used inside .Nm atf_init_test_cases to silently include additional helper files from the source directory. +.Ss Requiring kernel modules +Aside from the +.Va require.kmods +meta-data variable available in the header only, one can also check for +additional kernel modules in the test case's body by using the +.Nm atf_require_kmod +function, which takes the name of a single kernel module. +If it is not found, the test case will be automatically skipped. .Ss Requiring programs Aside from the .Va require.progs diff --git a/atf-sh/integration_test.sh b/atf-sh/integration_test.sh index 1150966f288f..909e8c4b57f6 100644 --- a/atf-sh/integration_test.sh +++ b/atf-sh/integration_test.sh @@ -147,6 +147,24 @@ EOF "${ATF_SH}" -s ./custom-shell tp helper } +atf_test_case require_progs +require_progs_body() +{ + cat | create_test_program tp <<EOF +atf_test_case helper +helper_head() { + atf_set "require.progs" "true" +} +helper_body() { + true +} +atf_init_test_cases() { + atf_add_test_case helper +} +EOF + atf_check -s eq:0 -o match:passed ./tp helper +} + atf_init_test_cases() { atf_add_test_case no_args @@ -155,6 +173,7 @@ atf_init_test_cases() atf_add_test_case custom_shell__command_line atf_add_test_case custom_shell__shebang atf_add_test_case set_e + atf_add_test_case require_progs } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/atf-sh/kmod_test.sh b/atf-sh/kmod_test.sh new file mode 100644 index 000000000000..b7856805063a --- /dev/null +++ b/atf-sh/kmod_test.sh @@ -0,0 +1,55 @@ +# Copyright (c) 2026 Enji Cooper <ngie@FreeBSD.org>. +# All Rights Reserved. +# +# SPDX-License-Identifier: BSD-2-Clause + +atf_test_case atf_require_kmod_basic +atf_require_kmod_basic_head() +{ + atf_set "descr" \ + "Verifies that 'atf_require_kmod' functions in the positive case." +} +atf_require_kmod_basic_body() +{ + kldstat() { + true + } + atf_require_kmod "bogus" +} + +atf_test_case atf_require_kmod_skip +atf_require_kmod_skip_head() +{ + atf_set "descr" \ + "atf_require_kmod: verifies the test is skipped when the kmods are " \ + "not loaded." +} +atf_require_kmod_skip_body() +{ + kldstat() { + false + } + atf_expect_skip "Testcase should skip." + atf_require_kmod "bogus" +} + +atf_test_case require_kmods_skip +require_kmods_skip_head() +{ + atf_set "descr" \ + "Verifies tests are skipped when the dependency isn't already loaded." + atf_set "require.kmods" "nonexistent" +} +require_kmods_skip_body() +{ + atf_fail "This should never be reached." +} + +atf_init_test_cases() +{ + atf_add_test_case atf_require_kmod_basic + atf_add_test_case atf_require_kmod_skip + atf_add_test_case require_kmods_skip +} + +# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/atf-sh/libatf-sh.subr b/atf-sh/libatf-sh.subr index af2b75e5fe34..a3bc2efa5d58 100644 --- a/atf-sh/libatf-sh.subr +++ b/atf-sh/libatf-sh.subr @@ -210,6 +210,19 @@ atf_expect_fail() } # +# atf_expect_skip reason +# +# Sets the expectations to 'skip'. +# +atf_expect_skip() +{ + _atf_validate_expect + + Expect=skip + Expect_Reason="${*}" +} + +# # atf_expect_pass # # Sets the expectations to 'pass'. @@ -704,6 +717,11 @@ _atf_validate_expect() atf_fail "Test case was expected to receive a termination signal" \ "but it continued execution" ;; + skip) + Expect=pass + atf_fail "Test case was supposed to be skipped but it continued " \ + "execution" + ;; timeout) Expect=pass atf_fail "Test case was expected to hang but it continued execution" @@ -796,3 +814,25 @@ main() } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 +# BEGIN `FreeBSD.subr`. +# +# Copyright (c) 2026 Enji Cooper <ngie@FreeBSD.org>. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause + +atf_require_kmod_supported() +{ + true +} + +# \brief FreeBSD specific helper routine for ensuring that a kmod has been +# loaded. +# +# \param kmod a target kmod. +atf_require_kmod() +{ + kldstat -q -m "${1}" || \ + atf_skip "The required kmod ${1} is not loaded" +} +# END `FreeBSD.subr`. diff --git a/bootstrap/package.m4 b/bootstrap/package.m4 index c8a21fef5360..5903f8acb3a9 100644 --- a/bootstrap/package.m4 +++ b/bootstrap/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define(AT_PACKAGE_NAME, Automated Testing Framework) m4_define(AT_PACKAGE_TARNAME, atf) -m4_define(AT_PACKAGE_VERSION, 0.24) -m4_define(AT_PACKAGE_STRING, Automated Testing Framework 0.24) +m4_define(AT_PACKAGE_VERSION, 0.26) +m4_define(AT_PACKAGE_STRING, Automated Testing Framework 0.26) m4_define(AT_PACKAGE_BUGREPORT, freebsd-testing@freebsd.org) diff --git a/bootstrap/testsuite b/bootstrap/testsuite index 6c5cd0eefba8..002966cabef4 100755 --- a/bootstrap/testsuite +++ b/bootstrap/testsuite @@ -906,7 +906,7 @@ fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 -Automated Testing Framework 0.24 test suite: bootstrap tests test groups: +Automated Testing Framework 0.26 test suite: bootstrap tests test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS @@ -947,7 +947,7 @@ _ATEOF exit $at_write_fail fi if $at_version_p; then - printf '%s\n' "$as_me (Automated Testing Framework 0.24)" && + printf '%s\n' "$as_me (Automated Testing Framework 0.26)" && cat <<\_ATEOF || at_write_fail=1 Copyright (C) 2026 Free Software Foundation, Inc. @@ -1129,11 +1129,11 @@ exec 5>>"$at_suite_log" # Banners and logs. printf '%s\n' "## ------------------------------------------------------------- ## -## Automated Testing Framework 0.24 test suite: bootstrap tests. ## +## Automated Testing Framework 0.26 test suite: bootstrap tests. ## ## ------------------------------------------------------------- ##" { printf '%s\n' "## ------------------------------------------------------------- ## -## Automated Testing Framework 0.24 test suite: bootstrap tests. ## +## Automated Testing Framework 0.26 test suite: bootstrap tests. ## ## ------------------------------------------------------------- ##" echo @@ -1952,7 +1952,7 @@ _ASBOX printf '%s\n' "Please send $at_msg and all information you think might help: To: <freebsd-testing@freebsd.org> - Subject: [Automated Testing Framework 0.24] $as_me: $at_msg1$at_msg2 + Subject: [Automated Testing Framework 0.26] $as_me: $at_msg1$at_msg2 You may investigate any problem if you feel able to do so, in which case the test suite provides a good starting point. Its output may diff --git a/configure b/configure index 3673518cdda1..b62056b75ab8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.73 for Automated Testing Framework 0.24. +# Generated by GNU Autoconf 2.73 for Automated Testing Framework 0.26. # # Report bugs to <freebsd-testing@freebsd.org>. # @@ -600,8 +600,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Automated Testing Framework' PACKAGE_TARNAME='atf' -PACKAGE_VERSION='0.24' -PACKAGE_STRING='Automated Testing Framework 0.24' +PACKAGE_VERSION='0.26' +PACKAGE_STRING='Automated Testing Framework 0.26' PACKAGE_BUGREPORT='freebsd-testing@freebsd.org' PACKAGE_URL='https://github.com/freebsd/atf/' @@ -642,6 +642,8 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +FreeBSD_FALSE +FreeBSD_TRUE LCOV GENHTML GIT @@ -814,7 +816,6 @@ enable_shared enable_static enable_pic with_pic -enable_cxx_stdlib enable_fast_install enable_aix_soname with_aix_soname @@ -1396,7 +1397,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures Automated Testing Framework 0.24 to adapt to many kinds of systems. +'configure' configures Automated Testing Framework 0.26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1468,7 +1469,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Automated Testing Framework 0.24:";; + short | recursive ) echo "Configuration of Automated Testing Framework 0.26:";; esac cat <<\_ACEOF @@ -1486,10 +1487,6 @@ Optional Features: --enable-static[=PKGS] build static libraries [default=yes] --enable-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] - --enable-cxx-stdlib[=PKGS] - let the compiler frontend decide what standard - libraries to link when building C++ shared libraries - and modules [default=no] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-aix-soname=aix|svr4|both @@ -1605,7 +1602,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Automated Testing Framework configure 0.24 +Automated Testing Framework configure 0.26 generated by GNU Autoconf 2.73 Copyright (C) 2026 Free Software Foundation, Inc. @@ -2041,7 +2038,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Automated Testing Framework $as_me 0.24, which was +It was created by Automated Testing Framework $as_me 0.26, which was generated by GNU Autoconf 2.73. Invocation command line was $ $0$ac_configure_args_raw @@ -5173,7 +5170,7 @@ fi # Define the identity of the package. PACKAGE='atf' - VERSION='0.24' + VERSION='0.26' printf '%s\n' "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5689,8 +5686,8 @@ esac -macro_version='2.6.2' -macro_revision='2.6.2' +macro_version='2.5.4' +macro_revision='2.5.4' @@ -6720,77 +6717,6 @@ printf '%s\n' "$lt_cv_to_tool_file_cmd" >&6; } -case $host in #( - *-*-mingw* | *-*-windows* | *-*-cygwin*) : - case $build in #( - *-*-mingw* | *-*-windows* | *-*-cygwin*) : - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether cygpath is installed" >&5 -printf %s "checking whether cygpath is installed... " >&6; } - if test ${lt_cv_cygpath_installed+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_cygpath_installed=ignoring - cygpath --help &> /dev/null - _lt_result=$? - if test 0 = "$_lt_result" -then : - lt_cv_cygpath_installed=yes -else case e in #( - e) lt_cv_cygpath_installed=no ;; -esac -fi - ;; -esac -fi - - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cygpath_installed" >&5 -printf '%s\n' "$lt_cv_cygpath_installed" >&6; } - - - - - if test "xyes" != "x$lt_cv_cygpath_installed" -then : - - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether to use cmd with one slash or two slashes" >&5 -printf %s "checking whether to use cmd with one slash or two slashes... " >&6; } - if test ${lt_cv_cmd_slashes+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - _lt_result=`cmd /c echo one-slash works. Not checked //c echo two-slashes 2>/dev/null` - if test 0 != $? -then : - as_fn_error $? "Do not know how to convert paths" "$LINENO" 5 -fi - case $_lt_result in #( - one-slash*) : - lt_cv_cmd_slashes="one" ;; #( - two-slashes*) : - lt_cv_cmd_slashes="two" ;; #( - *) : - as_fn_error $? "Do not know how to convert paths" "$LINENO" 5 - ;; -esac - ;; -esac -fi - - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cmd_slashes" >&5 -printf '%s\n' "$lt_cv_cmd_slashes" >&6; } - -fi - ;; #( - *) : - ;; -esac - - ;; #( - *) : - ;; -esac { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} @@ -6816,7 +6742,7 @@ case $host_os in ;; darwin*) if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS $stdlibflag $wl-r -o $output$reload_objs' + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -7112,12 +7038,12 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -*-mlibc) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -# This must be glibc/ELF. -linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +*-mlibc) lt_cv_deplibs_check_method=pass_all ;; @@ -7952,13 +7878,13 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/ {\"\1\", (void *) 0},/p'" + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ - -e 's/^I .* \(lib[a-zA-Z_][a-zA-Z0-9_]*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/ {\"lib\1\", (void *) 0},/p'" + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= @@ -7972,22 +7898,22 @@ fi # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ -" -e 's/^T .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/extern char \1;/p'" +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/ {\"\1\", (void *) \&\1},/p'" +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib[a-zA-Z_][a-zA-Z0-9_]*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/ {\"lib\1\", (void *) \&\1},/p'" +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -8008,10 +7934,8 @@ for ac_symprfx in "" "_"; do # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, - # which start with @ or ?. And Cygwin gawk-4.1.4-3 and newer - # treats input as binary, have to drop carriage return first. + # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {sub(/\\r\$/,\"\")};"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ @@ -9665,47 +9589,6 @@ fi - stdlibflag=-nostdlib -# Check whether --enable-cxx-stdlib was given. -if test ${enable_cxx_stdlib+y} -then : - enableval=$enable_cxx_stdlib; p=${PACKAGE-default} - case $enableval in - yes) enable_cxx_stdlib=yes ;; - no) enable_cxx_stdlib=no ;; - *) - enable_cxx_stdlib=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_cxx_stdlib=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) enable_cxx_stdlib=no ;; -esac -fi - - -if test yes = "$enable_cxx_stdlib"; then - stdlibflag= -fi - - - - - - - - - - - # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} then : @@ -9798,21 +9681,8 @@ printf '%s\n' "$with_aix_soname" >&6; } fi fi ;; -power*-*-aix[5-9]*,'') - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: WARNING: for $host, specify if building shared libraries for versioning (svr4|both)" >&5 -printf '%s\n' "$as_me: WARNING: for $host, specify if building shared libraries for versioning (svr4|both)" >&2;} - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } - with_aix_soname=aix - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: (default) $with_aix_soname" >&5 -printf '%s\n' "(default) $with_aix_soname" >&6; } - ;; *) - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } with_aix_soname=aix - { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: (default) $with_aix_soname" >&5 -printf '%s\n' "(default) $with_aix_soname" >&6; } ;; esac @@ -10189,9 +10059,9 @@ else case e in #( if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -10338,7 +10208,7 @@ lt_prog_compiler_static= # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.expsym' + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; @@ -10389,13 +10259,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - *-mlibc) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu* | freebsd*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | *freebsd*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) @@ -10411,7 +10275,7 @@ lt_prog_compiler_static= ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. - icc* | ifort* | icx* | ifx*) + icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' @@ -10434,12 +10298,6 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; - slimcc*) - # Hsiang-Ying Fu and Jim Huang's x86_64 SlimCC compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -10497,6 +10355,12 @@ lt_prog_compiler_static= lt_prog_compiler_static='-Bstatic' ;; + *-mlibc) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -10622,9 +10486,9 @@ else case e in #( if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi @@ -10677,9 +10541,9 @@ else case e in #( if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.expsym conftest.er2 >/dev/null; then + if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else @@ -10737,9 +10601,9 @@ else case e in #( then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.expsym out/conftest.er2 >/dev/null; then + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi @@ -10794,9 +10658,9 @@ else case e in #( then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.expsym out/conftest.er2 >/dev/null; then + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi @@ -11039,17 +10903,17 @@ _LT_EOF hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll - archive_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; @@ -11058,6 +10922,7 @@ _LT_EOF cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; @@ -11077,12 +10942,7 @@ _LT_EOF archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - *-mlibc) - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - - gnu* | linux* | tpf* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in @@ -11107,7 +10967,7 @@ _LT_EOF tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort* | ifx*) # Intel Fortran compiler + ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= @@ -11162,6 +11022,11 @@ _LT_EOF fi ;; + *-mlibc) + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' @@ -11560,8 +11425,8 @@ fi # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl* | icx* | icpx*) - # Native MSVC and Intel compilers + cl* | icl*) + # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -11571,20 +11436,14 @@ fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - # A check exists to verify if there are linker flags, which will use - # different commands when linking. archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.expsym"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.expsym; - fi~ - if test -z "$linker_flags"; then - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,$linker_flags-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' @@ -11616,7 +11475,7 @@ fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -Fe$lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. @@ -11766,9 +11625,9 @@ else case e in #( if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.expsym conftest.er2 >/dev/null; then + if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else @@ -11861,9 +11720,6 @@ printf '%s\n' "$lt_cv_irix_exported_symbol" >&6; } link_all_deplibs=yes ;; - *-mlibc) - ;; - linux*) case $cc_basename in tcc*) @@ -11875,6 +11731,9 @@ printf '%s\n' "$lt_cv_irix_exported_symbol" >&6; } esac ;; + *-mlibc) + ;; + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -11921,17 +11780,17 @@ printf '%s\n' "$lt_cv_irix_exported_symbol" >&6; } hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll - archive_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; @@ -11940,6 +11799,7 @@ printf '%s\n' "$lt_cv_irix_exported_symbol" >&6; } cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; @@ -11965,8 +11825,8 @@ printf '%s\n' "$lt_cv_irix_exported_symbol" >&6; } else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.expsym; done; printf "%s\\n" "-hidden">> $lib.expsym~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.expsym $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.expsym' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -11983,21 +11843,21 @@ printf '%s\n' "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.expsym' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $LD -G$allow_undefined_flag -M $lib.expsym -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.expsym' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -G$allow_undefined_flag -M $lib.expsym -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.expsym' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -12668,8 +12528,8 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl* | *,icx*) - # Native MSVC and Intel compilers + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -12936,18 +12796,6 @@ irix5* | irix6* | nonstopux*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no @@ -12975,7 +12823,7 @@ linux*android*) ;; # This must be glibc/ELF. -linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -13058,8 +12906,6 @@ netbsdelf*-gnu) shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' - enable_cxx_stdlib=yes - stdlibflag= ;; netbsd*) @@ -13078,8 +12924,18 @@ netbsd*) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - enable_cxx_stdlib=yes - stdlibflag= + ;; + +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes ;; newsos6) @@ -13124,14 +12980,9 @@ os2*) need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - n=$($ECHO $libname | tr -d .-); - l=${#n}; test 3 -lt "$l" && l=3; mr=$((8 - $l)); - r=$($ECHO $release | tr -d .-); - l=${#r}; test 2 -lt "$l" && l=2; mv=$(($mr - $l)); - v=$($ECHO $versuffix | tr -d .- | cut -b -$mv); - r=$($ECHO $r | cut -b -$(($mr - ${#v}))); - n=$($ECHO $n | cut -b -$((8 - ${#r} - ${#v}))); - $ECHO $n$r$v`$shared_ext' + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH @@ -13405,7 +13256,7 @@ lt_prog_compiler_static= # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.expsym' + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; @@ -13456,13 +13307,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - *-mlibc) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu* | freebsd*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | *freebsd*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) @@ -13478,7 +13323,7 @@ lt_prog_compiler_static= ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. - icc* | ifort* | icx* | ifx*) + icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' @@ -13501,12 +13346,6 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; - slimcc*) - # Hsiang-Ying Fu and Jim Huang's x86_64 SlimCC compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -13564,6 +13403,12 @@ lt_prog_compiler_static= lt_prog_compiler_static='-Bstatic' ;; + *-mlibc) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -13689,9 +13534,9 @@ else case e in #( if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi @@ -13738,9 +13583,9 @@ else case e in #( if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.expsym conftest.er2 >/dev/null; then + if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else @@ -14638,13 +14483,6 @@ CC=$lt_save_CC - - - - - - - ac_config_commands="$ac_config_commands libtool" @@ -16600,8 +16438,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' @@ -16626,13 +16464,13 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. - archive_cmds_CXX='$CC -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [-]L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' else GXX=no @@ -16934,8 +16772,8 @@ fi cygwin* | mingw* | windows* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl* | ,icl* | no,icl* | ,icx* | no,icx* | ,icpx* | no,icpx*) - # Native MSVC and Intel compilers + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' @@ -16947,20 +16785,14 @@ fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - # A check exists to verify if there are linker flags, which will use - # different commands when linking. - archive_cmds_CXX='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.expsym"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.expsym; - fi~ - if test -z "$linker_flags"; then - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,$linker_flags-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' @@ -16994,7 +16826,7 @@ fi file_list_spec_CXX='@' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then @@ -17003,7 +16835,7 @@ fi echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $stdlibflag $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi @@ -17036,8 +16868,8 @@ fi archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs $stdlibflag -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs $stdlibflag -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -17051,17 +16883,17 @@ fi hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll - archive_cmds_CXX='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; @@ -17070,6 +16902,7 @@ fi cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' + old_archive_from_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes file_list_spec_CXX='@' ;; @@ -17141,7 +16974,7 @@ fi ;; *) if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared $stdlibflag $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -17209,13 +17042,13 @@ fi if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -shared $stdlibflag -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared $stdlibflag $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared $stdlibflag $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -17256,9 +17089,9 @@ fi *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -17269,11 +17102,7 @@ fi inherit_rpath_CXX=yes ;; - *-mlibc) - ld_shlibs_CXX=yes - ;; - - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -17300,7 +17129,7 @@ fi # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc* | ecpc* | icpx*) + icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols @@ -17438,6 +17267,10 @@ fi esac ;; + *-mlibc) + ld_shlibs_CXX=yes + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' @@ -17445,11 +17278,9 @@ fi hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no - else - archive_cmds_CXX='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi - output_verbose_link_cmd=func_echo_all + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) @@ -17509,10 +17340,10 @@ fi *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.expsym; done~ - echo "-hidden">> $lib.expsym~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.expsym `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.expsym' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac @@ -17534,10 +17365,10 @@ fi allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared $stdlibflag $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared $pic_flag $stdlibflag $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac @@ -17547,7 +17378,7 @@ fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [-]L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' else # FIXME: insert proper C++ library support @@ -17591,8 +17422,8 @@ fi archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.expsym -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -17627,25 +17458,25 @@ fi if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -shared $pic_flag $stdlibflag $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [-]L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - archive_cmds_CXX='$CC -G $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -G $stdlibflag $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [-]L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' @@ -17730,14 +17561,6 @@ fi ld_shlibs_CXX=no ;; - emscripten*) - # Emscripten side modules (-sSIDE_MODULE=2) use a separate PIC sysroot - # and do not link system libraries (they are imported from the main module - # at runtime). Re-run the verbose link with -sSIDE_MODULE=2 so that the - # detected paths point to the PIC sysroot instead of the non-PIC one. - output_verbose_link_cmd='$CC -sSIDE_MODULE=2 -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP " [-]L"' - ;; - *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -17792,14 +17615,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 # the conftest object file. pre_test_object_deps_done=no - if test yes = "$enable_cxx_stdlib"; then - output_verbose_link_cmd= - fi - for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in - -L* | -R* | -l* | */libclang_rt.*.a) + -L* | -R* | -l*) # Some compilers place space between "-{L,R,l}" and the path. # Remove the space. if test x-L = x"$p" || @@ -18035,7 +17854,7 @@ lt_prog_compiler_static_CXX= # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.expsym' + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) @@ -18107,9 +17926,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - *-mlibc) - ;; - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -18122,7 +17939,7 @@ lt_prog_compiler_static_CXX= lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - icpc* | icpx*) + icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' @@ -18175,6 +17992,8 @@ lt_prog_compiler_static_CXX= ;; netbsd* | netbsdelf*-gnu) ;; + *-mlibc) + ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -18317,9 +18136,9 @@ else case e in #( if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi @@ -18366,9 +18185,9 @@ else case e in #( if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.expsym conftest.er2 >/dev/null; then + if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else @@ -18423,9 +18242,9 @@ else case e in #( then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.expsym out/conftest.er2 >/dev/null; then + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi @@ -18477,9 +18296,9 @@ else case e in #( then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.expsym out/conftest.er2 >/dev/null; then + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi @@ -18551,8 +18370,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries ;; cygwin* | mingw* | windows* | cegcc*) case $cc_basename in - cl* | icl* | icx* | icpx*) - # Native MSVC and Intel compilers + cl* | icl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -18930,8 +18748,8 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl* | *,icx*) - # Native MSVC and Intel compilers + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -19197,18 +19015,6 @@ irix5* | irix6* | nonstopux*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no @@ -19236,7 +19042,7 @@ linux*android*) ;; # This must be glibc/ELF. -linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -19319,8 +19125,6 @@ netbsdelf*-gnu) shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' - enable_cxx_stdlib=yes - stdlibflag= ;; netbsd*) @@ -19339,8 +19143,18 @@ netbsd*) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - enable_cxx_stdlib=yes - stdlibflag= + ;; + +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes ;; newsos6) @@ -19385,14 +19199,9 @@ os2*) need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - n=$($ECHO $libname | tr -d .-); - l=${#n}; test 3 -lt "$l" && l=3; mr=$((8 - $l)); - r=$($ECHO $release | tr -d .-); - l=${#r}; test 2 -lt "$l" && l=2; mv=$(($mr - $l)); - v=$($ECHO $versuffix | tr -d .- | cut -b -$mv); - r=$($ECHO $r | cut -b -$(($mr - ${#v}))); - n=$($ECHO $n | cut -b -$((8 - ${#r} - ${#v}))); - $ECHO $n$r$v`$shared_ext' + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH @@ -19645,7 +19454,7 @@ lt_prog_compiler_static_CXX= # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.expsym' + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) @@ -19717,9 +19526,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - *-mlibc) - ;; - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -19732,7 +19539,7 @@ lt_prog_compiler_static_CXX= lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - icpc* | icpx*) + icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' @@ -19785,6 +19592,8 @@ lt_prog_compiler_static_CXX= ;; netbsd* | netbsdelf*-gnu) ;; + *-mlibc) + ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -19927,9 +19736,9 @@ else case e in #( if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi @@ -19976,9 +19785,9 @@ else case e in #( if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.expsym conftest.er2 >/dev/null; then + if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else @@ -22327,6 +22136,23 @@ fi fi fi +if test -z "${ATF_TARGET_OS}"; then + { printf '%s\n' "$as_me:${as_lineno-$LINENO}: Checking target OS" >&5 +printf '%s\n' "$as_me: Checking target OS" >&6;} + ATF_TARGET_OS="$(uname -o)" +fi + + if test "${ATF_TARGET_OS}" = "FreeBSD"; then + FreeBSD_TRUE= + FreeBSD_FALSE='#' +else + FreeBSD_TRUE='#' + FreeBSD_FALSE= +fi + +{ printf '%s\n' "$as_me:${as_lineno-$LINENO}: Target OS: ${ATF_TARGET_OS}" >&5 +printf '%s\n' "$as_me: Target OS: ${ATF_TARGET_OS}" >&6;} + ac_config_files="$ac_config_files Makefile atf-c/defs.h" @@ -22462,6 +22288,10 @@ if test -z "${HAVE_KYUA_TRUE}" && test -z "${HAVE_KYUA_FALSE}"; then as_fn_error $? "conditional \"HAVE_KYUA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${FreeBSD_TRUE}" && test -z "${FreeBSD_FALSE}"; then + as_fn_error $? "conditional \"FreeBSD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" case $CONFIG_STATUS in #( @@ -22840,7 +22670,7 @@ cat >>"$CONFIG_STATUS" <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Automated Testing Framework $as_me 0.24, which was +This file was extended by Automated Testing Framework $as_me 0.26, which was generated by GNU Autoconf 2.73. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22909,7 +22739,7 @@ ac_cs_config_escaped=`printf '%s\n' "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Automated Testing Framework config.status 0.24 +Automated Testing Framework config.status 0.26 configured by $0, generated by GNU Autoconf 2.73, with options \\"\$ac_cs_config\\" @@ -23049,8 +22879,6 @@ macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_cxx_stdlib='`$ECHO "$enable_cxx_stdlib" | $SED "$delay_single_quote_subst"`' -stdlibflag='`$ECHO "$stdlibflag" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' @@ -23078,7 +22906,6 @@ lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_cygpath_installed='`$ECHO "$lt_cv_cygpath_installed" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' @@ -23274,7 +23101,6 @@ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ -lt_ar_flags \ archiver_list_spec \ STRIP \ RANLIB \ @@ -24177,7 +24003,7 @@ See 'config.log' for more details" "$LINENO" 5; } # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 -# Copyright (C) 2025-2026 Free Software Foundation, Inc. +# Copyright (C) 2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -24197,7 +24023,7 @@ See 'config.log' for more details" "$LINENO" 5; } # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # The names of the tagged configurations supported by this script. @@ -24221,12 +24047,6 @@ build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode -# Whether to let the compiler frontend decide what standard libraries to link when building C++ shared libraries and modules. -enable_cxx_stdlib=$enable_cxx_stdlib - -# Flag used for specifying not to link standard libraries. -stdlibflag=$stdlibflag - # Whether or not to optimize for fast installation. fast_install=$enable_fast_install @@ -24297,9 +24117,6 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd -# whether cygpath is installed. -cygpath_installed=$lt_cv_cygpath_installed - # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD @@ -24328,7 +24145,7 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd AR=$lt_AR # Flags to create an archive (by configure). -lt_ar_flags=$lt_lt_ar_flags +lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} diff --git a/configure.ac b/configure.ac index 6da32c22ea80..c7f078ce75e1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,5 @@ dnl Copyright (c) 2007 The NetBSD Foundation, Inc. +dnl Copyright (c) 2024-2026 Enji Cooper <ngie@FreeBSD.org>. dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -27,7 +28,7 @@ dnl ----------------------------------------------------------------------- dnl Initialize the GNU build system. dnl ----------------------------------------------------------------------- -AC_INIT([Automated Testing Framework], [0.24], +AC_INIT([Automated Testing Framework], [0.26], [freebsd-testing@freebsd.org], [atf], [https://github.com/freebsd/atf/]) AC_PREREQ([2.68]) @@ -216,6 +217,14 @@ if test x"${enable_code_coverage}" = xyes; then fi fi +if test -z "${ATF_TARGET_OS}"; then + AC_MSG_NOTICE([Checking target OS]) + ATF_TARGET_OS="$(uname -o)" +fi + +AM_CONDITIONAL([FreeBSD], [test "${ATF_TARGET_OS}" = "FreeBSD"]) +AC_MSG_NOTICE([Target OS: ${ATF_TARGET_OS}]) + dnl ----------------------------------------------------------------------- dnl Finally, generate output. dnl ----------------------------------------------------------------------- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 96e6c7d05ac2..4f51ccf33aec 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,6 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2026 Free Software +# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # @@ -9,7 +9,7 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 2025-2026 Free Software Foundation, Inc. +# Copyright (C) 2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -29,10 +29,10 @@ m4_define([_LT_COPYING], [dnl # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. ]) -# serial 67 LT_INIT +# serial 63 LT_INIT # LT_PREREQ(VERSION) @@ -506,87 +506,6 @@ m4_define([_LT_LIBTOOL_TAG_VARS], # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) -# _LT_OBJECTIVE_C -# ------------------------------ -m4_defun([_LT_OBJECTIVE_C], [ - AC_CACHE_CHECK([for Objective C compilation], - [lt_cv_objc_compiles], - [ save_CFLAGS=$CFLAGS - CFLAGS=$OBJCFLAGS - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#import <Foundation/Foundation.h> -@interface Addition : NSObject -- (int)this:(int)a that:(int)b; -@end - -@implementation Addition -- (int)this:(int)a that:(int)b -{ - return a + b; -} -@end -],[])], - lt_cv_objc_compiles=yes, - lt_cv_objc_compiles=no - ) - CFLAGS=$save_CFLAGS - ] - ) - objc_compiles=$lt_cv_objc_compiles - _LT_DECL([], [objc_compiles], [1], - [Check for compiling Objective C code]) -]) - -# _LT_OBJECTIVE_CXX -# ------------------------------ -m4_defun([_LT_OBJECTIVE_CXX], [ - AC_CACHE_CHECK([for Objective C++ compilation], - [lt_cv_objcxx_compiles], - [ save_CFLAGS=$CFLAGS - CFLAGS=$OBJCXXFLAGS - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#import <Foundation/Foundation.h> -@interface Addition : NSObject -- (int)this:(int)a that:(int)b; -@end - -@implementation Addition -- (int)this:(int)a that:(int)b -{ - return a + b; -} -@end -],[])], - lt_cv_objcxx_compiles=yes, - lt_cv_objcxx_compiles=no - ) - CFLAGS=$save_CFLAGS - ] - ) - objcxx_compiles=$lt_cv_objcxx_compiles - _LT_DECL([], [objcxx_compiles], [1], - [Check for compiling Objective C++ code]) -]) - -m4_defun([_LT_ML64], [ - AC_CACHE_CHECK([for ML64 compilation], - [lt_cv_ml64_compiles], - [ save_CFLAGS=$CFLAGS - CFLAGS=$ML64FLAGS - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ret -],[])], - lt_cv_ml64_compiles=yes, - lt_cv_ml64_compiles=no - ) - CFLAGS=$save_CFLAGS - ] - ) - objc_compiles=$lt_cv_objc_compiles - _LT_DECL([], [ml64_compiles], [1], - [Check for compiling ml64 code]) -]) - # _LT_CONFIG_COMMANDS # ------------------- @@ -732,7 +651,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2025-2026 Free Software Foundation, Inc. +Copyright (C) 2024 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -907,9 +826,6 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], - [Objective-C], [_LT_LANG(OBJC)], - [Objective-C++], [_LT_LANG(OBJCXX)], - [Microsoft Macro Assembler], [_LT_LANG(ML64)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], @@ -932,26 +848,6 @@ m4_defun([_LT_LANG], ])# _LT_LANG -m4_ifndef([AC_PROG_ML64], [ -m4_defun([AC_PROG_ML64], -[AC_LANG_PUSH(ML64)dnl -AC_ARG_VAR([ML64], [ml64 compiler command])dnl -AC_ARG_VAR([ML64FLAGS], [ml64 compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(ML64, ml64) -if test -z "$ML64"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(ML64, [${ac_tool_prefix}ml64], [${ac_tool_prefix}ml64]) - fi -fi -if test -z "$ML64"; then - AC_CHECK_PROG(ML64, ml64, ml64, false) -fi -])#m4_defun -])#m4_ifndef - - - m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # @@ -1002,34 +898,19 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [LT_LANG(OBJC)], - [m4_define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[LT_LANG(OBJC)])]) - -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [LT_LANG(OBJCXX)], - [m4_define([AC_PROG_OBJCXX], defn([AC_PROG_OBJCXX])[LT_LANG(OBJCXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_ML64], - [LT_LANG(ML64)], - [m4_define([AC_PROG_ML64], defn([AC_PROG_ML64])[LT_LANG(ML64)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) - - -]) - -# _LT_LANG_DEFAULT_CONFIG +])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) @@ -1280,8 +1161,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs $stdlibflag -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs $stdlibflag -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1656,7 +1537,7 @@ _LT_DECL([], [AR], [1], [The archiver]) test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS -_LT_DECL([], [lt_ar_flags], [1], [Flags to create an archive (by configure)]) +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. @@ -1759,9 +1640,9 @@ AC_CACHE_CHECK([$1], [$2], if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi @@ -1799,9 +1680,9 @@ AC_CACHE_CHECK([$1], [$2], if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.expsym conftest.er2 >/dev/null; then + if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else @@ -2242,9 +2123,9 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.expsym + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.expsym out/conftest.er2 >/dev/null; then + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi @@ -2747,8 +2628,8 @@ m4_if([$1], [],[ dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl* | *,icx*) - # Native MSVC and Intel compilers + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -3008,18 +2889,6 @@ irix5* | irix6* | nonstopux*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no @@ -3047,7 +2916,7 @@ linux*android*) ;; # This must be glibc/ELF. -linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -3107,8 +2976,6 @@ netbsdelf*-gnu) shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' - enable_cxx_stdlib=yes - stdlibflag= ;; netbsd*) @@ -3127,8 +2994,18 @@ netbsd*) shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - enable_cxx_stdlib=yes - stdlibflag= + ;; + +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes ;; newsos6) @@ -3173,14 +3050,9 @@ os2*) need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - n=$($ECHO $libname | tr -d .-); - l=${#n}; test 3 -lt "$l" && l=3; mr=$((8 - $l)); - r=$($ECHO $release | tr -d .-); - l=${#r}; test 2 -lt "$l" && l=2; mv=$(($mr - $l)); - v=$($ECHO $versuffix | tr -d .- | cut -b -$mv); - r=$($ECHO $r | cut -b -$(($mr - ${#v}))); - n=$($ECHO $n | cut -b -$((8 - ${#r} - ${#v}))); - $ECHO $n$r$v`$shared_ext' + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH @@ -3629,7 +3501,7 @@ case $host_os in ;; darwin*) if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS $stdlibflag $wl-r -o $output$reload_objs' + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -3797,12 +3669,12 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -*-mlibc) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -# This must be glibc/ELF. -linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +*-mlibc) lt_cv_deplibs_check_method=pass_all ;; @@ -4219,13 +4091,13 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) 0},/p'" + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ - -e 's/^I .* \(lib[[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"lib\1\", (void *) 0},/p'" + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= @@ -4239,22 +4111,22 @@ fi # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ -" -e 's/^T .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern char \1;/p'" +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) \&\1},/p'" +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib[[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"lib\1\", (void *) \&\1},/p'" +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -4275,10 +4147,8 @@ for ac_symprfx in "" "_"; do # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, - # which start with @ or ?. And Cygwin gawk-4.1.4-3 and newer - # treats input as binary, have to drop carriage return first. + # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {sub(/\\r\$/,\"\")};"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ @@ -4554,7 +4424,7 @@ m4_if([$1], [CXX], [ # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.expsym' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) @@ -4627,9 +4497,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - *-mlibc) - ;; - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4642,7 +4510,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - icpc* | icpx*) + icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4695,6 +4563,8 @@ m4_if([$1], [CXX], [ ;; netbsd* | netbsdelf*-gnu) ;; + *-mlibc) + ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -4903,7 +4773,7 @@ m4_if([$1], [CXX], [ # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.expsym' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; @@ -4955,13 +4825,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - *-mlibc) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu* | freebsd*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | *freebsd*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) @@ -4977,7 +4841,7 @@ m4_if([$1], [CXX], [ ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. - icc* | ifort* | icx* | ifx*) + icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -5000,12 +4864,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - slimcc*) - # Hsiang-Ying Fu and Jim Huang's x86_64 SlimCC compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -5063,6 +4921,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + *-mlibc) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -5219,8 +5083,7 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | windows* | cegcc*) case $cc_basename in - cl* | icl* | icx* | icpx*) - # Native MSVC and Intel compilers + cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -5426,17 +5289,17 @@ _LT_EOF _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; @@ -5445,6 +5308,7 @@ _LT_EOF cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; @@ -5464,12 +5328,7 @@ _LT_EOF _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - *-mlibc) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - - gnu* | linux* | tpf* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in @@ -5494,7 +5353,7 @@ _LT_EOF tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort* | ifx*) # Intel Fortran compiler + ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= @@ -5549,6 +5408,11 @@ _LT_EOF fi ;; + *-mlibc) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' @@ -5857,8 +5721,8 @@ _LT_EOF # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl* | icx* | icpx*) - # Native MSVC and Intel compilers + cl* | icl*) + # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5868,20 +5732,14 @@ _LT_EOF # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - # A check exists to verify if there are linker flags, which will use - # different commands when linking. _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.expsym"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.expsym; - fi~ - if test -z "$linker_flags"; then - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,$linker_flags-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' @@ -5913,7 +5771,7 @@ _LT_EOF # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. @@ -6087,9 +5945,6 @@ _LT_EOF _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - *-mlibc) - ;; - linux*) case $cc_basename in tcc*) @@ -6101,6 +5956,9 @@ _LT_EOF esac ;; + *-mlibc) + ;; + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -6147,17 +6005,17 @@ _LT_EOF _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; @@ -6166,6 +6024,7 @@ _LT_EOF cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; @@ -6191,8 +6050,8 @@ _LT_EOF else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.expsym; done; printf "%s\\n" "-hidden">> $lib.expsym~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.expsym $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.expsym' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -6209,21 +6068,21 @@ _LT_EOF if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.expsym' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $LD -G$allow_undefined_flag -M $lib.expsym -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.expsym' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -G$allow_undefined_flag -M $lib.expsym -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.expsym' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -6697,8 +6556,8 @@ if test yes != "$_lt_caught_CXX_error"; then # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' @@ -6723,13 +6582,13 @@ if test yes != "$_lt_caught_CXX_error"; then # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' else GXX=no @@ -6940,8 +6799,8 @@ if test yes != "$_lt_caught_CXX_error"; then cygwin* | mingw* | windows* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl* | ,icl* | no,icl* | ,icx* | no,icx* | ,icpx* | no,icpx*) - # Native MSVC and Intel compilers + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6953,20 +6812,14 @@ if test yes != "$_lt_caught_CXX_error"; then # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - # A check exists to verify if there are linker flags, which will use - # different commands when linking. - _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.expsym"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.expsym; - fi~ - if test -z "$linker_flags"; then - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,$linker_flags-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' @@ -7000,7 +6853,7 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(file_list_spec, $1)='@' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then @@ -7009,7 +6862,7 @@ if test yes != "$_lt_caught_CXX_error"; then echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $stdlibflag $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -7025,17 +6878,17 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - echo "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - echo EXPORTS >> $output_objdir/$libname.def~ + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; @@ -7044,6 +6897,7 @@ if test yes != "$_lt_caught_CXX_error"; then cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; @@ -7115,7 +6969,7 @@ if test yes != "$_lt_caught_CXX_error"; then ;; *) if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $stdlibflag $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -7183,13 +7037,13 @@ if test yes != "$_lt_caught_CXX_error"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -7230,9 +7084,9 @@ if test yes != "$_lt_caught_CXX_error"; then *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -7243,11 +7097,7 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - *-mlibc) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - linux* | ironclad*-gnu | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -7274,7 +7124,7 @@ if test yes != "$_lt_caught_CXX_error"; then # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc* | ecpc* | icpx*) + icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols @@ -7412,6 +7262,10 @@ if test yes != "$_lt_caught_CXX_error"; then esac ;; + *-mlibc) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' @@ -7419,11 +7273,9 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - else - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi - output_verbose_link_cmd=func_echo_all + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) @@ -7483,10 +7335,10 @@ if test yes != "$_lt_caught_CXX_error"; then *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.expsym; done~ - echo "-hidden">> $lib.expsym~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.expsym `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.expsym' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -7508,10 +7360,10 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac @@ -7521,7 +7373,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' else # FIXME: insert proper C++ library support @@ -7565,8 +7417,8 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.expsym -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -7601,25 +7453,25 @@ if test yes != "$_lt_caught_CXX_error"; then if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -shared $pic_flag $stdlibflag $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ - $CC -G $stdlibflag $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' @@ -7704,14 +7556,6 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(ld_shlibs, $1)=no ;; - emscripten*) - # Emscripten side modules (-sSIDE_MODULE=2) use a separate PIC sysroot - # and do not link system libraries (they are imported from the main module - # at runtime). Re-run the verbose link with -sSIDE_MODULE=2 so that the - # detected paths point to the PIC sysroot instead of the non-PIC one. - output_verbose_link_cmd='$CC -sSIDE_MODULE=2 -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP " [[-]]L"' - ;; - *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -7861,14 +7705,10 @@ if AC_TRY_EVAL(ac_compile); then # the conftest object file. pre_test_object_deps_done=no - if test yes = "$enable_cxx_stdlib"; then - output_verbose_link_cmd= - fi - for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in - -L* | -R* | -l* | */libclang_rt.*.a) + -L* | -R* | -l*) # Some compilers place space between "-{L,R,l}" and the path. # Remove the space. if test x-L = x"$p" || @@ -8331,76 +8171,6 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG -# _LT_LANG_ML64_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the ML64 assembler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_ML64_CONFIG], -[AC_REQUIRE([LT_PROG_ML64])dnl -AC_LANG_SAVE - -# Source file extension for ML64 test sources. -ac_ext=asm - -#Object file extension for compile ML64 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="main PROC ret main ENDP" - -# Code to be used in simple link tests -lt_simple_link_test_code="main PROC ret main ENDP" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# TODO? Check for compilation issues with ML64 flags. - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${ML64-"gcc"} -CFLAGS=$ML64FLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_ML64_CONFIG - - # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler @@ -8472,154 +8242,6 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG -# _LT_LANG_OBJC_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Objective-C compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_OBJC_CONFIG], -[AC_REQUIRE([LT_PROG_OBJC])dnl -AC_LANG_SAVE - -# Source file extension for OBJC test sources. -ac_ext=m - -# Object file extension for compiled OBJC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(void){return(0);}' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Check for compilation issues with OBJC flags -_LT_OBJECTIVE_C -if test "yes" = "$lt_cv_gnustep_exists"; then - OBJCFLAGS="$OBJCFLAGS `gnustep-config --objc-flags`" -fi - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${OBJC-"gcc"} -CFLAGS=$OBJCFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_OBJC_CONFIG - - -# _LT_LANG_OBJCXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Objective-C++ compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_OBJCXX_CONFIG], -[AC_REQUIRE([LT_PROG_OBJCXX])dnl -AC_LANG_SAVE - -# Source file extension for OBJCXX test sources. -ac_ext=mm - -# Object file extension for compiled OBJCXX test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Check for compilation issues with OBJCXX flags -_LT_OBJECTIVE_CXX -if test "yes" = "$lt_cv_gnustep_exists"; then - OBJCXXFLAGS="$OBJCXXFLAGS `gnustep-config --objc-flags`" -fi - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${OBJCXX-"g++"} -CFLAGS=$OBJCXXFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_OBJCXX_CONFIG - - # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -8672,34 +8294,6 @@ CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG -# LT_PROG_ML64 -# ----------- -AC_DEFUN([LT_PROG_ML64], -[AC_CHECK_TOOL(ML64, ml64,) -]) - - -# LT_PROG_OBJC -# ----------- -AC_DEFUN([LT_PROG_OBJC], -[AC_CHECK_TOOL(OBJC, gcc,) - AC_CHECK_TOOL(GNUSTEP_CONFIG, gnustep-config,) - if test Xgnustep-config = X"$GNUSTEP_CONFIG"; then - test set = "${OBJCFLAGS+set}" || OBJCFLAGS="`gnustep-config --objc-flags`" - fi - AC_SUBST(OBJCFLAGS)[]dnl -]) - -# LT_PROG_OBJCXX -# ----------- -AC_DEFUN([LT_PROG_OBJCXX], -[AC_CHECK_TOOL(OBJCXX, g++,) - AC_CHECK_TOOL(GNUSTEP_CONFIG, gnustep-config,) - if test Xgnustep-config = X"$GNUSTEP_CONFIG"; then - test set = "${OBJCXXFLAGS+set}" || OBJCXXFLAGS="`gnustep-config --objc-flags`" - fi - AC_SUBST(OBJCXXFLAGS)[]dnl -]) # LT_PROG_GCJ # ----------- @@ -8891,40 +8485,4 @@ to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl - -AS_CASE([$host], - [*-*-mingw* | *-*-windows* | *-*-cygwin*], - [AS_CASE([$build], - [*-*-mingw* | *-*-windows* | *-*-cygwin*], - [AC_MSG_CHECKING([whether cygpath is installed]) - AC_CACHE_VAL([lt_cv_cygpath_installed], - [lt_cv_cygpath_installed=ignoring - cygpath --help &> /dev/null - _lt_result=$? - AS_IF([test 0 = "$_lt_result"], - [lt_cv_cygpath_installed=yes], - [lt_cv_cygpath_installed=no]) - ]) - AC_MSG_RESULT([$lt_cv_cygpath_installed]) - _LT_DECL([cygpath_installed], [lt_cv_cygpath_installed], - [0], [whether cygpath is installed])dnl - AS_IF([test "xyes" != "x$lt_cv_cygpath_installed"], - [ - AC_MSG_CHECKING([whether to use cmd with one slash or two slashes]) - AC_CACHE_VAL([lt_cv_cmd_slashes], - [ - _lt_result=`cmd /c echo one-slash works. Not checked //c echo two-slashes 2>/dev/null` - AS_IF([test 0 != $?], - [AC_MSG_ERROR([Do not know how to convert paths])]) - AS_CASE([$_lt_result], - [one-slash*],[lt_cv_cmd_slashes="one"], - [two-slashes*],[lt_cv_cmd_slashes="two"], - [AC_MSG_ERROR([Do not know how to convert paths])] - ) - ]) - AC_MSG_RESULT([$lt_cv_cmd_slashes]) - ]) - ]) - ] -)dnl ])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 994d4487b1b3..25caa890298a 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -1,6 +1,6 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2026 Free +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2024 Free # Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # @@ -8,7 +8,7 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 12 ltoptions.m4 +# serial 10 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -80,7 +80,6 @@ m4_if([$1],[LT_INIT],[ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [cxx-stdlib no-cxx-stdlib], [_LT_ENABLE_CXX_STDLIB]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], @@ -371,16 +370,8 @@ power*-*-aix[[5-9]]*,yes) fi fi ;; -power*-*-aix[[5-9]]*,'') - AC_MSG_WARN([for $host, specify if building shared libraries for versioning (svr4|both)]) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - with_aix_soname=aix - AC_MSG_RESULT([(default) $with_aix_soname]) - ;; *) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) with_aix_soname=aix - AC_MSG_RESULT([(default) $with_aix_soname]) ;; esac @@ -457,49 +448,6 @@ put the 'pic-only' option into LT_INIT's first parameter.]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -# _LT_ENABLE_CXX_STDLIB([MODE]) -# -------------------- -# implement the --enable-cxx-stdlib flag, and support the 'cxx-stdlib' and 'no-cxx-stdlib' -# LT_INIT options. -# MODE is either 'yes' or 'no'. If omitted, it defaults to 'no'. -m4_define([_LT_ENABLE_CXX_STDLIB], -[m4_define([_LT_ENABLE_CXX_STDLIB_DEFAULT], [m4_if($1, yes, yes, no)])dnl -stdlibflag=-nostdlib -AC_ARG_ENABLE([cxx-stdlib], - [AS_HELP_STRING([--enable-cxx-stdlib@<:@=PKGS@:>@], - [let the compiler frontend decide what standard libraries to link when building C++ shared libraries and modules @<:@default=]_LT_ENABLE_CXX_STDLIB_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_cxx_stdlib=yes ;; - no) enable_cxx_stdlib=no ;; - *) - enable_cxx_stdlib=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_cxx_stdlib=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_cxx_stdlib=]_LT_ENABLE_CXX_STDLIB_DEFAULT) - -if test yes = "$enable_cxx_stdlib"; then - stdlibflag= -fi - -_LT_DECL([], [enable_cxx_stdlib], [0], [Whether to let the compiler frontend decide what standard libraries to link when building C++ shared libraries and modules])dnl -_LT_DECL([], [stdlibflag], [0], [Flag used for specifying not to link standard libraries])dnl -])# _LT_ENABLE_CXX_STDLIB - -LT_OPTION_DEFINE([LT_INIT], [cxx-stdlib], [_LT_ENABLE_CXX_STDLIB([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-cxx-stdlib], [_LT_ENABLE_CXX_STDLIB([no])]) - - ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 index a15a50726cfb..5b5c80a3ad78 100644 --- a/m4/ltsugar.m4 +++ b/m4/ltsugar.m4 @@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2026 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2024 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index 656867a7c6a8..228df3f39bf9 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2019, 2021-2026 Free Software Foundation, +# Copyright (C) 2004, 2011-2019, 2021-2024 Free Software Foundation, # Inc. # Written by Scott James Remnant, 2004 # @@ -10,15 +10,15 @@ # @configure_input@ -# serial 4547 ltversion.m4 +# serial 4441 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.6.2]) -m4_define([LT_PACKAGE_REVISION], [2.6.2]) +m4_define([LT_PACKAGE_VERSION], [2.5.4]) +m4_define([LT_PACKAGE_REVISION], [2.5.4]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.6.2' -macro_revision='2.6.2' +[macro_version='2.5.4' +macro_revision='2.5.4' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index cadcdbe4682c..22b534697357 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -1,6 +1,6 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2026 Free +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free # Software Foundation, Inc. # Written by Scott James Remnant, 2004. # |
