Commit 750db585ae3 for nodejs
commit 750db585ae3807e90d0af4410727324375827540
Author: Node.js GitHub Bot <github-bot@iojs.org>
Date: Mon Nov 16 19:58:59 2026 -0500
deps: update libffi to 3.8.1
PR-URL: https://github.com/nodejs/node/pull/67476
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
diff --git a/deps/libffi/ChangeLog b/deps/libffi/ChangeLog
index f64d5d5c46a..133b18134c5 100644
--- a/deps/libffi/ChangeLog
+++ b/deps/libffi/ChangeLog
@@ -1,3 +1,2049 @@
+commit de7afe7aa9e8ab7ac36429428a7222caae1e7988
+Merge: 63cfe02c 8d6f5bf5
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 08:15:07 2026 -0500
+
+ Merge pull request #1082 from libffi/release/3.8.1
+
+ Release 3.8.1
+
+commit 8d6f5bf587f642c53b62bde916d7ec60da925cf3
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 08:10:58 2026 -0500
+
+ Release 3.8.1
+
+ Bump the version from 3.8.0 to 3.8.1 and finalize the changelog:
+
+ * configure.ac: AC_INIT 3.8.0 -> 3.8.1 (propagates to FFI_VERSION,
+ libffi.pc, and the manual's @value{VERSION}).
+ * libtool-version: 13:0:5 -> 13:1:5. The source changed but no exported
+ interface was added, removed, or changed since 3.8.0, so only revision
+ is incremented.
+ * doc/version.texi, README.md: set the version and the release date.
+
+ Also fix three latent release-tooling bugs that "make distcheck" exposes
+ (plain "make dist" hides them because it does not make the source tree
+ read-only or verify a clean distclean):
+
+ * Makefile.am dist-hook rewrote $(distdir)/README.md, which automake had
+ already copied read-only, so the redirect failed with "Permission
+ denied". Remove it first.
+ * configure.ac: the X86_64 unwind-section test linked conftest without
+ -o, leaving an a.out that distcleancheck flagged. Link to a conftest
+ file and clean up.
+ * Makefile.am: add the generated libffi.map (and libffi.map-sun) to
+ DISTCLEANFILES so distclean removes them.
+
+ make distcheck now passes end to end: builds from the tarball, runs the
+ full testsuite, installs, uninstalls, and distcleans with nothing left.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 63cfe02cc95a0ad97a38586bb5aaf87fcc7e69b4
+Merge: fd2cdac5 f3dd79a0
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 07:34:25 2026 -0500
+
+ Merge pull request #1081 from libffi/testsuite/dist-missing-tests
+
+ testsuite: add new tests to EXTRA_DIST so they ship in the release
+
+commit f3dd79a0662142fca361835ebabea06727c634eb
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 07:22:22 2026 -0500
+
+ testsuite: add the new tests to EXTRA_DIST so they ship in the release
+
+ The dejagnu .exp drivers glob *.c at run time, so these tests ran in-tree,
+ but testsuite/Makefile.am's EXTRA_DIST is a hand-maintained list and `make
+ dist` ships only what it names. The tests added this cycle were missing, so
+ a `make check` from the release tarball would silently skip them -- dropping
+ the regression coverage for several of the security fixes:
+
+ libffi.call/closure_raw.c (GHSA-w6j9-w53f-2857)
+ libffi.closures/closure_int128.c (GHSA-wf8m-qr3x-cch4)
+ libffi.closures/closure_mmap_failure.c (#1055)
+ libffi.closures/closure_trampoline_table.c (GHSA-23hx-9rxv-9qfp)
+ libffi.vector/vector_unsupported_abi.c (GHSA-5pc3-hr6f-q3mm)
+
+ Also add libffi.configure/libdir.sh (the --libdir test run from CI) so it
+ ships too.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit fd2cdac5e82b6c357775ff968ff58149f8f44245
+Merge: 297a80c4 852244d3
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 07:19:30 2026 -0500
+
+ Merge pull request #1080 from libffi/readme/tighten-tbd
+
+ README: tighten the TBD changelog and fold in the security fixes
+
+commit 852244d378e908d846439a7a02d2b33c8b00a965
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 07:18:18 2026 -0500
+
+ README: tighten the TBD changelog and fold in the security fixes
+
+ Group the pending changes by architecture and theme instead of a flat
+ list plus a separate "Security fixes" block, so related entries (including
+ the six advisories) sit together. Drop the CWE codes and the long
+ mechanism descriptions -- the referenced issues and advisories carry that
+ detail -- while keeping every #issue and GHSA reference.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 297a80c4b02ef00010e985675c4c34dbc7bb2181
+Merge: 21a49087 46203c53
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 07:12:43 2026 -0500
+
+ Merge pull request #1079 from libffi/ci/green-emscripten-pytest
+
+ ci(emscripten): get the browser test job green (pytest 9.x + closure_mmap_failure)
+
+commit 46203c534e0a5d57729d838cc59d42103dd7cf62
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 06:21:33 2026 -0500
+
+ testsuite: guard closure_mmap_failure for non-glibc harnesses
+
+ The Emscripten browser harness (testsuite/emscripten/build-tests.sh) compiles
+ every testcase and ignores the dg-do "target x86_64-*-linux-gnu*" directive.
+ closure_mmap_failure interposes mmap via dlsym(RTLD_NEXT, "mmap"), which aborts
+ on wasm:
+
+ Aborted(Assertion failed: Tried to dlsym() from an unopened handle: -1)
+
+ (188 passed, 1 failed in the browser run.) Guard the body on __GLIBC__ so it
+ is a no-op wherever the RTLD_NEXT mmap-interposition technique isn't available;
+ ffitest.h pulls in <stdlib.h>, so __GLIBC__ is defined on the x86_64-linux-gnu
+ dejagnu runs that actually exercise this test, leaving them unchanged.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 4abb340542b4a7f6af328bf5e8c16d2bd631b30e
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 06:08:19 2026 -0500
+
+ ci(emscripten): bump pytest-pyodide 0.59.2 -> 0.59.4 for pytest 9.x
+
+ The browser `test` job crashed during pytest collection:
+
+ INTERNALERROR> AttributeError: 'FixtureManager' object has no
+ attribute '_arg2fixturedefs'
+
+ pytest-pyodide 0.59.2's set_runtime_fixture_params() reads the private
+ pytest internal `_fixturemanager._arg2fixturedefs`, which pytest removed.
+ The workflow installs an unpinned pytest (currently 9.2.0), so collection
+ aborted before any test ran. (It was masked until now because the build
+ job failed first; fixing closure_raw.c let the test job finally run.)
+
+ 0.59.4 handles this with a version shim (uses getfixturedefs() on
+ pytest >= 9.2), so just bump the pin. Pinning pytest down instead is a
+ dead end: pytest-asyncio 1.5.0 (a pytest-pyodide dep) requires pytest>=8.4,
+ which already lacks _arg2fixturedefs.
+
+ Verified locally that collection of testsuite/emscripten/test_libffi.py
+ succeeds with pytest 9.2.0 + pytest-pyodide 0.59.4 (the crash is gone);
+ the browser run itself is validated by CI.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 21a490876ea8046f544fbbf93a594ccf63685e9a
+Merge: 997aee20 6aff44d2
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 05:41:38 2026 -0500
+
+ Merge pull request #1078 from libffi/ci/green-emscripten-raw
+
+ testsuite: guard closure_raw on !FFI_NO_RAW_API (fix Emscripten CI)
+
+commit 6aff44d25cc7ba8ed4d3a1f64a7e931544545a41
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 05:18:38 2026 -0500
+
+ testsuite: guard closure_raw on !FFI_NO_RAW_API (fix Emscripten CI)
+
+ The Emscripten build configures libffi with --disable-raw-api, which sets
+ FFI_NO_RAW_API and compiles raw_api.c (and the native raw entries) to
+ nothing -- so ffi_prep_raw_closure_loc is absent from the wasm library.
+ closure_raw.c referenced it unconditionally under only #if FFI_CLOSURES, so
+ every wasm target failed to link:
+
+ wasm-ld: error: undefined symbol: ffi_prep_raw_closure_loc
+
+ Match raw_api.c's own guard: compile the raw-closure test only when
+ FFI_CLOSURES && !FFI_NO_RAW_API, falling back to the no-op main otherwise.
+ ffitest.h already includes fficonfig.h, so FFI_NO_RAW_API is visible to the
+ test. No change on targets where the raw API is enabled.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 997aee20b30d93c4526473d66fec6a37168f550a
+Merge: 4098fd38 7632e27b
+Author: Anthony Green <green@moxielogic.com>
+Date: Sat Nov 14 00:41:50 2026 -0500
+
+ Merge pull request #1077 from libffi/ci/green-android-macos
+
+ ci: xfail x86_64 Android ld-struct return; drop dead macos-14 runner
+
+commit 7632e27b5894c78b0511a4aef8ef0cf0c325880c
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 22:06:45 2026 -0500
+
+ ci: xfail x86_64 Android ld-struct return; drop dead macos-14 runner
+
+ Two independent CI-green fixes:
+
+ testsuite: cls_struct_ld_return.c fails only on x86_64-pc-linux-android
+ (NDK clang, static, run natively), while x86_64-pc-linux-gnu passes the
+ identical test. The generic x86-64 struct-return path is therefore sound;
+ the Android-specific divergence (possibly a binary128 vs 80-bit long double
+ difference feeding classify_argument) is unconfirmed and can't be reproduced
+ without the NDK. xfail it on x86_64-*-linux-android* and track the real fix
+ in libffi #1076 rather than guess at ffi64.c and risk the cases that pass.
+
+ build.yml: the macos-14 runners (both compiler jobs and the Rosetta job that
+ pins macos-14) have been lost on every recent run -- scheduled, then killed
+ ~2 min in with no steps, conclusion "cancelled" -- while macos-15 runs fine.
+ Drop macos-14 from the matrix and move the Rosetta x86_64 job to macos-15,
+ which is also Apple Silicon and supports Rosetta 2, so x86_64 macOS coverage
+ is preserved.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 4098fd38a167f492e0f9c774298f6754c8ec20d1
+Merge: 89a976d5 24c817af
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 19:38:54 2026 -0500
+
+ Merge pull request #1075 from libffi/ci/green-android-win32
+
+ CI: make dist PDF best-effort (Android) and xfail closure_raw on i686 MSVC
+
+commit 24c817af9aac5e1fb286ce7219d2e08ffd38c113
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 19:38:36 2026 -0500
+
+ testsuite: xfail closure_raw on i686 MSVC (libffi #1074)
+
+ The raw-API closure test passes everywhere except 32-bit MSVC
+ (i686-pc-cygwin), where it compiles but fails at execution in the i386
+ native raw-closure path. It passes on Windows 64-bit gcc/clang and all
+ Linux/macOS targets, and the GHSA-w6j9 change there is static-trampoline
+ gated (off on Windows), so this is a pre-existing gap the new test
+ exposed. xfail it on i686-pc-cygwin, tracked by issue #1074.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 9967918609a581dad639b388e03b6d5679e7340b
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 19:38:36 2026 -0500
+
+ build: make the dist-hook PDF manual truly best-effort
+
+ The previous guard checked for texi2pdf, but texi2pdf ships with texinfo
+ even when no TeX engine is installed (e.g. the Android CI container), so
+ 'make pdf' still ran texi2dvi --pdf and failed 'make dist'. Attempt the
+ PDF build and copy, and if any part fails, skip it with a message; the
+ .info manual is still shipped and release builds (with texlive) still get
+ the PDF. Verified: 'make dist' with the TeX engine forced to fail still
+ succeeds.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 89a976d5b37fb16fc7881d5a0b9d4138418bd221
+Merge: 48d7a47e d9208dee
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 19:06:30 2026 -0500
+
+ Merge pull request #1073 from libffi/ci/fix-ci-regressions
+
+ CI: fix regressions from new tests + complete the dist-hook docs guard
+
+commit d9208dee3bd27888e23512327820c1e869413cb4
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 18:19:50 2026 -0500
+
+ testsuite: xfail more mips N64 complex/fp-return tests (libffi #1071)
+
+ The full matrix surfaced two more failures in the same mips N64 ABI
+ cluster: complex_regs_double fails on little-endian (it passes on
+ big-endian hardware), and cls_struct_ld_return (long-double struct return)
+ fails at -O2. xfail both on mips64*-*-* alongside the others, tracked by
+ issue #1071.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit ecb977826207ce0ebf99272c2be2d34da8216dfd
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 18:19:50 2026 -0500
+
+ build: only build the PDF manual in dist-hook when texi2pdf is present
+
+ The dist-hook BUILD_DOCS guard still ran 'make pdf' whenever makeinfo was
+ available, so environments with texinfo but no TeX (e.g. the Android CI
+ container) failed 'make dist' at the PDF step. Build and copy the PDF
+ only when texi2pdf exists; the .info manual is still shipped, and release
+ builds (which install texlive) still get the PDF.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit b81760d079fb5ba84c70965eaf6b82de2d8a4fe4
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 18:19:50 2026 -0500
+
+ testsuite: fix closure_raw user_data cast for LLP64 (Windows)
+
+ closure_raw.c read its void* user_data back as (long), which truncates a
+ 64-bit pointer on LLP64 (Windows x64), tripping -Wall as an excess error
+ and failing the test's compile on the mingw/MSVC CI jobs. Use intptr_t.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 48d7a47ef94a9b229f7591b6aadd31542556b3f5
+Merge: 693dcbac e431830b
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 16:15:36 2026 -0500
+
+ Merge pull request #1072 from libffi/readme-changelog-consolidate
+
+ README: complete and consolidate the TBD changelog
+
+commit 693dcbac9f1eb63c68e13fbdec767201b8ec1ff5
+Merge: af169894 1436c4a9
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 16:15:31 2026 -0500
+
+ Merge pull request #1070 from libffi/ci/dist-docs-and-test-portability
+
+ CI: fix make dist doc build and closure_mmap_failure on Android
+
+commit e431830b996633d67f41dd43db448fa5f364e789
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 16:14:00 2026 -0500
+
+ README: complete and consolidate the TBD changelog for the release
+
+ Add user-facing changes that had landed since 3.8.0 but were missing from
+ the notes: the x86-64 single-long-double struct return (#1058), the x86-64
+ 16-byte vector call-plan upper-half fix, the RISC-V void-call return-buffer
+ fix, the wasm >=2 GiB heap and stack-switching-closure fixes (#1062), the
+ bounded executable-mmap retry (#1055), keeping bundled dlmalloc symbols
+ static, the mips N32/N64 CFI unwinding (#1063), and the build/packaging
+ fixes (--enable-docs, --libdir, CCASFLAGS; #1060).
+
+ Consolidate the six security fixes under one Security fixes heading with a
+ concise entry each (keeping the GHSA/CWE ids), fold GHSA-vg77 into the
+ aarch64 entry it duplicates, and merge the NetBSD closure-allocation
+ fallback into the page-size-lookup entry.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 1436c4a967441a4fb10be43d98d0fb9dfce60743
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 16:09:31 2026 -0500
+
+ testsuite: xfail mips N64 complex/fp-return tests (libffi #1071)
+
+ complex_regs_float, complex_regs_longdouble and cls_struct_fp_return fail
+ on mips64 N64 due to real, pre-existing ABI bugs in libffi's N64
+ complex-float/longdouble argument passing and fp-struct returns (confirmed
+ on real mips64 hardware, not a QEMU artifact). Mark them xfail on
+ mips64*-*-* with a pointer to the tracking issue so CI reflects the known
+ limitation while the ABI fix is developed; they are not whitelisted in
+ rlgl-policy, since the sim is not at fault.
+
+ See https://github.com/libffi/libffi/issues/1071.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit a5cf1f76582fc8d669c6e8ed5415571068099017
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 15:12:26 2026 -0500
+
+ testsuite: restrict closure_mmap_failure to glibc Linux
+
+ The test interposes mmap with a defined symbol plus dlsym(RTLD_NEXT,
+ "mmap") and -Wl,--export-dynamic, which is a glibc technique. Its
+ target guard was x86_64-*-linux*, which also matches x86_64-linux-android,
+ so the Android x86_64 CI job tried to build it and failed to compile
+ ("test for excess errors"). Tighten the guard to x86_64-*-linux-gnu* so
+ it runs on glibc Linux (where it is designed to work and still passes) and
+ is skipped on Android and musl.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 591109062b61d5f8b8bc45253d288ab3445e4280
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 15:09:49 2026 -0500
+
+ build: only build docs in dist-hook when docs are enabled
+
+ The dist-hook unconditionally ran "cd doc; make pdf", so "make dist"
+ tried to build the PDF (and the .info it depends on) even when configured
+ --disable-docs or when makeinfo/TeX is absent. That failed the dist step
+ on runners without texinfo/texlive (e.g. the macOS and Android CI jobs:
+ libffi.info Error 127, libffi.pdf Error 1).
+
+ Guard the doc-building line of dist-hook with the BUILD_DOCS automake
+ conditional, leaving the ChangeLog and README generation unconditional.
+ Verified: with --disable-docs the generated rule comments out the pdf
+ build and "make dist" completes (produces the tarball); with
+ --enable-docs the pdf build still runs.
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit af169894df2091141cbf3c2c562f1802decd2b14
+Merge: c19aeb48 2cb14fc0
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:45:49 2026 -0500
+
+ Merge pull request #1060 from 7thplanetyt/codex/fix-890-ccasflags
+
+ configure: keep assembler defaults in sync with final CFLAGS
+
+commit c19aeb480f8fe4c7f0bf1bfcf9d2d6b7bee4e4b9
+Merge: 113cdf63 1c7d90af
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:45:44 2026 -0500
+
+ Merge pull request #1063 from vhankala/mips-n32-cfi
+
+ mips: Use CFI directives in N32/N64 assembly
+
+commit 113cdf6313bce9a1cdb8ed7e8c96e6c60cc169a2
+Merge: f64ed0fa 6a1bdb5d
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:45:40 2026 -0500
+
+ Merge pull request #1062 from agriyakhetarpal/wasm-unsigned-heap-index
+
+ Fix WASM heap view indexing at 2 GiB and above
+
+commit f64ed0faee0fe947c8e47012ec088d3617da072a
+Merge: 5b8dbbd8 a80fe939
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:45:35 2026 -0500
+
+ Merge pull request #1058 from shalseth/x86-64-struct-ld-return
+
+ x86-64: return a struct with one long double member in %st0
+
+commit 5b8dbbd85f5cdaf296ceb1226c9533f51a5e0a22
+Merge: 8da7a153 12e1b740
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:30:20 2026 -0500
+
+ Merge pull request #1069 from libffi/fix/ghsa-w6j9-raw-closure
+
+ Fix raw-API closures under static trampolines (GHSA-w6j9-w53f-2857)
+
+commit 12e1b740ebe7861a9d0a7dc23003e3498645e8f2
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:28:11 2026 -0500
+
+ x86: support static trampolines in the i386 native raw closure path
+
+ ffi_prep_raw_closure_loc for the i386 native raw API wrote a dynamic
+ trampoline straight into closure->tramp with no ffi_tramp_is_present()
+ guard, unlike ffi_prep_closure_loc. With FFI_EXEC_STATIC_TRAMP (the
+ default) that write lands on the ftramp pointer ffi_closure_alloc stored
+ at offset 0, so ffi_closure_free later calls ffi_tramp_free() on a
+ corrupted pointer; and the static trampoline returned in *code was never
+ given its parameters, so invoking the closure jumped through an unset
+ (NULL or stale) slot. The documented ffi_closure_alloc +
+ ffi_prep_raw_closure_loc pattern therefore crashed (GHSA-w6j9-w53f-2857
+ part B).
+
+ Mirror ffi_prep_closure_loc: when a static trampoline is present, set its
+ parameters (via the closure's ftramp, read through ffi_closure as
+ ffi_closure_alloc does) and point it at new _alt entry points instead of
+ writing the dynamic trampoline. Add ffi_closure_raw_SYSV_alt and
+ ffi_closure_raw_THISCALL_alt, which load the closure pointer the static
+ trampoline passes into %eax and fall through to the normal bodies, just
+ like ffi_closure_i386_alt. No struct layout changes.
+
+ Verified on real i386 (GCC compile farm, cfarm26, native i686): the
+ raw-closure test crashed before and passes after, and the call and
+ closure suites pass (1472). This completes GHSA-w6j9-w53f-2857 together
+ with the generic-path fix; the closure_raw.c test now exercises both the
+ generic (x86-64) and native (i386) raw closure paths.
+
+ Advisory: GHSA-w6j9-w53f-2857
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 8f13de89965408bd1186c873ec87ad8f0a9170af
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:11:13 2026 -0500
+
+ raw API: pass the closure, not codeloc, as the translate-args user_data
+
+ ffi_prep_raw_closure_loc and ffi_prep_java_raw_closure_loc installed their
+ generic trampoline handler (ffi_translate_args / ffi_java_translate_args)
+ with codeloc as both the user_data and the code location. The handler then
+ cast that user_data back to the ffi_raw_closure and read cl->fun and
+ cl->user_data from it.
+
+ That worked only because, before static trampolines, codeloc aliased the
+ closure's own data. With FFI_EXEC_STATIC_TRAMP (the default on Linux)
+ codeloc points into the read-only trampoline code table instead, so the
+ handler read cl->fun from unrelated memory and made a wild indirect call.
+ The documented ffi_closure_alloc + ffi_prep_raw_closure_loc pattern
+ therefore crashed.
+
+ Pass the closure itself as the user_data so the handler always reads the
+ real cl->fun/cl->user_data, regardless of where the code lives.
+
+ Add testsuite/libffi.call/closure_raw.c, the first test to exercise
+ ffi_prep_raw_closure_loc; verified on x86-64 (static trampolines on) that
+ the documented pattern crashed before and returns the correct value after.
+
+ This is part A of GHSA-w6j9-w53f-2857. Part B (the i386 native raw API not
+ checking ffi_tramp_is_present) is handled separately where it can be run on
+ a 32-bit target.
+
+ Reported-by: karimabisaad (https://github.com/karimabisaad)
+ Advisory: GHSA-w6j9-w53f-2857
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 8da7a153ff8e5a10b9c1e57b186fd31ae8c01c51
+Merge: 748934db d544f904
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:07:10 2026 -0500
+
+ Merge pull request #1068 from libffi/fix/ghsa-wf8m-s390x-int128
+
+ s390x: pass 128-bit integer arguments to closures by reference (GHSA-wf8m-qr3x-cch4)
+
+commit d544f90452eac771560e6c1032acd25f586e216a
+Merge: cdc4a549 748934db
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:07:03 2026 -0500
+
+ Merge remote-tracking branch 'origin/master' into wf8m-merge
+
+ # Conflicts:
+ # README.md
+
+commit 748934dbfa1c99da2f1d1839c97cf22f05ebafab
+Merge: 39fd231e 6383099a
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:06:38 2026 -0500
+
+ Merge pull request #1067 from libffi/fix/ghsa-h52h-aarch64-abi
+
+ aarch64: fix large-struct pointer offset and HFA/HVA detection (GHSA-h52h-3759-xqm4)
+
+commit 6383099aae8ed4cfc314430a22315e261acafd5c
+Merge: fa9a7093 39fd231e
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:06:32 2026 -0500
+
+ Merge remote-tracking branch 'origin/master' into h52h-merge
+
+ # Conflicts:
+ # README.md
+
+commit 39fd231e4b54d1519143da4eadbf33ff786ddaa9
+Merge: 70a894ae ee3d6126
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 14:04:39 2026 -0500
+
+ Merge pull request #1066 from libffi/fix/ghsa-fq46-69xf-x5gf-tramp-path
+
+ Harden static-trampoline code-table lookup against path attacks (GHSA-fq46-69xf-x5gf)
+
+commit cdc4a549fe7305cb6956f17b7f57db3dc7c8e2f5
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 13:56:36 2026 -0500
+
+ s390x: pass 128-bit integer arguments to closures by reference
+
+ The s390x call path passes __int128 (and complex and long double) by
+ reference: one GPR slot holds a pointer to the value. The closure helper
+ ffi_closure_helper_SYSV handled complex and long double this way but had
+ no SINT128/UINT128 case, so those fell into the switch default
+ (FFI_ASSERT(0), a no-op in release builds). The avalue[] entry for the
+ argument was left uninitialised, so the handler received a stale stack
+ pointer and dereferenced it (a 16-byte out-of-bounds read); and because
+ no GPR slot was consumed, every following argument was decoded from a
+ shifted slot.
+
+ Group SINT128/UINT128 with COMPLEX in the by-reference handling, so one
+ GPR slot is consumed and the pointer is dereferenced into avalue[],
+ mirroring the call side.
+
+ Add a closures regression test (closure_int128.c) that passes a 128-bit
+ integer, and an argument after it, through a closure. Verified on s390x
+ (GCC compile farm): before the fix the handler returned a garbage value,
+ after it returns the correct one, and the call/closure/complex suites
+ pass (1088).
+
+ Reported-by: zerovulnlabs (https://github.com/zerovulnlabs)
+ Advisory: GHSA-wf8m-qr3x-cch4
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit fa9a709309d8961b43dea0bdb3bb144ff9428ca5
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 13:39:00 2026 -0500
+
+ aarch64: fix homogeneous-aggregate detection (HFA/HVA)
+
+ is_vfp_type decided whether an aggregate is a homogeneous floating-point
+ or vector aggregate using helpers that were too strict in one way and
+ not recursive enough in another:
+
+ * It required every vector lane in an HVA to have the same scalar type.
+ AAPCS64 (and GCC and Clang) treat two short vectors as the same
+ fundamental type when they are the same size; the lane type does not
+ matter. So { float32x4_t, int32x4_t } was rejected and sent down the
+ >16-byte memory path, while a native callee passed/returned it in
+ q0/q1. As a closure return that meant the handler wrote through a
+ stale x8; as an argument it shifted every later argument by a
+ register.
+
+ * The vector-width and lane checks ran only on the outermost members
+ and is_simd() looked only at the first nested aggregate, so a nested
+ aggregate that mixes a vector with scalars (e.g.
+ struct { struct { float32x4_t v; float a,b,c,d; }; }) was wrongly
+ accepted as a two-register HVA and passed in v0/v1, where both
+ compilers pass it by reference in x0.
+
+ Replace is_hfa0/is_simd/is_hfa1 with a single recursive hfa_flatten()
+ that flattens the aggregate and requires every leaf to share one
+ fundamental type -- a floating-point scalar, or a short vector matched by
+ size (lane type ignored) -- with 1 to 4 leaves. The AARCH64_RET_*
+ encoding is unchanged.
+
+ Verified on aarch64 (cfarm185) against native GCC callees: the two
+ mismatching cases now agree with the native ABI, and the full testsuite
+ passes (1788).
+
+ Reported-by: karimabisaad (https://github.com/karimabisaad)
+ Advisory: GHSA-h52h-3759-xqm4
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit da4db395c00c77e3615f44554fb44bb986dbc592
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 13:25:15 2026 -0500
+
+ aarch64: place spilled large-struct pointer at an 8-byte-aligned slot
+
+ When ffi_call passes a non-HFA composite larger than 16 bytes by value,
+ AAPCS64 B.4 replaces it with a pointer that occupies a plain 8-byte,
+ 8-aligned stack slot. ffi_call_int copied the payload and jumped to
+ do_pointer with the pointer in hand, but left `ty' pointing at the
+ composite, so allocate_to_stack used the composite's alignment (16, or 4
+ on Darwin) for the pointer slot instead of 8.
+
+ With the x registers exhausted and NSAA not 16-aligned (for example nine
+ sint64 arguments followed by a 32-byte, 16-aligned struct), the pointer
+ was written 8 bytes higher than where the callee reads it. libffi's own
+ closure path uses sizeof(void*) for the same slot, so ffi_call and
+ closures disagreed even without any compiler involved; the callee
+ dereferenced uninitialised stack as the struct address.
+
+ Re-point `ty' at ffi_type_pointer before the jump so the slot is aligned
+ by 8. Confirmed on aarch64 (cfarm185): a native GCC callee taking nine
+ int64s and a 32-byte struct crashed before and returns the correct value
+ after; the call and closure suites pass (954).
+
+ Reported-by: karimabisaad (https://github.com/karimabisaad)
+ Advisory: GHSA-h52h-3759-xqm4
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit ee3d61264a180953293914aedb37c520f1253a1f
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 13:11:24 2026 -0500
+
+ Harden static-trampoline code-table lookup against path attacks
+
+ On Linux, ffi_tramp_get_libffi() located the file backing the static
+ trampoline code table by parsing /proc/self/maps, then reopened the path
+ it read and mapped it PROT_READ | PROT_EXEC. Two problems let that file
+ be attacker-controlled:
+
+ 1. The path was read with sscanf("%s"), which stops at the first
+ whitespace. /proc/self/maps does not escape spaces in the name
+ field, so a libffi or executable path containing a space was
+ truncated and libffi opened the truncated path.
+ 2. The parsed device and inode were never used, so nothing checked
+ that the reopened file was the one the mapping was backed by. The
+ path could be replaced or symlinked between the read and the open.
+
+ Either way the bytes of an attacker-supplied file could become the
+ executable trampoline code table, and every closure allocated from it
+ would run attacker code (GHSA-fq46-69xf-x5gf, CWE-59/CWE-367/CWE-706).
+
+ Read the whole path (the rest of the maps line, which keeps embedded
+ spaces) rather than a whitespace-delimited token, and after opening it
+ fstat the descriptor and require its inode to match the mapping's inode,
+ falling back to the temp-file trampoline otherwise. Only the inode is
+ compared: the /proc/self/maps device field does not equal stat(2)'s
+ st_dev on btrfs, overlayfs and some other filesystems, so comparing
+ st_dev would reject the real file there (and /proc/self/map_files, which
+ would avoid the path entirely, is capability-gated and returns EPERM for
+ a process's own mappings on common kernels).
+
+ Verified on x86-64: a closure built under a path containing a space now
+ opens the full path and runs correctly while ignoring a file planted at
+ the truncated path; the libffi.closures suite still passes (610).
+
+ Reported-by: zerovulnlabs (https://github.com/zerovulnlabs)
+ Advisory: GHSA-fq46-69xf-x5gf
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 70a894ae395756653d08f65e411220fd3ee61efc
+Merge: dc84815c 7b13cee9
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 12:33:12 2026 -0500
+
+ Merge pull request #1065 from libffi/fix/ghsa-23hx-9rxv-9qfp-trampoline-uaf
+
+ Fix heap use-after-free in Darwin trampoline-table closure allocator (GHSA-23hx-9rxv-9qfp)
+
+commit 7b13cee9c321d58d1f2226c49190c04eec4c7aac
+Merge: 13888a72 dc84815c
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 12:33:00 2026 -0500
+
+ Merge remote-tracking branch 'origin/master' into fix/ghsa-23hx-9rxv-9qfp-trampoline-uaf
+
+ # Conflicts:
+ # README.md
+
+commit dc84815c9177de730d27d7ed87486cc42566859d
+Merge: d02afc25 d06f515a
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 12:32:27 2026 -0500
+
+ Merge pull request #1064 from libffi/fix/ghsa-5pc3-hr6f-q3mm-vector-abi
+
+ Reject x86-64 vector types with an undefined calling convention (GHSA-5pc3-hr6f-q3mm)
+
+commit d06f515abea2964969d720ac7ded3eb475bc4476
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Nov 13 12:15:49 2026 -0500
+
+ Reject x86-64 vector types with an undefined calling convention
+
+ On x86-64 System V the psABI only defines how 8- and 16-byte vectors
+ (the __m64/__m128 shapes) are passed and returned. Narrower vectors and
+ the single-element <1 x double> are unspecified, and GCC and Clang
+ disagree on them: for <1 x double> GCC uses memory/sret while Clang uses
+ %xmm0, and for <1 x float> GCC uses memory while Clang returns it in an
+ integer register.
+
+ ffi_prep_cif_machdep classified every 8-byte vector as SSE, so for
+ <1 x double> f(long x) against a GCC-built target libffi passed no sret
+ pointer and left x in %rdi; the callee then stored its result through
+ %rdi -- i.e. through the caller's integer argument, an attacker-
+ influenced out-of-bounds write (CWE-843 type confusion -> CWE-787).
+
+ libffi cannot tell which compiler built the target, and the two
+ conventions genuinely diverge, so there is no classification that is
+ correct for both. Reject the undefined shapes instead: a type that is,
+ or recursively contains, a vector is now FFI_BAD_TYPEDEF unless the
+ vector is 16 bytes, or 8 bytes and not <1 x double> -- the shapes both
+ compilers agree on and this port implements. Multi-lane 8- and 16-byte
+ vectors keep working.
+
+ Add a vector regression test asserting FFI_BAD_TYPEDEF for the undefined
+ shapes (including a struct that contains one) and FFI_OK for the agreed
+ ones, and note the change in the README history.
+
+ Reported-by: karimabisaad (https://github.com/karimabisaad)
+ Advisory: GHSA-5pc3-hr6f-q3mm
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 13888a72978e222cfedcaa376c0bdd5ad88365c4
+Author: Anthony Green <green@moxielogic.com>
+Date: Thu Nov 12 08:46:02 2026 -0500
+
+ Fix heap use-after-free in Darwin trampoline-table closure allocator
+
+ ffi_closure_free() bumped a non-head trampoline table to the front of
+ ffi_trampoline_tables without first unlinking it from its old position.
+ The old neighbours kept pointing at the moved table, turning the
+ doubly-linked list into a cycle with stale prev/next links. A later
+ ffi_trampoline_table_free() then unlinked through those stale links,
+ writing a pointer into freed heap memory (CWE-416), and called
+ vm_deallocate() from inside a corrupted list.
+
+ This affects only the FFI_EXEC_TRAMPOLINE_TABLE + __MACH__ allocator
+ (aarch64-apple-* and *arm*-apple-*, where it is the default) once a
+ process spans more than one trampoline table, i.e. more than 1024 live
+ closures. The trigger is an ordinary sequence of ffi_closure_alloc and
+ ffi_closure_free calls, so script-driven FFI runtimes that create
+ callbacks dynamically can reach it.
+
+ Fix it by unlinking the table from its current position before pushing
+ it to the head of the list. Add a closures regression test that churns
+ many live closures across several trampoline tables, and note the fix
+ in the README history.
+
+ Reported-by: karimabisaad (https://github.com/karimabisaad)
+ Advisory: GHSA-23hx-9rxv-9qfp
+
+ Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
+
+commit 6a1bdb5d0ad16dc66169b23cf94ef1c4458650f5
+Author: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
+Date: Thu Nov 12 14:31:08 2026 +0530
+
+ Fix WASM heap view indexing at 2 GiB and above
+
+commit 1c7d90afa7524085764ab5177f1f5cff0befdbb8
+Author: Visa Hankala <visa@hankala.org>
+Date: Tue Nov 10 15:23:41 2026 +0000
+
+ mips: Use CFI directives in N32/N64 assembly
+
+ Use CFI directives in N32/N64 assembly when the assembler
+ supports them.
+
+ This fixes build on OpenBSD/mips64 with LLVM LLD. The manually
+ constructed .eh_frame generates R_MIPS_64 relocations against local
+ symbols that LLD does not handle. With CFI directives the assembler
+ produces PC-relative relocations that LLD accepts.
+
+commit 2cb14fc08a7c74ec4114ef5d0086c0862f495d47
+Author: 7thplanetyt <221369153+7thplanetyt@users.noreply.github.com>
+Date: Fri Nov 6 21:33:18 2026 -0600
+
+ configure: keep assembler defaults in sync with final CFLAGS
+
+ Supply a make-time CFLAGS default before AM_PROG_AS when CCASFLAGS is unset.
+ Preserve explicit environment and configure-argument values, including empty
+ ones. Add six configure regression cases and one native Linux CI step.
+
+ Implements Peter Bergner's late-bound default suggestion from issue #890.
+ Prepared and independently reviewed with Codex AI assistance.
+
+commit a80fe93964cc67bdcf1cd7b82ce6205d44fb6311
+Author: Stian Halseth <stian@itx.no>
+Date: Fri Nov 6 12:14:36 2026 +0100
+
+ x86-64: return a struct with one long double member in %st0
+
+ The psABI classifies a struct whose only member is an x87 long double
+ as X87/X87UP, and returns it in %st0 like a plain long double.
+ ffi_prep_cif_machdep() sent it down the RAX/RDX struct path instead.
+ ffi_call() then stores garbage, and leaves the callee's value on the
+ x87 register stack, so after a few calls later long double arithmetic
+ in the caller gives NaN. A closure returning such a struct leaves %st0
+ empty, and its caller reads NaN.
+
+ Add cls_struct_ld_return to check the return through ffi_call and a
+ closure.
+
+ Signed-off-by: Stian Halseth <stian@itx.no>
+
+commit d02afc25e8ea3aac9e78e227748e1fd7c9f14c82
+Merge: 5f667d18 e71a504b
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 14:49:52 2026 -0400
+
+ Merge pull request #1055 from libffi/fix/issue-1032-bounded-dlmmap
+
+ Fix unbounded executable mmap retries
+
+commit e71a504b6448b32e0afeff75126a6f26407f3811
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 12:52:02 2026 -0400
+
+ Fix unbounded executable mmap retries
+
+commit 5f667d1863b3b4473972b8c75dfcf8abc1c200a6
+Merge: eb894dff a5ddf9f8
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 10:27:06 2026 -0400
+
+ Merge pull request #1054 from libffi/codex/pr-1028-rebased
+
+ configure: honor explicit --enable-docs
+
+commit a5ddf9f8e3583eb60a54bebae42b3b758e130ab9
+Author: fhgffy <102001626+fhgffy@users.noreply.github.com>
+Date: Tue Oct 6 07:12:33 2026 +0800
+
+ configure: honor explicit --enable-docs
+
+ Preserve Autoconf's parsed docs value instead of unconditionally disabling
+ documentation whenever either option polarity is supplied. Add a five-case
+ configuration regression and run it in the native Linux CI job.
+
+commit eb894dff6927f92cd47011c9a18326745ec86b94
+Merge: 595c3930 fc0cd5d2
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 09:55:18 2026 -0400
+
+ Merge pull request #1031 from dannf/dlmalloc-static-decls
+
+ closures: keep the dlmalloc 2.8.6 additions static
+
+commit 595c3930a3d6f72d4d5ae2ed85390dab17e7f1d1
+Merge: a8c5a70e 1ae71737
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 09:49:28 2026 -0400
+
+ Merge pull request #1027 from NotAFlightRisk/plan-vector-upper-half
+
+ x86-64: copy the upper half of 16-byte vector arguments in call plans
+
+commit a8c5a70e18288a36a9119b74f59456fcf86c6bca
+Merge: daec8db4 5fdd801e
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 08:59:44 2026 -0400
+
+ Merge pull request #1026 from HNO3Miracle/fix/riscv-void-return
+
+ riscv: ignore return buffer for void calls
+
+commit daec8db406d7dec17b72008f7450a88d8109afe5
+Merge: c38051bf e1aac2a7
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 07:54:08 2026 -0400
+
+ Merge pull request #1045 from mohd-akram/fix-x64-cfi
+
+ x86-64: fix build with missing CFI
+
+commit c38051bf796c1ad7948db75dd2a55f3a78b78a8c
+Merge: a6d36760 d8127bda
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 07:41:37 2026 -0400
+
+ Merge pull request #1044 from libffi/fix-pr1022-complete
+
+ configure: respect every explicit libdir spelling
+
+commit a6d367602ad2552ac58f4a840932ebbd8c76f151
+Merge: 61a20c6c 0762e0da
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 07:17:07 2026 -0400
+
+ Merge pull request #1053 from libffi/fix-mips64-complex-abi
+
+ mips: bound small complex return stores
+
+commit 0762e0daeea915d1890c93c2dde69efc85ee2c2f
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 07:14:59 2026 -0400
+
+ mips: bound small complex return stores
+
+ The N32/N64 assembly writes complex GPR returns in 8-byte chunks. Bounce values smaller than 16 bytes through an aligned temporary buffer so callers' result objects are not overrun, and account for big-endian right justification. Do the matching right justification for closure returns smaller than one register.\n\nReported-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 61a20c6c9ad62a3650921b811e82ac87e3652340
+Merge: 871815cb 8a1db735
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 06:43:31 2026 -0400
+
+ Merge pull request #1052 from libffi/fix-mips-o32-complex-reg-exhaustion
+
+ mips: fix O32 complex call and closure returns
+
+commit 8a1db7350d1037671747fbf135204c8976fb60fd
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Oct 28 06:23:32 2026 -0400
+
+ mips: fix O32 complex call and closure returns
+
+ Handle all integer-complex sizes in the O32 call path and return soft-float complex values through the ABI-defined GPR set. Restore hard-float closure results from the FP save area, preserve the argument flags, and pass the complex result size back to assembly explicitly.
+
+ Reported-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 871815cbc2553e6871a1d51b2e8abebf2f75cd9a
+Merge: 83944b00 94eb0e5b
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 21:45:43 2026 -0400
+
+ Merge pull request #1051 from libffi/fix-qemu-binfmt-comment
+
+ ci: name the QEMU binfmt package correctly
+
+commit 94eb0e5b8cf5d7671e31391fb32cd227e67cab97
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 21:42:01 2026 -0400
+
+ ci: name the QEMU binfmt package correctly
+
+commit 83944b006a6bda260bbe24e4013851168aba5b2b
+Merge: fc345b31 3365ad8b
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 21:20:00 2026 -0400
+
+ Merge pull request #1050 from libffi/fix-aarch64-darwin-stack-slots
+
+ aarch64: fix small composite stack slots on Darwin
+
+commit 3365ad8b968a9b742922b6f1188462fe6ce142ec
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 20:44:21 2026 -0400
+
+ aarch64: match Darwin stack slots to compiler ABI
+
+commit 8c8b07941c73f23eb2c87023d9b9add2ec174708
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 27 17:25:24 2026 +0000
+
+ testsuite: check a small struct passed on the stack
+
+ A struct smaller than a register that goes to the stack once the
+ argument registers are exhausted, followed by another scalar, checks
+ that the struct occupies the slot the ABI assigns and that the argument
+ behind it is found at the right offset. Nothing in the testsuite passes
+ a struct in that position through ffi_call; complex_int_small covers the
+ complex counterpart.
+
+ Add struct_stack_small, which passes eight ints, a struct of two chars
+ and a short through ffi_call and a closure.
+
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 2472245a3430b9d24f085b7654e896e074bceb82
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 27 17:25:24 2026 +0000
+
+ aarch64: give small composites full stack slots on Darwin
+
+ Darwin packs scalar arguments on the stack to their natural alignment,
+ and libffi applies the same rule to composites of up to 16 bytes that
+ are not HFAs. Apple's compilers coerce such composites, structs and
+ complex types alike, to an array of register-sized words, so each takes
+ a pointer-aligned slot whose size is a multiple of the pointer size. A
+ struct of two chars or a _Complex char after the eighth integer
+ argument therefore lands at the wrong offset, as does every argument
+ behind it, in ffi_call and in closures (cf. issue #750).
+
+ Round the alignment and the occupied size of such a composite up to the
+ pointer size on Apple targets. The generic cif->bytes accounting
+ already reserves a full slot per argument, so the stack frame stays
+ large enough.
+
+ Fixes: 4330fdcd92e6 ("Darwin/aarch64: Respect iOS ABI re: stack argument alignment")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit fc345b3124c9a0d9024cad6a12b4cd9e184eaa05
+Merge: 2e9e98b9 8c9efed8
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 20:17:57 2026 -0400
+
+ Merge pull request #1049 from libffi/fix-sparc64-small-complex-abi
+
+ sparc64: fix small integer complex ABI handling
+
+commit 8c9efed896188e360e1ba8ae1fb41b590cb8979e
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 15:48:42 2026 -0400
+
+ sparc64: fix small integer complex ABI handling
+
+commit 2e9e98b9c9300881b43580f7877c038f7b0aa746
+Merge: 4d78f2dc 22f21a37
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 18:58:25 2026 -0400
+
+ Merge pull request #1046 from libffi/fix-ci-cross-qemu-provisioning
+
+ ci: fix QEMU package provisioning on Ubuntu 26.04
+
+commit 22f21a378930791a977ee312ed154feab6690953
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 14:30:52 2026 -0400
+
+ ci: keep MIPS64EL cross build on Ubuntu 24.04
+
+commit dadb494441d4d5fc4ea12ec3e8389c8822226317
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 14:11:52 2026 -0400
+
+ ci: fix qemu package provisioning on Ubuntu 26.04
+
+commit e1aac2a712e30164970d9e7b61c7b36ade9e9ff1
+Author: Mohamed Akram <mohd.akram@outlook.com>
+Date: Tue Oct 27 19:13:52 2026 +0400
+
+ x86-64: fix build with missing CFI
+
+commit d8127bda2811496d5606c56c5ea73b3c2e695fc1
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 11:00:34 2026 -0400
+
+ configure: respect every explicit libdir spelling
+
+ Detect all libdir option forms accepted by Autoconf before applying GCC's multi-OS directory adjustment. Add configure-level coverage for full, abbreviated, single-dash, equals, and separate-value forms.
+
+ Co-authored-by: huangwenbin <huangwenbin@kylinos.cn>
+
+commit 4d78f2dc2e6b67b52f59a99391f25c80158543dd
+Merge: 8a59aed1 4106e56a
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 10:34:01 2026 -0400
+
+ Merge pull request #1025 from hilbert149/handle_sysconf_failure
+
+ NetBSD: handle sysconf failure in ffi_closure_alloc
+
+commit 8a59aed1127bf8228e3098f5419068e30c1e13ec
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 08:39:45 2026 -0400
+
+ README: note cross-architecture ABI improvements
+
+commit db3c27ff7567c7caf591e9843bb895ddaf68e475
+Merge: 9c143241 807644a1
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 08:20:07 2026 -0400
+
+ Merge pull request #1033 from dangowrt/arm-complex
+
+ arm: fix struct return argument space and small complex values
+
+commit 807644a16854a435bedba7a1b15bdd7c4c2e9655
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Wed Oct 21 01:24:08 2026 +0000
+
+ arm: pass sub-word complex arguments to big-endian closures in place
+
+ On big-endian ARM, an integer argument narrower than 4 bytes is in the
+ low-order end of its register or stack slot, at offset 4 - size, which
+ the closure argument code now takes into account for everything except
+ structs. Complex values are composite types like structs, though, and
+ are passed as if loaded from memory with LDR, at offset 0: GCC passes a
+ _Complex char in the upper half of r0.
+
+ Exclude complex types from the adjustment as well.
+
+ complex_int_small failed on ixp4xx (xscale, big-endian) under qemu-user
+ when a closure read a _Complex signed char argument.
+
+ Fixes: 2b53369681cc ("arm: fix big-endian sub-word argument offsets in closures")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit ca494a1fc657acdaf4945e4a7dde7adf1e7ac535
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Wed Oct 21 01:24:00 2026 +0000
+
+ arm: lay out the arguments behind the hidden struct return pointer
+
+ A function that returns a struct or complex value of more than 4 bytes
+ takes the address of the return value in r0, ahead of its arguments.
+ ffi_prep_cif_machdep() accounts for that by adding 4 bytes to the
+ argument size computed by ffi_prep_cif_core(), but that size was
+ computed without the pointer. Moving the arguments up by 4 bytes can
+ add up to 4 bytes of padding in front of the first 8-byte aligned one,
+ which ffi_prep_args_SYSV() then writes past the end of the argument
+ area, into the call frame that follows it.
+
+ Compute the size again with the pointer in front of the arguments,
+ using the same alignment as ffi_prep_args_SYSV().
+
+ With soft float, a call returning float _Complex after seven doubles
+ and before an int (complex_regs_float) passed garbage for the int and
+ returned garbage on mxs (arm926ej-s) and ixp4xx (xscale, big-endian)
+ under qemu-user. The same happens for any struct returned in memory
+ whenever the pointer adds such padding.
+
+ Fixes: 6fa617dabc3d ("arm: Add argument space for the hidden struct return pointer")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 9c1432412bcb6777f4cd74a33f28222cd231cd6a
+Merge: c2042b26 e3640d03
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 08:17:11 2026 -0400
+
+ Merge pull request #1042 from dangowrt/loongarch-complex
+
+ loongarch: add support for complex types
+
+commit e3640d035f23802b42a4f1d329c9148a07176e95
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 22:59:41 2026 +0000
+
+ loongarch: add support for complex types
+
+ The LoongArch psABI passes a complex floating-point number, and a struct
+ containing just one, as though it were a struct of two floating-point
+ reals. That is exactly the rule libffi already implements for structs
+ in struct_passed_as_elements(): two floats go in two FPRs if two are
+ free, otherwise the value follows the integer convention, in up to two
+ GPRs or by reference if larger than 2*GRLEN.
+
+ Flatten an FFI_TYPE_COMPLEX into two elements of its base type, let the
+ float struct handling in marshal(), unmarshal() and passed_by_ref()
+ accept complex types, and define FFI_TARGET_HAS_COMPLEX_TYPE. Everything
+ else follows from the existing struct code:
+
+ - float and double _Complex use $f0/$f1 when two FPRs are left, and
+ one or two GPRs otherwise, never one FPR and one GPR;
+ - variadic complex arguments use the integer convention;
+ - long double _Complex (32 bytes) is passed by reference and returned
+ through a hidden pointer;
+ - integer complex types are packed into GPRs like a small struct;
+ - a struct holding a single complex value flattens to the same two
+ reals and is passed the same way.
+
+ This matches GCC's code generation for lp64d. On the single-float and
+ soft-float ABIs the parts that are not IS_FLOAT fall back to the integer
+ convention, again as the psABI requires.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit c2042b260affb0b9dfe6d9ea35221c06551c53e4
+Merge: b8d8667d 53b49e1b
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 08:10:53 2026 -0400
+
+ Merge pull request #1041 from dangowrt/riscv-complex
+
+ riscv: add support for complex types
+
+commit 53b49e1bb8302fa8e5eb9ccdbe4e0e9823a104ff
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 22:57:49 2026 +0000
+
+ riscv: add support for complex types
+
+ The RISC-V psABI passes a complex floating-point number, and a struct
+ containing just one, as though it were a struct of two floating-point
+ reals. That is exactly the rule libffi already implements for structs
+ in struct_passed_as_elements(): two floats go in two FPRs if two are
+ free, otherwise the value follows the integer convention, in up to two
+ GPRs or by reference if larger than 2*XLEN.
+
+ Flatten an FFI_TYPE_COMPLEX into two elements of its base type, let the
+ float struct handling in marshal(), unmarshal() and passed_by_ref()
+ accept complex types, and define FFI_TARGET_HAS_COMPLEX_TYPE. Everything
+ else follows from the existing struct code:
+
+ - float and double _Complex use fa0/fa1 when two FPRs are left, and
+ one or two GPRs otherwise, never one FPR and one GPR;
+ - variadic complex arguments use the integer convention;
+ - long double _Complex (32 bytes) is passed by reference and returned
+ through a hidden pointer;
+ - integer complex types are packed into GPRs like a small struct;
+ - a struct holding a single complex value flattens to the same two
+ reals and is passed the same way.
+
+ This matches GCC's code generation for lp64d. On FLEN=32 and soft-float
+ ABIs the double and soft-float parts are not IS_FLOAT and fall back to the
+ integer convention, again as the psABI requires.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit b8d8667d7284a92aa6cf1a384e2f863c759ada26
+Merge: b271ecd9 abec7eac
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 08:01:13 2026 -0400
+
+ Merge pull request #1037 from dangowrt/mips-n64-soft-fp-structs
+
+ mips: fix N32/N64 soft-float returns of floating-point structs
+
+commit b271ecd9d42ecca232a2e35965857f39a463ff37
+Merge: 89d70eda 0074d8a1
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:58:14 2026 -0400
+
+ Merge pull request #1036 from dangowrt/mips-n64-be-closure-ints
+
+ mips: fix big-endian N32/N64 closure returns of small integers
+
+commit 89d70eda19c9456c25fb380754ec4fb43cf7de2e
+Merge: cca77404 5e9f34d6
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:56:35 2026 -0400
+
+ Merge pull request #1034 from dangowrt/powerpc32-complex
+
+ powerpc: add complex type support for 32-bit SYSV
+
+commit 5e9f34d6e75fb538ae039bd5117b5d6f24ed30e0
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 23:08:27 2026 +0000
+
+ powerpc: add complex type support for 32-bit SYSV
+
+ The 32-bit SYSV ABI passes and returns complex values in GPRs, never in
+ FPRs, even with hard float. GCC does not split them for this ABI but
+ treats each one as a single item of as many words as it needs, and
+ those items follow the same rules as integers of the same size:
+
+ - one word (_Complex char and short) like an int, right-justified;
+ - two words (float and int _Complex) like long long: in an even/odd
+ GPR pair (r3:r4, r5:r6, r7:r8, r9:r10), otherwise 8-byte aligned on
+ the stack, and the remaining GPRs count as used;
+ - more words (double and long long _Complex, four words) in
+ consecutive GPRs with no pair alignment if they all fit, otherwise
+ 4-byte aligned on the stack, and every later argument goes to the
+ stack too;
+ - returned in r3, r3:r4 or r3-r6.
+
+ All of these already exist for soft-float long double (FFI_TYPE_UINT128)
+ and long long, so map complex types onto them by size in a new
+ translate_type(), used everywhere translate_float() was.
+
+ With a 128-bit long double, long double _Complex takes eight words: it
+ goes in r3-r10 when it is the first argument and on the stack otherwise,
+ and is returned in r3-r10. Handle it as an internal FFI_TYPE_UINT256,
+ passed like FFI_TYPE_UINT128 with eight words, with a new
+ FLAG_RETURNS_256BITS that makes ffi_call_SYSV also store r7-r10, and a
+ PPC32_LD_R3R10 closure return entry. The closure's return value area
+ is exactly 32 bytes.
+
+ A _Complex char is returned right-justified in r3, so ffi_call uses the
+ small struct bounce buffer for it and the closure helper shifts it into
+ place. The ELFv2 handling of that bounce buffer for integer complex
+ types is now limited to powerpc64.
+
+ ffi_prep_types_sysv() resizes ffi_type_longdouble according to the abi;
+ keep ffi_type_complex_longdouble in step with it, as ffi_linux64.c does.
+
+ This matches GCC's code generation for 8548 (soft-float) and 464fp
+ (hard-float), with 64-bit long double (musl) and with
+ -mlong-double-128.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit cca77404fe0571afb049a7a50455f41270915816
+Merge: d857d416 ba994921
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:54:52 2026 -0400
+
+ Merge pull request #1043 from dangowrt/powerpc-small-struct-closures
+
+ powerpc: fix big-endian closure returns of small structs
+
+commit d857d4168da77e7757d6e83b2efa62682ba42059
+Merge: 610e1f00 198b8ef4
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:51:28 2026 -0400
+
+ Merge pull request #1039 from dangowrt/x86-complex-small
+
+ x86: pass complex arguments of up to 4 bytes like structs on i386
+
+commit 610e1f007f2ac2a075b1cec071aad4e67b7474e5
+Merge: bc553867 a68cd578
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:47:12 2026 -0400
+
+ Merge pull request #1040 from dangowrt/complex-tests
+
+ testsuite: complex arguments near register exhaustion, small integer complex
+
+commit abec7eacd17eae31961b0b63c476eb80cab1a5e5
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:45:22 2026 -0400
+
+ testsuite: use register-sized struct return storage
+
+commit 198b8ef4c94942166ba747b45ec66619c79e828a
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:45:22 2026 -0400
+
+ x86: leave complex arguments out of native raw calls
+
+commit a68cd578c6bb42841506719f5f372ebfdebc575f
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Oct 27 07:45:22 2026 -0400
+
+ testsuite: use register-sized complex return storage
+
+commit 0074d8a10c332b61d5d88c3b2bd840490be1ffb9
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Wed Oct 21 01:24:10 2026 +0000
+
+ mips: fix big-endian N32/N64 closure returns of small integers
+
+ Closures store an integer return value narrower than ffi_arg widened to
+ an ffi_arg, as the documentation requires and the testsuite does. When
+ the return value handling moved to returning the exact type, the jump
+ table in ffi_closure_N32 started to load these values with lw, lh, lhu,
+ lb or lbu from the start of the ffi_arg, which on big-endian holds the
+ upper bits. Every closure returning a char, short or int there now
+ returned 0 or garbage.
+
+ Load them from the end of the ffi_arg on big-endian. Two values share
+ the 32-bit integer path without being widened by the closure: a float
+ with soft float, and a pointer on N32. Widen those in
+ ffi_closure_mips_inner_N32() first, as ffi_call() already reads a
+ soft-float float return value from the end of the doubleword.
+
+ This fixes cls_uchar, cls_sshort, cls_uint, cls_multi_*, closure_fn*,
+ closure_simple, the *_va closure tests and most of
+ libffi.bhaible/test-callback on malta (mips64r2) and octeon (octeon+),
+ both big-endian n64 soft-float, under qemu-user. N32 is compile-tested
+ only.
+
+ Fixes: 04f6fa310dde ("mips: Fix N32 ABI return value handling (#813)")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit ba994921506147dfeb2f38ad4d2874a5bd6e4f09
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 23:37:11 2026 +0000
+
+ powerpc: fix big-endian SVR4 closure returns of 1- and 2-byte structs
+
+ With FFI_SYSV_STRUCT_RET a struct of up to 8 bytes is returned in r3/r4,
+ right-justified if smaller than 4 bytes. The closure function stores it
+ at the start of the return value area, but closures returning a 1- or
+ 2-byte struct use the PPC_LD_U8 and PPC_LD_U16 jump table entries, which
+ on big-endian load from offset 3 and 2, where an integer widened to
+ ffi_arg is.
+
+ Before the closure return handling moved from assembly to C, these
+ structs were loaded from offset 0. Add PPC32_SYSV_LD_STRUCT_1 and
+ PPC32_SYSV_LD_STRUCT_2 entries that do so again on big-endian, and alias
+ them to the integer entries on little-endian. PPC32_SYSV_LD_STRUCT_7
+ now branches to .Lstruct567 instead of falling through into it, so that
+ the new entries follow it in the table.
+
+ FFI_SYSV_STRUCT_RET is not the default on Linux, so the testsuite does
+ not cover it. Verified by building cls_1_1byte, cls_2byte and the other
+ small struct closure tests with -msvr4-struct-return -D__SVR4_STRUCT_RETURN
+ for 8548 and 464fp under qemu-user: cls_1_1byte and cls_2byte abort
+ without this change and pass with it, the others pass either way.
+
+ Fixes: 840add3b6a1c ("Add conditional target support for __int128 (#951)")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 4686b25129cb5ee205b28329daa5d4a34ecbb8b1
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Wed Oct 21 01:24:14 2026 +0000
+
+ mips: fix N32/N64 soft-float returns of floating-point structs
+
+ With soft float, GCC returns a struct of one or two float or double
+ fields with the first field in v0 and the second in a0, each like a
+ scalar of its type, i.e. a float in the low 32 bits. libffi got this
+ partly wrong:
+
+ - ffi_call_N32 took the second field of a struct of two floats or of
+ a double and a float from v1; 2e825e219fa0 ("MIPS: fix some N32
+ test failure (#701)") had changed the other two cases to a0.
+ - ffi_closure_N32 had no soft-float struct cases at all and returned
+ these structs like any small struct, as the first 16 bytes of the
+ return value in v0 and v1. That puts the second field in the wrong
+ register, and on big-endian a single float in the upper half of v0.
+
+ Store the second field from a0 in ffi_call_N32, and return soft-float
+ structs of one or two floating-point fields from the closure in v0 and
+ a0. Like the soft-float cases in ffi_call_N32, the new closure cases
+ are outside the hard-float #ifdef, so a library built for hard float
+ also handles cifs for the soft-float ABIs.
+
+ This fixes cls_struct_fp_return on malta (mips64r2, both endians) and
+ octeon (octeon+), n64 soft-float, under qemu-user, and the remaining
+ failure of libffi.bhaible/test-callback on big-endian, a closure
+ returning struct { float x; }. This code predates the git history.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 63213836c52800a255985a3f222a239020bcbce9
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Wed Oct 21 03:44:34 2026 +0000
+
+ x86: pass complex arguments of up to 4 bytes like structs on i386
+
+ ffi_call_int() passes an argument of up to 4 bytes that is not a struct
+ as an integer widened by extend_basic_type(), which aborts on anything
+ but the basic integer and float types. A _Complex char or _Complex
+ short is such an argument, so ffi_call() aborted for them. GCC passes
+ these values like small structs, as their memory image in a 4-byte
+ stack slot, and ffi_closure_inner() would have taken them from a
+ register with FFI_FASTCALL or FFI_THISCALL.
+
+ Handle complex types like structs in ffi_call_int(), ffi_closure_inner()
+ and ffi_raw_call().
+
+ complex_int_small aborted on x86 (pentium4, musl) and passes now. For
+ FFI_FASTCALL and FFI_THISCALL this follows what libffi does for small
+ structs, which has not been checked against GCC.
+
+ Fixes: 198f469e9107 ("x86: Add support for Complex")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 93ab6af85e78bb98e331692875193145645c58fd
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 23:37:11 2026 +0000
+
+ powerpc64: fix big-endian ELFv2 closure returns of 1- to 4-byte structs
+
+ ELFv2 returns a struct of up to 8 bytes right-justified in r3. The
+ closure function stores it at the start of the return value area, in
+ its normal memory layout, so on big-endian the closure assembly has to
+ load the struct from offset 0 and shift it right. That is what
+ PPC64_LD_STRUCT_5/6/7 do, but structs of 1, 2 and 4 bytes use the jump
+ table entries for integer return values, which load from the end of the
+ doubleword where an integer widened to ffi_arg is. PPC64_LD_STRUCT_3
+ loads from offset 4 and shifts by the contents of r8.
+
+ The integer entries were introduced for structs when the closure return
+ handling moved from assembly to C, replacing the old shift of the first
+ doubleword by 8 - size bytes. Restore that behaviour with entries for
+ 1-, 2- and 4-byte structs on big-endian, which alias the integer entries
+ on little-endian as before, and make PPC64_LD_STRUCT_3 load and shift
+ the doubleword like the others.
+
+ This fixes cls_1_1byte, cls_2byte, cls_3_1byte, cls_3byte1, cls_3byte2,
+ cls_4_1byte, cls_4byte, single_entry_structs1 and single_entry_structs3,
+ and the struct-returning callbacks in libffi.bhaible/test-callback, on
+ big-endian ELFv2 (musl powerpc64, e5500 under qemu-user).
+
+ Fixes: 840add3b6a1c ("Add conditional target support for __int128 (#951)")
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 463ae02e66f4ea6be45a9e2bb2f646fa3da7d62a
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Wed Oct 21 01:24:14 2026 +0000
+
+ testsuite: check return values of structs with one or two floating-point fields
+
+ Many ABIs return a struct of one or two float or double fields
+ differently from other small structs, in floating-point registers, or
+ with soft float in other GPRs than an integer struct of the same size.
+ Only a few of these combinations are covered, mostly through ffi_call.
+
+ Add cls_struct_fp_return, which returns structs of float, double, two
+ floats, two doubles, float and double, and double and float, both
+ through ffi_call and through closures.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit 6452020c205cb88eca00a1865619e64860da5ed0
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 23:48:34 2026 +0000
+
+ testsuite: check integer complex types smaller than a register
+
+ complex_int.c defines a _Complex unsigned char type but only uses
+ _Complex int, so nothing tests complex values that fit into a single
+ register or stack slot. Several targets pass and return those
+ differently from the larger complex types, e.g. right-justified within
+ the register.
+
+ Add complex_int_small, which passes and returns _Complex signed char and
+ _Complex short through ffi_call and through closures, both in registers
+ and, after eight ints, on the stack.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit dff6b142cef03fbba747344496abeb5941e1fe6b
+Author: Daniel Golle <daniel@makrotopia.org>
+Date: Tue Oct 20 22:57:49 2026 +0000
+
+ testsuite: check complex arguments when argument registers run low
+
+ The complex tests pass at most a few complex values in a row, so they never
+ reach the argument-passing rules that apply once registers start to run
+ out. Those rules differ from the plain cases on several targets:
+
+ - On RISC-V and LoongArch a complex float is passed like a struct of two
+ reals: in two FPRs if two are free, otherwise in integer registers as a
+ whole. It is never split between an FPR and a GPR.
+ - On 32-bit PowerPC SysV a two-word complex value takes an even/odd GPR
+ pair like long long, and a larger one either fits completely into the
+ remaining GPRs or goes to the stack, which also moves every later
+ argument to the stack.
+
+ Add complex_regs_{float,double,longdouble}, which pass a complex value
+ after seven doubles, after five ints, and after eight doubles and eight
+ ints, followed by an int, and check the result both through ffi_call and
+ through a closure.
+ Assisted-by: LLM
+ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+commit fc0cd5d231506d0e211e006334b30b4b571d73ed
+Author: dann frazier <dann.frazier@chainguard.dev>
+Date: Fri Oct 23 15:38:01 2026 -0600
+
+ testsuite: check closures.o keeps dlmalloc symbols private
+
+ Add a "make check" step. It fails when closures.o defines any dl*
+ symbol as external.
+
+ closures.c keeps a static list of dlmalloc functions. Someone has
+ to update that list by hand when dlmalloc.c gains a function. The
+ 2.8.6 update missed five. The new check names each function that a
+ later update misses.
+
+ testsuite/check-dlmalloc-static.sh reads the objects that
+ src/closures.lo points to. It runs $(NM) on them. It skips when NM
+ is dumpbin.
+
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+ Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
+
+commit 3a05fc20fc219cdb005e81bdd8c7969a59c1a008
+Author: dann frazier <dann.frazier@chainguard.dev>
+Date: Fri Oct 23 15:37:53 2026 -0600
+
+ closures: keep the dlmalloc 2.8.6 additions static
+
+ closures.c includes dlmalloc.c after declaring each dl* function
+ static. This keeps the bundled allocator private to libffi. The
+ update to dlmalloc 2.8.6 (2a0b4b52) added five functions that are not
+ in that list: dlrealloc_in_place, dlposix_memalign,
+ dlmalloc_footprint_limit, dlmalloc_set_footprint_limit and
+ dlbulk_free. They now get dlmalloc's default extern linkage.
+
+ libffi.so hides them through its version script. libffi.a has no
+ such script. A shared object that links libffi.a exports all five
+ whenever the link pulls in closures.o. On aarch64 every link does,
+ because ffi_prep_closure_loc in ffi.o calls ffi_data_to_code_pointer.
+ cffi's test_no_unknown_exported_symbols fails on such a build.
+
+ Declare the five functions static along with the rest.
+
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+ Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
+
+commit 1ae717371e00e29f52a36fd70465ee9d3c22bf93
+Author: Iain <iain1970@protonmail.com>
+Date: Fri Oct 2 20:47:13 2026 +0100
+
+ x86-64: copy the upper half of 16-byte vector arguments in call plans
+
+commit 5fdd801e466a1ac28106e4ce9a3cb596c267d73d
+Author: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
+Date: Tue Sep 29 14:23:17 2026 +0800
+
+ riscv: ignore return buffer for void calls
+
+ ffi_call documents that rvalue is ignored for FFI_TYPE_VOID. The RISC-V
+ backend instead unmarshals the return whenever rvalue is non-null. Since
+ ffi_type_void has size 1, this copies one byte to the supplied pointer.
+ Miri passes the dangling data pointer of an empty return buffer, causing
+ its native-library tests to receive SIGSEGV on riscv64.
+
+ Skip return unmarshalling for FFI_TYPE_VOID. Add a regression test that
+ checks a non-null return buffer remains unchanged, verifies that the
+ function runs with both non-null and null buffers, and include the test
+ in the distribution manifest.
+
+ Related: https://github.com/rust-lang/miri/issues/5356
+
+ Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
+
+commit 4106e56a75c7f3558518829cba0861495c80a9bd
+Author: panzhe <panzhe@kylinos.cn>
+Date: Sun Sep 27 13:11:05 2026 +0800
+
+ NetBSD: handle sysconf failure in ffi_closure_alloc
+
+commit bc553867367246d140cd156f060bd0409f57f157
+Merge: ecdfe588 09884002
+Author: Anthony Green <green@moxielogic.com>
+Date: Mon Sep 21 06:20:38 2026 -0400
+
+ Merge pull request #1023 from hilbert149/check_calloc_in_ffi_trampoline_table_alloc
+
+ closures: check calloc return values in ffi_trampoline_table_alloc
+
+commit ecdfe5886d1778a47dadf65dbff32a15bc25c88f
+Merge: be99c823 9b1cbb63
+Author: Anthony Green <green@moxielogic.com>
+Date: Mon Sep 21 06:19:45 2026 -0400
+
+ Merge pull request #1024 from hilbert149/fix_typos_preceding
+
+ Fix typos
+
+commit 9b1cbb631be1c9f065131276ad0f2de247847f43
+Author: panzhe <panzhe@kylinos.cn>
+Date: Mon Sep 21 16:48:57 2026 +0800
+
+ Fix typos
+
+commit 09884002533a8c806940d274d0f80062eb64795c
+Author: panzhe <panzhe@kylinos.cn>
+Date: Mon Sep 21 16:36:06 2026 +0800
+
+ closures: check calloc return values in ffi_trampoline_table_alloc
+
+commit be99c823432142b771a765b82ebddc6ba281107a
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Sep 18 06:41:25 2026 -0400
+
+ README: note the ppc64 complex long double, closure, wasm and Apple fixes
+
+ The TBD section had only the aarch64/arm big-endian closure entry. Four
+ more fixes have landed since: the powerpc64 _Complex long double size and
+ alignment now tracking the abi's long double, graceful failure when the
+ runtime page size lookup fails (#1015), the wasm EM_JS_DEPS declaration
+ that unbreaks the build on newer Emscripten (#1019), and
+ subsections_via_symbols on Apple platforms so the linker can dead-strip
+ unused code (#1017).
+
+ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
+
+commit 5cad43c09f09c24fe94b41298afb3b20495d4576
+Author: Anthony Green <green@moxielogic.com>
+Date: Wed Sep 16 06:15:21 2026 -0400
+
+ powerpc64: keep _Complex long double in step with the abi's long double
+
+ ffi_prep_types_linux64() rewrites ffi_type_longdouble to 8 or 16 bytes
+ according to the FFI_LINUX_LONG_DOUBLE_128 bit of the abi it is handed. That
+ hook, and the fact that ffi_type_longdouble is one of only two non-const
+ ffi_type objects on this target, exist so that a single libffi can describe
+ calls into libraries built with either long double width.
+
+ ffi_type_complex_longdouble is the other non-const one, for the same reason,
+ but was never updated: its size and alignment stayed frozen at whatever
+ sizeof(_Complex long double) was when libffi itself was compiled. A caller
+ asking for the other width therefore got a type that disagreed with its own
+ element -- an element of 8 bytes inside an aggregate still claiming 32 -- which
+ matters twice over:
+
+ - ffi_call_int() completes a floating-point small-struct return with
+ memcpy (rvalue, smst_buffer, cif->rtype->size), so the return value is
+ copied at the build-time size. On a 128-bit build handed the 64-bit abi
+ that writes 32 bytes into a 16-byte value; the other way around it
+ truncates the imaginary half.
+
+ - initialize_aggregate() sizes and aligns struct members from ->size and
+ ->alignment, so any struct containing a _Complex long double comes out the
+ build-time size and ffi_get_struct_offsets() reports wrong offsets.
+
+ Derive both fields from ffi_type_longdouble, which the same function has just
+ set. No test reached this because the testsuite only ever passes
+ FFI_DEFAULT_ABI, where the frozen size happens to be correct, so add one that
+ checks the types agree at each width the hook distinguishes and that a struct
+ built from the complex type matches. Verified on ppc64le under emulation: the
+ new test aborts against a library without this change and passes with it, on
+ both a 128-bit and a -mlong-double-64 build, and it is unsupported off
+ powerpc64.
+
+ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
+
+commit 1cdc1a8085b9968c00eee325483864568709442b
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Sep 15 10:12:56 2026 -0400
+
+ testsuite: pin -mlong-double-128 by compiler, not by target triplet
+
+ cls_longdouble.c, cls_align_longdouble_split.c, cls_align_longdouble_split2.c
+ and huge_struct.c force -mlong-double-128 on every powerpc64*-*-linux-gnu*
+ target. That only works when libffi itself was built with a 128-bit long
+ double: the powerpc linker refuses to merge objects that disagree about the
+ long double ABI, so against a -mlong-double-64 library each of these fails to
+ link with
+
+ ld: libffi.a(ffi_linux64.o) uses 64-bit long double, foo.o uses 128-bit
+ long double
+
+ The triplet is the wrong thing to test -- what matters is what the compiler
+ does. Add a check_effective_target_ppc64_longdouble128 probe (via the existing
+ libffi_feature_test facility) and select on that instead. Where long double is
+ already 128 bits the option is applied exactly as before; where it is 64 bits
+ the option is dropped and the tests exercise the 64-bit long double, which is
+ the ABI the library was built for.
+
+ Verified on ppc64le under emulation: with a 128-bit long double all four tests
+ still get the flag and still pass, and with CC="gcc -mlong-double-64" all four
+ now pass instead of failing to link.
+
+ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
+
+commit a2c1286984fb36e0fd95b5c1554bf621d4d91c17
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Sep 15 07:34:00 2026 -0400
+
+ CI: test ppc64le with a 64-bit long double
+
+ Nothing in CI covered a powerpc64 target whose long double is 64 bits while
+ FFI_TYPE_LONGDOUBLE stays distinct from FFI_TYPE_DOUBLE, which is how musl
+ configures ppc64le -- that gap is why the _Complex long double breakage of
+ issue #1013 shipped unnoticed.
+
+ Add a second ppc64le entry to the QEMU matrix that builds with
+ CC="gcc -mlong-double-64", reproducing musl's choice inside the existing glibc
+ container without needing a musl toolchain. The flag belongs in CC rather than
+ CFLAGS because configure copies CC into CC_FOR_TARGET in local.exp, so the
+ testsuite then compiles the tests with it as well; a CFLAGS-only build would
+ test a 64-bit-long-double library against 128-bit-long-double tests.
+
+ CXX is deliberately not overridden. The image installs gcc but not gcc-c++,
+ and while an unset CXX leaves configure to skip the C++ tests -- as it already
+ does for the existing ppc64le job -- an explicitly set one makes configure fail
+ its C++ preprocessor sanity check outright.
+
+ build_foreign_linux forwards CC/CXX into the container only when non-empty, so
+ the other matrix entries keep configure's own compiler detection.
+
+ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
+
+commit c043378d261d0a32e966fb5622ff36fbf9eaed95
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Sep 15 07:34:00 2026 -0400
+
+ powerpc64: fix _Complex long double when long double is 64 bits
+
+ PR #1003 added _Complex long double support for the IBM-128 and IEEE-128
+ formats, but it read "not IEEE-128" as "IBM-128" and so assumed
+ sizeof(long double) == 16 wherever FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE.
+ On powerpc that condition says nothing about the width: HAVE_LONG_DOUBLE_VARIANT
+ forces HAVE_LONG_DOUBLE on, and the actual width comes from the
+ FFI_LINUX_LONG_DOUBLE_128 bit of the ABI at runtime.
+
+ Targets with a distinct but 64-bit long double -- musl ppc64le, or any build
+ with -mlong-double-64 -- therefore counted 4 FPRs and 4 GPR shadow slots for
+ each _Complex long double argument and read four doubles out of a 16-byte
+ value, crashing complex_longdouble, return_complex1_longdouble,
+ return_complex2_longdouble and cls_complex_va_longdouble.
+
+ Normalize the complex element type to FFI_TYPE_DOUBLE when the ABI says long
+ double is 64 bits, as discover_homogeneous_aggregate and both _Complex return
+ paths already do, letting the existing double code handle those values. The
+ three argument paths fixed here were the only ones that hardcoded the IBM-128
+ width; the rest are driven by rtype->size or by the element count from
+ discover_homogeneous_aggregate and were already correct.
+
+ Reported and diagnosed by Janis Gertulla, who also proposed a fix.
+
+ Fixes #1013
+
+ Co-authored-by: Janis Gertulla <coffeeimpliescode@proton.me>
+ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
+
+commit 98962d38dbb4e634878592117c30e6a61e245b21
+Merge: 5aff6a0b 9e807970
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Sep 15 06:24:49 2026 -0400
+
+ Merge pull request #1020 from hoodmane/emscripten-jspi
+
+ Emscripten: Make closures work with wasm stack switching
+
+commit 9e807970afa7e0cf34215ca4f2bdbca69005c10c
+Author: Hood Chatham <roberthoodchatham@gmail.com>
+Date: Sun Sep 13 11:19:28 2026 -0700
+
+ Emscripten: Make closures work with wasm stack switching
+
+ WebAssembly stack switching (more specifically JavaScript Promise Integration,
+ abbreviated JSPI) allows webassembly code to call a function that appears to be
+ synchronous that suspends until a JavaScript Promise is resolved. This comes
+ with the restriction that there can be no JavaScript frames on the stack when
+ this happens.
+
+ In order to work well with this, the closure that `ffi_prep_closure_loc_js()`
+ makes should not put a JavaScript frame on the stack when making the onward
+ call. It can still use JavaScript helpers as the prelude and epilogue, but the
+ closure itself needs to be implemented in WebAssembly.
+
+ This reworks `ffi_prep_closure_loc_js` to satisfy these constraints. This
+ does not change `ffi_call_js` so it still doesn't work with stack switching. It
+ will need a similar transform to make it work with JSPI, but I figured it was
+ better to do them separately to keep the PRs smaller.
+
+ I also factored ffi_prep_closure_loc_js into smaller functions to try to
+ improve readability.
+
+commit 5aff6a0b6832baee81087c860050ecc6b38c45d0
+Merge: fb6495c6 c575818c
+Author: Anthony Green <green@moxielogic.com>
+Date: Mon Sep 14 07:18:48 2026 -0400
+
+ Merge pull request #1018 from 1234binpig/fix/check-linker-family
+
+ build: check linker family before GNU ld version
+
+commit fb6495c6ec4ee03a261e897d0792fdfaee060ea0
+Merge: e044ec8d bf480c39
+Author: Anthony Green <green@moxielogic.com>
+Date: Mon Sep 14 07:16:13 2026 -0400
+
+ Merge pull request #1019 from hoodmane/emscripten-version-bump
+
+ CI: Update Emscripten, Node version, and pytest-pyodide to most recent versions
+
+commit bf480c3967ea9199764a346e07c64704cd414f44
+Author: Hood Chatham <roberthoodchatham@gmail.com>
+Date: Sat Sep 12 17:47:07 2026 -0700
+
+ CI: Update Emscripten, Node version, and pytest-pyodide to most recent versions
+
+ And fix misleading comment in CI config
+
+commit c575818ce67cb471467c580a01ae8f7b6538a6e2
+Author: huangwenbin <huangwenbin@kylinos.cn>
+Date: Fri Sep 11 16:32:50 2026 +0800
+
+ build: check linker family before GNU ld version
+
+ Known GNU-compatible linkers such as gold, LLD, and mold are detected
+ separately, but the symbol-versioning check previously compared the
+ parsed GNU ld version first.
+
+ For mold and LLD, that parsed value is not meaningful and can make the
+ linker appear to be an old GNU BFD ld before its linker-family check is
+ reached.
+
+ Check the known linker families first, and only apply the minimum GNU
+ ld version check afterward.
+
+ Signed-off-by: huangwenbin <huangwenbin@kylinos.cn>
+
+commit e044ec8d00631edb77fa072187f2d9c02fb8950d
+Merge: 57d48c93 1877747a
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Sep 4 09:12:22 2026 -0400
+
+ Merge pull request #1015 from 1234binpig/fix-closure-pagesize-check
+
+ closures: handle page size lookup failure
+
+commit 57d48c93044c8c4f1615b0069cae29b213e88a51
+Merge: 33cfefc7 8ec82287
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Sep 4 09:10:07 2026 -0400
+
+ Merge pull request #1014 from 1234binpig/fix-tsan-thread-failure
+
+ testsuite: propagate tsan worker failures
+
+commit 33cfefc7d93deba08084557e05728c721b276ade
+Merge: 71ce128d 07a2a9a3
+Author: Anthony Green <green@moxielogic.com>
+Date: Fri Sep 4 07:33:48 2026 -0400
+
+ Merge pull request #1017 from dmaclach/patch-1
+
+ Added `subsections_via_symbols` for Apple platforms
+
+commit 07a2a9a370565fad046f955942866883383218b3
+Author: Dave MacLachlan <dmaclach@gmail.com>
+Date: Thu Sep 3 13:50:36 2026 -0700
+
+ Added `subsections_via_symbols` for Apple platforms
+
+ `.subsections_via_symbols` is an assembler directive for Apple/Mach-O targets that tells the linker that a section can be safely split into independent, fine-grained subsections. This is on for x86_64 targets but was missing for arm64. Handcrafted assembly files must explicitly include .subsections_via_symbols at the end of the file to enable dead-stripping.
+
+commit 1877747a8966a9466802b8f807f4dec9141f9a48
+Author: huangwenbin <huangwenbin@kylinos.cn>
+Date: Mon Aug 31 17:29:27 2026 +0800
+
+ closures: handle page size lookup failure
+
+ allocate_space() uses the value returned by sysconf(_SC_PAGESIZE)
+ as the size of a local buffer without checking for failure.
+
+ Return early when the page size lookup fails or produces an invalid
+ value, avoiding creation of an invalid variable-length array.
+
+ Signed-off-by: huangwenbin <huangwenbin@kylinos.cn>
+
+commit 8ec82287e13ee539bf07bd349b89f9a4375c2611
+Author: huangwenbin <huangwenbin@kylinos.cn>
+Date: Mon Aug 31 17:11:24 2026 +0800
+
+ testsuite: propagate tsan worker failures
+
+ The tsan worker returned NULL both on success and on setup failures,
+ while main ignored the result from pthread_join().
+
+ This allowed failures in ffi_prep_cif() or ffi_prep_closure_loc() to be
+ reported as a successful test run.
+
+ Return a distinct failure value from worker threads and check both
+ pthread_join() and the joined thread result.
+
+ Signed-off-by: huangwenbin <huangwenbin@kylinos.cn>
+
+commit 71ce128d7acf4ef4c2c675c0751e2e37661dd868
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Aug 18 22:13:46 2026 -0400
+
+ README: start TBD notes with aarch64/arm big-endian fix
+
+ Add a TBD History section for the merged #1012, which fixes big-endian
+ sub-word argument and return offsets on aarch64 and arm (closes #1011
+ and #675).
+
+ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
+
+commit 72e44aa8e60f8295f1c881ded8a69faa868e5c6e
+Merge: 303a0031 2b533696
+Author: Anthony Green <green@moxielogic.com>
+Date: Tue Aug 18 22:10:18 2026 -0400
+
+ Merge pull request #1012 from CoffeeImpliesCode/big-endian-closures
+
+ aarch64, arm: fix big-endian sub-word argument/return offsets
+
+commit 2b53369681cc85094e936efe18e27bff2d63f4c0
+Author: Janis Gertulla <coffeeimpliescode@proton.me>
+Date: Tue Aug 18 06:46:29 2026 +0200
+
+ arm: fix big-endian sub-word argument offsets in closures
+
+ Sub-4-byte integer args passed in 32-bit registers or on the stack sit
+ in the LSB of the 4-byte slot, which on big-endian ARM is at offset
+ 4 - size. Previously assumed little-endian (offset 0). Adjust in
+ ffi_prep_incoming_args_SYSV and ffi_prep_incoming_args_VFP.
+
+commit b5f729755e888f4babff0d923b55f8848943059c
+Author: Janis Gertulla <coffeeimpliescode@proton.me>
+Date: Tue Aug 18 06:46:20 2026 +0200
+
+ aarch64: fix big-endian argument and return offsets in closures
+
+ Sub-64-bit integer and scalar-float arguments passed in registers or
+ stack slots sit in the LSB of a 64-bit slot, which on big-endian is at
+ the high-address end. Add a BE() helper and offset the extracted
+ argument/return pointers by BE(sizeof(UINT64) - size) in
+ allocate_int_to_reg_or_stack, ffi_call_int and ffi_closure_SYSV_inner,
+ and by the register offset in compress_hfa_type.
+
+ Fixes the big-endian closure failures (cf. issue #675).
+
+commit 303a0031a58a43c403ffa464e292183680ae0bd1
+Author: Anthony Green <green@moxielogic.com>
+Date: Sun Aug 9 06:05:36 2026 -0400
+
+ release: verify README Status line matches the tag
+
+ The top-of-README status line is a manual edit that was missed in the
+ 3.8.0 release. Fail the release (like the existing configure.ac check)
+ when it does not match the tag version.
+
+ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
+
+commit 6e8371bcf314f154af9e252897803f024bb5ace9
+Author: Anthony Green <green@moxielogic.com>
+Date: Sun Aug 9 06:04:39 2026 -0400
+
+ README: update Status line to 3.8.0
+
+ The top-of-README status line still named 3.7.1 after the 3.8.0 release.
+
+ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
+
commit 12ffd1f9dc56fcea79d2f742f424301ae668d663
Author: Anthony Green <green@moxielogic.com>
Date: Sat Aug 8 18:08:29 2026 -0400
diff --git a/deps/libffi/Makefile.am b/deps/libffi/Makefile.am
index 74f87259b17..e35113b2b00 100644
--- a/deps/libffi/Makefile.am
+++ b/deps/libffi/Makefile.am
@@ -26,10 +26,14 @@ EXTRA_DIST = LICENSE ChangeLog.old \
libffi.xcodeproj/project.pbxproj \
src/powerpc/t-aix \
libtool-ldflags libtool-version configure.host README.md \
- libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
+ libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl \
+ testsuite/check-dlmalloc-static.sh
+
+check-local: src/closures.lo
+ $(SHELL) $(srcdir)/testsuite/check-dlmalloc-static.sh "$(NM)" src/closures.lo
# local.exp is generated by configure
-DISTCLEANFILES = local.exp
+DISTCLEANFILES = local.exp libffi.map libffi.map-sun
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
@@ -154,8 +158,16 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = '$(AM_CPPFLAGS)'
dist-hook:
- d=`(cd $(distdir); pwd)`; (cd doc; make pdf; cp *.pdf $$d/doc)
+if BUILD_DOCS
+ d=`(cd $(distdir); pwd)`; \
+ if (cd doc && make pdf && cp *.pdf $$d/doc); then \
+ :; \
+ else \
+ echo "dist-hook: PDF manual not built (no TeX engine?), omitting it from the dist"; \
+ fi
+endif
if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog
+ rm -f $(distdir)/README.md; \
s=`awk '/was released on/{ print NR; exit}' $(top_srcdir)/README.md`; \
if [ -n "$$s" ]; then tail -n +$$(($$s-1)) $(top_srcdir)/README.md; else cat $(top_srcdir)/README.md; fi > $(distdir)/README.md
diff --git a/deps/libffi/Makefile.in b/deps/libffi/Makefile.in
index c29cbb6bb65..f8471e28be4 100644
--- a/deps/libffi/Makefile.in
+++ b/deps/libffi/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -72,6 +72,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -145,10 +147,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
"$(DESTDIR)$(pkgconfigdir)"
@@ -336,8 +337,8 @@ distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
- find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -rf "$(distdir)" \
+ find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \
+ ; rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
@@ -367,14 +368,16 @@ am__relativize = \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
+GZIP_ENV = -9
DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
-distcleancheck_listfiles = find . -type f -print
+distcleancheck_listfiles = \
+ find . \( -type f -a \! \
+ \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -476,8 +479,10 @@ ac_ct_READELF = @ac_ct_READELF@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
ax_enable_builddir_sed = @ax_enable_builddir_sed@
bindir = @bindir@
build = @build@
@@ -539,11 +544,12 @@ EXTRA_DIST = LICENSE ChangeLog.old \
libffi.xcodeproj/project.pbxproj \
src/powerpc/t-aix \
libtool-ldflags libtool-version configure.host README.md \
- libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl
+ libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl \
+ testsuite/check-dlmalloc-static.sh
# local.exp is generated by configure
-DISTCLEANFILES = local.exp
+DISTCLEANFILES = local.exp libffi.map libffi.map-sun
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
@@ -671,12 +677,12 @@ fficonfig.h: stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status fficonfig.h
+ $(AM_V_at)rm -f stamp-h1
+ $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status fficonfig.h
$(srcdir)/fficonfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
+ $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ $(AM_V_at)rm -f stamp-h1
+ $(AM_V_at)touch $@
distclean-hdr:
-rm -f fficonfig.h stamp-h1
@@ -684,15 +690,13 @@ libffi.pc: $(top_builddir)/config.status $(srcdir)/libffi.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ -$(am__rm_f) $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
+ echo rm -f $${locs}; \
+ $(am__rm_f) $${locs}
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@@ -719,21 +723,19 @@ uninstall-toolexeclibLTLIBRARIES:
done
clean-toolexeclibLTLIBRARIES:
- -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
+ -$(am__rm_f) $(toolexeclib_LTLIBRARIES)
@list='$(toolexeclib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
+ echo rm -f $${locs}; \
+ $(am__rm_f) $${locs}
src/$(am__dirstamp):
@$(MKDIR_P) src
- @: > src/$(am__dirstamp)
+ @: >>src/$(am__dirstamp)
src/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/$(DEPDIR)
- @: > src/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/$(DEPDIR)/$(am__dirstamp)
src/prep_cif.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/types.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
@@ -743,10 +745,10 @@ src/tramp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/aarch64/$(am__dirstamp):
@$(MKDIR_P) src/aarch64
- @: > src/aarch64/$(am__dirstamp)
+ @: >>src/aarch64/$(am__dirstamp)
src/aarch64/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/aarch64/$(DEPDIR)
- @: > src/aarch64/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/aarch64/$(DEPDIR)/$(am__dirstamp)
src/aarch64/ffi.lo: src/aarch64/$(am__dirstamp) \
src/aarch64/$(DEPDIR)/$(am__dirstamp)
src/aarch64/sysv.lo: src/aarch64/$(am__dirstamp) \
@@ -755,30 +757,30 @@ src/aarch64/win64_armasm.lo: src/aarch64/$(am__dirstamp) \
src/aarch64/$(DEPDIR)/$(am__dirstamp)
src/alpha/$(am__dirstamp):
@$(MKDIR_P) src/alpha
- @: > src/alpha/$(am__dirstamp)
+ @: >>src/alpha/$(am__dirstamp)
src/alpha/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/alpha/$(DEPDIR)
- @: > src/alpha/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/alpha/$(DEPDIR)/$(am__dirstamp)
src/alpha/ffi.lo: src/alpha/$(am__dirstamp) \
src/alpha/$(DEPDIR)/$(am__dirstamp)
src/alpha/osf.lo: src/alpha/$(am__dirstamp) \
src/alpha/$(DEPDIR)/$(am__dirstamp)
src/arc/$(am__dirstamp):
@$(MKDIR_P) src/arc
- @: > src/arc/$(am__dirstamp)
+ @: >>src/arc/$(am__dirstamp)
src/arc/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/arc/$(DEPDIR)
- @: > src/arc/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/arc/$(DEPDIR)/$(am__dirstamp)
src/arc/ffi.lo: src/arc/$(am__dirstamp) \
src/arc/$(DEPDIR)/$(am__dirstamp)
src/arc/arcompact.lo: src/arc/$(am__dirstamp) \
src/arc/$(DEPDIR)/$(am__dirstamp)
src/arm/$(am__dirstamp):
@$(MKDIR_P) src/arm
- @: > src/arm/$(am__dirstamp)
+ @: >>src/arm/$(am__dirstamp)
src/arm/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/arm/$(DEPDIR)
- @: > src/arm/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/arm/$(DEPDIR)/$(am__dirstamp)
src/arm/ffi.lo: src/arm/$(am__dirstamp) \
src/arm/$(DEPDIR)/$(am__dirstamp)
src/arm/sysv.lo: src/arm/$(am__dirstamp) \
@@ -787,48 +789,48 @@ src/arm/sysv_msvc_arm32.lo: src/arm/$(am__dirstamp) \
src/arm/$(DEPDIR)/$(am__dirstamp)
src/avr32/$(am__dirstamp):
@$(MKDIR_P) src/avr32
- @: > src/avr32/$(am__dirstamp)
+ @: >>src/avr32/$(am__dirstamp)
src/avr32/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/avr32/$(DEPDIR)
- @: > src/avr32/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/avr32/$(DEPDIR)/$(am__dirstamp)
src/avr32/ffi.lo: src/avr32/$(am__dirstamp) \
src/avr32/$(DEPDIR)/$(am__dirstamp)
src/avr32/sysv.lo: src/avr32/$(am__dirstamp) \
src/avr32/$(DEPDIR)/$(am__dirstamp)
src/bfin/$(am__dirstamp):
@$(MKDIR_P) src/bfin
- @: > src/bfin/$(am__dirstamp)
+ @: >>src/bfin/$(am__dirstamp)
src/bfin/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/bfin/$(DEPDIR)
- @: > src/bfin/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/bfin/$(DEPDIR)/$(am__dirstamp)
src/bfin/ffi.lo: src/bfin/$(am__dirstamp) \
src/bfin/$(DEPDIR)/$(am__dirstamp)
src/bfin/sysv.lo: src/bfin/$(am__dirstamp) \
src/bfin/$(DEPDIR)/$(am__dirstamp)
src/cris/$(am__dirstamp):
@$(MKDIR_P) src/cris
- @: > src/cris/$(am__dirstamp)
+ @: >>src/cris/$(am__dirstamp)
src/cris/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/cris/$(DEPDIR)
- @: > src/cris/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/cris/$(DEPDIR)/$(am__dirstamp)
src/cris/ffi.lo: src/cris/$(am__dirstamp) \
src/cris/$(DEPDIR)/$(am__dirstamp)
src/cris/sysv.lo: src/cris/$(am__dirstamp) \
src/cris/$(DEPDIR)/$(am__dirstamp)
src/frv/$(am__dirstamp):
@$(MKDIR_P) src/frv
- @: > src/frv/$(am__dirstamp)
+ @: >>src/frv/$(am__dirstamp)
src/frv/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/frv/$(DEPDIR)
- @: > src/frv/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/frv/$(DEPDIR)/$(am__dirstamp)
src/frv/ffi.lo: src/frv/$(am__dirstamp) \
src/frv/$(DEPDIR)/$(am__dirstamp)
src/csky/$(am__dirstamp):
@$(MKDIR_P) src/csky
- @: > src/csky/$(am__dirstamp)
+ @: >>src/csky/$(am__dirstamp)
src/csky/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/csky/$(DEPDIR)
- @: > src/csky/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/csky/$(DEPDIR)/$(am__dirstamp)
src/csky/ffi.lo: src/csky/$(am__dirstamp) \
src/csky/$(DEPDIR)/$(am__dirstamp)
src/csky/sysv.lo: src/csky/$(am__dirstamp) \
@@ -837,70 +839,70 @@ src/frv/eabi.lo: src/frv/$(am__dirstamp) \
src/frv/$(DEPDIR)/$(am__dirstamp)
src/ia64/$(am__dirstamp):
@$(MKDIR_P) src/ia64
- @: > src/ia64/$(am__dirstamp)
+ @: >>src/ia64/$(am__dirstamp)
src/ia64/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/ia64/$(DEPDIR)
- @: > src/ia64/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/ia64/$(DEPDIR)/$(am__dirstamp)
src/ia64/ffi.lo: src/ia64/$(am__dirstamp) \
src/ia64/$(DEPDIR)/$(am__dirstamp)
src/ia64/unix.lo: src/ia64/$(am__dirstamp) \
src/ia64/$(DEPDIR)/$(am__dirstamp)
src/m32r/$(am__dirstamp):
@$(MKDIR_P) src/m32r
- @: > src/m32r/$(am__dirstamp)
+ @: >>src/m32r/$(am__dirstamp)
src/m32r/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/m32r/$(DEPDIR)
- @: > src/m32r/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/m32r/$(DEPDIR)/$(am__dirstamp)
src/m32r/ffi.lo: src/m32r/$(am__dirstamp) \
src/m32r/$(DEPDIR)/$(am__dirstamp)
src/m32r/sysv.lo: src/m32r/$(am__dirstamp) \
src/m32r/$(DEPDIR)/$(am__dirstamp)
src/m68k/$(am__dirstamp):
@$(MKDIR_P) src/m68k
- @: > src/m68k/$(am__dirstamp)
+ @: >>src/m68k/$(am__dirstamp)
src/m68k/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/m68k/$(DEPDIR)
- @: > src/m68k/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/m68k/$(DEPDIR)/$(am__dirstamp)
src/m68k/ffi.lo: src/m68k/$(am__dirstamp) \
src/m68k/$(DEPDIR)/$(am__dirstamp)
src/m68k/sysv.lo: src/m68k/$(am__dirstamp) \
src/m68k/$(DEPDIR)/$(am__dirstamp)
src/m88k/$(am__dirstamp):
@$(MKDIR_P) src/m88k
- @: > src/m88k/$(am__dirstamp)
+ @: >>src/m88k/$(am__dirstamp)
src/m88k/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/m88k/$(DEPDIR)
- @: > src/m88k/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/m88k/$(DEPDIR)/$(am__dirstamp)
src/m88k/ffi.lo: src/m88k/$(am__dirstamp) \
src/m88k/$(DEPDIR)/$(am__dirstamp)
src/m88k/obsd.lo: src/m88k/$(am__dirstamp) \
src/m88k/$(DEPDIR)/$(am__dirstamp)
src/metag/$(am__dirstamp):
@$(MKDIR_P) src/metag
- @: > src/metag/$(am__dirstamp)
+ @: >>src/metag/$(am__dirstamp)
src/metag/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/metag/$(DEPDIR)
- @: > src/metag/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/metag/$(DEPDIR)/$(am__dirstamp)
src/metag/ffi.lo: src/metag/$(am__dirstamp) \
src/metag/$(DEPDIR)/$(am__dirstamp)
src/metag/sysv.lo: src/metag/$(am__dirstamp) \
src/metag/$(DEPDIR)/$(am__dirstamp)
src/microblaze/$(am__dirstamp):
@$(MKDIR_P) src/microblaze
- @: > src/microblaze/$(am__dirstamp)
+ @: >>src/microblaze/$(am__dirstamp)
src/microblaze/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/microblaze/$(DEPDIR)
- @: > src/microblaze/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/microblaze/$(DEPDIR)/$(am__dirstamp)
src/microblaze/ffi.lo: src/microblaze/$(am__dirstamp) \
src/microblaze/$(DEPDIR)/$(am__dirstamp)
src/microblaze/sysv.lo: src/microblaze/$(am__dirstamp) \
src/microblaze/$(DEPDIR)/$(am__dirstamp)
src/mips/$(am__dirstamp):
@$(MKDIR_P) src/mips
- @: > src/mips/$(am__dirstamp)
+ @: >>src/mips/$(am__dirstamp)
src/mips/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/mips/$(DEPDIR)
- @: > src/mips/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/mips/$(DEPDIR)/$(am__dirstamp)
src/mips/ffi.lo: src/mips/$(am__dirstamp) \
src/mips/$(DEPDIR)/$(am__dirstamp)
src/mips/o32.lo: src/mips/$(am__dirstamp) \
@@ -909,30 +911,30 @@ src/mips/n32.lo: src/mips/$(am__dirstamp) \
src/mips/$(DEPDIR)/$(am__dirstamp)
src/moxie/$(am__dirstamp):
@$(MKDIR_P) src/moxie
- @: > src/moxie/$(am__dirstamp)
+ @: >>src/moxie/$(am__dirstamp)
src/moxie/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/moxie/$(DEPDIR)
- @: > src/moxie/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/moxie/$(DEPDIR)/$(am__dirstamp)
src/moxie/ffi.lo: src/moxie/$(am__dirstamp) \
src/moxie/$(DEPDIR)/$(am__dirstamp)
src/moxie/eabi.lo: src/moxie/$(am__dirstamp) \
src/moxie/$(DEPDIR)/$(am__dirstamp)
src/or1k/$(am__dirstamp):
@$(MKDIR_P) src/or1k
- @: > src/or1k/$(am__dirstamp)
+ @: >>src/or1k/$(am__dirstamp)
src/or1k/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/or1k/$(DEPDIR)
- @: > src/or1k/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/or1k/$(DEPDIR)/$(am__dirstamp)
src/or1k/ffi.lo: src/or1k/$(am__dirstamp) \
src/or1k/$(DEPDIR)/$(am__dirstamp)
src/or1k/sysv.lo: src/or1k/$(am__dirstamp) \
src/or1k/$(DEPDIR)/$(am__dirstamp)
src/pa/$(am__dirstamp):
@$(MKDIR_P) src/pa
- @: > src/pa/$(am__dirstamp)
+ @: >>src/pa/$(am__dirstamp)
src/pa/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/pa/$(DEPDIR)
- @: > src/pa/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/pa/$(DEPDIR)/$(am__dirstamp)
src/pa/ffi.lo: src/pa/$(am__dirstamp) src/pa/$(DEPDIR)/$(am__dirstamp)
src/pa/linux.lo: src/pa/$(am__dirstamp) \
src/pa/$(DEPDIR)/$(am__dirstamp)
@@ -942,10 +944,10 @@ src/pa/hpux64.lo: src/pa/$(am__dirstamp) \
src/pa/$(DEPDIR)/$(am__dirstamp)
src/powerpc/$(am__dirstamp):
@$(MKDIR_P) src/powerpc
- @: > src/powerpc/$(am__dirstamp)
+ @: >>src/powerpc/$(am__dirstamp)
src/powerpc/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/powerpc/$(DEPDIR)
- @: > src/powerpc/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/powerpc/$(DEPDIR)/$(am__dirstamp)
src/powerpc/ffi.lo: src/powerpc/$(am__dirstamp) \
src/powerpc/$(DEPDIR)/$(am__dirstamp)
src/powerpc/ffi_sysv.lo: src/powerpc/$(am__dirstamp) \
@@ -972,49 +974,49 @@ src/powerpc/ffi_darwin.lo: src/powerpc/$(am__dirstamp) \
src/powerpc/$(DEPDIR)/$(am__dirstamp)
src/riscv/$(am__dirstamp):
@$(MKDIR_P) src/riscv
- @: > src/riscv/$(am__dirstamp)
+ @: >>src/riscv/$(am__dirstamp)
src/riscv/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/riscv/$(DEPDIR)
- @: > src/riscv/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/riscv/$(DEPDIR)/$(am__dirstamp)
src/riscv/ffi.lo: src/riscv/$(am__dirstamp) \
src/riscv/$(DEPDIR)/$(am__dirstamp)
src/riscv/sysv.lo: src/riscv/$(am__dirstamp) \
src/riscv/$(DEPDIR)/$(am__dirstamp)
src/s390/$(am__dirstamp):
@$(MKDIR_P) src/s390
- @: > src/s390/$(am__dirstamp)
+ @: >>src/s390/$(am__dirstamp)
src/s390/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/s390/$(DEPDIR)
- @: > src/s390/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/s390/$(DEPDIR)/$(am__dirstamp)
src/s390/ffi.lo: src/s390/$(am__dirstamp) \
src/s390/$(DEPDIR)/$(am__dirstamp)
src/s390/sysv.lo: src/s390/$(am__dirstamp) \
src/s390/$(DEPDIR)/$(am__dirstamp)
src/sh/$(am__dirstamp):
@$(MKDIR_P) src/sh
- @: > src/sh/$(am__dirstamp)
+ @: >>src/sh/$(am__dirstamp)
src/sh/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/sh/$(DEPDIR)
- @: > src/sh/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/sh/$(DEPDIR)/$(am__dirstamp)
src/sh/ffi.lo: src/sh/$(am__dirstamp) src/sh/$(DEPDIR)/$(am__dirstamp)
src/sh/sysv.lo: src/sh/$(am__dirstamp) \
src/sh/$(DEPDIR)/$(am__dirstamp)
src/sh64/$(am__dirstamp):
@$(MKDIR_P) src/sh64
- @: > src/sh64/$(am__dirstamp)
+ @: >>src/sh64/$(am__dirstamp)
src/sh64/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/sh64/$(DEPDIR)
- @: > src/sh64/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/sh64/$(DEPDIR)/$(am__dirstamp)
src/sh64/ffi.lo: src/sh64/$(am__dirstamp) \
src/sh64/$(DEPDIR)/$(am__dirstamp)
src/sh64/sysv.lo: src/sh64/$(am__dirstamp) \
src/sh64/$(DEPDIR)/$(am__dirstamp)
src/sparc/$(am__dirstamp):
@$(MKDIR_P) src/sparc
- @: > src/sparc/$(am__dirstamp)
+ @: >>src/sparc/$(am__dirstamp)
src/sparc/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/sparc/$(DEPDIR)
- @: > src/sparc/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/sparc/$(DEPDIR)/$(am__dirstamp)
src/sparc/ffi.lo: src/sparc/$(am__dirstamp) \
src/sparc/$(DEPDIR)/$(am__dirstamp)
src/sparc/ffi64.lo: src/sparc/$(am__dirstamp) \
@@ -1025,40 +1027,40 @@ src/sparc/v9.lo: src/sparc/$(am__dirstamp) \
src/sparc/$(DEPDIR)/$(am__dirstamp)
src/tile/$(am__dirstamp):
@$(MKDIR_P) src/tile
- @: > src/tile/$(am__dirstamp)
+ @: >>src/tile/$(am__dirstamp)
src/tile/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/tile/$(DEPDIR)
- @: > src/tile/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/tile/$(DEPDIR)/$(am__dirstamp)
src/tile/ffi.lo: src/tile/$(am__dirstamp) \
src/tile/$(DEPDIR)/$(am__dirstamp)
src/tile/tile.lo: src/tile/$(am__dirstamp) \
src/tile/$(DEPDIR)/$(am__dirstamp)
src/vax/$(am__dirstamp):
@$(MKDIR_P) src/vax
- @: > src/vax/$(am__dirstamp)
+ @: >>src/vax/$(am__dirstamp)
src/vax/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/vax/$(DEPDIR)
- @: > src/vax/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/vax/$(DEPDIR)/$(am__dirstamp)
src/vax/ffi.lo: src/vax/$(am__dirstamp) \
src/vax/$(DEPDIR)/$(am__dirstamp)
src/vax/elfbsd.lo: src/vax/$(am__dirstamp) \
src/vax/$(DEPDIR)/$(am__dirstamp)
src/x86/$(am__dirstamp):
@$(MKDIR_P) src/x86
- @: > src/x86/$(am__dirstamp)
+ @: >>src/x86/$(am__dirstamp)
src/x86/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/x86/$(DEPDIR)
- @: > src/x86/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/ffi.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/x86/sysv.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/wasm/$(am__dirstamp):
@$(MKDIR_P) src/wasm
- @: > src/wasm/$(am__dirstamp)
+ @: >>src/wasm/$(am__dirstamp)
src/wasm/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/wasm/$(DEPDIR)
- @: > src/wasm/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/wasm/$(DEPDIR)/$(am__dirstamp)
src/wasm/ffi.lo: src/wasm/$(am__dirstamp) \
src/wasm/$(DEPDIR)/$(am__dirstamp)
src/x86/ffiw64.lo: src/x86/$(am__dirstamp) \
@@ -1075,30 +1077,30 @@ src/x86/win64_intel.lo: src/x86/$(am__dirstamp) \
src/x86/$(DEPDIR)/$(am__dirstamp)
src/xtensa/$(am__dirstamp):
@$(MKDIR_P) src/xtensa
- @: > src/xtensa/$(am__dirstamp)
+ @: >>src/xtensa/$(am__dirstamp)
src/xtensa/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/xtensa/$(DEPDIR)
- @: > src/xtensa/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/xtensa/$(DEPDIR)/$(am__dirstamp)
src/xtensa/ffi.lo: src/xtensa/$(am__dirstamp) \
src/xtensa/$(DEPDIR)/$(am__dirstamp)
src/xtensa/sysv.lo: src/xtensa/$(am__dirstamp) \
src/xtensa/$(DEPDIR)/$(am__dirstamp)
src/kvx/$(am__dirstamp):
@$(MKDIR_P) src/kvx
- @: > src/kvx/$(am__dirstamp)
+ @: >>src/kvx/$(am__dirstamp)
src/kvx/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/kvx/$(DEPDIR)
- @: > src/kvx/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/kvx/$(DEPDIR)/$(am__dirstamp)
src/kvx/ffi.lo: src/kvx/$(am__dirstamp) \
src/kvx/$(DEPDIR)/$(am__dirstamp)
src/kvx/sysv.lo: src/kvx/$(am__dirstamp) \
src/kvx/$(DEPDIR)/$(am__dirstamp)
src/loongarch/$(am__dirstamp):
@$(MKDIR_P) src/loongarch
- @: > src/loongarch/$(am__dirstamp)
+ @: >>src/loongarch/$(am__dirstamp)
src/loongarch/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/loongarch/$(DEPDIR)
- @: > src/loongarch/$(DEPDIR)/$(am__dirstamp)
+ @: >>src/loongarch/$(DEPDIR)/$(am__dirstamp)
src/loongarch/ffi.lo: src/loongarch/$(am__dirstamp) \
src/loongarch/$(DEPDIR)/$(am__dirstamp)
src/loongarch/sysv.lo: src/loongarch/$(am__dirstamp) \
@@ -1278,7 +1280,7 @@ distclean-compile:
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
- @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+ @: >>$@
am--depfiles: $(am__depfiles_remade)
@@ -1498,12 +1500,13 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
- test -d "$(distdir)" || mkdir "$(distdir)"
+ $(AM_V_at)$(MKDIR_P) "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1576,6 +1579,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
+dist-bzip3: distdir
+ tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3
+ $(am__post_remove_distdir)
+
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
@@ -1617,9 +1624,11 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.bz3*) \
+ bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
@@ -1627,7 +1636,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
@@ -1699,6 +1708,7 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
check: check-recursive
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) fficonfig.h
installdirs: installdirs-recursive
@@ -1730,75 +1740,75 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -rm -f src/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/$(am__dirstamp)
- -rm -f src/aarch64/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/aarch64/$(am__dirstamp)
- -rm -f src/alpha/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/alpha/$(am__dirstamp)
- -rm -f src/arc/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/arc/$(am__dirstamp)
- -rm -f src/arm/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/arm/$(am__dirstamp)
- -rm -f src/avr32/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/avr32/$(am__dirstamp)
- -rm -f src/bfin/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/bfin/$(am__dirstamp)
- -rm -f src/cris/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/cris/$(am__dirstamp)
- -rm -f src/csky/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/csky/$(am__dirstamp)
- -rm -f src/frv/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/frv/$(am__dirstamp)
- -rm -f src/ia64/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/ia64/$(am__dirstamp)
- -rm -f src/kvx/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/kvx/$(am__dirstamp)
- -rm -f src/loongarch/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/loongarch/$(am__dirstamp)
- -rm -f src/m32r/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/m32r/$(am__dirstamp)
- -rm -f src/m68k/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/m68k/$(am__dirstamp)
- -rm -f src/m88k/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/m88k/$(am__dirstamp)
- -rm -f src/metag/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/metag/$(am__dirstamp)
- -rm -f src/microblaze/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/microblaze/$(am__dirstamp)
- -rm -f src/mips/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/mips/$(am__dirstamp)
- -rm -f src/moxie/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/moxie/$(am__dirstamp)
- -rm -f src/or1k/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/or1k/$(am__dirstamp)
- -rm -f src/pa/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/pa/$(am__dirstamp)
- -rm -f src/powerpc/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/powerpc/$(am__dirstamp)
- -rm -f src/riscv/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/riscv/$(am__dirstamp)
- -rm -f src/s390/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/s390/$(am__dirstamp)
- -rm -f src/sh/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/sh/$(am__dirstamp)
- -rm -f src/sh64/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/sh64/$(am__dirstamp)
- -rm -f src/sparc/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/sparc/$(am__dirstamp)
- -rm -f src/tile/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/tile/$(am__dirstamp)
- -rm -f src/vax/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/vax/$(am__dirstamp)
- -rm -f src/wasm/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/wasm/$(am__dirstamp)
- -rm -f src/x86/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/x86/$(am__dirstamp)
- -rm -f src/xtensa/$(DEPDIR)/$(am__dirstamp)
- -rm -f src/xtensa/$(am__dirstamp)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(DISTCLEANFILES)
+ -$(am__rm_f) src/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/$(am__dirstamp)
+ -$(am__rm_f) src/aarch64/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/aarch64/$(am__dirstamp)
+ -$(am__rm_f) src/alpha/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/alpha/$(am__dirstamp)
+ -$(am__rm_f) src/arc/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/arc/$(am__dirstamp)
+ -$(am__rm_f) src/arm/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/arm/$(am__dirstamp)
+ -$(am__rm_f) src/avr32/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/avr32/$(am__dirstamp)
+ -$(am__rm_f) src/bfin/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/bfin/$(am__dirstamp)
+ -$(am__rm_f) src/cris/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/cris/$(am__dirstamp)
+ -$(am__rm_f) src/csky/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/csky/$(am__dirstamp)
+ -$(am__rm_f) src/frv/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/frv/$(am__dirstamp)
+ -$(am__rm_f) src/ia64/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/ia64/$(am__dirstamp)
+ -$(am__rm_f) src/kvx/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/kvx/$(am__dirstamp)
+ -$(am__rm_f) src/loongarch/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/loongarch/$(am__dirstamp)
+ -$(am__rm_f) src/m32r/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/m32r/$(am__dirstamp)
+ -$(am__rm_f) src/m68k/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/m68k/$(am__dirstamp)
+ -$(am__rm_f) src/m88k/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/m88k/$(am__dirstamp)
+ -$(am__rm_f) src/metag/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/metag/$(am__dirstamp)
+ -$(am__rm_f) src/microblaze/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/microblaze/$(am__dirstamp)
+ -$(am__rm_f) src/mips/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/mips/$(am__dirstamp)
+ -$(am__rm_f) src/moxie/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/moxie/$(am__dirstamp)
+ -$(am__rm_f) src/or1k/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/or1k/$(am__dirstamp)
+ -$(am__rm_f) src/pa/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/pa/$(am__dirstamp)
+ -$(am__rm_f) src/powerpc/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/powerpc/$(am__dirstamp)
+ -$(am__rm_f) src/riscv/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/riscv/$(am__dirstamp)
+ -$(am__rm_f) src/s390/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/s390/$(am__dirstamp)
+ -$(am__rm_f) src/sh/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/sh/$(am__dirstamp)
+ -$(am__rm_f) src/sh64/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/sh64/$(am__dirstamp)
+ -$(am__rm_f) src/sparc/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/sparc/$(am__dirstamp)
+ -$(am__rm_f) src/tile/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/tile/$(am__dirstamp)
+ -$(am__rm_f) src/vax/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/vax/$(am__dirstamp)
+ -$(am__rm_f) src/wasm/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/wasm/$(am__dirstamp)
+ -$(am__rm_f) src/x86/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/x86/$(am__dirstamp)
+ -$(am__rm_f) src/xtensa/$(DEPDIR)/$(am__dirstamp)
+ -$(am__rm_f) src/xtensa/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1810,7 +1820,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f src/$(DEPDIR)/closures.Plo
+ -rm -f src/$(DEPDIR)/closures.Plo
-rm -f src/$(DEPDIR)/debug.Plo
-rm -f src/$(DEPDIR)/java_raw_api.Plo
-rm -f src/$(DEPDIR)/prep_cif.Plo
@@ -1950,7 +1960,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -f src/$(DEPDIR)/closures.Plo
+ -rm -f src/$(DEPDIR)/closures.Plo
-rm -f src/$(DEPDIR)/debug.Plo
-rm -f src/$(DEPDIR)/java_raw_api.Plo
-rm -f src/$(DEPDIR)/prep_cif.Plo
@@ -2061,28 +2071,28 @@ ps-am:
uninstall-am: uninstall-pkgconfigDATA uninstall-toolexeclibLTLIBRARIES
-.MAKE: $(am__recursive_targets) all install-am install-strip
+.MAKE: $(am__recursive_targets) all check-am install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
- am--depfiles am--refresh check check-am clean clean-cscope \
- clean-generic clean-libtool clean-noinstLTLIBRARIES \
- clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \
- ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \
- dist-lzip dist-shar dist-tarZ dist-xz dist-zip dist-zstd \
- distcheck distclean distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-pkgconfigDATA \
- install-ps install-ps-am install-strip \
- install-toolexeclibLTLIBRARIES installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-am uninstall uninstall-am uninstall-pkgconfigDATA \
- uninstall-toolexeclibLTLIBRARIES
+ am--depfiles am--refresh check check-am check-local clean \
+ clean-cscope clean-generic clean-libtool \
+ clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES cscope \
+ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-bzip3 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip dist-zstd distcheck distclean \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-pkgconfigDATA uninstall-toolexeclibLTLIBRARIES
.PRECIOUS: Makefile
@@ -2090,6 +2100,9 @@ uninstall-am: uninstall-pkgconfigDATA uninstall-toolexeclibLTLIBRARIES
# Alias required by AX_ENABLE_BUILDDIR / config-ml
.PHONY: all-configured
all-configured: all
+
+check-local: src/closures.lo
+ $(SHELL) $(srcdir)/testsuite/check-dlmalloc-static.sh "$(NM)" src/closures.lo
@LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi.map-sun : libffi.map $(top_srcdir)/make_sunver.pl \
@LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@ $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
@LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@ perl $(top_srcdir)/make_sunver.pl libffi.map \
@@ -2102,8 +2115,14 @@ libffi.map: $(top_srcdir)/libffi.map.in
-E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in
dist-hook:
- d=`(cd $(distdir); pwd)`; (cd doc; make pdf; cp *.pdf $$d/doc)
+@BUILD_DOCS_TRUE@ d=`(cd $(distdir); pwd)`; \
+@BUILD_DOCS_TRUE@ if (cd doc && make pdf && cp *.pdf $$d/doc); then \
+@BUILD_DOCS_TRUE@ :; \
+@BUILD_DOCS_TRUE@ else \
+@BUILD_DOCS_TRUE@ echo "dist-hook: PDF manual not built (no TeX engine?), omitting it from the dist"; \
+@BUILD_DOCS_TRUE@ fi
if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog
+ rm -f $(distdir)/README.md; \
s=`awk '/was released on/{ print NR; exit}' $(top_srcdir)/README.md`; \
if [ -n "$$s" ]; then tail -n +$$(($$s-1)) $(top_srcdir)/README.md; else cat $(top_srcdir)/README.md; fi > $(distdir)/README.md
@@ -2113,3 +2132,10 @@ dist-hook:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/deps/libffi/README.md b/deps/libffi/README.md
index 797d0fd9aa8..efc73d71566 100644
--- a/deps/libffi/README.md
+++ b/deps/libffi/README.md
@@ -1,5 +1,5 @@
-libffi-3.7.1 was released on July 10, 2026.
+libffi-3.8.1 was released on November 14, 2026.
What is libffi?
@@ -201,6 +201,45 @@ History
See the git log for details at http://github.com/libffi/libffi.
+ 3.8.1 November-14-2026
+ Improve ABI conformance and test coverage for complex-number
+ calls, closures, and small aggregates across ARM, x86, PowerPC,
+ MIPS, RISC-V, LoongArch, and SPARC.
+ aarch64/arm: fix big-endian closures receiving garbage sub-word
+ integer and float arguments, and big-endian sub-word and float
+ return values (#1012, closes #1011, #675). Correct the stack
+ offset of a by-value composite larger than 16 bytes and the
+ AAPCS64 HFA/HVA detection (GHSA-h52h-3759-xqm4,
+ GHSA-vg77-j273-647r).
+ x86-64: return a single-long-double struct in %st0 like a bare
+ long double (#1058); copy the upper half of 16-byte vector
+ arguments in reusable call plans; and reject vector types whose
+ ABI is undefined, where GCC and Clang disagree, instead of
+ marshalling them the wrong way (GHSA-5pc3-hr6f-q3mm).
+ powerpc64: fix _Complex long double when the ABI's long double is
+ 64 bits (e.g. -mlong-double-64 or musl).
+ s390x: pass 128-bit integer closure arguments by reference, like
+ complex types, instead of leaving the value pointer
+ uninitialized (GHSA-wf8m-qr3x-cch4).
+ RISC-V: ignore the caller's return buffer for void calls.
+ MIPS: emit CFI in the N32/N64 assembly so unwinding works through
+ libffi frames (#1063).
+ wasm: correct heap accesses at or above 2 GiB (#1062), make
+ closures work with stack switching, and declare the stack-helper
+ dependencies in EM_JS_DEPS for newer Emscripten (#1019).
+ Closures and trampolines: fail allocation gracefully when the
+ page-size lookup fails (#1015) and bound the executable-mmap
+ retry loop (#1055). Fix a Darwin trampoline-table use-after-free
+ (GHSA-23hx-9rxv-9qfp), a Linux static-trampoline path mix-up that
+ could map the wrong file as code (GHSA-fq46-69xf-x5gf), and a
+ raw-API closure that passed the wrong handler data under static
+ trampolines (GHSA-w6j9-w53f-2857).
+ Keep the bundled dlmalloc symbols static so they cannot clash with
+ an application's allocator, and emit subsections_via_symbols on
+ Apple platforms for linker dead-stripping (#1017).
+ Build and packaging: honor an explicit --enable-docs, respect every
+ --libdir spelling, and keep CCASFLAGS in sync with CFLAGS (#1060).
+
3.8.0 August-8-2026
Add FFI_TYPE_VECTOR (SIMD) type support with libffi-computed
layout, for aarch64 and x86-64 (#1000, closes #773).
diff --git a/deps/libffi/acinclude.m4 b/deps/libffi/acinclude.m4
index 9624bbed0bd..09dec37f4ba 100644
--- a/deps/libffi/acinclude.m4
+++ b/deps/libffi/acinclude.m4
@@ -334,14 +334,14 @@ libat_min_gnu_ld_version=21400
# Change "yes" into either "no" or a style name.
if test $enable_symvers != no && test $libat_shared_libgcc = yes; then
if test $with_gnu_ld = yes; then
- if test $libat_gnu_ld_version -ge $libat_min_gnu_ld_version ; then
- enable_symvers=gnu
- elif test $libat_ld_is_gold = yes ; then
+ if test $libat_ld_is_gold = yes ; then
enable_symvers=gnu
elif test $libat_ld_is_lld = yes ; then
enable_symvers=gnu
elif test $libat_ld_is_mold = yes ; then
enable_symvers=gnu
+ elif test $libat_gnu_ld_version -ge $libat_min_gnu_ld_version ; then
+ enable_symvers=gnu
else
# The right tools, the right setup, but too old. Fallbacks?
AC_MSG_WARN(=== Linker version $libat_gnu_ld_version is too old for)
diff --git a/deps/libffi/aclocal.m4 b/deps/libffi/aclocal.m4
index de83b0ad0aa..5ab9ad2daa1 100644
--- a/deps/libffi/aclocal.m4
+++ b/deps/libffi/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,15 +14,15 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
-[m4_warning([this file was generated for autoconf 2.71.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
+[m4_warning([this file was generated for autoconf 2.72.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
#
-# Copyright (C) 1999-2008, 2011-2019, 2021-2022 Free Software
+# Copyright (C) 1999-2008, 2011-2019, 2021-2024 Free Software
# Foundation, Inc.
# Written by Thomas Tanner, 1999
#
@@ -30,7 +30,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
-# serial 21 LTDL_INIT
+# serial 24 LTDL_INIT
# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
# ------------------------------------------
@@ -457,7 +457,8 @@ esac
m4_ifdef([AM_CONDITIONAL],
[AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}")
- AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")])
+ AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")
+ AM_CONDITIONAL(LTARGZH_EXISTS, test -n "$LT_ARGZ_H")])
])# _LT_ENABLE_INSTALL
@@ -488,9 +489,6 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
;;
esac
;;
- bitrig*)
- lt_cv_sys_dlopen_deplibs=yes
- ;;
darwin*)
# Assuming the user has installed a libdl from somewhere, this is true
# If you are looking for one http://www.opendarwin.org/projects/dlcompat
@@ -519,6 +517,9 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
# at 6.2 and later dlopen does load deplibs.
lt_cv_sys_dlopen_deplibs=yes
;;
+ *-mlibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
netbsd* | netbsdelf*-gnu)
lt_cv_sys_dlopen_deplibs=yes
;;
@@ -735,7 +736,7 @@ darwin[[1567]].*)
beos*)
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | windows* | pw32*)
AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
;;
@@ -783,7 +784,7 @@ AC_CACHE_CHECK([for _ prefix in compiled symbols],
[lt_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<_LT_EOF
void nm_test_func(){}
-int main(){nm_test_func;return 0;}
+int main(void){nm_test_func;return 0;}
_LT_EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
@@ -887,7 +888,7 @@ _LT_EOF
# define RTLD_NOW 0
# endif
#endif
-int main () {
+int main (void) {
void *handle = dlopen ("`pwd`/$libname$libltdl_cv_shlibext", RTLD_GLOBAL|RTLD_NOW);
int status = $libltdl_dlunknown;
if (handle) {
@@ -931,7 +932,7 @@ AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
-# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -943,10 +944,10 @@ dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.16'
+[am__api_version='1.18'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.5], [],
+m4_if([$1], [1.18.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -962,14 +963,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.5])dnl
+[AM_AUTOMAKE_VERSION([1.18.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Figure out how to run the assembler. -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -989,7 +990,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1041,7 +1042,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1072,7 +1073,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1204,7 +1205,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -1263,7 +1264,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1331,7 +1332,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1431,8 +1432,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
+ [_AM_PROG_TAR([ustar])])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES([CC])],
@@ -1465,7 +1467,7 @@ if test -z "$CSCOPE"; then
fi
AC_SUBST([CSCOPE])
-AC_REQUIRE([AM_SILENT_RULES])dnl
+AC_REQUIRE([_AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
@@ -1473,47 +1475,9 @@ AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
-
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
+AC_REQUIRE([_AM_PROG_RM_F])
+AC_REQUIRE([_AM_PROG_XARGS_N])
-END
- AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
- fi
-fi
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
@@ -1546,7 +1510,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1567,7 +1531,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+# Copyright (C) 2003-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1589,7 +1553,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1624,7 +1588,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1667,7 +1631,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+# Copyright (C) 1997-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1701,7 +1665,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1730,7 +1694,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1762,7 +1726,10 @@ AC_CACHE_CHECK(
break
fi
done
- rm -f core conftest*
+ # aligned with autoconf, so not including core; see bug#72225.
+ rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
+ conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
+ conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
@@ -1777,7 +1744,23 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_RM_F
+# ---------------
+# Check whether 'rm -f' without any arguments works.
+# https://bugs.gnu.org/10828
+AC_DEFUN([_AM_PROG_RM_F],
+[am__rm_f_notfound=
+AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
+AC_SUBST(am__rm_f_notfound)
+])
+
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1796,26 +1779,181 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# _AM_SLEEP_FRACTIONAL_SECONDS
+# ----------------------------
+AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
+AC_CACHE_CHECK([whether sleep supports fractional seconds],
+ am_cv_sleep_fractional_seconds, [dnl
+AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
+ [am_cv_sleep_fractional_seconds=no])
+])])
+
+# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
+# -----------------------------------
+# Determine the filesystem's resolution for file modification
+# timestamps. The coarsest we know of is FAT, with a resolution
+# of only two seconds, even with the most recent "exFAT" extensions.
+# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
+# nanosecond, matching clock_gettime. However, it is probably not
+# possible to delay execution of a shell script for less than one
+# millisecond, due to process creation overhead and scheduling
+# granularity, so we don't check for anything finer than that. (See below.)
+AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
+AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
+AC_CACHE_CHECK([filesystem timestamp resolution],
+ am_cv_filesystem_timestamp_resolution, [dnl
+# Default to the worst case.
+am_cv_filesystem_timestamp_resolution=2
+
+# Only try to go finer than 1 sec if sleep can do it.
+# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
+# - 1 sec is not much of a win compared to 2 sec, and
+# - it takes 2 seconds to perform the test whether 1 sec works.
+#
+# Instead, just use the default 2s on platforms that have 1s resolution,
+# accept the extra 1s delay when using $sleep in the Automake tests, in
+# exchange for not incurring the 2s delay for running the test for all
+# packages.
+#
+am_try_resolutions=
+if test "$am_cv_sleep_fractional_seconds" = yes; then
+ # Even a millisecond often causes a bunch of false positives,
+ # so just try a hundredth of a second. The time saved between .001 and
+ # .01 is not terribly consequential.
+ am_try_resolutions="0.01 0.1 $am_try_resolutions"
+fi
+
+# In order to catch current-generation FAT out, we must *modify* files
+# that already exist; the *creation* timestamp is finer. Use names
+# that make ls -t sort them differently when they have equal
+# timestamps than when they have distinct timestamps, keeping
+# in mind that ls -t prints the *newest* file first.
+rm -f conftest.ts?
+: > conftest.ts1
+: > conftest.ts2
+: > conftest.ts3
+
+# Make sure ls -t actually works. Do 'set' in a subshell so we don't
+# clobber the current shell's arguments. (Outer-level square brackets
+# are removed by m4; they're present so that m4 does not expand
+# <dollar><star>; be careful, easy to get confused.)
+if (
+ set X `[ls -t conftest.ts[12]]` &&
+ {
+ test "$[]*" != "X conftest.ts1 conftest.ts2" ||
+ test "$[]*" != "X conftest.ts2 conftest.ts1";
+ }
+); then :; else
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ _AS_ECHO_UNQUOTED(
+ ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
+ [AS_MESSAGE_LOG_FD])
+ AC_MSG_FAILURE([ls -t produces unexpected output.
+Make sure there is not a broken ls alias in your environment.])
+fi
+
+for am_try_res in $am_try_resolutions; do
+ # Any one fine-grained sleep might happen to cross the boundary
+ # between two values of a coarser actual resolution, but if we do
+ # two fine-grained sleeps in a row, at least one of them will fall
+ # entirely within a coarse interval.
+ echo alpha > conftest.ts1
+ sleep $am_try_res
+ echo beta > conftest.ts2
+ sleep $am_try_res
+ echo gamma > conftest.ts3
+
+ # We assume that 'ls -t' will make use of high-resolution
+ # timestamps if the operating system supports them at all.
+ if (set X `ls -t conftest.ts?` &&
+ test "$[]2" = conftest.ts3 &&
+ test "$[]3" = conftest.ts2 &&
+ test "$[]4" = conftest.ts1); then
+ #
+ # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
+ # because we don't need to test make.
+ make_ok=true
+ if test $am_try_res != 1; then
+ # But if we've succeeded so far with a subsecond resolution, we
+ # have one more thing to check: make. It can happen that
+ # everything else supports the subsecond mtimes, but make doesn't;
+ # notably on macOS, which ships make 3.81 from 2006 (the last one
+ # released under GPLv2). https://bugs.gnu.org/68808
+ #
+ # We test $MAKE if it is defined in the environment, else "make".
+ # It might get overridden later, but our hope is that in practice
+ # it does not matter: it is the system "make" which is (by far)
+ # the most likely to be broken, whereas if the user overrides it,
+ # probably they did so with a better, or at least not worse, make.
+ # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
+ #
+ # Create a Makefile (real tab character here):
+ rm -f conftest.mk
+ echo 'conftest.ts1: conftest.ts2' >conftest.mk
+ echo ' touch conftest.ts2' >>conftest.mk
+ #
+ # Now, running
+ # touch conftest.ts1; touch conftest.ts2; make
+ # should touch ts1 because ts2 is newer. This could happen by luck,
+ # but most often, it will fail if make's support is insufficient. So
+ # test for several consecutive successes.
+ #
+ # (We reuse conftest.ts[12] because we still want to modify existing
+ # files, not create new ones, per above.)
+ n=0
+ make=${MAKE-make}
+ until test $n -eq 3; do
+ echo one > conftest.ts1
+ sleep $am_try_res
+ echo two > conftest.ts2 # ts2 should now be newer than ts1
+ if $make -f conftest.mk | grep 'up to date' >/dev/null; then
+ make_ok=false
+ break # out of $n loop
+ fi
+ n=`expr $n + 1`
+ done
+ fi
+ #
+ if $make_ok; then
+ # Everything we know to check worked out, so call this resolution good.
+ am_cv_filesystem_timestamp_resolution=$am_try_res
+ break # out of $am_try_res loop
+ fi
+ # Otherwise, we'll go on to check the next resolution.
+ fi
+done
+rm -f conftest.ts?
+# (end _am_filesystem_timestamp_resolution)
+])])
+
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
+[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
+# This check should not be cached, as it may vary across builds of
+# different projects.
+AC_MSG_CHECKING([whether build environment is sane])
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_RESULT([no])
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_RESULT([no])
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
@@ -1824,49 +1962,40 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
- alias in your environment])
- fi
- if test "$[2]" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
+am_build_env_is_sane=no
+am_has_slept=no
+rm -f conftest.file
+for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ test "$[]2" = conftest.file
+ ); then
+ am_build_env_is_sane=yes
+ break
+ fi
+ # Just in case.
+ sleep "$am_cv_filesystem_timestamp_resolution"
+ am_has_slept=yes
+done
+
+AC_MSG_RESULT([$am_build_env_is_sane])
+if test "$am_build_env_is_sane" = no; then
+ AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT([yes])
+
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
+AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
+ ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
-fi
+])
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
@@ -1877,18 +2006,18 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# ("yes" being less verbose, "no" or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules], [dnl
+# _AM_SILENT_RULES
+# ----------------
+# Enable less verbose build rules support.
+AC_DEFUN([_AM_SILENT_RULES],
+[AM_DEFAULT_VERBOSITY=1
+AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
[less verbose build output (undo: "make V=1")])
@@ -1896,11 +2025,6 @@ AS_HELP_STRING(
[--disable-silent-rules],
[verbose build output (undo: "make V=0")])dnl
])
-case $enable_silent_rules in @%:@ (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
dnl
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
@@ -1919,14 +2043,6 @@ am__doit:
else
am_cv_make_support_nested_variables=no
fi])
-if test $am_cv_make_support_nested_variables = yes; then
- dnl Using '$V' instead of '$(V)' breaks IRIX make.
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
@@ -1935,9 +2051,37 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
+dnl to AM_SILENT_RULES to change the default value.
+AC_CONFIG_COMMANDS_PRE([dnl
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+])dnl
])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
+# empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_REQUIRE([_AM_SILENT_RULES])
+AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline
+dnl We intentionally force a newline after the assignment, since a) nothing
+dnl good can come of more text following, and b) that was the behavior
+dnl before 1.17. See https://bugs.gnu.org/72267.
+])
+
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1965,7 +2109,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+# Copyright (C) 2006-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1984,7 +2128,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -2030,15 +2174,19 @@ m4_if([$1], [v7],
am_uid=`id -u || echo unknown`
am_gid=`id -g || echo unknown`
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
- if test $am_uid -le $am_max_uid; then
- AC_MSG_RESULT([yes])
+ if test x$am_uid = xunknown; then
+ AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
+ elif test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no])
- _am_tools=none
+ AC_MSG_RESULT([no])
+ _am_tools=none
fi
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
- if test $am_gid -le $am_max_gid; then
- AC_MSG_RESULT([yes])
+ if test x$gm_gid = xunknown; then
+ AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
+ elif test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
@@ -2115,6 +2263,26 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_XARGS_N
+# ----------------
+# Check whether 'xargs -n' works. It should work everywhere, so the fallback
+# is not optimized at all as we never expect to use it.
+AC_DEFUN([_AM_PROG_XARGS_N],
+[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
+AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
+3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
+AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
+ am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
+])dnl
+AC_SUBST(am__xargs_n)
+])
+
m4_include([m4/asmcfi.m4])
m4_include([m4/ax_cc_maxopt.m4])
m4_include([m4/ax_cflags_warn_all.m4])
diff --git a/deps/libffi/compile b/deps/libffi/compile
index df363c8fbfb..02ff093c33c 100755
--- a/deps/libffi/compile
+++ b/deps/libffi/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -37,11 +37,11 @@ IFS=" "" $nl"
file_conv=
-# func_file_conv build_file lazy
+# func_file_conv build_file unneeded_conversions
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
-# type is listed in (the comma separated) LAZY, no conversion will
-# take place.
+# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
+# conversion will take place.
func_file_conv ()
{
file=$1
@@ -51,9 +51,20 @@ func_file_conv ()
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
- file_conv=mingw
+ if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
+ # MSYS2 environment.
+ file_conv=cygwin
+ else
+ # Original MinGW environment.
+ file_conv=mingw
+ fi
;;
- CYGWIN* | MSYS*)
+ MSYS*)
+ # Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
+ file_conv=cygwin
+ ;;
+ CYGWIN*)
+ # Cygwin environment.
file_conv=cygwin
;;
*)
@@ -63,12 +74,14 @@ func_file_conv ()
fi
case $file_conv/,$2, in
*,$file_conv,*)
+ # This is the optimization mentioned above:
+ # If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/* | msys/*)
- file=`cygpath -m "$file" || echo "$file"`
+ cygwin/*)
+ file=`cygpath -w "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
@@ -143,7 +156,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
- *.o | *.[oO][bB][jJ])
+ *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
@@ -248,14 +261,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "compile $scriptversion"
+ echo "compile (GNU Automake) $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
@@ -340,9 +356,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/deps/libffi/config.guess b/deps/libffi/config.guess
index 7f76b6228f7..48a684601bd 100755
--- a/deps/libffi/config.guess
+++ b/deps/libffi/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2022 Free Software Foundation, Inc.
+# Copyright 1992-2024 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
-timestamp='2022-01-09'
+timestamp='2024-07-27'
# 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
@@ -47,7 +47,7 @@ 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 +60,13 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2022 Free Software Foundation, Inc.
+Copyright 1992-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."
help="
-Try \`$me --help' for more information."
+Try '$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
# 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.
@@ -123,7 +123,7 @@ 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 c89 c99 ; do
+ for driver in cc gcc c17 c99 c89 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD=$driver
break
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
set_cc_for_build
cat <<-EOF > "$dummy.c"
+ #if defined(__ANDROID__)
+ LIBC=android
+ #else
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
LIBC=dietlibc
#elif defined(__GLIBC__)
LIBC=gnu
+ #elif defined(__LLVM_LIBC__)
+ LIBC=llvm
#else
#include <stdarg.h>
/* First heuristic to detect musl libc. */
@@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
LIBC=musl
#endif
#endif
+ #endif
EOF
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
eval "$cc_set_libc"
@@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
UNAME_RELEASE=`uname -v`
;;
esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
+ # 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
;;
@@ -628,7 +634,8 @@ EOF
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
- main()
+ int
+ main ()
{
if (!__power_pc())
exit(1);
@@ -712,7 +719,8 @@ EOF
#include <stdlib.h>
#include <unistd.h>
- int main ()
+ int
+ main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
@@ -904,7 +912,7 @@ EOF
fi
;;
*:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ UNAME_PROCESSOR=`uname -p`
case $UNAME_PROCESSOR in
amd64)
UNAME_PROCESSOR=x86_64 ;;
@@ -966,11 +974,37 @@ EOF
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"
+ ;;
*:Minix:*:*)
GUESS=$UNAME_MACHINE-unknown-minix
;;
aarch64:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ 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
;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
@@ -1036,7 +1070,16 @@ EOF
k1om:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
- loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ 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
;;
m32r*:Linux:*:*)
@@ -1151,16 +1194,27 @@ EOF
;;
x86_64:Linux:*:*)
set_cc_for_build
+ CPU=$UNAME_MACHINE
LIBCABI=$LIBC
if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_X32 >/dev/null
- then
- LIBCABI=${LIBC}x32
- fi
+ 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=$UNAME_MACHINE-pc-linux-$LIBCABI
+ GUESS=$CPU-pc-linux-$LIBCABI
;;
xtensa*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
@@ -1180,7 +1234,7 @@ EOF
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
;;
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
;;
@@ -1321,7 +1375,7 @@ EOF
GUESS=ns32k-sni-sysv
fi
;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
GUESS=i586-unisys-sysv4
;;
@@ -1367,8 +1421,11 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
GUESS=i586-pc-haiku
;;
- x86_64:Haiku:*:*)
- GUESS=x86_64-unknown-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
;;
SX-4:SUPER-UX:*:*)
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1540,6 +1597,9 @@ EOF
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
;;
+ *:Ironclad:*:*)
+ GUESS=$UNAME_MACHINE-unknown-ironclad
+ ;;
esac
# Do we have a guess based on uname results?
@@ -1563,6 +1623,7 @@ cat > "$dummy.c" <<EOF
#endif
#endif
#endif
+int
main ()
{
#if defined (sony)
diff --git a/deps/libffi/config.sub b/deps/libffi/config.sub
index dba16e84c77..4aaae46f6f7 100755
--- a/deps/libffi/config.sub
+++ b/deps/libffi/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2022 Free Software Foundation, Inc.
+# Copyright 1992-2024 Free Software Foundation, Inc.
-# shellcheck disable=SC2006,SC2268 # see below for rationale
+# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
-timestamp='2022-01-03'
+timestamp='2024-05-27'
# 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
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2022 Free Software Foundation, Inc.
+Copyright 1992-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."
help="
-Try \`$me --help' for more information."
+Try '$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
@@ -120,7 +120,6 @@ case $# in
esac
# Split fields of configuration type
-# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read field1 field2 field3 field4 <<EOF
$1
@@ -130,7 +129,7 @@ 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
;;
*-*-*-*)
@@ -142,10 +141,21 @@ case $1 in
# parts
maybe_os=$field2-$field3
case $maybe_os in
- nto-qnx* | linux-* | uclinux-uclibc* \
- | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
- | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
- | storm-chaos* | os2-emx* | rtmk-nova*)
+ 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-* )
basic_machine=$field1
basic_os=$maybe_os
;;
@@ -160,8 +170,12 @@ case $1 in
esac
;;
*-*)
- # A lone config we happen to match not fitting any pattern
case $field1-$field2 in
+ # Shorthands that happen to contain a single dash
+ convex-c[12] | convex-c3[248])
+ basic_machine=$field2-convex
+ basic_os=
+ ;;
decstation-3100)
basic_machine=mips-dec
basic_os=
@@ -169,28 +183,88 @@ case $1 in
*-*)
# Second component is usually, but not always the OS
case $field2 in
- # Prevent following clause from handling this valid os
+ # Do not treat sunos as a manufacturer
sun*os*)
basic_machine=$field1
basic_os=$field2
;;
- zephyr*)
- basic_machine=$field1-unknown
- basic_os=$field2
- ;;
# Manufacturers
- dec* | mips* | sequent* | encore* | pc533* | 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)
+ 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
@@ -271,26 +345,6 @@ case $1 in
basic_machine=arm-unknown
basic_os=cegcc
;;
- convex-c1)
- basic_machine=c1-convex
- basic_os=bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- basic_os=bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- basic_os=bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- basic_os=bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- basic_os=bsd
- ;;
cray)
basic_machine=j90-cray
basic_os=unicos
@@ -713,15 +767,26 @@ case $basic_machine in
vendor=dec
basic_os=tops20
;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
+ delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300)
cpu=m68k
vendor=motorola
;;
- dpx2*)
+ # 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
- basic_os=sysv3
+ ;;
+ dpx2100 | dpx21xx)
+ cpu=i386
+ vendor=bull
+ ;;
+ dpx20)
+ cpu=rs6000
+ vendor=bull
;;
encore | umax | mmax)
cpu=ns32k
@@ -836,18 +901,6 @@ case $basic_machine in
next | m*-next)
cpu=m68k
vendor=next
- case $basic_os in
- openstep*)
- ;;
- nextstep*)
- ;;
- ns2*)
- basic_os=nextstep2
- ;;
- *)
- basic_os=nextstep3
- ;;
- esac
;;
np1)
cpu=np1
@@ -936,14 +989,13 @@ case $basic_machine in
;;
*-*)
- # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read cpu vendor <<EOF
$basic_machine
EOF
IFS=$saved_IFS
;;
- # We use `pc' rather than `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)
@@ -971,15 +1023,19 @@ 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.
+ # 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}
+ ;;
craynv-unknown)
vendor=cray
basic_os=${basic_os:-unicosmp}
;;
c90-unknown | c90-cray)
vendor=cray
- basic_os=${Basic_os:-unicos}
+ basic_os=${basic_os:-unicos}
;;
fx80-unknown)
vendor=alliant
@@ -1025,11 +1081,29 @@ case $cpu-$vendor in
vendor=alt
basic_os=${basic_os:-linux-gnueabihf}
;;
- dpx20-unknown | dpx20-bull)
- cpu=rs6000
- vendor=bull
+
+ # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified
+ m68k-isi)
+ basic_os=${basic_os:-sysv}
+ ;;
+ m68k-sony)
+ basic_os=${basic_os:-newsos}
+ ;;
+ m68k-tektronix)
+ basic_os=${basic_os:-bsd}
+ ;;
+ m88k-harris)
+ basic_os=${basic_os:-sysv3}
+ ;;
+ i386-bull | m68k-bull)
+ basic_os=${basic_os:-sysv3}
+ ;;
+ rs6000-bull)
basic_os=${basic_os:-bosx}
;;
+ mips-sni)
+ basic_os=${basic_os:-sysv4}
+ ;;
# Here we normalize CPU types irrespective of the vendor
amd64-*)
@@ -1037,7 +1111,7 @@ case $cpu-$vendor in
;;
blackfin-*)
cpu=bfin
- basic_os=linux
+ basic_os=${basic_os:-linux}
;;
c54x-*)
cpu=tic54x
@@ -1060,7 +1134,7 @@ case $cpu-$vendor in
;;
m68knommu-*)
cpu=m68k
- basic_os=linux
+ basic_os=${basic_os:-linux}
;;
m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
cpu=s12z
@@ -1070,12 +1144,12 @@ case $cpu-$vendor in
;;
parisc-*)
cpu=hppa
- basic_os=linux
+ basic_os=${basic_os:-linux}
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
cpu=i586
;;
- pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
cpu=i686
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1084,9 +1158,6 @@ case $cpu-$vendor in
pentium4-*)
cpu=i786
;;
- pc98-*)
- cpu=i386
- ;;
ppc-* | ppcbe-*)
cpu=powerpc
;;
@@ -1120,9 +1191,6 @@ case $cpu-$vendor in
tx39el-*)
cpu=mipstx39el
;;
- x64-*)
- cpu=x86_64
- ;;
xscale-* | xscalee[bl]-*)
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
@@ -1178,114 +1246,231 @@ case $cpu-$vendor in
# Recognize the canonical CPU types that are allowed with any
# company name.
case $cpu in
- 1750a | 580 \
+ 1750a \
+ | 580 \
+ | [cjt]90 \
| a29k \
- | aarch64 | aarch64_be \
+ | aarch64 \
+ | aarch64_be \
+ | aarch64c \
| abacus \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
- | alphapca5[67] | alpha64pca5[67] \
+ | alpha \
+ | alpha64 \
+ | alpha64ev56 \
+ | alpha64ev6[78] \
+ | alpha64ev[4-8] \
+ | alpha64pca5[67] \
+ | alphaev56 \
+ | alphaev6[78] \
+ | alphaev[4-8] \
+ | alphapca5[67] \
| am33_2.0 \
| amdgcn \
- | arc | arceb | arc32 | arc64 \
- | arm | arm[lb]e | arme[lb] | armv* \
- | avr | avr32 \
+ | arc \
+ | arc32 \
+ | arc64 \
+ | arceb \
+ | arm \
+ | arm64e \
+ | arm64ec \
+ | arm[lb]e \
+ | arme[lb] \
+ | armv* \
| asmjs \
+ | avr \
+ | avr32 \
| ba \
- | be32 | be64 \
- | bfin | bpf | bs2000 \
- | c[123]* | c30 | [cjt]90 | c4x \
- | c8051 | clipper | craynv | csky | cydra \
- | d10v | d30v | dlx | dsp16xx \
- | e2k | elxsi | epiphany \
- | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
- | h8300 | h8500 \
- | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | 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 \
- | i370 | i*86 | i860 | i960 | ia16 | ia64 \
- | ip2k | iq2000 \
+ | hppa \
+ | hppa1.[01] \
+ | hppa2.0 \
+ | hppa2.0[nw] \
+ | hppa64 \
+ | i*86 \
+ | i370 \
+ | i860 \
+ | i960 \
+ | ia16 \
+ | ia64 \
+ | ip2k \
+ | iq2000 \
+ | javascript \
| k1om \
- | le32 | le64 \
+ | kvx \
+ | le32 \
+ | le64 \
| lm32 \
- | loongarch32 | loongarch64 | loongarchx32 \
- | m32c | m32r | m32rle \
- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
- | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
- | m88110 | m88k | maxq | mb | mcore | mep | metag \
- | microblaze | microblazeel \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64eb | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa32r3 | mipsisa32r3el \
- | mipsisa32r5 | mipsisa32r5el \
- | mipsisa32r6 | mipsisa32r6el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64r3 | mipsisa64r3el \
- | mipsisa64r5 | mipsisa64r5el \
- | mipsisa64r6 | mipsisa64r6el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
+ | 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 \
+ | mn10200 \
+ | mn10300 \
| moxie \
- | mt \
| msp430 \
- | nds32 | nds32le | nds32be \
+ | mt \
+ | nanomips* \
+ | nds32 \
+ | nds32be \
+ | nds32le \
| nfp \
- | nios | nios2 | nios2eb | nios2el \
- | none | np1 | ns16k | ns32k | nvptx \
+ | nios \
+ | nios2 \
+ | nios2eb \
+ | nios2el \
+ | none \
+ | np1 \
+ | ns16k \
+ | ns32k \
+ | nvptx \
| open8 \
| or1k* \
| or32 \
| orion \
+ | pdp10 \
+ | pdp11 \
| picochip \
- | pdp10 | pdp11 | pj | pjl | pn | power \
- | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pj \
+ | pjl \
+ | pn \
+ | power \
+ | powerpc \
+ | powerpc64 \
+ | powerpc64le \
+ | powerpcle \
+ | powerpcspe \
| pru \
| pyramid \
- | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
- | rl78 | romp | rs6000 | rx \
- | s390 | s390x \
+ | riscv \
+ | riscv32 \
+ | riscv32be \
+ | riscv64 \
+ | riscv64be \
+ | rl78 \
+ | romp \
+ | rs6000 \
+ | rx \
+ | s390 \
+ | s390x \
| score \
- | sh | shl \
- | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
- | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | 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 | sv1 | sx* \
+ | sparcv8 \
+ | sparcv9 \
+ | sparcv9b \
+ | sparcv9v \
| spu \
+ | sv1 \
+ | sx* \
| tahoe \
| thumbv7* \
- | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tic30 \
+ | tic4x \
+ | tic54x \
+ | tic55x \
+ | tic6x \
+ | tic80 \
| tron \
| ubicom32 \
- | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | v70 \
+ | v810 \
+ | v850 \
+ | v850e \
+ | v850e1 \
+ | v850e2 \
+ | v850e2v3 \
+ | v850es \
| vax \
+ | vc4 \
| visium \
| w65 \
- | wasm32 | wasm64 \
+ | wasm32 \
+ | wasm64 \
| we32k \
- | x86 | x86_64 | xc16x | xgate | xps100 \
- | xstormy16 | xtensa* \
+ | x86 \
+ | x86_64 \
+ | xc16x \
+ | xgate \
+ | xps100 \
+ | xstormy16 \
+ | xtensa* \
| ymp \
- | z8k | z80)
+ | z80 \
+ | z8k)
;;
*)
- echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
exit 1
;;
esac
@@ -1306,11 +1491,12 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if test x$basic_os != x
+if test x"$basic_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
@@ -1325,7 +1511,6 @@ case $basic_os in
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
;;
*-*)
- # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read kernel os <<EOF
$basic_os
@@ -1341,6 +1526,10 @@ EOF
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
@@ -1368,6 +1557,23 @@ 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
+ ;;
# es1800 is here to avoid being matched by es* (a different OS)
es1800*)
os=ose
@@ -1438,6 +1644,7 @@ case $os in
;;
utek*)
os=bsd
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
;;
dynix*)
os=bsd
@@ -1454,21 +1661,25 @@ case $os in
386bsd)
os=bsd
;;
- ctix* | uts*)
+ ctix*)
os=sysv
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
;;
- nova*)
- os=rtmk-nova
+ uts*)
+ os=sysv
;;
- ns2)
- os=nextstep2
+ nova*)
+ kernel=rtmk
+ os=nova
;;
# Preserve the version number of sinix5.
sinix5.*)
os=`echo "$os" | sed -e 's|sinix|sysv|'`
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
;;
sinix*)
os=sysv4
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
;;
tpf*)
os=tpf
@@ -1506,10 +1717,16 @@ case $os in
os=eabi
;;
*)
- os=elf
+ os=
+ obj=elf
;;
esac
;;
+ aout* | coff* | elf* | pe*)
+ # These are machine code file formats, not OSes
+ obj=$os
+ os=
+ ;;
*)
# No normalization, but not necessarily accepted, that comes below.
;;
@@ -1528,12 +1745,15 @@ else
# system, and we'll never get to this point.
kernel=
+obj=
case $cpu-$vendor in
score-*)
- os=elf
+ os=
+ obj=elf
;;
spu-*)
- os=elf
+ os=
+ obj=elf
;;
*-acorn)
os=riscix1.2
@@ -1543,28 +1763,35 @@ case $cpu-$vendor in
os=gnu
;;
arm*-semi)
- os=aout
+ os=
+ obj=aout
;;
c4x-* | tic4x-*)
- os=coff
+ os=
+ obj=coff
;;
c8051-*)
- os=elf
+ os=
+ obj=elf
;;
clipper-intergraph)
os=clix
;;
hexagon-*)
- os=elf
+ os=
+ obj=elf
;;
tic54x-*)
- os=coff
+ os=
+ obj=coff
;;
tic55x-*)
- os=coff
+ os=
+ obj=coff
;;
tic6x-*)
- os=coff
+ os=
+ obj=coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1586,28 +1813,43 @@ case $cpu-$vendor in
os=sunos3
;;
m68*-cisco)
- os=aout
+ os=
+ obj=aout
;;
mep-*)
- os=elf
+ 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
;;
mips*-cisco)
- os=elf
+ os=
+ obj=elf
;;
- mips*-*)
- os=elf
+ mips*-*|nanomips*-*)
+ os=
+ obj=elf
;;
or32-*)
- os=coff
+ os=
+ obj=coff
;;
- *-tti) # must be before sparc entry or we get the wrong os.
+ # This must be before the sparc-* entry or we get the wrong os.
+ *-tti)
os=sysv3
;;
sparc-* | *-sun)
os=sunos4.1.1
;;
pru-*)
- os=elf
+ os=
+ obj=elf
;;
*-be)
os=beos
@@ -1631,7 +1873,7 @@ case $cpu-$vendor in
os=hpux
;;
*-hitachi)
- os=hiux
+ os=hiuxwe2
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=sysv
@@ -1675,12 +1917,6 @@ case $cpu-$vendor in
*-encore)
os=bsd
;;
- *-sgi)
- os=irix
- ;;
- *-siemens)
- os=sysv4
- ;;
*-masscomp)
os=rtu
;;
@@ -1688,10 +1924,12 @@ case $cpu-$vendor in
os=uxpv
;;
*-rom68k)
- os=coff
+ os=
+ obj=coff
;;
*-*bug)
- os=coff
+ os=
+ obj=coff
;;
*-apple)
os=macos
@@ -1709,10 +1947,11 @@ esac
fi
-# Now, validate our (potentially fixed-up) OS.
+# 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.
- musl* | newlib* | relibc* | uclibc*)
+ llvm* | musl* | newlib* | relibc* | uclibc*)
;;
# Likewise for "kernel-abi"
eabi* | gnueabi*)
@@ -1720,83 +1959,308 @@ case $os in
# 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.
- # The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
- | hiux* | abug | nacl* | netware* | windows* \
- | os9* | macos* | osx* | ios* \
- | mpw* | magic* | mmixware* | mon960* | lnews* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
- | aos* | aros* | cloudabi* | sortix* | twizzler* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
- | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
- | mirbsd* | netbsd* | dicos* | openedition* | ose* \
- | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
- | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
- | udi* | lites* | ieee* | go32* | aux* | hcos* \
- | chorusrdb* | cegcc* | glidix* | serenity* \
- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
- | midipix* | mingw32* | mingw64* | mint* \
- | 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* \
- | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
- | fiwix* )
+ 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"\': OS \`"$os"\' not recognized 1>&2
+ 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 in
- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
- | linux-musl* | linux-relibc* | linux-uclibc* )
+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*- )
;;
- uclinux-uclibc* )
+ windows*-msvc*-)
;;
- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+ -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
+ echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
exit 1
;;
- kfreebsd*-gnu* | kopensolaris*-gnu*)
+ -kernel*- )
+ echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
+ exit 1
;;
- vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ *-kernel*- )
+ echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
+ exit 1
;;
- nto-qnx*)
+ *-msvc*- )
+ echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
+ exit 1
;;
- os2-emx)
+ kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-)
+ ;;
+ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
+ ;;
+ nto-qnx*-)
;;
- *-eabi* | *-gnueabi*)
+ 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.
;;
- *-*)
- echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ --*)
+ # 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
@@ -1809,7 +2273,7 @@ case $vendor in
*-riscix*)
vendor=acorn
;;
- *-sunos*)
+ *-sunos* | *-solaris*)
vendor=sun
;;
*-cnk* | *-aix*)
@@ -1879,7 +2343,7 @@ case $vendor in
;;
esac
-echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
exit
# Local variables:
diff --git a/deps/libffi/configure b/deps/libffi/configure
index 7b8a4cb375d..321c6400860 100755
--- a/deps/libffi/configure
+++ b/deps/libffi/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for libffi 3.8.0.
+# Generated by GNU Autoconf 2.72 for libffi 3.8.1.
#
# Report bugs to <http://github.com/libffi/libffi/issues>.
#
#
-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
# Inc.
#
#
@@ -17,7 +17,6 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
@@ -26,12 +25,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else $as_nop
- case `(set -o) 2>/dev/null` in #(
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
@@ -103,7 +103,7 @@ IFS=$as_save_IFS
;;
esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
@@ -133,15 +133,14 @@ case $- in # ((((
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="as_nop=:
-if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+ as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
NULLCMD=:
@@ -149,12 +148,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else \$as_nop
- case \`(set -o) 2>/dev/null\` in #(
+else case e in #(
+ e) case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
"
@@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" )
then :
-else \$as_nop
- exitcode=1; echo positional parameters were not saved.
+else case e in #(
+ e) exitcode=1; echo positional parameters were not saved. ;;
+esac
fi
test x\$exitcode = x0 || exit 1
blah=\$(echo \$(echo blah))
@@ -195,14 +196,15 @@ test \$(( 1 + 1 )) = 2 || exit 1
if (eval "$as_required") 2>/dev/null
then :
as_have_required=yes
-else $as_nop
- as_have_required=no
+else case e in #(
+ e) as_have_required=no ;;
+esac
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
then :
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
@@ -235,12 +237,13 @@ IFS=$as_save_IFS
if $as_found
then :
-else $as_nop
- if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+else case e in #(
+ e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
CONFIG_SHELL=$SHELL as_have_required=yes
-fi
+fi ;;
+esac
fi
@@ -262,7 +265,7 @@ case $- in # ((((
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
@@ -282,7 +285,8 @@ $0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
fi
exit 1
-fi
+fi ;;
+esac
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -321,14 +325,6 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
- return $?
-}
-as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -397,11 +393,12 @@ then :
{
eval $1+=\$2
}'
-else $as_nop
- as_fn_append ()
+else case e in #(
+ e) as_fn_append ()
{
eval $1=\$$1\$2
- }
+ } ;;
+esac
fi # as_fn_append
# as_fn_arith ARG...
@@ -415,21 +412,14 @@ then :
{
as_val=$(( $* ))
}'
-else $as_nop
- as_fn_arith ()
+else case e in #(
+ e) as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
- }
+ } ;;
+esac
fi # as_fn_arith
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
- return $?
-}
-as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -503,6 +493,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
/[$]LINENO/=
' <$as_myself |
sed '
+ t clear
+ :clear
s/[$]LINENO.*/&-/
t lineno
b
@@ -551,7 +543,6 @@ esac
as_echo='printf %s\n'
as_echo_n='printf %s'
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -563,9 +554,9 @@ if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+ # In both cases, we have to default to 'cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -590,10 +581,12 @@ as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -621,8 +614,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libffi'
PACKAGE_TARNAME='libffi'
-PACKAGE_VERSION='3.8.0'
-PACKAGE_STRING='libffi 3.8.0'
+PACKAGE_VERSION='3.8.1'
+PACKAGE_STRING='libffi 3.8.1'
PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
PACKAGE_URL=''
@@ -748,6 +741,8 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
+am__xargs_n
+am__rm_f_notfound
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -841,8 +836,10 @@ enable_silent_rules
enable_dependency_tracking
enable_shared
enable_static
+enable_pic
with_pic
enable_fast_install
+enable_aix_soname
with_aix_soname
with_gnu_ld
with_sysroot
@@ -977,7 +974,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ as_fn_error $? "invalid feature name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1003,7 +1000,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ as_fn_error $? "invalid feature name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1216,7 +1213,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: \`$ac_useropt'"
+ as_fn_error $? "invalid package name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1232,7 +1229,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: \`$ac_useropt'"
+ as_fn_error $? "invalid package name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1262,8 +1259,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) as_fn_error $? "unrecognized option: '$ac_option'
+Try '$0 --help' for more information"
;;
*=*)
@@ -1271,7 +1268,7 @@ Try \`$0 --help' for more information"
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1321,7 +1318,7 @@ do
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
-# There might be people who depend on the old broken behavior: `$host'
+# There might be people who depend on the old broken behavior: '$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
@@ -1389,7 +1386,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
ac_abs_confdir=`(
cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
@@ -1417,7 +1414,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 libffi 3.8.0 to adapt to many kinds of systems.
+'configure' configures libffi 3.8.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1431,11 +1428,11 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print 'checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
+ -C, --config-cache alias for '--cache-file=config.cache'
-n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
+ --srcdir=DIR find the sources in DIR [configure dir or '..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -1443,10 +1440,10 @@ Installation directories:
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
+By default, 'make install' will install all the files in
+'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than '$ac_default_prefix' using '--prefix',
+for instance '--prefix=\$HOME'.
For better control, use the options below.
@@ -1489,7 +1486,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libffi 3.8.0:";;
+ short | recursive ) echo "Configuration of libffi 3.8.1:";;
esac
cat <<\_ACEOF
@@ -1507,8 +1504,13 @@ Optional Features:
speeds up one-time build
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
+ --enable-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
+ --enable-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-portable-binary
disable compiler optimizations that would produce
@@ -1531,11 +1533,6 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
- both]
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
@@ -1561,7 +1558,7 @@ Some influential environment variables:
Used only for the wasm64 target. Set to 1 (default) or 2 for
Emscripten's -sMEMORY64 mode
-Use these variables to override the choices made by `configure' or to help
+Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <http://github.com/libffi/libffi/issues>.
@@ -1628,10 +1625,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libffi configure 3.8.0
-generated by GNU Autoconf 2.71
+libffi configure 3.8.1
+generated by GNU Autoconf 2.72
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1670,11 +1667,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
} && test -s conftest.$ac_objext
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -1709,11 +1707,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
} && test -s conftest.$ac_objext
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -1751,11 +1750,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
@@ -1779,8 +1779,8 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
@@ -1788,10 +1788,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -1811,15 +1813,15 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below. */
+ which can conflict with char $2 (void); below. */
#include <limits.h>
#undef $2
@@ -1830,7 +1832,7 @@ else $as_nop
#ifdef __cplusplus
extern "C"
#endif
-char $2 ();
+char $2 (void);
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
@@ -1849,11 +1851,13 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -1889,11 +1893,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -1931,11 +1936,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
@@ -1977,12 +1983,13 @@ printf "%s\n" "$ac_try_echo"; } >&5
test $ac_status = 0; }; }
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=$ac_status
+ ac_retval=$ac_status ;;
+esac
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
@@ -2035,18 +2042,19 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_hi=$ac_mid; break
-else $as_nop
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+else case e in #(
+ e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
break
fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
@@ -2081,20 +2089,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_lo=$ac_mid; break
-else $as_nop
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+else case e in #(
+ e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
break
fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else $as_nop
- ac_lo= ac_hi=
+else case e in #(
+ e) ac_lo= ac_hi= ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
@@ -2117,8 +2128,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_hi=$ac_mid
-else $as_nop
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+else case e in #(
+ e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
@@ -2166,8 +2178,9 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else $as_nop
- ac_retval=1
+else case e in #(
+ e) ac_retval=1 ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -2191,8 +2204,8 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
@@ -2222,12 +2235,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- eval "$3=yes"
+else case e in #(
+ e) eval "$3=yes" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2259,8 +2274,8 @@ 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 libffi $as_me 3.8.0, which was
-generated by GNU Autoconf 2.71. Invocation command line was
+It was created by libffi $as_me 3.8.1, which was
+generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2506,10 +2521,10 @@ esac
printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
fi
done
@@ -2545,9 +2560,7 @@ struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
struct buf { int x; };
struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
+static char *e (char **p, int i)
{
return p[i];
}
@@ -2561,6 +2574,21 @@ static char *f (char * (*g) (char **, int), char **p, ...)
return s;
}
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting. Exercises some of the corner cases that
+ e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not \xHH hex character constants.
These do not provoke an error unfortunately, instead are silently treated
@@ -2588,16 +2616,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
# Test code for whether the C compiler supports C99 (global declarations)
ac_c_conftest_c99_globals='
-// Does the compiler advertise C99 conformance?
+/* Does the compiler advertise C99 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif
+// See if C++-style comments work.
+
#include <stdbool.h>
extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);
+extern void free (void *);
// Check varargs macros. These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare
@@ -2647,7 +2678,6 @@ typedef const char *ccp;
static inline int
test_restrict (ccp restrict text)
{
- // See if C++-style comments work.
// Iterate through items via the restricted pointer.
// Also check for declarations in for loops.
for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
@@ -2713,6 +2743,8 @@ ac_c_conftest_c99_main='
ia->datasize = 10;
for (int i = 0; i < ia->datasize; ++i)
ia->data[i] = i * 1.234;
+ // Work around memory leak warnings.
+ free (ia);
// Check named initializers.
struct named_init ni = {
@@ -2734,7 +2766,7 @@ ac_c_conftest_c99_main='
# Test code for whether the C compiler supports C11 (global declarations)
ac_c_conftest_c11_globals='
-// Does the compiler advertise C11 conformance?
+/* Does the compiler advertise C11 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
# error "Compiler does not advertise C11 conformance"
#endif
@@ -3142,8 +3174,9 @@ IFS=$as_save_IFS
if $as_found
then :
-else $as_nop
- as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+else case e in #(
+ e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
+esac
fi
@@ -3171,12 +3204,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -3185,18 +3218,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
@@ -3212,11 +3245,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
and start over" "$LINENO" 5
fi
## -------------------- ##
@@ -3233,10 +3266,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers fficonfig.h"
-FFI_VERSION_STRING="3.8.0"
-ffi_version_major=`echo "3.8.0" | cut -d. -f1`
-ffi_version_minor=`echo "3.8.0" | cut -d. -f2 | sed 's/[^0-9].*//'`
-ffi_version_micro=`echo "3.8.0" | cut -d. -f3 | sed 's/[^0-9].*//'`
+FFI_VERSION_STRING="3.8.1"
+ffi_version_major=`echo "3.8.1" | cut -d. -f1`
+ffi_version_minor=`echo "3.8.1" | cut -d. -f2 | sed 's/[^0-9].*//'`
+ffi_version_micro=`echo "3.8.1" | cut -d. -f3 | sed 's/[^0-9].*//'`
FFI_VERSION_NUMBER=`expr ${ffi_version_major:-0} \* 10000 + ${ffi_version_minor:-0} \* 100 + ${ffi_version_micro:-0}`
@@ -3253,15 +3286,16 @@ printf %s "checking build system type... " >&6; }
if test ${ac_cv_build+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_build_alias=$build_alias
+else case e in #(
+ e) ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
printf "%s\n" "$ac_cv_build" >&6; }
@@ -3288,14 +3322,15 @@ printf %s "checking host system type... " >&6; }
if test ${ac_cv_host+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "x$host_alias" = x; then
+else case e in #(
+ e) if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
printf "%s\n" "$ac_cv_host" >&6; }
@@ -3322,14 +3357,15 @@ printf %s "checking target system type... " >&6; }
if test ${ac_cv_target+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "x$target_alias" = x; then
+else case e in #(
+ e) if test "x$target_alias" = x; then
ac_cv_target=$ac_cv_host
else
ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
printf "%s\n" "$ac_cv_target" >&6; }
@@ -3384,8 +3420,9 @@ ax_enable_builddir="."
if test ${enable_builddir+y}
then :
enableval=$enable_builddir; ax_enable_builddir="$enableval"
-else $as_nop
- ax_enable_builddir="auto"
+else case e in #(
+ e) ax_enable_builddir="auto" ;;
+esac
fi
if test ".$ac_srcdir_defaulted" != ".no" ; then
@@ -3434,8 +3471,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ax_enable_builddir_sed+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ax_enable_builddir_sed in
+else case e in #(
+ e) case $ax_enable_builddir_sed in
[\\/]* | ?:[\\/]*)
ac_cv_path_ax_enable_builddir_sed="$ax_enable_builddir_sed" # Let the user override the test with a path.
;;
@@ -3461,6 +3498,7 @@ IFS=$as_save_IFS
test -z "$ac_cv_path_ax_enable_builddir_sed" && ac_cv_path_ax_enable_builddir_sed="sed"
;;
+esac ;;
esac
fi
ax_enable_builddir_sed=$ac_cv_path_ax_enable_builddir_sed
@@ -3477,7 +3515,7 @@ ax_enable_builddir_auxdir="$am_aux_dir"
ac_config_commands="$ac_config_commands buildir"
-am__api_version='1.16'
+am__api_version='1.18'
# Find a good install program. We prefer a C program (faster),
@@ -3500,8 +3538,8 @@ if test -z "$INSTALL"; then
if test ${ac_cv_path_install+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
@@ -3555,7 +3593,8 @@ esac
IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
-
+ ;;
+esac
fi
if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
@@ -3578,6 +3617,165 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5
+printf %s "checking whether sleep supports fractional seconds... " >&6; }
+if test ${am_cv_sleep_fractional_seconds+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if sleep 0.001 2>/dev/null
+then :
+ am_cv_sleep_fractional_seconds=yes
+else case e in #(
+ e) am_cv_sleep_fractional_seconds=no ;;
+esac
+fi
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5
+printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5
+printf %s "checking filesystem timestamp resolution... " >&6; }
+if test ${am_cv_filesystem_timestamp_resolution+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) # Default to the worst case.
+am_cv_filesystem_timestamp_resolution=2
+
+# Only try to go finer than 1 sec if sleep can do it.
+# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
+# - 1 sec is not much of a win compared to 2 sec, and
+# - it takes 2 seconds to perform the test whether 1 sec works.
+#
+# Instead, just use the default 2s on platforms that have 1s resolution,
+# accept the extra 1s delay when using $sleep in the Automake tests, in
+# exchange for not incurring the 2s delay for running the test for all
+# packages.
+#
+am_try_resolutions=
+if test "$am_cv_sleep_fractional_seconds" = yes; then
+ # Even a millisecond often causes a bunch of false positives,
+ # so just try a hundredth of a second. The time saved between .001 and
+ # .01 is not terribly consequential.
+ am_try_resolutions="0.01 0.1 $am_try_resolutions"
+fi
+
+# In order to catch current-generation FAT out, we must *modify* files
+# that already exist; the *creation* timestamp is finer. Use names
+# that make ls -t sort them differently when they have equal
+# timestamps than when they have distinct timestamps, keeping
+# in mind that ls -t prints the *newest* file first.
+rm -f conftest.ts?
+: > conftest.ts1
+: > conftest.ts2
+: > conftest.ts3
+
+# Make sure ls -t actually works. Do 'set' in a subshell so we don't
+# clobber the current shell's arguments. (Outer-level square brackets
+# are removed by m4; they're present so that m4 does not expand
+# <dollar><star>; be careful, easy to get confused.)
+if (
+ set X `ls -t conftest.ts[12]` &&
+ {
+ test "$*" != "X conftest.ts1 conftest.ts2" ||
+ test "$*" != "X conftest.ts2 conftest.ts1";
+ }
+); then :; else
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "ls -t produces unexpected output.
+Make sure there is not a broken ls alias in your environment.
+See 'config.log' for more details" "$LINENO" 5; }
+fi
+
+for am_try_res in $am_try_resolutions; do
+ # Any one fine-grained sleep might happen to cross the boundary
+ # between two values of a coarser actual resolution, but if we do
+ # two fine-grained sleeps in a row, at least one of them will fall
+ # entirely within a coarse interval.
+ echo alpha > conftest.ts1
+ sleep $am_try_res
+ echo beta > conftest.ts2
+ sleep $am_try_res
+ echo gamma > conftest.ts3
+
+ # We assume that 'ls -t' will make use of high-resolution
+ # timestamps if the operating system supports them at all.
+ if (set X `ls -t conftest.ts?` &&
+ test "$2" = conftest.ts3 &&
+ test "$3" = conftest.ts2 &&
+ test "$4" = conftest.ts1); then
+ #
+ # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
+ # because we don't need to test make.
+ make_ok=true
+ if test $am_try_res != 1; then
+ # But if we've succeeded so far with a subsecond resolution, we
+ # have one more thing to check: make. It can happen that
+ # everything else supports the subsecond mtimes, but make doesn't;
+ # notably on macOS, which ships make 3.81 from 2006 (the last one
+ # released under GPLv2). https://bugs.gnu.org/68808
+ #
+ # We test $MAKE if it is defined in the environment, else "make".
+ # It might get overridden later, but our hope is that in practice
+ # it does not matter: it is the system "make" which is (by far)
+ # the most likely to be broken, whereas if the user overrides it,
+ # probably they did so with a better, or at least not worse, make.
+ # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
+ #
+ # Create a Makefile (real tab character here):
+ rm -f conftest.mk
+ echo 'conftest.ts1: conftest.ts2' >conftest.mk
+ echo ' touch conftest.ts2' >>conftest.mk
+ #
+ # Now, running
+ # touch conftest.ts1; touch conftest.ts2; make
+ # should touch ts1 because ts2 is newer. This could happen by luck,
+ # but most often, it will fail if make's support is insufficient. So
+ # test for several consecutive successes.
+ #
+ # (We reuse conftest.ts[12] because we still want to modify existing
+ # files, not create new ones, per above.)
+ n=0
+ make=${MAKE-make}
+ until test $n -eq 3; do
+ echo one > conftest.ts1
+ sleep $am_try_res
+ echo two > conftest.ts2 # ts2 should now be newer than ts1
+ if $make -f conftest.mk | grep 'up to date' >/dev/null; then
+ make_ok=false
+ break # out of $n loop
+ fi
+ n=`expr $n + 1`
+ done
+ fi
+ #
+ if $make_ok; then
+ # Everything we know to check worked out, so call this resolution good.
+ am_cv_filesystem_timestamp_resolution=$am_try_res
+ break # out of $am_try_res loop
+ fi
+ # Otherwise, we'll go on to check the next resolution.
+ fi
+done
+rm -f conftest.ts?
+# (end _am_filesystem_timestamp_resolution)
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5
+printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; }
+
+# This check should not be cached, as it may vary across builds of
+# different projects.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
@@ -3586,10 +3784,14 @@ am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
@@ -3598,49 +3800,45 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
- alias in your environment" "$LINENO" 5
- fi
- if test "$2" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error $? "newly created file is older than distributed files!
+am_build_env_is_sane=no
+am_has_slept=no
+rm -f conftest.file
+for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ test "$2" = conftest.file
+ ); then
+ am_build_env_is_sane=yes
+ break
+ fi
+ # Just in case.
+ sleep "$am_cv_filesystem_timestamp_resolution"
+ am_has_slept=yes
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5
+printf "%s\n" "$am_build_env_is_sane" >&6; }
+if test "$am_build_env_is_sane" = no; then
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
+if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1
+then :
+
+else case e in #(
+ e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
+ ;;
+esac
fi
rm -f conftest.file
@@ -3651,7 +3849,7 @@ test "$program_prefix" != NONE &&
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
+# By default was 's,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
@@ -3690,8 +3888,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$STRIP"; then
+else case e in #(
+ e) if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3713,7 +3911,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
@@ -3735,8 +3934,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_STRIP"; then
+else case e in #(
+ e) if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3758,7 +3957,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
@@ -3794,8 +3994,8 @@ if test -z "$MKDIR_P"; then
if test ${ac_cv_path_mkdir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
@@ -3809,7 +4009,7 @@ do
as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir ('*'coreutils) '* | \
- 'BusyBox '* | \
+ *'BusyBox '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
@@ -3818,18 +4018,17 @@ do
done
done
IFS=$as_save_IFS
-
+ ;;
+esac
fi
test -d ./--version && rmdir ./--version
if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
- # As a last resort, use the slow shell script. Don't cache a
- # value for MKDIR_P within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- MKDIR_P="$ac_install_sh -d"
+ # As a last resort, use plain mkdir -p,
+ # in the hope it doesn't have the bugs of ancient mkdir.
+ MKDIR_P='mkdir -p'
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
@@ -3844,8 +4043,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AWK+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$AWK"; then
+else case e in #(
+ e) if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3867,7 +4066,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
@@ -3889,8 +4089,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval test \${ac_cv_prog_make_${ac_make}_set+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat >conftest.make <<\_ACEOF
+else case e in #(
+ e) cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
@@ -3902,7 +4102,8 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in
*)
eval ac_cv_prog_make_${ac_make}_set=no;;
esac
-rm -f conftest.make
+rm -f conftest.make ;;
+esac
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -3923,25 +4124,21 @@ else
fi
rmdir .tst 2>/dev/null
+AM_DEFAULT_VERBOSITY=1
# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
enableval=$enable_silent_rules;
fi
-case $enable_silent_rules in # (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=1;;
-esac
am_make=${MAKE-make}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
printf %s "checking whether $am_make supports nested variables... " >&6; }
if test ${am_cv_make_support_nested_variables+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if printf "%s\n" 'TRUE=$(BAR$(V))
+else case e in #(
+ e) if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3951,19 +4148,50 @@ am__doit:
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
AM_BACKSLASH='\'
+am__rm_f_notfound=
+if (rm -f && rm -fr && rm -rf) 2>/dev/null
+then :
+
+else case e in #(
+ e) am__rm_f_notfound='""' ;;
+esac
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5
+printf %s "checking xargs -n works... " >&6; }
+if test ${am_cv_xargs_n_works+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
+3"
+then :
+ am_cv_xargs_n_works=yes
+else case e in #(
+ e) am_cv_xargs_n_works=no ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5
+printf "%s\n" "$am_cv_xargs_n_works" >&6; }
+if test "$am_cv_xargs_n_works" = yes
+then :
+ am__xargs_n='xargs -n'
+else case e in #(
+ e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }'
+ ;;
+esac
+fi
+
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -3986,7 +4214,7 @@ fi
# Define the identity of the package.
PACKAGE='libffi'
- VERSION='3.8.0'
+ VERSION='3.8.1'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -4024,9 +4252,133 @@ AMTAR='$${TAR-tar}'
# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar pax cpio none'
+_am_tools='gnutar plaintar pax cpio none'
+
+# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
+printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
+ if test x$am_uid = xunknown; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&5
+printf "%s\n" "$as_me: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&2;}
+ elif test $am_uid -le $am_max_uid; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ _am_tools=none
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
+printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
+ if test x$gm_gid = xunknown; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&5
+printf "%s\n" "$as_me: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&2;}
+ elif test $am_gid -le $am_max_gid; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ _am_tools=none
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
+printf %s "checking how to create a ustar tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x ustar -w "$$tardir"'
+ am__tar_='pax -L -x ustar -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
+ am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
+ am__untar='cpio -i -H ustar -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_ustar}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ if test ${am_cv_prog_tar_ustar+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) am_cv_prog_tar_ustar=$_am_tool ;;
+esac
+fi
-am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
+printf "%s\n" "$am_cv_prog_tar_ustar" >&6; }
@@ -4047,47 +4399,9 @@ fi
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-END
- as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
- fi
-fi
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
@@ -4122,8 +4436,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4145,7 +4459,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4167,8 +4482,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4190,7 +4505,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4225,8 +4541,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4248,7 +4564,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4270,8 +4587,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
@@ -4310,7 +4627,8 @@ if test $ac_prog_rejected = yes; then
ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4334,8 +4652,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4357,7 +4675,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4383,8 +4702,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4406,7 +4725,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4444,8 +4764,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4467,7 +4787,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4489,8 +4810,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4512,7 +4833,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4541,10 +4863,10 @@ fi
fi
-test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4616,8 +4938,8 @@ printf "%s\n" "$ac_try_echo"; } >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+ # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
+# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
@@ -4637,7 +4959,7 @@ do
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
# We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
+ # safe: cross compilers may not add the suffix if given an '-o'
# argument, so we may need to know it at that point already.
# Even if this section looks crufty: it has the advantage of
# actually working.
@@ -4648,8 +4970,9 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else $as_nop
- ac_file=''
+else case e in #(
+ e) ac_file='' ;;
+esac
fi
if test -z "$ac_file"
then :
@@ -4658,13 +4981,14 @@ printf "%s\n" "no" >&6; }
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+See 'config.log' for more details" "$LINENO" 5; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
printf %s "checking for C compiler default output file name... " >&6; }
@@ -4688,10 +5012,10 @@ printf "%s\n" "$ac_try_echo"; } >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
+ # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
+# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
+# work properly (i.e., refer to 'conftest.exe'), while it won't with
+# 'rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
@@ -4701,11 +5025,12 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
rm -f conftest conftest$ac_cv_exeext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4721,6 +5046,8 @@ int
main (void)
{
FILE *f = fopen ("conftest.out", "w");
+ if (!f)
+ return 1;
return ferror (f) || fclose (f) != 0;
;
@@ -4760,26 +5087,27 @@ printf "%s\n" "$ac_try_echo"; } >&5
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
+If you meant to cross compile, use '--host'.
+See 'config.log' for more details" "$LINENO" 5; }
fi
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
printf "%s\n" "$cross_compiling" >&6; }
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+rm -f conftest.$ac_ext conftest$ac_cv_exeext \
+ conftest.o conftest.obj conftest.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
printf %s "checking for suffix of object files... " >&6; }
if test ${ac_cv_objext+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4811,16 +5139,18 @@ then :
break;;
esac
done
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
printf "%s\n" "$ac_cv_objext" >&6; }
@@ -4831,8 +5161,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4849,12 +5179,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_compiler_gnu=yes
-else $as_nop
- ac_compiler_gnu=no
+else case e in #(
+ e) ac_compiler_gnu=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
@@ -4872,8 +5204,8 @@ printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_c_werror_flag=$ac_c_werror_flag
+else case e in #(
+ e) ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
@@ -4891,8 +5223,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_prog_cc_g=yes
-else $as_nop
- CFLAGS=""
+else case e in #(
+ e) CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4907,8 +5239,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- ac_c_werror_flag=$ac_save_c_werror_flag
+else case e in #(
+ e) ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4925,12 +5257,15 @@ if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
+ ac_c_werror_flag=$ac_save_c_werror_flag ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
@@ -4957,8 +5292,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c11=no
+else case e in #(
+ e) ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4975,25 +5310,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c11" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c11" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c11" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
- CC="$CC $ac_cv_prog_cc_c11"
+ CC="$CC $ac_cv_prog_cc_c11" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
- ac_prog_cc_stdc=c11
+ ac_prog_cc_stdc=c11 ;;
+esac
fi
fi
if test x$ac_prog_cc_stdc = xno
@@ -5003,8 +5341,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c99=no
+else case e in #(
+ e) ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5021,25 +5359,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c99" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c99" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c99" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
- CC="$CC $ac_cv_prog_cc_c99"
+ CC="$CC $ac_cv_prog_cc_c99" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
- ac_prog_cc_stdc=c99
+ ac_prog_cc_stdc=c99 ;;
+esac
fi
fi
if test x$ac_prog_cc_stdc = xno
@@ -5049,8 +5390,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c89=no
+else case e in #(
+ e) ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5067,25 +5408,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c89" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c89" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c89" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
- CC="$CC $ac_cv_prog_cc_c89"
+ CC="$CC $ac_cv_prog_cc_c89" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
- ac_prog_cc_stdc=c89
+ ac_prog_cc_stdc=c89 ;;
+esac
fi
fi
@@ -5106,8 +5450,8 @@ printf %s "checking whether $CC understands -c and -o together... " >&6; }
if test ${am_cv_prog_cc_c_o+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5136,8 +5480,12 @@ _ACEOF
break
fi
done
- rm -f core conftest*
- unset am_i
+ # aligned with autoconf, so not including core; see bug#72225.
+ rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
+ conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
+ conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
+ unset am_i ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
@@ -5227,8 +5575,8 @@ printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CC_dependencies_compiler_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+else case e in #(
+ e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
@@ -5315,7 +5663,7 @@ else $as_nop
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -5332,7 +5680,8 @@ else $as_nop
else
am_cv_CC_dependencies_compiler_type=none
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
@@ -5374,8 +5723,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CXX"; then
+else case e in #(
+ e) if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5397,7 +5746,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
@@ -5423,8 +5773,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CXX"; then
+else case e in #(
+ e) if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5446,7 +5796,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
@@ -5506,8 +5857,8 @@ printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5524,12 +5875,14 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
ac_compiler_gnu=yes
-else $as_nop
- ac_compiler_gnu=no
+else case e in #(
+ e) ac_compiler_gnu=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
@@ -5547,8 +5900,8 @@ printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+else case e in #(
+ e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
CXXFLAGS="-g"
@@ -5566,8 +5919,8 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
ac_cv_prog_cxx_g=yes
-else $as_nop
- CXXFLAGS=""
+else case e in #(
+ e) CXXFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5582,8 +5935,8 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
-else $as_nop
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+else case e in #(
+ e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5600,12 +5953,15 @@ if ac_fn_cxx_try_compile "$LINENO"
then :
ac_cv_prog_cxx_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
@@ -5632,8 +5988,8 @@ printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx11+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cxx_cxx11=no
+else case e in #(
+ e) ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5650,25 +6006,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
-CXX=$ac_save_CXX
+CXX=$ac_save_CXX ;;
+esac
fi
if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cxx_cxx11" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cxx_cxx11" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
- CXX="$CXX $ac_cv_prog_cxx_cxx11"
+ CXX="$CXX $ac_cv_prog_cxx_cxx11" ;;
+esac
fi
ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
- ac_prog_cxx_stdcxx=cxx11
+ ac_prog_cxx_stdcxx=cxx11 ;;
+esac
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
@@ -5678,8 +6037,8 @@ printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx98+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cxx_cxx98=no
+else case e in #(
+ e) ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5696,25 +6055,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
-CXX=$ac_save_CXX
+CXX=$ac_save_CXX ;;
+esac
fi
if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cxx_cxx98" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cxx_cxx98" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
- CXX="$CXX $ac_cv_prog_cxx_cxx98"
+ CXX="$CXX $ac_cv_prog_cxx_cxx98" ;;
+esac
fi
ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
- ac_prog_cxx_stdcxx=cxx98
+ ac_prog_cxx_stdcxx=cxx98 ;;
+esac
fi
fi
@@ -5731,8 +6093,8 @@ printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CXX_dependencies_compiler_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+else case e in #(
+ e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
@@ -5819,7 +6181,7 @@ else $as_nop
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -5836,7 +6198,8 @@ else $as_nop
else
am_cv_CXX_dependencies_compiler_type=none
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
@@ -5859,6 +6222,11 @@ CFLAGS=$save_CFLAGS
+# Use the final compiler flags, including target flags added below, when make
+# assembles sources. Keep explicit CCASFLAGS values, including empty ones.
+if test "${CCASFLAGS+set}" != set; then
+ CCASFLAGS='$(CFLAGS)'
+fi
# By default we simply use the C compiler to build assembly code.
test "${CCAS+set}" = set || CCAS=$CC
@@ -5873,8 +6241,8 @@ printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CCAS_dependencies_compiler_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+else case e in #(
+ e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
@@ -5959,7 +6327,7 @@ else $as_nop
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -5976,7 +6344,8 @@ else $as_nop
else
am_cv_CCAS_dependencies_compiler_type=none
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; }
@@ -5999,8 +6368,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; }
if test ${ac_cv_path_GREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$GREP"; then
+else case e in #(
+ e) if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6019,9 +6388,10 @@ do
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
+case `"$ac_path_GREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6056,7 +6426,8 @@ IFS=$as_save_IFS
else
ac_cv_path_GREP=$GREP
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
printf "%s\n" "$ac_cv_path_GREP" >&6; }
@@ -6068,8 +6439,8 @@ printf %s "checking for egrep... " >&6; }
if test ${ac_cv_path_EGREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+else case e in #(
+ e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
if test -z "$EGREP"; then
@@ -6091,9 +6462,10 @@ do
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
+case `"$ac_path_EGREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6129,12 +6501,15 @@ else
ac_cv_path_EGREP=$EGREP
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
+ EGREP_TRADITIONAL=$EGREP
+ ac_cv_path_EGREP_TRADITIONAL=$EGREP
case `pwd` in
*\ * | *\ *)
@@ -6144,8 +6519,8 @@ esac
-macro_version='2.4.7'
-macro_revision='2.4.7'
+macro_version='2.5.4'
+macro_revision='2.5.4'
@@ -6236,8 +6611,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; }
if test ${ac_cv_path_SED+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+else case e in #(
+ e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
done
@@ -6262,9 +6637,10 @@ do
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
+case `"$ac_path_SED" --version 2>&1` in #(
*GNU*)
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6299,7 +6675,8 @@ IFS=$as_save_IFS
else
ac_cv_path_SED=$SED
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
printf "%s\n" "$ac_cv_path_SED" >&6; }
@@ -6324,8 +6701,8 @@ printf %s "checking for fgrep... " >&6; }
if test ${ac_cv_path_FGREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+else case e in #(
+ e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
then ac_cv_path_FGREP="$GREP -F"
else
if test -z "$FGREP"; then
@@ -6347,9 +6724,10 @@ do
as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
+case `"$ac_path_FGREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6385,7 +6763,8 @@ else
ac_cv_path_FGREP=$FGREP
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
printf "%s\n" "$ac_cv_path_FGREP" >&6; }
@@ -6416,8 +6795,9 @@ test -z "$GREP" && GREP=grep
if test ${with_gnu_ld+y}
then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else $as_nop
- with_gnu_ld=no
+else case e in #(
+ e) with_gnu_ld=no ;;
+esac
fi
ac_prog=ld
@@ -6426,7 +6806,7 @@ if test yes = "$GCC"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -6462,8 +6842,8 @@ fi
if test ${lt_cv_path_LD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$LD"; then
+else case e in #(
+ e) if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS=$lt_save_ifs
@@ -6486,7 +6866,8 @@ else $as_nop
IFS=$lt_save_ifs
else
lt_cv_path_LD=$LD # Let the user override the test with a path.
-fi
+fi ;;
+esac
fi
LD=$lt_cv_path_LD
@@ -6503,8 +6884,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${lt_cv_prog_gnu_ld+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
+else case e in #(
+ e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -6512,6 +6893,7 @@ case `$LD -v 2>&1 </dev/null` in
*)
lt_cv_prog_gnu_ld=no
;;
+esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
@@ -6531,8 +6913,8 @@ printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
if test ${lt_cv_path_NM+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$NM"; then
+else case e in #(
+ e) if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM=$NM
else
@@ -6553,7 +6935,7 @@ else
# Tru64's nm complains that /dev/null is an invalid object file
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
+ mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
@@ -6579,7 +6961,8 @@ else
IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
printf "%s\n" "$lt_cv_path_NM" >&6; }
@@ -6600,8 +6983,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DUMPBIN+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$DUMPBIN"; then
+else case e in #(
+ e) if test -n "$DUMPBIN"; then
ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6623,7 +7006,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
DUMPBIN=$ac_cv_prog_DUMPBIN
if test -n "$DUMPBIN"; then
@@ -6649,8 +7033,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_DUMPBIN"; then
+else case e in #(
+ e) if test -n "$ac_ct_DUMPBIN"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6672,7 +7056,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
if test -n "$ac_ct_DUMPBIN"; then
@@ -6726,8 +7111,8 @@ printf %s "checking the name lister ($NM) interface... " >&6; }
if test ${lt_cv_nm_interface+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_nm_interface="BSD nm"
+else case e in #(
+ e) lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
@@ -6740,7 +7125,8 @@ else $as_nop
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
fi
- rm -f conftest*
+ rm -f conftest* ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
printf "%s\n" "$lt_cv_nm_interface" >&6; }
@@ -6762,8 +7148,8 @@ printf %s "checking the maximum length of command line arguments... " >&6; }
if test ${lt_cv_sys_max_cmd_len+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- i=0
+else case e in #(
+ e) i=0
teststring=ABCD
case $build_os in
@@ -6775,14 +7161,14 @@ else $as_nop
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
+ gnu* | ironclad*)
+ # Under GNU Hurd and Ironclad, this test is not required because there
+ # is no limit to the length of command line arguments.
# Libtool will interpret -1 as no limit whatsoever
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -6804,7 +7190,7 @@ else $as_nop
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
+ darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -6885,7 +7271,8 @@ else $as_nop
fi
;;
esac
-
+ ;;
+esac
fi
if test -n "$lt_cv_sys_max_cmd_len"; then
@@ -6942,11 +7329,11 @@ printf %s "checking how to convert $build file names to $host format... " >&6; }
if test ${lt_cv_to_host_file_cmd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $host in
+else case e in #(
+ e) case $host in
*-*-mingw* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
*-*-cygwin* )
@@ -6959,7 +7346,7 @@ else $as_nop
;;
*-*-cygwin* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
*-*-cygwin* )
@@ -6974,7 +7361,8 @@ else $as_nop
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
esac
-
+ ;;
+esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
@@ -6990,19 +7378,20 @@ printf %s "checking how to convert $build file names to toolchain format... " >&
if test ${lt_cv_to_tool_file_cmd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- #assume ordinary cross tools, or native build.
+else case e in #(
+ e) #assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
- *-*-mingw* )
+ *-*-mingw* | *-*-windows* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
;;
esac
;;
esac
-
+ ;;
+esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
@@ -7018,8 +7407,9 @@ printf %s "checking for $LD option to reload object files... " >&6; }
if test ${lt_cv_ld_reload_flag+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ld_reload_flag='-r'
+else case e in #(
+ e) lt_cv_ld_reload_flag='-r' ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
@@ -7030,7 +7420,7 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -7052,16 +7442,15 @@ esac
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
-set dummy ${ac_tool_prefix}file; ac_word=$2
+# Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_FILECMD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$FILECMD"; then
+else case e in #(
+ e) if test -n "$FILECMD"; then
ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7075,7 +7464,7 @@ do
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+ ac_cv_prog_FILECMD="file"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -7083,7 +7472,9 @@ done
done
IFS=$as_save_IFS
-fi
+ test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":"
+fi ;;
+esac
fi
FILECMD=$ac_cv_prog_FILECMD
if test -n "$FILECMD"; then
@@ -7095,65 +7486,6 @@ printf "%s\n" "no" >&6; }
fi
-fi
-if test -z "$ac_cv_prog_FILECMD"; then
- ac_ct_FILECMD=$FILECMD
- # Extract the first word of "file", so it can be a program name with args.
-set dummy file; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_ac_ct_FILECMD+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_FILECMD"; then
- ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_FILECMD="file"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
-if test -n "$ac_ct_FILECMD"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
-printf "%s\n" "$ac_ct_FILECMD" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
- if test "x$ac_ct_FILECMD" = x; then
- FILECMD=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- FILECMD=$ac_ct_FILECMD
- fi
-else
- FILECMD="$ac_cv_prog_FILECMD"
-fi
-
@@ -7168,8 +7500,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OBJDUMP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$OBJDUMP"; then
+else case e in #(
+ e) if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7191,7 +7523,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
@@ -7213,8 +7546,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_OBJDUMP"; then
+else case e in #(
+ e) if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7236,7 +7569,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
@@ -7277,8 +7611,8 @@ printf %s "checking how to recognize dependent libraries... " >&6; }
if test ${lt_cv_deplibs_check_method+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_file_magic_cmd='$MAGIC_CMD'
+else case e in #(
+ e) lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
@@ -7286,7 +7620,6 @@ lt_cv_deplibs_check_method='unknown'
# 'none' -- dependencies not supported.
# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# that responds to the $file_magic_cmd with a given extended regex.
# If you have 'file' or equivalent on your system and you're not sure
@@ -7313,7 +7646,7 @@ cygwin*)
lt_cv_file_magic_cmd='func_win32_libid'
;;
-mingw* | pw32*)
+mingw* | windows* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
@@ -7322,7 +7655,7 @@ mingw* | pw32*)
lt_cv_file_magic_cmd='func_win32_libid'
else
# Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
@@ -7395,6 +7728,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+*-mlibc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -7413,7 +7750,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
+openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
@@ -7429,6 +7766,10 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;
+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -7471,7 +7812,8 @@ os2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
@@ -7480,7 +7822,7 @@ file_magic_glob=
want_nocaseglob=no
if test "$build" = "$host"; then
case $host_os in
- mingw* | pw32*)
+ mingw* | windows* | pw32*)
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
want_nocaseglob=yes
else
@@ -7523,8 +7865,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DLLTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$DLLTOOL"; then
+else case e in #(
+ e) if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7546,7 +7888,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
@@ -7568,8 +7911,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_DLLTOOL"; then
+else case e in #(
+ e) if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7591,7 +7934,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
@@ -7633,11 +7977,11 @@ printf %s "checking how to associate runtime and link libraries... " >&6; }
if test ${lt_cv_sharedlib_from_linklib_cmd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_sharedlib_from_linklib_cmd='unknown'
+else case e in #(
+ e) lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -7654,7 +7998,8 @@ cygwin* | mingw* | pw32* | cegcc*)
lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
@@ -7668,6 +8013,110 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi ;;
+esac
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi ;;
+esac
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@@ -7678,8 +8127,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$AR"; then
+else case e in #(
+ e) if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7701,7 +8150,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
@@ -7727,8 +8177,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_AR"; then
+else case e in #(
+ e) if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7750,7 +8200,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
@@ -7787,7 +8238,7 @@ fi
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
+# higher priority because that's what people were doing historically (setting
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
@@ -7812,8 +8263,8 @@ printf %s "checking for archiver @FILE support... " >&6; }
if test ${lt_cv_ar_at_file+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ar_at_file=no
+else case e in #(
+ e) lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7850,7 +8301,8 @@ then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
printf "%s\n" "$lt_cv_ar_at_file" >&6; }
@@ -7875,8 +8327,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$STRIP"; then
+else case e in #(
+ e) if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7898,7 +8350,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
@@ -7920,8 +8373,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_STRIP"; then
+else case e in #(
+ e) if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7943,7 +8396,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
@@ -7976,107 +8430,6 @@ test -z "$STRIP" && STRIP=:
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_RANLIB+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-printf "%s\n" "$RANLIB" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_ac_ct_RANLIB+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-printf "%s\n" "$ac_ct_RANLIB" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
test -z "$RANLIB" && RANLIB=:
@@ -8091,15 +8444,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
- case $host_os in
- bitrig* | openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -8163,8 +8509,8 @@ printf %s "checking command to parse $NM output from $compiler object... " >&6;
if test ${lt_cv_sys_global_symbol_pipe+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
@@ -8179,7 +8525,7 @@ case $host_os in
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -8194,7 +8540,7 @@ osf*)
symcode='[BCDEGQRST]'
;;
solaris*)
- symcode='[BDRT]'
+ symcode='[BCDRT]'
;;
sco3.2v5*)
symcode='[DT]'
@@ -8258,7 +8604,7 @@ $lt_c_name_lib_hook\
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
-mingw*)
+mingw* | windows*)
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
@@ -8309,7 +8655,7 @@ void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
+int main(void){nm_test_var='a';nm_test_func();return(0);}
_LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -8416,7 +8762,8 @@ _LT_EOF
lt_cv_sys_global_symbol_pipe=
fi
done
-
+ ;;
+esac
fi
if test -z "$lt_cv_sys_global_symbol_pipe"; then
@@ -8480,8 +8827,9 @@ printf %s "checking for sysroot... " >&6; }
if test ${with_sysroot+y}
then :
withval=$with_sysroot;
-else $as_nop
- with_sysroot=no
+else case e in #(
+ e) with_sysroot=no ;;
+esac
fi
@@ -8489,7 +8837,9 @@ lt_sysroot=
case $with_sysroot in #(
yes)
if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Trim trailing / since we'll always append absolute paths and we want
+ # to avoid //, if only for less confusing output for the user.
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
fi
;; #(
/*)
@@ -8516,8 +8866,8 @@ printf %s "checking for a working dd... " >&6; }
if test ${ac_cv_path_lt_DD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- printf 0123456789abcdef0123456789abcdef >conftest.i
+else case e in #(
+ e) printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
: ${lt_DD:=$DD}
if test -z "$lt_DD"; then
@@ -8553,7 +8903,8 @@ else
ac_cv_path_lt_DD=$lt_DD
fi
-rm -f conftest.i conftest2.i conftest.out
+rm -f conftest.i conftest2.i conftest.out ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
@@ -8564,8 +8915,8 @@ printf %s "checking how to truncate binary pipes... " >&6; }
if test ${lt_cv_truncate_bin+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- printf 0123456789abcdef0123456789abcdef >conftest.i
+else case e in #(
+ e) printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
lt_cv_truncate_bin=
if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
@@ -8573,7 +8924,8 @@ if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; the
&& lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
fi
rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
printf "%s\n" "$lt_cv_truncate_bin" >&6; }
@@ -8704,7 +9056,7 @@ mips64*-*linux*)
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
# Find out what ABI is being produced by ac_compile, and set linker
# options accordingly. Note that the listed cases only cover the
# situations where additional linker options are needed (such as when
@@ -8723,7 +9075,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
@@ -8752,7 +9104,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_x86_64_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
LD="${LD-ld} -m elf_x86_64"
;;
powerpcle-*linux*)
@@ -8783,8 +9135,8 @@ printf %s "checking whether the C compiler needs -belf... " >&6; }
if test ${lt_cv_cc_needs_belf+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_ext=c
+else case e in #(
+ e) ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -8804,8 +9156,9 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lt_cv_cc_needs_belf=yes
-else $as_nop
- lt_cv_cc_needs_belf=no
+else case e in #(
+ e) lt_cv_cc_needs_belf=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -8814,7 +9167,8 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
@@ -8872,8 +9226,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_MANIFEST_TOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$MANIFEST_TOOL"; then
+else case e in #(
+ e) if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -8895,7 +9249,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
@@ -8917,8 +9272,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_MANIFEST_TOOL"; then
+else case e in #(
+ e) if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -8940,7 +9295,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -8969,22 +9325,23 @@ fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if test ${lt_cv_path_mainfest_tool+y}
+if test ${lt_cv_path_manifest_tool+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_path_mainfest_tool=no
+else case e in #(
+ e) lt_cv_path_manifest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cat conftest.err >&5
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
+ lt_cv_path_manifest_tool=yes
fi
- rm -f conftest*
+ rm -f conftest* ;;
+esac
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
-if test yes != "$lt_cv_path_mainfest_tool"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5
+printf "%s\n" "$lt_cv_path_manifest_tool" >&6; }
+if test yes != "$lt_cv_path_manifest_tool"; then
MANIFEST_TOOL=:
fi
@@ -9003,8 +9360,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DSYMUTIL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$DSYMUTIL"; then
+else case e in #(
+ e) if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9026,7 +9383,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
@@ -9048,8 +9406,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_DSYMUTIL"; then
+else case e in #(
+ e) if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9071,7 +9429,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
@@ -9105,8 +9464,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_NMEDIT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$NMEDIT"; then
+else case e in #(
+ e) if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9128,7 +9487,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
@@ -9150,8 +9510,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_NMEDIT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_NMEDIT"; then
+else case e in #(
+ e) if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9173,7 +9533,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
@@ -9207,8 +9568,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_LIPO+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$LIPO"; then
+else case e in #(
+ e) if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9230,7 +9591,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
@@ -9252,8 +9614,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_LIPO+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_LIPO"; then
+else case e in #(
+ e) if test -n "$ac_ct_LIPO"; then
ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9275,7 +9637,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
if test -n "$ac_ct_LIPO"; then
@@ -9309,8 +9672,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$OTOOL"; then
+else case e in #(
+ e) if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9332,7 +9695,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
@@ -9354,8 +9718,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_OTOOL"; then
+else case e in #(
+ e) if test -n "$ac_ct_OTOOL"; then
ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9377,7 +9741,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
if test -n "$ac_ct_OTOOL"; then
@@ -9411,8 +9776,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OTOOL64+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$OTOOL64"; then
+else case e in #(
+ e) if test -n "$OTOOL64"; then
ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9434,7 +9799,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
OTOOL64=$ac_cv_prog_OTOOL64
if test -n "$OTOOL64"; then
@@ -9456,8 +9822,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OTOOL64+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_OTOOL64"; then
+else case e in #(
+ e) if test -n "$ac_ct_OTOOL64"; then
ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9479,7 +9845,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
if test -n "$ac_ct_OTOOL64"; then
@@ -9536,8 +9903,8 @@ printf %s "checking for -single_module linker flag... " >&6; }
if test ${lt_cv_apple_cc_single_mod+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_apple_cc_single_mod=no
+else case e in #(
+ e) lt_cv_apple_cc_single_mod=no
if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
@@ -9563,18 +9930,58 @@ else $as_nop
fi
rm -rf libconftest.dylib*
rm -f conftest.*
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
+ # Feature test to disable chained fixups since it is not
+ # compatible with '-undefined dynamic_lookup'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5
+printf %s "checking for -no_fixup_chains linker flag... " >&6; }
+if test ${lt_cv_support_no_fixup_chains+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_support_no_fixup_chains=yes
+else case e in #(
+ e) lt_cv_support_no_fixup_chains=no
+ ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5
+printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; }
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
printf %s "checking for -exported_symbols_list linker flag... " >&6; }
if test ${lt_cv_ld_exported_symbols_list+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ld_exported_symbols_list=no
+else case e in #(
+ e) lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
echo "_main" > conftest.sym
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
@@ -9592,13 +9999,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lt_cv_ld_exported_symbols_list=yes
-else $as_nop
- lt_cv_ld_exported_symbols_list=no
+else case e in #(
+ e) lt_cv_ld_exported_symbols_list=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
@@ -9608,8 +10017,8 @@ printf %s "checking for -force_load linker flag... " >&6; }
if test ${lt_cv_ld_force_load+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ld_force_load=no
+else case e in #(
+ e) lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
_LT_EOF
@@ -9620,7 +10029,7 @@ _LT_EOF
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
-int main() { return 0;}
+int main(void) { return 0;}
_LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
@@ -9634,7 +10043,8 @@ _LT_EOF
fi
rm -f conftest.err libconftest.a conftest conftest.c
rm -rf conftest.dSYM
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
printf "%s\n" "$lt_cv_ld_force_load" >&6; }
@@ -9648,13 +10058,32 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
10.[012],*|,*powerpc*-darwin[5-8]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+ if test yes = "$lt_cv_support_no_fixup_chains"; then
+ as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains'
+ fi
+ ;;
esac
;;
esac
if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
+ _lt_dar_needs_single_mod=no
+ case $host_os in
+ rhapsody* | darwin1.*)
+ _lt_dar_needs_single_mod=yes ;;
+ darwin*)
+ # When targeting Mac OS X 10.4 (darwin 8) or later,
+ # -single_module is the default and -multi_module is unsupported.
+ # The toolchain on macOS 10.14 (darwin 18) and later cannot
+ # target any OS version that needs -single_module.
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*)
+ _lt_dar_needs_single_mod=yes ;;
+ esac
+ ;;
+ esac
if test yes = "$lt_cv_ld_exported_symbols_list"; then
_lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
@@ -9785,8 +10214,9 @@ then :
IFS=$lt_save_ifs
;;
esac
-else $as_nop
- enable_shared=yes
+else case e in #(
+ e) enable_shared=yes ;;
+esac
fi
@@ -9817,8 +10247,9 @@ then :
IFS=$lt_save_ifs
;;
esac
-else $as_nop
- enable_static=yes
+else case e in #(
+ e) enable_static=yes ;;
+esac
fi
@@ -9829,28 +10260,52 @@ fi
-
-# Check whether --with-pic was given.
+ # Check whether --enable-pic was given.
+if test ${enable_pic+y}
+then :
+ enableval=$enable_pic; lt_p=${PACKAGE-default}
+ case $enableval in
+ yes|no) pic_mode=$enableval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else case e in #(
+ e) # Check whether --with-pic was given.
if test ${with_pic+y}
then :
withval=$with_pic; lt_p=${PACKAGE-default}
- case $withval in
- yes|no) pic_mode=$withval ;;
- *)
- pic_mode=default
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for lt_pkg in $withval; do
- IFS=$lt_save_ifs
- if test "X$lt_pkg" = "X$lt_p"; then
- pic_mode=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac
-else $as_nop
- pic_mode=default
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else case e in #(
+ e) pic_mode=default ;;
+esac
+fi
+
+ ;;
+esac
fi
@@ -9880,8 +10335,9 @@ then :
IFS=$lt_save_ifs
;;
esac
-else $as_nop
- enable_fast_install=yes
+else case e in #(
+ e) enable_fast_install=yes ;;
+esac
fi
@@ -9896,29 +10352,46 @@ case $host,$enable_shared in
power*-*-aix[5-9]*,yes)
{ 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; }
-
-# Check whether --with-aix-soname was given.
+ # Check whether --enable-aix-soname was given.
+if test ${enable_aix_soname+y}
+then :
+ enableval=$enable_aix_soname; case $enableval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$enable_aix_soname
+else case e in #(
+ e) # Check whether --with-aix-soname was given.
if test ${with_aix_soname+y}
then :
withval=$with_aix_soname; case $withval in
- aix|svr4|both)
- ;;
- *)
- as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname
-else $as_nop
- if test ${lt_cv_with_aix_soname+y}
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else case e in #(
+ e) if test ${lt_cv_with_aix_soname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_with_aix_soname=aix
+else case e in #(
+ e) lt_cv_with_aix_soname=aix ;;
+esac
+fi
+ ;;
+esac
fi
- with_aix_soname=$lt_cv_with_aix_soname
+ enable_aix_soname=$lt_cv_with_aix_soname ;;
+esac
fi
+ with_aix_soname=$enable_aix_soname
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
printf "%s\n" "$with_aix_soname" >&6; }
if test aix != "$with_aix_soname"; then
@@ -10007,8 +10480,8 @@ printf %s "checking for objdir... " >&6; }
if test ${lt_cv_objdir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- rm -f .libs 2>/dev/null
+else case e in #(
+ e) rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
lt_cv_objdir=.libs
@@ -10016,7 +10489,8 @@ else
# MS-DOS does not allow filenames that begin with a dot.
lt_cv_objdir=_libs
fi
-rmdir .libs 2>/dev/null
+rmdir .libs 2>/dev/null ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
printf "%s\n" "$lt_cv_objdir" >&6; }
@@ -10077,8 +10551,8 @@ printf %s "checking for ${ac_tool_prefix}file... " >&6; }
if test ${lt_cv_path_MAGIC_CMD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $MAGIC_CMD in
+else case e in #(
+ e) case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
@@ -10121,6 +10595,7 @@ _LT_EOF
IFS=$lt_save_ifs
MAGIC_CMD=$lt_save_MAGIC_CMD
;;
+esac ;;
esac
fi
@@ -10144,8 +10619,8 @@ printf %s "checking for file... " >&6; }
if test ${lt_cv_path_MAGIC_CMD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $MAGIC_CMD in
+else case e in #(
+ e) case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
@@ -10188,6 +10663,7 @@ _LT_EOF
IFS=$lt_save_ifs
MAGIC_CMD=$lt_save_MAGIC_CMD
;;
+esac ;;
esac
fi
@@ -10231,7 +10707,7 @@ objext=$objext
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
+lt_simple_link_test_code='int main(void){return(0);}'
@@ -10287,8 +10763,8 @@ printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test ${lt_cv_prog_compiler_rtti_exceptions+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_rtti_exceptions=no
+else case e in #(
+ e) lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
@@ -10316,7 +10792,8 @@ else $as_nop
fi
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
@@ -10372,7 +10849,7 @@ lt_prog_compiler_static=
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -10475,7 +10952,7 @@ lt_prog_compiler_static=
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -10516,6 +10993,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
+ *flang* | ftn | f18* | f95*)
+ # Flang compiler.
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
lt_prog_compiler_wl='-Wl,'
@@ -10604,6 +11087,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.
@@ -10620,6 +11109,9 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
+ serenity*)
+ ;;
+
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -10687,8 +11179,9 @@ printf %s "checking for $compiler option to produce PIC... " >&6; }
if test ${lt_cv_prog_compiler_pic+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+else case e in #(
+ e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
@@ -10703,8 +11196,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6;
if test ${lt_cv_prog_compiler_pic_works+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic_works=no
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
@@ -10732,7 +11225,8 @@ else $as_nop
fi
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
@@ -10768,8 +11262,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6;
if test ${lt_cv_prog_compiler_static_works+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_static_works=no
+else case e in #(
+ e) lt_cv_prog_compiler_static_works=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -10790,7 +11284,8 @@ else $as_nop
fi
$RM -r conftest*
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
@@ -10812,8 +11307,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -10853,7 +11348,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -10868,8 +11364,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -10909,7 +11405,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -10988,7 +11485,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
@@ -11000,9 +11497,6 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
- with_gnu_ld=no
- ;;
linux* | k*bsd*-gnu | gnu*)
link_all_deplibs=no
;;
@@ -11106,7 +11600,7 @@ _LT_EOF
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -11116,6 +11610,7 @@ _LT_EOF
enable_shared_with_static_runtimes=yes
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ file_list_spec='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -11135,7 +11630,7 @@ _LT_EOF
haiku*)
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- link_all_deplibs=yes
+ link_all_deplibs=no
;;
os2*)
@@ -11162,7 +11657,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'
+ 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='@'
;;
@@ -11262,6 +11757,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'
@@ -11508,8 +12008,8 @@ else
if test ${lt_cv_aix_libpath_+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -11541,7 +12041,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath_
@@ -11563,8 +12064,8 @@ else
if test ${lt_cv_aix_libpath_+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -11596,7 +12097,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath_
@@ -11652,7 +12154,7 @@ fi
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -11669,14 +12171,14 @@ fi
# Tell ltmain to make .dll files, not .so files.
shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ 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.exp";
else
$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"~
+ $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'
@@ -11847,8 +12349,8 @@ printf %s "checking if $CC understands -b... " >&6; }
if test ${lt_cv_prog_compiler__b+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler__b=no
+else case e in #(
+ e) lt_cv_prog_compiler__b=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -11869,7 +12371,8 @@ else $as_nop
fi
$RM -r conftest*
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
@@ -11917,8 +12420,8 @@ printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&
if test ${lt_cv_irix_exported_symbol+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- save_LDFLAGS=$LDFLAGS
+else case e in #(
+ e) save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11927,12 +12430,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lt_cv_irix_exported_symbol=yes
-else $as_nop
- lt_cv_irix_exported_symbol=no
+else case e in #(
+ e) lt_cv_irix_exported_symbol=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS=$save_LDFLAGS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
@@ -11962,6 +12467,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
@@ -11984,7 +12492,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
@@ -12027,7 +12535,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'
+ 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='@'
;;
@@ -12063,6 +12571,9 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_separator=:
;;
+ serenity*)
+ ;;
+
solaris*)
no_undefined_flag=' -z defs'
if test yes = "$GCC"; then
@@ -12260,8 +12771,8 @@ printf %s "checking whether -lc should be explicitly linked in... " >&6; }
if test ${lt_cv_archive_cmds_need_lc+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- $RM conftest*
+else case e in #(
+ e) $RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -12297,7 +12808,8 @@ else $as_nop
cat conftest.err 1>&5
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
@@ -12468,7 +12980,7 @@ if test yes = "$GCC"; then
*) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
*) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
@@ -12526,7 +13038,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# AWK program above erroneously prepends '/' to C:/dos/paths
# for these hosts.
case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
$SED 's|/\([A-Za-z]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
@@ -12600,7 +13112,7 @@ aix[4-9]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -12694,7 +13206,7 @@ bsdi[45]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -12705,15 +13217,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -12726,7 +13252,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
@@ -12745,7 +13271,7 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -12852,7 +13378,28 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int test_pointer_size[sizeof (void *) - 5];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
shlibpath_var=LD_LIBRARY_PATH
+else case e in #(
+ e) shlibpath_var=LD_32_LIBRARY_PATH ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -12882,8 +13429,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -12993,7 +13541,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -13005,8 +13553,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -13024,8 +13573,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
if test ${lt_cv_shlibpath_overrides_runpath+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_shlibpath_overrides_runpath=no
+else case e in #(
+ e) lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
@@ -13052,7 +13601,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
-
+ ;;
+esac
fi
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
@@ -13062,7 +13612,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -13082,6 +13632,18 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
@@ -13112,6 +13674,18 @@ netbsd*)
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
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -13131,7 +13705,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -13191,6 +13765,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -13288,77 +13873,573 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
-*)
- dynamic_linker=no
- ;;
-esac
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-printf "%s\n" "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
- sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
-fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
- sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
-fi
-
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *flang* | ftn | f18* | f95*)
+ # Flang compiler.
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # flang / f18. f95 an alias for gfortran or flang on Debian
+ flang* | f18* | f95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C 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)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | $SED 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ 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.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ serenity*)
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+='-fPIC'
+ archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ archive_cmds_need_lc=no
+ no_undefined_flag=
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -13472,7 +14553,7 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32* | cegcc*)
+ mingw* | windows* | pw32* | cegcc*)
lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
@@ -13489,16 +14570,22 @@ printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13510,24 +14597,27 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dl_dlopen=yes
-else $as_nop
- ac_cv_lib_dl_dlopen=no
+else case e in #(
+ e) ac_cv_lib_dl_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes
then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else $as_nop
-
+else case e in #(
+ e)
lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
-
+ ;;
+esac
fi
;;
@@ -13545,22 +14635,28 @@ fi
if test "x$ac_cv_func_shl_load" = xyes
then :
lt_cv_dlopen=shl_load
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
printf %s "checking for shl_load in -ldld... " >&6; }
if test ${ac_cv_lib_dld_shl_load+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char shl_load ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load (void);
int
main (void)
{
@@ -13572,39 +14668,47 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dld_shl_load=yes
-else $as_nop
- ac_cv_lib_dld_shl_load=no
+else case e in #(
+ e) ac_cv_lib_dld_shl_load=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes
then :
lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else $as_nop
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+else case e in #(
+ e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes
then :
lt_cv_dlopen=dlopen
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13616,34 +14720,42 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dl_dlopen=yes
-else $as_nop
- ac_cv_lib_dl_dlopen=no
+else case e in #(
+ e) ac_cv_lib_dl_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes
then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
printf %s "checking for dlopen in -lsvld... " >&6; }
if test ${ac_cv_lib_svld_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13655,34 +14767,42 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_svld_dlopen=yes
-else $as_nop
- ac_cv_lib_svld_dlopen=no
+else case e in #(
+ e) ac_cv_lib_svld_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes
then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
printf %s "checking for dld_link in -ldld... " >&6; }
if test ${ac_cv_lib_dld_dld_link+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dld_link ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link (void);
int
main (void)
{
@@ -13694,12 +14814,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dld_dld_link=yes
-else $as_nop
- ac_cv_lib_dld_dld_link=no
+else case e in #(
+ e) ac_cv_lib_dld_dld_link=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
@@ -13708,19 +14830,24 @@ then :
lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
;;
@@ -13748,8 +14875,8 @@ printf %s "checking whether a program can dlopen itself... " >&6; }
if test ${lt_cv_dlopen_self+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test yes = "$cross_compiling"; then :
+else case e in #(
+ e) if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -13799,11 +14926,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -13843,7 +14970,8 @@ _LT_EOF
fi
rm -fr conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
printf "%s\n" "$lt_cv_dlopen_self" >&6; }
@@ -13855,8 +14983,8 @@ printf %s "checking whether a statically linked program can dlopen itself... " >
if test ${lt_cv_dlopen_self_static+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test yes = "$cross_compiling"; then :
+else case e in #(
+ e) if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -13906,11 +15034,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -13950,7 +15078,8 @@ _LT_EOF
fi
rm -fr conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
@@ -14108,8 +15237,8 @@ if test -z "$CXXCPP"; then
if test ${ac_cv_prog_CXXCPP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # Double quotes because $CXX needs to be expanded
+else case e in #(
+ e) # Double quotes because $CXX needs to be expanded
for CXXCPP in "$CXX -E" cpp /lib/cpp
do
ac_preproc_ok=false
@@ -14127,9 +15256,10 @@ _ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
-else $as_nop
- # Broken: fails on valid input.
-continue
+else case e in #(
+ e) # Broken: fails on valid input.
+continue ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
@@ -14143,15 +15273,16 @@ if ac_fn_cxx_try_cpp "$LINENO"
then :
# Broken: success on invalid input.
continue
-else $as_nop
- # Passes both tests.
+else case e in #(
+ e) # Passes both tests.
ac_preproc_ok=:
-break
+break ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
@@ -14160,7 +15291,8 @@ fi
done
ac_cv_prog_CXXCPP=$CXXCPP
-
+ ;;
+esac
fi
CXXCPP=$ac_cv_prog_CXXCPP
else
@@ -14183,9 +15315,10 @@ _ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
-else $as_nop
- # Broken: fails on valid input.
-continue
+else case e in #(
+ e) # Broken: fails on valid input.
+continue ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
@@ -14199,24 +15332,26 @@ if ac_fn_cxx_try_cpp "$LINENO"
then :
# Broken: success on invalid input.
continue
-else $as_nop
- # Passes both tests.
+else case e in #(
+ e) # Passes both tests.
ac_preproc_ok=:
-break
+break ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
ac_ext=c
@@ -14353,8 +15488,9 @@ cc_basename=$func_cc_basename_result
if test ${with_gnu_ld+y}
then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else $as_nop
- with_gnu_ld=no
+else case e in #(
+ e) with_gnu_ld=no ;;
+esac
fi
ac_prog=ld
@@ -14363,7 +15499,7 @@ if test yes = "$GCC"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -14399,8 +15535,8 @@ fi
if test ${lt_cv_path_LD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$LD"; then
+else case e in #(
+ e) if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS=$lt_save_ifs
@@ -14423,7 +15559,8 @@ else $as_nop
IFS=$lt_save_ifs
else
lt_cv_path_LD=$LD # Let the user override the test with a path.
-fi
+fi ;;
+esac
fi
LD=$lt_cv_path_LD
@@ -14440,8 +15577,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${lt_cv_prog_gnu_ld+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
+else case e in #(
+ e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -14449,6 +15586,7 @@ case `$LD -v 2>&1 </dev/null` in
*)
lt_cv_prog_gnu_ld=no
;;
+esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
@@ -14476,8 +15614,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec_CXX=
@@ -14497,7 +15634,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# 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 " \-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"'
else
GXX=no
@@ -14648,8 +15785,8 @@ else
if test ${lt_cv_aix_libpath__CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -14681,7 +15818,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath__CXX
@@ -14704,8 +15842,8 @@ else
if test ${lt_cv_aix_libpath__CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -14737,7 +15875,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath__CXX
@@ -14795,7 +15934,7 @@ fi
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl* | ,icl* | no,icl*)
# Native MSVC or ICC
@@ -14848,6 +15987,7 @@ fi
allow_undefined_flag_CXX=unsupported
always_export_symbols_CXX=no
enable_shared_with_static_runtimes_CXX=yes
+ file_list_spec_CXX='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
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'
@@ -14891,7 +16031,7 @@ fi
module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
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_cv_apple_cc_single_mod"; then
+ 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 -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
@@ -14926,7 +16066,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'
+ 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='@'
;;
@@ -14967,7 +16107,7 @@ fi
haiku*)
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- link_all_deplibs_CXX=yes
+ link_all_deplibs_CXX=no
;;
hpux9*)
@@ -14994,7 +16134,7 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -15059,7 +16199,7 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -15291,6 +16431,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'
@@ -15307,7 +16451,7 @@ fi
ld_shlibs_CXX=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct_CXX=yes
hardcode_shlibpath_var_CXX=no
@@ -15398,7 +16542,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 " \-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
@@ -15413,6 +16557,9 @@ fi
ld_shlibs_CXX=no
;;
+ serenity*)
+ ;;
+
sunos4*)
case $cc_basename in
CC*)
@@ -15482,7 +16629,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 " \-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.
@@ -15493,7 +16640,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 -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $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'
@@ -15636,10 +16783,11 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case $prev$p in
-L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
+ # Some compilers place space between "-{L,R,l}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test x-L = x"$p" ||
+ test x-R = x"$p" ||
+ test x-l = x"$p"; then
prev=$p
continue
fi
@@ -15806,7 +16954,7 @@ lt_prog_compiler_static_CXX=
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -15881,7 +17029,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
@@ -16008,6 +17156,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.
@@ -16036,6 +17186,8 @@ lt_prog_compiler_static_CXX=
;;
psos*)
;;
+ serenity*)
+ ;;
solaris*)
case $cc_basename in
CC* | sunCC*)
@@ -16109,8 +17261,9 @@ printf %s "checking for $compiler option to produce PIC... " >&6; }
if test ${lt_cv_prog_compiler_pic_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+else case e in #(
+ e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; }
@@ -16125,8 +17278,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >
if test ${lt_cv_prog_compiler_pic_works_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic_works_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
@@ -16154,7 +17307,8 @@ else $as_nop
fi
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
@@ -16184,8 +17338,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6;
if test ${lt_cv_prog_compiler_static_works_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_static_works_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_static_works_CXX=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -16206,7 +17360,8 @@ else $as_nop
fi
$RM -r conftest*
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }
@@ -16225,8 +17380,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o_CXX=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -16266,7 +17421,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
@@ -16278,8 +17434,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o_CXX=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -16319,7 +17475,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
@@ -16375,7 +17532,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
pw32*)
export_symbols_cmds_CXX=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
case $cc_basename in
cl* | icl*)
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -16427,8 +17584,8 @@ printf %s "checking whether -lc should be explicitly linked in... " >&6; }
if test ${lt_cv_archive_cmds_need_lc_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- $RM conftest*
+else case e in #(
+ e) $RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -16464,7 +17621,8 @@ else $as_nop
cat conftest.err 1>&5
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
@@ -16606,7 +17764,7 @@ aix[4-9]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -16700,7 +17858,7 @@ bsdi[45]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -16711,15 +17869,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -16731,7 +17903,7 @@ cygwin* | mingw* | pw32* | cegcc*)
soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
@@ -16750,7 +17922,7 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -16856,7 +18028,28 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int test_pointer_size[sizeof (void *) - 5];
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
shlibpath_var=LD_LIBRARY_PATH
+else case e in #(
+ e) shlibpath_var=LD_32_LIBRARY_PATH ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -16886,8 +18079,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -16997,7 +18191,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -17009,8 +18203,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -17028,8 +18223,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
if test ${lt_cv_shlibpath_overrides_runpath+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_shlibpath_overrides_runpath=no
+else case e in #(
+ e) lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
@@ -17056,7 +18251,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
-
+ ;;
+esac
fi
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
@@ -17066,7 +18262,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -17086,6 +18282,18 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
@@ -17116,6 +18324,18 @@ netbsd*)
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
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -17135,7 +18355,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -17195,6 +18415,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -17243,53 +18474,526 @@ sysv4 | sysv4.3*)
esac
;;
-sysv4*MP*)
- if test -d /usr/nec; then
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
- soname_spec='$libname$shared_ext.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test yes = "$GXX"; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_CXX='$wl-static'
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly* | midnightbsd*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64, which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | $SED 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *-mlibc)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ serenity*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=sco
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test yes = "$with_gnu_ld"; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- 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'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-uts4*)
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- shlibpath_var=LD_LIBRARY_PATH
+='-fPIC'
+ archive_cmds_CXX='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ archive_cmds_need_lc_CXX=no
+ no_undefined_flag_CXX=
;;
*)
@@ -17459,8 +19163,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_READELF+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$READELF"; then
+else case e in #(
+ e) if test -n "$READELF"; then
ac_cv_prog_READELF="$READELF" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -17482,7 +19186,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
READELF=$ac_cv_prog_READELF
if test -n "$READELF"; then
@@ -17508,8 +19213,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_READELF+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_READELF"; then
+else case e in #(
+ e) if test -n "$ac_ct_READELF"; then
ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -17531,7 +19236,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
if test -n "$ac_ct_READELF"; then
@@ -17563,28 +19269,30 @@ fi
# Test for 64-bit build.
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
printf %s "checking size of size_t... " >&6; }
if test ${ac_cv_sizeof_size_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_size_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_size_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (size_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_size_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
@@ -17600,8 +19308,8 @@ printf %s "checking for C compiler vendor... " >&6; }
if test ${ax_cv_c_compiler_vendor+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
vendors="
intel: __ICC,__ECC,__INTEL_COMPILER
ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__
@@ -17662,7 +19370,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
printf "%s\n" "$ax_cv_c_compiler_vendor" >&6; }
@@ -17676,8 +19385,9 @@ printf "%s\n" "$ax_cv_c_compiler_vendor" >&6; }
if test ${enable_portable_binary+y}
then :
enableval=$enable_portable_binary; acx_maxopt_portable=$enableval
-else $as_nop
- acx_maxopt_portable=no
+else case e in #(
+ e) acx_maxopt_portable=no ;;
+esac
fi
@@ -17704,14 +19414,14 @@ if test "x$ac_test_CFLAGS" = "x"; then
else
xlc_opt="-qtune=auto"
fi
- as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$xlc_opt" | $as_tr_sh`
+ as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$xlc_opt" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $xlc_opt" >&5
printf %s "checking whether the C compiler accepts $xlc_opt... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -17731,11 +19441,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_CACHEVAR=yes"
-else $as_nop
- eval "$as_CACHEVAR=no"
+else case e in #(
+ e) eval "$as_CACHEVAR=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -17743,8 +19455,8 @@ printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
then :
CFLAGS="$CFLAGS -O3 -qansialias -w $xlc_opt"
-else $as_nop
- CFLAGS="$CFLAGS -O3 -qansialias -w"
+else case e in #(
+ e) CFLAGS="$CFLAGS -O3 -qansialias -w"
echo "******************************************************"
echo "* You seem to have the IBM C compiler. It is *"
echo "* recommended for best performance that you use: *"
@@ -17754,7 +19466,8 @@ else $as_nop
echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
echo "* CPU you have. (Set the CFLAGS environment var. *"
echo "* and re-run configure.) For more info, man cc. *"
- echo "******************************************************"
+ echo "******************************************************" ;;
+esac
fi
;;
@@ -17778,12 +19491,12 @@ printf %s "checking for x86 cpuid 0 output... " >&6; }
if test ${ax_cv_gcc_x86_cpuid_0+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ax_cv_gcc_x86_cpuid_0=unknown
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
@@ -17810,13 +19523,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
-else $as_nop
- ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
+else case e in #(
+ e) ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5
printf "%s\n" "$ax_cv_gcc_x86_cpuid_0" >&6; }
@@ -17840,12 +19556,12 @@ printf %s "checking for x86 cpuid 1 output... " >&6; }
if test ${ax_cv_gcc_x86_cpuid_1+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ax_cv_gcc_x86_cpuid_1=unknown
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
@@ -17872,13 +19588,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid
-else $as_nop
- ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid
+else case e in #(
+ e) ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5
printf "%s\n" "$ax_cv_gcc_x86_cpuid_1" >&6; }
@@ -17909,14 +19628,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
esac
if test "x$icc_flags" != x; then
for flag in $icc_flags; do
- as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | $as_tr_sh`
+ as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $flag" >&5
printf %s "checking whether the C compiler accepts $flag... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -17936,11 +19655,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_CACHEVAR=yes"
-else $as_nop
- eval "$as_CACHEVAR=no"
+else case e in #(
+ e) eval "$as_CACHEVAR=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -17948,8 +19669,9 @@ printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
then :
icc_archflag=$flag; break
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
done
@@ -17984,8 +19706,8 @@ printf %s "checking whether the C compiler accepts -fstrict-aliasing... " >&6; }
if test ${ax_cv_check_cflags___fstrict_aliasing+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -18005,19 +19727,22 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___fstrict_aliasing=yes
-else $as_nop
- ax_cv_check_cflags___fstrict_aliasing=no
+else case e in #(
+ e) ax_cv_check_cflags___fstrict_aliasing=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstrict_aliasing" >&5
printf "%s\n" "$ax_cv_check_cflags___fstrict_aliasing" >&6; }
if test "x$ax_cv_check_cflags___fstrict_aliasing" = xyes
then :
CFLAGS="$CFLAGS -fstrict-aliasing"
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
@@ -18027,8 +19752,8 @@ printf %s "checking whether the C compiler accepts -ffast-math... " >&6; }
if test ${ax_cv_check_cflags___ffast_math+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -18048,19 +19773,22 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___ffast_math=yes
-else $as_nop
- ax_cv_check_cflags___ffast_math=no
+else case e in #(
+ e) ax_cv_check_cflags___ffast_math=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___ffast_math" >&5
printf "%s\n" "$ax_cv_check_cflags___ffast_math" >&6; }
if test "x$ax_cv_check_cflags___ffast_math" = xyes
then :
CFLAGS="$CFLAGS -ffast-math"
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
@@ -18074,8 +19802,9 @@ fi
if test ${with_gcc_arch+y}
then :
withval=$with_gcc_arch; ax_gcc_arch=$withval
-else $as_nop
- ax_gcc_arch=yes
+else case e in #(
+ e) ax_gcc_arch=yes ;;
+esac
fi
@@ -18086,8 +19815,8 @@ printf "%s\n" "" >&6; }
if test ${ax_cv_gcc_archflag+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_cv_gcc_archflag="unknown"
if test "$GCC" = yes; then
@@ -18109,12 +19838,12 @@ printf %s "checking for x86 cpuid 0 output... " >&6; }
if test ${ax_cv_gcc_x86_cpuid_0+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ax_cv_gcc_x86_cpuid_0=unknown
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
@@ -18141,13 +19870,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
-else $as_nop
- ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
+else case e in #(
+ e) ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5
printf "%s\n" "$ax_cv_gcc_x86_cpuid_0" >&6; }
@@ -18171,12 +19903,12 @@ printf %s "checking for x86 cpuid 1 output... " >&6; }
if test ${ax_cv_gcc_x86_cpuid_1+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ax_cv_gcc_x86_cpuid_1=unknown
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
@@ -18203,13 +19935,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid
-else $as_nop
- ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid
+else case e in #(
+ e) ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5
printf "%s\n" "$ax_cv_gcc_x86_cpuid_1" >&6; }
@@ -18300,8 +20035,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PRTDIAG+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $PRTDIAG in
+else case e in #(
+ e) case $PRTDIAG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path.
;;
@@ -18328,6 +20063,7 @@ IFS=$as_save_IFS
test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag"
;;
+esac ;;
esac
fi
PRTDIAG=$ac_cv_path_PRTDIAG
@@ -18421,14 +20157,14 @@ fi
for flag_prefix in $flag_prefixes; do
for arch in $ax_gcc_arch; do
flag="$flag_prefix$arch"
- as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | $as_tr_sh`
+ as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $flag" >&5
printf %s "checking whether the C compiler accepts $flag... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -18448,11 +20184,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_CACHEVAR=yes"
-else $as_nop
- eval "$as_CACHEVAR=no"
+else case e in #(
+ e) eval "$as_CACHEVAR=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -18464,8 +20202,9 @@ then :
if test "x$flag" = "x-march=$arch"; then flag=-mtune=$arch; fi
fi
fi; ax_cv_gcc_archflag=$flag; break
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
done
@@ -18474,7 +20213,8 @@ done
fi
fi # $GCC=yes
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5
@@ -18506,14 +20246,14 @@ fi
CFLAGS="$CFLAGS -O3"
fi
- as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS" | $as_tr_sh`
+ as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $CFLAGS" >&5
printf %s "checking whether the C compiler accepts $CFLAGS... " >&6; }
if eval test \${$as_CACHEVAR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -18533,11 +20273,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_CACHEVAR=yes"
-else $as_nop
- eval "$as_CACHEVAR=no"
+else case e in #(
+ e) eval "$as_CACHEVAR=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
eval ac_res=\$$as_CACHEVAR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -18545,8 +20287,8 @@ printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
then :
:
-else $as_nop
-
+else case e in #(
+ e)
echo ""
echo "********************************************************"
echo "* WARNING: The guessed CFLAGS don't seem to work with *"
@@ -18554,7 +20296,8 @@ else $as_nop
echo "* Use ./configure CFLAGS=... to specify your own flags *"
echo "********************************************************"
echo ""
-
+ ;;
+esac
fi
@@ -18578,8 +20321,8 @@ printf %s "checking CFLAGS for most reasonable warnings... " >&6; }
if test ${ac_cv_cflags_warn_all+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ac_cv_cflags_warn_all=""
ac_save_cflags_warn_all_found="yes"
case "$ax_cv_c_compiler_vendor" in #(
@@ -18668,23 +20411,26 @@ then :
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
CFLAGS=$ac_cv_cflags_warn_all
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
(: CFLAGS="$CFLAGS") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
-
+ ;;
+esac
fi
fi
-else $as_nop
- true
-
-fi
+else case e in #(
+ e) true
+ ;;
+esac
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5
printf "%s\n" "$ac_cv_cflags_warn_all" >&6; }
@@ -18715,8 +20461,9 @@ printf %s "checking whether to enable maintainer-specific portions of Makefiles.
if test ${enable_maintainer_mode+y}
then :
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else $as_nop
- USE_MAINTAINER_MODE=no
+else case e in #(
+ e) USE_MAINTAINER_MODE=no ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
@@ -18787,28 +20534,30 @@ fi
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
printf %s "checking size of double... " >&6; }
if test ${ac_cv_sizeof_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_double" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_double" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_double=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
printf "%s\n" "$ac_cv_sizeof_double" >&6; }
@@ -18820,28 +20569,30 @@ printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
printf %s "checking size of long double... " >&6; }
if test ${ac_cv_sizeof_long_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_long_double" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_long_double" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long double)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_double=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
printf "%s\n" "$ac_cv_sizeof_long_double" >&6; }
@@ -18888,8 +20639,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; }
if test ${ac_cv_c_bigendian+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_c_bigendian=unknown
+else case e in #(
+ e) ac_cv_c_bigendian=unknown
# See if we're dealing with a universal compiler.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18935,8 +20686,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
int
main (void)
{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
&& LITTLE_ENDIAN)
bogus endian macros
#endif
@@ -18967,8 +20718,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_c_bigendian=yes
-else $as_nop
- ac_cv_c_bigendian=no
+else case e in #(
+ e) ac_cv_c_bigendian=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -19012,8 +20764,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_c_bigendian=yes
-else $as_nop
- ac_cv_c_bigendian=no
+else case e in #(
+ e) ac_cv_c_bigendian=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -19040,22 +20793,23 @@ unsigned short int ascii_mm[] =
int use_ebcdic (int i) {
return ebcdic_mm[i] + ebcdic_ii[i];
}
- extern int foo;
-
-int
-main (void)
-{
-return use_ascii (foo) == use_ebcdic (foo);
- ;
- return 0;
-}
+ int
+ main (int argc, char **argv)
+ {
+ /* Intimidate the compiler so that it does not
+ optimize the arrays away. */
+ char *p = argv[0];
+ ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
+ ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
+ return use_ascii (argc) == use_ebcdic (*p);
+ }
_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
then :
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
ac_cv_c_bigendian=yes
fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
if test "$ac_cv_c_bigendian" = unknown; then
ac_cv_c_bigendian=no
else
@@ -19064,9 +20818,10 @@ then :
fi
fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
@@ -19089,14 +20844,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_c_bigendian=no
-else $as_nop
- ac_cv_c_bigendian=yes
+else case e in #(
+ e) ac_cv_c_bigendian=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
printf "%s\n" "$ac_cv_c_bigendian" >&6; }
@@ -19123,8 +20881,8 @@ printf %s "checking assembler .cfi pseudo-op support... " >&6; }
if test ${gcc_cv_as_cfi_pseudo_op+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_ext=c
+else case e in #(
+ e) ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -19147,8 +20905,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
gcc_cv_as_cfi_pseudo_op=yes
-else $as_nop
- gcc_cv_as_cfi_pseudo_op=no
+else case e in #(
+ e) gcc_cv_as_cfi_pseudo_op=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_ext=c
@@ -19157,7 +20916,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_pseudo_op" >&5
printf "%s\n" "$gcc_cv_as_cfi_pseudo_op" >&6; }
@@ -19178,8 +20938,8 @@ printf %s "checking assembler and linker support unaligned pc related relocs...
if test ${libffi_cv_as_sparc_ua_pcrel+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
save_CFLAGS="$CFLAGS"
save_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS -fpic"
@@ -19198,13 +20958,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
libffi_cv_as_sparc_ua_pcrel=yes
-else $as_nop
- libffi_cv_as_sparc_ua_pcrel=no
+else case e in #(
+ e) libffi_cv_as_sparc_ua_pcrel=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS="$save_LDFLAGS" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_sparc_ua_pcrel" >&5
printf "%s\n" "$libffi_cv_as_sparc_ua_pcrel" >&6; }
@@ -19219,8 +20981,8 @@ printf %s "checking assembler .register pseudo-op support... " >&6; }
if test ${libffi_cv_as_register_pseudo_op+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
libffi_cv_as_register_pseudo_op=unknown
# Check if we have .register
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19237,11 +20999,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
libffi_cv_as_register_pseudo_op=yes
-else $as_nop
- libffi_cv_as_register_pseudo_op=no
+else case e in #(
+ e) libffi_cv_as_register_pseudo_op=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_register_pseudo_op" >&5
printf "%s\n" "$libffi_cv_as_register_pseudo_op" >&6; }
@@ -19258,14 +21022,15 @@ printf %s "checking assembler supports pc related relocs... " >&6; }
if test ${libffi_cv_as_x86_pcrel+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
libffi_cv_as_x86_pcrel=no
echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
libffi_cv_as_x86_pcrel=yes
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_x86_pcrel" >&5
printf "%s\n" "$libffi_cv_as_x86_pcrel" >&6; }
@@ -19282,8 +21047,8 @@ printf %s "checking compiler uses zarch features... " >&6; }
if test ${libffi_cv_as_s390_zarch+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
libffi_cv_as_s390_zarch=no
echo 'void foo(void) { bar(); bar(); }' > conftest.c
if $CC $CFLAGS -S conftest.c > /dev/null 2>&1; then
@@ -19291,7 +21056,8 @@ else $as_nop
libffi_cv_as_s390_zarch=yes
fi
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_s390_zarch" >&5
printf "%s\n" "$libffi_cv_as_s390_zarch" >&6; }
@@ -19321,8 +21087,8 @@ printf %s "checking whether compiler supports pointer authentication... " >&6; }
if test ${libffi_cv_as_ptrauth+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
libffi_cv_as_ptrauth=unknown
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19348,11 +21114,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
libffi_cv_as_ptrauth=yes
-else $as_nop
- libffi_cv_as_ptrauth=no
+else case e in #(
+ e) libffi_cv_as_ptrauth=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_ptrauth" >&5
printf "%s\n" "$libffi_cv_as_ptrauth" >&6; }
@@ -19385,11 +21153,11 @@ printf %s "checking for _ prefix in compiled symbols... " >&6; }
if test ${lt_cv_sys_symbol_underscore+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_sys_symbol_underscore=no
+else case e in #(
+ e) lt_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<_LT_EOF
void nm_test_func(){}
-int main(){nm_test_func;return 0;}
+int main(void){nm_test_func;return 0;}
_LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -19421,7 +21189,8 @@ _LT_EOF
cat conftest.c >&5
fi
rm -rf conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_symbol_underscore" >&5
printf "%s\n" "$lt_cv_sys_symbol_underscore" >&6; }
@@ -19464,8 +21233,8 @@ printf %s "checking toolchain supports unwind section type... " >&6; }
if test ${libffi_cv_as_x86_64_unwind_section_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat > conftest1.s << EOF
.text
.globl foo
@@ -19484,10 +21253,12 @@ EOF
# we ensure that we can compile _and_ link an assembly file containing an @unwind section
# since the compiler can support it and not the linker (ie old binutils)
if $CC -Wa,--fatal-warnings $CFLAGS -c conftest1.s > /dev/null 2>&1 && \
- $CC conftest2.c conftest1.o > /dev/null 2>&1 ; then
+ $CC conftest2.c conftest1.o -o conftest$ac_exeext > /dev/null 2>&1 ; then
libffi_cv_as_x86_64_unwind_section_type=yes
fi
-
+ rm -f conftest1.s conftest1.o conftest2.c conftest$ac_exeext a.out
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_x86_64_unwind_section_type" >&5
printf "%s\n" "$libffi_cv_as_x86_64_unwind_section_type" >&6; }
@@ -19504,8 +21275,8 @@ printf %s "checking whether the C compiler accepts -fno-lto... " >&6; }
if test ${ax_cv_check_cflags___fno_lto+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
if test x"$GCC" = xyes ; then
add_gnu_werror="-Werror"
@@ -19525,19 +21296,22 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___fno_lto=yes
-else $as_nop
- ax_cv_check_cflags___fno_lto=no
+else case e in #(
+ e) ax_cv_check_cflags___fno_lto=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_lto" >&5
printf "%s\n" "$ax_cv_check_cflags___fno_lto" >&6; }
if test "x$ax_cv_check_cflags___fno_lto" = xyes
then :
libffi_cv_no_lto=-fno-lto
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
@@ -19546,8 +21320,8 @@ printf %s "checking whether .eh_frame section should be read-only... " >&6; }
if test ${libffi_cv_ro_eh_frame+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
libffi_cv_ro_eh_frame=yes
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
@@ -19556,7 +21330,8 @@ else $as_nop
fi
fi
rm -f conftest.*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_ro_eh_frame" >&5
printf "%s\n" "$libffi_cv_ro_eh_frame" >&6; }
@@ -19578,8 +21353,8 @@ printf %s "checking for __attribute__((visibility(\"hidden\")))... " >&6; }
if test ${libffi_cv_hidden_visibility_attribute+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1 ; }' > conftest.c
libffi_cv_hidden_visibility_attribute=no
if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s 1>&5'
@@ -19593,7 +21368,8 @@ else $as_nop
fi
fi
rm -f conftest.*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_hidden_visibility_attribute" >&5
printf "%s\n" "$libffi_cv_hidden_visibility_attribute" >&6; }
@@ -19607,9 +21383,10 @@ fi
# Check whether --enable-docs was given.
if test ${enable_docs+y}
then :
- enableval=$enable_docs; enable_docs=no
-else $as_nop
- enable_docs=yes
+ enableval=$enable_docs;
+else case e in #(
+ e) enable_docs=yes ;;
+esac
fi
if test x$enable_docs = xyes; then
@@ -19731,6 +21508,20 @@ then :
fi
+# Match every libdir spelling accepted by Autoconf's option parser.
+libdir_explicit=no
+eval "set x $ac_configure_args"
+shift
+for arg
+do
+ case $arg in
+ -libdir | --libdir | --libdi | --libd | \
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir_explicit=yes
+ break ;;
+ esac
+done
+
# These variables are only ever used when we cross-build to X86_WIN32.
# And we only support this with GCC, so...
if test "x$GCC" = "xyes"; then
@@ -19742,7 +21533,8 @@ if test "x$GCC" = "xyes"; then
toolexecdir='${libdir}'/gcc-lib/'$(target_alias)'
toolexeclibdir='${libdir}'
fi
- if test x"$enable_multi_os_directory" != x"no"; then
+ if test x"$enable_multi_os_directory" != x"no" &&
+ test x"$libdir_explicit" != x"yes"; then
multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
case $multi_os_directory in
.) ;; # Avoid trailing /.
@@ -19833,8 +21625,8 @@ printf %s "checking for ld that supports -Wl,--gc-sections... " >&6; }
if test "$cross_compiling" = yes
then :
ac_sectionLDflags=yes
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(void)
@@ -19848,11 +21640,13 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_sectionLDflags=yes
-else $as_nop
- ac_sectionLDflags=no
+else case e in #(
+ e) ac_sectionLDflags=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
if test "$ac_test_CFLAGS" = set; then
@@ -19887,8 +21681,9 @@ then :
*) as_fn_error $? "Unknown argument to enable/disable symvers" "$LINENO" 5 ;;
esac
-else $as_nop
- enable_symvers=yes
+else case e in #(
+ e) enable_symvers=yes ;;
+esac
fi
@@ -19956,8 +21751,9 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
libat_shared_libgcc=yes
-else $as_nop
- libat_shared_libgcc=no
+else case e in #(
+ e) libat_shared_libgcc=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -20006,14 +21802,14 @@ libat_min_gnu_ld_version=21400
# Change "yes" into either "no" or a style name.
if test $enable_symvers != no && test $libat_shared_libgcc = yes; then
if test $with_gnu_ld = yes; then
- if test $libat_gnu_ld_version -ge $libat_min_gnu_ld_version ; then
- enable_symvers=gnu
- elif test $libat_ld_is_gold = yes ; then
+ if test $libat_ld_is_gold = yes ; then
enable_symvers=gnu
elif test $libat_ld_is_lld = yes ; then
enable_symvers=gnu
elif test $libat_ld_is_mold = yes ; then
enable_symvers=gnu
+ elif test $libat_gnu_ld_version -ge $libat_min_gnu_ld_version ; then
+ enable_symvers=gnu
else
# The right tools, the right setup, but too old. Fallbacks?
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: === Linker version $libat_gnu_ld_version is too old for" >&5
@@ -20103,8 +21899,8 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# 'ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* 'ac_cv_foo' will be assigned the
# following values.
_ACEOF
@@ -20134,14 +21930,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;}
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
+ # 'set' does not quote correctly, so add quotes: double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;; #(
*)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
+ # 'set' quotes correctly as required by POSIX, so do not add quotes.
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
@@ -20210,6 +22006,18 @@ printf %s "checking that generated files are newer than configure... " >&6; }
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
printf "%s\n" "done" >&6; }
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -20300,7 +22108,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
@@ -20309,12 +22116,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else $as_nop
- case `(set -o) 2>/dev/null` in #(
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
@@ -20386,7 +22194,7 @@ IFS=$as_save_IFS
;;
esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
@@ -20415,7 +22223,6 @@ as_fn_error ()
} # as_fn_error
-
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -20455,11 +22262,12 @@ then :
{
eval $1+=\$2
}'
-else $as_nop
- as_fn_append ()
+else case e in #(
+ e) as_fn_append ()
{
eval $1=\$$1\$2
- }
+ } ;;
+esac
fi # as_fn_append
# as_fn_arith ARG...
@@ -20473,11 +22281,12 @@ then :
{
as_val=$(( $* ))
}'
-else $as_nop
- as_fn_arith ()
+else case e in #(
+ e) as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
- }
+ } ;;
+esac
fi # as_fn_arith
@@ -20560,9 +22369,9 @@ if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+ # In both cases, we have to default to 'cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -20643,10 +22452,12 @@ as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
exec 6>&1
@@ -20661,8 +22472,8 @@ 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 libffi $as_me 3.8.0, which was
-generated by GNU Autoconf 2.71. Invocation command line was
+This file was extended by libffi $as_me 3.8.1, which was
+generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -20694,7 +22505,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
+'$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
@@ -20729,11 +22540,11 @@ 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="\\
-libffi config.status 3.8.0
-configured by $0, generated by GNU Autoconf 2.71,
+libffi config.status 3.8.1
+configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -20795,8 +22606,8 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
+ as_fn_error $? "ambiguous option: '$1'
+Try '$0 --help' for more information.";;
--help | --hel | -h )
printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -20804,8 +22615,8 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ -*) as_fn_error $? "unrecognized option: '$1'
+Try '$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
@@ -21264,7 +23075,7 @@ do
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"libffi.pc") CONFIG_FILES="$CONFIG_FILES libffi.pc" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -21284,7 +23095,7 @@ fi
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# after its creation but before its name has been assigned to '$tmp'.
$debug ||
{
tmp= ac_tmp=
@@ -21308,7 +23119,7 @@ ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
+# This happens for instance with './config.status config.h'.
if test -n "$CONFIG_FILES"; then
@@ -21466,13 +23277,13 @@ fi # test -n "$CONFIG_FILES"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
+# This happens for instance with './config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
-# Transform confdefs.h into an awk script `defines.awk', embedded as
+# Transform confdefs.h into an awk script 'defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.
@@ -21582,7 +23393,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -21604,19 +23415,19 @@ do
-) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
+ # because $ac_f cannot contain ':'.
test -f "$ac_f" ||
case $ac_f in
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
- # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # Let's still pretend it is 'configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
@@ -21749,7 +23560,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
esac
_ACEOF
-# Neutralize VPATH when `$srcdir' = `.'.
+# Neutralize VPATH when '$srcdir' = '.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -21780,9 +23591,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -22081,15 +23892,15 @@ printf "%s\n" X/"$am_mf" |
(exit $ac_status); } || am_rc=$?
done
if test $am_rc -ne 0; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE=\"gmake\" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
fi
{ am_dirpart=; unset am_dirpart;}
{ am_filepart=; unset am_filepart;}
@@ -22118,13 +23929,13 @@ See \`config.log' for more details" "$LINENO" 5; }
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit, 1996
-# Copyright (C) 2014 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.
# GNU Libtool 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 2 of of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License, if you
@@ -22505,7 +24316,7 @@ hardcode_direct=$hardcode_direct
# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e. impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -22748,7 +24559,7 @@ hardcode_direct=$hardcode_direct_CXX
# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e. impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_CXX
diff --git a/deps/libffi/configure.ac b/deps/libffi/configure.ac
index 826b453b835..63731dd8eed 100644
--- a/deps/libffi/configure.ac
+++ b/deps/libffi/configure.ac
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
AC_PREREQ([2.68])
-AC_INIT([libffi],[3.8.0],[http://github.com/libffi/libffi/issues])
+AC_INIT([libffi],[3.8.1],[http://github.com/libffi/libffi/issues])
AC_CONFIG_HEADERS([fficonfig.h])
dnl Derive the version macros from AC_INIT so they cannot drift when the
@@ -47,6 +47,11 @@ m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
AC_SUBST(CFLAGS)
+# Use the final compiler flags, including target flags added below, when make
+# assembles sources. Keep explicit CCASFLAGS values, including empty ones.
+if test "${CCASFLAGS+set}" != set; then
+ CCASFLAGS='$(CFLAGS)'
+fi
AM_PROG_AS
AM_PROG_CC_C_O
AC_PROG_EGREP
@@ -285,9 +290,10 @@ EOF
# we ensure that we can compile _and_ link an assembly file containing an @unwind section
# since the compiler can support it and not the linker (ie old binutils)
if $CC -Wa,--fatal-warnings $CFLAGS -c conftest1.s > /dev/null 2>&1 && \
- $CC conftest2.c conftest1.o > /dev/null 2>&1 ; then
+ $CC conftest2.c conftest1.o -o conftest$ac_exeext > /dev/null 2>&1 ; then
libffi_cv_as_x86_64_unwind_section_type=yes
fi
+ rm -f conftest1.s conftest1.o conftest2.c conftest$ac_exeext a.out
])
if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,
@@ -338,7 +344,7 @@ fi
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--disable-docs],[Disable building of docs (default: no)]),
- [enable_docs=no],
+ [],
[enable_docs=yes])
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_docs = xyes])
@@ -427,6 +433,20 @@ AC_ARG_ENABLE(multi-os-directory,
[ --disable-multi-os-directory
disable use of gcc --print-multi-os-directory to change the library installation directory])
+# Match every libdir spelling accepted by Autoconf's option parser.
+libdir_explicit=no
+eval "set x $ac_configure_args"
+shift
+for arg
+do
+ case $arg in
+ -libdir | --libdir | --libdi | --libd | \
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir_explicit=yes
+ break ;;
+ esac
+done
+
# These variables are only ever used when we cross-build to X86_WIN32.
# And we only support this with GCC, so...
if test "x$GCC" = "xyes"; then
@@ -438,7 +458,8 @@ if test "x$GCC" = "xyes"; then
toolexecdir='${libdir}'/gcc-lib/'$(target_alias)'
toolexeclibdir='${libdir}'
fi
- if test x"$enable_multi_os_directory" != x"no"; then
+ if test x"$enable_multi_os_directory" != x"no" &&
+ test x"$libdir_explicit" != x"yes"; then
multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
case $multi_os_directory in
.) ;; # Avoid trailing /.
diff --git a/deps/libffi/depcomp b/deps/libffi/depcomp
index 715e34311ed..9f6725b9e0f 100755
--- a/deps/libffi/depcomp
+++ b/deps/libffi/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,11 +47,13 @@ Environment variables:
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "depcomp $scriptversion"
+ echo "depcomp (GNU Automake) $scriptversion"
exit $?
;;
esac
@@ -113,7 +115,6 @@ nl='
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
-digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
@@ -128,7 +129,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
-# Avoid interferences from the environment.
+# Avoid interference from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
@@ -198,8 +199,8 @@ gcc3)
;;
gcc)
-## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
-## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## Note that this doesn't just cater to obsolete pre-3.x GCC compilers.
+## but also to in-use compilers like IBM xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
@@ -783,9 +784,9 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/deps/libffi/doc/Makefile.in b/deps/libffi/doc/Makefile.in
index 02a675ee87d..47dce4f87a4 100644
--- a/deps/libffi/doc/Makefile.in
+++ b/deps/libffi/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -69,6 +69,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -195,10 +197,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in mdate-sh texinfo.tex
@@ -304,8 +305,10 @@ ac_ct_READELF = @ac_ct_READELF@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
ax_enable_builddir_sed = @ax_enable_builddir_sed@
bindir = @bindir@
build = @build@
@@ -422,13 +425,13 @@ clean-libtool:
.texi.dvi:
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+ $(TEXI2DVI) $(AM_TEXI2FLAGS) -I $(srcdir) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
$<
.texi.pdf:
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+ $(TEXI2PDF) $(AM_TEXI2FLAGS) -I $(srcdir) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
$<
.texi.html:
@@ -545,11 +548,10 @@ dist-info: $(INFO_DEPS)
done
mostlyclean-aminfo:
- -rm -rf libffi.t2d libffi.t2p
+ -$(am__rm_rf) libffi.t2d libffi.t2p
clean-aminfo:
- -test -z "libffi.dvi libffi.pdf libffi.ps libffi.html" \
- || rm -rf libffi.dvi libffi.pdf libffi.ps libffi.html
+ -$(am__rm_rf) libffi.dvi libffi.pdf libffi.ps libffi.html
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
@@ -563,6 +565,7 @@ ctags CTAGS:
cscope cscopelist:
+
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -630,8 +633,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -820,3 +823,10 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/deps/libffi/doc/libffi.info b/deps/libffi/doc/libffi.info
index 4c1abc85f77..ef2df81be6b 100644
--- a/deps/libffi/doc/libffi.info
+++ b/deps/libffi/doc/libffi.info
@@ -1,4 +1,4 @@
-This is libffi.info, produced by makeinfo version 7.1 from libffi.texi.
+This is libffi.info, produced by makeinfo version 7.2 from libffi.texi.
This manual is for libffi, a portable foreign function interface
library.
@@ -515,6 +515,12 @@ array.
structure types created like this should only be used to refer to
members of real ‘FFI_TYPE_STRUCT’ objects.
+ Some ABIs classify array fields differently from structurally
+identical structure fields. Because ‘ffi_type’ has no separate array
+tag, this emulation cannot express that distinction. On those targets,
+passing or returning an enclosing structure containing an emulated array
+by value is not supported.
+
However, a phony array type like this will not cause any errors from
‘libffi’ if you use it as an argument or return type. This may be
confusing.
@@ -1052,7 +1058,6 @@ A trivial example that creates a new ‘puts’ by binding ‘fputs’ with
return 0;
}
-
File: libffi.info, Node: Thread Safety, Prev: Closure Example, Up: Using libffi
@@ -1208,7 +1213,6 @@ Index
* void <3>: The Closure API. (line 19)
* void <4>: The Closure API. (line 26)
-
Tag Table:
Node: Top1387
@@ -1221,18 +1225,18 @@ Node: Primitive Types12967
Node: Structures15284
Node: Size and Alignment16395
Node: Arrays Unions Enums18666
-Node: Type Example21643
-Node: Complex22949
-Node: Complex Type Example24463
-Node: Vector Types27536
-Node: Multiple ABIs31575
-Node: Reusable Call Plans31962
-Node: The Closure API34155
-Node: Closure Example38497
-Node: Thread Safety40141
-Node: Memory Usage40974
-Node: Missing Features42249
-Node: Index42626
+Node: Type Example21955
+Node: Complex23261
+Node: Complex Type Example24775
+Node: Vector Types27848
+Node: Multiple ABIs31887
+Node: Reusable Call Plans32274
+Node: The Closure API34467
+Node: Closure Example38809
+Node: Thread Safety40452
+Node: Memory Usage41285
+Node: Missing Features42560
+Node: Index42937
End Tag Table
diff --git a/deps/libffi/doc/libffi.pdf b/deps/libffi/doc/libffi.pdf
index 75458a8f7d5..4e98b8d634f 100644
Binary files a/deps/libffi/doc/libffi.pdf and b/deps/libffi/doc/libffi.pdf differ
diff --git a/deps/libffi/doc/libffi.texi b/deps/libffi/doc/libffi.texi
index 4d2802c5bd9..619c4ed34e9 100644
--- a/deps/libffi/doc/libffi.texi
+++ b/deps/libffi/doc/libffi.texi
@@ -566,6 +566,12 @@ Note that arrays cannot be passed or returned by value in C --
structure types created like this should only be used to refer to
members of real @code{FFI_TYPE_STRUCT} objects.
+Some ABIs classify array fields differently from structurally identical
+structure fields. Because @code{ffi_type} has no separate array tag, this
+emulation cannot express that distinction. On those targets, passing or
+returning an enclosing structure containing an emulated array by value is
+not supported.
+
However, a phony array type like this will not cause any errors from
@code{libffi} if you use it as an argument or return type. This may
be confusing.
diff --git a/deps/libffi/doc/mdate-sh b/deps/libffi/doc/mdate-sh
index e6d572d4cee..22396e40679 100755
--- a/deps/libffi/doc/mdate-sh
+++ b/deps/libffi/doc/mdate-sh
@@ -1,9 +1,10 @@
#!/bin/sh
-# Get modification time of a file or directory and pretty-print it.
+# Get modification time of a file or directory, or value of
+# $SOURCE_DATE_EPOCH, and pretty-print it, formatted like 1 January 2000.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-25.21; # UTC
-# Copyright (C) 1995-2021 Free Software Foundation, Inc.
+# Copyright (C) 1995-2025 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
@@ -50,21 +51,46 @@ Pretty-print the modification day of FILE, in the format:
1 January 1970
Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "mdate-sh $scriptversion"
+ echo "mdate-sh (GNU Automake) $scriptversion"
exit $?
;;
esac
+# Warn if more than one file given.
+if test $# -ne 1; then
+ echo "$0: warning: multiple files given, using first: $*" >&2
+fi
+
error ()
{
echo "$0: $1" >&2
exit 1
}
+# set $month ("January") and $nummonth (1) given arg MON ("Jan").
+mon_to_month ()
+{
+ case $1 in
+ Jan) month=January; nummonth=1;;
+ Feb) month=February; nummonth=2;;
+ Mar) month=March; nummonth=3;;
+ Apr) month=April; nummonth=4;;
+ May) month=May; nummonth=5;;
+ Jun) month=June; nummonth=6;;
+ Jul) month=July; nummonth=7;;
+ Aug) month=August; nummonth=8;;
+ Sep) month=September; nummonth=9;;
+ Oct) month=October; nummonth=10;;
+ Nov) month=November; nummonth=11;;
+ Dec) month=December; nummonth=12;;
+ esac
+}
# Prevent date giving response in another language.
LANG=C
@@ -78,6 +104,7 @@ export LC_TIME
TZ=UTC0
export TZ
+#
# GNU ls changes its time format in response to the TIME_STYLE
# variable. Since we cannot assume 'unset' works, revert this
# variable to its documented default.
@@ -123,20 +150,7 @@ do
shift
# Add another shift to the command.
command="$command shift;"
- case $1 in
- Jan) month=January; nummonth=1;;
- Feb) month=February; nummonth=2;;
- Mar) month=March; nummonth=3;;
- Apr) month=April; nummonth=4;;
- May) month=May; nummonth=5;;
- Jun) month=June; nummonth=6;;
- Jul) month=July; nummonth=7;;
- Aug) month=August; nummonth=8;;
- Sep) month=September; nummonth=9;;
- Oct) month=October; nummonth=10;;
- Nov) month=November; nummonth=11;;
- Dec) month=December; nummonth=12;;
- esac
+ mon_to_month $1
done
test -n "$month" || error "failed parsing '$ls_command /' output"
@@ -150,7 +164,6 @@ eval $command
# Because of the dummy argument above, month is in $2.
#
# On a POSIX system, we should have
-#
# $# = 5
# $1 = file size
# $2 = month
@@ -159,7 +172,6 @@ eval $command
# $5 = filename
#
# On Darwin 7.7.0 and 7.6.0, we have
-#
# $# = 4
# $1 = day
# $2 = month
@@ -167,20 +179,7 @@ eval $command
# $4 = filename
# Get the month.
-case $2 in
- Jan) month=January; nummonth=1;;
- Feb) month=February; nummonth=2;;
- Mar) month=March; nummonth=3;;
- Apr) month=April; nummonth=4;;
- May) month=May; nummonth=5;;
- Jun) month=June; nummonth=6;;
- Jul) month=July; nummonth=7;;
- Aug) month=August; nummonth=8;;
- Sep) month=September; nummonth=9;;
- Oct) month=October; nummonth=10;;
- Nov) month=November; nummonth=11;;
- Dec) month=December; nummonth=12;;
-esac
+mon_to_month $2
case $3 in
???*) day=$1;;
@@ -205,9 +204,9 @@ case $3 in
Nov) nummonthtod=11;;
Dec) nummonthtod=12;;
esac
- # For the first six month of the year the time notation can also
+ # For the first six months of the year the time notation can also
# be used for files modified in the last year.
- if (expr $nummonth \> $nummonthtod) > /dev/null;
+ if (expr $nummonth \> $nummonthtod) >/dev/null;
then
year=`expr $year - 1`
fi;;
@@ -220,9 +219,9 @@ echo $day $month $year
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/deps/libffi/doc/stamp-vti b/deps/libffi/doc/stamp-vti
index dc281e38e0f..c9adde9c03f 100644
--- a/deps/libffi/doc/stamp-vti
+++ b/deps/libffi/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 8 August 2026
-@set UPDATED-MONTH August 2026
-@set EDITION 3.8.0
-@set VERSION 3.8.0
+@set UPDATED 14 November 2026
+@set UPDATED-MONTH November 2026
+@set EDITION 3.8.1
+@set VERSION 3.8.1
diff --git a/deps/libffi/doc/texinfo.tex b/deps/libffi/doc/texinfo.tex
index e48383defc4..5d2f174ee9b 100755
--- a/deps/libffi/doc/texinfo.tex
+++ b/deps/libffi/doc/texinfo.tex
@@ -1,11 +1,11 @@
% texinfo.tex -- TeX macros to handle Texinfo files.
-%
+%
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2021-04-25.21}
+\def\texinfoversion{2025-10-25.20}
%
-% Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -58,12 +58,6 @@
\message{Loading texinfo [version \texinfoversion]:}
-% If in a .fmt file, print the version number
-% and turn on active characters that we couldn't do earlier because
-% they might have appeared in the input file name.
-\everyjob{\message{[Texinfo version \texinfoversion]}%
- \catcode`+=\active \catcode`\_=\active}
-
% LaTeX's \typeout. This ensures that the messages it is used for
% are identical in format to the corresponding ones from latex/pdflatex.
\def\typeout{\immediate\write17}%
@@ -162,8 +156,9 @@
% Give the space character the catcode for a space.
\def\spaceisspace{\catcode`\ =10\relax}
-% Likewise for ^^M, the end of line character.
-\def\endlineisspace{\catcode13=10\relax}
+% Used to ignore an active newline that may appear immediately after
+% a macro name.
+{\catcode13=\active \gdef\ignoreactivenewline{\let^^M\empty}}
\chardef\dashChar = `\-
\chardef\slashChar = `\/
@@ -218,7 +213,7 @@
% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
% aren't perfect, it's not the end of the world, being an error message,
% after all.
-%
+%
\def\errormsg{\begingroup \indexnofonts \doerrormsg}
\def\doerrormsg#1{\errmessage{#1}}
@@ -241,9 +236,6 @@
%
\def\finalout{\overfullrule=0pt }
-\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
-\newdimen\topandbottommargin \topandbottommargin=.75in
-
% Output a mark which sets \thischapter, \thissection and \thiscolor.
% We dump everything together because we only have one kind of mark.
% This works because we only use \botmark / \topmark, not \firstmark.
@@ -284,8 +276,7 @@
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
% the mark with the chapter defs, unless the user sneaks in, e.g.,
-% @setcolor (or @url, or @link, etc.) between @contents and the very
-% first @chapter.
+% @setcolor (or @url etc.) between @contents and the very first @chapter.
\def\gettopheadingmarks{%
\ifcase0\the\savedtopmark\fi
\ifx\thischapter\empty \ifcase0\firstmark\fi \fi
@@ -296,7 +287,6 @@
% Avoid "undefined control sequence" errors.
\def\currentchapterdefs{}
\def\currentsectiondefs{}
-\def\currentsection{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\currentcolordefs{}
@@ -317,16 +307,8 @@
\newbox\footlinebox
% When outputting the double column layout for indices, an output routine
-% is run several times, which hides the original value of \topmark. This
-% can lead to a page heading being output and duplicating the chapter heading
-% of the index. Hence, save the contents of \topmark at the beginning of
-% the output routine. The saved contents are valid until we actually
-% \shipout a page.
-%
-% (We used to run a short output routine to actually set \topmark and
-% \firstmark to the right values, but if this was called with an empty page
-% containing whatsits for writing index entries, the whatsits would be thrown
-% away and the index auxiliary file would remain empty.)
+% is run several times, hiding the original value of \topmark. Hence, save
+% \topmark at the beginning.
%
\newtoks\savedtopmark
\newif\iftopmarksaved
@@ -351,15 +333,9 @@
%
\checkchapterpage
%
- % Retrieve the information for the headings from the marks in the page,
- % and call Plain TeX's \makeheadline and \makefootline, which use the
- % values in \headline and \footline.
- %
- % Common context changes for both heading and footing.
- % Do this outside of the \shipout so @code etc. will be expanded in
- % the headline as they should be, not taken literally (outputting ''code).
+ % Make the heading and footing. \makeheadline and \makefootline
+ % use the contents of \headline and \footline.
\def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars}
- %
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}%
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
@@ -449,43 +425,22 @@
}%
}
-% First remove any @comment, then any @c comment. Pass the result on to
-% \argcheckspaces.
+% First remove any @comment, then any @c comment. Pass the result on to
+% \argremovespace.
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
-
-% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
-%
-% \argremovec might leave us with trailing space, e.g.,
+\def\argremovec#1\c#2\ArgTerm{\argremovespace#1$ $\ArgTerm}
+% \argremovec might leave us with trailing space, though; e.g.,
% @end itemize @c foo
-% This space token undergoes the same procedure and is eventually removed
-% by \finishparsearg.
-%
-\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
-\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
-\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
- \def\temp{#3}%
- \ifx\temp\empty
- % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
- \let\temp\finishparsearg
- \else
- \let\temp\argcheckspaces
- \fi
- % Put the space token in:
- \temp#1 #3\ArgTerm
-}
+% Note that the argument cannot contain the TeX $, as its catcode is
+% changed to \other when Texinfo source is read.
+\def\argremovespace#1 $#2\ArgTerm{\finishparsearg#1$\ArgTerm}
% If a _delimited_ argument is enclosed in braces, they get stripped; so
% to get _exactly_ the rest of the line, we had to prevent such situation.
-% We prepended an \empty token at the very beginning and we expand it now,
-% just before passing the control to \argtorun.
-% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
-% either the null string, or it ends with \^^M---thus there is no danger
-% that a pair of braces would be stripped.
-%
-% But first, we have to remove the trailing space token.
-%
-\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+% We prepended an \empty token at the very beginning and we expand it
+% just before passing the control to \next.
+% (But first, we have to remove the remaining $ or two.)
+\def\finishparsearg#1$#2\ArgTerm{\expandafter\argtorun\expandafter{#1}}
% \parseargdef - define a command taking an argument on the line
@@ -528,8 +483,8 @@
% \envdef\foo{...}
% \def\Efoo{...}
%
-% It's the responsibility of \envdef to insert \begingroup before the
-% actual body; @end closes the group after calling \Efoo. \envdef also
+% \envdef inserts \begingroup before the actual body; @end calls
+% \Efoo then closes the group with \endgroup. \envdef also
% defines \thisenv, so the current environment is known; @end checks
% whether the environment name matches. The \checkenv macro can also be
% used to check whether the current environment is the one expected.
@@ -547,7 +502,7 @@
% ... but they get defined via ``\envdef\foo{...}'':
\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
-\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+\long\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
% Check whether we're in the right environment:
\def\checkenv#1{%
@@ -608,6 +563,9 @@
% @/ allows a line break.
\let\/=\allowbreak
+% @- allows explicit insertion of hyphenation points
+\def\-{\discretionary{\normaldash}{}{}}%
+
% @. is an end-of-sentence period.
\def\.{.\spacefactor=\endofsentencespacefactor\space}
@@ -617,21 +575,6 @@
% @? is an end-of-sentence query.
\def\?{?\spacefactor=\endofsentencespacefactor\space}
-% @frenchspacing on|off says whether to put extra space after punctuation.
-%
-\def\onword{on}
-\def\offword{off}
-%
-\parseargdef\frenchspacing{%
- \def\temp{#1}%
- \ifx\temp\onword \plainfrenchspacing
- \else\ifx\temp\offword \plainnonfrenchspacing
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
- \fi\fi
-}
-
% @w prevents a word break. Without the \leavevmode, @w at the
% beginning of a paragraph, when TeX is still in vertical mode, would
% produce a whole line of output instead of starting the paragraph.
@@ -725,32 +668,22 @@ where each line of input produces a line of output.}
\dimen2 = \ht\strutbox
\advance\dimen2 by \dp\strutbox
\ifdim\dimen0 > \dimen2
+ % This is similar to the 'needspace' module in LaTeX.
+ % The first penalty allows a break if the end of the page is
+ % not too far away. Following penalties and skips are discarded.
+ % Otherwise, require at least \dimen0 of vertical space.
%
- % Do a \strut just to make the height of this box be normal, so the
- % normal leading is inserted relative to the preceding line.
- % And a page break here is fine.
- \vtop to #1\mil{\strut\vfil}%
- %
- % TeX does not even consider page breaks if a penalty added to the
- % main vertical list is 10000 or more. But in order to see if the
- % empty box we just added fits on the page, we must make it consider
- % page breaks. On the other hand, we don't want to actually break the
- % page after the empty box. So we use a penalty of 9999.
- %
- % There is an extremely small chance that TeX will actually break the
- % page at this \penalty, if there are no other feasible breakpoints in
- % sight. (If the user is using lots of big @group commands, which
- % almost-but-not-quite fill up a page, TeX will have a hard time doing
- % good page breaking, for example.) However, I could not construct an
- % example where a page broke at this \penalty; if it happens in a real
- % document, then we can reconsider our strategy.
+ % (We used to use a \vtop to reserve space, but this had spacing issues
+ % when followed by a section heading, as it was not a "discardable item".
+ % This also has the benefit of providing glue before the page break if
+ % there isn't enough space.)
+ \vskip0pt plus \dimen0
+ \penalty-100
+ \vskip0pt plus -\dimen0
+ \vskip \dimen0
\penalty9999
- %
- % Back up by the size of the box, whether we did a page break or not.
- \kern -#1\mil
- %
- % Do not allow a page break right after this kern.
- \nobreak
+ \vskip -\dimen0
+ \penalty0\relax % this hides the above glue from \safewhatsit and \dobreak
\fi
}
@@ -1018,8 +951,16 @@ where each line of input produces a line of output.}
\let\setfilename=\comment
% @bye.
-\outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend}
+\outer\def\bye{%
+ \chappager\pagelabels
+ % possibly set in \printindex
+ \ifx\byeerror\relax\else\errmessage{\byeerror}\fi
+ \tracingstats=1\ptexend}
+% set in \donoderef below, but we need to define this here so that
+% conditionals balance inside the large \ifpdf ... \fi blocks below.
+\newif\ifnodeseen
+\nodeseenfalse
\message{pdf,}
% adobe `portable' document format
@@ -1038,15 +979,52 @@ where each line of input produces a line of output.}
\newif\ifpdf
\newif\ifpdfmakepagedest
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
+\else
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+
+\newif\ifxetex
+\ifx\XeTeXrevision\thisisundefined\else
+ \xetextrue
+\fi
+
+\newif\ifluatex
+\ifx\luatexversion\thisisundefined\else
+ \luatextrue
+ \ifnum\luatexversion>84
+ \pdftrue
+ \fi
+\fi
+
+\newif\ifpdforxetex
+\ifpdf
+ \pdforxetextrue
+\fi
+\ifxetex
+ \pdforxetextrue
+\fi
+
+
+
+% Whether to use non-ASCII bytes in internal link targets. Presently this
+% is almost always on.
+\newif\iftxiuseunicodedestname
+\txiuseunicodedestnametrue
+
%
% For LuaTeX
%
-\newif\iftxiuseunicodedestname
-\txiuseunicodedestnamefalse % For pdfTeX etc.
-
-\ifx\luatexversion\thisisundefined
-\else
+\ifluatex
% Use Unicode destination names
\txiuseunicodedestnametrue
% Escape PDF strings with converting UTF-16 from UTF-8
@@ -1093,13 +1071,13 @@ where each line of input produces a line of output.}
end
end
}
- % The -2 in the arguments here gives all the input to TeX catcode 12
- % (other) or 10 (space), preventing undefined control sequence errors. See
+ % The -2 in the arguments here gives all the input to TeX catcode 12
+ % (other) or 10 (space), preventing undefined control sequence errors. See
% https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
%
\endgroup
\def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
- \ifnum\luatexversion>84
+ \ifpdf
% For LuaTeX >= 0.85
\def\pdfdest{\pdfextension dest}
\let\pdfoutput\outputmode
@@ -1122,52 +1100,36 @@ where each line of input produces a line of output.}
\fi
\fi
-% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set). So we test for \relax and 0 as well as being undefined.
-\ifx\pdfoutput\thisisundefined
-\else
- \ifx\pdfoutput\relax
- \else
- \ifcase\pdfoutput
- \else
- \pdftrue
- \fi
- \fi
-\fi
-
-\newif\ifpdforxetex
-\pdforxetexfalse
-\ifpdf
- \pdforxetextrue
-\fi
-\ifx\XeTeXrevision\thisisundefined\else
- \pdforxetextrue
-\fi
-
% Output page labels information.
% See PDF reference v.1.7 p.594, section 8.3.1.
+% Page label ranges must be increasing.
\ifpdf
\def\pagelabels{%
\def\title{0 << /P (T-) /S /D >>}%
- \edef\roman{\the\romancount << /S /r >>}%
- \edef\arabic{\the\arabiccount << /S /D >>}%
- %
- % Page label ranges must be increasing. Remove any duplicates.
- % (There is a slight chance of this being wrong if e.g. there is
- % a @contents but no @titlepage, etc.)
%
- \ifnum\romancount=0 \def\roman{}\fi
- \ifnum\arabiccount=0 \def\title{}%
- \else
- \ifnum\romancount=\arabiccount \def\roman{}\fi
- \fi
- %
- \ifnum\romancount<\arabiccount
- \pdfcatalog{/PageLabels << /Nums [\title \roman \arabic ] >> }\relax
+ % support @contents at very end of document
+ \ifnum\contentsendcount=\pagecount
+ \ifnum\arabiccount<\romancount
+ \pdfcatalog{/PageLabels << /Nums
+ [\title
+ \the\arabiccount << /S /D >>
+ \the\romancount << /S /r >>
+ ] >> }\relax
+ \fi
+ % no contents in document
+ \else\ifnum\contentsendcount=0
+ \pdfcatalog{/PageLabels << /Nums
+ [\title
+ \the\arabiccount << /S /D >>
+ ] >> }\relax
\else
- \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax
- \fi
+ \pdfcatalog{/PageLabels << /Nums
+ [\title
+ \the\romancount << /S /r >>
+ \the\contentsendcount << /S /D >>
+ ] >> }\relax
+ \fi\fi
}
\else
\let\pagelabels\relax
@@ -1176,6 +1138,8 @@ where each line of input produces a line of output.}
\newcount\pagecount \pagecount=0
\newcount\romancount \romancount=0
\newcount\arabiccount \arabiccount=0
+\newcount\contentsendcount \contentsendcount=0
+
\ifpdf
\let\ptxadvancepageno\advancepageno
\def\advancepageno{%
@@ -1188,7 +1152,7 @@ where each line of input produces a line of output.}
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
-%
+%
% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
% related messages. The final outcome is that it is up to the TeX user
% to double the backslashes and otherwise make the string valid, so
@@ -1222,54 +1186,90 @@ with PDF output, and none of those formats could be found. (.eps cannot
be supported due to the design of the PDF format; use regular TeX (DVI
output) for that.)}
+% definitions for pdftex or luatex with pdf output
\ifpdf
+ % Strings in PDF outlines can either be ASCII, or encoded in UTF-16BE
+ % with BOM. Unfortunately there is no simple way with pdftex to output
+ % UTF-16, so we have to do some quite convoluted expansion games if we
+ % find the string contains a non-ASCII codepoint if we want these to
+ % display correctly. We generated the UTF-16 sequences in
+ % \DeclareUnicodeCharacter and we access them here.
+ %
+ \def\defpdfoutlinetextunicode#1{%
+ \def\pdfoutlinetext{#1}%
+ %
+ % Make UTF-8 sequences expand to UTF-16 definitions.
+ \passthroughcharsfalse \utfbytespdftrue
+ \utfviiidefinedwarningfalse
+ %
+ % Completely expand, eliminating any control sequences such as \code,
+ % leaving only possibly \utfbytes.
+ \let\utfbytes\relax
+ \pdfaccentliterals
+ \xdef\pdfoutlinetextchecked{#1}%
+ \checkutfbytes
+ }%
+ % Check if \utfbytes occurs in expansion.
+ \def\checkutfbytes{%
+ \expandafter\checkutfbytesz\pdfoutlinetextchecked\utfbytes\finish
+ }%
+ \def\checkutfbytesz#1\utfbytes#2\finish{%
+ \def\after{#2}%
+ \ifx\after\empty
+ % No further action needed. Output ASCII string as-is, as converting
+ % to UTF-16 is somewhat slow (and uses more space).
+ \global\let\pdfoutlinetext\pdfoutlinetextchecked
+ \else
+ \passthroughcharstrue % pass UTF-8 sequences unaltered
+ \xdef\pdfoutlinetext{\pdfoutlinetext}%
+ \expandafter\expandutfsixteen\expandafter{\pdfoutlinetext}\pdfoutlinetext
+ \fi
+ }%
%
- % Color manipulation macros using ideas from pdfcolor.tex,
- % except using rgb instead of cmyk; the latter is said to render as a
- % very dark gray on-screen and a very dark halftone in print, instead
- % of actual black. The dark red here is dark enough to print on paper as
- % nearly black, but still distinguishable for online viewing. We use
- % black by default, though.
- \def\rgbDarkRed{0.50 0.09 0.12}
- \def\rgbBlack{0 0 0}
- %
- % rg sets the color for filling (usual text, etc.);
- % RG sets the color for stroking (thin rules, e.g., normal _'s).
- \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
+ \catcode2=1 % begin-group character
+ \catcode3=2 % end-group character
%
- % Set color, and create a mark which defines \thiscolor accordingly,
- % so that \makeheadline knows which color to restore.
- \def\setcolor#1{%
- \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
- \domark
- \pdfsetcolor{#1}%
- }
+ % argument should be pure UTF-8 with no control sequences. convert to
+ % UTF-16BE by inserting null bytes before bytes < 128 and expanding
+ % UTF-8 multibyte sequences to saved UTF-16BE sequences.
+ \def\expandutfsixteen#1#2{%
+ \bgroup \asciitounicode
+ \passthroughcharsfalse
+ \let\utfbytes\asis
+ %
+ % for Byte Order Mark (BOM)
+ \catcode"FE=12
+ \catcode"FF=12
+ %
+ % we want to treat { and } in #1 as any other ASCII bytes. however,
+ % we need grouping characters for \scantokens and definitions/assignments,
+ % so define alternative grouping characters using control characters
+ % that are unlikely to occur.
+ % this does not affect 0x02 or 0x03 bytes arising from expansion as
+ % these are tokens with different catcodes.
+ \catcode"02=1 % begin-group character
+ \catcode"03=2 % end-group character
+ %
+ \expandafter\xdef\expandafter#2\scantokens{%
+ ^^02^^fe^^ff#1^^03}%
+ % NB we need \scantokens to provide both the open and close group tokens
+ % for \xdef otherwise there is an e-TeX error "File ended while
+ % scanning definition of..."
+ % NB \scantokens is a e-TeX command which is assumed to be provided by
+ % pdfTeX.
+ %
+ \egroup
+ }%
%
- \def\maincolor{\rgbBlack}
- \pdfsetcolor{\maincolor}
- \edef\thiscolor{\maincolor}
- \def\currentcolordefs{}
+ \catcode2=12 \catcode3=12 % defaults
%
- \def\makefootline{%
- \baselineskip24pt
- \line{\pdfsetcolor{\maincolor}\the\footline}%
- }
+ % Color support
%
- \def\makeheadline{%
- \vbox to 0pt{%
- \vskip-22.5pt
- \line{%
- \vbox to8.5pt{}%
- % Extract \thiscolor definition from the marks.
- \getcolormarks
- % Typeset the headline with \maincolor, then restore the color.
- \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
- }%
- \vss
- }%
- \nointerlineskip
- }
+ % rg sets the color for filling (usual text, etc.);
+ % RG sets the color for stroking (thin rules, e.g., normal _'s).
+ \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
+ % PDF outline support
%
\pdfcatalog{/PageMode /UseOutlines}
%
@@ -1366,18 +1366,15 @@ output) for that.)}
\def\pdfoutlinetext{#1}%
\else
\ifx \declaredencoding \utfeight
- \ifx\luatexversion\thisisundefined
- % For pdfTeX with UTF-8.
- % TODO: the PDF format can use UTF-16 in bookmark strings,
- % but the code for this isn't done yet.
- % Use ASCII approximations.
- \passthroughcharsfalse
- \def\pdfoutlinetext{#1}%
- \else
+ \ifluatex
% For LuaTeX with UTF-8.
% Pass through Unicode characters for title texts.
\passthroughcharstrue
- \def\pdfoutlinetext{#1}%
+ \pdfaccentliterals
+ \xdef\pdfoutlinetext{#1}%
+ \else
+ % For pdfTeX with UTF-8.
+ \defpdfoutlinetextunicode{#1}%
\fi
\else
% For non-Latin-1 or non-UTF-8 encodings.
@@ -1396,14 +1393,6 @@ output) for that.)}
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}
%
- % used to mark target names; must be expandable.
- \def\pdfmkpgn#1{#1}
- %
- % by default, use black for everything.
- \def\urlcolor{\rgbBlack}
- \def\linkcolor{\rgbBlack}
- \def\endlink{\setcolor{\maincolor}\pdfendlink}
- %
% Adding outlines to PDF; macros for calculating structure of outlines
% come from Petr Olsak
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -1429,7 +1418,7 @@ output) for that.)}
\def\pdfdestname{#4}%
\fi
%
- \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
+ \pdfoutline goto name{\pdfdestname}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
@@ -1440,15 +1429,18 @@ output) for that.)}
\def\thischapnum{##2}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
+ \def\indexlastsec{chap\thischapnum}%
}%
\def\numsecentry##1##2##3##4{%
\advancenumber{chap\thischapnum}%
\def\thissecnum{##2}%
\def\thissubsecnum{0}%
+ \def\indexlastsec{sec\thissecnum}%
}%
\def\numsubsecentry##1##2##3##4{%
\advancenumber{sec\thissecnum}%
\def\thissubsecnum{##2}%
+ \def\indexlastsec{subsec\thissecnum}%
}%
\def\numsubsubsecentry##1##2##3##4{%
\advancenumber{subsec\thissubsecnum}%
@@ -1456,7 +1448,13 @@ output) for that.)}
\def\thischapnum{0}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
+ \let\indexlastsec\empty
%
+ % Index initials are subsidiary to whatever sectioning command just
+ % occurred, usually @appendix or @chapter but occasionally a lower level.
+ \def\idxinitialentry##1##2##3##4{%
+ \expandafter\advancenumber\expandafter{\indexlastsec}%
+ }%
% use \def rather than \let here because we redefine \chapentry et
% al. a second time, below.
\def\appentry{\numchapentry}%
@@ -1467,6 +1465,7 @@ output) for that.)}
\def\unnsecentry{\numsecentry}%
\def\unnsubsecentry{\numsubsecentry}%
\def\unnsubsubsecentry{\numsubsubsecentry}%
+ %
\readdatafile{toc}%
%
% Read toc second time, this time actually producing the outlines.
@@ -1476,7 +1475,7 @@ output) for that.)}
% We use the node names as the destinations.
%
% Currently we prefix the section name with the section number
- % for chapter and appendix headings only in order to avoid too much
+ % for chapter and appendix headings only in order to avoid too much
% horizontal space being required in the PDF viewer.
\def\numchapentry##1##2##3##4{%
\dopdfoutline{##2 ##1}{count-\expnumber{chap##2}}{##3}{##4}}%
@@ -1488,28 +1487,23 @@ output) for that.)}
\dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
\def\numsubsubsecentry##1##2##3##4{% count is always zero
\dopdfoutline{##1}{}{##3}{##4}}%
- %
- % PDF outlines are displayed using system fonts, instead of
- % document fonts. Therefore we cannot use special characters,
- % since the encoding is unknown. For example, the eogonek from
- % Latin 2 (0xea) gets translated to a | character. Info from
- % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
- %
- % TODO this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Too
- % much work for too little return. Just use the ASCII equivalents
- % we use for the index sort strings.
- %
- \indexnofonts
+ \def\idxinitialentry##1##2##3##4{%
+ \dopdfoutline{##1}{}{idx.##1.##2}{##4}}%
+ %
+ \ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
\setupdatafile
% We can have normal brace characters in the PDF outlines, unlike
% Texinfo index files. So set that up.
\def\{{\lbracecharliteral}%
\def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
- \input \tocreadfilename
+ \input \tocreadfilename\relax
+ \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
\endgroup
}
+ \def\dopdfoutlinecontents{%
+ \expandafter\dopdfoutline\expandafter{\putwordTOC}{}{txi.CONTENTS}{}%
+ }
{\catcode`[=1 \catcode`]=2
\catcode`{=\other \catcode`}=\other
\gdef\lbracecharliteral[{]%
@@ -1535,54 +1529,16 @@ output) for that.)}
\else
\let \startlink \pdfstartlink
\fi
- % make a live url in pdf output.
- \def\pdfurl#1{%
- \begingroup
- % it seems we really need yet another set of dummies; have not
- % tried to figure out what each command should do in the context
- % of @url. for now, just make @/ a no-op, that's the only one
- % people have actually reported a problem with.
- %
- \normalturnoffactive
- \def\@{@}%
- \let\/=\empty
- \makevalueexpandable
- % do we want to go so far as to use \indexnofonts instead of just
- % special-casing \var here?
- \def\var##1{##1}%
- %
- \leavevmode\setcolor{\urlcolor}%
- \startlink attr{/Border [0 0 0]}%
- user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
- \endgroup}
- % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
- % be a simple number, or a list of numbers in the case of an index
- % entry.
- \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
- \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
- \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
- \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
- \def\maketoks{%
- \expandafter\poptoks\the\toksA|ENDTOKS|\relax
- \ifx\first0\adn0
- \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
- \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
- \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
- \else
- \ifnum0=\countA\else\makelink\fi
- \ifx\first.\let\next=\done\else
- \let\next=\maketoks
- \addtokens{\toksB}{\the\toksD}
- \ifx\first,\addtokens{\toksB}{\space}\fi
- \fi
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \next}
- \def\makelink{\addtokens{\toksB}%
- {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
- \def\pdflink#1{%
- \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
- \setcolor{\linkcolor}#1\endlink}
- \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+ \def\pdfmakeurl#1{%
+ \startlink attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ }%
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
+ \def\pdflink#1{\pdflinkpage{#1}{#1}}%
+ \def\pdflinkpage#1#2{%
+ \startlink attr{/Border [0 0 0]} goto name{#1}
+ \setcolor{\linkcolor}#2\endlink}
\else
% non-pdf mode
\let\pdfmkdest = \gobble
@@ -1591,13 +1547,12 @@ output) for that.)}
\let\setcolor = \gobble
\let\pdfsetcolor = \gobble
\let\pdfmakeoutlines = \relax
-\fi % \ifx\pdfoutput
+\fi
%
% For XeTeX
%
-\ifx\XeTeXrevision\thisisundefined
-\else
+\ifxetex
%
% XeTeX version check
%
@@ -1623,45 +1578,8 @@ output) for that.)}
\fi
%
% Color support
- %
- \def\rgbDarkRed{0.50 0.09 0.12}
- \def\rgbBlack{0 0 0}
- %
\def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
%
- % Set color, and create a mark which defines \thiscolor accordingly,
- % so that \makeheadline knows which color to restore.
- \def\setcolor#1{%
- \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
- \domark
- \pdfsetcolor{#1}%
- }
- %
- \def\maincolor{\rgbBlack}
- \pdfsetcolor{\maincolor}
- \edef\thiscolor{\maincolor}
- \def\currentcolordefs{}
- %
- \def\makefootline{%
- \baselineskip24pt
- \line{\pdfsetcolor{\maincolor}\the\footline}%
- }
- %
- \def\makeheadline{%
- \vbox to 0pt{%
- \vskip-22.5pt
- \line{%
- \vbox to8.5pt{}%
- % Extract \thiscolor definition from the marks.
- \getcolormarks
- % Typeset the headline with \maincolor, then restore the color.
- \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
- }%
- \vss
- }%
- \nointerlineskip
- }
- %
% PDF outline support
%
% Emulate pdfTeX primitive
@@ -1699,11 +1617,6 @@ output) for that.)}
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}
%
- % by default, use black for everything.
- \def\urlcolor{\rgbBlack}
- \def\linkcolor{\rgbBlack}
- \def\endlink{\setcolor{\maincolor}\pdfendlink}
- %
\def\dopdfoutline#1#2#3#4{%
\setpdfoutlinetext{#1}
\setpdfdestname{#3}
@@ -1717,24 +1630,30 @@ output) for that.)}
%
\def\pdfmakeoutlines{%
\begingroup
- %
% For XeTeX, counts of subentries are not necessary.
% Therefore, we read toc only once.
%
% We use node names as destinations.
%
% Currently we prefix the section name with the section number
- % for chapter and appendix headings only in order to avoid too much
+ % for chapter and appendix headings only in order to avoid too much
% horizontal space being required in the PDF viewer.
\def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
- \dopdfoutline{##2 ##1}{1}{##3}{##4}}%
+ \dopdfoutline{##2 ##1}{1}{##3}{##4}%
+ \def\indexseclevel{2}}%
\def\numsecentry##1##2##3##4{%
- \dopdfoutline{##1}{2}{##3}{##4}}%
+ \dopdfoutline{##1}{2}{##3}{##4}%
+ \def\indexseclevel{3}}%
\def\numsubsecentry##1##2##3##4{%
- \dopdfoutline{##1}{3}{##3}{##4}}%
+ \dopdfoutline{##1}{3}{##3}{##4}%
+ \def\indexseclevel{4}}%
\def\numsubsubsecentry##1##2##3##4{%
- \dopdfoutline{##1}{4}{##3}{##4}}%
+ \dopdfoutline{##1}{4}{##3}{##4}%
+ \def\indexseclevel{5}}%
+ %
+ \def\idxinitialentry##1##2##3##4{%
+ \dopdfoutline{##1}{\indexseclevel}{idx.##1.##2}{##4}}%
%
\let\appentry\numchapentry%
\let\appsecentry\numsecentry%
@@ -1750,15 +1669,25 @@ output) for that.)}
% Therefore, the encoding and the language may not be considered.
%
\indexnofonts
+ \pdfaccentliterals
+ \ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
+ %
\setupdatafile
% We can have normal brace characters in the PDF outlines, unlike
% Texinfo index files. So set that up.
\def\{{\lbracecharliteral}%
\def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
- \input \tocreadfilename
+ \xetexpreauxfile
+ \input \tocreadfilename\relax
+ \xetexpostauxfile
+ \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
\endgroup
}
+ \def\dopdfoutlinecontents{%
+ \expandafter\dopdfoutline\expandafter
+ {\putwordTOC}{1}{txi.CONTENTS}{txi.CONTENTS}%
+ }
{\catcode`[=1 \catcode`]=2
\catcode`{=\other \catcode`}=\other
\gdef\lbracecharliteral[{]%
@@ -1771,7 +1700,7 @@ output) for that.)}
% However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
% ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
% It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
-%
+ %
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
@@ -1786,54 +1715,17 @@ output) for that.)}
\edef\temp{#1}%
\expandafter\skipspaces\temp|\relax
}
- % make a live url in pdf output.
- \def\pdfurl#1{%
- \begingroup
- % it seems we really need yet another set of dummies; have not
- % tried to figure out what each command should do in the context
- % of @url. for now, just make @/ a no-op, that's the only one
- % people have actually reported a problem with.
- %
- \normalturnoffactive
- \def\@{@}%
- \let\/=\empty
- \makevalueexpandable
- % do we want to go so far as to use \indexnofonts instead of just
- % special-casing \var here?
- \def\var##1{##1}%
- %
- \leavevmode\setcolor{\urlcolor}%
- \special{pdf:bann << /Border [0 0 0]
- /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
- \endgroup}
+ \def\pdfmakeurl#1{%
+ \special{pdf:bann << /Border [0 0 0]
+ /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
+ }
\def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
- \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
- \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
- \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
- \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
- \def\maketoks{%
- \expandafter\poptoks\the\toksA|ENDTOKS|\relax
- \ifx\first0\adn0
- \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
- \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
- \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
- \else
- \ifnum0=\countA\else\makelink\fi
- \ifx\first.\let\next=\done\else
- \let\next=\maketoks
- \addtokens{\toksB}{\the\toksD}
- \ifx\first,\addtokens{\toksB}{\space}\fi
- \fi
- \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \next}
- \def\makelink{\addtokens{\toksB}%
- {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
- \def\pdflink#1{%
+ \def\pdflink#1{\pdflinkpage{#1}{#1}}%
+ \def\pdflinkpage#1#2{%
\special{pdf:bann << /Border [0 0 0]
/Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
- \setcolor{\linkcolor}#1\endlink}
- \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-%
+ \setcolor{\linkcolor}#2\endlink}
+ %
%
% @image support
%
@@ -1890,6 +1782,164 @@ output) for that.)}
}
\fi
+% common definitions and code for pdftex, luatex and xetex
+\ifpdforxetex
+ % The dark red here is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing. We use
+ % black by default, though.
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
+ %
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\curcolor{0 0 0}%
+ \def\setcolor#1{%
+ \ifx#1\curcolor\else
+ \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ \xdef\curcolor{#1}%
+ \fi
+ }
+ %
+ \let\maincolor\rgbBlack
+ \pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\currentcolordefs{}
+ %
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
+ %
+ \def\makeheadline{%
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
+ %
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \let\linkcolor\rgbBlack
+ %
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
+ \leavevmode\setcolor{\urlcolor}%
+ \pdfmakeurl{#1}%
+ \endgroup}
+ %
+ % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
+ % be a simple number, or a list of numbers in the case of an index
+ % entry.
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\fi
+
+\ifpdforxetex
+ % for pdftex.
+ {\catcode`^^cc=13
+ \gdef\pdfaccentliteralsutfviii{%
+ % For PDF outline only. Unicode combining accents follow the
+ % character they modify. Note we need at least the first byte
+ % of the UTF-8 sequences to have an active catcode to allow the
+ % definitions to do their magic.
+ \def\"##1{##1^^cc^^88}% U+0308
+ \def\'##1{##1^^cc^^81}% U+0301
+ \def\,##1{##1^^cc^^a7}% U+0327
+ \def\=##1{##1^^cc^^85}% U+0305
+ \def\^##1{##1^^cc^^82}% U+0302
+ \def\`##1{##1^^cc^^80}% U+0300
+ \def\~##1{##1^^cc^^83}% U+0303
+ \def\dotaccent##1{##1^^cc^^87}% U+0307
+ \def\H##1{##1^^cc^^8b}% U+030B
+ \def\ogonek##1{##1^^cc^^a8}% U+0328
+ \def\ringaccent##1{##1^^cc^^8a}% U+030A
+ \def\u##1{##1^^cc^^8c}% U+0306
+ \def\ubaraccent##1{##1^^cc^^b1}% U+0331
+ \def\udotaccent##1{##1^^cc^^a3}% U+0323
+ \def\v##1{##1^^cc^^8c}% U+030C
+ % this definition of @tieaccent will only work with exactly two characters
+ % in argument as we need to insert the combining character between them.
+ \def\tieaccent##1{\tieaccentz##1}%
+ \def\tieaccentz##1##2{##1^^cd^^a1##2} % U+0361
+ }}%
+ %
+ % for xetex and luatex, which both support extended ^^^^ escapes and
+ % process the Unicode codepoint as a single token.
+ \gdef\pdfaccentliteralsnative{%
+ \def\"##1{##1^^^^0308}%
+ \def\'##1{##1^^^^0301}%
+ \def\,##1{##1^^^^0327}%
+ \def\=##1{##1^^^^0305}%
+ \def\^##1{##1^^^^0302}%
+ \def\`##1{##1^^^^0300}%
+ \def\~##1{##1^^^^0303}%
+ \def\dotaccent##1{##1^^^^0307}%
+ \def\H##1{##1^^^^030b}%
+ \def\ogonek##1{##1^^^^0328}%
+ \def\ringaccent##1{##1^^^^030a}%
+ \def\u##1{##1^^^^0306}%
+ \def\ubaraccent##1{##1^^^^0331}%
+ \def\udotaccent##1{##1^^^^0323}%
+ \def\v##1{##1^^^^030c}%
+ \def\tieaccent##1{\tieaccentz##1}%
+ \def\tieaccentz##1##2{##1^^^^0361##2} % U+0361
+ }%
+ %
+ % use the appropriate definition
+ \ifluatex
+ \let\pdfaccentliterals\pdfaccentliteralsnative
+ \else
+ \ifxetex
+ \let\pdfaccentliterals\pdfaccentliteralsnative
+ \else
+ \let\pdfaccentliterals\pdfaccentliteralsutfviii
+ \fi
+ \fi
+\fi
%
\message{fonts,}
@@ -2176,6 +2226,11 @@ end
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
\fi\fi
+%
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
+%
+% (end of cmaps)
% Set the font macro #1 to the font named \fontprefix#2.
@@ -2191,11 +2246,10 @@ end
\def\setfont#1#2#3#4#5{%
\font#1=\fontprefix#2#3 scaled #4
\csname cmap#5\endcsname#1%
+ \ifx#2\ttshape\hyphenchar#1=-1 \fi
+ \ifx#2\ttbshape\hyphenchar#1=-1 \fi
+ \ifx#2\ttslshape\hyphenchar#1=-1 \fi
}
-% This is what gets called when #5 of \setfont is empty.
-\let\cmap\gobble
-%
-% (end of cmaps)
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
@@ -2558,7 +2612,7 @@ end
\def\it{\fam=\itfam \setfontstyle{it}}
\def\sl{\fam=\slfam \setfontstyle{sl}}
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
-\def\tt{\fam=\ttfam \setfontstyle{tt}}\def\ttstylename{tt}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
% So we set up a \sf.
@@ -2586,34 +2640,30 @@ end
\scriptfont\sffam=\sevensf
}
-%
-% The font-changing commands (all called \...fonts) redefine the meanings
-% of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs
-% to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
-% commands hardwire \STYLEfont to set the current font.
-%
-% The fonts used for \ifont are for "math italics" (\itfont is for italics
-% in regular text). \syfont is also used in math mode only.
-%
-% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower). These relative commands are used
-% in, e.g., the LaTeX logo and acronyms.
-%
-% This all needs generalizing, badly.
+
+% \defineassignfonts{SIZE} -
+% Define sequence \assignfontsSIZE, which switches between font sizes
+% by redefining the meanings of \STYLEfont. (Just \STYLE additionally sets
+% the current \fam for math mode.)
%
+\def\defineassignfonts#1{%
+ \expandafter\edef\csname assignfonts#1\endcsname{%
+ \let\noexpand\rmfont\csname #1rm\endcsname
+ \let\noexpand\itfont\csname #1it\endcsname
+ \let\noexpand\slfont\csname #1sl\endcsname
+ \let\noexpand\bffont\csname #1bf\endcsname
+ \let\noexpand\ttfont\csname #1tt\endcsname
+ \let\noexpand\smallcaps\csname #1sc\endcsname
+ \let\noexpand\sffont \csname #1sf\endcsname
+ \let\noexpand\ifont \csname #1i\endcsname
+ \let\noexpand\syfont \csname #1sy\endcsname
+ \let\noexpand\ttslfont\csname #1ttsl\endcsname
+ }
+}
\def\assignfonts#1{%
- \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
- \expandafter\let\expandafter\itfont\csname #1it\endcsname
- \expandafter\let\expandafter\slfont\csname #1sl\endcsname
- \expandafter\let\expandafter\bffont\csname #1bf\endcsname
- \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
- \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
- \expandafter\let\expandafter\sffont \csname #1sf\endcsname
- \expandafter\let\expandafter\ifont \csname #1i\endcsname
- \expandafter\let\expandafter\syfont \csname #1sy\endcsname
- \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+ \csname assignfonts#1\endcsname
}
\newif\ifrmisbold
@@ -2637,12 +2687,21 @@ end
\csname\curfontstyle\endcsname
}%
+% Define the font-changing commands (all called \...fonts).
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower). These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
+%
+% Note: The fonts used for \ifont are for "math italics" (\itfont is for
+% italics in regular text). \syfont is also used in math mode only.
+%
\def\definefontsetatsize#1#2#3#4#5{%
+ \defineassignfonts{#1}%
\expandafter\def\csname #1fonts\endcsname{%
\def\curfontsize{#1}%
\def\lsize{#2}\def\lllsize{#3}%
\csname rmisbold#5\endcsname
- \assignfonts{#1}%
+ \csname assignfonts#1\endcsname
\resetmathfonts
\setleading{#4}%
}}
@@ -2687,9 +2746,22 @@ end
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% this property, we can check that font parameter. #1 is what to
+% print if we are indeed using \tt; #2 is what to print otherwise.
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+
+% Check if internal flag is clear, i.e. has not been @set.
+\def\ifflagclear#1#2#3{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ #2\else#3\fi
+}
{
\catcode`\'=\active
@@ -2698,45 +2770,37 @@ end
\gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright}
\gdef\setregularquotes{\let`\lq \let'\rq}
}
+\setregularquotes
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report. xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
%
\def\codequoteright{%
- \ifmonospace
- \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
- '%
- \else \char'15 \fi
- \else \char'15 \fi
- \else
- '%
- \fi
+ \ifusingtt
+ {\ifflagclear{txicodequoteundirected}%
+ {\ifflagclear{codequoteundirected}%
+ {'}%
+ {\char"0D }}%
+ {\char"0D }}%
+ {'}%
}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
+% \relax disables Spanish ligatures ?` and !` of \tt font.
%
\def\codequoteleft{%
- \ifmonospace
- \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
- % [Knuth] pp. 380,381,391
- % \relax disables Spanish ligatures ?` and !` of \tt font.
- \relax`%
- \else \char'22 \fi
- \else \char'22 \fi
- \else
- \relax`%
- \fi
+ \ifusingtt
+ {\ifflagclear{txicodequotebacktick}%
+ {\ifflagclear{codequotebacktick}%
+ {\relax`}%
+ {\char"12 }}%
+ {\char"12 }}%
+ {\relax`}%
}
% Commands to set the quote options.
-%
+%
\parseargdef\codequoteundirected{%
\def\temp{#1}%
\ifx\temp\onword
@@ -2750,7 +2814,7 @@ end
\errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
\fi\fi
}
-%
+
\parseargdef\codequotebacktick{%
\def\temp{#1}%
\ifx\temp\onword
@@ -2765,6 +2829,11 @@ end
\fi\fi
}
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
@@ -2777,17 +2846,18 @@ end
% If we are in a monospaced environment, however, 1) always use \ttsl,
% and 2) do not add an italic correction.
\def\dosmartslant#1#2{%
- \ifusingtt
+ \ifusingtt
{{\ttsl #2}\let\next=\relax}%
- {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+ {\def\next{{#1#2}\smartitaliccorrection}}%
\next
}
\def\smartslanted{\dosmartslant\sl}
\def\smartitalic{\dosmartslant\it}
-% Output an italic correction unless \next (presumed to be the following
-% character) is such as not to need one.
-\def\smartitaliccorrection{%
+% Output an italic correction unless the following character is such as
+% not to need one.
+\def\smartitaliccorrection{\futurelet\next\smartitaliccorrectionx}
+\def\smartitaliccorrectionx{%
\ifx\next,%
\else\ifx\next-%
\else\ifx\next.%
@@ -2798,43 +2868,52 @@ end
\aftersmartic
}
-% Unconditional use \ttsl, and no ic. @var is set to this for defuns.
-\def\ttslanted#1{{\ttsl #1}}
-
-% @cite is like \smartslanted except unconditionally use \sl. We never want
-% ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+% @cite unconditionally uses \sl with \smartitaliccorrection.
+\def\cite#1{{\sl #1}\smartitaliccorrection}
+% By default, use ttsl font for @var when used in code context.
+% To unconditionally use \sl for @var, @clear txicodevaristt. This
+% gives consistency for parameter names whether they are in @def,
+% @table @code or a regular paragraph.
\def\aftersmartic{}
\def\var#1{%
\let\saveaftersmartic = \aftersmartic
\def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
- \smartslanted{#1}%
+ % The \null is to reset \spacefactor.
+ %
+ \ifflagclear{txicodevaristt}%
+ {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
+ {\def\varnext{\smartslanted{#1}}}%
+ \varnext
}
+\def\SETtxicodevaristt{}% @set txicodevaristt
+
\let\i=\smartitalic
\let\slanted=\smartslanted
\let\dfn=\smartslanted
\let\emph=\smartitalic
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}} % roman font
+% @r for roman font, used for code comment
+\def\r#1{{%
+ \usenormaldash % get --, --- ligatures even if in @code
+ \defcharsdefault % in case on def line
+ \rm #1}}
+{\catcode`-=\active \gdef\usenormaldash{\let-\normaldash}}
+
+% @sc, undocumented @ii.
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
% @b, explicit bold. Also @strong.
-\def\b#1{{\bf #1}}
+\def\b#1{{\bf \defcharsdefault #1}}
\let\strong=\b
% @sansserif, explicit sans.
\def\sansserif#1{{\sf #1}}
-% We can't just use \exhyphenpenalty, because that only has effect at
-% the end of a paragraph. Restore normal hyphenation at the end of the
-% group within which \nohyphenation is presumably called.
-%
-\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
-\def\restorehyphenation{\hyphenchar\font = `- }
+\newif\iffrenchspacing
+\frenchspacingfalse
% Set sfcode to normal for the chars that usually have another value.
% Can't use plain's \frenchspacing because it uses the `\x notation, and
@@ -2842,21 +2921,45 @@ end
%
\catcode`@=11
\def\plainfrenchspacing{%
- \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
- \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
- \def\endofsentencespacefactor{1000}% for @. and friends
+ \iffrenchspacing\else
+ \frenchspacingtrue
+ \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+ \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ \fi
}
\def\plainnonfrenchspacing{%
- \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
- \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
- \def\endofsentencespacefactor{3000}% for @. and friends
+ \iffrenchspacing
+ \frenchspacingfalse
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
+ \fi
}
\catcode`@=\other
\def\endofsentencespacefactor{3000}% default
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\let\frenchspacingsetting\plainnonfrenchspacing % used in output routine
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \let\frenchspacingsetting\plainfrenchspacing
+ \else\ifx\temp\offword \let\frenchspacingsetting\plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
+ \fi\fi
+ \frenchspacingsetting
+}
+
+
% @t, explicit typewriter.
\def\t#1{%
- {\tt \plainfrenchspacing #1}%
+ {\tt \defcharsdefault \plainfrenchspacing #1}%
\null
}
@@ -2877,27 +2980,29 @@ end
% Switch to typewriter.
\tt
%
- % But `\ ' produces the large typewriter interword space.
+ % `\ ' produces the large typewriter interword space.
\def\ {{\spaceskip = 0pt{} }}%
%
- % Turn off hyphenation.
- \nohyphenation
- %
\plainfrenchspacing
#1%
}%
\null % reset spacefactor to 1000
}
-% We *must* turn on hyphenation at `-' and `_' in @code.
-% (But see \codedashfinish below.)
+% This is for LuaTeX: It is not sufficient to disable hyphenation at
+% explicit dashes by setting `\hyphenchar` to -1.
+\def\dashnobreak{%
+ \normaldash
+ \penalty 10000 }
+
+% We must turn on hyphenation at `-' and `_' in @code.
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
+% We explicitly allow hyphenation at these characters
+% using \discretionary.
%
-% Unfortunately, TeX uses one parameter (\hyphenchar) to control
-% both hyphenation at - and hyphenation within words.
-% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash. -- rms.
+% Hyphenation at - and hyphenation within words was turned off
+% by default for the tt fonts using the \hyphenchar parameter of TeX.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
@@ -2910,37 +3015,42 @@ end
\let-\codedash
\let_\codeunder
\else
- \let-\normaldash
+ \let-\dashnobreak
\let_\realunder
\fi
- % Given -foo (with a single dash), we do not want to allow a break
- % after the hyphen.
- \global\let\codedashprev=\codedash
- %
\codex
}
%
\gdef\codedash{\futurelet\next\codedashfinish}
\gdef\codedashfinish{%
\normaldash % always output the dash character itself.
- %
+ %
% Now, output a discretionary to allow a line break, unless
% (a) the next character is a -, or
- % (b) the preceding character is a -.
+ % (b) the preceding character is a -, or
+ % (c) we are at the start of the string.
+ % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
+ %
% E.g., given --posix, we do not want to allow a break after either -.
% Given --foo-bar, we do want to allow a break between the - and the b.
\ifx\next\codedash \else
- \ifx\codedashprev\codedash
+ \ifx\codedashnobreak\codedash
\else \discretionary{}{}{}\fi
\fi
% we need the space after the = for the case when \next itself is a
% space token; it would get swallowed otherwise. As in @code{- a}.
- \global\let\codedashprev= \next
+ \global\let\codedashnobreak= \next
}
}
\def\normaldash{-}
%
-\def\codex #1{\tclose{#1}\endgroup}
+\def\codex #1{\tclose{%
+ % Given -foo (with a single dash), we do not want to allow a break
+ % after the -. \codedashnobreak is set to the first character in
+ % @code.
+ \futurelet\codedashnobreak\relax
+ #1%
+}\endgroup}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
@@ -3020,25 +3130,25 @@ end
% For pdfTeX and LuaTeX
\ifurefurlonlylink
% PDF plus option to not display url, show just arg
- \unhbox0
+ \unhbox0
\else
% PDF, normally display both arg and url for consistency,
% visibility, if the pdf is eventually used to print, etc.
\unhbox0\ (\urefcode{#1})%
\fi
\else
- \ifx\XeTeXrevision\thisisundefined
- \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
- \else
+ \ifxetex
% For XeTeX
\ifurefurlonlylink
% PDF plus option to not display url, show just arg
- \unhbox0
+ \unhbox0
\else
% PDF, normally display both arg and url for consistency,
% visibility, if the pdf is eventually used to print, etc.
\unhbox0\ (\urefcode{#1})%
\fi
+ \else
+ \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
\fi
\fi
\else
@@ -3091,10 +3201,10 @@ end
}
}
-% By default we'll break after the special characters, but some people like to
-% break before the special chars, so allow that. Also allow no breaking at
+% By default we'll break after the special characters, but some people like to
+% break before the special chars, so allow that. Also allow no breaking at
% all, for manual control.
-%
+%
\parseargdef\urefbreakstyle{%
\def\txiarg{#1}%
\ifx\txiarg\wordnone
@@ -3113,16 +3223,17 @@ end
\def\wordnone{none}
% Allow a ragged right output to aid breaking long URL's. There can
-% be a break at the \allowbreak with no extra glue (if the existing stretch in
+% be a break at the \allowbreak with no extra glue (if the existing stretch in
% the line is sufficient), a break at the \penalty with extra glue added
% at the end of the line, or no break at all here.
-% Changing the value of the penalty and/or the amount of stretch affects how
+% Changing the value of the penalty and/or the amount of stretch affects how
% preferable one choice is over the other.
+% Check test cases in doc/texinfo-tex-test.texi before making any changes.
\def\urefallowbreak{%
\penalty0\relax
- \hskip 0pt plus 2 em\relax
+ \hskip 0pt plus 3 em\relax
\penalty1000\relax
- \hskip 0pt plus -2 em\relax
+ \hskip 0pt plus -3 em\relax
}
\urefbreakstyle after
@@ -3171,16 +3282,8 @@ end
% Default is `distinct'.
\kbdinputstyle distinct
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
-
-\def\xkey{\key}
-\def\kbdsub#1#2#3\par{%
- \def\one{#1}\def\three{#3}\def\threex{??}%
- \ifx\one\xkey\ifx\threex\three \key{#2}%
- \else{\tclose{\kbdfont\setcodequotes\look}}\fi
- \else{\tclose{\kbdfont\setcodequotes\look}}\fi
+\def\kbd#1{%
+ \tclose{\kbdfont\setcodequotes#1}%
}
% definition of @key that produces a lozenge. Doesn't adjust to text size.
@@ -3193,14 +3296,9 @@ end
% \kern-0.4pt\hrule}%
% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-% definition of @key with no lozenge. If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle. But
-% if it isn't monospace, then use \tt.
+% definition of @key with no lozenge.
%
-\def\key#1{{\setregularquotes
- \nohyphenation
- \ifmonospace\else\tt\fi
- #1}\null}
+\def\key#1{{\setregularquotes \tt #1}\null}
% @clicksequence{File @click{} Open ...}
\def\clicksequence#1{\begingroup #1\endgroup}
@@ -3344,7 +3442,7 @@ $$%
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
% except specified as a normal braced arg, so no newlines to worry about.
-%
+%
\def\outfmtnametex{tex}
%
\long\def\inlinefmt#1{\doinlinefmt #1,\finish}
@@ -3352,7 +3450,7 @@ $$%
\def\inlinefmtname{#1}%
\ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
}
-%
+%
% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
% FMTNAME is tex, else ELSE-TEXT.
\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
@@ -3368,7 +3466,7 @@ $$%
% *right* brace they would have to use a command anyway, so they may as
% well use a command to get a left brace too. We could re-use the
% delimiter character idea from \verb, but it seems like overkill.
-%
+%
\long\def\inlineraw{\tex \doinlineraw}
\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
\def\doinlinerawtwo#1,#2,\finish{%
@@ -3403,8 +3501,8 @@ $$%
\let\atchar=\@
% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
-\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\def\lbracechar{{\ifusingtt{\char123}{\ensuremath\lbrace}}}
+\def\rbracechar{{\ifusingtt{\char125}{\ensuremath\rbrace}}}
\let\{=\lbracechar
\let\}=\rbracechar
@@ -3458,8 +3556,13 @@ $$%
% Revert to plain's \scriptsize, which is 7pt.
\count255=\the\fam $\fam\count255 \scriptstyle A$%
\else
- % For 11pt, we can use our lllsize.
- \switchtolllsize A%
+ \ifx\curfontsize\smallword
+ % For footnotes and indices
+ \count255=\the\fam $\fam\count255 \scriptstyle A$%
+ \else
+ % For 11pt, we can use our lllsize.
+ \switchtolllsize A%
+ \fi
\fi
}%
\vss
@@ -3467,6 +3570,7 @@ $$%
\kern-.15em
\TeX
}
+\def\smallword{small}
% Some math mode symbols. Define \ensuremath to switch into math mode
% unless we are already there. Expansion tricks may not be needed here,
@@ -3545,7 +3649,7 @@ $$%
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
-\def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi}
+\def\pounds{{\ifusingtt{\ecfont\char"BF}{\it\$}}}
% @euro{} comes from a separate font, depending on the current style.
% We use the free feym* fonts from the eurosym package by Henrik
@@ -3614,6 +3718,9 @@ $$%
\def\quotedblbase{{\ecfont \char"12}}
\def\quotesinglbase{{\ecfont \char"0D}}
%
+\def\L{{\ecfont \char"8A}} % L with stroke
+\def\l{{\ecfont \char"AA}} % l with stroke
+%
% This positioning is not perfect (see the ogonek LaTeX package), but
% we have the precomposed glyphs for the most common cases. We put the
% tests to use those glyphs in the single \ogonek macro so we have fewer
@@ -3645,7 +3752,7 @@ $$%
% for non-CM glyphs. That is ec* for regular text and tc* for the text
% companion symbols (LaTeX TS1 encoding). Both are part of the ec
% package and follow the same conventions.
-%
+%
\def\ecfont{\etcfont{e}}
\def\tcfont{\etcfont{t}}
%
@@ -3656,21 +3763,29 @@ $$%
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
- \ifmonospace
- % typewriter:
- \font\thisecfont = #1ctt\ecsize \space at \nominalsize
- \else
- \ifx\curfontstyle\bfstylename
- % bold:
- \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
- \else
- % regular:
- \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
- \fi
- \fi
+ \ifusingtt
+ % typewriter:
+ {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
+ % else
+ {\ifx\curfontstyle\bfstylename
+ \etcfontbold{#1}%
+ \else
+ \ifrmisbold
+ \etcfontbold{#1}%
+ \else
+ % regular:
+ \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space
+ at \nominalsize
+ \fi
+ \fi}%
\thisecfont
}
+\def\etcfontbold#1{%
+ % bold:
+ \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+}
+
% @registeredsymbol - R in a circle. The font for the R should really
% be smaller yet, but lllsize is the best we can do for now.
% Adapted from the plain.tex definition of \copyright.
@@ -3683,7 +3798,10 @@ $$%
% @textdegree - the normal degrees sign.
%
-\def\textdegree{$^\circ$}
+\def\textdegree{%
+ \ifmmode ^\circ
+ \else {\tcfont \char 176}%
+ \fi}
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
@@ -3700,11 +3818,11 @@ $$%
% only change font for tt for correct kerning and to avoid using
% \ecfont unless necessary.
\def\quotedblleft{%
- \ifmonospace{\ecfont\char"10}\else{\char"5C}\fi
+ \ifusingtt{{\ecfont\char"10}}{{\char"5C}}%
}
\def\quotedblright{%
- \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi
+ \ifusingtt{{\ecfont\char"11}}{{\char`\"}}%
}
@@ -3725,17 +3843,18 @@ $$%
after the title page.}}%
\def\setshortcontentsaftertitlepage{%
\errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
- command; move your @shortcontents and @contents commands if you
+ command; move your @shortcontents and @contents commands if you
want the contents after the title page.}}%
\parseargdef\shorttitlepage{%
- \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
+ {\headingsoff \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}\pageone}
\envdef\titlepage{%
% Open one extra group, as we want to close it in the middle of \Etitlepage.
\begingroup
\parindent=0pt \textfonts
+ \headingsoff
% Leave some space at the very top of the page.
\vglue\titlepagetopglue
% No rule at page bottom unless we print one at the top with @title.
@@ -3763,15 +3882,14 @@ $$%
% If we use the new definition of \page, we always get a blank page
% after the title page, which we certainly don't want.
\oldpage
+ \pageone
\endgroup
%
- % Need this before the \...aftertitlepage checks so that if they are
- % in effect the toc pages will come out with page numbers.
- \HEADINGSon
}
\def\finishtitlepage{%
- \vskip4pt \hrule height 2pt width \hsize
+ \ifseenauthor \vskip4pt \else \vskip 0pt plus 1filll \fi
+ \hrule height 2pt width \hsize
\vskip\titlepagebottomglue
\finishedtitlepagetrue
}
@@ -3780,7 +3898,7 @@ $$%
% don't worry much about spacing, ragged right. This should be used
% inside a \vbox, and fonts need to be set appropriately first. \par should
% be specified before the end of the \vbox, since a vbox is a group.
-%
+%
\def\raggedtitlesettings{%
\rm
\hyphenpenalty=10000
@@ -3794,33 +3912,105 @@ $$%
\let\subtitlerm=\rmfont
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+\let\savedtitle\empty
+\let\savedsubtitlegroup\empty
+\let\savedauthorgroup\empty
+
\parseargdef\title{%
- \checkenv\titlepage
- \vbox{\titlefonts \raggedtitlesettings #1\par}%
- % print a rule at the page bottom also.
- \finishedtitlepagefalse
- \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+ \expandafter\ifx\thisenv\documentinfo
+ \gdef\savedtitle{#1}%
+ \else
+ \checkenv\titlepage
+ \vbox{\titlefonts \raggedtitlesettings #1\par}%
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+ \fi
}
\parseargdef\subtitle{%
- \checkenv\titlepage
- {\subtitlefont \rightline{#1}}%
+ \expandafter\ifx\thisenv\documentinfo
+ \ifx\savedsubtitlegroup\empty
+ \gdef\savedsubtitlegroup{\savedsubtitle{#1}}%
+ \else
+ \expandafter\gdef\expandafter\savedsubtitlegroup\expandafter{%
+ \savedsubtitlegroup\savedsubtitle{#1}}%
+ \fi
+ \else
+ \checkenv\titlepage
+ {\subtitlefont \rightline{#1}}%
+ \fi
}
% @author should come last, but may come many times.
% It can also be used inside @quotation.
%
\parseargdef\author{%
- \def\temp{\quotation}%
- \ifx\thisenv\temp
- \def\quotationauthor{#1}% printed in \Equotation.
- \else
- \checkenv\titlepage
- \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\secfonts\rm \leftline{#1}}%
+ \expandafter\ifx\thisenv\documentinfo
+ \ifx\savedauthorgroup\empty
+ \gdef\savedauthorgroup{\savedauthor{#1}}%
+ \else
+ \expandafter\gdef\expandafter\savedauthorgroup\expandafter{%
+ \savedauthorgroup\savedauthor{#1}}%
+ \fi
+ \else
+ \def\temp{\quotation}%
+ \ifx\thisenv\temp
+ \def\quotationauthor{#1}% printed in \Equotation.
+ \else
+ \checkenv\titlepage
+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+ {\secfonts\rm \leftline{#1}}%
+ \fi
+ \fi
+}
+
+% @maketitle
+{\obeylines
+\gdef\maketitle{%
+\titlepage
+\ifx\savedtitle\empty\else
+ \title \savedtitle
+ \ifx\savedsubtitlegroup\empty\else
+ \savedsubtitlegroup
+\fi\fi
+\ifx\savedauthorgroup\empty\else
+ \savedauthorgroup
+\fi
+% start verso page if either copying or publication text is given
+\ifx\copyingtext\relax
+ \ifx\publicationtext\relax\else
+ \page \vskip 0pt plus 1filll
\fi
+\else
+ \page \vskip 0pt plus 1filll
+\fi
+\ifx\publicationtext\relax\else
+ \insertpublication
+ \sp 1
+\fi
+\ifx\copyingtext\relax\else
+ \insertcopying
+\fi
+\end titlepage
}
+% \savedauthor{#1}, called with braces. output an @author line.
+\gdef\savedauthor#1{%
+\author#1
+}
+
+% \savedsubtitle{#1}, called with braces. output a @subtitle line.
+\gdef\savedsubtitle#1{%
+\subtitle#1
+}
+} % \obeylines
+
+% @documentinfo block
+\envdef\documentinfo{%
+}
+\def\Edocumentinfo{}%
+
% Set up page headings and footings.
@@ -3834,15 +4024,16 @@ $$%
\newtoks\oddfootline % footline on odd pages
% Now make \makeheadline and \makefootline in Plain TeX use those variables
-\headline={{\textfonts\rm
+\headline={{\textfonts\rm\frenchspacingsetting
\ifchapterpage
\ifodd\pageno\the\oddchapheadline\else\the\evenchapheadline\fi
\else
\ifodd\pageno\the\oddheadline\else\the\evenheadline\fi
\fi}}
-\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
- \else \the\evenfootline \fi}\HEADINGShook}
+\footline={{\textfonts\rm\frenchspacingsetting
+ \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}%
+ \HEADINGShook}
\let\HEADINGShook=\relax
% Commands to set those variables.
@@ -3935,46 +4126,37 @@ $$%
}
\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
-\HEADINGSoff % it's the default
-% When we turn headings on, set the page number to 1.
+% Set the page number to 1.
\def\pageone{
\global\pageno=1
\global\arabiccount = \pagecount
}
+\let\contentsalignmacro = \chappager
+
+% \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
+
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
-\def\HEADINGSdouble{%
-\pageone
-\HEADINGSdoublex
-}
-\let\contentsalignmacro = \chappager
-
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\pageone
-\HEADINGSsinglex
-}
-\def\HEADINGSon{\HEADINGSdouble}
-
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
\let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
+\def\HEADINGSdouble{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
-\global\evenchapheadline={\line{\folio\hfil}}
+\global\evenchapheadline={\line{\folio\hfil\thistitle}}
\global\oddchapheadline={\line{\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
+\def\HEADINGSsingle{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -3986,7 +4168,6 @@ $$%
% for @setchapternewpage off
\def\HEADINGSsinglechapoff{%
-\pageone
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -4356,8 +4537,7 @@ $$%
% undo it ourselves.
\def\headitemfont{\b}% for people to use in the template row; not changeable
\def\headitem{%
- \checkenv\multitable
- \crcr
+ \crcr % must appear first
\gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
\global\everytab={\bf}% can't use \headitemfont since the parsing differs
\the\everytab % for the first item
@@ -4419,7 +4599,7 @@ $$%
% Find the correct column width
\hsize=\expandafter\csname col\the\colcount\endcsname
%
- \rightskip=0pt
+ \advance\rightskip by -1\rightskip % Zero leaving only any stretch
\ifnum\colcount=1
\advance\hsize by\leftskip % Add indent of surrounding text
\else
@@ -4442,7 +4622,7 @@ $$%
\message{conditionals,}
-% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotlatex, @ifnotplaintext,
% @ifnotxml always succeed. They currently do nothing; we don't
% attempt to check whether the conditionals are properly nested. But we
% have to remember that they are conditionals, so that @end doesn't
@@ -4456,6 +4636,7 @@ $$%
\makecond{ifnotdocbook}
\makecond{ifnothtml}
\makecond{ifnotinfo}
+\makecond{ifnotlatex}
\makecond{ifnotplaintext}
\makecond{ifnotxml}
@@ -4468,10 +4649,12 @@ $$%
\def\ifdocbook{\doignore{ifdocbook}}
\def\ifhtml{\doignore{ifhtml}}
\def\ifinfo{\doignore{ifinfo}}
+\def\iflatex{\doignore{iflatex}}
\def\ifnottex{\doignore{ifnottex}}
\def\ifplaintext{\doignore{ifplaintext}}
\def\ifxml{\doignore{ifxml}}
\def\ignore{\doignore{ignore}}
+\def\latex{\doignore{latex}}
\def\menu{\doignore{menu}}
\def\xml{\doignore{xml}}
@@ -4613,7 +4796,7 @@ $$%
% Like \expandablevalue, but completely expandable (the \message in the
% definition above operates at the execution level of TeX). Used when
% writing to auxiliary files, due to the expansion that \write does.
-% If flag is undefined, pass through an unexpanded @value command: maybe it
+% If flag is undefined, pass through an unexpanded @value command: maybe it
% will be set by the time it is read back in.
%
% NB flag names containing - or _ may not work here.
@@ -4637,7 +4820,7 @@ $$%
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
-%
+%
% To get the special treatment we need for `@end ifset,' we call
% \makecond and then redefine.
%
@@ -4670,7 +4853,7 @@ $$%
% without the @) is in fact defined. We can only feasibly check at the
% TeX level, so something like `mathcode' is going to considered
% defined even though it is not a Texinfo command.
-%
+%
\makecond{ifcommanddefined}
\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
%
@@ -4710,13 +4893,11 @@ $$%
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
-% \newindex {foo} defines an index named IX.
+% \newindex {IX} defines an index named IX.
% It automatically defines \IXindex such that
% \IXindex ...rest of line... puts an entry in the index IX.
% It also defines \IXindfile to be the number of the output channel for
% the file that accumulates this index. The file's extension is IX.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
%
\def\newindex#1{%
\expandafter\chardef\csname#1indfile\endcsname=0
@@ -4778,22 +4959,7 @@ $$%
\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
\def\docodeindexxxx #1{\docind{\indexname}{#1}}
-
-% Used for the aux, toc and index files to prevent expansion of Texinfo
-% commands.
-%
-\def\atdummies{%
- \definedummyletter\@%
- \definedummyletter\ %
- \definedummyletter\{%
- \definedummyletter\}%
- \definedummyletter\&%
- %
- % Do the redefinitions.
- \definedummies
- \otherbackslash
-}
-
+
% \definedummyword defines \#1 as \string\#1\space, thus effectively
% preventing its expansion. This is used only for control words,
% not control letters, because the \space would be incorrect for
@@ -4809,110 +4975,91 @@ $$%
%
\def\definedummyword #1{\def#1{\string#1\space}}%
\def\definedummyletter#1{\def#1{\string#1}}%
-\let\definedummyaccent\definedummyletter
-% Called from \atdummies to prevent the expansion of commands.
+% Used for the aux, toc and index files to prevent expansion of Texinfo
+% commands. Most of the commands are controlled through the
+% \ifdummies conditional.
%
-\def\definedummies{%
+\def\atdummies{%
+ \dummiestrue
%
- \let\commondummyword\definedummyword
- \let\commondummyletter\definedummyletter
- \let\commondummyaccent\definedummyaccent
- \commondummiesnofonts
+ \definedummyletter\@%
+ \definedummyletter\ %
+ \definedummyletter\{%
+ \definedummyletter\}%
+ \definedummyletter\&%
%
\definedummyletter\_%
\definedummyletter\-%
%
- % Non-English letters.
- \definedummyword\AA
- \definedummyword\AE
- \definedummyword\DH
- \definedummyword\L
- \definedummyword\O
- \definedummyword\OE
- \definedummyword\TH
- \definedummyword\aa
- \definedummyword\ae
- \definedummyword\dh
- \definedummyword\exclamdown
- \definedummyword\l
- \definedummyword\o
- \definedummyword\oe
- \definedummyword\ordf
- \definedummyword\ordm
- \definedummyword\questiondown
- \definedummyword\ss
- \definedummyword\th
- %
- % Although these internal commands shouldn't show up, sometimes they do.
- \definedummyword\bf
- \definedummyword\gtr
- \definedummyword\hat
- \definedummyword\less
- \definedummyword\sf
- \definedummyword\sl
- \definedummyword\tclose
- \definedummyword\tt
- %
- \definedummyword\LaTeX
- \definedummyword\TeX
- %
- % Assorted special characters.
- \definedummyword\ampchar
- \definedummyword\atchar
- \definedummyword\arrow
- \definedummyword\backslashchar
- \definedummyword\bullet
- \definedummyword\comma
- \definedummyword\copyright
- \definedummyword\registeredsymbol
- \definedummyword\dots
- \definedummyword\enddots
- \definedummyword\entrybreak
- \definedummyword\equiv
- \definedummyword\error
- \definedummyword\euro
- \definedummyword\expansion
- \definedummyword\geq
- \definedummyword\guillemetleft
- \definedummyword\guillemetright
- \definedummyword\guilsinglleft
- \definedummyword\guilsinglright
- \definedummyword\lbracechar
- \definedummyword\leq
- \definedummyword\mathopsup
- \definedummyword\minus
- \definedummyword\ogonek
- \definedummyword\pounds
- \definedummyword\point
- \definedummyword\print
- \definedummyword\quotedblbase
- \definedummyword\quotedblleft
- \definedummyword\quotedblright
- \definedummyword\quoteleft
- \definedummyword\quoteright
- \definedummyword\quotesinglbase
- \definedummyword\rbracechar
- \definedummyword\result
- \definedummyword\sub
- \definedummyword\sup
- \definedummyword\textdegree
- %
\definedummyword\subentry
%
% We want to disable all macros so that they are not expanded by \write.
+ \let\commondummyword\definedummyword
\macrolist
\let\value\dummyvalue
%
- \normalturnoffactive
-}
-
-% \commondummiesnofonts: common to \definedummies and \indexnofonts.
-% Define \commondummyletter, \commondummyaccent and \commondummyword before
-% using. Used for accents, font commands, and various control letters.
-%
-\def\commondummiesnofonts{%
- % Control letters and accents.
+ \turnoffactive
+}
+
+\newif\ifdummies
+\newif\ifindexnofonts
+
+\def\commondummyletter#1{%
+ \expandafter\let\csname\string#1:impl\endcsname#1%
+ \edef#1{%
+ \noexpand\ifindexnofonts
+ % empty expansion
+ \noexpand\else
+ \noexpand\ifdummies\string#1%
+ \noexpand\else
+ \noexpand\jumptwofi % dispose of the \fi
+ \expandafter\noexpand\csname\string#1:impl\endcsname
+ \noexpand\fi
+ \noexpand\fi}%
+}
+
+\def\commondummyaccent#1{%
+ \expandafter\let\csname\string#1:impl\endcsname#1%
+ \edef#1{%
+ \noexpand\ifindexnofonts
+ \noexpand\expandafter % dispose of \else ... \fi
+ \noexpand\asis
+ \noexpand\else
+ \noexpand\ifdummies\string#1%
+ \noexpand\else
+ \noexpand\jumptwofi % dispose of the \fi
+ \expandafter\noexpand\csname\string#1:impl\endcsname
+ \noexpand\fi
+ \noexpand\fi}%
+}
+
+% Like \commondummyaccent but add a \space at the end of the dummy expansion
+% #2 is the expansion used for \indexnofonts. #2 is always followed by
+% \asis to remove a pair of following braces.
+\def\commondummyword#1#2{%
+ \expandafter\let\csname\string#1:impl\endcsname#1%
+ \expandafter\def\csname\string#1:ixnf\endcsname{#2\asis}%
+ \edef#1{%
+ \noexpand\ifindexnofonts
+ \noexpand\expandafter % dispose of \else ... \fi
+ \expandafter\noexpand\csname\string#1:ixnf\endcsname
+ \noexpand\else
+ \noexpand\ifdummies\string#1\space
+ \noexpand\else
+ \noexpand\jumptwofi % dispose of the \fi \fi
+ \expandafter\noexpand\csname\string#1:impl\endcsname
+ \noexpand\fi
+ \noexpand\fi}%
+}
+\def\jumptwofi#1\fi\fi{\fi\fi#1}
+
+% For \atdummies and \indexnofonts. \atdummies sets
+% \dummiestrue and \indexnofonts sets \indexnofontstrue.
+\def\definedummies{
+ % @-sign is always an escape character when reading auxiliary files
+ \escapechar = `\@
+ %
\commondummyletter\!%
\commondummyaccent\"%
\commondummyaccent\'%
@@ -4926,58 +5073,124 @@ $$%
\commondummyaccent\^%
\commondummyaccent\`%
\commondummyaccent\~%
- \commondummyword\u
- \commondummyword\v
- \commondummyword\H
- \commondummyword\dotaccent
- \commondummyword\ogonek
- \commondummyword\ringaccent
- \commondummyword\tieaccent
- \commondummyword\ubaraccent
- \commondummyword\udotaccent
- \commondummyword\dotless
+ %
+ % Control letters and accents.
+ \commondummyword\u {}%
+ \commondummyword\v {}%
+ \commondummyword\H {}%
+ \commondummyword\dotaccent {}%
+ \commondummyword\ogonek {}%
+ \commondummyword\ringaccent {}%
+ \commondummyword\tieaccent {}%
+ \commondummyword\ubaraccent {}%
+ \commondummyword\udotaccent {}%
+ \commondummyword\dotless {}%
%
% Texinfo font commands.
- \commondummyword\b
- \commondummyword\i
- \commondummyword\r
- \commondummyword\sansserif
- \commondummyword\sc
- \commondummyword\slanted
- \commondummyword\t
+ \commondummyword\b {}%
+ \commondummyword\i {}%
+ \commondummyword\r {}%
+ \commondummyword\sansserif {}%
+ \commondummyword\sc {}%
+ \commondummyword\slanted {}%
+ \commondummyword\t {}%
%
% Commands that take arguments.
- \commondummyword\abbr
- \commondummyword\acronym
- \commondummyword\anchor
- \commondummyword\cite
- \commondummyword\code
- \commondummyword\command
- \commondummyword\dfn
- \commondummyword\dmn
- \commondummyword\email
- \commondummyword\emph
- \commondummyword\env
- \commondummyword\file
- \commondummyword\image
- \commondummyword\indicateurl
- \commondummyword\inforef
- \commondummyword\kbd
- \commondummyword\key
- \commondummyword\math
- \commondummyword\option
- \commondummyword\pxref
- \commondummyword\ref
- \commondummyword\samp
- \commondummyword\strong
- \commondummyword\tie
- \commondummyword\U
- \commondummyword\uref
- \commondummyword\url
- \commondummyword\var
- \commondummyword\verb
- \commondummyword\w
- \commondummyword\xref
+ \commondummyword\abbr {}%
+ \commondummyword\acronym {}%
+ \commondummyword\anchor {}%
+ \commondummyword\cite {}%
+ \commondummyword\code {}%
+ \commondummyword\command {}%
+ \commondummyword\dfn {}%
+ \commondummyword\dmn {}%
+ \commondummyword\email {}%
+ \commondummyword\emph {}%
+ \commondummyword\env {}%
+ \commondummyword\file {}%
+ \commondummyword\image {}%
+ \commondummyword\indicateurl{}%
+ \commondummyword\inforef {}%
+ \commondummyword\kbd {}%
+ \commondummyword\key {}%
+ \commondummyword\link {}%
+ \commondummyword\math {}%
+ \commondummyword\option {}%
+ \commondummyword\pxref {}%
+ \commondummyword\ref {}%
+ \commondummyword\samp {}%
+ \commondummyword\strong {}%
+ \commondummyword\tie {}%
+ \commondummyword\U {}%
+ \commondummyword\uref {}%
+ \commondummyword\url {}%
+ \commondummyword\var {}%
+ \commondummyword\verb {}%
+ \commondummyword\w {}%
+ \commondummyword\xref {}%
+ %
+ \commondummyword\AA {AA}%
+ \commondummyword\AE {AE}%
+ \commondummyword\DH {DZZ}%
+ \commondummyword\L {L}%
+ \commondummyword\O {O}%
+ \commondummyword\OE {OE}%
+ \commondummyword\TH {TH}%
+ \commondummyword\aa {aa}%
+ \commondummyword\ae {ae}%
+ \commondummyword\dh {dzz}%
+ \commondummyword\exclamdown {!}%
+ \commondummyword\l {l}%
+ \commondummyword\o {o}%
+ \commondummyword\oe {oe}%
+ \commondummyword\ordf {a}%
+ \commondummyword\ordm {o}%
+ \commondummyword\questiondown {?}%
+ \commondummyword\ss {ss}%
+ \commondummyword\th {th}%
+ %
+ \commondummyword\LaTeX {LaTeX}%
+ \commondummyword\TeX {TeX}%
+ %
+ % Assorted special characters.
+ \commondummyword\ampchar {\normalamp}%
+ \commondummyword\atchar {\@}%
+ \commondummyword\arrow {->}%
+ \commondummyword\backslashchar {\realbackslash}%
+ \commondummyword\bullet {bullet}%
+ \commondummyword\comma {,}%
+ \commondummyword\copyright {copyright}%
+ \commondummyword\dots {...}%
+ \commondummyword\enddots {...}%
+ \commondummyword\entrybreak {}%
+ \commondummyword\equiv {===}%
+ \commondummyword\error {error}%
+ \commondummyword\euro {euro}%
+ \commondummyword\expansion {==>}%
+ \commondummyword\geq {>=}%
+ \commondummyword\guillemetleft {<<}%
+ \commondummyword\guillemetright {>>}%
+ \commondummyword\guilsinglleft {<}%
+ \commondummyword\guilsinglright {>}%
+ \commondummyword\lbracechar {\{}%
+ \commondummyword\leq {<=}%
+ \commondummyword\mathopsup {sup}%
+ \commondummyword\minus {-}%
+ \commondummyword\pounds {pounds}%
+ \commondummyword\point {.}%
+ \commondummyword\print {-|}%
+ \commondummyword\quotedblbase {"}%
+ \commondummyword\quotedblleft {"}%
+ \commondummyword\quotedblright {"}%
+ \commondummyword\quoteleft {`}%
+ \commondummyword\quoteright {'}%
+ \commondummyword\quotesinglbase {,}%
+ \commondummyword\rbracechar {\}}%
+ \commondummyword\registeredsymbol {R}%
+ \commondummyword\result {=>}%
+ \commondummyword\sub {}%
+ \commondummyword\sup {}%
+ \commondummyword\textdegree {o}%
}
\let\indexlbrace\relax
@@ -4995,25 +5208,24 @@ $$%
\catcode`\-=13
\catcode`\`=13
\gdef\indexnonalnumdisappear{%
- \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else
+ \ifflagclear{txiindexlquoteignore}{}{%
% @set txiindexlquoteignore makes us ignore left quotes in the sort term.
% (Introduced for FSFS 2nd ed.)
\let`=\empty
- \fi
+ }%
%
- \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else
+ \ifflagclear{txiindexbackslashignore}{}{%
\backslashdisappear
- \fi
- %
- \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else
+ }%
+ \ifflagclear{txiindexhyphenignore}{}{%
\def-{}%
- \fi
- \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else
+ }%
+ \ifflagclear{txiindexlessthanignore}{}{%
\def<{}%
- \fi
- \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else
+ }%
+ \ifflagclear{txiindexatsignignore}{}{%
\def\@{}%
- \fi
+ }%
}
\gdef\indexnonalnumreappear{%
@@ -5029,18 +5241,7 @@ $$%
% would be for a given command (usually its argument).
%
\def\indexnofonts{%
- % Accent commands should become @asis.
- \def\commondummyaccent##1{\let##1\asis}%
- % We can just ignore other control letters.
- \def\commondummyletter##1{\let##1\empty}%
- % All control words become @asis by default; overrides below.
- \let\commondummyword\commondummyaccent
- \commondummiesnofonts
- %
- % Don't no-op \tt, since it isn't a user-level command
- % and is used in the definitions of the active chars like <, >, |, etc.
- % Likewise with the other plain tex font commands.
- %\let\tt=\asis
+ \indexnofontstrue
%
\def\ { }%
\def\@{@}%
@@ -5049,88 +5250,23 @@ $$%
%
\uccode`\1=`\{ \uppercase{\def\{{1}}%
\uccode`\1=`\} \uppercase{\def\}{1}}%
- \let\lbracechar\{%
- \let\rbracechar\}%
- %
- % Non-English letters.
- \def\AA{AA}%
- \def\AE{AE}%
- \def\DH{DZZ}%
- \def\L{L}%
- \def\OE{OE}%
- \def\O{O}%
- \def\TH{TH}%
- \def\aa{aa}%
- \def\ae{ae}%
- \def\dh{dzz}%
- \def\exclamdown{!}%
- \def\l{l}%
- \def\oe{oe}%
- \def\ordf{a}%
- \def\ordm{o}%
- \def\o{o}%
- \def\questiondown{?}%
- \def\ss{ss}%
- \def\th{th}%
- %
- \let\do\indexnofontsdef
- %
- \do\LaTeX{LaTeX}%
- \do\TeX{TeX}%
+ \def\lbracechar##1{\{}%
+ \def\rbracechar##1{\}}%
%
- % Assorted special characters.
- \do\atchar{@}%
- \do\arrow{->}%
- \do\bullet{bullet}%
- \do\comma{,}%
- \do\copyright{copyright}%
- \do\dots{...}%
- \do\enddots{...}%
- \do\equiv{==}%
- \do\error{error}%
- \do\euro{euro}%
- \do\expansion{==>}%
- \do\geq{>=}%
- \do\guillemetleft{<<}%
- \do\guillemetright{>>}%
- \do\guilsinglleft{<}%
- \do\guilsinglright{>}%
- \do\leq{<=}%
- \do\lbracechar{\{}%
- \do\minus{-}%
- \do\point{.}%
- \do\pounds{pounds}%
- \do\print{-|}%
- \do\quotedblbase{"}%
- \do\quotedblleft{"}%
- \do\quotedblright{"}%
- \do\quoteleft{`}%
- \do\quoteright{'}%
- \do\quotesinglbase{,}%
- \do\rbracechar{\}}%
- \do\registeredsymbol{R}%
- \do\result{=>}%
- \do\textdegree{o}%
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
- % makeinfo does not expand macros in the argument to @deffn, which ends up
- % writing an index entry, and texindex isn't prepared for an index sort entry
- % that starts with \.
%
% Since macro invocations are followed by braces, we can just redefine them
% to take a single TeX argument. The case of a macro invocation that
% goes to end-of-line is not handled.
%
+ \def\commondummyword##1{\let##1\asis}%
\macrolist
\let\value\indexnofontsvalue
}
-% Give the control sequence a definition that removes the {} that follows
-% its use, e.g. @AA{} -> AA
-\def\indexnofontsdef#1#2{\def#1##1{#2}}%
-
-
+
% #1 is the index name, #2 is the entry text.
@@ -5171,7 +5307,7 @@ $$%
\ifx\suffix\indexisfl\def\suffix{f1}\fi
% Open the file
\immediate\openout\csname#1indfile\endcsname \jobname.\suffix
- % Using \immediate above here prevents an object entering into the current
+ % Using \immediate above here prevents an object entering into the current
% box, which could confound checks such as those in \safewhatsit for
% preceding skips.
\typeout{Writing index file \jobname.\suffix}%
@@ -5223,7 +5359,7 @@ $$%
\ifx\segment\isfinish
\else
%
- % Fully expand the segment, throwing away any @sortas directives, and
+ % Fully expand the segment, throwing away any @sortas directives, and
% trim spaces.
\edef\trimmed{\segment}%
\edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
@@ -5260,7 +5396,10 @@ $$%
\xdef\trimmed{\segment}%
\xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
\xdef\indexsortkey{\trimmed}%
- \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+ \ifx\indexsortkey\empty
+ \message{Empty index sort key near line \the\inputlineno}%
+ \xdef\indexsortkey{ }%
+ \fi
}\fi
%
% Append to \fullindexsortkey.
@@ -5284,14 +5423,14 @@ $$%
% the current value of \escapechar.
\def\escapeisbackslash{\escapechar=`\\}
-% Use \ in index files by default. texi2dvi didn't support @ as the escape
-% character (as it checked for "\entry" in the files, and not "@entry"). When
-% the new version of texi2dvi has had a chance to become more prevalent, then
-% the escape character can change back to @ again. This should be an easy
-% change to make now because both @ and \ are only used as escape characters in
-% index files, never standing for themselves.
+% Uncomment to use \ in index files by default. Old texi2dvi (before 2019)
+% didn't support @ as the escape character (as it checked for "\entry" in
+% the files, and not "@entry").
+% In the future we can remove this flag and simplify the code for
+% index files and backslashes, once the support is no longer likely to be
+% useful.
%
-\set txiindexescapeisbackslash
+% \set txiindexescapeisbackslash
% Write the entry in \indextext to the index file.
%
@@ -5305,16 +5444,14 @@ $$%
%
\atdummies
%
- \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax\else
- \escapeisbackslash
- \fi
+ \ifflagclear{txiindexescapeisbackslash}{}{\escapeisbackslash}%
%
% For texindex which always views { and } as separators.
\def\{{\lbracechar{}}%
\def\}{\rbracechar{}}%
\uccode`\~=`\\ \uppercase{\def~{\backslashchar{}}}%
%
- % Split the entry into primary entry and any subentries, and get the index
+ % Split the entry into primary entry and any subentries, and get the index
% sort key.
\splitindexentry\indextext
%
@@ -5459,6 +5596,8 @@ $$%
\tolerance = 9500
\plainfrenchspacing
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
+ \let\entry\indexentry
+ \ifxetex\xetexpreauxfile\fi
%
% See comment in \requireopenindexfile.
\def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
@@ -5484,40 +5623,48 @@ $$%
\fi
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
\endgroup}
+% Checked in @bye
+\let\byeerror\relax
+
% If the index file starts with a backslash, forgo reading the index
% file altogether. If somebody upgrades texinfo.tex they may still have
% old index files using \ as the escape character. Reading this would
% at best lead to typesetting garbage, at worst a TeX syntax error.
\def\printindexzz#1#2\finish{%
- \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax
+ \ifflagclear{txiindexescapeisbackslash}{%
\uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
- \expandafter\ifx\csname SETtxiskipindexfileswithbackslash\endcsname\relax
-\errmessage{%
-ERROR: A sorted index file in an obsolete format was skipped.
+ \ifflagclear{txiskipindexfileswithbackslash}{%
+ % Delay the error message until the very end to give a chance
+ % for the whole index to be output as input for texindex.
+ \global\def\byeerror{%
+ERROR: A sorted index file in an obsolete format was skipped.
To fix this problem, please upgrade your version of 'texi2dvi'
or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.
-If you are using an old version of 'texindex' (part of the Texinfo
+If you are using an old version of 'texindex' (part of the Texinfo
distribution), you may also need to upgrade to a newer version (at least 6.0).
You may be able to typeset the index if you run
'texindex \jobname.\indexname' yourself.
-You could also try setting the 'txiindexescapeisbackslash' flag by
+You could also try setting the 'txiindexescapeisbackslash' flag by
running a command like
-'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'. If you do
+'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'. If you do
this, Texinfo will try to use index files in the old format.
-If you continue to have problems, deleting the index files and starting again
+If you continue to have problems, deleting the index files and starting again
might help (with 'rm \jobname.?? \jobname.??s')%
}%
- \else
+ }{%
(Skipped sorted index file in obsolete format)
- \fi
+ }%
\else
\begindoublecolumns
+ \ifxetex\xetexpreauxfile\fi
\input \jobname.\indexname s
+ \ifxetex\xetexpostauxfile\fi
\enddoublecolumns
\fi
- \else
+ }{%
\begindoublecolumns
\catcode`\\=0\relax
%
@@ -5525,11 +5672,39 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% should work because we (hopefully) don't otherwise use @ in index files.
%\catcode`\@=12\relax
\catcode`\@=0\relax
+ \ifxetex\xetexpreauxfile\fi
\input \jobname.\indexname s
+ \ifxetex\xetexpostauxfile\fi
\enddoublecolumns
+ }%
+}
+
+\def\indexentry#1#2{%
+ \let\entrypagetarget\empty
+ \ifpdforxetex
+ % only link the index text to the page if no comma appears in the
+ % list of pages, i.e. there is only one page
+ \checkpagelistcomma{#2}\pagelistcomma
+ \expandafter\ifcase\pagelistcomma
+ \def\entrypagetarget{#2}%
+ \fi
+ \fi%
+ \entryinternal{#1}{#2}%
+}
+
+\def\checkpagelistcomma#1#2{%
+ \checkpagelistcommaxx#2#1,\finish
+}
+\def\checkpagelistcommaxx#1#2,#3\finish{%
+ \def\tmp{#3}%
+ \ifx\tmp\empty
+ \def#1{0\relax}
+ \else
+ \def#1{1\relax}
\fi
}
+
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
@@ -5566,7 +5741,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\initial{%
\bgroup
- \initialglyphs
\initialx
}
@@ -5579,7 +5753,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% bottom of a column to reduce an increase in inter-line spacing.
\nobreak
\vskip 0pt plus 5\baselineskip
- \penalty -300
+ \penalty -300
\vskip 0pt plus -5\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
@@ -5589,7 +5763,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus 1\baselineskip
- \leftline{\secfonts \kern-0.05em \secbf #1}%
+ \doindexinitialentry{#1}%
+ \initialglyphs
+ \leftline{%
+ \secfonts \kern-0.05em \secbf #1}%
% \secfonts is inside the argument of \leftline so that the change of
% \baselineskip will not affect any glue inserted before the vbox that
% \leftline creates.
@@ -5599,14 +5776,48 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\egroup % \initialglyphs
}
+\def\doindexinitialentry#1{%
+ \ifpdforxetex
+ \global\advance\idxinitialno by 1
+ \def\indexlbrace{\{}%
+ \def\indexrbrace{\}}%
+ \def\indexbackslash{\realbackslash}%
+ \def\indexatchar{\@}%
+ \writetocentry{idxinitial}{\asis #1}{IDX\the\idxinitialno}%
+ % The @asis removes a pair of braces around e.g. {@indexatchar} that
+ % are output by texindex.
+ %
+ \pdfmkdest{idx.\asis #1.IDX\the\idxinitialno}%
+ \fi
+}
+
+% No listing in TOC
+\def\idxinitialentry#1#2#3#4{}
+
+% For index initials.
+\newcount\idxinitialno \idxinitialno=1
+
+
\newdimen\entryrightmargin
\entryrightmargin=0pt
-% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
-% then page number (#2) flushed to the right margin. It is used for index
-% and table of contents entries. The paragraph is indented by \leftskip.
-%
-\def\entry{%
+% amount to indent subsequent lines in an entry when it spans more than
+% one line.
+\newdimen\entrycontskip
+\entrycontskip=1em
+
+% for PDF output, whether to make the text of the entry a link to the section.
+% set for @contents and @shortcontents.
+\newif\iflinkentrytext
+
+% \entryinternal typesets a paragraph consisting of the text (#1), dot
+% leaders, and then page number (#2) flushed to the right margin. It is
+% used for index and table of contents entries. The paragraph is indented
+% by \leftskip.
+% For PDF output, if \linkentrytexttrue and \tocnodetarget is set, link text
+% to the referenced node. Else if \entrypagetarget is set, link text to the
+% page.
+\def\entryinternal{%
\begingroup
%
% Start a new paragraph if necessary, so our assignments below can't
@@ -5628,7 +5839,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
- % Save the text of the entry
+ % Save the text of the entry in \boxA
\global\setbox\boxA=\hbox\bgroup
\bgroup % Instead of the swallowed brace.
\noindent
@@ -5638,12 +5849,31 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% with catcodes occurring.
}
{\catcode`\@=11
+% #1 is the page number
\gdef\finishentry#1{%
- \egroup % end box A
+ \egroup % end \boxA
\dimen@ = \wd\boxA % Length of text of entry
+ % add any leaders and page number to \boxA.
\global\setbox\boxA=\hbox\bgroup
- \unhbox\boxA
- % #1 is the page number.
+ \ifpdforxetex
+ \iflinkentrytext
+ \ifx\tocnodetarget\empty
+ \unhbox\boxA
+ \else
+ \startxreflink{\tocnodetarget}{}%
+ \unhbox\boxA
+ \endlink
+ \fi
+ \else
+ \ifx\entrypagetarget\empty
+ \unhbox\boxA
+ \else
+ \pdflinkpage{\entrypagetarget}{\unhbox\boxA}%
+ \fi
+ \fi
+ \else
+ \unhbox\boxA
+ \fi
%
% Get the width of the page numbers, and only use
% leaders if they are present.
@@ -5654,14 +5884,23 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\null\nobreak\indexdotfill % Have leaders before the page number.
%
+ \hskip\skip\thinshrinkable
\ifpdforxetex
- \pdfgettoks#1.%
- \hskip\skip\thinshrinkable\the\toksA
+ \ifx\tocnodetarget\empty
+ \pdfgettoks#1.%
+ \the\toksA
+ \else
+ % Should just be a single page number in toc
+ \startxreflink{\tocnodetarget}{}%
+ #1\endlink
+ \fi
\else
- \hskip\skip\thinshrinkable #1%
+ #1%
\fi
\fi
\egroup % end \boxA
+ %
+ % now output
\ifdim\wd\boxB = 0pt
\noindent\unhbox\boxA\par
\nobreak
@@ -5679,41 +5918,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\parfillskip=0pt plus -1fill
%
\advance\rightskip by \entryrightmargin
- % Determine how far we can stretch into the margin.
- % This allows, e.g., "Appendix H GNU Free Documentation License" to
- % fit on one line in @letterpaper format.
- \ifdim\entryrightmargin>2.1em
- \dimen@i=2.1em
- \else
- \dimen@i=0em
- \fi
- \advance \parfillskip by 0pt minus 1\dimen@i
%
\dimen@ii = \hsize
\advance\dimen@ii by -1\leftskip
\advance\dimen@ii by -1\entryrightmargin
- \advance\dimen@ii by 1\dimen@i
\ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
\ifdim\dimen@ > 0.8\dimen@ii % due to long index text
- % Try to split the text roughly evenly. \dimen@ will be the length of
- % the first line.
- \dimen@ = 0.7\dimen@
- \dimen@ii = \hsize
- \ifnum\dimen@>\dimen@ii
- % If the entry is too long (for example, if it needs more than
- % two lines), use all the space in the first line.
- \dimen@ = \dimen@ii
- \fi
\advance\leftskip by 0pt plus 1fill % ragged right
- \advance \dimen@ by 1\rightskip
- \parshape = 2 0pt \dimen@ 0em \dimen@ii
- % Ideally we'd add a finite glue at the end of the first line only,
- % instead of using \parshape with explicit line lengths, but TeX
- % doesn't seem to provide a way to do such a thing.
%
% Indent all lines but the first one.
- \advance\leftskip by 1em
- \advance\parindent by -1em
+ \advance\leftskip by \entrycontskip
+ \advance\parindent by -\entrycontskip
\fi\fi
\indent % start paragraph
\unhbox\boxA
@@ -5736,12 +5951,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\newskip\thinshrinkable
\skip\thinshrinkable=.15em minus .15em
-% Like plain.tex's \dotfill, except uses up at least 1 em.
+% Like plain.tex's \dotfill, except uses up at least 0.5 em.
% The filll stretch here overpowers both the fil and fill stretch to push
% the page number to the right.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
-
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 0.5em plus 1filll}
\def\primary #1{\line{#1\hfil}}
@@ -5794,7 +6008,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% below is chosen so that the gutter has the same value (well, +-<1pt)
% as it did when we hard-coded it.
%
- % We put the result in a separate register, \doublecolumhsize, so we
+ % We put the result in a separate register, \doublecolumnhsize, so we
% can restore it in \pagesofar, after \hsize itself has (potentially)
% been clobbered.
%
@@ -5903,7 +6117,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\newbox\balancedcolumns
\setbox\balancedcolumns=\vbox{shouldnt see this}%
%
-% Only called for the last of the double column material. \doublecolumnout
+% Only called for the last of the double column material. \doublecolumnout
% does the others.
\def\balancecolumns{%
\setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
@@ -5931,7 +6145,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}%
% Now the left column is in box 1, and the right column in box 3.
%
- % Check whether the left column has come out higher than the page itself.
+ % Check whether the left column has come out higher than the page itself.
% (Note that we have doubled \vsize for the double columns, so
% the actual height of the page is 0.5\vsize).
\ifdim2\ht1>\vsize
@@ -5963,7 +6177,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Chapters, sections, etc.
% Let's start with @part.
-\outer\parseargdef\part{\partzzz{#1}}
+\parseargdef\part{\partzzz{#1}}
\def\partzzz#1{%
\chapoddpage
\null
@@ -6189,8 +6403,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% normally unnmhead0 calls unnumberedzzz:
\outer\parseargdef\unnumbered{\unnmhead0{#1}}
\def\unnumberedzzz#1{%
- \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
- \global\advance\unnumberedno by 1
+ \global\advance\unnumberedno by 1
%
% Since an unnumbered has no number, no prefix for figures.
\global\let\chaplevelprefix = \empty
@@ -6228,7 +6441,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\top\unnumbered
% Sections.
-%
+%
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
\def\seczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
@@ -6246,12 +6459,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% normally calls unnumberedseczzz:
\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
\def\unnumberedseczzz#1{%
- \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
- \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
+ \global\advance\unnumberedno by 1
+ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno}%
}
% Subsections.
-%
+%
% normally calls numberedsubseczzz:
\outer\parseargdef\numberedsubsec{\numhead2{#1}}
\def\numberedsubseczzz#1{%
@@ -6270,13 +6483,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% normally calls unnumberedsubseczzz:
\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
\def\unnumberedsubseczzz#1{%
- \global\subsubsecno=0 \global\advance\subsecno by 1
- \sectionheading{#1}{subsec}{Ynothing}%
- {\the\unnumberedno.\the\secno.\the\subsecno}%
+ \global\advance\unnumberedno by 1
+ \sectionheading{#1}{subsec}{Ynothing}{\the\unnumberedno}%
}
% Subsubsections.
-%
+%
% normally numberedsubsubseczzz:
\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
\def\numberedsubsubseczzz#1{%
@@ -6296,9 +6508,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% normally unnumberedsubsubseczzz:
\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
\def\unnumberedsubsubseczzz#1{%
- \global\advance\subsubsecno by 1
- \sectionheading{#1}{subsubsec}{Ynothing}%
- {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
+ \global\advance\unnumberedno by 1
+ \sectionheading{#1}{subsubsec}{Ynothing}{\the\unnumberedno}%
}
% These macros control what the section commands do, according
@@ -6330,6 +6541,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
+% @xrefname - give text with printed name for linking to node and allow
+% referencing node, but do not print any heading.
+\parseargdef\xrefname{\donoderef{Yomitfromtoc}{#1}}%
+
% These macros generate a chapter, section, etc. heading only
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
@@ -6361,7 +6576,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi
}
-\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
+\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname\HEADINGSon}
\def\CHAPPAGoff{%
\global\let\contentsalignmacro = \chappager
@@ -6378,7 +6593,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\global\let\pchapsepmacro=\chapoddpage
\global\def\HEADINGSon{\HEADINGSdouble}}
-\CHAPPAGon
+\setchapternewpage on
% \chapmacro - Chapter opening.
%
@@ -6391,6 +6606,16 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\Yappendixkeyword{Yappendix}
\def\Yomitfromtockeyword{Yomitfromtoc}
%
+%
+% Definitions for @thischapter. These can be overridden in translation
+% files.
+\def\thischapterAppendix{%
+ \putwordAppendix{} \thischapternum: \thischaptername}
+
+\def\thischapterChapter{%
+ \putwordChapter{} \thischapternum: \thischaptername}
+%
+%
\def\chapmacro#1#2#3{%
\expandafter\ifx\thisenv\titlepage\else
\checkenv{}% chapters, etc., should not start inside an environment.
@@ -6413,22 +6638,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xdef\currentchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\appendixletter}%
- % \noexpand\putwordAppendix avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
- \noexpand\thischapternum:
- \noexpand\thischaptername}%
+ \let\noexpand\thischapter\noexpand\thischapterAppendix
}%
\else
\toks0={#1}%
\xdef\currentchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\the\chapno}%
- % \noexpand\putwordChapter avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
- \noexpand\thischapternum:
- \noexpand\thischaptername}%
+ \let\noexpand\thischapter\noexpand\thischapterChapter
}%
\fi\fi\fi
%
@@ -6449,11 +6666,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\chapfonts \rm
\let\footnote=\errfootnoteheading % give better error message
%
- % Have to define \currentsection before calling \donoderef, because the
- % xref code eventually uses it. On the other hand, it has to be called
- % after \pchapsepmacro, or the headline will change too soon.
- \gdef\currentsection{#1}%
- %
% Only insert the separating space if we have a chapter/appendix
% number, and don't print the unnumbered ``number''.
\ifx\temptype\Ynothingkeyword
@@ -6480,7 +6692,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% been typeset. If the destination for the pdf outline is after the
% text, then jumping from the outline may wind up with the text not
% being visible, for instance under high magnification.
- \donoderef{#2}%
+ \donoderef{#2}{#1}%
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
@@ -6514,6 +6726,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\subsubsecheadingskip{\subsecheadingskip}
\def\subsubsecheadingbreak{\subsecheadingbreak}
+% Definition for @thissection. This can be overridden in translation
+% files.
+\def\thissectionDef{%
+ \putwordSection{} \thissectionnum: \thissectionname}
+%
+
% Print any size, any type, section title.
%
@@ -6555,11 +6773,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xdef\currentsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- % \noexpand\putwordSection avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thissection{\noexpand\putwordSection{}
- \noexpand\thissectionnum:
- \noexpand\thissectionname}%
+ \let\noexpand\thissection\noexpand\thissectionDef
}%
\fi
\else
@@ -6568,11 +6782,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xdef\currentsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- % \noexpand\putwordSection avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thissection{\noexpand\putwordSection{}
- \noexpand\thissectionnum:
- \noexpand\thissectionname}%
+ \let\noexpand\thissection\noexpand\thissectionDef
}%
\fi
\fi\fi\fi
@@ -6598,21 +6808,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unn}%
- \gdef\currentsection{#1}%
\else\ifx\temptype\Yomitfromtockeyword
- % for @headings -- no section number, don't include in toc,
- % and don't redefine \currentsection.
+ % for @headings -- no section number, don't include in toc.
\setbox0 = \hbox{}%
\def\toctype{omit}%
\let\sectionlevel=\empty
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{#4\enspace}%
\def\toctype{app}%
- \gdef\currentsection{#1}%
\else
\setbox0 = \hbox{#4\enspace}%
\def\toctype{num}%
- \gdef\currentsection{#1}%
\fi\fi\fi
%
% Write the toc entry (before \donoderef). See comments in \chapmacro.
@@ -6620,7 +6826,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
% Write the node reference (= pdf destination for pdftex).
% Again, see comments in \chapmacro.
- \donoderef{#3}%
+ \donoderef{#3}{#1}%
%
% Interline glue will be inserted when the vbox is completed.
% That glue will be a valid breakpoint for the page, since it'll be
@@ -6732,18 +6938,95 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\input \tocreadfilename
}
+% process toc file to find the maximum width of the section numbers for
+% each chapter
+\def\findsecnowidths{%
+ \begingroup
+ \setupdatafile
+ \activecatcodes
+ \secentryfonts
+ % Redefinitions
+ \def\numchapentry##1##2##3##4{%
+ \def\curchapname{secnowidth-##2}%
+ \curchapmax=0pt
+ }%
+ \let\appentry\numchapentry
+ %
+ \def\numsecentry##1##2##3##4{%
+ \def\cursecname{secnowidth-##2}%
+ \cursecmax=0pt
+ %
+ \setbox0=\hbox{##2}%
+ \ifdim\wd0>\curchapmax
+ \curchapmax=\wd0
+ \expandafter\xdef\csname\curchapname\endcsname{\the\wd0}%
+ \fi
+ }%
+ \let\appsecentry\numsecentry
+ %
+ \def\numsubsecentry##1##2##3##4{%
+ \def\curssecname{secnowidth-##2}%
+ \curssecmax=0pt
+ %
+ \setbox0=\hbox{##2}%
+ \ifdim\wd0>\cursecmax
+ \cursecmax=\wd0
+ \expandafter\xdef\csname\cursecname\endcsname{\the\wd0}%
+ \fi
+ }%
+ \let\appsubsecentry\numsubsecentry
+ %
+ \def\numsubsubsecentry##1##2##3##4{%
+ \setbox0=\hbox{##2}%
+ \ifdim\wd0>\curssecmax
+ \curssecmax=\wd0
+ \expandafter\xdef\csname\curssecname\endcsname{\the\wd0}%
+ \fi
+ }%
+ \let\appsubsubsecentry\numsubsubsecentry
+ %
+ % Discard any output by outputting to dummy vbox, in case the toc file
+ % contains macros that we have not redefined above.
+ \setbox\dummybox\vbox\bgroup
+ \input \tocreadfilename\relax
+ \egroup
+ \endgroup
+}
+\newdimen\curchapmax
+\newdimen\cursecmax
+\newdimen\curssecmax
+
+
+% set #1 to the maximum section width for #2
+\def\retrievesecnowidth#1#2{%
+ \expandafter\let\expandafter\savedsecnowidth \csname secnowidth-#2\endcsname
+ \ifx\savedsecnowidth\relax
+ #1=0pt
+ \else
+ #1=\savedsecnowidth
+ \fi
+}
+\newdimen\secnowidthchap
+\secnowidthchap=0pt
+\newdimen\secnowidthsec
+\secnowidthsec=0pt
+\newdimen\secnowidthssec
+\secnowidthssec=0pt
+
+
\newskip\contentsrightmargin \contentsrightmargin=1in
\newcount\savepageno
\newcount\lastnegativepageno \lastnegativepageno = -1
% Prepare to read what we've written to \tocfile.
%
-\def\startcontents#1{%
+\def\startcontents#1#2{%
% If @setchapternewpage on, and @headings double, the contents should
% start on an odd page, unlike chapters.
\contentsalignmacro
\immediate\closeout\tocfile
%
+ #2%
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
\chapmacro{#1}{Yomitfromtoc}{}%
@@ -6758,8 +7041,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\thistitle{}% no title in double-sided headings
% Record where the Roman numerals started.
\ifnum\romancount=0 \global\romancount=\pagecount \fi
+ \linkentrytexttrue
}
+% \raggedbottom in plain.tex hardcodes \topskip so override it
+\catcode`\@=11
+\def\raggedbottom{\advance\topskip by 0pt plus30pt \r@ggedbottomtrue}
+\catcode`\@=\other
+
% redefined for the two-volume lispref. We always output on
% \jobname.toc even if this is redefined.
%
@@ -6768,9 +7057,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Normal (long) toc.
%
\def\contents{%
- \startcontents{\putwordTOC}%
+ \startcontents{\putwordTOC}{\contentsmkdest}%
+ \ifxetex\xetexpreauxfile\fi
+ \penalty2 % mark beginning of contents
\openin 1 \tocreadfilename\space
\ifeof 1 \else
+ \findsecnowidths
\readtocfile
\fi
\vfill \eject
@@ -6779,13 +7071,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\pdfmakeoutlines
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
\endgroup
\contentsendroman
}
+\def\contentsmkdest{%
+ \pdfmkdest{txi.CONTENTS}%
+}
+
% And just the chapters.
\def\summarycontents{%
- \startcontents{\putwordShortTOC}%
+ \startcontents{\putwordShortTOC}{}%
%
\let\partentry = \shortpartentry
\let\numchapentry = \shortchapentry
@@ -6798,6 +7095,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\rm
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
+ \extrasecnoskip=0.4pt
\def\numsecentry##1##2##3##4{}
\let\appsecentry = \numsecentry
\let\unnsecentry = \numsecentry
@@ -6807,11 +7105,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\numsubsubsecentry = \numsecentry
\let\appsubsubsecentry = \numsecentry
\let\unnsubsubsecentry = \numsecentry
+ \ifxetex\xetexpreauxfile\fi
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\readtocfile
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
\endgroup
@@ -6822,12 +7122,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Get ready to use Arabic numerals again
\def\contentsendroman{%
\lastnegativepageno = \pageno
- \global\pageno = \savepageno
- %
- % If \romancount > \arabiccount, the contents are at the end of the
- % document. Otherwise, advance where the Arabic numerals start for
- % the page numbers.
- \ifnum\romancount>\arabiccount\else\global\arabiccount=\pagecount\fi
+ \global\pageno=1
+ \contentsendcount = \pagecount
}
% Typeset the label for a chapter or appendix for the short contents.
@@ -6837,8 +7133,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% This space should be enough, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% But use \hss just in case.
- % (This space doesn't include the extra space that gets added after
- % the label; that gets put in by \shortchapentry above.)
%
% We'd like to right-justify chapter numbers, but that looks strange
% with appendix letters. And right-justifying numbers and
@@ -6848,39 +7142,55 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\hbox to 1em{#1\hss}%
}
-% These macros generate individual entries in the table of contents.
-% The first argument is the chapter or section name.
-% The last argument is the page number.
-% The arguments in between are the chapter number, section number, ...
+% These macros generate individual entries in the table of contents,
+% and are read in from the *.toc file.
+%
+% The arguments are like:
+% \def\numchapentry#1#2#3#4
+% #1 - the chapter or section name.
+% #2 - section number
+% #3 - level of section (e.g "chap", "sec")
+% #4 - page number
-% Parts, in the main contents. Replace the part number, which doesn't
-% exist, with an empty box. Let's hope all the numbers have the same width.
-% Also ignore the page number, which is conventionally not printed.
-\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+% Parts, in the main contents. Ignore the page number, which is
+% conventionally not printed.
\def\partentry#1#2#3#4{%
+ \ifnum\lastpenalty = 2
+ % use less space if at very first entry of contents
+ \vskip 1\baselineskip plus .33\baselineskip minus .25\baselineskip
+ \else
+ \vskip 2\baselineskip plus .66\baselineskip minus .5\baselineskip
+ \fi
% Add stretch and a bonus for breaking the page before the part heading.
% This reduces the chance of the page being broken immediately after the
% part heading, before a following chapter heading.
- \vskip 0pt plus 5\baselineskip
+ \vskip 0pt plus 3\baselineskip
\penalty-300
- \vskip 0pt plus -5\baselineskip
- \dochapentry{\numeralbox\labelspace#1}{}%
+ \vskip 0pt plus -3\baselineskip
+ \begingroup
+ \secfonts \rm
+ \entryinternal{#1}{}%
+ \endgroup
+ \afterpartentrytrue
}
+\newif\ifafterpartentry
%
% Parts, in the short toc.
\def\shortpartentry#1#2#3#4{%
\penalty-300
\vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
- \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+ \tocentry{{\bf #1}}{}{}{}%
}
% Chapters, in the main contents.
-\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
+\def\numchapentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthchap{#2}%
+ \dochapentry{#1}{#2}{#3}{#4}%
+}
% Chapters, in the short toc.
-% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3#4{%
- \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+ \tocentry{#1}{\shortchaplabel{#2}}{#3}{#4}%
}
% Appendices, in the main contents.
@@ -6891,70 +7201,119 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\setbox0 = \hbox{\putwordAppendix{} M}%
\hbox to \wd0{\putwordAppendix{} #1\hss}}
%
-\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
+\def\appentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthchap{#2}%
+ \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#3}{#4}%
+}
% Unnumbered chapters.
-\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
-\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#3}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#3}{#4}}
% Sections.
-\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
+\def\numsecentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthsec{#2}%
+ \dosecentry{#1}{#2}{#3}{#4}%
+}
\let\appsecentry=\numsecentry
-\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
+\def\unnsecentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthsec{#2}%
+ \dosecentry{#1}{}{#3}{#4}%
+}
% Subsections.
-\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
+\def\numsubsecentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthssec{#2}%
+ \dosubsecentry{#1}{#2}{#3}{#4}%
+}
\let\appsubsecentry=\numsubsecentry
-\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
+\def\unnsubsecentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthssec{#2}%
+ \dosubsecentry{#1}{}{#3}{#4}%
+}
% And subsubsections.
-\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#3}{#4}}
\let\appsubsubsecentry=\numsubsubsecentry
-\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#3}{#4}}
% This parameter controls the indentation of the various levels.
% Same as \defaultparindent.
\newdimen\tocindent \tocindent = 15pt
-% Now for the actual typesetting. In all these, #1 is the text and #2 is the
-% page number.
+% Now for the actual typesetting. In all these, #1 is the text, #2 is
+% a section number if present, #3 is the node, and #4 is the page number.
%
% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
-\def\dochapentry#1#2{%
- \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+\def\dochapentry#1#2#3#4{%
+ \ifafterpartentry
+ \afterpartentryfalse
+ \penalty5000
+ \else
+ \penalty-300
+ \fi
+ \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
% Move the page numbers slightly to the right
\advance\entryrightmargin by -0.05em
\chapentryfonts
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \extrasecnoskip=0.4em % separate chapter number more
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup
\nobreak\vskip .25\baselineskip plus.1\baselineskip
}
-\def\dosecentry#1#2{\begingroup
+\def\dosecentry#1#2#3#4{\begingroup
+ \secnowidth=\secnowidthchap
\secentryfonts \leftskip=\tocindent
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup}
-\def\dosubsecentry#1#2{\begingroup
+\def\dosubsecentry#1#2#3#4{\begingroup
+ \secnowidth=\secnowidthsec
\subsecentryfonts \leftskip=2\tocindent
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup}
-\def\dosubsubsecentry#1#2{\begingroup
+\def\dosubsubsecentry#1#2#3#4{\begingroup
+ \secnowidth=\secnowidthssec
\subsubsecentryfonts \leftskip=3\tocindent
- \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup}
-% We use the same \entry macro as for the index entries.
-\let\tocentry = \entry
+% Used for the maximum width of a section number so we can align
+% section titles.
+\newdimen\secnowidth
+\secnowidth=0pt
+\newdimen\extrasecnoskip
+\extrasecnoskip=0pt
-% Space between chapter (or whatever) number and the title.
-\def\labelspace{\hskip1em \relax}
+\let\tocnodetarget\empty
+\let\entrypagetarget\empty
-\def\dopageno#1{{\rm #1}}
-\def\doshortpageno#1{{\rm #1}}
+% \tocentry{TITLE}{SEC NO}{NODE}{PAGE}
+%
+\def\tocentry#1#2#3#4{%
+ \def\tocnodetarget{#3}%
+ \def\secno{#2}%
+ \ifx\empty\secno
+ \entryinternal{#1}{#4}%
+ \else
+ \ifdim 0pt=\secnowidth
+ \setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}%
+ \else
+ \advance\secnowidth by \labelspace
+ \advance\secnowidth by \extrasecnoskip
+ \setbox0=\hbox to \secnowidth{%
+ #2\hskip\labelspace\hskip\extrasecnoskip\hfill}%
+ \fi
+ \entrycontskip=\wd0
+ \entryinternal{\box0 #1}{#4}%
+ \fi
+}
+\newdimen\labelspace
+\labelspace=0.6em
\def\chapentryfonts{\secfonts \rm}
\def\secentryfonts{\textfonts}
@@ -7100,19 +7459,25 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\newdimen\cartouter\newdimen\cartinner
\newskip\normbskip\newskip\normpskip\newskip\normlskip
-
-\envdef\cartouche{%
+\envparseargdef\cartouche{%
\cartouchefontdefs
\ifhmode\par\fi % can't be in the midst of a paragraph.
\startsavinginserts
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt % we want these *outside*.
+ %
+ % Set paragraph width for text inside cartouche. There are
+ % left and right margins of 3pt each plus two vrules 0.4pt each.
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
+ \advance\cartinner by -6.8pt
+ %
+ % For drawing top and bottom of cartouche. Each corner char
+ % adds 6pt and we take off the width of a rule to line up with the
+ % right boundary perfectly.
\cartouter=\hsize
- \advance\cartouter by 18.4pt % allow for 3pt kerns on either
- % side, and for 6pt waste from
- % each corner char, and rule thickness
+ \advance\cartouter by 11.6pt
+ %
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
%
% If this cartouche directly follows a sectioning command, we need the
@@ -7120,20 +7485,23 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% collide with the section heading.
\ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
%
- \setbox\groupbox=\vbox\bgroup
+ \setbox\groupbox=\vtop\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
- \hskip\lskip
- \vrule\kern3pt
- \vbox\bgroup
- \kern3pt
- \hsize=\cartinner
- \baselineskip=\normbskip
- \lineskip=\normlskip
- \parskip=\normpskip
- \vskip -\parskip
- \comment % For explanation, see the end of def\group.
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \hsize=\cartinner
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \def\arg{#1}%
+ \ifx\arg\empty\else
+ \centerV{\hfil \bf #1 \hfil}%
+ \fi
+ \kern3pt
+ \vskip -\parskip
}
\def\Ecartouche{%
\ifhmode\par\fi
@@ -7287,22 +7655,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
\let\Eraggedright\par
-\envdef\raggedleft{%
- \parindent=0pt \leftskip0pt plus2em
- \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
- \hbadness=10000 % Last line will usually be underfull, so turn off
- % badness reporting.
-}
-\let\Eraggedleft\par
-
-\envdef\raggedcenter{%
- \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
- \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
- \hbadness=10000 % Last line will usually be underfull, so turn off
- % badness reporting.
-}
-\let\Eraggedcenter\par
-
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins. We keep \parskip nonzero in general, since
@@ -7342,7 +7694,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @indentedblock is like @quotation, but indents only on the left and
% has no optional argument.
-%
+%
\makedispenvdef{indentedblock}{\indentedblockstart}
%
\def\indentedblockstart{%
@@ -7400,8 +7752,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\endgroup
%
\def\setupverb{%
- \tt % easiest (and conventionally used) font for verbatim
+ \tt
\def\par{\leavevmode\endgraf}%
+ \parindent = 0pt
\setcodequotes
\tabeightspaces
% Respect line breaks,
@@ -7525,9 +7878,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% file; b) letting users define the frontmatter in as flexible order as
% possible is desirable.
%
-\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
-\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
-%
+\def\copying{\checkenv{}\begingroup\macrobodyctxt\docopying}
+{\catcode`\ =\other
+\gdef\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+}
+\let\copyingtext\relax
+
\def\insertcopying{%
\begingroup
\parindent = 0pt % paragraph indentation looks wrong on title page
@@ -7535,6 +7891,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\endgroup
}
+\def\publication{\checkenv{}\begingroup\macrobodyctxt\dopublication}
+{\catcode`\ =\other
+\gdef\dopublication#1@end publication{\endgroup\def\publicationtext{#1}}
+}
+\let\publicationtext\relax
+
+\def\insertpublication{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\publicationtext
+ \endgroup
+}
\message{defuns,}
% @defun etc.
@@ -7575,31 +7943,19 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\exdentamount=\defbodyindent
}
-\def\dodefunx#1{%
- % First, check whether we are in the right environment:
- \checkenv#1%
- %
- % As above, allow line break if we have multiple x headers in a row.
- % It's not a great place, though.
- \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
- %
- % And now, it's time to reuse the body of the original defun:
- \expandafter\gobbledefun#1%
-}
-\def\gobbledefun#1\startdefun{}
-
-% \printdefunline \deffnheader{text}
+% Called as \printdefunline \deffooheader{text}
%
\def\printdefunline#1#2{%
\begingroup
- % call \deffnheader:
+ \plainfrenchspacing
+ % call \deffooheader:
#1#2 \endheader
% common ending:
\interlinepenalty = 10000
\advance\rightskip by 0pt plus 1fil\relax
\endgraf
\nobreak\vskip -\parskip
- \penalty\defunpenalty % signal to \startdefun and \dodefunx
+ \penalty\defunpenalty % signal to \startdefun and \deffoox
% Some of the @defun-type tags do not enable magic parentheses,
% rendering the following check redundant. But we don't optimize.
\checkparencounts
@@ -7608,29 +7964,55 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\Edefun{\endgraf\medbreak}
-% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remaining is to define \deffnheader.
+% @defblock, @defline do not automatically create index entries
+\envdef\defblock{%
+ \startdefun
+}
+\let\Edefblock\Edefun
+
+\def\defline{%
+ \doingtypefnfalse
+ \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+\def\deflineheader#1 #2 #3\endheader{%
+ \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
+
+\def\deftypeline{%
+ \doingtypefntrue
+ \parseargusing\activeparens{\printdefunline\deftypelineheader}%
+}
+\def\deftypelineheader#1 #2 #3 #4\endheader{%
+ \printdefname{#1}{#2}{#3}\magicamp\defunargs{#4\unskip}%
+}
+
+% \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
%
+% Define \deffoo, \deffoox \Edeffoo and \deffooheader.
\def\makedefun#1{%
\expandafter\let\csname E#1\endcsname = \Edefun
\edef\temp{\noexpand\domakedefun
\makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
\temp
}
-
-% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
-%
-% Define \deffn and \deffnx, without parameters.
-% \deffnheader has to be defined explicitly.
-%
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
\doingtypefnfalse % distinguish typed functions from all else
\parseargusing\activeparens{\printdefunline#3}%
}%
- \def#2{\dodefunx#1}%
- \def#3%
+ \def#2{%
+ % First, check whether we are in the right environment:
+ \checkenv#1%
+ %
+ % As in \startdefun, allow line break if we have multiple x headers
+ % in a row. It's not a great place, though.
+ \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
+ %
+ \doingtypefnfalse % distinguish typed functions from all else
+ \parseargusing\activeparens{\printdefunline#3}%
+ }%
+ \def#3% definition of \deffooheader follows
}
\newif\ifdoingtypefn % doing typed function?
@@ -7639,7 +8021,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @deftypefnnewline on|off says whether the return type of typed functions
% are printed on their own line. This affects @deftypefn, @deftypefun,
% @deftypeop, and @deftypemethod.
-%
+%
\parseargdef\deftypefnnewline{%
\def\temp{#1}%
\ifx\temp\onword
@@ -7655,74 +8037,51 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi\fi
}
-% \dosubind {index}{topic}{subtopic}
-%
-% If SUBTOPIC is present, precede it with a space, and call \doind.
-% (At some time during the 20th century, this made a two-level entry in an
-% index such as the operation index. Nobody seemed to notice the change in
-% behaviour though.)
-\def\dosubind#1#2#3{%
- \def\thirdarg{#3}%
- \ifx\thirdarg\empty
- \doind{#1}{#2}%
- \else
- \doind{#1}{#2\space#3}%
- \fi
-}
-
% Untyped functions:
% @deffn category name args
-\makedefun{deffn}{\deffngeneral{}}
-
-% @deffn category class name args
-\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
-
-% \defopon {category on}class name args
-\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+\makedefun{deffn}#1 #2 #3\endheader{%
+ \doind{fn}{\code{#2}}%
+ \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
-% \deffngeneral {subind}category name args
-%
-\def\deffngeneral#1#2 #3 #4\endheader{%
- \dosubind{fn}{\code{#3}}{#1}%
- \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+% @defop category class name args
+\makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
+\def\defopheaderx#1#2 #3 #4\endheader{%
+ \doind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
+ \printdefname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
}
% Typed functions:
% @deftypefn category type name args
-\makedefun{deftypefn}{\deftypefngeneral{}}
+\makedefun{deftypefn}#1 #2 #3 #4\endheader{%
+ \doind{fn}{\code{#3}}%
+ \doingtypefntrue
+ \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
+}
% @deftypeop category class type name args
-\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
-
-% \deftypeopon {category on}class type name args
-\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
-
-% \deftypefngeneral {subind}category type name args
-%
-\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
- \dosubind{fn}{\code{#4}}{#1}%
+\makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
+\def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
+ \doind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
\doingtypefntrue
- \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+ \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
}
% Typed variables:
% @deftypevr category type var args
-\makedefun{deftypevr}{\deftypecvgeneral{}}
+\makedefun{deftypevr}#1 #2 #3 #4\endheader{%
+ \doind{vr}{\code{#3}}%
+ \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
+}
% @deftypecv category class type var args
-\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
-
-% \deftypecvof {category of}class type var args
-\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
-
-% \deftypecvgeneral {subind}category type var args
-%
-\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
- \dosubind{vr}{\code{#4}}{#1}%
- \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+\makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
+\def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
+ \doind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
+ \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
}
% Untyped variables:
@@ -7731,17 +8090,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
% @defcv category class var args
-\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
-
-% \defcvof {category of}class var args
-\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+\makedefun{defcv}#1 {\defcvheaderx{#1\ \putwordof}}
+\def\defcvheaderx#1#2 {\deftypecvheaderx{#1}#2 {} }
% Types:
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
- \defname{#1}{}{#2}\defunargs{#3\unskip}%
+ \printdefname{#1}{}{#2}\defunargs{#3\unskip}%
}
% Remaining @defun-like shortcuts:
@@ -7752,19 +8109,19 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\makedefun{defvar}{\defvrheader{\putwordDefvar} }
\makedefun{defopt}{\defvrheader{\putwordDefopt} }
\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
-\makedefun{defmethod}{\defopon\putwordMethodon}
-\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
-\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
-\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+\makedefun{defmethod}{\defopheaderx\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopheaderx\putwordMethodon}
+\makedefun{defivar}{\defcvheaderx\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvheaderx\putwordInstanceVariableof}
-% \defname, which formats the name of the @def (not the args).
+% \printdefname, which formats the name of the @def (not the args).
% #1 is the category, such as "Function".
% #2 is the return type, if any.
% #3 is the function name.
%
% We are followed by (but not passed) the arguments, if any.
%
-\def\defname#1#2#3{%
+\def\printdefname#1#2#3{%
\par
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
@@ -7774,9 +8131,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\rettypeownlinefalse
\ifdoingtypefn % doing a typed function specifically?
% then check user option for putting return type on its own line:
- \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
- \rettypeownlinetrue
- \fi
+ \ifflagclear{txideftypefnnl}{}{\rettypeownlinetrue}%
\fi
%
% How we'll format the category name. Putting it in brackets helps
@@ -7820,6 +8175,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\tolerance=10000 \hbadness=10000
\exdentamount=\defbodyindent
{%
+ \def\^^M{}% for line continuation
+ %
% defun fonts. We use typewriter by default (used to be bold) because:
% . we're printing identifiers, they should be in tt in principle.
% . in languages with many accents, such as Czech or French, it's
@@ -7834,37 +8191,33 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\tclose{\temp}% typeset the return type
\ifrettypeownline
% put return type on its own line; prohibit line break following:
- \hfil\vadjust{\nobreak}\break
+ \hfil\vadjust{\nobreak}\break
\else
\space % type on same line, so just followed by a space
\fi
\fi % no return type
#3% output function name
}%
- {\rm\enskip}% hskip 0.5 em of \rmfont
+ \ifflagclear{txidefnamenospace}{%
+ {\rm\enskip}% hskip 0.5 em of \rmfont
+ }{}%
%
- \boldbrax
+ \parenbrackglyphs
% arguments will be output next, if any.
}
-% Print arguments in slanted roman (not ttsl), inconsistently with using
-% tt for the name. This is because literal text is sometimes needed in
-% the argument list (groff manual), and ttsl and tt are not very
-% distinguishable. Prevent hyphenation at `-' chars.
-%
+% Print arguments. Use slanted for @def*, typewriter for @deftype*.
\def\defunargs#1{%
- % use sl by default (not ttsl),
- % tt for the names.
- \df \sl \hyphenchar\font=0
- %
- % On the other hand, if an argument has two dashes (for instance), we
- % want a way to get ttsl. We used to recommend @var for that, so
- % leave the code in, but it's strange for @var to lead to typewriter.
- % Nowadays we recommend @code, since the difference between a ttsl hyphen
- % and a tt hyphen is pretty tiny. @code also disables ?` !`.
- \def\var##1{{\setregularquotes\ttslanted{##1}}}%
- #1%
- \sl\hyphenchar\font=45
+ \bgroup
+ \def\^^M{}% for line continuation
+ \df \ifdoingtypefn \tt \else \sl \fi
+ \ifflagclear{txicodevaristt}{}%
+ % use \ttsl for @var in both @def* and @deftype*.
+ % the kern prevents an italic correction at end, which appears
+ % too much for ttsl.
+ {\def\var##1{{\setregularquotes \ttsl ##1\kern 0pt }}}%
+ #1%
+ \egroup
}
% We want ()&[] to print specially on the defun line.
@@ -7879,57 +8232,40 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\lparen = ( \let\rparen = )
% Be sure that we always have a definition for `(', etc. For example,
-% if the fn name has parens in it, \boldbrax will not be in effect yet,
-% so TeX would otherwise complain about undefined control sequence.
+% if the fn name has parens in it, \parenbrackglyphs will not be in
+% effect yet, so TeX would otherwise complain about undefined control
+% sequence.
{
\activeparens
- \global\let(=\lparen \global\let)=\rparen
- \global\let[=\lbrack \global\let]=\rbrack
- \global\let& = \&
+ \gdef\defcharsdefault{%
+ \let(=\lparen \let)=\rparen
+ \let[=\lbrack \let]=\rbrack
+ \let& = \&%
+ }
+ \globaldefs=1 \defcharsdefault
- \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+ \gdef\parenbrackglyphs{\let(=\opnr\let)=\cpnr\let[=\lbrb\let]=\rbrb}
\gdef\magicamp{\let&=\amprm}
}
\let\ampchar\&
-\newcount\parencount
-
-% If we encounter &foo, then turn on ()-hacking afterwards
-\newif\ifampseen
-\def\amprm#1 {\ampseentrue{\bf\ }}
-
-\def\parenfont{%
- \ifampseen
- % At the first level, print parens in roman,
- % otherwise use the default font.
- \ifnum \parencount=1 \rm \fi
- \else
- % The \sf parens (in \boldbrax) actually are a little bolder than
- % the contained text. This is especially needed for [ and ] .
- \sf
- \fi
-}
-\def\infirstlevel#1{%
- \ifampseen
- \ifnum\parencount=1
- #1%
- \fi
- \fi
-}
-\def\bfafterword#1 {#1 \bf}
+\def\amprm#1 {{\rm\ }}
+\newcount\parencount
+% opening and closing parentheses in roman font
\def\opnr{%
+ \ptexslash % italic correction
\global\advance\parencount by 1
- {\parenfont(}%
- \infirstlevel \bfafterword
+ {\sf(}%
}
-\def\clnr{%
- {\parenfont)}%
- \infirstlevel \sl
+\def\cpnr{%
+ \ptexslash % italic correction
+ {\sf)}%
\global\advance\parencount by -1
}
\newcount\brackcount
+% left and right square brackets in bold font
\def\lbrb{%
\global\advance\brackcount by 1
{\bf[}%
@@ -7971,24 +8307,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
\fi
-\let\E=\expandafter
-
% Used at the time of macro expansion.
% Argument is macro body with arguments substituted
\def\scanmacro#1{%
\newlinechar`\^^M
- % expand the expansion of \eatleadingcr twice to maybe remove a leading
- % newline (and \else and \fi tokens), then call \eatspaces on the result.
- \def\xeatspaces##1{%
- \E\E\E\E\E\E\E\eatspaces\E\E\E\E\E\E\E{\eatleadingcr##1%
- }}%
- \def\xempty##1{}%
+ \def\xeatspaces##1{\eatleadingcrthen\eatspaces{##1}}%
%
% Process the macro body under the current catcode regime.
\scantokens{#1@comment}%
%
% The \comment is to remove the \newlinechar added by \scantokens, and
- % can be noticed by \parsearg. Note \c isn't used because this means cedilla
+ % can be noticed by \parsearg. Note \c isn't used because this means cedilla
% in math mode.
}
@@ -8035,10 +8364,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\unbrace{\gdef\trim@@@ #1 } #2@{#1}
}
-{\catcode`\^^M=\other%
-\gdef\eatleadingcr#1{\if\noexpand#1\noexpand^^M\else\E#1\fi}}%
-% Warning: this won't work for a delimited argument
-% or for an empty argument
+% Trim a single leading ^^M off a string, then call #1
+{\catcode`\^^M=\active \catcode`\Q=3%
+\gdef\eatleadingcrthen #1#2{\eatlcra #1Q#2Q^^MQ}%
+\gdef\eatlcra #1#2Q^^M{\eatlcrb #1#2Q}%
+\gdef\eatlcrb #1Q#2Q#3Q{#1{#2}}%
+}
% Trim a single trailing ^^M off a string.
{\catcode`\^^M=\other \catcode`\Q=3%
@@ -8069,24 +8400,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\catcode`\_=\other
\catcode`\|=\other
\catcode`\~=\other
- \passthroughcharstrue
-}
-
-\def\scanargctxt{% used for copying and captions, not macros.
- \scanctxt
\catcode`\@=\other
- \catcode`\\=\other
\catcode`\^^M=\other
+ \catcode`\\=\active
+ \passthroughcharstrue
}
-\def\macrobodyctxt{% used for @macro definitions
+\def\macrobodyctxt{% used for @macro definitions and @copying
\scanctxt
\catcode`\ =\other
- \catcode`\@=\other
\catcode`\{=\other
\catcode`\}=\other
- \catcode`\^^M=\other
- \usembodybackslash
}
% Used when scanning braced macro arguments. Note, however, that catcode
@@ -8095,14 +8419,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\macroargctxt{%
\scanctxt
\catcode`\ =\active
- \catcode`\@=\other
- \catcode`\^^M=\other
- \catcode`\\=\active
}
\def\macrolineargctxt{% used for whole-line arguments without braces
\scanctxt
- \catcode`\@=\other
\catcode`\{=\other
\catcode`\}=\other
}
@@ -8146,7 +8466,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
\addtomacrolist{\the\macname}%
\fi
- \begingroup \macrobodyctxt
+ \begingroup \macrobodyctxt \usembodybackslash
\ifrecursive \expandafter\parsermacbody
\else \expandafter\parsemacbody
\fi}
@@ -8161,8 +8481,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\commondummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
- \else
- \errmessage{Macro #1 not defined}%
\fi
}
@@ -8187,6 +8505,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% <parameter list> is #, then the preceding argument is delimited by
% an opening brace, and that opening brace is not consumed.
+% Make @ a letter, so that we can make private-to-Texinfo macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
% Parse the optional {params} list to @macro or @rmacro.
% Set \paramno to the number of arguments,
% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
@@ -8194,19 +8516,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% list to some hook where the argument is to be expanded. If there are
% less than 10 arguments that hook is to be replaced by ##N where N
% is the position in that list, that is to say the macro arguments are to be
-% defined `a la TeX in the macro body.
+% defined `a la TeX in the macro body.
%
% That gets used by \mbodybackslash (above).
%
% If there are 10 or more arguments, a different technique is used: see
-% \parsemmanyargdef.
+% \parsemmanyargdef@@.
%
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
% \hash is redefined to `#' later to get it into definitions
\let\xeatspaces\relax
- \let\xempty\relax
\parsemargdefxxx#1,;,%
\ifnum\paramno<10\relax\else
\paramno0\relax
@@ -8218,29 +8539,25 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\else \let\next=\parsemargdefxxx
\advance\paramno by 1
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
- {\xeatspaces{\hash\the\paramno\noexpand\xempty{}}}%
+ {\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
-% the \xempty{} is to give \eatleadingcr an argument in the case of an
-% empty macro argument.
% \parsemacbody, \parsermacbody
%
% Read recursive and nonrecursive macro bodies. (They're different since
% rec and nonrec macros end differently.)
-%
-% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
+%
+% We are in \macrobodyctxt, and the \xdef causes backslashes in the macro
% body to be transformed.
-% Set \macrobody to the body of the macro, and call \defmacro.
+% Set \macrobody to the body of the macro, and call \macrodef.
%
+\catcode `\@\texiatcatcode
{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
-
-% Make @ a letter, so that we can make private-to-Texinfo macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
+\catcode `\@=11\relax
%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
@@ -8263,7 +8580,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% twice the \macarg.BLAH macros does not cost too much processing power.
\def\parsemmanyargdef@@#1,{%
\if#1;\let\next=\relax
- \else
+ \else
\let\next=\parsemmanyargdef@@
\edef\tempb{\eatspaces{#1}}%
\expandafter\def\expandafter\tempa
@@ -8348,7 +8665,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Replace arguments by their values in the macro body, and place the result
% in macro \@tempa.
-%
+%
\def\macvalstoargs@{%
% To do this we use the property that token registers that are \the'ed
% within an \edef expand only once. So we are going to place all argument
@@ -8372,9 +8689,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
}
-% Define the named-macro outside of this group and then close this group.
-%
-\def\macargexpandinbody@{%
+% Define the named-macro outside of this group and then close this group.
+%
+\def\macargexpandinbody@{%
\expandafter
\endgroup
\macargdeflist@
@@ -8412,7 +8729,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
% Trailing missing arguments are set to empty.
-%
+%
\def\setemptyargvalues@{%
\ifx\paramlist\nilm@
\let\next\macargexpandinbody@
@@ -8455,60 +8772,59 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% \xdef is used so that macro definitions will survive the file
% they're defined in: @include reads the file inside a group.
%
-\def\defmacro{%
+\def\macrodef{%
\let\hash=##% convert placeholders to macro parameter chars
\ifnum\paramno=1
- \def\xeatspaces##1{##1}%
- % This removes the pair of braces around the argument. We don't
- % use \eatspaces, because this can cause ends of lines to be lost
- % when the argument to \eatspaces is read, leading to line-based
- % commands like "@itemize" not being read correctly.
+ \long\def\xeatspaces##1{##1}%
+ % We don't use \xeatspaces for single-argument macros, because we
+ % want to keep ends of lines. This definition removes \xeatspaces
+ % when \macrobody is expanded below.
\else
- \let\xeatspaces\relax % suppress expansion
+ \def\xeatspaces{\string\xeatspaces}%
+ % This expands \xeatspaces as a sequence of character tokens, which
+ % stops \scantokens inserting an extra space after the control sequence.
\fi
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \begingroup
\noexpand\spaceisspace
- \noexpand\endlineisspace
+ \noexpand\ignoreactivenewline
\noexpand\expandafter % skip any whitespace after the macro name.
\expandafter\noexpand\csname\the\macname @@@\endcsname}%
\expandafter\xdef\csname\the\macname @@@\endcsname{%
- \egroup
+ \endgroup
\noexpand\scanmacro{\macrobody}}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \begingroup
\noexpand\braceorline
\expandafter\noexpand\csname\the\macname @@@\endcsname}%
\expandafter\xdef\csname\the\macname @@@\endcsname##1{%
- \egroup
+ \endgroup
\noexpand\scanmacro{\macrobody}%
}%
\else % at most 9
\ifnum\paramno<10\relax
% @MACNAME sets the context for reading the macro argument
- % @MACNAME@@ gets the argument, processes backslashes and appends a
+ % @MACNAME@@ gets the argument, processes backslashes and appends a
% comma.
% @MACNAME@@@ removes braces surrounding the argument list.
% @MACNAME@@@@ scans the macro body with arguments substituted.
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \begingroup
\noexpand\expandafter % This \expandafter skip any spaces after the
\noexpand\macroargctxt % macro before we change the catcode of space.
\noexpand\expandafter
\expandafter\noexpand\csname\the\macname @@\endcsname}%
\expandafter\xdef\csname\the\macname @@\endcsname##1{%
- \noexpand\passargtomacro
- \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
+ \noexpand\passargtomacro
+ \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
\expandafter\xdef\csname\the\macname @@@\endcsname##1{%
- \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname @@@@\endcsname\paramlist{%
- \egroup\noexpand\scanmacro{\macrobody}}%
+ \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
+ \expandaftergroup{\expandafter\xdef\csname\the\macname @@@@\endcsname}%
+ \paramlist{%
+ \endgroup\noexpand\scanmacro{\macrobody}}%
\else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
@@ -8520,6 +8836,16 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
+% utility definition to avoid excessive use of \expandafter. call
+% as \expandaftergroup{CONTENT}\WORD to expand \WORD exactly once and remove
+% braces around CONTENT.
+\def\expandaftergroup#1#2{%
+ \expandafter\expandaftergroupx\expandafter{#2}{#1}%
+}
+\def\expandaftergroupx#1#2{%
+ #2#1%
+}
+
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
@@ -8533,11 +8859,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Call #1 with a list of tokens #2, with any doubled backslashes in #2
% compressed to one.
%
-% This implementation works by expansion, and not execution (so we cannot use
-% \def or similar). This reduces the risk of this failing in contexts where
-% complete expansion is done with no execution (for example, in writing out to
+% This implementation works by expansion, and not execution (so we cannot use
+% \def or similar). This reduces the risk of this failing in contexts where
+% complete expansion is done with no execution (for example, in writing out to
% an auxiliary file for an index entry).
-%
+%
% State is kept in the input stream: the argument passed to
% @look_ahead, @gobble_and_check_finish and @add_segment is
%
@@ -8559,11 +8885,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% #3 - NEXT_TOKEN
% #4 used to look ahead
%
-% If the next token is not a backslash, process the rest of the argument;
+% If the next token is not a backslash, process the rest of the argument;
% otherwise, remove the next token.
@gdef@look_ahead#1!#2#3#4{%
@ifx#4\%
- @expandafter@gobble_and_check_finish
+ @expandafter@gobble_and_check_finish
@else
@expandafter@add_segment
@fi#1!{#2}#4#4%
@@ -8587,9 +8913,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% #3 - NEXT_TOKEN
% #4 is input stream until next backslash
%
-% Input stream is either at the start of the argument, or just after a
-% backslash sequence, either a lone backslash, or a doubled backslash.
-% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
+% Input stream is either at the start of the argument, or just after a
+% backslash sequence, either a lone backslash, or a doubled backslash.
+% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
% finish; otherwise, append to ARG_RESULT the segment of the argument up until
% the next backslash. PENDING_BACKSLASH contains a backslash to represent
% a backslash just before the start of the input stream that has not been
@@ -8601,13 +8927,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% append the pending backslash to the result, followed by the next segment
@expandafter@is_fi@look_ahead#1#2#4!{\}@fi
% this @fi is discarded by @look_ahead.
- % we can't get rid of it with \expandafter because we don't know how
+ % we can't get rid of it with \expandafter because we don't know how
% long #4 is.
}
% #1 - THE_MACRO
% #2 - ARG_RESULT
-% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
% conditional.
@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
@@ -8619,7 +8945,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% for reading the argument (slightly different in the two cases). Then,
% to read the argument, in the whole-line case, it then calls the regular
% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
-%
+%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup
@@ -8630,6 +8956,74 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi \macnamexxx}
+% @linemacro
+
+\parseargdef\linemacro{%
+ \getargs{#1}% now \macname is the macname and \argl the arglist
+ \ifx\argl\empty
+ \paramno=0
+ \let\hash\relax
+ \def\paramlist{\hash 1\endlinemacro}%
+ \else
+ \expandafter\linegetparamlist\argl;%
+ \fi
+ \begingroup \macrobodyctxt \usembodybackslash
+ \parselinemacrobody
+}
+
+% Build up \paramlist which will be used as the parameter text for the macro.
+% At the end it will be like "#1 #2 #3\endlinemacro".
+\def\linegetparamlist#1;{%
+ \paramno=0\def\paramlist{}%
+ \let\hash\relax
+ \linegetparamlistxxx#1,;,%
+}
+\def\linegetparamlistxxx#1,{%
+ \if#1;\let\next=\linegetparamlistxxxx
+ \else \let\next=\linegetparamlistxxx
+ \advance\paramno by 1
+ \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+ {\hash\the\paramno}%
+ \edef\paramlist{\paramlist\hash\the\paramno\space}%
+ \fi\next}
+\def\linegetparamlistxxxx{%
+ \expandafter\fixparamlist\paramlist\fixparamlist
+}
+% Replace final space token
+\def\fixparamlist#1 \fixparamlist{%
+ \def\paramlist{#1\endlinemacro}%
+}
+
+% Read the body of the macro, replacing backslash-surrounded variables
+%
+{\catcode`\ =\other\long\gdef\parselinemacrobody#1@end linemacro{%
+\xdef\macrobody{#1}%
+\endgroup
+\linemacrodef
+}}
+
+% Make the definition
+\def\linemacrodef{%
+ \let\hash=##%
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup
+ \noexpand\parsearg
+ \expandafter\noexpand\csname\the\macname @@\endcsname
+ }
+ \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+ \egroup
+ \expandafter\noexpand
+ \csname\the\macname @@@\endcsname##1\noexpand\endlinemacro
+ }
+ \expandaftergroup{\expandafter\xdef\csname\the\macname @@@\endcsname}%
+ \paramlist{%
+ \newlinechar=13 % split \macrobody into lines
+ \noexpand\scantokens{\macrobody}%
+ }
+}
+
+
+
% @alias.
% We need some trickery to remove the optional spaces around the equal
% sign. Make them active and then expand them all to nothing.
@@ -8673,7 +9067,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Used so that the @top node doesn't have to be wrapped in an @ifnottex
% conditional.
-% \doignore goes to more effort to skip nested conditionals but we don't need
+% \doignore goes to more effort to skip nested conditionals but we don't need
% that here.
\def\omittopnode{%
\ifx\lastnode\wordTop
@@ -8681,9 +9075,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
\def\wordTop{Top}
-% Until the next @node or @bye command, divert output to a box that is not
-% output.
-\def\ignorenode{\setbox\dummybox\vbox\bgroup\def\node{\egroup\node}%
+% Until the next @node, @part or @bye command, divert output to a box that
+% is not output.
+\def\ignorenode{\setbox\dummybox\vbox\bgroup
+\def\part{\egroup\part}%
+\def\node{\egroup\node}%
\ignorenodebye
}
@@ -8695,14 +9091,24 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\lastnode=\empty
% Write a cross-reference definition for the current node. #1 is the
-% type (Ynumbered, Yappendix, Ynothing).
+% type (Ynumbered, Yappendix, Ynothing). #2 is the section title.
%
-\def\donoderef#1{%
+\def\donoderef#1#2{%
\ifx\lastnode\empty\else
- \setref{\lastnode}{#1}%
+ \setref{\lastnode}{#1}{#2}%
\global\let\lastnode=\empty
+ \setnodeseenonce
\fi
}
+\def\setnodeseenonce{
+ \global\nodeseentrue
+ \let\setnodeseenonce\relax
+}
+
+% @nodedescription, @nodedescriptionblock - do nothing for TeX
+\parseargdef\nodedescription{}
+\def\nodedescriptionblock{\doignore{nodedescriptionblock}}
+
% @anchor{NAME} -- define xref target at arbitrary point.
%
@@ -8710,21 +9116,28 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
-\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
-
-% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
-% anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \currentsection,
-% or the anchor name.
-% 2) NAME-snt - section number and type, passed as the SNT arg, or
-% empty for anchors.
+\def\anchor#1{%
+ \savesf \setref{#1}{Yanchor}{#1}\restoresf \ignorespaces
+}
+
+% @namedanchor{NAME, XREFNAME} -- define xref target at arbitrary point
+% with label text for cross-references to it.
+\def\namedanchor#1{\donamedanchor#1\finish}%
+\def\donamedanchor#1,#2\finish{%
+ \savesf \setref{#1}{Yanchor}{\ignorespaces #2\unskip}\restoresf \ignorespaces
+}
+
+% \setref{NAME}{SNT}{TITLE} defines a cross-reference point NAME (a node
+% or an anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name
+% 2) NAME-snt - section number and type, passed as the SNT arg.
% 3) NAME-pg - the page number.
%
% This is called from \donoderef, \anchor, and \dofloat. In the case of
% floats, there is an additional part, which is not written here:
% 4) NAME-lof - the text as it should appear in a @listoffloats.
%
-\def\setref#1#2{%
+\def\setref#1#2#3{%
\pdfmkdest{#1}%
\iflinks
{%
@@ -8736,7 +9149,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
}%
- \toks0 = \expandafter{\currentsection}%
+ \toks0 = {#3}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
\safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
@@ -8748,7 +9161,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% automatically in xrefs, if the third arg is not explicitly specified.
% This was provided as a "secret" @set xref-automatic-section-title
% variable, now it's official.
-%
+%
\parseargdef\xrefautomaticsectiontitle{%
\def\temp{#1}%
\ifx\temp\onword
@@ -8764,7 +9177,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi\fi
}
-%
+%
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@@ -8785,118 +9198,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
%
- % Get args without leading/trailing spaces.
- \def\printedrefname{\ignorespaces #3}%
- \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
- %
+ \getprintedrefname{#1}{#3}{#5}%
\def\infofilename{\ignorespaces #4}%
\setbox\infofilenamebox = \hbox{\infofilename\unskip}%
%
- \def\printedmanual{\ignorespaces #5}%
- \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
- %
- % If the printed reference name (arg #3) was not explicitly given in
- % the @xref, figure out what we want to use.
- \ifdim \wd\printedrefnamebox = 0pt
- % No printed node name was explicitly given.
- \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
- % Not auto section-title: use node name inside the square brackets.
- \def\printedrefname{\ignorespaces #1}%
- \else
- % Auto section-title: use chapter/section title inside
- % the square brackets if we have it.
- \ifdim \wd\printedmanualbox > 0pt
- % It is in another manual, so we don't have it; use node name.
- \def\printedrefname{\ignorespaces #1}%
- \else
- \ifhavexrefs
- % We (should) know the real title if we have the xref values.
- \def\printedrefname{\refx{#1-title}}%
- \else
- % Otherwise just copy the Info node name.
- \def\printedrefname{\ignorespaces #1}%
- \fi%
- \fi
- \fi
- \fi
- %
- % Make link in pdf output.
- \ifpdf
- % For pdfTeX and LuaTeX
- {\indexnofonts
- \makevalueexpandable
- \turnoffactive
- % This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions. This ignores all spaces in
- % #4, including (wrongly) those in the middle of the filename.
- \getfilename{#4}%
- %
- % This (wrongly) does not take account of leading or trailing
- % spaces in #1, which should be ignored.
- \setpdfdestname{#1}%
- %
- \ifx\pdfdestname\empty
- \def\pdfdestname{Top}% no empty targets
- \fi
- %
- \leavevmode
- \startlink attr{/Border [0 0 0]}%
- \ifnum\filenamelength>0
- goto file{\the\filename.pdf} name{\pdfdestname}%
- \else
- goto name{\pdfmkpgn{\pdfdestname}}%
- \fi
- }%
- \setcolor{\linkcolor}%
- \else
- \ifx\XeTeXrevision\thisisundefined
- \else
- % For XeTeX
- {\indexnofonts
- \makevalueexpandable
- \turnoffactive
- % This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions. This ignores all spaces in
- % #4, including (wrongly) those in the middle of the filename.
- \getfilename{#4}%
- %
- % This (wrongly) does not take account of leading or trailing
- % spaces in #1, which should be ignored.
- \setpdfdestname{#1}%
- %
- \ifx\pdfdestname\empty
- \def\pdfdestname{Top}% no empty targets
- \fi
- %
- \leavevmode
- \ifnum\filenamelength>0
- % With default settings,
- % XeTeX (xdvipdfmx) replaces link destination names with integers.
- % In this case, the replaced destination names of
- % remote PDFs are no longer known. In order to avoid a replacement,
- % you can use xdvipdfmx's command line option `-C 0x0010'.
- % If you use XeTeX 0.99996+ (TeX Live 2016+),
- % this command line option is no longer necessary
- % because we can use the `dvipdfmx:config' special.
- \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
- << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
- \else
- \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
- << /S /GoTo /D (\pdfdestname) >> >>}%
- \fi
- }%
- \setcolor{\linkcolor}%
- \fi
- \fi
- {%
- % Have to otherify everything special to allow the \csname to
- % include an _ in the xref name, etc.
- \indexnofonts
- \turnoffactive
- \def\value##1{##1}%
- \expandafter\global\expandafter\let\expandafter\Xthisreftitle
- \csname XR#1-title\endcsname
- }%
+ \startxreflink{#1}{#4}%
+ \getrefx{#1-title}\Xthisreftitle
%
% Float references are printed completely differently: "Figure 1.2"
% instead of "[somenode], p.3". \iffloat distinguishes them by
@@ -8929,31 +9236,32 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Cross-manual reference with a printed manual name.
%
\crossmanualxref{\cite{\printedmanual\unskip}}%
- %
\else\ifdim \wd\infofilenamebox > 0pt
% Cross-manual reference with only an info filename (arg 4), no
% printed manual name (arg 5). This is essentially the same as
% the case above; we output the filename, since we have nothing else.
%
\crossmanualxref{\code{\infofilename\unskip}}%
- %
\else
% Reference within this manual.
%
- % Only output a following space if the -snt ref is nonempty, as the ref
- % will be empty for @unnumbered and @anchor.
- \setbox2 = \hbox{\ignorespaces \refx{#1-snt}}%
- \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+ % Only output a following space if the -snt ref is nonempty, as is
+ % the case for @unnumbered and @anchor.
+ \getrefx{#1-snt}\tmp
+ \ifx\tmp\empty\else
+ \ifx\tmp\Yanchor\else
+ \tmp\space
+ \fi
+ \fi
%
% output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
%
- \expandafter\ifx\csname SETtxiomitxrefpg\endcsname\relax
- % But we always want a comma and a space:
- ,\space
- %
+ \ifflagclear{txiomitxrefpg}{%
+ % We always want a comma
+ ,%
% output the `page 3'.
- \turnoffactive \putwordpage\tie\refx{#1-pg}%
+ \turnoffactive \putpageref{#1}%
% Add a , if xref followed by a space
\if\space\noexpand\tokenafterxref ,%
\else\ifx\ \tokenafterxref ,% @TAB
@@ -8963,27 +9271,118 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\tokenafterxref ,% @NL
\else\ifx\tie\tokenafterxref ,% @tie
\fi\fi\fi\fi\fi\fi
- \fi
+ }{}%
\fi\fi
\fi
- \endlink
-\endgroup}
+ \endlink
+\endgroup}
+
+% \getprintedrefname{NODE}{LABEL}{MANUAL}
+% - set \printedrefname and \printedmanual
+%
+\def\getprintedrefname#1#2#3{%
+ % Get args without leading/trailing spaces.
+ \def\printedrefname{\ignorespaces #2}%
+ \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+ %
+ \def\printedmanual{\ignorespaces #3}%
+ \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
+ %
+ % If the printed reference name (arg #2) was not explicitly given in
+ % the @xref, figure out what we want to use.
+ \ifdim \wd\printedrefnamebox = 0pt
+ % No printed node name was explicitly given.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
+ % Not auto section-title: use node name inside the square brackets.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ % Auto section-title: use chapter/section title inside
+ % the square brackets if we have it.
+ \ifdim \wd\printedmanualbox > 0pt
+ % It is in another manual, so we don't have it; use node name.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We (should) know the real title if we have the xref values.
+ \def\printedrefname{\refx{#1-title}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printedrefname{\ignorespaces #1}%
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+% \startxreflink{NODE}{FILE} - start link in pdf output.
+\def\startxreflink#1#2{%
+ \ifpdforxetex
+ % For pdfTeX and LuaTeX
+ {\indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ % This expands tokens, so do it after making catcode changes, so _
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #2, including (wrongly) those in the middle of the filename.
+ \getfilename{#2}%
+ %
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
+ \setpdfdestname{#1}%
+ %
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{Top}% no empty targets
+ \fi
+ %
+ \leavevmode
+ \ifpdf
+ \startlink attr{/Border [0 0 0]}%
+ \ifnum\filenamelength>0
+ goto file{\the\filename.pdf} name{\pdfdestname}%
+ \else
+ goto name{\pdfdestname}%
+ \fi
+ \else % XeTeX
+ \ifnum\filenamelength>0
+ % With default settings,
+ % XeTeX (xdvipdfmx) replaces link destination names with integers.
+ % In this case, the replaced destination names of
+ % remote PDFs are no longer known. In order to avoid a replacement,
+ % you can use xdvipdfmx's command line option `-C 0x0010'.
+ % If you use XeTeX 0.99996+ (TeX Live 2016+),
+ % this command line option is no longer necessary
+ % because we can use the `dvipdfmx:config' special.
+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+ << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
+ \else
+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+ << /S /GoTo /D (\pdfdestname) >> >>}%
+ \fi
+ \fi
+ }%
+ \setcolor{\linkcolor}%
+ \fi
+}
+
+% can be overridden in translation files
+\def\putpageref#1{%
+ \space\putwordpage\tie\refx{#1-pg}}
% Output a cross-manual xref to #1. Used just above (twice).
-%
+%
% Only include the text "Section ``foo'' in" if the foo is neither
% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
% "see The Foo Manual", the idea being to refer to the whole manual.
-%
+%
% But, this being TeX, we can't easily compare our node name against the
% string "Top" while ignoring the possible spaces before and after in
% the input. By adding the arbitrary 7sp below, we make it much less
% likely that a real node name would have the same width as "Top" (e.g.,
% in a monospaced font). Hopefully it will never happen in practice.
-%
+%
% For the same basic reason, we retypeset the "Top" at every
% reference, since the current font is indeterminate.
-%
+%
\def\crossmanualxref#1{%
\setbox\toprefbox = \hbox{Top\kern7sp}%
\setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
@@ -9002,10 +9401,26 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\xrefprintnodename#1{[#1]}
+% @link{NODENAME, LABEL, MANUAL} - create a "plain" link, with no
+% page number. Not useful if printed on paper.
+%
+\def\link#1{\linkX[#1,,,]}
+\def\linkX[#1,#2,#3,#4]{%
+ \begingroup
+ \unsepspaces
+ \getprintedrefname{#1}{#2}{#3}%
+ \startxreflink{#1}{#3}%
+ \printedrefname
+ \endlink
+ \endgroup
+}
+
+
% Things referred to by \setref.
%
\def\Ynothing{}
\def\Yomitfromtoc{}
+\def\Yanchor{\isanchor} \let\isanchor\relax
\def\Ynumbered{%
\ifnum\secno=0
\putwordChapter@tie \the\chapno
@@ -9032,14 +9447,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% \refx{NAME} - reference a cross-reference string named NAME.
\def\refx#1{%
- \requireauxfile
- {%
- \indexnofonts
- \turnoffactive
- \def\value##1{##1}%
- \expandafter\global\expandafter\let\expandafter\thisrefX
- \csname XR#1\endcsname
- }%
+ \getrefx{#1}\thisrefX
\ifx\thisrefX\relax
% If not defined, say something at least.
\angleleft un\-de\-fined\angleright
@@ -9060,9 +9468,20 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi
}
-% This is the macro invoked by entries in the aux file. Define a control
-% sequence for a cross-reference target (we prepend XR to the control sequence
-% name to avoid collisions). The value is the page number. If this is a float
+% Set #2 to xref string #1
+\def\getrefx#1#2{%
+ \requireauxfile
+ {%
+ \indexnofonts
+ \turnoffactive
+ \def\value##1{##1}%
+ \expandafter\global\expandafter\let\expandafter#2\csname XR#1\endcsname
+ }%
+}
+
+% This is the macro invoked by entries in the aux file. Define a control
+% sequence for a cross-reference target (we prepend XR to the control sequence
+% name to avoid collisions). The value is the page number. If this is a float
% type, we have more work to do.
%
\def\xrdef#1#2{%
@@ -9078,10 +9497,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\bgroup
\expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
\egroup
- % We put the \gdef inside a group to avoid the definitions building up on
- % TeX's save stack, which can cause it to run out of space for aux files with
+ % We put the \gdef inside a group to avoid the definitions building up on
+ % TeX's save stack, which can cause it to run out of space for aux files with
% thousands of lines. \gdef doesn't use the save stack, but \csname does
- % when it defines an unknown control sequence as \relax.
+ % when it defines an unknown control sequence as \relax.
%
% Was that xref control sequence that we just defined for a float?
\expandafter\iffloat\csname XR\safexrefname\endcsname
@@ -9102,6 +9521,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
{\safexrefname}}%
\fi
+ \ignorespaces % ignore ends of line in aux file
}
% If working on a large document in chapters, it is convenient to
@@ -9124,12 +9544,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
+ \ifxetex\xetexpreauxfile\fi
\openin 1 \jobname.aux
\ifeof 1 \else
\readdatafile{aux}%
\global\havexrefstrue
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
}
\def\setupdatafile{%
@@ -9212,7 +9634,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
\global\advance\footnoteno by \@ne
- \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % Output for the footnote marker. If we are immediately after another
+ % footnote, output a comma and small space first.
+ \edef\thisfootno{$^{\ifnum\lastpenalty=3 ,\mskip 1mu \fi\the\footnoteno}$}%
%
% In case the footnote comes at the end of a sentence, preserve the
% extra spacing after we do the footnote number.
@@ -9221,19 +9646,25 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
% Remove inadvertent blank space before typesetting the footnote number.
\unskip
- \thisfootno\@sf
+ %
+ % \scriptspace is 0.5pt by default and gives excessive space before the
+ % comma if we have multiple footnote markers in a row.
+ \bgroup\scriptspace=0pt
+ \thisfootno\@sf
+ \egroup
\dofootnote
}%
-% Don't bother with the trickery in plain.tex to not require the
-% footnote text as a parameter. Our footnotes don't need to be so general.
-%
-% Oh yes, they do; otherwise, @ifset (and anything else that uses
-% \parseargline) fails inside footnotes because the tokens are fixed when
-% the footnote is read. --karl, 16nov96.
+% marker for immediately after a footnote marker
+\gdef\footnoteendmarker{\penalty3 }
+
+% Do not require the footnote text as a parameter; otherwise, @ifset
+% (and anything else that uses \parseargline) fails inside footnotes
+% because the tokens are fixed when the footnote is read.
%
\gdef\dofootnote{%
\insert\footins\bgroup
+ \aftergroup\footnoteendmarker
%
% Nested footnotes are not supported in TeX, that would take a lot
% more work. (\startsavinginserts does not suffice.)
@@ -9264,14 +9695,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
- \textindent{\thisfootno}%
+ \textindent{$^{\the\footnoteno}$}%
%
% Don't crash into the line above the footnote text. Since this
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
%
- % Invoke rest of plain TeX footnote routine.
+ % Eat opening brace and invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
@@ -9380,6 +9811,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\imagexxx #1,,,,,\finish
\fi
}
+
+% Approximate height of a line in the standard text font.
+\newdimen\capheight
+\setbox0=\vbox{\tenrm H}
+\capheight=\ht0
+
%
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
@@ -9392,39 +9829,39 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
\makevalueexpandable
- % If the image is by itself, center it.
\ifvmode
\imagevmodetrue
- \else \ifx\centersub\centerV
- % for @center @image, we need a vbox so we can have our vertical space
- \imagevmodetrue
- \vbox\bgroup % vbox has better behavior than vtop herev
- \fi\fi
- %
- \ifimagevmode
- \nobreak\medskip
+ \medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
- \nobreak\vskip\parskip
- \nobreak
+ \vskip\parskip
+ %
+ % Place image in a \vtop for a top page margin that is (close to) correct,
+ % as \topskip glue is relative to the first baseline.
+ \vtop\bgroup \kern -\capheight \vskip-\parskip
\fi
%
- % Leave vertical mode so that indentation from an enclosing
- % environment such as @quotation is respected.
- % However, if we're at the top level, we don't want the
- % normal paragraph indentation.
- % On the other hand, if we are in the case of @center @image, we don't
- % want to start a paragraph, which will create a hsize-width box and
- % eradicate the centering.
- \ifx\centersub\centerV \else \imageindent \fi
+ \ifx\centersub\centerV
+ % For @center @image, enter vertical mode and add vertical space
+ % Enter an extra \parskip because @center doesn't add space itself.
+ \vbox\bgroup\vskip\parskip\medskip\vskip\parskip
+ \else
+ % Enter horizontal mode so that indentation from an enclosing
+ % environment such as @quotation is respected.
+ % However, if we're at the top level, we don't want the
+ % normal paragraph indentation.
+ \imageindent
+ \fi
%
% Output the image.
\ifpdf
% For pdfTeX and LuaTeX <= 0.80
\dopdfimage{#1}{#2}{#3}%
\else
- \ifx\XeTeXrevision\thisisundefined
+ \ifxetex
+ \doxeteximage{#1}{#2}{#3}%
+ \else
% For epsf.tex
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}%
@@ -9432,16 +9869,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\epsfbox{#1.eps}%
- \else
- % For XeTeX
- \doxeteximage{#1}{#2}{#3}%
\fi
\fi
%
\ifimagevmode
+ \egroup
\medskip % space after a standalone image
\fi
- \ifx\centersub\centerV \egroup \fi
+ \ifx\centersub\centerV % @center @image
+ \medskip
+ \egroup % close \vbox
+ \fi
\endgroup}
@@ -9508,14 +9946,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\global\advance\floatno by 1
%
{%
- % This magic value for \currentsection is output by \setref as the
- % XREFLABEL-title value. \xrefX uses it to distinguish float
+ % This magic value for the third argument of \setref is output as
+ % the XREFLABEL-title value. \xrefX uses it to distinguish float
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
- \edef\currentsection{\floatmagic=\safefloattype}%
- \setref{\floatlabel}{Yfloat}%
+ \edef\tmp{\noexpand\setref{\noexpand\floatlabel}{Yfloat}%
+ {\floatmagic=\safefloattype}}%
+ \tmp
}%
\fi
%
@@ -9608,8 +10047,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\caption{\docaption\thiscaption}
\def\shortcaption{\docaption\thisshortcaption}
-\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
-\def\defcaption#1#2{\egroup \def#1{#2}}
+\def\docaption{\checkenv\float \bgroup\scanctxt\docaptionz}
+\def\docaptionz#1#2{\egroup \def#1{#2}}
% The parameter is the control sequence identifying the counter we are
% going to use. Create it if it doesn't exist and assign it to \floatno.
@@ -9637,7 +10076,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
-% \currentsection value which we \setref above.
+% value which we passed to \setref above.
%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
@@ -9694,6 +10133,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\toksA = \expandafter{\csname XR#1-lof\endcsname}%
%
% use the same \entry macro we use to generate the TOC and index.
+ \let\entry\entryinternal
\edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
\writeentry
}}
@@ -9729,8 +10169,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
\openin 1 txi-#1.tex
\ifeof 1
- \errhelp = \nolanghelp
- \errmessage{Cannot read language file txi-#1.tex}%
+ \def\lang{#1}%
+ \def\enword{en}%
+ \ifx\lang\enword
+ % for English only, keep on going rather than issuing a fatal error
+ % message, as txi-en.tex likely doesn't contain any changes from the
+ % defaults. note that this is a problem if we already loaded another
+ % language file and want to switch back to English.
+ \message{Cannot read language file txi-#1.tex}%
+ \else
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \fi
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
@@ -9776,35 +10226,40 @@ directory should work if nowhere else does.}
\newif\iftxinativeunicodecapable
\newif\iftxiusebytewiseio
-\ifx\XeTeXrevision\thisisundefined
- \ifx\luatexversion\thisisundefined
- \txinativeunicodecapablefalse
- \txiusebytewiseiotrue
- \else
+\ifxetex
+ \txinativeunicodecapabletrue
+ \txiusebytewiseiofalse
+\else
+ \ifluatex
\txinativeunicodecapabletrue
\txiusebytewiseiofalse
+ \else
+ \txinativeunicodecapablefalse
+ \txiusebytewiseiotrue
\fi
-\else
- \txinativeunicodecapabletrue
- \txiusebytewiseiofalse
\fi
+\let\xetexpreauxfile\relax
+\let\xetexpostauxfile\relax
+
% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
% for non-UTF-8 (byte-wise) encodings.
%
\def\setbytewiseio{%
- \ifx\XeTeXrevision\thisisundefined
- \else
- \XeTeXdefaultencoding "bytes" % For subsequent files to be read
- \XeTeXinputencoding "bytes" % For document root file
- % Unfortunately, there seems to be no corresponding XeTeX command for
- % output encoding. This is a problem for auxiliary index and TOC files.
- % The only solution would be perhaps to write out @U{...} sequences in
- % place of non-ASCII characters.
+ \ifxetex
+ % For document root file
+ \XeTeXinputencoding "bytes"
+ %
+ % Setting for subsequent files to be read with @include.
+ \XeTeXdefaultencoding "bytes"
+ %
+ % Use UTF-8 for reading auxiliary index and TOC files, which are
+ % always output in UTF-8 with XeTeX.
+ \def\xetexpreauxfile{\XeTeXdefaultencoding "UTF-8"}%
+ \def\xetexpostauxfile{\XeTeXdefaultencoding "bytes"}%
\fi
- \ifx\luatexversion\thisisundefined
- \else
+ \ifluatex
\directlua{
local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
local function convert_char (char)
@@ -9898,12 +10353,10 @@ directory should work if nowhere else does.}
% For native Unicode handling (XeTeX and LuaTeX)
\nativeunicodechardefs
\else
- % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
+ % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX).
+ % Since we already invoke \utfeightchardefs at the top level,
+ % making non-ascii chars active is sufficient.
\setnonasciicharscatcode\active
- % since we already invoked \utfeightchardefs at the top level
- % (below), do not re-invoke it, otherwise our check for duplicated
- % definitions gets triggered. Making non-ascii chars active is
- % sufficient.
\fi
%
\else
@@ -9915,8 +10368,7 @@ directory should work if nowhere else does.}
\fi % lattwo
\fi % ascii
%
- \ifx\XeTeXrevision\thisisundefined
- \else
+ \ifxetex
\ifx \declaredencoding \utfeight
\else
\ifx \declaredencoding \ascii
@@ -9928,7 +10380,6 @@ directory should work if nowhere else does.}
\fi
}
-% emacs-page
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
%
@@ -9937,12 +10388,6 @@ directory should work if nowhere else does.}
% Take account of \c (plain) vs. \, (Texinfo) difference.
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
-% First, make active non-ASCII characters in order for them to be
-% correctly categorized when TeX reads the replacement text of
-% macros containing the character definitions.
-\setnonasciicharscatcode\active
-%
-
\def\gdefchar#1#2{%
\gdef#1{%
\ifpassthroughchars
@@ -9952,8 +10397,14 @@ directory should work if nowhere else does.}
\fi
}}
+\begingroup
+
+% Make non-ASCII characters active for defining the character definition
+% macros.
+\setnonasciicharscatcode\active
+
% Latin1 (ISO-8859-1) character definitions.
-\def\latonechardefs{%
+\gdef\latonechardefs{%
\gdefchar^^a0{\tie}
\gdefchar^^a1{\exclamdown}
\gdefchar^^a2{{\tcfont \char162}} % cent
@@ -10058,7 +10509,7 @@ directory should work if nowhere else does.}
}
% Latin9 (ISO-8859-15) encoding character definitions.
-\def\latninechardefs{%
+\gdef\latninechardefs{%
% Encoding is almost identical to Latin1.
\latonechardefs
%
@@ -10073,7 +10524,7 @@ directory should work if nowhere else does.}
}
% Latin2 (ISO-8859-2) character definitions.
-\def\lattwochardefs{%
+\gdef\lattwochardefs{%
\gdefchar^^a0{\tie}
\gdefchar^^a1{\ogonek{A}}
\gdefchar^^a2{\u{}}
@@ -10091,7 +10542,7 @@ directory should work if nowhere else does.}
\gdefchar^^ae{\v Z}
\gdefchar^^af{\dotaccent Z}
%
- \gdefchar^^b0{\textdegree{}}
+ \gdefchar^^b0{\textdegree}
\gdefchar^^b1{\ogonek{a}}
\gdefchar^^b2{\ogonek{ }}
\gdefchar^^b3{\l}
@@ -10177,6 +10628,8 @@ directory should work if nowhere else does.}
\gdefchar^^ff{\dotaccent{}}
}
+\endgroup % active chars
+
% UTF-8 character definitions.
%
% This code to support UTF-8 is based on LaTeX's utf8.def, with some
@@ -10198,11 +10651,15 @@ directory should work if nowhere else does.}
\gdef\UTFviiiDefined#1{%
\ifx #1\relax
- \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+ \ifutfviiidefinedwarning
+ \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+ \fi
\else
\expandafter #1%
\fi
}
+\newif\ifutfviiidefinedwarning
+\utfviiidefinedwarningtrue
% Give non-ASCII bytes the active definitions for processing UTF-8 sequences
\begingroup
@@ -10212,8 +10669,8 @@ directory should work if nowhere else does.}
% Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
% substituting ~ and $ with a character token of that value.
- \def\UTFviiiLoop{%
- \global\catcode\countUTFx\active
+ \gdef\UTFviiiLoop{%
+ \catcode\countUTFx\active
\uccode`\~\countUTFx
\uccode`\$\countUTFx
\uppercase\expandafter{\UTFviiiTmp}%
@@ -10221,7 +10678,7 @@ directory should work if nowhere else does.}
\ifnum\countUTFx < \countUTFy
\expandafter\UTFviiiLoop
\fi}
-
+ %
% For bytes other than the first in a UTF-8 sequence. Not expected to
% be expanded except when writing to auxiliary files.
\countUTFx = "80
@@ -10255,6 +10712,16 @@ directory should work if nowhere else does.}
\else\expandafter\UTFviiiFourOctets\expandafter$\fi
}}%
\UTFviiiLoop
+ %
+ % for pdftex only, used to expand ASCII to UTF-16BE.
+ \gdef\asciitounicode{%
+ \countUTFx = "20
+ \countUTFy = "80
+ \def\UTFviiiTmp{%
+ \def~{\nullbyte $}}%
+ \UTFviiiLoop
+ }
+ {\catcode0=11 \gdef\nullbyte{^^00}}%
\endgroup
\def\globallet{\global\let} % save some \expandafter's below
@@ -10271,7 +10738,7 @@ directory should work if nowhere else does.}
\uppercase{.}
\endgroup
\else
- \errhelp = \EMsimple
+ \errhelp = \EMsimple
\errmessage{Unicode character U+#1 not supported, sorry}%
\fi
\else
@@ -10279,8 +10746,8 @@ directory should work if nowhere else does.}
\fi
}
-% These macros are used here to construct the name of a control
-% sequence to be defined.
+% These macros are used here to construct the names of macros
+% that expand to the definitions for UTF-8 sequences.
\def\UTFviiiTwoOctetsName#1#2{%
\csname u8:#1\string #2\endcsname}%
\def\UTFviiiThreeOctetsName#1#2#3{%
@@ -10288,6 +10755,35 @@ directory should work if nowhere else does.}
\def\UTFviiiFourOctetsName#1#2#3#4{%
\csname u8:#1\string #2\string #3\string #4\endcsname}%
+% generate UTF-16 from codepoint
+\def\utfsixteentotoks#1#2{%
+ \countUTFz = "#2\relax
+ \ifnum \countUTFz > 65535
+ % doesn't work for codepoints > U+FFFF
+ % we don't define glyphs for any of these anyway, so it doesn't matter
+ #1={U+#2}%
+ \else
+ \countUTFx = \countUTFz
+ \divide\countUTFx by 256
+ \countUTFy = \countUTFx
+ \multiply\countUTFx by 256
+ \advance\countUTFz by -\countUTFx
+ \uccode`,=\countUTFy
+ \uccode`;=\countUTFz
+ \ifnum\countUTFy = 0
+ \uppercase{#1={\nullbyte\string;}}%
+ \else\ifnum\countUTFz = 0
+ \uppercase{#1={\string,\nullbyte}}%
+ \else
+ \uppercase{#1={\string,\string;}}%
+ \fi\fi
+ % NB \uppercase cannot insert a null byte
+ \fi
+}
+
+\newif\ifutfbytespdf
+\utfbytespdffalse
+
% For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
% provide a definition macro to replace a Unicode character;
% this gets used by the @U command
@@ -10304,19 +10800,23 @@ directory should work if nowhere else does.}
\countUTFz = "#1\relax
\begingroup
\parseXMLCharref
-
- % Give \u8:... its definition. The sequence of seven \expandafter's
- % expands after the \gdef three times, e.g.
%
+ % Completely expand \UTFviiiTmp, which looks like:
% 1. \UTFviiTwoOctetsName B1 B2
% 2. \csname u8:B1 \string B2 \endcsname
% 3. \u8: B1 B2 (a single control sequence token)
+ \xdef\UTFviiiTmp{\UTFviiiTmp}%
%
- \expandafter\expandafter
- \expandafter\expandafter
- \expandafter\expandafter
- \expandafter\gdef \UTFviiiTmp{#2}%
- %
+ \ifpdf
+ \toksA={#2}%
+ \utfsixteentotoks\toksB{#1}%
+ \expandafter\xdef\UTFviiiTmp{%
+ \noexpand\ifutfbytespdf\noexpand\utfbytes{\the\toksB}%
+ \noexpand\else\the\toksA\noexpand\fi}%
+ \else
+ \expandafter\gdef\UTFviiiTmp{#2}%
+ \fi
+ %
\expandafter\ifx\csname uni:#1\endcsname \relax \else
\message{Internal error, already defined: #1}%
\fi
@@ -10325,12 +10825,13 @@ directory should work if nowhere else does.}
\expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
\endgroup}
%
- % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
- % to the corresponding UTF-8 sequence.
+ % Given the value in \countUTFz as a Unicode code point, set
+ % \UTFviiiTmp to one of the \UTVviii*OctetsName macros followed by
+ % the corresponding UTF-8 sequence.
\gdef\parseXMLCharref{%
- \ifnum\countUTFz < "A0\relax
+ \ifnum\countUTFz < "20\relax
\errhelp = \EMsimple
- \errmessage{Cannot define Unicode char value < 00A0}%
+ \errmessage{Cannot define Unicode char value < 0020}%
\else\ifnum\countUTFz < "800\relax
\parseUTFviiiA,%
\parseUTFviiiB C\UTFviiiTwoOctetsName.,%
@@ -10355,7 +10856,7 @@ directory should work if nowhere else does.}
\divide\countUTFz by 64
\countUTFy = \countUTFz % Save to be the future value of \countUTFz.
\multiply\countUTFz by 64
-
+
% \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
% in order to get the last five bits.
\advance\countUTFx by -\countUTFz
@@ -10385,12 +10886,22 @@ directory should work if nowhere else does.}
\catcode"#1=\other
}
+% Suppress ligature creation from adjacent characters.
+\ifluatex
+ % Braces do not suppress ligature creation in LuaTeX, e.g. in of{}fice
+ % to suppress the "ff" ligature. Using a kern appears to be the only
+ % workaround.
+ \def\nolig{\kern0pt{}}
+\else
+ \def\nolig{{}}
+\fi
+
% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
-%
+%
% Many of our renditions are less than wonderful, and all the missing
% characters are available somewhere. Loading the necessary fonts
% awaits user request. We can't truly support Unicode without
@@ -10400,6 +10911,103 @@ directory should work if nowhere else does.}
% least make most of the characters not bomb out.
%
\def\unicodechardefs{%
+ \DeclareUnicodeCharacter{0020}{ } % space
+ \DeclareUnicodeCharacter{0021}{\char"21 }% % space to terminate number
+ \DeclareUnicodeCharacter{0022}{\char"22 }%
+ \DeclareUnicodeCharacter{0023}{\char"23 }%
+ \DeclareUnicodeCharacter{0024}{\char"24 }%
+ \DeclareUnicodeCharacter{0025}{\char"25 }%
+ \DeclareUnicodeCharacter{0026}{\char"26 }%
+ \DeclareUnicodeCharacter{0027}{\char"27 }%
+ \DeclareUnicodeCharacter{0028}{\char"28 }%
+ \DeclareUnicodeCharacter{0029}{\char"29 }%
+ \DeclareUnicodeCharacter{002A}{\char"2A }%
+ \DeclareUnicodeCharacter{002B}{\char"2B }%
+ \DeclareUnicodeCharacter{002C}{\char"2C }%
+ \DeclareUnicodeCharacter{002D}{\char"2D }%
+ \DeclareUnicodeCharacter{002E}{\char"2E }%
+ \DeclareUnicodeCharacter{002F}{\char"2F }%
+ \DeclareUnicodeCharacter{0030}{0}%
+ \DeclareUnicodeCharacter{0031}{1}%
+ \DeclareUnicodeCharacter{0032}{2}%
+ \DeclareUnicodeCharacter{0033}{3}%
+ \DeclareUnicodeCharacter{0034}{4}%
+ \DeclareUnicodeCharacter{0035}{5}%
+ \DeclareUnicodeCharacter{0036}{6}%
+ \DeclareUnicodeCharacter{0037}{7}%
+ \DeclareUnicodeCharacter{0038}{8}%
+ \DeclareUnicodeCharacter{0039}{9}%
+ \DeclareUnicodeCharacter{003A}{\char"3A }%
+ \DeclareUnicodeCharacter{003B}{\char"3B }%
+ \DeclareUnicodeCharacter{003C}{\char"3C }%
+ \DeclareUnicodeCharacter{003D}{\char"3D }%
+ \DeclareUnicodeCharacter{003E}{\char"3E }%
+ \DeclareUnicodeCharacter{003F}{\char"3F }%
+ \DeclareUnicodeCharacter{0040}{\char"40 }%
+ \DeclareUnicodeCharacter{0041}{A}%
+ \DeclareUnicodeCharacter{0042}{B}%
+ \DeclareUnicodeCharacter{0043}{C}%
+ \DeclareUnicodeCharacter{0044}{D}%
+ \DeclareUnicodeCharacter{0045}{E}%
+ \DeclareUnicodeCharacter{0046}{F}%
+ \DeclareUnicodeCharacter{0047}{G}%
+ \DeclareUnicodeCharacter{0048}{H}%
+ \DeclareUnicodeCharacter{0049}{I}%
+ \DeclareUnicodeCharacter{004A}{J}%
+ \DeclareUnicodeCharacter{004B}{K}%
+ \DeclareUnicodeCharacter{004C}{L}%
+ \DeclareUnicodeCharacter{004D}{M}%
+ \DeclareUnicodeCharacter{004E}{N}%
+ \DeclareUnicodeCharacter{004F}{O}%
+ \DeclareUnicodeCharacter{0050}{P}%
+ \DeclareUnicodeCharacter{0051}{Q}%
+ \DeclareUnicodeCharacter{0052}{R}%
+ \DeclareUnicodeCharacter{0053}{S}%
+ \DeclareUnicodeCharacter{0054}{T}%
+ \DeclareUnicodeCharacter{0055}{U}%
+ \DeclareUnicodeCharacter{0056}{V}%
+ \DeclareUnicodeCharacter{0057}{W}%
+ \DeclareUnicodeCharacter{0058}{X}%
+ \DeclareUnicodeCharacter{0059}{Y}%
+ \DeclareUnicodeCharacter{005A}{Z}%
+ \DeclareUnicodeCharacter{005B}{\char"5B }%
+ \DeclareUnicodeCharacter{005C}{\char"5C }%
+ \DeclareUnicodeCharacter{005D}{\char"5D }%
+ \DeclareUnicodeCharacter{005E}{\char"5E }%
+ \DeclareUnicodeCharacter{005F}{\char"5F }%
+ \DeclareUnicodeCharacter{0060}{\char"60 }%
+ \DeclareUnicodeCharacter{0061}{a}%
+ \DeclareUnicodeCharacter{0062}{b}%
+ \DeclareUnicodeCharacter{0063}{c}%
+ \DeclareUnicodeCharacter{0064}{d}%
+ \DeclareUnicodeCharacter{0065}{e}%
+ \DeclareUnicodeCharacter{0066}{f}%
+ \DeclareUnicodeCharacter{0067}{g}%
+ \DeclareUnicodeCharacter{0068}{h}%
+ \DeclareUnicodeCharacter{0069}{i}%
+ \DeclareUnicodeCharacter{006A}{j}%
+ \DeclareUnicodeCharacter{006B}{k}%
+ \DeclareUnicodeCharacter{006C}{l}%
+ \DeclareUnicodeCharacter{006D}{m}%
+ \DeclareUnicodeCharacter{006E}{n}%
+ \DeclareUnicodeCharacter{006F}{o}%
+ \DeclareUnicodeCharacter{0070}{p}%
+ \DeclareUnicodeCharacter{0071}{q}%
+ \DeclareUnicodeCharacter{0072}{r}%
+ \DeclareUnicodeCharacter{0073}{s}%
+ \DeclareUnicodeCharacter{0074}{t}%
+ \DeclareUnicodeCharacter{0075}{u}%
+ \DeclareUnicodeCharacter{0076}{v}%
+ \DeclareUnicodeCharacter{0077}{w}%
+ \DeclareUnicodeCharacter{0078}{x}%
+ \DeclareUnicodeCharacter{0079}{y}%
+ \DeclareUnicodeCharacter{007A}{z}%
+ \DeclareUnicodeCharacter{007B}{\char"7B }%
+ \DeclareUnicodeCharacter{007C}{\char"7C }%
+ \DeclareUnicodeCharacter{007D}{\char"7D }%
+ \DeclareUnicodeCharacter{007E}{\char"7E }%
+ % \DeclareUnicodeCharacter{007F}{} % DEL
+ %
\DeclareUnicodeCharacter{00A0}{\tie}%
\DeclareUnicodeCharacter{00A1}{\exclamdown}%
\DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
@@ -10417,7 +11025,7 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
\DeclareUnicodeCharacter{00AF}{\={ }}%
%
- \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
+ \DeclareUnicodeCharacter{00B0}{\textdegree}%
\DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
\DeclareUnicodeCharacter{00B2}{$^2$}%
\DeclareUnicodeCharacter{00B3}{$^3$}%
@@ -10899,11 +11507,14 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{1EF8}{\~Y}%
\DeclareUnicodeCharacter{1EF9}{\~y}%
%
+ % Exotic spaces
+ \DeclareUnicodeCharacter{2007}{\hphantom{0}}%
+ %
% Punctuation
\DeclareUnicodeCharacter{2013}{--}%
\DeclareUnicodeCharacter{2014}{---}%
- \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
- \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+ \DeclareUnicodeCharacter{2018}{\quoteleft\nolig}%
+ \DeclareUnicodeCharacter{2019}{\quoteright\nolig}%
\DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
\DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
\DeclareUnicodeCharacter{201D}{\quotedblright{}}%
@@ -10918,7 +11529,7 @@ directory should work if nowhere else does.}
%
\DeclareUnicodeCharacter{20AC}{\euro{}}%
%
- \DeclareUnicodeCharacter{2192}{\expansion{}}%
+ \DeclareUnicodeCharacter{2192}{\arrow}%
\DeclareUnicodeCharacter{21D2}{\result{}}%
%
% Mathematical symbols
@@ -10938,7 +11549,7 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
%
\DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
- \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
+ \DeclareUnicodeCharacter{2032}{\ensuremath{^\prime}}%
\DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
\DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
\DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
@@ -11061,6 +11672,25 @@ directory should work if nowhere else does.}
%
\global\mathchardef\checkmark="1370% actually the square root sign
\DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
+ %
+ % These are all the combining accents. We need these empty definitions
+ % at present for the sake of PDF outlines.
+ \DeclareUnicodeCharacter{0300}{}%
+ \DeclareUnicodeCharacter{0301}{}%
+ \DeclareUnicodeCharacter{0302}{}%
+ \DeclareUnicodeCharacter{0303}{}%
+ \DeclareUnicodeCharacter{0305}{}%
+ \DeclareUnicodeCharacter{0306}{}%
+ \DeclareUnicodeCharacter{0307}{}%
+ \DeclareUnicodeCharacter{0308}{}%
+ \DeclareUnicodeCharacter{030A}{}%
+ \DeclareUnicodeCharacter{030B}{}%
+ \DeclareUnicodeCharacter{030C}{}%
+ \DeclareUnicodeCharacter{0323}{}%
+ \DeclareUnicodeCharacter{0327}{}%
+ \DeclareUnicodeCharacter{0328}{}%
+ \DeclareUnicodeCharacter{0331}{}%
+ \DeclareUnicodeCharacter{0361}{}%
}% end of \unicodechardefs
% UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
@@ -11081,24 +11711,26 @@ directory should work if nowhere else does.}
% provide a definition macro to replace/pass-through a Unicode character
%
\def\DeclareUnicodeCharacterNative#1#2{%
- \catcode"#1=\active
- \def\dodeclareunicodecharacternative##1##2##3{%
+ \ifnum"#1>"7F % only make non-ASCII chars active
+ \catcode"#1=\active
+ \def\dodeclareunicodecharacternative##1##2##3{%
+ \begingroup
+ \uccode`\~="##2\relax
+ \uppercase{\gdef~}{%
+ \ifpassthroughchars
+ ##1%
+ \else
+ ##3%
+ \fi
+ }
+ \endgroup
+ }
\begingroup
- \uccode`\~="##2\relax
- \uppercase{\gdef~}{%
- \ifpassthroughchars
- ##1%
- \else
- ##3%
- \fi
- }
+ \uccode`\.="#1\relax
+ \uppercase{\def\UTFNativeTmp{.}}%
+ \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
\endgroup
- }
- \begingroup
- \uccode`\.="#1\relax
- \uppercase{\def\UTFNativeTmp{.}}%
- \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
- \endgroup
+ \fi
}
% Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
@@ -11127,14 +11759,14 @@ directory should work if nowhere else does.}
\relax
}
-% Define all Unicode characters we know about. This makes UTF-8 the default
-% input encoding and allows @U to work.
+% Define all Unicode characters we know about
\iftxinativeunicodecapable
\nativeunicodechardefsatu
\else
\utfeightchardefs
\fi
+
\message{formatting,}
\newdimen\defaultparindent \defaultparindent = 15pt
@@ -11181,13 +11813,9 @@ directory should work if nowhere else does.}
%
\vsize = #1\relax
\advance\vsize by \topskip
- \outervsize = \vsize
- \advance\outervsize by 2\topandbottommargin
\txipageheight = \vsize
%
\hsize = #2\relax
- \outerhsize = \hsize
- \advance\outerhsize by 0.5in
\txipagewidth = \hsize
%
\normaloffset = #4\relax
@@ -11201,12 +11829,12 @@ directory should work if nowhere else does.}
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
\else
- \ifx\XeTeXrevision\thisisundefined
- \special{papersize=#8,#7}%
- \else
+ \ifxetex
\pdfpageheight #7\relax
\pdfpagewidth #8\relax
% XeTeX does not have \pdfhorigin and \pdfvorigin.
+ \else
+ \special{papersize=#8,#7}%
\fi
\fi
%
@@ -11244,23 +11872,6 @@ directory should work if nowhere else does.}
\defbodyindent = .5cm
}}
-% Use @smallerbook to reset parameters for 6x9 trim size.
-% (Just testing, parameters still in flux.)
-\def\smallerbook{{\globaldefs = 1
- \parskip = 1.5pt plus 1pt
- \textleading = 12pt
- %
- \internalpagesizes{7.4in}{4.8in}%
- {-.2in}{-.4in}%
- {0pt}{14pt}%
- {9in}{6in}%
- %
- \lispnarrowing = 0.25in
- \tolerance = 700
- \contentsrightmargin = 0pt
- \defbodyindent = .4cm
-}}
-
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
@@ -11294,7 +11905,7 @@ directory should work if nowhere else does.}
\textleading = 12.5pt
%
\internalpagesizes{160mm}{120mm}%
- {\voffset}{\hoffset}%
+ {\voffset}{-11.4mm}%
{\bindingoffset}{8pt}%
{210mm}{148mm}%
%
@@ -11373,9 +11984,138 @@ directory should work if nowhere else does.}
\hfuzz = 1pt
+\message{microtype,}
+
+% protrusion, from Thanh's protcode.tex.
+\def\mtsetprotcode#1{%
+ \rpcode#1`\!=200 \rpcode#1`\,=700 \rpcode#1`\-=700 \rpcode#1`\.=700
+ \rpcode#1`\;=500 \rpcode#1`\:=500 \rpcode#1`\?=200
+ \rpcode#1`\'=700
+ \rpcode#1 34=500 % ''
+ \rpcode#1 123=300 % --
+ \rpcode#1 124=200 % ---
+ \rpcode#1`\)=50 \rpcode#1`\A=50 \rpcode#1`\F=50 \rpcode#1`\K=50
+ \rpcode#1`\L=50 \rpcode#1`\T=50 \rpcode#1`\V=50 \rpcode#1`\W=50
+ \rpcode#1`\X=50 \rpcode#1`\Y=50 \rpcode#1`\k=50 \rpcode#1`\r=50
+ \rpcode#1`\t=50 \rpcode#1`\v=50 \rpcode#1`\w=50 \rpcode#1`\x=50
+ \rpcode#1`\y=50
+ %
+ \lpcode#1`\`=700
+ \lpcode#1 92=500 % ``
+ \lpcode#1`\(=50 \lpcode#1`\A=50 \lpcode#1`\J=50 \lpcode#1`\T=50
+ \lpcode#1`\V=50 \lpcode#1`\W=50 \lpcode#1`\X=50 \lpcode#1`\Y=50
+ \lpcode#1`\v=50 \lpcode#1`\w=50 \lpcode#1`\x=50 \lpcode#1`\y=0
+ %
+ \mtadjustprotcode#1\relax
+}
+
+\newcount\countC
+\def\mtadjustprotcode#1{%
+ \countC=0
+ \loop
+ \ifcase\lpcode#1\countC\else
+ \mtadjustcp\lpcode#1\countC
+ \fi
+ \ifcase\rpcode#1\countC\else
+ \mtadjustcp\rpcode#1\countC
+ \fi
+ \advance\countC 1
+ \ifnum\countC < 256 \repeat
+}
+
+\newcount\countB
+\def\mtadjustcp#1#2#3{%
+ \setbox\boxA=\hbox{%
+ \ifx#2\font\else#2\fi
+ \char#3}%
+ \countB=\wd\boxA
+ \multiply\countB #1#2#3\relax
+ \divide\countB \fontdimen6 #2\relax
+ #1#2#3=\countB\relax
+}
+
+\ifxetex % XeTeX
+ \mtsetprotcode\textrm
+ \def\mtfontexpand#1{}
+\else
+ \ifluatex % LuaTeX
+ \mtsetprotcode\textrm
+ \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+ \else
+ \ifpdf % pdfTeX
+ \mtsetprotcode\textrm
+ \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
+ \else % TeX
+ \def\mtfontexpand#1{}
+ \fi
+ \fi
+\fi
+
+
+\newif\ifmicrotype
+
+\def\microtypeON{%
+ \microtypetrue
+ %
+ \ifxetex % XeTeX
+ \XeTeXprotrudechars=2
+ \else
+ \ifluatex % LuaTeX
+ \adjustspacing=2
+ \protrudechars=2
+ \else
+ \ifpdf % pdfTeX
+ \pdfadjustspacing=2
+ \pdfprotrudechars=2
+ \fi
+ \fi
+ \fi
+ %
+ \mtfontexpand\textrm
+ \mtfontexpand\textsl
+ \mtfontexpand\textbf
+}
+
+\def\microtypeOFF{%
+ \microtypefalse
+ %
+ \ifxetex % XeTeX
+ \XeTeXprotrudechars=0
+ \else
+ \ifluatex % LuaTeX
+ \adjustspacing=0
+ \protrudechars=0
+ \else
+ \ifpdf % pdfTeX
+ \pdfadjustspacing=0
+ \pdfprotrudechars=0
+ \fi
+ \fi
+ \fi
+}
+
+\microtypeOFF
+
+\parseargdef\microtype{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\onword
+ \microtypeON
+ \else\ifx\txiarg\offword
+ \microtypeOFF
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @microtype option `\txiarg', must be on|off}%
+ \fi\fi
+}
+
+
\message{and turning on texinfo input format.}
+% Make UTF-8 the default encoding.
+\documentencodingzzz{UTF-8}
+
\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+\catcode`\^^K = 10 % treat vertical tab as whitespace
% DEL is a comment character, in case @c does not suffice.
\catcode`\^^? = 14
@@ -11391,23 +12131,6 @@ directory should work if nowhere else does.}
\catcode`\|=\other \def\normalverticalbar{|}
\catcode`\~=\other \def\normaltilde{~}
-% This macro is used to make a character print one way in \tt
-% (where it can probably be output as-is), and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise. Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
-
-% Same as above, but check for italic font. Actually this also catches
-% non-italic slanted fonts since it is impossible to distinguish them from
-% italic fonts. But since this is only used by $ and it uses \sl anyway
-% this is not a problem.
-\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-
% Set catcodes for Texinfo file
% Active characters for printing the wanted glyph.
@@ -11442,7 +12165,7 @@ directory should work if nowhere else does.}
\def\texinfochars{%
\let< = \activeless
\let> = \activegtr
- \let~ = \activetilde
+ \let~ = \activetilde
\let^ = \activehat
\setregularquotes
\let\b = \strong
@@ -11453,23 +12176,32 @@ directory should work if nowhere else does.}
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
\def\turnoffactive{%
- \normalturnoffactive
+ \passthroughcharstrue
+ \let-=\normaldash
+ \let"=\normaldoublequote
+ \let$=\normaldollar %$ font-lock fix
+ \let+=\normalplus
+ \let<=\normalless
+ \let>=\normalgreater
+ \let^=\normalcaret
+ \let_=\normalunderscore
+ \let|=\normalverticalbar
+ \let~=\normaltilde
\otherbackslash
+ \setregularquotes
+ \unsepspaces
}
-\catcode`\@=0
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \loadconf turn them back on.
+\catcode`+=\other \catcode`\_=\other
+
% \backslashcurfont outputs one backslash character in current font,
% as in \char`\\.
\global\chardef\backslashcurfont=`\\
-% \realbackslash is an actual character `\' with catcode other.
-{\catcode`\\=\other @gdef@realbackslash{\}}
-
-% In Texinfo, backslash is an active character; it prints the backslash
-% in fixed width font.
-\catcode`\\=\active % @ for escape char from now on.
-
% Print a typewriter backslash. For math mode, we can't simply use
% \backslashcurfont: the story here is that in math mode, the \char
% of \backslashcurfont ends up printing the roman \ from the math symbol
@@ -11479,109 +12211,125 @@ directory should work if nowhere else does.}
% ignored family value; char position "5C). We can't use " for the
% usual hex value because it has already been made active.
-@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
-
-% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
-@gdef@otherbackslash{@let\=@realbackslash}
-
-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
-{@catcode`- = @active
- @gdef@normalturnoffactive{%
- @passthroughcharstrue
- @let-=@normaldash
- @let"=@normaldoublequote
- @let$=@normaldollar %$ font-lock fix
- @let+=@normalplus
- @let<=@normalless
- @let>=@normalgreater
- @let^=@normalcaret
- @let_=@normalunderscore
- @let|=@normalverticalbar
- @let~=@normaltilde
- @let\=@ttbackslash
- @setregularquotes
- @unsepspaces
- }
-}
+\def\ttbackslash{{\tt \ifmmode \mathchar29020 \else \backslashcurfont \fi}}
+\let\backslashchar = \ttbackslash % \backslashchar{} is for user documents.
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have @fixbackslash turn them back on.
-@catcode`+=@other @catcode`@_=@other
-
-% \enablebackslashhack - allow file to begin `\input texinfo'
-%
-% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
-% That is what \eatinput is for; after that, the `\' should revert to printing
-% a backslash.
-% If the file did not have a `\input texinfo', then it is turned off after
-% the first line; otherwise the first `\' in the file would cause an error.
-% This is used on the very last line of this file, texinfo.tex.
-% We also use @c to call @fixbackslash, in case ends of lines are hidden.
-{
-@catcode`@^=7
-@catcode`@^^M=13@gdef@enablebackslashhack{%
- @global@let\ = @eatinput%
- @catcode`@^^M=13%
- @def@c{@fixbackslash@c}%
- % Definition for the newline at the end of this file.
- @def ^^M{@let^^M@secondlinenl}%
- % Definition for a newline in the main Texinfo file.
- @gdef @secondlinenl{@fixbackslash}%
- % In case the first line has a whole-line command on it
- @let@originalparsearg@parsearg
- @def@parsearg{@fixbackslash@originalparsearg}
+% These are made active for url-breaking, so need
+% active definitions as the normal characters.
+\def\normaldot{.}
+\def\normalquest{?}
+\def\normalslash{/}
+
+% \newlinesloadsconf - call \loadconf as soon as possible in the
+% file, e.g. at the first newline.
+%
+{\catcode`\^=7
+\catcode`\^^M=13
+\gdef\newlineloadsconf{%
+ \catcode`\^^M=13 %
+ \newlineloadsconfzz%
+}
+\gdef\newlineloadsconfzz#1^^M{%
+ \def\c{\loadconf\c}%
+ % Definition for the first newline read in the file
+ \def ^^M{\loadconf}%
+ % In case the first line has a whole-line or environment command on it
+ \let\originalparsearg\parsearg%
+ \def\parsearg{\loadconf\originalparsearg}%
+ %
+ % \startenvironment is in the expansion of commands defined with \envdef
+ \let\originalstartenvironment\startenvironment%
+ \def\startenvironment{\loadconf\startenvironment}%
}}
-{@catcode`@^=7 @catcode`@^^M=13%
-@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
% Emergency active definition of newline, in case an active newline token
% appears by mistake.
-{@catcode`@^=7 @catcode13=13%
-@gdef@enableemergencynewline{%
- @gdef^^M{%
- @par%
- %<warning: active newline>@par%
+{\catcode`\^=7 \catcode13=13%
+\gdef\enableemergencynewline{%
+ \gdef^^M{%
+ \par%
+ %<warning: active newline>\par%
}}}
-@gdef@fixbackslash{%
- @ifx\@eatinput @let\ = @ttbackslash @fi
- @catcode13=5 % regular end of line
- @enableemergencynewline
- @let@c=@comment
- @let@parsearg@originalparsearg
+% \loadconf gets called at the beginning of every Texinfo file.
+% If texinfo.cnf is present on the system, read it. Useful for site-wide
+% @afourpaper, etc. Not opening texinfo.cnf directly in texinfo.tex
+% makes it possible to make a format file for Texinfo.
+%
+\gdef\loadconf{%
+ \relax % Terminate the filename if running as "tex '&texinfo' FILE.texi".
+ %
+ % Turn off the definitions that trigger \loadconf
+ \everyjobreset
+ \catcode13=5 % regular end of line
+ \enableemergencynewline
+ \let\c=\comment
+ \let\parsearg\originalparsearg
+ \let\startenvironment\originalstartenvironment
+ %
% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
- @catcode`+=@active
- @catcode`@_=@active
- %
- % If texinfo.cnf is present on the system, read it.
- % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
- % called at the beginning of every Texinfo file. Not opening texinfo.cnf
- % directly in this file, texinfo.tex, makes it possible to make a format
- % file for Texinfo.
+ \catcode`+=\active
+ \catcode`\_=\active
%
- @openin 1 texinfo.cnf
- @ifeof 1 @else @input texinfo.cnf @fi
- @closein 1
+ \openin 1 texinfo.cnf
+ \ifeof 1 \else \input texinfo.cnf \fi
+ \closein 1
}
+% Redefine some control sequences to be controlled by the \ifdummies
+% and \ifindexnofonts switches. Do this at the end so that the control
+% sequences are all defined.
+\definedummies
+
+
+
+
+\catcode`\@=0
+
+% \realbackslash is an actual character `\' with catcode other.
+{\catcode`\\=\other @gdef@realbackslash{\}}
+
+% In Texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active % @ for escape char from now on.
+
+@let\ = @ttbackslash
+
+% If in a .fmt file, print the version number.
+% \eatinput stops the `\input texinfo' from showing up.
+% After that, `\' should revert to printing a backslash.
+% Turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+%
+@everyjob{@message{[Texinfo version @texinfoversion]}%
+ @global@let\ = @eatinput
+ @catcode`+=@active @catcode`@_=@active}
+
+{@catcode`@^=7 @catcode`@^^M=13%
+@gdef@eatinput input texinfo#1^^M{@loadconf}}
+
+@def@everyjobreset{@ifx\@eatinput @let\ = @ttbackslash @fi}
+
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+ @turnoffactive
+ @let\=@ttbackslash
+ }
+}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
-% These (along with & and #) are made active for url-breaking, so need
-% active definitions as the normal characters.
-@def@normaldot{.}
-@def@normalquest{?}
-@def@normalslash{/}
-
% These look ok in all fonts, so just make them not special.
% @hashchar{} gets its own user-level command, because of #line.
@catcode`@& = @other @def@normalamp{&}
@@ -11596,17 +12344,11 @@ directory should work if nowhere else does.}
@c Do this last of all since we use ` in the previous @catcode assignments.
@catcode`@'=@active
@catcode`@`=@active
-@setregularquotes
@c Local variables:
-@c eval: (add-hook 'before-save-hook 'time-stamp)
-@c page-delimiter: "^\\\\message\\|emacs-page"
-@c time-stamp-start: "def\\\\texinfoversion{"
-@c time-stamp-format: "%:y-%02m-%02d.%02H"
-@c time-stamp-end: "}"
+@c eval: (add-hook 'before-save-hook 'time-stamp nil t)
+@c time-stamp-pattern: "texinfoversion{%Y-%02m-%02d.%02H}"
+@c page-delimiter: "^\\\\message"
@c End:
-@c vim:sw=2:
-
-@enablebackslashhack
-
+@newlineloadsconf
diff --git a/deps/libffi/doc/version.texi b/deps/libffi/doc/version.texi
index dc281e38e0f..c9adde9c03f 100644
--- a/deps/libffi/doc/version.texi
+++ b/deps/libffi/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 8 August 2026
-@set UPDATED-MONTH August 2026
-@set EDITION 3.8.0
-@set VERSION 3.8.0
+@set UPDATED 14 November 2026
+@set UPDATED-MONTH November 2026
+@set EDITION 3.8.1
+@set VERSION 3.8.1
diff --git a/deps/libffi/fficonfig.h.in b/deps/libffi/fficonfig.h.in
index 0b35a6be073..78c52d93403 100644
--- a/deps/libffi/fficonfig.h.in
+++ b/deps/libffi/fficonfig.h.in
@@ -71,10 +71,10 @@
/* Define if you support more than one size of the long double type */
#undef HAVE_LONG_DOUBLE_VARIANT
-/* Define to 1 if you have the `memcpy' function. */
+/* Define to 1 if you have the 'memcpy' function. */
#undef HAVE_MEMCPY
-/* Define to 1 if you have the `memfd_create' function. */
+/* Define to 1 if you have the 'memfd_create' function. */
#undef HAVE_MEMFD_CREATE
/* Define if .eh_frame sections should be read-only. */
@@ -134,16 +134,16 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* The size of `double', as computed by sizeof. */
+/* The size of 'double', as computed by sizeof. */
#undef SIZEOF_DOUBLE
-/* The size of `long double', as computed by sizeof. */
+/* The size of 'long double', as computed by sizeof. */
#undef SIZEOF_LONG_DOUBLE
-/* The size of `size_t', as computed by sizeof. */
+/* The size of 'size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
+/* Define to 1 if all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS
diff --git a/deps/libffi/generate-headers.py b/deps/libffi/generate-headers.py
index fb58edf17b6..b17dadff080 100644
--- a/deps/libffi/generate-headers.py
+++ b/deps/libffi/generate-headers.py
@@ -7,8 +7,8 @@ import sys
from pathlib import Path
-LIBFFI_VERSION = '3.8.0'
-LIBFFI_VERSION_NUMBER = '30800'
+LIBFFI_VERSION = '3.8.1'
+LIBFFI_VERSION_NUMBER = '30801'
def normalize_arch(target_arch):
aliases = {
diff --git a/deps/libffi/include/Makefile.in b/deps/libffi/include/Makefile.in
index 8851d33a6f9..fa38efaf444 100644
--- a/deps/libffi/include/Makefile.in
+++ b/deps/libffi/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -70,6 +70,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -155,10 +157,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(includedir)"
HEADERS = $(nodist_include_HEADERS) $(noinst_HEADERS)
@@ -282,8 +283,10 @@ ac_ct_READELF = @ac_ct_READELF@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
ax_enable_builddir_sed = @ax_enable_builddir_sed@
bindir = @bindir@
build = @build@
@@ -452,6 +455,7 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -516,9 +520,9 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -611,3 +615,10 @@ uninstall-am: uninstall-nodist_includeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/deps/libffi/install-sh b/deps/libffi/install-sh
index ec298b53740..1d8d9669646 100755
--- a/deps/libffi/install-sh
+++ b/deps/libffi/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-14.01; # UTC
+scriptversion=2025-06-18.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -124,9 +124,9 @@ it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
-Email bug reports to bug-automake@gnu.org.
-Automake home page: https://www.gnu.org/software/automake/
-"
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
while test $# -ne 0; do
case $1 in
@@ -170,7 +170,7 @@ while test $# -ne 0; do
-T) is_target_a_directory=never;;
- --version) echo "$0 $scriptversion"; exit $?;;
+ --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;;
--) shift
break;;
@@ -345,7 +345,7 @@ do
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directly in world-writable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
@@ -353,7 +353,7 @@ do
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
+ # Check for POSIX incompatibility with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
@@ -533,9 +533,9 @@ do
done
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/deps/libffi/libtool-version b/deps/libffi/libtool-version
index 814c6e21d92..5b9d5599953 100644
--- a/deps/libffi/libtool-version
+++ b/deps/libffi/libtool-version
@@ -26,4 +26,4 @@
# release, then set age to 0.
#
# CURRENT:REVISION:AGE
-13:0:5
+13:1:5
diff --git a/deps/libffi/ltmain.sh b/deps/libffi/ltmain.sh
index 977e5237bb0..22edd1403fb 100755
--- a/deps/libffi/ltmain.sh
+++ b/deps/libffi/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.4.7
+# 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-2022 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.
@@ -31,8 +31,8 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4.7 Debian-2.4.7-7build1"
-package_revision=2.4.7
+VERSION="2.5.4 Debian-2.5.4-9"
+package_revision=2.5.4
## ------ ##
@@ -64,7 +64,7 @@ package_revision=2.4.7
# libraries, which are installed to $pkgauxdir.
# Set a version string for this script.
-scriptversion=2019-02-19.15; # UTC
+scriptversion=2024-12-01.17; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
@@ -72,11 +72,11 @@ scriptversion=2019-02-19.15; # UTC
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2004-2019, 2021 Bootstrap Authors
+# Copyright (C) 2004-2019, 2021, 2023-2024 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
-# <https://opensource.org/license/MIT>, and GPL version 2 or later
-# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# <https://opensource.org/licenses/MIT>, and GPL version 2 or later
+# <https://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
# these licenses when using or redistributing this software or any of
# the files within it. See the URLs above, or the file `LICENSE`
# included in the Bootstrap distribution for the full license texts.
@@ -143,7 +143,7 @@ nl='
'
IFS="$sp $nl"
-# There are apparently some retarded systems that use ';' as a PATH separator!
+# There are apparently some systems that use ';' as a PATH separator!
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
@@ -572,15 +572,16 @@ func_require_term_colors ()
# ---------------------
# Append VALUE onto the existing contents of VAR.
+
# _G_HAVE_PLUSEQ_OP
# Can be empty, in which case the shell is probed, "yes" if += is
- # useable or anything else if it does not work.
- if test -z "$_G_HAVE_PLUSEQ_OP" && \
- __PLUSEQ_TEST="a" && \
- __PLUSEQ_TEST+=" b" 2>/dev/null && \
- test "a b" = "$__PLUSEQ_TEST"; then
- _G_HAVE_PLUSEQ_OP=yes
- fi
+ # usable or anything else if it does not work.
+if test -z "$_G_HAVE_PLUSEQ_OP" && \
+ __PLUSEQ_TEST="a" && \
+ __PLUSEQ_TEST+=" b" 2>/dev/null && \
+ test "a b" = "$__PLUSEQ_TEST"; then
+ _G_HAVE_PLUSEQ_OP=yes
+fi
if test yes = "$_G_HAVE_PLUSEQ_OP"
then
@@ -727,7 +728,7 @@ eval 'func_dirname ()
# to NONDIR_REPLACEMENT.
# value returned in "$func_dirname_result"
# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
+# value returned in "$func_basename_result"
# For efficiency, we do not delegate to the functions above but instead
# duplicate the functionality here.
eval 'func_dirname_and_basename ()
@@ -885,7 +886,7 @@ func_mkdir_p ()
# While some portion of DIR does not yet exist...
while test ! -d "$_G_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
+ # list in case some portion of path contains whitespace.
_G_dir_list=$_G_directory_path:$_G_dir_list
# If the last portion added has no slash in it, the list is done
@@ -1524,11 +1525,11 @@ func_lt_ver ()
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2010-2019, 2021 Bootstrap Authors
+# Copyright (C) 2010-2019, 2021, 2023-2024 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
-# <https://opensource.org/license/MIT>, and GPL version 2 or later
-# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# <https://opensource.org/licenses/MIT>, and GPL version 2 or later
+# <https://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
# these licenses when using or redistributing this software or any of
# the files within it. See the URLs above, or the file `LICENSE`
# included in the Bootstrap distribution for the full license texts.
@@ -2205,7 +2206,30 @@ func_version ()
# End:
# Set a version string.
-scriptversion='(GNU libtool) 2.4.7'
+scriptversion='(GNU libtool) 2.5.4'
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ year=`date +%Y`
+
+ cat <<EOF
+$progname $scriptversion Debian-2.5.4-9
+Copyright (C) $year Free Software Foundation, Inc.
+License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Originally written by Gordon Matzigkeit, 1996
+(See AUTHORS for complete contributor listing)
+EOF
+
+ exit $?
+}
# func_echo ARG...
@@ -2228,18 +2252,6 @@ func_echo ()
}
-# func_warning ARG...
-# -------------------
-# Libtool warnings are not categorized, so override funclib.sh
-# func_warning with this simpler definition.
-func_warning ()
-{
- $debug_cmd
-
- $warning_func ${1+"$@"}
-}
-
-
## ---------------- ##
## Options parsing. ##
## ---------------- ##
@@ -2251,19 +2263,23 @@ usage='$progpath [OPTION]... [MODE-ARG]...'
# Short help message in response to '-h'.
usage_message="Options:
- --config show all configuration variables
- --debug enable verbose shell tracing
- -n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --mode=MODE use operation mode MODE
- --no-warnings equivalent to '-Wnone'
- --preserve-dup-deps don't remove duplicate dependency libraries
- --quiet, --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- -v, --verbose print more informational messages than default
- --version print version information
- -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
- -h, --help, --help-all print short, long, or detailed help message
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information
+ --finish use operation '--mode=finish'
+ --mode=MODE use operation mode MODE
+ --no-finish don't update shared library cache
+ --no-quiet, --no-silent print default informational messages
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --reorder-cache=DIRS reorder shared library cache for preferred DIRS
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
"
# Additional text appended to 'usage_message' in response to '--help'.
@@ -2296,13 +2312,13 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname $scriptversion Debian-2.4.7-7build1
+ version: $progname $scriptversion Debian-2.5.4-9
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Report bugs to <bug-libtool@gnu.org>.
-GNU libtool home page: <http://www.gnu.org/s/libtool/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>."
+GNU libtool home page: <https://www.gnu.org/s/libtool/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
exit 0
}
@@ -2492,8 +2508,11 @@ libtool_options_prep ()
opt_dry_run=false
opt_help=false
opt_mode=
+ opt_reorder_cache=false
opt_preserve_dup_deps=false
opt_quiet=false
+ opt_finishing=true
+ opt_warning=
nonopt=
preserve_args=
@@ -2585,14 +2604,18 @@ libtool_parse_options ()
clean|compile|execute|finish|install|link|relink|uninstall) ;;
# Catch anything else as an error
- *) func_error "invalid argument for $_G_opt"
+ *) func_error "invalid argument '$1' for $_G_opt"
exit_cmd=exit
- break
;;
esac
shift
;;
+ --no-finish)
+ opt_finishing=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
--no-silent|--no-quiet)
opt_quiet=false
func_append preserve_args " $_G_opt"
@@ -2608,6 +2631,24 @@ libtool_parse_options ()
func_append preserve_args " $_G_opt"
;;
+ --reorder-cache)
+ opt_reorder_cache=true
+ shared_lib_dirs=$1
+ if test -n "$shared_lib_dirs"; then
+ case $1 in
+ # Must begin with /:
+ /*) ;;
+
+ # Catch anything else as an error (relative paths)
+ *) func_error "invalid argument '$1' for $_G_opt"
+ func_error "absolute paths are required for $_G_opt"
+ exit_cmd=exit
+ ;;
+ esac
+ fi
+ shift
+ ;;
+
--silent|--quiet)
opt_quiet=:
opt_verbose=false
@@ -2644,6 +2685,18 @@ libtool_parse_options ()
func_add_hook func_parse_options libtool_parse_options
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ if $opt_warning; then
+ $debug_cmd
+ $warning_func ${1+"$@"}
+ fi
+}
+
# libtool_validate_options [ARG]...
# ---------------------------------
@@ -2660,10 +2713,10 @@ libtool_validate_options ()
# preserve --debug
test : = "$debug_cmd" || func_append preserve_args " --debug"
- case $host in
+ case $host_os in
# 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* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -2995,7 +3048,7 @@ EOF
# func_convert_core_file_wine_to_w32 ARG
# Helper function used by file name conversion functions when $build is *nix,
-# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
# correctly configured wine environment available, with the winepath program
# in $build's $PATH.
#
@@ -3027,9 +3080,10 @@ func_convert_core_file_wine_to_w32 ()
# func_convert_core_path_wine_to_w32 ARG
# Helper function used by path conversion functions when $build is *nix, and
-# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
-# configured wine environment available, with the winepath program in $build's
-# $PATH. Assumes ARG has no leading or trailing path separator characters.
+# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH. Assumes ARG has no leading or trailing path separator
+# characters.
#
# ARG is path to be converted from $build format to win32.
# Result is available in $func_convert_core_path_wine_to_w32_result.
@@ -3172,6 +3226,15 @@ func_convert_path_front_back_pathsep ()
# end func_convert_path_front_back_pathsep
+# func_convert_delimited_path PATH ORIG_DELIMITER NEW_DELIMITER
+# Replaces a delimiter for a given path.
+func_convert_delimited_path ()
+{
+ converted_path=`$ECHO "$1" | $SED "s#$2#$3#g"`
+}
+# end func_convert_delimited_path
+
+
##################################################
# $build to $host FILE NAME CONVERSION FUNCTIONS #
##################################################
@@ -3506,6 +3569,65 @@ func_dll_def_p ()
}
+# func_reorder_shared_lib_cache DIRS
+# Reorder the shared library cache by unconfiguring previous shared library cache
+# and configuring preferred search directories before previous search directories.
+# Previous shared library cache: /usr/lib /usr/local/lib
+# Preferred search directories: /tmp/testing
+# Reordered shared library cache: /tmp/testing /usr/lib /usr/local/lib
+func_reorder_shared_lib_cache ()
+{
+ $debug_cmd
+
+ case $host_os in
+ openbsd*)
+ get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"`
+ func_convert_delimited_path "$get_search_directories" ':' '\ '
+ save_search_directories=$converted_path
+ func_convert_delimited_path "$1" ':' '\ '
+
+ # Ensure directories exist
+ for dir in $converted_path; do
+ # Ensure each directory is an absolute path
+ case $dir in
+ /*) ;;
+ *) func_error "Directory '$dir' is not an absolute path"
+ exit $EXIT_FAILURE ;;
+ esac
+ # Ensure no trailing slashes
+ func_stripname '' '/' "$dir"
+ dir=$func_stripname_result
+ if test -d "$dir"; then
+ if test -n "$preferred_search_directories"; then
+ preferred_search_directories="$preferred_search_directories $dir"
+ else
+ preferred_search_directories=$dir
+ fi
+ else
+ func_error "Directory '$dir' does not exist"
+ exit $EXIT_FAILURE
+ fi
+ done
+
+ PATH="$PATH:/sbin" ldconfig -U $save_search_directories
+ PATH="$PATH:/sbin" ldconfig -m $preferred_search_directories $save_search_directories
+ get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"`
+ func_convert_delimited_path "$get_search_directories" ':' '\ '
+ reordered_search_directories=$converted_path
+
+ $ECHO "Original: $save_search_directories"
+ $ECHO "Reordered: $reordered_search_directories"
+ exit $EXIT_SUCCESS
+ ;;
+ *)
+ func_error "--reorder-cache is not supported for host_os=$host_os."
+ exit $EXIT_FAILURE
+ ;;
+ esac
+}
+# end func_reorder_shared_lib_cache
+
+
# func_mode_compile arg...
func_mode_compile ()
{
@@ -3684,7 +3806,7 @@ func_mode_compile ()
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
pic_mode=default
;;
esac
@@ -4078,6 +4200,12 @@ if $opt_help; then
fi
+# If option '--reorder-cache', reorder the shared library cache and exit.
+if $opt_reorder_cache; then
+ func_reorder_shared_lib_cache $shared_lib_dirs
+fi
+
+
# func_mode_execute arg...
func_mode_execute ()
{
@@ -4262,7 +4390,7 @@ func_mode_finish ()
fi
fi
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs" && $opt_finishing; then
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
@@ -4287,6 +4415,12 @@ func_mode_finish ()
for libdir in $libdirs; do
$ECHO " $libdir"
done
+ if test "false" = "$opt_finishing"; then
+ echo
+ echo "NOTE: finish_cmds were not executed during testing, so you must"
+ echo "manually run ldconfig to add a given test directory, LIBDIR, to"
+ echo "the search path for generated executables."
+ fi
echo
echo "If you ever happen to want to link against installed libraries"
echo "in a given directory, LIBDIR, you must either use libtool, and"
@@ -4523,8 +4657,15 @@ func_mode_install ()
func_append dir "$objdir"
if test -n "$relink_command"; then
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$libdir"
+ destlibdir=$func_stripname_result
+
+ func_stripname '' '/' "$destdir"
+ s_destdir=$func_stripname_result
+
# Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
# Don't allow the user to place us outside of our expected
# location b/c this prevents finding dependent libraries that
@@ -4561,7 +4702,7 @@ func_mode_install ()
'exit $?'
tstripme=$stripme
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $realname in
*.dll.a)
tstripme=
@@ -4674,7 +4815,7 @@ func_mode_install ()
# Do a test to see if this is really a libtool program.
case $host in
- *cygwin* | *mingw*)
+ *cygwin* | *mingw* | *windows*)
if func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
wrapper=$func_ltwrapper_scriptname_result
@@ -4902,7 +5043,7 @@ extern \"C\" {
$RM $export_symbols
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
;;
@@ -4914,7 +5055,7 @@ extern \"C\" {
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
;;
@@ -4928,7 +5069,7 @@ extern \"C\" {
func_basename "$dlprefile"
name=$func_basename_result
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
# if an import library, we need to obtain dlname
if func_win32_import_lib_p "$dlprefile"; then
func_tr_sh "$dlprefile"
@@ -4954,8 +5095,16 @@ extern \"C\" {
eval '$ECHO ": $name " >> "$nlist"'
fi
func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
- eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
- $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ case $host in
+ i[3456]86-*-mingw32*)
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ ;;
+ *)
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/__nm_//' >> '$nlist'"
+ ;;
+ esac
}
else # not an import lib
$opt_dry_run || {
@@ -5103,7 +5252,7 @@ static const void *lt_preloaded_setup() {
# Transform the symbol file into the correct name.
symfileobj=$output_objdir/${my_outputname}S.$objext
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -5179,7 +5328,7 @@ func_win32_libid ()
*ar\ archive*) # could be an import, or static
# Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then
case $nm_interface in
"MS dumpbin")
if func_cygming_ms_implib_p "$1" ||
@@ -5446,7 +5595,7 @@ func_extract_archives ()
#
# Emit a libtool wrapper script on stdout.
# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
+# incorporate the script contents within a cygwin/mingw/windows
# wrapper executable. Must ONLY be called from within
# func_mode_link because it depends on a number of variables
# set therein.
@@ -5454,7 +5603,7 @@ func_extract_archives ()
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take. If 'yes', then the emitted script
# will assume that the directory where it is stored is
-# the $objdir directory. This is a cygwin/mingw-specific
+# the $objdir directory. This is a cygwin/mingw/windows-specific
# behavior.
func_emit_wrapper ()
{
@@ -5579,7 +5728,7 @@ func_exec_program_core ()
"
case $host in
# Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2* | *-cegcc*)
+ *-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
$ECHO "\
if test -n \"\$lt_option_debug\"; then
\$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
@@ -5647,7 +5796,7 @@ func_exec_program ()
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
done
- # Usually 'no', except on cygwin/mingw when embedded into
+ # Usually 'no', except on cygwin/mingw/windows when embedded into
# the cwrapper.
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
@@ -5779,7 +5928,7 @@ EOF
#endif
#include <stdio.h>
#include <stdlib.h>
-#ifdef _MSC_VER
+#if defined _WIN32 && !defined __GNUC__
# include <direct.h>
# include <process.h>
# include <io.h>
@@ -5804,7 +5953,7 @@ EOF
/* declarations of non-ANSI functions */
#if defined __MINGW32__
# ifdef __STRICT_ANSI__
-int _putenv (const char *);
+_CRTIMP int __cdecl _putenv (const char *);
# endif
#elif defined __CYGWIN__
# ifdef __STRICT_ANSI__
@@ -6002,7 +6151,7 @@ main (int argc, char *argv[])
{
EOF
case $host in
- *mingw* | *cygwin* )
+ *mingw* | *windows* | *cygwin* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
;;
@@ -6021,7 +6170,7 @@ EOF
{
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
+ have already dealt with, above (including dump-script), then
report an error. Otherwise, targets might begin to believe
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
namespace. The first time any user complains about this, we'll
@@ -6105,7 +6254,7 @@ EOF
EOF
case $host_os in
- mingw*)
+ mingw* | windows*)
cat <<"EOF"
{
char* p;
@@ -6147,7 +6296,7 @@ EOF
EOF
case $host_os in
- mingw*)
+ mingw* | windows*)
cat <<"EOF"
/* execv doesn't actually work on mingw as expected on unix */
newargz = prepare_spawn (newargz);
@@ -6566,7 +6715,7 @@ lt_update_lib_path (const char *name, const char *value)
EOF
case $host_os in
- mingw*)
+ mingw* | windows*)
cat <<"EOF"
/* Prepares an argument vector before calling spawn().
@@ -6741,7 +6890,7 @@ func_mode_link ()
$debug_cmd
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# what system we are compiling for in order to pass an extra
@@ -6765,6 +6914,7 @@ func_mode_link ()
finalize_command=$nonopt
compile_rpath=
+ compile_rpath_tail=
finalize_rpath=
compile_shlibpath=
finalize_shlibpath=
@@ -6805,10 +6955,12 @@ func_mode_link ()
xrpath=
perm_rpath=
temp_rpath=
+ temp_rpath_tail=
thread_safe=no
vinfo=
vinfo_number=no
weak_libs=
+ rpath_arg=
single_module=$wl-single_module
func_infer_tag $base_compile
@@ -7071,7 +7223,7 @@ func_mode_link ()
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
- func_fatal_error "only absolute run-paths are allowed"
+ func_fatal_error "argument to -rpath is not absolute: $arg"
;;
esac
if test rpath = "$prev"; then
@@ -7247,7 +7399,7 @@ func_mode_link ()
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
@@ -7267,7 +7419,7 @@ func_mode_link ()
-l*)
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -7275,7 +7427,7 @@ func_mode_link ()
# These systems don't actually have a C library (as such)
test X-lc = "X$arg" && continue
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
# Do not include libc due to us having libc/libc_r.
test X-lc = "X$arg" && continue
;;
@@ -7295,7 +7447,7 @@ func_mode_link ()
esac
elif test X-lc_r = "X$arg"; then
case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -7318,7 +7470,8 @@ func_mode_link ()
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
# Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot|--sysroot)
+ # -q <option> for IBM XL C/C++ compiler.
+ -model|-arch|-isysroot|--sysroot|-q)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -7339,7 +7492,7 @@ func_mode_link ()
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
- |-threads|-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"
@@ -7362,7 +7515,7 @@ func_mode_link ()
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ *-*-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"
@@ -7422,7 +7575,7 @@ func_mode_link ()
dir=$lt_sysroot$func_stripname_result
;;
*)
- func_fatal_error "only absolute run-paths are allowed"
+ func_fatal_error "argument ($arg) to '-R' is not an absolute path: $dir"
;;
esac
case "$xrpath " in
@@ -7547,15 +7700,29 @@ func_mode_link ()
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
# -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
+ # -fdiagnostics-color* simply affects output
+ # -frecord-gcc-switches used to verify flags were respected
# -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fno-sanitize* Clang/GCC memory and address sanitizer
+ # -shared-libsan Link with shared sanitizer runtimes (Clang)
+ # -static-libsan Link with static sanitizer runtimes (Clang)
+ # -no-canonical-prefixes Do not expand any symbolic links
# -fuse-ld=* Linker select flags for GCC
# -static-* direct GCC to link specific libraries statically
# -fcilkplus Cilk Plus language extension features for C/C++
+ # -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
+ # -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=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*)
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
+ -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|-Wa,*|-Werror|-Werror=*)
func_quote_arg pretty "$arg"
arg=$func_quote_arg_result
func_append compile_command " $arg"
@@ -7713,8 +7880,20 @@ func_mode_link ()
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
+ if test -n "$rpath_arg"; then
+ func_append finalize_rpath " ${arg##*,}"
+ unset rpath_arg
+ else
+ case $arg in
+ -Wl,-rpath,*)
+ func_append finalize_rpath " ${arg##*,}";;
+ -Wl,-rpath)
+ rpath_arg=1;;
+ *)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ esac
+ fi
fi
done # argument parsing loop
@@ -7888,7 +8067,7 @@ func_mode_link ()
found=false
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
- |-threads|-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"
@@ -8065,18 +8244,15 @@ func_mode_link ()
;;
esac
if $valid_a_lib; then
- echo
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
+ func_warning "Linking the shared library $output against the static library $deplib is not portable!"
deplibs="$deplib $deplibs"
else
- echo
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because the file extensions .$libext of this argument makes me believe"
- echo "*** that it is just a static archive that I should not use here."
+ func_warning "Trying to link with static lib archive $deplib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have"
+ func_warning "because the file extensions .$libext of this argument makes me believe"
+ func_warning "that it is just a static archive that I should not use here."
fi
;;
esac
@@ -8271,7 +8447,7 @@ func_mode_link ()
fi
case $host in
# special handling for platforms with PE-DLLs.
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
# Linker will automatically link against shared library if both
# static and shared are present. Therefore, ensure we extract
# symbols from the import library if a shared library is present
@@ -8371,7 +8547,10 @@ func_mode_link ()
# Make sure the rpath contains only unique directories.
case $temp_rpath: in
*"$absdir:"*) ;;
- *) func_append temp_rpath "$absdir:" ;;
+ *) case $absdir in
+ "$progdir/"*) func_append temp_rpath "$absdir:" ;;
+ *) func_append temp_rpath_tail "$absdir:" ;;
+ esac
esac
fi
@@ -8381,9 +8560,12 @@ func_mode_link ()
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
- case "$compile_rpath " in
+ case "$compile_rpath$compile_rpath_tail " in
*" $absdir "*) ;;
- *) func_append compile_rpath " $absdir" ;;
+ *) case $absdir in
+ "$progdir/"*) func_append compile_rpath " $absdir" ;;
+ *) func_append compile_rpath_tail " $absdir" ;;
+ esac
esac
;;
esac
@@ -8414,8 +8596,8 @@ func_mode_link ()
fi
if test -n "$library_names" &&
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw* | *cegcc* | *os2*)
+ case $host_os in
+ cygwin* | mingw* | windows* | cegcc* | os2*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
need_relink=no
@@ -8441,11 +8623,11 @@ func_mode_link ()
if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
echo
if test prog = "$linkmode"; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ func_warning "Linking the executable $output against the loadable module"
else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ func_warning "Linking the shared library $output against the loadable module"
fi
- $ECHO "*** $linklib is not portable!"
+ func_warning "$linklib is not portable!"
fi
if test lib = "$linkmode" &&
test yes = "$hardcode_into_libs"; then
@@ -8455,9 +8637,12 @@ func_mode_link ()
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
- case "$compile_rpath " in
+ case "$compile_rpath$compile_rpath_tail " in
*" $absdir "*) ;;
- *) func_append compile_rpath " $absdir" ;;
+ *) case $absdir in
+ "$progdir/"*) func_append compile_rpath " $absdir" ;;
+ *) func_append compile_rpath_tail " $absdir" ;;
+ esac
esac
;;
esac
@@ -8484,8 +8669,8 @@ func_mode_link ()
soname=$dlname
elif test -n "$soname_spec"; then
# bleh windows
- case $host in
- *cygwin* | mingw* | *cegcc* | *os2*)
+ case $host_os in
+ cygwin* | mingw* | windows* | cegcc* | os2*)
func_arith $current - $age
major=$func_arith_result
versuffix=-$major
@@ -8532,6 +8717,7 @@ func_mode_link ()
case $host in
*-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
*-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-emscripten*) add_dir=-L$dir ;;
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
*-*-unixware7*) add_dir=-L$dir ;;
*-*-darwin* )
@@ -8540,11 +8726,10 @@ func_mode_link ()
if /usr/bin/file -L $add 2> /dev/null |
$GREP ": [^:]* bundle" >/dev/null; then
if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ func_warning "lib $linklib is a module, not a shared library"
if test -z "$old_library"; then
- echo
- echo "*** And there doesn't seem to be a static archive available"
- echo "*** The link will probably fail, sorry"
+ func_warning "And there doesn't seem to be a static archive available"
+ func_warning "The link will probably fail, sorry"
else
add=$dir/$old_library
fi
@@ -8627,7 +8812,7 @@ func_mode_link ()
test no = "$hardcode_direct_absolute"; then
add=$libdir/$linklib
elif test yes = "$hardcode_minus_L"; then
- add_dir=-L$libdir
+ add_dir=-L$lt_sysroot$libdir
add=-l$name
elif test yes = "$hardcode_shlibpath_var"; then
case :$finalize_shlibpath: in
@@ -8644,7 +8829,7 @@ func_mode_link ()
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
- add_dir=-L$libdir
+ add_dir=-L$lt_sysroot$libdir
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -8684,21 +8869,19 @@ func_mode_link ()
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
- echo
- $ECHO "*** Warning: This system cannot link to static lib archive $lib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ func_warning "This system cannot link to static lib archive $lib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have."
if test yes = "$module"; then
- echo "*** But as you try to build a module library, libtool will still create "
- echo "*** a static module, that should work as long as the dlopening application"
- echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ func_warning "But as you try to build a module library, libtool will still create "
+ func_warning "a static module, that should work as long as the dlopening application"
+ func_warning "is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ func_warning "However, this would only work if libtool was able to extract symbol"
+ func_warning "lists from a program, using 'nm' or equivalent, but libtool could"
+ func_warning "not find such a program. So, this module is probably useless."
+ func_warning "'nm' from GNU binutils and a full rebuild may help."
fi
if test no = "$build_old_libs"; then
build_libtool_libs=module
@@ -8821,6 +9004,10 @@ func_mode_link ()
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
+
+ func_append temp_rpath "$temp_rpath_tail"
+ func_append compile_rpath "$compile_rpath_tail"
+
if test link = "$pass"; then
if test prog = "$linkmode"; then
compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
@@ -8858,42 +9045,46 @@ func_mode_link ()
# Add libraries to $var in reverse order
eval tmp_libs=\"\$$var\"
new_libs=
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken: new_libs="$deplib $new_libs"
for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ if $opt_preserve_dup_deps; then
+ new_libs="$deplib $new_libs"
+ else
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal. And if not possible for portability
+ # reasons, then --preserve-dup-deps should be used.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
esac
- ;;
- esac
+ fi
done
tmp_libs=
for deplib in $new_libs; do
@@ -9025,9 +9216,7 @@ func_mode_link ()
if test pass_all != "$deplibs_check_method"; then
func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
else
- echo
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
+ func_warning "Linking the shared library $output against the non-libtool objects $objs is not portable!"
func_append libobjs " $objs"
fi
fi
@@ -9088,13 +9277,13 @@ func_mode_link ()
#
case $version_type in
# correct linux to gnu/linux during the next big refactor
- darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
+ darwin|freebsd-elf|linux|midnightbsd-elf|osf|qnx|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
age=$number_minor
revision=$number_revision
;;
- freebsd-aout|qnx|sunos)
+ freebsd-aout|sco|sunos)
current=$number_major
revision=$number_minor
age=0
@@ -9109,6 +9298,9 @@ func_mode_link ()
*)
func_fatal_configuration "$modename: unknown library version type '$version_type'"
;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
+ ;;
esac
;;
no)
@@ -9244,8 +9436,9 @@ func_mode_link ()
;;
qnx)
- major=.$current
- versuffix=.$current
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
;;
sco)
@@ -9398,7 +9591,7 @@ func_mode_link ()
if test yes = "$build_libtool_libs"; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
@@ -9449,108 +9642,6 @@ func_mode_link ()
# implementing what was already the behavior.
newdeplibs=$deplibs
;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- case " $predeps $postdeps " in
- *" $i "*)
- func_append newdeplibs " $i"
- i=
- ;;
- esac
- fi
- if test -n "$i"; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
- func_append newdeplibs " $i"
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which I believe you do not have"
- echo "*** because a test_compile did reveal that the linker did not use it for"
- echo "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- ;;
- *)
- func_append newdeplibs " $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- case " $predeps $postdeps " in
- *" $i "*)
- func_append newdeplibs " $i"
- i=
- ;;
- esac
- fi
- if test -n "$i"; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
- func_append newdeplibs " $i"
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because a test_compile did reveal that the linker did not use this one"
- echo "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
- echo "*** make it link in! You will probably need to install it or some"
- echo "*** library that it depends on before this library will be fully"
- echo "*** functional. Installing it before continuing would be even better."
- fi
- ;;
- *)
- func_append newdeplibs " $i"
- ;;
- esac
- done
- fi
- ;;
file_magic*)
set dummy $deplibs_check_method; shift
file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
@@ -9614,17 +9705,16 @@ EOF
fi
if test -n "$a_deplib"; then
droppeddeps=yes
- echo
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because I did check the linker path looking for a file starting"
+ func_warning "Linker path does not have real file for library $a_deplib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have"
+ func_warning "because I did check the linker path looking for a file starting"
if test -z "$potlib"; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ func_warning "with $libname but no candidates were found. (...for file magic test)"
else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
+ func_warning "with $libname and none of the candidates passed a file format test"
+ func_warning "using a file magic. Last file checked: $potlib"
fi
fi
;;
@@ -9668,17 +9758,16 @@ EOF
fi
if test -n "$a_deplib"; then
droppeddeps=yes
- echo
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because I did check the linker path looking for a file starting"
+ func_warning "Linker path does not have real file for library $a_deplib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have"
+ func_warning "because I did check the linker path looking for a file starting"
if test -z "$potlib"; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ func_warning "with $libname but no candidates were found. (...for regex pattern test)"
else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ func_warning "with $libname and none of the candidates passed a file format test"
+ func_warning "using a regex pattern. Last file checked: $potlib"
fi
fi
;;
@@ -9702,11 +9791,11 @@ EOF
*[!\ \ ]*)
echo
if test none = "$deplibs_check_method"; then
- echo "*** Warning: inter-library dependencies are not supported in this platform."
+ func_warning "Inter-library dependencies are not supported in this platform."
else
- echo "*** Warning: inter-library dependencies are not known to be supported."
+ func_warning "Inter-library dependencies are not known to be supported."
fi
- echo "*** All declared inter-library dependencies are being dropped."
+ func_warning "All declared inter-library dependencies are being dropped."
droppeddeps=yes
;;
esac
@@ -9727,17 +9816,15 @@ EOF
if test yes = "$droppeddeps"; then
if test yes = "$module"; then
- echo
- echo "*** Warning: libtool could not satisfy all declared inter-library"
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
- echo "*** a static module, that should work as long as the dlopening"
- echo "*** application is linked with the -dlopen flag."
+ func_warning "libtool could not satisfy all declared inter-library"
+ func_warning "dependencies of module $libname. Therefore, libtool will create"
+ func_warning "a static module, that should work as long as the dlopening"
+ func_warning "application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ func_warning "However, this would only work if libtool was able to extract symbol"
+ func_warning "lists from a program, using 'nm' or equivalent, but libtool could"
+ func_warning "not find such a program. So, this module is probably useless."
+ func_warning "'nm' from GNU binutils and a full rebuild may help."
fi
if test no = "$build_old_libs"; then
oldlibs=$output_objdir/$libname.$libext
@@ -9912,7 +9999,7 @@ EOF
orig_export_symbols=
case $host_os in
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
func_dll_def_p "$export_symbols" || {
@@ -10110,20 +10197,7 @@ EOF
last_robj=
k=1
- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
- output=$output_objdir/$output_la.lnkscript
- func_verbose "creating GNU ld script: $output"
- echo 'INPUT (' > $output
- for obj in $save_libobjs
- do
- func_to_tool_file "$obj"
- $ECHO "$func_to_tool_file_result" >> $output
- done
- echo ')' >> $output
- func_append delfiles " $output"
- func_to_tool_file "$output"
- output=$func_to_tool_file_result
- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
output=$output_objdir/$output_la.lnk
func_verbose "creating linker input file list: $output"
: > $output
@@ -10142,6 +10216,19 @@ EOF
func_append delfiles " $output"
func_to_tool_file "$output"
output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
else
if test -n "$save_libobjs"; then
func_verbose "creating reloadable object files..."
@@ -10582,7 +10669,7 @@ EOF
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
@@ -10660,7 +10747,7 @@ EOF
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
wrappers_required=false
;;
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *windows* )
test yes = "$build_libtool_libs" || wrappers_required=false
;;
*)
@@ -10814,7 +10901,7 @@ EOF
*) exeext= ;;
esac
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | windows* )
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
@@ -11148,7 +11235,7 @@ EOF
# tests/bindir.at for full details.
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *windows*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
if test -n "$bindir"; then
func_relative_path "$install_libdir" "$bindir"
diff --git a/deps/libffi/m4/libtool.m4 b/deps/libffi/m4/libtool.m4
index e7b68334557..4aa8d6e7846 100755
--- a/deps/libffi/m4/libtool.m4
+++ b/deps/libffi/m4/libtool.m4
@@ -1,6 +1,6 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software
# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
@@ -9,13 +9,13 @@
# modifications, as long as this notice is preserved.
m4_define([_LT_COPYING], [dnl
-# Copyright (C) 2014 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.
# GNU Libtool 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 2 of of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License, if you
@@ -32,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
# along with this program. If not, see <http://www.gnu.org/licenses/>.
])
-# serial 59 LT_INIT
+# serial 63 LT_INIT
# LT_PREREQ(VERSION)
@@ -60,7 +60,7 @@ esac
# LT_INIT([OPTIONS])
# ------------------
AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_BEFORE([$0], [LT_LANG])dnl
AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -616,7 +616,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
# LT_OUTPUT
# ---------
# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
+# AC_OUTPUT is called), in case it is used in configure for compilation
# tests.
AC_DEFUN([LT_OUTPUT],
[: ${CONFIG_LT=./config.lt}
@@ -651,9 +651,9 @@ 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) 2011 Free Software Foundation, Inc.
+Copyright (C) 2024 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
+gives unlimited permission to copy, distribute and modify it."
while test 0 != $[#]
do
@@ -974,6 +974,7 @@ _lt_linker_boilerplate=`cat conftest.err`
$RM -r conftest*
])# _LT_LINKER_BOILERPLATE
+
# _LT_REQUIRED_DARWIN_CHECKS
# -------------------------
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
@@ -1024,6 +1025,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
rm -f conftest.*
fi])
+ # Feature test to disable chained fixups since it is not
+ # compatible with '-undefined dynamic_lookup'
+ AC_CACHE_CHECK([for -no_fixup_chains linker flag],
+ [lt_cv_support_no_fixup_chains],
+ [ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([],[])],
+ lt_cv_support_no_fixup_chains=yes,
+ lt_cv_support_no_fixup_chains=no
+ )
+ LDFLAGS=$save_LDFLAGS
+ ]
+ )
+
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
[lt_cv_ld_exported_symbols_list],
[lt_cv_ld_exported_symbols_list=no
@@ -1048,7 +1064,7 @@ _LT_EOF
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
-int main() { return 0;}
+int main(void) { return 0;}
_LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
@@ -1073,13 +1089,32 @@ _LT_EOF
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+ if test yes = "$lt_cv_support_no_fixup_chains"; then
+ AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains'])
+ fi
+ ;;
esac
;;
esac
if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
+ _lt_dar_needs_single_mod=no
+ case $host_os in
+ rhapsody* | darwin1.*)
+ _lt_dar_needs_single_mod=yes ;;
+ darwin*)
+ # When targeting Mac OS X 10.4 (darwin 8) or later,
+ # -single_module is the default and -multi_module is unsupported.
+ # The toolchain on macOS 10.14 (darwin 18) and later cannot
+ # target any OS version that needs -single_module.
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*)
+ _lt_dar_needs_single_mod=yes ;;
+ esac
+ ;;
+ esac
if test yes = "$lt_cv_ld_exported_symbols_list"; then
_lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
@@ -1125,7 +1160,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(archive_expsym_cmds, $1)="$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"
_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_cv_apple_cc_single_mod"; then
+[ 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 -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
@@ -1255,7 +1290,9 @@ lt_sysroot=
case $with_sysroot in #(
yes)
if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Trim trailing / since we'll always append absolute paths and we want
+ # to avoid //, if only for less confusing output for the user.
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
fi
;; #(
/*)
@@ -1367,7 +1404,7 @@ mips64*-*linux*)
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
# Find out what ABI is being produced by ac_compile, and set linker
# options accordingly. Note that the listed cases only cover the
# situations where additional linker options are needed (such as when
@@ -1382,7 +1419,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
@@ -1411,7 +1448,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_x86_64_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
LD="${LD-ld} -m elf_x86_64"
;;
powerpcle-*linux*)
@@ -1494,7 +1531,7 @@ _LT_DECL([], [AR], [1], [The archiver])
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
+# higher priority because that's what people were doing historically (setting
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
@@ -1544,7 +1581,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
test -z "$STRIP" && STRIP=:
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_REQUIRE([AC_PROG_RANLIB])
test -z "$RANLIB" && RANLIB=:
_LT_DECL([], [RANLIB], [1],
[Commands used to install an old-style archive])
@@ -1555,15 +1592,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
- case $host_os in
- bitrig* | openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -1695,14 +1725,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
+ gnu* | ironclad*)
+ # Under GNU Hurd and Ironclad, this test is not required because there
+ # is no limit to the length of command line arguments.
# Libtool will interpret -1 as no limit whatsoever
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1724,7 +1754,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
+ darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1884,11 +1914,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -1945,7 +1975,7 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32* | cegcc*)
+ mingw* | windows* | pw32* | cegcc*)
lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
@@ -2313,7 +2343,7 @@ if test yes = "$GCC"; then
*) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
*) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
@@ -2371,7 +2401,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# AWK program above erroneously prepends '/' to C:/dos/paths
# for these hosts.
case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
@@ -2446,7 +2476,7 @@ aix[[4-9]]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -2540,7 +2570,7 @@ bsdi[[45]]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -2551,15 +2581,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -2572,7 +2616,7 @@ cygwin* | mingw* | pw32* | cegcc*)
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
@@ -2591,7 +2635,7 @@ m4_if([$1], [],[
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -2698,7 +2742,21 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
- shlibpath_var=LD_LIBRARY_PATH
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[int test_pointer_size[sizeof (void *) - 5];
+ ]])],
+ [shlibpath_var=LD_LIBRARY_PATH],
+ [shlibpath_var=LD_32_LIBRARY_PATH])
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -2728,8 +2786,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -2839,7 +2898,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -2851,8 +2910,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -2886,7 +2946,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -2906,6 +2966,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
@@ -2936,6 +3008,18 @@ netbsd*)
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
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -2955,7 +3039,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -3015,6 +3099,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -3112,6 +3207,21 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ _LT_COMPILER_PIC($1)='-fPIC'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ ;;
+
*)
dynamic_linker=no
;;
@@ -3287,7 +3397,7 @@ if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by $CC])
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -3396,7 +3506,7 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -3468,7 +3578,6 @@ lt_cv_deplibs_check_method='unknown'
# 'none' -- dependencies not supported.
# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# that responds to the $file_magic_cmd with a given extended regex.
# If you have 'file' or equivalent on your system and you're not sure
@@ -3495,7 +3604,7 @@ cygwin*)
lt_cv_file_magic_cmd='func_win32_libid'
;;
-mingw* | pw32*)
+mingw* | windows* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
@@ -3504,7 +3613,7 @@ mingw* | pw32*)
lt_cv_file_magic_cmd='func_win32_libid'
else
# Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
@@ -3577,6 +3686,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+*-mlibc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3595,7 +3708,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
+openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else
@@ -3611,6 +3724,10 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;
+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3659,7 +3776,7 @@ file_magic_glob=
want_nocaseglob=no
if test "$build" = "$host"; then
case $host_os in
- mingw* | pw32*)
+ mingw* | windows* | pw32*)
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
want_nocaseglob=yes
else
@@ -3711,7 +3828,7 @@ else
# Tru64's nm complains that /dev/null is an invalid object file
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
+ mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
@@ -3802,7 +3919,7 @@ lt_cv_sharedlib_from_linklib_cmd,
[lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -3834,16 +3951,16 @@ _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
m4_defun([_LT_PATH_MANIFEST_TOOL],
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
- [lt_cv_path_mainfest_tool=no
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool],
+ [lt_cv_path_manifest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cat conftest.err >&AS_MESSAGE_LOG_FD
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
+ lt_cv_path_manifest_tool=yes
fi
rm -f conftest*])
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test yes != "$lt_cv_path_manifest_tool"; then
MANIFEST_TOOL=:
fi
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
@@ -3872,7 +3989,7 @@ AC_DEFUN([LT_LIB_M],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
@@ -3947,7 +4064,7 @@ case $host_os in
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
@@ -3962,7 +4079,7 @@ osf*)
symcode='[[BCDEGQRST]]'
;;
solaris*)
- symcode='[[BDRT]]'
+ symcode='[[BCDRT]]'
;;
sco3.2v5*)
symcode='[[DT]]'
@@ -4026,7 +4143,7 @@ $lt_c_name_lib_hook\
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
-mingw*)
+mingw* | windows*)
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
@@ -4077,7 +4194,7 @@ void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
+int main(void){nm_test_var='a';nm_test_func();return(0);}
_LT_EOF
if AC_TRY_EVAL(ac_compile); then
@@ -4254,7 +4371,7 @@ m4_if([$1], [CXX], [
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4330,7 +4447,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4458,6 +4575,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.
@@ -4486,6 +4605,8 @@ m4_if([$1], [CXX], [
;;
psos*)
;;
+ serenity*)
+ ;;
solaris*)
case $cc_basename in
CC* | sunCC*)
@@ -4578,7 +4699,7 @@ m4_if([$1], [CXX], [
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4682,7 +4803,7 @@ m4_if([$1], [CXX], [
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4724,6 +4845,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ *flang* | ftn | f18* | f95*)
+ # Flang 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'
+ ;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4812,6 +4939,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.
@@ -4828,6 +4961,9 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ serenity*)
+ ;;
+
solaris*)
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4963,7 +5099,7 @@ m4_if([$1], [CXX], [
pw32*)
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
case $cc_basename in
cl* | icl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -5024,7 +5160,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
@@ -5036,9 +5172,6 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
- with_gnu_ld=no
- ;;
linux* | k*bsd*-gnu | gnu*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
@@ -5142,7 +5275,7 @@ _LT_EOF
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -5152,6 +5285,7 @@ _LT_EOF
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -5171,7 +5305,7 @@ _LT_EOF
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=no
;;
os2*)
@@ -5198,7 +5332,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(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)='@'
;;
@@ -5298,6 +5432,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'
@@ -5600,7 +5739,7 @@ _LT_EOF
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -5617,14 +5756,14 @@ _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 -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _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.exp";
else
$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"~
+ $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'
@@ -5842,6 +5981,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
@@ -5864,7 +6006,7 @@ _LT_EOF
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -5907,7 +6049,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(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)='@'
;;
@@ -5943,6 +6085,9 @@ _LT_EOF
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
+ serenity*)
+ ;;
+
solaris*)
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
if test yes = "$GCC"; then
@@ -6201,7 +6346,7 @@ _LT_TAGDECL([], [hardcode_direct], [0],
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
[Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting $shlibpath_var if the
+ "absolute", i.e. impossible to change by setting $shlibpath_var if the
library is relocated])
_LT_TAGDECL([], [hardcode_minus_L], [0],
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -6259,7 +6404,7 @@ _LT_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
+lt_simple_link_test_code='int main(void){return(0);}'
_LT_TAG_COMPILER
# Save the default compiler, since it gets overwritten when the other
@@ -6448,8 +6593,7 @@ if test yes != "$_lt_caught_CXX_error"; then
wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
_LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
@@ -6469,7 +6613,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 " \-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
GXX=no
@@ -6678,7 +6822,7 @@ if test yes != "$_lt_caught_CXX_error"; then
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl* | ,icl* | no,icl*)
# Native MSVC or ICC
@@ -6731,6 +6875,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_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'
@@ -6777,7 +6922,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(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)='@'
;;
@@ -6818,7 +6963,7 @@ if test yes != "$_lt_caught_CXX_error"; then
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=no
;;
hpux9*)
@@ -6845,7 +6990,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -6910,7 +7055,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -7142,6 +7287,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'
@@ -7158,7 +7307,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -7249,7 +7398,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 " \-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
@@ -7264,6 +7413,9 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
+ serenity*)
+ ;;
+
sunos4*)
case $cc_basename in
CC*)
@@ -7333,7 +7485,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 " \-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.
@@ -7344,7 +7496,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 -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $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'
@@ -7582,10 +7734,11 @@ if AC_TRY_EVAL(ac_compile); then
case $prev$p in
-L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
+ # Some compilers place space between "-{L,R,l}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test x-L = x"$p" ||
+ test x-R = x"$p" ||
+ test x-l = x"$p"; then
prev=$p
continue
fi
@@ -8243,7 +8396,7 @@ AC_SUBST([DLLTOOL])
# ----------------
# Check for a file(cmd) program that can be used to detect file type and magic
m4_defun([_LT_DECL_FILECMD],
-[AC_CHECK_TOOL([FILECMD], [file], [:])
+[AC_CHECK_PROG([FILECMD], [file], [file], [:])
_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
])# _LD_DECL_FILECMD
@@ -8259,73 +8412,6 @@ _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f "$lt_ac_sed" && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test 10 -lt "$lt_ac_count" && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test "$lt_ac_count" -gt "$lt_ac_max"; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([LT_AC_PROG_SED], [])
@@ -8372,7 +8458,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
[case $host in
*-*-mingw* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
*-*-cygwin* )
@@ -8385,7 +8471,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
;;
*-*-cygwin* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
*-*-cygwin* )
@@ -8411,9 +8497,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
[#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
- *-*-mingw* )
+ *-*-mingw* | *-*-windows* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
;;
esac
diff --git a/deps/libffi/m4/ltoptions.m4 b/deps/libffi/m4/ltoptions.m4
index b0b5e9c2126..25caa890298 100755
--- a/deps/libffi/m4/ltoptions.m4
+++ b/deps/libffi/m4/ltoptions.m4
@@ -1,6 +1,6 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 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 8 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])])
@@ -128,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -323,29 +323,39 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
-# implement the --with-aix-soname flag, and support the `aix-soname=aix'
-# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
-# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+# implement the --enable-aix-soname configure option, and support the
+# `aix-soname=aix' and `aix-soname=both' and `aix-soname=svr4' LT_INIT options.
+# DEFAULT is either `aix', `both', or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
- AC_ARG_WITH([aix-soname],
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ AC_ARG_ENABLE([aix-soname],
+ [AS_HELP_STRING([--enable-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
- [case $withval in
- aix|svr4|both)
- ;;
- *)
- AC_MSG_ERROR([Unknown argument to --with-aix-soname])
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname],
- [AC_CACHE_VAL([lt_cv_with_aix_soname],
- [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
- with_aix_soname=$lt_cv_with_aix_soname])
+ [case $enableval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --enable-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$enable_aix_soname],
+ [_AC_ENABLE_IF([with], [aix-soname],
+ [case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname],
+ [AC_CACHE_VAL([lt_cv_with_aix_soname],
+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)])
+ enable_aix_soname=$lt_cv_with_aix_soname])
+ with_aix_soname=$enable_aix_soname
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
@@ -376,30 +386,50 @@ LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
# _LT_WITH_PIC([MODE])
# --------------------
-# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# implement the --enable-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+[AC_ARG_ENABLE([pic],
+ [AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[lt_p=${PACKAGE-default}
- case $withval in
- yes|no) pic_mode=$withval ;;
- *)
- pic_mode=default
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for lt_pkg in $withval; do
- IFS=$lt_save_ifs
- if test "X$lt_pkg" = "X$lt_p"; then
- pic_mode=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac],
- [pic_mode=m4_default([$1], [default])])
+ case $enableval in
+ yes|no) pic_mode=$enableval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [dnl Continue to support --with-pic and --without-pic, for backward
+ dnl compatibility.
+ _AC_ENABLE_IF([with], [pic],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [pic_mode=m4_default([$1], [default])])]
+ )
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
diff --git a/deps/libffi/m4/ltsugar.m4 b/deps/libffi/m4/ltsugar.m4
index 902508bd93a..5b5c80a3ad7 100755
--- a/deps/libffi/m4/ltsugar.m4
+++ b/deps/libffi/m4/ltsugar.m4
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 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/deps/libffi/m4/ltversion.m4 b/deps/libffi/m4/ltversion.m4
index b155d0aceca..228df3f39bf 100755
--- a/deps/libffi/m4/ltversion.m4
+++ b/deps/libffi/m4/ltversion.m4
@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2019, 2021-2022 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 4245 ltversion.m4
+# serial 4441 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.7])
-m4_define([LT_PACKAGE_REVISION], [2.4.7])
+m4_define([LT_PACKAGE_VERSION], [2.5.4])
+m4_define([LT_PACKAGE_REVISION], [2.5.4])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.7'
-macro_revision='2.4.7'
+[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/deps/libffi/m4/lt~obsolete.m4 b/deps/libffi/m4/lt~obsolete.m4
index 0f7a8759da8..22b53469735 100755
--- a/deps/libffi/m4/lt~obsolete.m4
+++ b/deps/libffi/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-2022 Free
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
diff --git a/deps/libffi/man/Makefile.in b/deps/libffi/man/Makefile.in
index 0e90b626304..d0040c90a61 100644
--- a/deps/libffi/man/Makefile.in
+++ b/deps/libffi/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -69,6 +69,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -153,10 +155,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
man3dir = $(mandir)/man3
am__installdirs = "$(DESTDIR)$(man3dir)"
@@ -266,8 +267,10 @@ ac_ct_READELF = @ac_ct_READELF@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
ax_enable_builddir_sed = @ax_enable_builddir_sed@
bindir = @bindir@
build = @build@
@@ -408,6 +411,7 @@ ctags CTAGS:
cscope cscopelist:
+
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -472,8 +476,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -567,3 +571,10 @@ uninstall-man: uninstall-man3
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/deps/libffi/missing b/deps/libffi/missing
index 1fe1611f185..5e450bab3cd 100755
--- a/deps/libffi/missing
+++ b/deps/libffi/missing
@@ -1,9 +1,11 @@
#! /bin/sh
-# Common wrapper for a few potentially missing GNU programs.
+# Common wrapper for a few potentially missing GNU and other programs.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells
+
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -54,18 +56,20 @@ Options:
-v, --version output version information and exit
Supported PROGRAM values:
- aclocal autoconf autoheader autom4te automake makeinfo
- bison yacc flex lex help2man
+aclocal autoconf autogen autoheader autom4te automake autoreconf
+bison flex help2man lex makeinfo perl yacc
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
-Send bug reports to <bug-automake@gnu.org>."
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
+ echo "missing (GNU Automake) $scriptversion"
exit $?
;;
@@ -108,7 +112,7 @@ gnu_software_URL=https://www.gnu.org/software
program_details ()
{
case $1 in
- aclocal|automake)
+ aclocal|automake|autoreconf)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
@@ -123,6 +127,9 @@ program_details ()
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
+ *)
+ :
+ ;;
esac
}
@@ -137,48 +144,55 @@ give_advice ()
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ autoheader_deps="'acconfig.h'"
+ automake_deps="'Makefile.am'"
+ aclocal_deps="'acinclude.m4'"
case $normalized_program in
+ aclocal*)
+ echo "You should only need it if you modified $aclocal_deps or"
+ echo "$configure_deps."
+ ;;
autoconf*)
- echo "You should only need it if you modified 'configure.ac',"
- echo "or m4 files included by it."
- program_details 'autoconf'
+ echo "You should only need it if you modified $configure_deps."
+ ;;
+ autogen*)
+ echo "You should only need it if you modified a '.def' or '.tpl' file."
+ echo "You may want to install the GNU AutoGen package:"
+ echo "<$gnu_software_URL/autogen/>"
;;
autoheader*)
- echo "You should only need it if you modified 'acconfig.h' or"
+ echo "You should only need it if you modified $autoheader_deps or"
echo "$configure_deps."
- program_details 'autoheader'
;;
automake*)
- echo "You should only need it if you modified 'Makefile.am' or"
- echo "$configure_deps."
- program_details 'automake'
- ;;
- aclocal*)
- echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "You should only need it if you modified $automake_deps or"
echo "$configure_deps."
- program_details 'aclocal'
;;
- autom4te*)
+ autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
- program_details 'autom4te'
+ ;;
+ autoreconf*)
+ echo "You should only need it if you modified $aclocal_deps or"
+ echo "$automake_deps or $autoheader_deps or $automake_deps or"
+ echo "$configure_deps."
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
- lex*|flex*)
- echo "You should only need it if you modified a '.l' file."
- echo "You may want to install the Fast Lexical Analyzer package:"
- echo "<$flex_URL>"
- ;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
@@ -189,6 +203,12 @@ give_advice ()
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
+ perl*)
+ echo "You should only need it to run GNU Autoconf, GNU Automake, "
+ echo " assorted other tools, or if you modified a Perl source file."
+ echo "You may want to install the Perl 5 language interpreter:"
+ echo "<$perl_URL>"
+ ;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
@@ -197,6 +217,7 @@ give_advice ()
echo "case some other package contains this missing '$1' program."
;;
esac
+ program_details "$normalized_program"
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
@@ -207,9 +228,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/deps/libffi/src/aarch64/ffi.c b/deps/libffi/src/aarch64/ffi.c
index 1eb90dd565a..d950e970e93 100644
--- a/deps/libffi/src/aarch64/ffi.c
+++ b/deps/libffi/src/aarch64/ffi.c
@@ -105,249 +105,137 @@ intlog2 (int n)
return level;
}
-/* A subroutine of is_vfp_type. Given a structure type, return the type code
- of the first non-structure element. Recurse for structure elements.
- Return -1 if the structure is in fact empty, i.e. no nested elements. */
+/* A subroutine of is_vfp_type. Recursively flatten the (possibly nested)
+ aggregate TY and verify it is homogeneous: every leaf must be the same
+ fundamental type, as AAPCS64 requires of an HFA or HVA. Two short
+ vectors are the same fundamental type when they have the same size (the
+ lane type is irrelevant: an integer and a floating-point 16-byte vector
+ both occupy one Q register). A _Complex counts as two members of its
+ element type.
+
+ *KIND carries the common leaf type found so far: 0 before the first leaf,
+ a positive FFI_TYPE_{FLOAT,DOUBLE,LONGDOUBLE} for a floating-point HFA, or
+ the negated vector size for an HVA. Returns the number of leaf elements,
+ or -1 if TY is empty or not homogeneous. */
static int
-is_hfa0 (const ffi_type *ty)
-{
- ffi_type **elements = ty->elements;
- int i, ret = -1;
-
- if (elements != NULL)
- for (i = 0; elements[i]; ++i)
- {
- ret = elements[i]->type;
- if (ret == FFI_TYPE_STRUCT || ret == FFI_TYPE_VECTOR
- || ret == FFI_TYPE_COMPLEX)
- {
- ret = is_hfa0 (elements[i]);
- if (ret < 0)
- continue;
- }
- break;
- }
-
- return ret;
-}
-
-/* A subroutine of is_vfp_type. Return the size in bytes of the vector (SIMD)
- member of TY, i.e. the width of a single Neon register slot, or 0 if TY
- neither is nor contains a vector. For a bare vector this is its whole size;
- for a homogeneous vector aggregate it is the size of one lane vector. */
-
-static size_t
-is_simd (const ffi_type *ty)
+hfa_flatten (const ffi_type *ty, int *kind)
{
ffi_type **elements;
- int i;
-
- if (ty->type == FFI_TYPE_VECTOR)
- return ty->size;
+ int i, total, n, k;
- elements = ty->elements;
- if (elements != NULL)
- for (i = 0; elements[i]; ++i)
- {
- int t = elements[i]->type;
- if (t == FFI_TYPE_STRUCT || t == FFI_TYPE_COMPLEX
- || t == FFI_TYPE_VECTOR)
- return is_simd (elements[i]);
- }
-
- return 0;
-}
+ switch (ty->type)
+ {
+ case FFI_TYPE_FLOAT:
+ case FFI_TYPE_DOUBLE:
+ case FFI_TYPE_LONGDOUBLE:
+ k = (int) ty->type;
+ if (*kind == 0)
+ *kind = k;
+ else if (*kind != k)
+ return -1;
+ return 1;
-/* A subroutine of is_vfp_type. Given a structure type, return true if all
- of the non-structure elements are the same as CANDIDATE. */
+ case FFI_TYPE_VECTOR:
+ /* Only 4-, 8- and 16-byte short vectors have a register class here. */
+ if (ty->size != 4 && ty->size != 8 && ty->size != 16)
+ return -1;
+ k = -(int) ty->size;
+ if (*kind == 0)
+ *kind = k;
+ else if (*kind != k)
+ return -1;
+ return 1;
-static int
-is_hfa1 (const ffi_type *ty, int candidate)
-{
- ffi_type **elements = ty->elements;
- int i;
+ case FFI_TYPE_COMPLEX:
+ k = ty->elements[0]->type;
+ if (k != FFI_TYPE_FLOAT && k != FFI_TYPE_DOUBLE && k != FFI_TYPE_LONGDOUBLE)
+ return -1;
+ if (*kind == 0)
+ *kind = k;
+ else if (*kind != k)
+ return -1;
+ return 2;
- if (elements != NULL)
- for (i = 0; elements[i]; ++i)
- {
- int t = elements[i]->type;
- if (t == FFI_TYPE_STRUCT || t == FFI_TYPE_VECTOR
- || t == FFI_TYPE_COMPLEX)
- {
- if (!is_hfa1 (elements[i], candidate))
- return 0;
- }
- else if (t != candidate)
- return 0;
- }
+ case FFI_TYPE_STRUCT:
+ elements = ty->elements;
+ if (elements == NULL)
+ return -1;
+ total = 0;
+ for (i = 0; elements[i]; ++i)
+ {
+ n = hfa_flatten (elements[i], kind);
+ if (n < 0)
+ return -1;
+ total += n;
+ }
+ return total == 0 ? -1 : total;
- return 1;
+ default:
+ return -1;
+ }
}
-/* Determine if TY may be allocated to the FP registers. This is both an
- fp scalar type as well as an homogenous floating point aggregate (HFA).
- That is, a structure consisting of 1 to 4 members of all the same type,
- where that type is an fp scalar.
+/* Determine if TY may be allocated to the FP/SIMD registers. This is an fp
+ scalar or short vector, or a homogeneous aggregate (HFA or HVA) of 1 to 4
+ members all of the same fundamental type.
- Returns non-zero iff TY is an HFA. The result is the AARCH64_RET_*
- constant for the type. */
+ Returns non-zero iff TY is such a type. The result is the AARCH64_RET_*
+ constant for it. */
static int
is_vfp_type (const ffi_type *ty)
{
- ffi_type **elements;
- int candidate, i;
- size_t size, ele_count, simd_size;
+ int candidate, count, kind;
+ size_t size;
/* Quickest tests first. */
- candidate = ty->type;
- switch (candidate)
+ switch (ty->type)
{
default:
return 0;
case FFI_TYPE_FLOAT:
case FFI_TYPE_DOUBLE:
case FFI_TYPE_LONGDOUBLE:
- ele_count = 1;
- goto done;
+ return (int) ty->type * 4 + (4 - 1);
case FFI_TYPE_COMPLEX:
candidate = ty->elements[0]->type;
switch (candidate)
- {
- case FFI_TYPE_FLOAT:
- case FFI_TYPE_DOUBLE:
- case FFI_TYPE_LONGDOUBLE:
- ele_count = 2;
- goto done;
- }
+ {
+ case FFI_TYPE_FLOAT:
+ case FFI_TYPE_DOUBLE:
+ case FFI_TYPE_LONGDOUBLE:
+ return candidate * 4 + (4 - 2);
+ }
return 0;
case FFI_TYPE_STRUCT:
case FFI_TYPE_VECTOR:
break;
}
- /* No HFA/HVA types are smaller than 4 bytes, or larger than 64 bytes. */
+ /* No HFA/HVA is smaller than 4 bytes or larger than 64 bytes (4 Q regs). */
size = ty->size;
if (size < 4 || size > 64)
return 0;
- /* Determine the width of the vector (SIMD) member, if any: 0 for a plain
- floating-point HFA, else the size in bytes of one Neon register slot. */
- simd_size = is_simd (ty);
-
- /* Find the type of the first non-aggregate member. */
- elements = ty->elements;
- candidate = elements[0]->type;
- if (candidate == FFI_TYPE_STRUCT || candidate == FFI_TYPE_VECTOR
- || candidate == FFI_TYPE_COMPLEX)
- {
- for (i = 0; ; ++i)
- {
- candidate = is_hfa0 (elements[i]);
- if (candidate >= 0)
- break;
- }
- }
-
- if (simd_size)
- {
- /* Vector or homogeneous vector aggregate (HVA). A single Neon slot is
- at most 16 bytes (a Q register). A bare vector wider than 16 bytes
- (e.g. a 32-byte double4) has no short-vector register class under
- AAPCS64, so bail and let the generic composite path pass it by
- reference / return it in memory -- matching what current compilers do.
- The scalar lane type does not affect register selection (an integer
- and a floating-point 16-byte vector both occupy one Q register), so,
- unlike the floating-point HFA path below, CANDIDATE is used only to
- confirm the lanes are homogeneous. */
- size_t reg_size = simd_size;
- int num_registers;
- int first_level_element_type;
-
- /* A Neon register slot is an S (4B), D (8B) or Q (16B). A lane narrower
- than 4 bytes has no short-vector register class under AAPCS64 and would
- map below AARCH64_RET_S4, making extend_hfa_type() branch before its
- jump table; reject it and let the generic aggregate path handle it. */
- if (reg_size < 4 || reg_size > 16 || size % reg_size != 0)
- return 0;
- num_registers = (int) (size / reg_size);
- if (num_registers > 4)
- return 0;
-
- /* For an aggregate, every member must itself be a vector (or nested
- vector aggregate) of the same register width: this rejects a struct
- that mixes a bare scalar with a vector even when the scalar's type
- matches the vector's lane type. A bare vector needs no such check --
- its lanes were validated when its layout was computed. */
- if (ty->type != FFI_TYPE_VECTOR)
- for (i = 0; elements[i]; ++i)
- if (is_simd (elements[i]) != reg_size)
- return 0;
-
- /* Every lane must be the identical scalar type across the whole HVA
- (this rejects, e.g., an aggregate mixing float and integer vectors). */
- for (i = 0; elements[i]; ++i)
- {
- int t = elements[i]->type;
- if (t == FFI_TYPE_STRUCT || t == FFI_TYPE_VECTOR
- || t == FFI_TYPE_COMPLEX)
- {
- if (!is_hfa1 (elements[i], candidate))
- return 0;
- }
- else if (t != candidate)
- return 0;
- }
-
- /* Reuse the AARCH64_RET_{S,D,Q}* codes, which are laid out as
- (type * 4) + (4 - count) with FLOAT->S(4B), DOUBLE->D(8B),
- LONGDOUBLE->Q(16B). Map the register width onto that type axis. */
- first_level_element_type = FFI_TYPE_FLOAT + intlog2 ((int) reg_size) - 2;
- return first_level_element_type * 4 + (4 - num_registers);
- }
-
- /* If the first member is not a floating point type, it's not an HFA.
- Also quickly re-check the size of the structure. */
- switch (candidate)
- {
- case FFI_TYPE_FLOAT:
- ele_count = size / sizeof(float);
- if (size != ele_count * sizeof(float))
- return 0;
- break;
- case FFI_TYPE_DOUBLE:
- ele_count = size / sizeof(double);
- if (size != ele_count * sizeof(double))
- return 0;
- break;
- case FFI_TYPE_LONGDOUBLE:
- ele_count = size / sizeof(long double);
- if (size != ele_count * sizeof(long double))
- return 0;
- break;
- default:
- return 0;
- }
- if (ele_count > 4)
+ /* Flatten the aggregate; every leaf must share one fundamental type, and
+ there must be 1 to 4 of them. */
+ kind = 0;
+ count = hfa_flatten (ty, &kind);
+ if (count < 1 || count > 4)
return 0;
- /* Finally, make sure that all scalar elements are the same type. */
- for (i = 0; elements[i]; ++i)
+ if (kind < 0)
{
- int t = elements[i]->type;
- if (t == FFI_TYPE_STRUCT || t == FFI_TYPE_COMPLEX)
- {
- if (!is_hfa1 (elements[i], candidate))
- return 0;
- }
- else if (t != candidate)
- return 0;
+ /* HVA: KIND is the negated vector register width (4, 8 or 16 bytes).
+ Map it onto the S/D/Q axis of the AARCH64_RET_* encoding. */
+ candidate = FFI_TYPE_FLOAT + intlog2 (-kind) - 2;
}
+ else
+ /* Floating-point HFA: KIND is the common scalar type. */
+ candidate = kind;
- /* All tests succeeded. Encode the result. */
- done:
- return candidate * 4 + (4 - (int)ele_count);
+ return candidate * 4 + (4 - count);
}
/* Representation of the procedure call argument marshalling
@@ -408,6 +296,28 @@ allocate_to_stack (struct arg_state *state, void *stack,
return (char *)stack + nsaa;
}
+/* Darwin packs only scalars to their natural alignment; a non-HFA
+ composite of up to 16 bytes still takes whole register-sized slots. */
+static void *
+allocate_composite_to_stack (struct arg_state *state, void *stack,
+ const ffi_type *ty)
+{
+ size_t alignment = ty->alignment;
+ size_t size = ty->size;
+
+/* Apple's ABI gives these composites full pointer-sized slots. The
+ experimental GCC Darwin port instead packs them to their natural size;
+ match the compiler ABI used to build libffi so calls and closures remain
+ self-consistent. */
+#if defined (__APPLE__) \
+ && (!defined (__GNUC__) || defined (__clang__))
+ alignment = FFI_ALIGN (alignment, sizeof (void *));
+ size = FFI_ALIGN (size, sizeof (void *));
+#endif
+
+ return allocate_to_stack (state, stack, alignment, size);
+}
+
/* Allocate and copy a structure that is passed by value on the stack and
return a pointer to it. */
static void *
@@ -564,13 +474,9 @@ compress_hfa_type (void *dest, void *reg, int h)
{
case AARCH64_RET_S1:
if (dest == reg)
- {
-#ifdef __AARCH64EB__
- dest += 12;
-#endif
- }
+ return (char *)dest + BE (12);
else
- *(float *)dest = *(float *)reg;
+ *(float *)dest = *(float *)((char *)reg + BE (12));
break;
case AARCH64_RET_S2:
__asm__ ("ldp q16, q17, [%1]\n\t"
@@ -592,13 +498,9 @@ compress_hfa_type (void *dest, void *reg, int h)
case AARCH64_RET_D1:
if (dest == reg)
- {
-#ifdef __AARCH64EB__
- dest += 8;
-#endif
- }
+ return (char *)dest + BE (8);
else
- *(double *)dest = *(double *)reg;
+ *(double *)dest = *(double *)((char *)reg + BE (8));
break;
case AARCH64_RET_D2:
__asm__ ("ldp q16, q17, [%1]\n\t"
@@ -637,10 +539,11 @@ allocate_int_to_reg_or_stack (struct call_context *context,
void *stack, size_t size)
{
if (state->ngrn < N_X_ARG_REG)
- return &context->x[state->ngrn++];
+ return (char *)&context->x[state->ngrn++] + BE (sizeof (UINT64) - size);
state->ngrn = N_X_ARG_REG;
- return allocate_to_stack (state, stack, size, size);
+ return (char *)allocate_to_stack (state, stack, size, size)
+ + BE (sizeof (UINT64) - size);
}
static void *
@@ -937,7 +840,8 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
break;
}
state.nsrn = N_V_ARG_REG;
- dest = allocate_to_stack (&state, stack, ty->alignment, s);
+ dest = (char *)allocate_to_stack (&state, stack, ty->alignment, s)
+ + (t == FFI_TYPE_FLOAT ? BE (sizeof (UINT64) - s) : 0);
}
}
else if (s > 16)
@@ -951,6 +855,13 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
a = &dest;
t = FFI_TYPE_POINTER;
s = sizeof (void *);
+ /* The argument is now the pointer, which takes a plain 8-byte,
+ 8-aligned stack slot (AAPCS64 B.4). Re-point `ty' so
+ do_pointer aligns the slot by 8 and not by the composite's
+ own alignment (up to 16), which would place the pointer at
+ the wrong offset -- where the callee, and libffi's own
+ closure path, do not look (GHSA-h52h-3759-xqm4). */
+ ty = &ffi_type_pointer;
goto do_pointer;
}
else
@@ -972,7 +883,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue,
adjusted and the argument is copied to memory at the
adjusted NSAA. */
state.ngrn = N_X_ARG_REG;
- dest = allocate_to_stack (&state, stack, ty->alignment, s);
+ dest = allocate_composite_to_stack (&state, stack, ty);
}
}
memcpy (dest, a, s);
@@ -1222,8 +1133,9 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
{
state.ngrn = N_X_ARG_REG;
state.nsrn = N_V_ARG_REG;
- avalue[i] = allocate_to_stack(&state, stack,
- ty->alignment, s);
+ avalue[i] = (char *)allocate_to_stack (&state, stack,
+ ty->alignment, s)
+ + (t == FFI_TYPE_FLOAT ? BE (sizeof (UINT64) - s) : 0);
}
}
else
@@ -1237,8 +1149,9 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
else
{
state.nsrn = N_V_ARG_REG;
- avalue[i] = allocate_to_stack(&state, stack,
- ty->alignment, s);
+ avalue[i] = (char *)allocate_to_stack (&state, stack,
+ ty->alignment, s)
+ + (t == FFI_TYPE_FLOAT ? BE (sizeof (UINT64) - s) : 0);
}
}
}
@@ -1270,8 +1183,7 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
else
{
state.ngrn = N_X_ARG_REG;
- avalue[i] = allocate_to_stack(&state, stack,
- ty->alignment, s);
+ avalue[i] = allocate_composite_to_stack (&state, stack, ty);
}
}
break;
diff --git a/deps/libffi/src/aarch64/internal.h b/deps/libffi/src/aarch64/internal.h
index 2f76eb37019..c58fd33a358 100644
--- a/deps/libffi/src/aarch64/internal.h
+++ b/deps/libffi/src/aarch64/internal.h
@@ -78,6 +78,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#endif
+#ifdef __AARCH64EB__
+# define BE(X) X
+#else
+# define BE(X) 0
+#endif
/* Helpers for writing assembly compatible with arm ptr auth */
#ifdef LIBFFI_ASM
diff --git a/deps/libffi/src/aarch64/sysv.S b/deps/libffi/src/aarch64/sysv.S
index ccf2a3d4158..10ed111ca8b 100644
--- a/deps/libffi/src/aarch64/sysv.S
+++ b/deps/libffi/src/aarch64/sysv.S
@@ -728,3 +728,7 @@ CNAME(ffi_go_closure_SYSV):
.section .note.GNU-stack,"",%progbits
FEATURE_1_AND_MARK(AARCH64_BTI | AARCH64_POINTER_AUTH | AARCH64_GCS)
#endif
+
+#ifdef __APPLE__
+ .subsections_via_symbols
+#endif
diff --git a/deps/libffi/src/arm/ffi.c b/deps/libffi/src/arm/ffi.c
index cfd3e9d19eb..b4195b33657 100644
--- a/deps/libffi/src/arm/ffi.c
+++ b/deps/libffi/src/arm/ffi.c
@@ -309,8 +309,20 @@ ffi_prep_cif_machdep (ffi_cif *cif)
flags = ARM_TYPE_INT;
else
{
+ /* The address of the return value goes in r0, ahead of the
+ arguments, which can then need more padding than cif->bytes
+ includes. Lay them out again behind it. */
+ unsigned i;
+
flags = ARM_TYPE_STRUCT;
- bytes += 4;
+ bytes = 4;
+ for (i = 0; i < cif->nargs; i++)
+ {
+ ffi_type *ty = cif->arg_types[i];
+
+ bytes = (size_t) ffi_align (ty, (void *) bytes);
+ bytes += FFI_ALIGN (ty->size, 4);
+ }
}
break;
@@ -467,6 +479,11 @@ ffi_prep_incoming_args_SYSV (ffi_cif *cif, void *rvalue,
size_t z = ty->size;
argp = ffi_align (ty, argp);
+#ifdef __ARMEB__
+ if (z < 4 && ty->type != FFI_TYPE_STRUCT && ty->type != FFI_TYPE_COMPLEX)
+ avalue[i] = (void *) (argp + 4 - z);
+ else
+#endif
avalue[i] = (void *) argp;
argp += z;
}
@@ -515,6 +532,11 @@ ffi_prep_incoming_args_VFP (ffi_cif *cif, void *rvalue, char *stack,
if (tregp + z <= eo_regp || !stack_used)
{
/* Because we're little endian, this is what it turns into. */
+#ifdef __ARMEB__
+ if (z < 4 && ty->type != FFI_TYPE_STRUCT && ty->type != FFI_TYPE_COMPLEX)
+ avalue[i] = (void *) (tregp + 4 - z);
+ else
+#endif
avalue[i] = (void *) tregp;
regp = tregp + z;
@@ -537,6 +559,11 @@ ffi_prep_incoming_args_VFP (ffi_cif *cif, void *rvalue, char *stack,
stack_used = 1;
argp = ffi_align (ty, argp);
+#ifdef __ARMEB__
+ if (z < 4 && ty->type != FFI_TYPE_STRUCT && ty->type != FFI_TYPE_COMPLEX)
+ avalue[i] = (void *) (argp + 4 - z);
+ else
+#endif
avalue[i] = (void *) argp;
argp += z;
}
diff --git a/deps/libffi/src/closures.c b/deps/libffi/src/closures.c
index c1fbcf87ce2..5261c789e20 100644
--- a/deps/libffi/src/closures.c
+++ b/deps/libffi/src/closures.c
@@ -65,6 +65,7 @@ ffi_closure_alloc (size_t size, void **code)
static size_t page_size;
size_t rounded_size;
void *codeseg, *dataseg;
+ long ps;
int prot;
/* Expect that PAX mprotect is active and a separate code mapping is necessary. */
@@ -73,7 +74,12 @@ ffi_closure_alloc (size_t size, void **code)
/* Obtain system page size. */
if (!page_size)
- page_size = sysconf(_SC_PAGESIZE);
+ {
+ ps = sysconf(_SC_PAGESIZE);
+ if (ps <= 0)
+ return NULL;
+ page_size = (size_t) ps;
+ }
/* Round allocation size up to the next page, keeping in mind the size field and pointer to code map. */
rounded_size = (size + overhead + page_size - 1) & ~(page_size - 1);
@@ -256,12 +262,23 @@ ffi_trampoline_table_alloc (void)
/* We have valid trampoline and config pages */
table = calloc (1, sizeof (ffi_trampoline_table));
+ if (table == NULL)
+ {
+ vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2);
+ return NULL;
+ }
table->free_count = FFI_TRAMPOLINE_COUNT;
table->config_page = config_page;
/* Create and initialize the free list */
table->free_list_pool =
calloc (FFI_TRAMPOLINE_COUNT, sizeof (ffi_trampoline_table_entry));
+ if (table->free_list_pool == NULL)
+ {
+ vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2);
+ free (table);
+ return NULL;
+ }
for (i = 0; i < table->free_count; i++)
{
@@ -370,7 +387,13 @@ ffi_closure_free (void *ptr)
}
else if (ffi_trampoline_tables != table)
{
- /* Otherwise, bump this table to the top of the list */
+ /* Otherwise, bump this table to the top of the list. Unlink it
+ from its current position first, so the old neighbours do not
+ keep pointing at it and corrupt the list (CWE-416). */
+ if (table->prev != NULL)
+ table->prev->next = table->next;
+ if (table->next != NULL)
+ table->next->prev = table->prev;
table->prev = NULL;
table->next = ffi_trampoline_tables;
if (ffi_trampoline_tables != NULL)
@@ -546,13 +569,18 @@ static void *dlmalloc(size_t);
static void dlfree(void*);
static void *dlcalloc(size_t, size_t) MAYBE_UNUSED;
static void *dlrealloc(void *, size_t) MAYBE_UNUSED;
+static void *dlrealloc_in_place(void *, size_t) MAYBE_UNUSED;
static void *dlmemalign(size_t, size_t) MAYBE_UNUSED;
+static int dlposix_memalign(void **, size_t, size_t) MAYBE_UNUSED;
static void *dlvalloc(size_t) MAYBE_UNUSED;
static int dlmallopt(int, int) MAYBE_UNUSED;
static size_t dlmalloc_footprint(void) MAYBE_UNUSED;
static size_t dlmalloc_max_footprint(void) MAYBE_UNUSED;
+static size_t dlmalloc_footprint_limit(void) MAYBE_UNUSED;
+static size_t dlmalloc_set_footprint_limit(size_t) MAYBE_UNUSED;
static void** dlindependent_calloc(size_t, size_t, void**) MAYBE_UNUSED;
static void** dlindependent_comalloc(size_t, size_t*, void**) MAYBE_UNUSED;
+static size_t dlbulk_free(void**, size_t) MAYBE_UNUSED;
static void *dlpvalloc(size_t) MAYBE_UNUSED;
static int dlmalloc_trim(size_t) MAYBE_UNUSED;
static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED;
@@ -737,12 +765,14 @@ static struct
#endif /* HAVE_MNTENT */
};
+#define OPEN_TEMP_EXEC_FILE_OPTS_COUNT \
+ (sizeof (open_temp_exec_file_opts) / sizeof (*open_temp_exec_file_opts))
+
/* Current index into open_temp_exec_file_opts. */
-static int open_temp_exec_file_opts_idx = 0;
+static size_t open_temp_exec_file_opts_idx = 0;
/* Reset a current multi-call func, then advances to the next entry.
- If we're at the last, go back to the first and return nonzero,
- otherwise return zero. */
+ Return nonzero after advancing past the last entry. */
static int
open_temp_exec_file_opts_next (void)
{
@@ -750,15 +780,7 @@ open_temp_exec_file_opts_next (void)
open_temp_exec_file_opts[open_temp_exec_file_opts_idx].func (NULL);
open_temp_exec_file_opts_idx++;
- if (open_temp_exec_file_opts_idx
- == (sizeof (open_temp_exec_file_opts)
- / sizeof (*open_temp_exec_file_opts)))
- {
- open_temp_exec_file_opts_idx = 0;
- return 1;
- }
-
- return 0;
+ return open_temp_exec_file_opts_idx == OPEN_TEMP_EXEC_FILE_OPTS_COUNT;
}
/* Return a file descriptor of a temporary zero-sized file in a
@@ -768,6 +790,9 @@ open_temp_exec_file (void)
{
int fd;
+ if (open_temp_exec_file_opts_idx == OPEN_TEMP_EXEC_FILE_OPTS_COUNT)
+ return -1;
+
do
{
fd = open_temp_exec_file_opts[open_temp_exec_file_opts_idx].func
@@ -800,6 +825,8 @@ allocate_space (int fd, off_t len)
/* Obtain system page size. */
if (!page_size)
page_size = sysconf(_SC_PAGESIZE);
+ if (page_size <= 0)
+ return -1;
unsigned char buf[page_size];
memset (buf, 0, page_size);
@@ -849,6 +876,7 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
if (!offset)
{
close (execfd);
+ execfd = -1;
goto retry_open;
}
if (ftruncate (execfd, offset) != 0)
@@ -861,6 +889,7 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
return MFAIL;
}
else if (!offset
+ && open_temp_exec_file_opts_idx < OPEN_TEMP_EXEC_FILE_OPTS_COUNT
&& open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat)
open_temp_exec_file_opts_next ();
diff --git a/deps/libffi/src/java_raw_api.c b/deps/libffi/src/java_raw_api.c
index e0a02ef2743..455888a0e11 100644
--- a/deps/libffi/src/java_raw_api.c
+++ b/deps/libffi/src/java_raw_api.c
@@ -343,10 +343,14 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure* cl,
{
ffi_status status;
+ /* Pass the closure itself as user_data, not codeloc: with static
+ trampolines codeloc points into the read-only trampoline code table,
+ so ffi_java_translate_args would read cl->fun/cl->user_data from the
+ wrong memory and make a wild indirect call (GHSA-w6j9-w53f-2857). */
status = ffi_prep_closure_loc ((ffi_closure*) cl,
cif,
&ffi_java_translate_args,
- codeloc,
+ cl,
codeloc);
if (status == FFI_OK)
{
diff --git a/deps/libffi/src/loongarch/ffi.c b/deps/libffi/src/loongarch/ffi.c
index e81842b8519..ab0d929f81f 100644
--- a/deps/libffi/src/loongarch/ffi.c
+++ b/deps/libffi/src/loongarch/ffi.c
@@ -92,6 +92,9 @@ typedef struct float_struct_info
char type2;
} float_struct_info;
+#define IS_AGGREGATE(type) \
+ ((type) == FFI_TYPE_STRUCT || (type) == FFI_TYPE_COMPLEX)
+
#if ABI_FRLEN >= 64
# define IS_FLOAT(type) ((type) >= FFI_TYPE_FLOAT && (type) <= FFI_TYPE_DOUBLE)
#else
@@ -105,7 +108,15 @@ flatten_struct (ffi_type *in, ffi_type **out, ffi_type **out_end)
if (out == out_end)
return out;
- if (in->type != FFI_TYPE_STRUCT)
+ if (in->type == FFI_TYPE_COMPLEX)
+ {
+ /* The psABI passes a complex number like a struct of two reals. */
+ *(out++) = in->elements[0];
+ if (out == out_end)
+ return out;
+ *(out++) = in->elements[0];
+ }
+ else if (in->type != FFI_TYPE_STRUCT)
*(out++) = in;
else
for (i = 0; in->elements[i]; i++)
@@ -113,9 +124,9 @@ flatten_struct (ffi_type *in, ffi_type **out, ffi_type **out_end)
return out;
}
-/* Structs with at most two fields after flattening, one of which is of
- floating point type, are passed in multiple registers if sufficient
- registers are available. */
+/* Structs and complex numbers with at most two fields after flattening,
+ one of which is of floating point type, are passed in multiple registers
+ if sufficient registers are available. */
static float_struct_info
struct_passed_as_elements (call_builder *cb, ffi_type *top)
{
@@ -278,7 +289,7 @@ marshal (call_builder *cb, ffi_type *type, int var, void *data)
size_t realign[2];
#if ABI_FRLEN
- if (!var && type->type == FFI_TYPE_STRUCT)
+ if (!var && IS_AGGREGATE (type->type))
{
float_struct_info fsi = struct_passed_as_elements (cb, type);
if (fsi.as_elements)
@@ -347,7 +358,7 @@ unmarshal (call_builder *cb, ffi_type *type, int var, void *data)
void *pointer;
#if ABI_FRLEN
- if (!var && type->type == FFI_TYPE_STRUCT)
+ if (!var && IS_AGGREGATE (type->type))
{
float_struct_info fsi = struct_passed_as_elements (cb, type);
if (fsi.as_elements)
@@ -413,7 +424,7 @@ static int
passed_by_ref (call_builder *cb, ffi_type *type, int var)
{
#if ABI_FRLEN
- if (!var && type->type == FFI_TYPE_STRUCT)
+ if (!var && IS_AGGREGATE (type->type))
{
float_struct_info fsi = struct_passed_as_elements (cb, type);
if (fsi.as_elements)
diff --git a/deps/libffi/src/loongarch/ffitarget.h b/deps/libffi/src/loongarch/ffitarget.h
index 242b8f0ff25..c3d78764e44 100644
--- a/deps/libffi/src/loongarch/ffitarget.h
+++ b/deps/libffi/src/loongarch/ffitarget.h
@@ -83,6 +83,7 @@ typedef enum ffi_abi
#endif /* LIBFFI_ASM */
#define FFI_TARGET_HAS_INT128
+#define FFI_TARGET_HAS_COMPLEX_TYPE
/* ---- Definitions for closures ----------------------------------------- */
diff --git a/deps/libffi/src/metag/sysv.S b/deps/libffi/src/metag/sysv.S
index b4b2a3b26bb..f7d4bbe575d 100644
--- a/deps/libffi/src/metag/sysv.S
+++ b/deps/libffi/src/metag/sysv.S
@@ -65,7 +65,7 @@
setl [A0StP++], D0Ar2, D1Ar1
.endm
-! Save retrun, frame pointer and other regs
+! Save return, frame pointer and other regs
.macro SAVE_REGS regs=
.text
.balign 4
diff --git a/deps/libffi/src/mips/ffi.c b/deps/libffi/src/mips/ffi.c
index 5c8c6bc5d44..dc5507926a4 100644
--- a/deps/libffi/src/mips/ffi.c
+++ b/deps/libffi/src/mips/ffi.c
@@ -402,7 +402,7 @@ static ffi_status ffi_prep_cif_machdep_int(ffi_cif *cif, unsigned nfixedargs)
* does not have special handling for floating point args.
*/
- if (cif->rtype->type != FFI_TYPE_STRUCT && cif->rtype->type != FFI_TYPE_COMPLEX && cif->abi == FFI_O32)
+ if (cif->rtype->type != FFI_TYPE_STRUCT && cif->abi == FFI_O32)
{
if (cif->nargs > 0 && cif->nargs == nfixedargs)
{
@@ -455,6 +455,24 @@ static ffi_status ffi_prep_cif_machdep_int(ffi_cif *cif, unsigned nfixedargs)
cif->flags += FFI_TYPE_UINT64 << (FFI_FLAG_BITS * 2);
break;
+ case FFI_TYPE_COMPLEX:
+ /* Complex values are returned in GPRs like integer complex
+ values of the same size. */
+ cif->flags += FFI_TYPE_COMPLEX << (FFI_FLAG_BITS * 2);
+ switch (cif->rtype->elements[0]->type)
+ {
+ case FFI_TYPE_FLOAT:
+ cif->flags += FFI_TYPE_UINT32 << (FFI_FLAG_BITS * 4);
+ break;
+ case FFI_TYPE_DOUBLE:
+ cif->flags += FFI_TYPE_UINT64 << (FFI_FLAG_BITS * 4);
+ break;
+ default:
+ cif->flags += cif->rtype->elements[0]->type << (FFI_FLAG_BITS * 4);
+ break;
+ }
+ break;
+
case FFI_TYPE_FLOAT:
default:
cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 2);
@@ -798,6 +816,18 @@ void ffi_call_int(ffi_cif *cif, void (*fn)(void), void *rvalue,
rvalue_copy = alloca(16);
copy_rvalue = 1;
}
+ else if (cif->rtype->type == FFI_TYPE_COMPLEX && cif->rtype->size < 16)
+ {
+ /* The assembly stores complex GPR returns in 8-byte chunks.
+ Bounce them through a suitably sized and aligned buffer so a
+ smaller user result cannot be overrun. */
+ rvalue_copy = alloca (16);
+ copy_rvalue = 1;
+#if defined(__MIPSEB__) || defined(_MIPSEB)
+ if (cif->rtype->size < 8)
+ copy_offset = 8 - cif->rtype->size;
+#endif
+ }
else if (cif->rtype->type == FFI_TYPE_FLOAT
&& (cif->abi == FFI_N64_SOFT_FLOAT
|| cif->abi == FFI_N32_SOFT_FLOAT))
@@ -978,11 +1008,19 @@ ffi_closure_mips_inner_O32 (ffi_cif *cif,
argn = 1;
seen_int = 1;
}
- if ((cif->flags >> (FFI_FLAG_BITS * 2)) == FFI_TYPE_COMPLEX)
+ if (cif->rtype->type == FFI_TYPE_COMPLEX
+ && (cif->rtype->elements[0]->type == FFI_TYPE_FLOAT
+ || cif->rtype->elements[0]->type == FFI_TYPE_DOUBLE
+ || cif->rtype->elements[0]->type == FFI_TYPE_LONGDOUBLE))
{
rvalue = fpr;
- argn = 1;
}
+ /* With soft float, complex values are returned in up to four GPRs,
+ which does not fit into the space for v0 and v1. ffi_closure_O32
+ does not use the space for the FP argument registers in that case,
+ so return the value there. */
+ if (cif->abi == FFI_O32_SOFT_FLOAT && cif->rtype->type == FFI_TYPE_COMPLEX)
+ rvalue = fpr;
i = 0;
avn = cif->nargs;
@@ -1041,6 +1079,15 @@ ffi_closure_mips_inner_O32 (ffi_cif *cif,
/* Invoke the closure. */
fun(cif, rvalue, avaluep, user_data);
+ if (cif->rtype->type == FFI_TYPE_COMPLEX && cif->rtype->size == 2)
+ {
+ /* A _Complex char is returned right-justified in v0. */
+ UINT16 value;
+
+ memcpy (&value, rvalue, sizeof (value));
+ *(UINT32 *) rvalue = value;
+ }
+
if (cif->abi == FFI_O32_SOFT_FLOAT)
{
switch (cif->rtype->type)
@@ -1049,15 +1096,18 @@ ffi_closure_mips_inner_O32 (ffi_cif *cif,
return FFI_TYPE_INT;
case FFI_TYPE_DOUBLE:
return FFI_TYPE_UINT64;
+ case FFI_TYPE_COMPLEX:
+ return (FFI_TYPE_COMPLEX
+ | (cif->rtype->size << (FFI_FLAG_BITS * 2)));
default:
return cif->rtype->type;
}
}
else
{
- if (cif->rtype->type == FFI_TYPE_COMPLEX) {
- __asm__ volatile ("move $v1, %0" : : "r"(cif->rtype->size));
- }
+ if (cif->rtype->type == FFI_TYPE_COMPLEX)
+ return (FFI_TYPE_COMPLEX
+ | (cif->rtype->size << (FFI_FLAG_BITS * 2)));
return cif->rtype->type;
}
}
@@ -1271,6 +1321,29 @@ ffi_closure_mips_inner_N32 (ffi_cif *cif,
/* Invoke the closure. */
fun (cif, rvalue, avaluep, user_data);
+#if defined(__MIPSEB__) || defined(_MIPSEB)
+ /* ffi_closure_N32 loads a 32-bit integer return value from the end of
+ an ffi_arg on big-endian. A float with soft float and a pointer on
+ N32 are returned the same way, but the closure stores them at the
+ start, so widen them. */
+ if ((cif->rtype->type == FFI_TYPE_FLOAT && soft_float)
+#if _MIPS_SIM == _ABIN32
+ || cif->rtype->type == FFI_TYPE_POINTER
+#endif
+ )
+ *(ffi_arg *) rvalue = (SINT32) *(UINT32 *) rvalue;
+
+ /* Complex values smaller than 8 bytes are returned right-justified in
+ v0, which ffi_closure_N32 loads as a whole. */
+ if (cif->rtype->type == FFI_TYPE_COMPLEX && cif->rtype->size < 8)
+ {
+ size_t size = cif->rtype->size;
+
+ memmove ((char *) rvalue + 8 - size, rvalue, size);
+ memset (rvalue, 0, 8 - size);
+ }
+#endif
+
return cif->flags >> (FFI_FLAG_BITS * 8);
}
diff --git a/deps/libffi/src/mips/n32.S b/deps/libffi/src/mips/n32.S
index 08cbb956667..29612a49335 100644
--- a/deps/libffi/src/mips/n32.S
+++ b/deps/libffi/src/mips/n32.S
@@ -27,6 +27,7 @@
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
+#include <ffi_cfi.h>
/* Only build this code if we are compiling for n32 */
@@ -56,6 +57,7 @@
.ent ffi_call_N32
ffi_call_N32:
.LFB0:
+ cfi_startproc
.frame $fp, SIZEOF_FRAME, ra
.mask 0xc0000000,-FFI_SIZEOF_ARG
.fmask 0x00000000,0
@@ -63,11 +65,15 @@ ffi_call_N32:
# Prologue
SUBU $sp, SIZEOF_FRAME # Frame size
.LCFI00:
+ cfi_def_cfa_offset(SIZEOF_FRAME)
REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer
REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address
.LCFI01:
+ cfi_offset($fp, -2*FFI_SIZEOF_ARG)
+ cfi_offset(ra, -1*FFI_SIZEOF_ARG)
move $fp, $sp
.LCFI02:
+ cfi_def_cfa_register($fp)
move t9, callback # callback function pointer
REG_S bytes, 2*FFI_SIZEOF_ARG($fp) # bytes
REG_S flags, 3*FFI_SIZEOF_ARG($fp) # flags
@@ -396,7 +402,7 @@ retstruct_f_f_soft:
jal t9
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
sw v0, 0(t4)
- sw v1, 4(t4)
+ sw a0, 4(t4)
b epilogue
retstruct_d_f_soft:
@@ -404,7 +410,7 @@ retstruct_d_f_soft:
jal t9
REG_L t4, 4*FFI_SIZEOF_ARG($fp)
sd v0, 0(t4)
- sw v1, 8(t4)
+ sw a0, 8(t4)
b epilogue
retstruct_f_d_soft:
@@ -466,6 +472,7 @@ epilogue:
j ra
.LFE0:
+ cfi_endproc
.end ffi_call_N32
/* ffi_closure_N32. Expects address of the passed-in ffi_closure in t0
@@ -521,6 +528,14 @@ epilogue:
#define V1_OFF2 (3 * FFI_SIZEOF_ARG)
#define V0_OFF2 (2 * FFI_SIZEOF_ARG)
+/* Integer return values narrower than ffi_arg are stored widened to an
+ ffi_arg, so on big-endian their bytes are at its end. */
+#if defined(__MIPSEB__) || defined(_MIPSEB)
+#define V0_OFF2_N(n) (V0_OFF2 + FFI_SIZEOF_ARG - (n))
+#else
+#define V0_OFF2_N(n) V0_OFF2
+#endif
+
#define RA_OFF2 (1 * FFI_SIZEOF_ARG)
#define GP_OFF2 (0 * FFI_SIZEOF_ARG)
@@ -529,14 +544,18 @@ epilogue:
.ent ffi_go_closure_N32
ffi_go_closure_N32:
.LFB1:
+ cfi_startproc
.frame $sp, SIZEOF_FRAME2, ra
.mask 0x90000000,-(SIZEOF_FRAME2 - RA_OFF2)
.fmask 0x00000000,0
SUBU $sp, SIZEOF_FRAME2
.LCFI10:
+ cfi_def_cfa_offset(SIZEOF_FRAME2)
.cpsetup t9, GP_OFF2, ffi_go_closure_N32
REG_S ra, RA_OFF2($sp) # Save return address
.LCFI11:
+ cfi_offset($gp, GP_OFF2 - SIZEOF_FRAME2)
+ cfi_offset(ra, RA_OFF2 - SIZEOF_FRAME2)
REG_S a0, A0_OFF2($sp)
REG_S a1, A1_OFF2($sp)
@@ -562,6 +581,7 @@ ffi_go_closure_N32:
b $do_closure
.LFE1:
+ cfi_endproc
.end ffi_go_closure_N32
.align 2
@@ -569,14 +589,18 @@ ffi_go_closure_N32:
.ent ffi_closure_N32
ffi_closure_N32:
.LFB2:
+ cfi_startproc
.frame $sp, SIZEOF_FRAME2, ra
.mask 0x90000000,-(SIZEOF_FRAME2 - RA_OFF2)
.fmask 0x00000000,0
SUBU $sp, SIZEOF_FRAME2
.LCFI20:
+ cfi_def_cfa_offset(SIZEOF_FRAME2)
.cpsetup t9, GP_OFF2, ffi_closure_N32
REG_S ra, RA_OFF2($sp) # Save return address
.LCFI21:
+ cfi_offset($gp, GP_OFF2 - SIZEOF_FRAME2)
+ cfi_offset(ra, RA_OFF2 - SIZEOF_FRAME2)
REG_S a0, A0_OFF2($sp)
REG_S a1, A1_OFF2($sp)
REG_S a2, A2_OFF2($sp)
@@ -628,27 +652,27 @@ cls_retuint64:
cls_retsint32:
bne v0, FFI_TYPE_SINT32, cls_retsint16
- lw v0, V0_OFF2($sp)
+ lw v0, V0_OFF2_N(4)($sp)
b cls_epilogue
cls_retsint16:
bne v0, FFI_TYPE_SINT16, cls_retuint16
- lh v0, V0_OFF2($sp)
+ lh v0, V0_OFF2_N(2)($sp)
b cls_epilogue
cls_retuint16:
bne v0, FFI_TYPE_UINT16, cls_retsint8
- lhu v0, V0_OFF2($sp)
+ lhu v0, V0_OFF2_N(2)($sp)
b cls_epilogue
cls_retsint8:
bne v0, FFI_TYPE_SINT8, cls_retuint8
- lb v0, V0_OFF2($sp)
+ lb v0, V0_OFF2_N(1)($sp)
b cls_epilogue
cls_retuint8:
bne v0, FFI_TYPE_UINT8, cls_retfloat
- lbu v0, V0_OFF2($sp)
+ lbu v0, V0_OFF2_N(1)($sp)
b cls_epilogue
cls_retfloat:
@@ -703,18 +727,55 @@ cls_retstruct_d_f:
b cls_epilogue
cls_retstruct_f_d:
- bne v0, FFI_TYPE_STRUCT_FD, cls_retcomplex_ld_ld
+ bne v0, FFI_TYPE_STRUCT_FD, cls_retstruct_f_soft
l.s $f0, V0_OFF2($sp)
l.d $f2, V1_OFF2($sp)
b cls_epilogue
#else
cls_longdouble_soft:
- bne v0, FFI_TYPE_LONGDOUBLE, cls_retcomplex_ld_ld
+ bne v0, FFI_TYPE_LONGDOUBLE, cls_retstruct_f_soft
REG_L v0, V0_OFF2($sp)
REG_L a0, V1_OFF2($sp) # not typo, it is a0, I have no idea, gcc does do it
b cls_epilogue
#endif
+ # With soft float, a struct of one or two floating-point fields is
+ # returned with the first field in v0 and the second in a0, each
+ # like a scalar of its type.
+cls_retstruct_f_soft:
+ bne v0, FFI_TYPE_STRUCT_F_SOFT, cls_retstruct_d_soft
+ lw v0, V0_OFF2($sp)
+ b cls_epilogue
+
+cls_retstruct_d_soft:
+ bne v0, FFI_TYPE_STRUCT_D_SOFT, cls_retstruct_f_f_soft
+ ld v0, V0_OFF2($sp)
+ b cls_epilogue
+
+cls_retstruct_f_f_soft:
+ bne v0, FFI_TYPE_STRUCT_FF_SOFT, cls_retstruct_d_d_soft
+ lw v0, V0_OFF2($sp)
+ lw a0, (V0_OFF2+4)($sp)
+ b cls_epilogue
+
+cls_retstruct_d_d_soft:
+ bne v0, FFI_TYPE_STRUCT_DD_SOFT, cls_retstruct_f_d_soft
+ ld v0, V0_OFF2($sp)
+ ld a0, (V0_OFF2+8)($sp)
+ b cls_epilogue
+
+cls_retstruct_f_d_soft:
+ bne v0, FFI_TYPE_STRUCT_FD_SOFT, cls_retstruct_d_f_soft
+ lw v0, V0_OFF2($sp)
+ ld a0, (V0_OFF2+8)($sp)
+ b cls_epilogue
+
+cls_retstruct_d_f_soft:
+ bne v0, FFI_TYPE_STRUCT_DF_SOFT, cls_retcomplex_ld_ld
+ ld v0, V0_OFF2($sp)
+ lw a0, (V0_OFF2+8)($sp)
+ b cls_epilogue
+
cls_retcomplex_ld_ld:
bne v0, FFI_TYPE_COMPLEX_LDLD, cls_retstruct_small2
REG_L t8, A0_OFF2($sp)
@@ -739,9 +800,10 @@ cls_epilogue:
ADDU $sp, SIZEOF_FRAME2
j ra
.LFE2:
+ cfi_endproc
.end ffi_closure_N32
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(HAVE_AS_CFI_PSEUDO_OP)
.section .eh_frame,EH_FRAME_FLAGS,@progbits
.Lframe1:
.4byte .LECIE1-.LSCIE1 # length
@@ -818,7 +880,7 @@ cls_epilogue:
.uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4
.align EH_FRAME_ALIGN
.LEFDE2:
-#endif /* __GNUC__ */
+#endif /* __GNUC__ && !HAVE_AS_CFI_PSEUDO_OP */
#endif
diff --git a/deps/libffi/src/mips/o32.S b/deps/libffi/src/mips/o32.S
index 03ceed5dc45..5c884a95979 100644
--- a/deps/libffi/src/mips/o32.S
+++ b/deps/libffi/src/mips/o32.S
@@ -224,7 +224,24 @@ retcomplex:
b epilogue
5:
+ # Integer complex values: a _Complex char is returned right-justified
+ # in v0, a _Complex short in v0, a _Complex int in v0/v1 and a
+ # _Complex long long in v0/v1/a0/a1.
+ slti t3, t1, FFI_TYPE_UINT16
+ bnez t3, 6f
+ slti t3, t1, FFI_TYPE_UINT32
+ bnez t3, 7f
REG_S v1, 4(t0)
+ REG_S v0, 0(t0)
+ slti t3, t1, FFI_TYPE_UINT64
+ bnez t3, epilogue
+ REG_S a1, 12(t0)
+ REG_S a0, 8(t0)
+ b epilogue
+6:
+ sh v0, 0(t0)
+ b epilogue
+7:
REG_S v0, 0(t0)
b epilogue
@@ -408,11 +425,13 @@ $do_closure:
# Load the return value into the appropriate register.
move $8, $2
+ SRL $3, $8, (FFI_FLAG_BITS * 2)
+ and $8, ((1 << (FFI_FLAG_BITS * 2)) - 1)
li $9, FFI_TYPE_VOID
beq $8, $9, closure_done
li $13, 1 # FFI_O32
- bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+ bne $16, $13, 2f # Skip fp restore if FFI_O32_SOFT_FLOAT
#ifndef __mips_soft_float
li $9, FFI_TYPE_FLOAT
@@ -427,15 +446,31 @@ $do_closure:
bne $8, $9, 1f
li $9, 8
- l.s $f0, V0_OFF2($fp)
- l.s $f2, V1_OFF2($fp)
+ REG_L $2, FA_0_0_OFF2($fp)
+ mtc1 $2, $f0
+ REG_L $2, FA_0_1_OFF2($fp)
+ mtc1 $2, $f2
beq $3, $9, closure_done
li $9, 16
- l.d $f0, V0_OFF2($fp)
- l.d $f2, (V0_OFF2+8)($fp)
+ l.d $f0, FA_0_0_OFF2($fp)
+ l.d $f2, FA_1_0_OFF2($fp)
beq $3, $9, closure_done
#endif
+ b 1f
+
+2:
+ # FFI_O32_SOFT_FLOAT returns complex values in up to four GPRs.
+ # ffi_closure_mips_inner_O32 stored them in the space for the
+ # FP argument registers.
+ li $9, FFI_TYPE_COMPLEX
+ bne $8, $9, 1f
+ REG_L $2, FA_0_0_OFF2($fp)
+ REG_L $3, FA_0_1_OFF2($fp)
+ REG_L $4, FA_1_0_OFF2($fp)
+ REG_L $5, FA_1_1_OFF2($fp)
+ b closure_done
+
1:
REG_L $3, V1_OFF2($fp)
REG_L $2, V0_OFF2($fp)
diff --git a/deps/libffi/src/powerpc/ffi.c b/deps/libffi/src/powerpc/ffi.c
index 69725242344..37c99bc1261 100644
--- a/deps/libffi/src/powerpc/ffi.c
+++ b/deps/libffi/src/powerpc/ffi.c
@@ -114,7 +114,7 @@ ffi_call_int (ffi_cif *cif,
if (rvalue && ecif.rvalue == smst_buffer)
{
unsigned int rsize = cif->rtype->size;
-#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
+#if defined (FFI_TARGET_HAS_COMPLEX_TYPE) && defined (POWERPC64)
/* Integer-typed _Complex: the .Lsmall_struct return path stored
r3 at buffer offset 0 and r4 at offset 8. Extract one inner-
sized half from each slot — right-justified on BE, low-address
diff --git a/deps/libffi/src/powerpc/ffi_linux64.c b/deps/libffi/src/powerpc/ffi_linux64.c
index e92f88c4697..c0ca42cab9a 100644
--- a/deps/libffi/src/powerpc/ffi_linux64.c
+++ b/deps/libffi/src/powerpc/ffi_linux64.c
@@ -61,6 +61,17 @@ ffi_prep_types_linux64 (ffi_abi abi)
ffi_type_longdouble.size = 16;
ffi_type_longdouble.alignment = 16;
}
+#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
+ /* _Complex long double is two halves of whatever long double just became.
+ Its size comes from sizeof(_Complex long double) at build time, which is
+ only right for the ABI libffi itself was built for, so keep it in step.
+ Leaving it behind makes the type disagree with its own element: a caller
+ that asks for the other long double width would get a return value copied
+ at cif->rtype->size (wrong by 16 bytes either way) and structs containing
+ the type laid out to the build-time size. */
+ ffi_type_complex_longdouble.size = 2 * ffi_type_longdouble.size;
+ ffi_type_complex_longdouble.alignment = ffi_type_longdouble.alignment;
+#endif
}
#endif
@@ -393,6 +404,12 @@ homogeneous:
under ELFv2, and is what differentiates _Complex from a
same-sized struct{T;T;} which uses fewer GPR shadow slots. */
elt = (*ptr)->elements[0]->type;
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+ /* A 64-bit long double is passed exactly like a double. */
+ if (elt == FFI_TYPE_LONGDOUBLE
+ && (cif->abi & FFI_LINUX_LONG_DOUBLE_128) == 0)
+ elt = FFI_TYPE_DOUBLE;
+#endif
switch (elt)
{
case FFI_TYPE_FLOAT:
@@ -776,6 +793,10 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
case FFI_TYPE_COMPLEX:
elt = (*ptr)->elements[0]->type;
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+ /* A 64-bit long double is passed exactly like a double. */
+ if (elt == FFI_TYPE_LONGDOUBLE
+ && (ecif->cif->abi & FFI_LINUX_LONG_DOUBLE_128) == 0)
+ elt = FFI_TYPE_DOUBLE;
if (elt == FFI_TYPE_LONGDOUBLE
&& (ecif->cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
{
@@ -1398,6 +1419,10 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
unsigned int j;
elt = arg_types[i]->elements[0]->type;
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+ /* A 64-bit long double arrives exactly like a double. */
+ if (elt == FFI_TYPE_LONGDOUBLE
+ && (cif->abi & FFI_LINUX_LONG_DOUBLE_128) == 0)
+ elt = FFI_TYPE_DOUBLE;
if (elt == FFI_TYPE_LONGDOUBLE
&& (cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) != 0)
{
@@ -1624,13 +1649,13 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
case 0:
return PPC_LD_NONE;
case 1:
- return PPC_LD_U8;
+ return PPC64_LD_STRUCT_1;
case 2:
- return PPC_LD_U16;
+ return PPC64_LD_STRUCT_2;
case 3:
return PPC64_LD_STRUCT_3;
case 4:
- return PPC_LD_U32;
+ return PPC64_LD_STRUCT_4;
case 5:
return PPC64_LD_STRUCT_5;
case 6:
diff --git a/deps/libffi/src/powerpc/ffi_powerpc.h b/deps/libffi/src/powerpc/ffi_powerpc.h
index bad33efe3b8..8147c3a91db 100644
--- a/deps/libffi/src/powerpc/ffi_powerpc.h
+++ b/deps/libffi/src/powerpc/ffi_powerpc.h
@@ -54,17 +54,24 @@
/* Needed for soft-float long-double. */
#define PPC32_LD_R3R6 10
+/* Needed for _Complex long double with a 128-bit long double. */
+#define PPC32_LD_R3R10 11
+
/* Needed for FFI_SYSV small structure returns. */
#ifdef __LITTLE_ENDIAN__
#define PPC32_SYSV_LD_STRUCT_3 PPC32_LD_R3
#define PPC32_SYSV_LD_STRUCT_5 PPC32_LD_R3R4
#define PPC32_SYSV_LD_STRUCT_6 PPC32_LD_R3R4
#define PPC32_SYSV_LD_STRUCT_7 PPC32_LD_R3R4
+#define PPC32_SYSV_LD_STRUCT_1 PPC_LD_U8
+#define PPC32_SYSV_LD_STRUCT_2 PPC_LD_U16
#else
-#define PPC32_SYSV_LD_STRUCT_3 11
-#define PPC32_SYSV_LD_STRUCT_5 12
-#define PPC32_SYSV_LD_STRUCT_6 13
-#define PPC32_SYSV_LD_STRUCT_7 14
+#define PPC32_SYSV_LD_STRUCT_3 12
+#define PPC32_SYSV_LD_STRUCT_5 13
+#define PPC32_SYSV_LD_STRUCT_6 14
+#define PPC32_SYSV_LD_STRUCT_7 15
+#define PPC32_SYSV_LD_STRUCT_1 16
+#define PPC32_SYSV_LD_STRUCT_2 17
#endif
#else /* POWERPC64 */
@@ -84,11 +91,17 @@
#define PPC64_LD_STRUCT_5 PPC_LD_I64
#define PPC64_LD_STRUCT_6 PPC_LD_I64
#define PPC64_LD_STRUCT_7 PPC_LD_I64
+#define PPC64_LD_STRUCT_1 PPC_LD_U8
+#define PPC64_LD_STRUCT_2 PPC_LD_U16
+#define PPC64_LD_STRUCT_4 PPC_LD_U32
#else
#define PPC64_LD_STRUCT_3 16
#define PPC64_LD_STRUCT_5 17
#define PPC64_LD_STRUCT_6 18
#define PPC64_LD_STRUCT_7 19
+#define PPC64_LD_STRUCT_1 20
+#define PPC64_LD_STRUCT_2 21
+#define PPC64_LD_STRUCT_4 22
#endif
#endif /* POWERPC64 */
@@ -106,6 +119,7 @@ enum {
/* These go in cr6 */
FLAG_RETURNS_64BITS = 1 << (31-27),
FLAG_RETURNS_128BITS = 1 << (31-26),
+ FLAG_RETURNS_256BITS = 1 << (31-25), /* Used by sysv code */
FLAG_COMPAT = 1 << (31- 8), /* Not used by assembly */
diff --git a/deps/libffi/src/powerpc/ffi_sysv.c b/deps/libffi/src/powerpc/ffi_sysv.c
index a33039e3dbd..d9f0fdde6d4 100644
--- a/deps/libffi/src/powerpc/ffi_sysv.c
+++ b/deps/libffi/src/powerpc/ffi_sysv.c
@@ -42,6 +42,10 @@
#define NUM_GPR_ARG_REGISTERS 8
#define NUM_FPR_ARG_REGISTERS 8
+/* Internal type for an eight-word complex value, i.e. _Complex long double
+ with a 128-bit long double. */
+#define FFI_TYPE_UINT256 (FFI_TYPE_LAST + 1)
+
#if HAVE_LONG_DOUBLE_VARIANT && FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
/* Adjust size of ffi_type_longdouble. */
@@ -58,6 +62,12 @@ ffi_prep_types_sysv (ffi_abi abi)
ffi_type_longdouble.size = 16;
ffi_type_longdouble.alignment = 16;
}
+#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
+ /* _Complex long double is two halves of whatever long double just
+ became, so keep its size and alignment in step. */
+ ffi_type_complex_longdouble.size = 2 * ffi_type_longdouble.size;
+ ffi_type_complex_longdouble.alignment = ffi_type_longdouble.alignment;
+#endif
}
#endif
@@ -89,6 +99,39 @@ translate_float (int abi, int type)
return type;
}
+/* Transform a type to the type that is passed and returned the same way.
+ Complex values always go in GPRs, never in FPRs, even with hard float:
+ GCC does not split them for this ABI but passes each one as a single
+ item of as many words as it needs, just like an integer of that size. */
+static int
+translate_type (int abi, const ffi_type *t)
+{
+ if (t->type != FFI_TYPE_COMPLEX)
+ return translate_float (abi, t->type);
+
+ switch (t->size)
+ {
+ case 2:
+ /* _Complex char. */
+ return FFI_TYPE_UINT16;
+ case 4:
+ /* _Complex short. */
+ return FFI_TYPE_UINT32;
+ case 8:
+ /* float and int _Complex: two words, like long long. */
+ return FFI_TYPE_UINT64;
+ case 16:
+ /* double, long long and 64-bit long double _Complex. */
+ return FFI_TYPE_UINT128;
+ case 32:
+ /* 128-bit long double _Complex. */
+ return FFI_TYPE_UINT256;
+ default:
+ FFI_ASSERT (0);
+ return FFI_TYPE_STRUCT;
+ }
+}
+
/* Perform machine dependent cif processing */
static ffi_status
ffi_prep_cif_sysv_core (ffi_cif *cif)
@@ -121,7 +164,7 @@ ffi_prep_cif_sysv_core (ffi_cif *cif)
- long doubles (if not equivalent to double) are returned in
fpr1,fpr2 for Linux and as for large structs for SysV. */
- type = translate_float (cif->abi, type);
+ type = translate_type (cif->abi, cif->rtype);
switch (type)
{
@@ -140,6 +183,9 @@ ffi_prep_cif_sysv_core (ffi_cif *cif)
#endif
break;
+ case FFI_TYPE_UINT256:
+ flags |= FLAG_RETURNS_256BITS;
+ /* Fall through. */
case FFI_TYPE_UINT128:
flags |= FLAG_RETURNS_128BITS;
/* Fall through. */
@@ -148,6 +194,13 @@ ffi_prep_cif_sysv_core (ffi_cif *cif)
flags |= FLAG_RETURNS_64BITS;
break;
+ case FFI_TYPE_UINT16:
+ /* A _Complex char is returned right-justified in r3, like a small
+ struct. Use the small struct bounce buffer to extract it. */
+ if (cif->rtype->type == FFI_TYPE_COMPLEX)
+ flags |= FLAG_RETURNS_SMST;
+ break;
+
case FFI_TYPE_STRUCT:
/* The final SYSV ABI says that structures smaller or equal 8 bytes
are returned in r3/r4. A draft ABI used by linux instead
@@ -176,9 +229,8 @@ ffi_prep_cif_sysv_core (ffi_cif *cif)
Stuff on the stack needs to keep proper alignment. */
for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
{
- unsigned short typenum = (*ptr)->type;
-
- typenum = translate_float (cif->abi, typenum);
+ unsigned short typenum = translate_type (cif->abi, *ptr);
+ unsigned nwords;
switch (typenum)
{
@@ -224,16 +276,19 @@ ffi_prep_cif_sysv_core (ffi_cif *cif)
#endif
break;
+ case FFI_TYPE_UINT256:
case FFI_TYPE_UINT128:
/* A long double in FFI_LINUX_SOFT_FLOAT can use only a set
of four consecutive gprs. If we do not have enough, we
- have to adjust the gpr_count value. */
- if (gpr_count >= NUM_GPR_ARG_REGISTERS - 3)
+ have to adjust the gpr_count value. Complex values of four
+ or eight words are passed the same way. */
+ nwords = typenum == FFI_TYPE_UINT256 ? 8 : 4;
+ if (gpr_count > NUM_GPR_ARG_REGISTERS - nwords)
gpr_count = NUM_GPR_ARG_REGISTERS;
if (gpr_count >= NUM_GPR_ARG_REGISTERS)
- stack_count += 4;
+ stack_count += nwords;
else
- gpr_count += 4;
+ gpr_count += nwords;
break;
case FFI_TYPE_UINT64:
@@ -458,9 +513,8 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
i > 0;
i--, ptr++, p_argv.v++)
{
- unsigned int typenum = (*ptr)->type;
-
- typenum = translate_float (ecif->cif->abi, typenum);
+ unsigned int typenum = translate_type (ecif->cif->abi, *ptr);
+ unsigned int ii, nwords;
/* Now test the translated value */
switch (typenum)
@@ -518,16 +572,18 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
break;
#endif /* have FPRs */
+ case FFI_TYPE_UINT256:
case FFI_TYPE_UINT128:
/* The soft float ABI for long doubles works like this, a long double
is passed in four consecutive GPRs if available. A maximum of 2
long doubles can be passed in gprs. If we do not have 4 GPRs
- left, the long double is passed on the stack, 4-byte aligned. */
- if (gpr_base.u >= gpr_end.u - 3)
+ left, the long double is passed on the stack, 4-byte aligned.
+ Complex values of four or eight words are passed the same way. */
+ nwords = typenum == FFI_TYPE_UINT256 ? 8 : 4;
+ if (gpr_base.u > gpr_end.u - nwords)
{
- unsigned int ii;
gpr_base.u = gpr_end.u;
- for (ii = 0; ii < 4; ii++)
+ for (ii = 0; ii < nwords; ii++)
{
unsigned int int_tmp = (*p_argv.ui)[ii];
*next_arg.u++ = int_tmp;
@@ -535,8 +591,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
}
else
{
- unsigned int ii;
- for (ii = 0; ii < 4; ii++)
+ for (ii = 0; ii < nwords; ii++)
{
unsigned int int_tmp = (*p_argv.ui)[ii];
*gpr_base.u++ = int_tmp;
@@ -709,7 +764,7 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
avalue = alloca (cif->nargs * sizeof (void *));
/* First translate for softfloat/nonlinux */
- rtypenum = translate_float (cif->abi, rtypenum);
+ rtypenum = translate_type (cif->abi, cif->rtype);
/* Copy the caller's structure return value address so that the closure
returns the data directly to the caller.
@@ -729,10 +784,9 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
/* Grab the addresses of the arguments from the stack frame. */
while (i < avn) {
- unsigned short typenum = arg_types[i]->type;
-
/* We may need to handle some values depending on ABI. */
- typenum = translate_float (cif->abi, typenum);
+ unsigned short typenum = translate_type (cif->abi, arg_types[i]);
+ long nwords;
switch (typenum)
{
@@ -796,20 +850,23 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
# endif
#endif
+ case FFI_TYPE_UINT256:
case FFI_TYPE_UINT128:
/* Test if for the whole long double, 4 gprs are available.
- otherwise the stuff ends up on the stack. */
- if (ng < NUM_GPR_ARG_REGISTERS - 3)
+ otherwise the stuff ends up on the stack. The same holds
+ for complex values of four or eight words. */
+ nwords = typenum == FFI_TYPE_UINT256 ? 8 : 4;
+ if (ng <= NUM_GPR_ARG_REGISTERS - nwords)
{
avalue[i] = pgr;
- pgr += 4;
- ng += 4;
+ pgr += nwords;
+ ng += nwords;
}
else
{
avalue[i] = pst;
- pst += 4;
- ng = 8+4;
+ pst += nwords;
+ ng = NUM_GPR_ARG_REGISTERS;
}
break;
@@ -940,6 +997,18 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
case FFI_TYPE_SINT8:
return PPC_LD_S8;
case FFI_TYPE_UINT16:
+ if (cif->rtype->type == FFI_TYPE_COMPLEX)
+ {
+ /* A _Complex char is returned right-justified in r3. */
+ unsigned int word = 0;
+#ifdef __LITTLE_ENDIAN__
+ memcpy (&word, rvalue, 2);
+#else
+ memcpy ((char *) &word + 2, rvalue, 2);
+#endif
+ *(unsigned int *) rvalue = word;
+ return PPC_LD_U32;
+ }
return PPC_LD_U16;
case FFI_TYPE_SINT16:
return PPC_LD_S16;
@@ -955,14 +1024,16 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
return PPC_LD_I64;
case FFI_TYPE_UINT128:
return PPC32_LD_R3R6;
+ case FFI_TYPE_UINT256:
+ return PPC32_LD_R3R10;
case FFI_TYPE_STRUCT:
if (cif->abi & FFI_SYSV_STRUCT_RET)
switch (size)
{
case 1:
- return PPC_LD_U8;
+ return PPC32_SYSV_LD_STRUCT_1;
case 2:
- return PPC_LD_U16;
+ return PPC32_SYSV_LD_STRUCT_2;
case 3:
return PPC32_SYSV_LD_STRUCT_3;
case 4:
diff --git a/deps/libffi/src/powerpc/ffitarget.h b/deps/libffi/src/powerpc/ffitarget.h
index 7ffe36b682e..ad65fa16aa0 100644
--- a/deps/libffi/src/powerpc/ffitarget.h
+++ b/deps/libffi/src/powerpc/ffitarget.h
@@ -155,8 +155,15 @@ typedef enum ffi_abi {
ELFv2, float/double _Complex are passed and returned as a 2-element
homogeneous floating-point aggregate, but each scalar half consumes a
GPR shadow slot of its own — i.e. the same way the underlying C ABI
- handles them, which is what GCC's split_complex_arg emits. */
-#if defined(POWERPC64) && _CALL_ELF == 2
+ handles them, which is what GCC's split_complex_arg emits.
+
+ They are also supported on 32-bit SYSV, where complex values are passed
+ and returned in GPRs like integers of the same size. */
+#if defined(POWERPC64)
+# if _CALL_ELF == 2
+# define FFI_TARGET_HAS_COMPLEX_TYPE
+# endif
+#elif defined (POWERPC) || defined (POWERPC_FREEBSD)
# define FFI_TARGET_HAS_COMPLEX_TYPE
#endif
diff --git a/deps/libffi/src/powerpc/linux64_closure.S b/deps/libffi/src/powerpc/linux64_closure.S
index 3071bec0d22..62de845bf67 100644
--- a/deps/libffi/src/powerpc/linux64_closure.S
+++ b/deps/libffi/src/powerpc/linux64_closure.S
@@ -342,8 +342,8 @@ E PPC64_LD_DOUBLE_HOMOG
#ifndef __LITTLE_ENDIAN__
E PPC64_LD_STRUCT_3
- lwz %r3, RETVAL+4(%r1)
- srd %r3, %r3, 8
+ ld %r3, RETVAL+0(%r1)
+ srdi %r3, %r3, 40
epilogue
E PPC64_LD_STRUCT_5
@@ -360,6 +360,21 @@ E PPC64_LD_STRUCT_7
ld %r3, RETVAL+0(%r1)
srdi %r3, %r3, 8
epilogue
+
+E PPC64_LD_STRUCT_1
+ ld %r3, RETVAL+0(%r1)
+ srdi %r3, %r3, 56
+ epilogue
+
+E PPC64_LD_STRUCT_2
+ ld %r3, RETVAL+0(%r1)
+ srdi %r3, %r3, 48
+ epilogue
+
+E PPC64_LD_STRUCT_4
+ ld %r3, RETVAL+0(%r1)
+ srdi %r3, %r3, 32
+ epilogue
#endif
.Lmoredouble:
diff --git a/deps/libffi/src/powerpc/ppc_closure.S b/deps/libffi/src/powerpc/ppc_closure.S
index 92949b164f5..ad31fb6fde0 100644
--- a/deps/libffi/src/powerpc/ppc_closure.S
+++ b/deps/libffi/src/powerpc/ppc_closure.S
@@ -202,10 +202,17 @@ E PPC_LD_S16
epilogue
E PPC32_LD_R3R6
+.Lr3r6:
lwz %r5,112+8(%r1)
lwz %r6,112+12(%r1)
b .Lr3r4
+E PPC32_LD_R3R10
+ lwz %r7,112+16(%r1)
+ lwz %r8,112+20(%r1)
+ lwz %r9,112+24(%r1)
+ b .Lr3r10
+
#ifndef __LITTLE_ENDIAN__
E PPC32_SYSV_LD_STRUCT_3
lwz %r3,112+0(%r1)
@@ -228,7 +235,15 @@ E PPC32_SYSV_LD_STRUCT_7
lwz %r3,112+0(%r1)
lwz %r4,112+4(%r1)
li %r5,8
- nop
+ b .Lstruct567
+
+E PPC32_SYSV_LD_STRUCT_1
+ lbz %r3,112+0(%r1)
+ epilogue
+
+E PPC32_SYSV_LD_STRUCT_2
+ lhz %r3,112+0(%r1)
+ epilogue
.Lstruct567:
subfic %r6,%r5,32
@@ -239,6 +254,10 @@ E PPC32_SYSV_LD_STRUCT_7
epilogue
#endif
+.Lr3r10:
+ lwz %r10,112+28(%r1)
+ b .Lr3r6
+
.cfi_endproc
END(ffi_closure_SYSV)
diff --git a/deps/libffi/src/powerpc/sysv.S b/deps/libffi/src/powerpc/sysv.S
index df9773427cb..b569f1ec8be 100644
--- a/deps/libffi/src/powerpc/sysv.S
+++ b/deps/libffi/src/powerpc/sysv.S
@@ -116,6 +116,11 @@ ENTRY(ffi_call_SYSV)
bf 26,L(done_return_value)
stw %r5,8(%r30)
stw %r6,12(%r30)
+ bf 25,L(done_return_value)
+ stw %r7,16(%r30)
+ stw %r8,20(%r30)
+ stw %r9,24(%r30)
+ stw %r10,28(%r30)
/* Fall through... */
L(done_return_value):
diff --git a/deps/libffi/src/raw_api.c b/deps/libffi/src/raw_api.c
index 670d56d948a..2194a8962d4 100644
--- a/deps/libffi/src/raw_api.c
+++ b/deps/libffi/src/raw_api.c
@@ -232,10 +232,15 @@ ffi_prep_raw_closure_loc (ffi_raw_closure* cl,
{
ffi_status status;
+ /* Pass the closure itself as the user_data that ffi_translate_args
+ receives, not codeloc. The two aliased before static trampolines, but
+ with FFI_EXEC_STATIC_TRAMP codeloc points into the read-only trampoline
+ code table, so reading cl->fun/cl->user_data through it would load
+ garbage and make a wild indirect call (GHSA-w6j9-w53f-2857). */
status = ffi_prep_closure_loc ((ffi_closure*) cl,
cif,
&ffi_translate_args,
- codeloc,
+ cl,
codeloc);
if (status == FFI_OK)
{
diff --git a/deps/libffi/src/riscv/ffi.c b/deps/libffi/src/riscv/ffi.c
index 5aca74665a5..53c41db60a6 100644
--- a/deps/libffi/src/riscv/ffi.c
+++ b/deps/libffi/src/riscv/ffi.c
@@ -84,6 +84,8 @@ typedef struct {
char as_elements, type1, offset2, type2;
} float_struct_info;
+#define IS_AGGREGATE(type) ((type) == FFI_TYPE_STRUCT || (type) == FFI_TYPE_COMPLEX)
+
#if ABI_FLEN >= 64
#define IS_FLOAT(type) ((type) >= FFI_TYPE_FLOAT && (type) <= FFI_TYPE_DOUBLE)
#else
@@ -93,7 +95,12 @@ typedef struct {
static ffi_type **flatten_struct(ffi_type *in, ffi_type **out, ffi_type **out_end) {
int i;
if (out == out_end) return out;
- if (in->type != FFI_TYPE_STRUCT) {
+ if (in->type == FFI_TYPE_COMPLEX) {
+ /* the psABI passes a complex number like a struct of two reals */
+ *(out++) = in->elements[0];
+ if (out == out_end) return out;
+ *(out++) = in->elements[0];
+ } else if (in->type != FFI_TYPE_STRUCT) {
*(out++) = in;
} else {
for (i = 0; in->elements[i]; i++)
@@ -102,9 +109,9 @@ static ffi_type **flatten_struct(ffi_type *in, ffi_type **out, ffi_type **out_en
return out;
}
-/* Structs with at most two fields after flattening, one of which is of
- floating point type, are passed in multiple registers if sufficient
- registers are available. */
+/* Structs and complex numbers with at most two fields after flattening,
+ one of which is of floating point type, are passed in multiple registers
+ if sufficient registers are available. */
static float_struct_info struct_passed_as_elements(call_builder *cb, ffi_type *top) {
float_struct_info ret = {0, 0, 0, 0};
ffi_type *fields[3];
@@ -247,7 +254,7 @@ static void marshal(call_builder *cb, ffi_type *type, int var, void *data) {
size_t realign[2];
#if ABI_FLEN
- if (!var && type->type == FFI_TYPE_STRUCT) {
+ if (!var && IS_AGGREGATE(type->type)) {
float_struct_info fsi = struct_passed_as_elements(cb, type);
if (fsi.as_elements) {
marshal_atom(cb, fsi.type1, data);
@@ -295,7 +302,7 @@ static void *unmarshal(call_builder *cb, ffi_type *type, int var, void *data) {
void *pointer;
#if ABI_FLEN
- if (!var && type->type == FFI_TYPE_STRUCT) {
+ if (!var && IS_AGGREGATE(type->type)) {
float_struct_info fsi = struct_passed_as_elements(cb, type);
if (fsi.as_elements) {
unmarshal_atom(cb, fsi.type1, data);
@@ -340,7 +347,7 @@ static void *unmarshal(call_builder *cb, ffi_type *type, int var, void *data) {
static int passed_by_ref(call_builder *cb, ffi_type *type, int var) {
#if ABI_FLEN
- if (!var && type->type == FFI_TYPE_STRUCT) {
+ if (!var && IS_AGGREGATE(type->type)) {
float_struct_info fsi = struct_passed_as_elements(cb, type);
if (fsi.as_elements) return 0;
}
@@ -414,7 +421,7 @@ ffi_call_int (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
ffi_call_asm ((void *) alloc_base, cb.aregs, fn, closure);
cb.used_float = cb.used_integer = 0;
- if (!return_by_ref && rvalue)
+ if (!return_by_ref && rvalue && cif->rtype->type != FFI_TYPE_VOID)
{
if (IS_INT(cif->rtype->type)
&& cif->rtype->size < sizeof (ffi_arg))
diff --git a/deps/libffi/src/riscv/ffitarget.h b/deps/libffi/src/riscv/ffitarget.h
index 06010027bd4..8e4d65bf97d 100644
--- a/deps/libffi/src/riscv/ffitarget.h
+++ b/deps/libffi/src/riscv/ffitarget.h
@@ -65,6 +65,7 @@ typedef enum ffi_abi {
#define FFI_EXTRA_CIF_FIELDS unsigned riscv_nfixedargs; unsigned riscv_unused
#define FFI_TARGET_SPECIFIC_VARIADIC
#define FFI_TARGET_HAS_INT128
+#define FFI_TARGET_HAS_COMPLEX_TYPE
#endif
diff --git a/deps/libffi/src/s390/ffi.c b/deps/libffi/src/s390/ffi.c
index 7ec2a877ce4..d9b6d0c9dca 100644
--- a/deps/libffi/src/s390/ffi.c
+++ b/deps/libffi/src/s390/ffi.c
@@ -546,9 +546,16 @@ ffi_closure_helper_SYSV (ffi_cif *cif,
#endif
/* Check how a structure type is passed. */
- if (type == FFI_TYPE_STRUCT || type == FFI_TYPE_COMPLEX)
+ if (type == FFI_TYPE_STRUCT || type == FFI_TYPE_COMPLEX
+ || type == FFI_TYPE_SINT128 || type == FFI_TYPE_UINT128)
{
- if (type == FFI_TYPE_COMPLEX)
+ if (type == FFI_TYPE_COMPLEX
+ || type == FFI_TYPE_SINT128 || type == FFI_TYPE_UINT128)
+ /* Complex and 128-bit integer types are passed by reference: one
+ GPR slot holds a pointer to the value. The call side already
+ does this; without it here the closure left avalue[] for such
+ an argument uninitialised and shifted every later argument
+ (GHSA-wf8m-qr3x-cch4). */
type = FFI_TYPE_POINTER;
else
type = ffi_check_struct_type (*ptr);
diff --git a/deps/libffi/src/sparc/ffi64.c b/deps/libffi/src/sparc/ffi64.c
index 5eec1499e17..80cad660460 100644
--- a/deps/libffi/src/sparc/ffi64.c
+++ b/deps/libffi/src/sparc/ffi64.c
@@ -135,12 +135,18 @@ ffi_struct_float_merge (int size_mask, void *vi, void *vf)
/* Similar, but place the data into VD in the end. */
void FFI_HIDDEN
-ffi_struct_float_copy (int size_mask, void *vd, void *vi, void *vf)
+ffi_struct_float_copy (int flags, void *vd, void *vi, void *vf)
{
+ int size_mask = flags >> SPARC_SIZEMASK_SHIFT;
int size = size_mask & 0xff;
int mask = size_mask >> 8;
int n = size >> 2;
+ if (flags & SP_V9_FLAG_RET_COMPLEX_SMALL)
+ {
+ FFI_ASSERT (mask == 0 && size < 8);
+ vi = (char *) vi + 8 - size;
+ }
if (mask == 0)
;
else if (mask == (1 << n) - 1)
@@ -199,6 +205,9 @@ ffi_prep_cif_machdep_core(ffi_cif *cif)
flags = (size_mask << SPARC_SIZEMASK_SHIFT) | SPARC_RET_STRUCT;
+ if (rtt == FFI_TYPE_COMPLEX && rtype->size < 8 && fp_mask == 0)
+ flags |= SP_V9_FLAG_RET_COMPLEX_SMALL;
+
/* For special cases of all-int or all-fp, we can return
the value directly without popping through a struct copy. */
if (fp_mask == 0)
@@ -398,8 +407,17 @@ ffi_prep_args_v9(ffi_cif *cif, unsigned long *argp, void *rvalue, void **avalue)
*argp++ = *(UINT64 *)a;
break;
- case FFI_TYPE_LONGDOUBLE:
case FFI_TYPE_COMPLEX:
+ z = ty->size;
+ if (z < 8)
+ {
+ *argp = 0;
+ memcpy ((char *) argp + 8 - z, a, z);
+ argp++;
+ break;
+ }
+ /* FALLTHRU */
+ case FFI_TYPE_LONGDOUBLE:
case FFI_TYPE_STRUCT:
z = ty->size;
if (z > 16)
@@ -573,6 +591,11 @@ ffi_closure_sparc_inner_v9(ffi_cif *cif,
case FFI_TYPE_COMPLEX:
case FFI_TYPE_STRUCT:
z = ty->size;
+ if (ty->type == FFI_TYPE_COMPLEX && z < 8)
+ {
+ a = (char *) a + 8 - z;
+ break;
+ }
if (z > 16)
a = *(void **)a;
else
diff --git a/deps/libffi/src/sparc/internal.h b/deps/libffi/src/sparc/internal.h
index 0a66472bade..5cac3332c00 100644
--- a/deps/libffi/src/sparc/internal.h
+++ b/deps/libffi/src/sparc/internal.h
@@ -22,5 +22,6 @@
#define SPARC_FLAG_RET_MASK 15
#define SPARC_FLAG_RET_IN_MEM 32
#define SPARC_FLAG_FP_ARGS 64
+#define SP_V9_FLAG_RET_COMPLEX_SMALL 128 /* v9 only */
#define SPARC_SIZEMASK_SHIFT 8
diff --git a/deps/libffi/src/sparc/v9.S b/deps/libffi/src/sparc/v9.S
index 55f8f4324cf..dee17df48ef 100644
--- a/deps/libffi/src/sparc/v9.S
+++ b/deps/libffi/src/sparc/v9.S
@@ -186,7 +186,7 @@ E(SPARC_RET_F_1)
std %f6, [%l2+56]
! Copy the structure into place.
- srl %l0, SPARC_SIZEMASK_SHIFT, %o0 ! load size_mask
+ mov %l0, %o0 ! load flags and size_mask
mov %i2, %o1 ! load dst
mov %l2, %o2 ! load src_gp
call C(ffi_struct_float_copy)
@@ -270,6 +270,7 @@ C(ffi_closure_v9):
add %fp, STACK_BIAS+128, %o4
call C(ffi_closure_sparc_inner_v9)
add %fp, STACK_BIAS-128, %o5
+ mov %o0, %l0 ! preserve full return flags
0: call 1f ! load pc in %o7
and %o0, SPARC_FLAG_RET_MASK, %o0
@@ -287,10 +288,10 @@ E(SPARC_RET_VOID)
return %i7+8
nop
E(SPARC_RET_STRUCT)
- ldx [FP-160], %i0
- ldd [FP-160], %f0
- b 8f
- ldx [FP-152], %i1
+ b .Lclosure_ret_struct
+ nop
+ nop
+ nop
E(SPARC_RET_UINT8)
ldub [FP-160+7], %i0
return %i7+8
@@ -354,6 +355,31 @@ E(SPARC_RET_F_1)
nop
! Finish the SPARC_RET_STRUCT sequence.
+ ! Small integer complex values are scalar-like in the v9 ABI and
+ ! occupy the low end of %i0, unlike small structures.
+ .align 8
+.Lclosure_ret_struct:
+ andcc %l0, SP_V9_FLAG_RET_COMPLEX_SMALL, %g0
+ bne,pn %xcc, .Lclosure_ret_complex_small
+ srl %l0, SPARC_SIZEMASK_SHIFT, %l1
+ ldx [FP-160], %i0
+ ldd [FP-160], %f0
+ b 8f
+ ldx [FP-152], %i1
+
+.Lclosure_ret_complex_small:
+ and %l1, 0xff, %l1
+ cmp %l1, 2
+ be,pn %xcc, .Lclosure_ret_complex_2
+ nop
+ lduw [FP-160], %i0
+ return %i7+8
+ nop
+.Lclosure_ret_complex_2:
+ lduh [FP-160], %i0
+ return %i7+8
+ nop
+
.align 8
8: ldd [FP-152], %f2
ldx [FP-144], %i2
diff --git a/deps/libffi/src/tramp.c b/deps/libffi/src/tramp.c
index a04188858af..5b2b2cfd36b 100644
--- a/deps/libffi/src/tramp.c
+++ b/deps/libffi/src/tramp.c
@@ -44,12 +44,14 @@
#include <ffi_common.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/mman.h>
+#include <sys/stat.h>
#include <tramp.h>
#ifdef __linux__
#include <linux/limits.h>
@@ -209,13 +211,14 @@ static int
ffi_tramp_get_libffi (void)
{
FILE *fp;
- /* `file' is sized PATH_MAX+1 so a scanf field width of PATH_MAX
- (which permits PATH_MAX characters plus the terminating NUL) cannot
- overflow. */
+ /* `line' holds one /proc/<pid>/maps line; its path field can be up to
+ PATH_MAX bytes. `file' holds the /proc/<pid>/maps path opened first. */
char file[PATH_MAX+1], line[PATH_MAX+100], perm[10], dev[10];
unsigned long start, end, offset, inode;
uintptr_t addr = (uintptr_t) tramp_globals.text;
- int nfields, found;
+ int nfields, found, path_off;
+ char *path = NULL, *nl;
+ struct stat st;
int open_flags = O_RDONLY;
#ifdef O_CLOEXEC
@@ -228,33 +231,64 @@ ffi_tramp_get_libffi (void)
return 0;
found = 0;
+ inode = 0;
while (feof (fp) == 0) {
if (fgets (line, sizeof (line), fp) == 0)
break;
- /* Bound the path field width so a long mapping name cannot overflow
- the fixed-size `file' buffer. */
- nfields = sscanf (line,
- "%lx-%lx %9s %lx %9s %ld %" FFI_TRAMP_STR(PATH_MAX) "s",
- &start, &end, perm, &offset, dev, &inode, file);
- if (nfields != 7)
+ /*
+ * Parse the six fixed fields and record where the path begins with %n.
+ * The path is taken as the rest of the line rather than with a "%s"
+ * field because the kernel does not escape spaces in the maps name
+ * field, so "%s" would truncate a path that contains a space and libffi
+ * could open and map the wrong file (GHSA-fq46-69xf-x5gf).
+ */
+ path_off = 0;
+ nfields = sscanf (line, "%lx-%lx %9s %lx %9s %lu %n",
+ &start, &end, perm, &offset, dev, &inode, &path_off);
+ if (nfields != 6 || path_off == 0)
continue;
if (addr >= start && addr < end) {
tramp_globals.offset = offset + (addr - start);
+ path = line + path_off;
found = 1;
break;
}
}
fclose (fp);
- if (!found)
+ if (!found || path == NULL || *path == '\0' || *path == '\n')
return 0;
- tramp_globals.fd = open (file, open_flags);
+ /* Drop the trailing newline so the path can be opened. */
+ nl = strchr (path, '\n');
+ if (nl != NULL)
+ *nl = '\0';
+
+ tramp_globals.fd = open (path, open_flags);
if (tramp_globals.fd == -1)
return 0;
+ /*
+ * Verify that the file just opened is the file that backs the mapping we
+ * selected, by comparing its inode with the one from the maps line.
+ * Without this the path could have been replaced, or be a symlink to
+ * another file, between reading the maps line and the open, letting an
+ * attacker substitute the bytes libffi maps as executable trampoline code
+ * (GHSA-fq46-69xf-x5gf). Only the inode is compared: the device number in
+ * /proc/<pid>/maps does not match stat(2)'s st_dev on btrfs, overlayfs and
+ * some other filesystems, so comparing st_dev would reject the real file
+ * there. On any mismatch, fall back to the temp-file trampoline.
+ */
+ if (fstat (tramp_globals.fd, &st) != 0
+ || (unsigned long) st.st_ino != inode)
+ {
+ close (tramp_globals.fd);
+ tramp_globals.fd = -1;
+ return 0;
+ }
+
/*
* Allocate a trampoline table just to make sure that the trampoline code
* table can be mapped.
diff --git a/deps/libffi/src/wasm/ffi.c b/deps/libffi/src/wasm/ffi.c
index b631b1b2bef..1da9d418f83 100644
--- a/deps/libffi/src/wasm/ffi.c
+++ b/deps/libffi/src/wasm/ffi.c
@@ -42,18 +42,18 @@
#define EM_JS_MACROS(ret, name, args, body...) EM_JS(ret, name, args, body)
-EM_JS_DEPS(libffi, "$getWasmTableEntry,$setWasmTableEntry,$getEmptyTableSlot,$convertJsFunctionToWasm");
+EM_JS_DEPS(libffi, "$getWasmTableEntry,$setWasmTableEntry,$getEmptyTableSlot,$wasmTable,$stackSave,$stackAlloc,$stackRestore");
#define DEREF_U8(addr, offset) HEAPU8[addr + offset]
#define DEREF_S8(addr, offset) HEAP8[addr + offset]
-#define DEREF_U16(addr, offset) HEAPU16[(addr >> 1) + offset]
-#define DEREF_S16(addr, offset) HEAP16[(addr >> 1) + offset]
-#define DEREF_U32(addr, offset) HEAPU32[(addr >> 2) + offset]
-#define DEREF_S32(addr, offset) HEAP32[(addr >> 2) + offset]
+#define DEREF_U16(addr, offset) HEAPU16[HEAP_INDEX_16(addr) + offset]
+#define DEREF_S16(addr, offset) HEAP16[HEAP_INDEX_16(addr) + offset]
+#define DEREF_U32(addr, offset) HEAPU32[HEAP_INDEX_32(addr) + offset]
+#define DEREF_S32(addr, offset) HEAP32[HEAP_INDEX_32(addr) + offset]
-#define DEREF_F32(addr, offset) HEAPF32[(addr >> 2) + offset]
-#define DEREF_F64(addr, offset) HEAPF64[(addr >> 3) + offset]
-#define DEREF_U64(addr, offset) HEAPU64[(addr >> 3) + offset]
+#define DEREF_F32(addr, offset) HEAPF32[HEAP_INDEX_32(addr) + offset]
+#define DEREF_F64(addr, offset) HEAPF64[HEAP_INDEX_64(addr) + offset]
+#define DEREF_U64(addr, offset) HEAPU64[HEAP_INDEX_64(addr) + offset]
#define CHECK_FIELD_OFFSET(struct, field, offset) \
_Static_assert( \
@@ -64,10 +64,17 @@ EM_JS_DEPS(libffi, "$getWasmTableEntry,$setWasmTableEntry,$getEmptyTableSlot,$co
#define FFI_EMSCRIPTEN_ABI FFI_WASM32_EMSCRIPTEN
#define PTR_SIG 'i'
+#define PTR_WASM_TYPE 0x7f
#define DEC_PTR(p) p
#define ENC_PTR(p) p
+// Pointers reach JS as signed 32-bit Numbers, so an address at or above 2 GiB
+// is negative and needs an unsigned shift to become a heap view index.
+#define HEAP_INDEX_16(addr) ((addr) >>> 1)
+#define HEAP_INDEX_32(addr) ((addr) >>> 2)
+#define HEAP_INDEX_64(addr) ((addr) >>> 3)
+
#define DEREF_PTR(addr, offset) DEREF_U32(addr, offset)
#define DEREF_PTR_NUMBER(addr, offset) DEREF_PTR(addr, offset)
@@ -106,14 +113,21 @@ CHECK_FIELD_OFFSET(ffi_type, elements, 8);
#define FFI_EMSCRIPTEN_ABI FFI_WASM64_EMSCRIPTEN
#define PTR_SIG 'j'
+#define PTR_WASM_TYPE 0x7e
-// DEC_PTR casts a pointer value (comming from Wasm) represented as BigInt (i64) to Number (i53).
+// DEC_PTR casts a pointer value (coming from Wasm) represented as BigInt (i64) to Number (i53).
// This should be used for a pointer that is expected to be within the i53 range. If the pointer
// value is outside the Number's range, the value will become NaN.
#define DEC_PTR(p) bigintToI53Checked(p)
// ENC_PTR casts a pointer value represented as Number to BigInt (i64)
#define ENC_PTR(p) BigInt(p)
+// JS shifts truncate their operand to 32 bits, so divide to keep addresses
+// at or above 4 GiB intact.
+#define HEAP_INDEX_16(addr) ((addr) / 2)
+#define HEAP_INDEX_32(addr) ((addr) / 4)
+#define HEAP_INDEX_64(addr) ((addr) / 8)
+
#define DEREF_PTR(addr, offset) DEREF_U64(addr, offset)
#define DEREF_PTR_NUMBER(addr, offset) DEC_PTR(DEREF_PTR(addr, offset))
@@ -590,6 +604,34 @@ ffi_closure_free(void *closure) {
return ffi_closure_free_js(closure);
}
+
+
+/**
+ * A closure has to appear to its caller as an ordinary wasm function with the
+ * signature of the cif. In order for it to work with JSPI, the trampoline has
+ * to be implemented in WebAssembly -- otherwise attempting to suspend inside of
+ * the closure will trap with "trying to suspend JS frames".
+ *
+ * It's a bit annoying to do things in generated WebAssembly so we put most of
+ * the logic in JS prelude/epilogue.
+ *
+ * call prelude(... all closure arguments)
+ * call_indirect closure->fun(cif, ret_ptr, args_ptr, user_data)
+ * call epilogue(ret_ptr, orig_stack_ptr)
+ *
+ * prelude() which copies the closure arguments into the appropriate places on
+ * the C stack, builds the argument pointer array, and returns 7 values: The
+ * closure->fun pointer and its four arguments, and the two arguments for epilogue.
+
+ * epilogue() is a JavaScript helper that restores the stack pointer and loads
+ * the return value from ret_ptr. Doing the load in JavaScript rather than in
+ * the trampoline avoids needing to specify the memory size in the imports
+ * section.
+ *
+ * The module bytes are a pure function of the signature string. We cache the
+ * compiled WebAssembly.Module per signature and instantiate it once per closure
+ * with that closure's prelude.
+ */
EM_JS_MACROS(
ffi_status,
ffi_prep_closure_loc_js,
@@ -600,6 +642,35 @@ ffi_prep_closure_loc_js,
fun = DEC_PTR(fun);
user_data = DEC_PTR(user_data);
codeloc = DEC_PTR(codeloc);
+ var { sig, call_info } = ffi_cif_to_call_info(cif);
+
+ LOG_DEBUG("CREATE_CLOSURE", "sig:", sig);
+ try {
+ var instance = new WebAssembly.Instance(
+ ffi_closure_trampoline_module(sig),
+ {
+ e: {
+ p: ffi_closure_prelude(closure, call_info),
+ e: ffi_closure_epilogue(sig),
+ t: wasmTable,
+ },
+ },
+ );
+ } catch (e) {
+ LOG_DEBUG("CREATE_CLOSURE_FAILED", e);
+ return FFI_BAD_TYPEDEF_MACRO;
+ }
+ var wasm_trampoline = instance.exports["f"];
+ setWasmTableEntry(codeloc, wasm_trampoline);
+ CLOSURE__cif(closure) = ENC_PTR(cif);
+ CLOSURE__fun(closure) = ENC_PTR(fun);
+ CLOSURE__user_data(closure) = ENC_PTR(user_data);
+ return FFI_OK_MACRO;
+}
+
+// Walk the CIF and compute the metadata we need for ffi_closure_prelude
+// and ffi_closure_trampoline_module.
+function ffi_cif_to_call_info(cif) {
var abi = CIF__ABI(cif);
var nargs = CIF__NARGS(cif);
var nfixedargs = CIF__NFIXEDARGS(cif);
@@ -696,10 +767,33 @@ ffi_prep_closure_loc_js,
// extra pointer to varargs stack
sig += PTR_SIG;
}
- LOG_DEBUG("CREATE_CLOSURE", "sig:", sig);
- function trampoline() {
- var args = Array.prototype.slice.call(arguments);
- var size = 0;
+ return {
+ sig,
+ call_info: {
+ nfixedargs,
+ nargs,
+ ret_by_arg,
+ unboxed_arg_type_info_list,
+ unboxed_arg_type_id_list,
+ },
+ };
+}
+
+// The prelude() function is called by the wasm trampoline with the closure's
+// arguments. It marshals them onto the C stack and returns what the trampoline
+// needs to make the onward call.
+function ffi_closure_prelude(
+ closure,
+ {
+ nfixedargs,
+ nargs,
+ ret_by_arg,
+ unboxed_arg_type_info_list,
+ unboxed_arg_type_id_list,
+ },
+) {
+ return function prelude() {
+ var args = arguments;
var orig_stack_ptr = stackSave();
var cur_ptr = orig_stack_ptr;
var ret_ptr;
@@ -707,7 +801,7 @@ ffi_prep_closure_loc_js,
// Should we return by argument or not? The onwards call returns by argument
// no matter what. (Warning: ret_by_arg means the opposite in ffi_call)
if (ret_by_arg) {
- ret_ptr = args[jsarg_idx++];
+ ret_ptr = DEC_PTR(args[jsarg_idx++]);
} else {
// We might return 4 bytes or 8 bytes, allocate 8 just in case.
STACK_ALLOC(cur_ptr, 8, 8);
@@ -817,37 +911,138 @@ ffi_prep_closure_loc_js,
stackRestore(cur_ptr);
stackAlloc(0); // stackAlloc enforces alignment invariants on the stack pointer
LOG_DEBUG("CALL_CLOSURE", "closure:", closure, "fptr", CLOSURE__fun(closure), "cif", CLOSURE__cif(closure));
- getWasmTableEntry(CLOSURE__fun(closure))(
- CLOSURE__cif(closure), ENC_PTR(ret_ptr), ENC_PTR(args_ptr),
- CLOSURE__user_data(closure)
- );
- stackRestore(orig_stack_ptr);
-
- // If we aren't supposed to return by argument, figure out what to return.
- if (!ret_by_arg) {
- switch (sig[0]) {
- case 'i':
- return DEREF_U32(ret_ptr, 0);
- case 'j':
- return DEREF_U64(ret_ptr, 0);
- case 'd':
- return DEREF_F64(ret_ptr, 0);
- case 'f':
- return DEREF_F32(ret_ptr, 0);
+ // The trampoline now does
+ // fun(cif, ret_ptr, args_ptr, user_data);
+ // return epilogue(ret_ptr, orig_stack_ptr);
+ //
+ // We return these arguments in reverse order because stack is LIFO.
+ return [
+ ENC_PTR(ret_ptr), // epilogue args (in correct order)
+ ENC_PTR(orig_stack_ptr),
+
+ CLOSURE__cif(closure), // call_indirect args (in correct order)
+ ENC_PTR(ret_ptr),
+ ENC_PTR(args_ptr),
+ CLOSURE__user_data(closure),
+
+ CLOSURE__fun(closure), // ...and the table index for call_indirect
+ ];
+ }
+}
+
+// Returns function which restores the stack pointer and loads the closure's
+// return value from ret_ptr.
+function ffi_closure_epilogue(sig) {
+ var load;
+ switch (sig[0]) {
+ case 'i': load = (ptr) => DEREF_S32(ptr, 0); break;
+ case 'j': load = (ptr) => DEREF_U64(ptr, 0); break;
+ case 'f': load = (ptr) => DEREF_F32(ptr, 0); break;
+ case 'd': load = (ptr) => DEREF_F64(ptr, 0); break;
+ default: load = (ptr) => undefined; break;
+ }
+ return function epilogue(ret_ptr, orig_stack_ptr) {
+ stackRestore(DEC_PTR(orig_stack_ptr));
+ return load(DEC_PTR(ret_ptr));
+ };
+}
+
+var ffi_closure_trampoline_module_cache = new Map();
+function ffi_closure_trampoline_module(sig) {
+ var cache = ffi_closure_trampoline_module_cache;
+ var module = cache.get(sig);
+ if (module) {
+ return module;
+ }
+
+ function uleb128(n) {
+ var result = [];
+ do {
+ var byte = n & 0x7f;
+ n >>>= 7;
+ if (n) {
+ byte |= 0x80;
}
- }
+ result.push(byte);
+ } while (n);
+ return result;
}
- try {
- var wasm_trampoline = convertJsFunctionToWasm(trampoline, sig);
- } catch(e) {
- return FFI_BAD_TYPEDEF_MACRO;
+ // A vector of single-byte items
+ function vec(bytes) {
+ return [...uleb128(bytes.length), ...bytes];
}
- setWasmTableEntry(codeloc, wasm_trampoline);
- CLOSURE__cif(closure) = ENC_PTR(cif);
- CLOSURE__fun(closure) = ENC_PTR(fun);
- CLOSURE__user_data(closure) = ENC_PTR(user_data);
- return FFI_OK_MACRO;
-})
+ function section(id, bytes) {
+ return [id, ...vec(bytes)];
+ }
+ function funcType(params, results) {
+ return [0x60, ...vec(params), ...vec(results)];
+ }
+
+ var typeCodes = { 'i': 0x7f, 'j': 0x7e, 'f': 0x7d, 'd': 0x7c };
+ var P = PTR_WASM_TYPE;
+ var params = Array.from(sig.slice(1), (c) => typeCodes[c]);
+ var results = sig[0] === 'v' ? [] : [typeCodes[sig[0]]];
+ var nparams = params.length;
+
+ // Is the function table 64-bit indexed?
+ // -sMEMORY64=2 compiles with 64-bit pointers but uses a 32-bit memory and
+ // table, so we have to i32.wrap_i64 pointers.
+ var idx64 = typeof wasmTable.length === 'bigint';
+ var idxFlag = idx64 ? 0x04 : 0x00;
+ // Pointers are wrapped to i32 to be used as a table index.
+ var wrapPtr = (P === 0x7e && !idx64) ? [0xa7] : []; // i32.wrap_i64
+
+ var typeSection = section(0x01, [
+ ...uleb128(4),
+ ...funcType(params, results), // type 0: the trampoline itself
+ ...funcType(params, [P, P, P, P, P, P, P]), // type 1: prelude
+ ...funcType([P, P, P, P], []), // type 2: closure->fun(cif, ret, args, user_data)
+ ...funcType([P, P], results), // type 3: epilogue(ret_ptr, orig_sp)
+ ]);
+ var importSection = section(0x02, [
+ ...uleb128(3),
+ // prelude: (import "e" "p" (func (type 1)))
+ 0x01, 0x65, 0x01, 0x70, 0x00, 0x01,
+ // epilogue: (import "e" "e" (func (type 3)))
+ 0x01, 0x65, 0x01, 0x65, 0x00, 0x03,
+ // (import "e" "t" (table 0 funcref))
+ 0x01, 0x65, 0x01, 0x74, 0x01, 0x70, 0x00 | idxFlag, 0x00,
+ ]);
+ // One function, of type 0.
+ var functionSection = section(0x03, [0x01, 0x00]);
+ // (export "f" (func 2)) -- funcs 0 and 1 are the imports.
+ var exportSection = section(0x07, [0x01, 0x01, 0x66, 0x00, 0x02]);
+
+ // Function body
+ var body = [0x00]; // no locals
+ for (var i = 0; i < nparams; i++) {
+ body.push(0x20, ...uleb128(i)); // local.get i
+ }
+ body.push(0x10, 0x00); // call prelude
+ // Operand stack is now: ret_ptr, orig_sp, cif, ret_ptr, args_ptr, user_data, fun
+ body.push(...wrapPtr); // fun is used as a table index
+ body.push(0x11, 0x02, 0x00); // call_indirect (type 2) (table 0), consumes the top 5
+ // Operand stack: ret_ptr, orig_sp
+ body.push(0x10, 0x01); // call epilogue, consumes both and leaves the result (if any)
+ body.push(0x0b); // end
+ var codeSection = section(0x0a, [...uleb128(1), ...vec(body)]);
+
+ var bytes = new Uint8Array([
+ 0x00, 0x61, 0x73, 0x6d, // magic
+ 0x01, 0x00, 0x00, 0x00, // version
+ ...typeSection,
+ ...importSection,
+ ...functionSection,
+ ...exportSection,
+ ...codeSection,
+ ]);
+ LOG_DEBUG("CLOSURE_MODULE", "sig:", sig, "bytes:", bytes);
+ // The module is tiny so compiling synchronously is fine.
+ module = new WebAssembly.Module(bytes);
+ cache.set(sig, module);
+ return module;
+}
+)
// EM_JS does not correctly handle function pointer arguments, so we need a
// helper
diff --git a/deps/libffi/src/x86/ffi.c b/deps/libffi/src/x86/ffi.c
index a953891362d..f2beecf5398 100644
--- a/deps/libffi/src/x86/ffi.c
+++ b/deps/libffi/src/x86/ffi.c
@@ -348,7 +348,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
size_t z = ty->size;
int t = ty->type;
- if (z <= FFI_SIZEOF_ARG && t != FFI_TYPE_STRUCT)
+ if (z <= FFI_SIZEOF_ARG && t != FFI_TYPE_STRUCT && t != FFI_TYPE_COMPLEX)
{
ffi_arg val = extend_basic_type (valp, t);
@@ -495,7 +495,7 @@ ffi_closure_inner (struct closure_frame *frame, char *stack)
int t = ty->type;
void *valp;
- if (z <= FFI_SIZEOF_ARG && t != FFI_TYPE_STRUCT)
+ if (z <= FFI_SIZEOF_ARG && t != FFI_TYPE_STRUCT && t != FFI_TYPE_COMPLEX)
{
if (t != FFI_TYPE_FLOAT && narg_reg < pabi->nregs)
valp = &frame->regs[pabi->regs[narg_reg++]];
@@ -681,6 +681,10 @@ ffi_prep_go_closure (ffi_go_closure* closure, ffi_cif* cif,
void FFI_HIDDEN ffi_closure_raw_SYSV(void);
void FFI_HIDDEN ffi_closure_raw_THISCALL(void);
+#if defined(FFI_EXEC_STATIC_TRAMP)
+void FFI_HIDDEN ffi_closure_raw_SYSV_alt(void);
+void FFI_HIDDEN ffi_closure_raw_THISCALL_alt(void);
+#endif
ffi_status
ffi_prep_raw_closure_loc (ffi_raw_closure *closure,
@@ -717,6 +721,24 @@ ffi_prep_raw_closure_loc (ffi_raw_closure *closure,
return FFI_BAD_ABI;
}
+#if defined(FFI_EXEC_STATIC_TRAMP)
+ if (ffi_tramp_is_present (closure))
+ {
+ /* With a static trampoline, set its parameters instead of writing a
+ dynamic trampoline into closure->tramp. The _alt entry loads the
+ closure pointer the trampoline passes into %eax, where
+ ffi_closure_raw_* expect it. Writing the dynamic trampoline here
+ would instead clobber the ftramp pointer ffi_closure_alloc stored at
+ offset 0 and leave the static trampoline with no parameters
+ (GHSA-w6j9-w53f-2857). ftramp is read through ffi_closure, exactly
+ as ffi_closure_alloc/ffi_closure_free do. */
+ dest = (dest == ffi_closure_raw_SYSV)
+ ? ffi_closure_raw_SYSV_alt : ffi_closure_raw_THISCALL_alt;
+ ffi_tramp_set_parms (((ffi_closure *) closure)->ftramp, dest, closure);
+ goto out;
+ }
+#endif
+
/* movl imm, %eax. */
tramp[0] = 0xb8;
*(void **)(tramp + 1) = codeloc;
@@ -725,6 +747,9 @@ ffi_prep_raw_closure_loc (ffi_raw_closure *closure,
tramp[5] = 0xe9;
*(unsigned *)(tramp + 6) = (unsigned)dest - ((unsigned)codeloc + 10);
+#if defined(FFI_EXEC_STATIC_TRAMP)
+out:
+#endif
closure->cif = cif;
closure->fun = fun;
closure->user_data = user_data;
diff --git a/deps/libffi/src/x86/ffi64.c b/deps/libffi/src/x86/ffi64.c
index c2c78f3fbbf..6bb2b9639c7 100644
--- a/deps/libffi/src/x86/ffi64.c
+++ b/deps/libffi/src/x86/ffi64.c
@@ -442,6 +442,41 @@ examine_argument (ffi_type *type, enum x86_64_reg_class classes[MAX_CLASSES],
return n;
}
+/* Recursively test whether TY is, or contains, a short vector whose x86-64
+ System V calling convention is undefined, so that libffi must refuse it
+ rather than marshal it the wrong way.
+
+ The psABI only defines the convention for vectors that map to __m64/__m128
+ (8 and 16 bytes). Narrower vectors (<1 x float>, <4 x uint8>, ...) are
+ unspecified, and GCC and Clang disagree on them. Among the 8-byte vectors
+ the two also disagree on the single-element <1 x double>: GCC returns and
+ passes it in memory, Clang in %xmm0. libffi cannot tell which convention
+ the target function was compiled for, so it accepts only the shapes both
+ compilers agree on and this port implements: 16-byte vectors, and 8-byte
+ vectors other than <1 x double>. Everything else is FFI_BAD_TYPEDEF. */
+
+static int
+vector_type_unsupported (ffi_type *ty)
+{
+ ffi_type **p;
+
+ if (ty == NULL)
+ return 0;
+ if (ty->type == FFI_TYPE_VECTOR)
+ {
+ if (ty->size == 16)
+ return 0;
+ if (ty->size == 8 && ty->elements[0]->type != FFI_TYPE_DOUBLE)
+ return 0;
+ return 1;
+ }
+ if (ty->type == FFI_TYPE_STRUCT && ty->elements != NULL)
+ for (p = ty->elements; *p != NULL; p++)
+ if (vector_type_unsupported (*p))
+ return 1;
+ return 0;
+}
+
/* Perform machine dependent cif processing. */
#ifndef __ILP32__
@@ -469,6 +504,18 @@ ffi_prep_cif_machdep (ffi_cif *cif)
rtype = cif->rtype;
rtype_size = rtype->size;
+
+ /* Reject return and argument types that are, or contain, a vector whose
+ x86-64 System V convention is undefined (see vector_type_unsupported).
+ Doing it here, before any classification, keeps libffi from silently
+ marshalling such a value the wrong way -- which for <1 x double> turns a
+ caller's integer argument into the store address of the result. */
+ if (vector_type_unsupported (rtype))
+ return FFI_BAD_TYPEDEF;
+ for (i = 0, avn = cif->nargs; i < avn; i++)
+ if (vector_type_unsupported (cif->arg_types[i]))
+ return FFI_BAD_TYPEDEF;
+
switch (rtype->type)
{
case FFI_TYPE_VOID:
@@ -533,7 +580,9 @@ ffi_prep_cif_machdep (ffi_cif *cif)
{
_Bool sse0 = SSE_CLASS_P (classes[0]);
- if (rtype_size == 4 && sse0)
+ if (classes[0] == X86_64_X87_CLASS)
+ flags = UNIX64_RET_X87;
+ else if (rtype_size == 4 && sse0)
flags = UNIX64_RET_XMM32;
else if (rtype_size == 8)
flags = sse0 ? UNIX64_RET_XMM64 : UNIX64_RET_INT64;
@@ -553,8 +602,9 @@ ffi_prep_cif_machdep (ffi_cif *cif)
}
break;
case FFI_TYPE_VECTOR:
- /* An 8-byte vector returns in the low half of %xmm0; a 16-byte vector
- fills %xmm0 (SSE + SSEUP). Wider vectors are unsupported here. */
+ /* Only supported vectors reach here (vector_type_unsupported rejected
+ the rest above): an 8-byte vector returns in the low half of %xmm0,
+ a 16-byte vector fills %xmm0 (SSE + SSEUP). */
if (rtype_size == 8)
flags = UNIX64_RET_XMM64;
else if (rtype_size == 16)
@@ -606,15 +656,6 @@ ffi_prep_cif_machdep (ffi_cif *cif)
return FFI_BAD_TYPEDEF;
}
- /* Reject vectors wider than 16 bytes as arguments: correct %ymm/%zmm
- passing needs unix64.S register-save changes that are out of scope for
- this port, and classify_argument would otherwise silently treat them as
- an in-memory aggregate. */
- for (i = 0, avn = cif->nargs; i < avn; i++)
- if (cif->arg_types[i]->type == FFI_TYPE_VECTOR
- && cif->arg_types[i]->size > 16)
- return FFI_BAD_TYPEDEF;
-
/* Go over all arguments and determine the way they should be passed.
If it's in a register and there is space for it, let that be so. If
not, add it's size to the stack byte count. */
@@ -934,8 +975,14 @@ build_plan (ffi_cif *cif)
switch (classes[j])
{
case X86_64_NO_CLASS:
- case X86_64_SSEUP_CLASS:
continue; /* nothing placed for this 8-byte */
+ case X86_64_SSEUP_CLASS:
+ /* Upper half of the preceding SSE class's %xmm slot. */
+ m.dst_off = (unsigned) (offsetof (struct register_args, sse)
+ + (ssecount - 1)
+ * sizeof (union big_int_union) + 8);
+ m.op = FFI_MOVE_SSE64;
+ break;
case X86_64_INTEGER_CLASS:
case X86_64_INTEGERSI_CLASS:
m.dst_off = gprcount * 8; /* offsetof(register_args,gpr) == 0 */
diff --git a/deps/libffi/src/x86/sysv.S b/deps/libffi/src/x86/sysv.S
index dac841421d9..b6070f0151c 100644
--- a/deps/libffi/src/x86/sysv.S
+++ b/deps/libffi/src/x86/sysv.S
@@ -351,7 +351,7 @@ L(UW13):
FFI_CLOSURE_SAVE_REGS
FFI_CLOSURE_COPY_TRAMP_DATA
- /* Entry point from preceeding Go closures. */
+ /* Entry point from preceding Go closures. */
L(do_closure_i386):
FFI_CLOSURE_PREP_CALL
@@ -486,7 +486,7 @@ L(do_closure_REGISTER):
FFI_CLOSURE_COPY_TRAMP_DATA
- /* Entry point from preceeding Go closure. */
+ /* Entry point from preceding Go closure. */
L(do_closure_STDCALL):
FFI_CLOSURE_PREP_CALL
@@ -883,6 +883,32 @@ L(UW52):
/* cfi_endproc */
ENDF(C(ffi_closure_raw_THISCALL))
+#if defined(FFI_EXEC_STATIC_TRAMP)
+/* Static-trampoline entry points for the raw closures. The static
+ trampoline leaves the closure pointer at 4(%esp); load it into %eax
+ (where ffi_closure_raw_* expect it), restore the stack, and jump to the
+ normal body. Mirrors ffi_closure_i386_alt. */
+ .balign 16
+ .globl C(ffi_closure_raw_SYSV_alt)
+ FFI_HIDDEN(C(ffi_closure_raw_SYSV_alt))
+C(ffi_closure_raw_SYSV_alt):
+ _CET_ENDBR
+ movl 4(%esp), %eax /* Load closure in eax */
+ add $8, %esp /* Restore the stack */
+ jmp C(ffi_closure_raw_SYSV)
+ENDF(C(ffi_closure_raw_SYSV_alt))
+
+ .balign 16
+ .globl C(ffi_closure_raw_THISCALL_alt)
+ FFI_HIDDEN(C(ffi_closure_raw_THISCALL_alt))
+C(ffi_closure_raw_THISCALL_alt):
+ _CET_ENDBR
+ movl 4(%esp), %eax /* Load closure in eax */
+ add $8, %esp /* Restore the stack */
+ jmp C(ffi_closure_raw_THISCALL)
+ENDF(C(ffi_closure_raw_THISCALL_alt))
+#endif /* FFI_EXEC_STATIC_TRAMP */
+
#endif /* !FFI_NO_RAW_API */
#ifdef X86_DARWIN
diff --git a/deps/libffi/src/x86/sysv_intel.S b/deps/libffi/src/x86/sysv_intel.S
index c7de159916a..7de706a90d2 100644
--- a/deps/libffi/src/x86/sysv_intel.S
+++ b/deps/libffi/src/x86/sysv_intel.S
@@ -291,7 +291,7 @@ L(UW13):
FFI_CLOSURE_SAVE_REGS
FFI_CLOSURE_COPY_TRAMP_DATA
- /* Entry point from preceeding Go closures. */
+ /* Entry point from preceding Go closures. */
L(do_closure_i386)::
FFI_CLOSURE_PREP_CALL
@@ -420,7 +420,7 @@ L(do_closure_REGISTER)::
FFI_CLOSURE_COPY_TRAMP_DATA
- /* Entry point from preceeding Go closure. */
+ /* Entry point from preceding Go closure. */
L(do_closure_STDCALL)::
FFI_CLOSURE_PREP_CALL
diff --git a/deps/libffi/src/x86/unix64.S b/deps/libffi/src/x86/unix64.S
index 61983ef3bcf..6520f815cb8 100644
--- a/deps/libffi/src/x86/unix64.S
+++ b/deps/libffi/src/x86/unix64.S
@@ -31,6 +31,7 @@
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
+#include <ffi_cfi.h>
#include "internal64.h"
#include "asmnames.h"
@@ -256,7 +257,7 @@ ENDF(C(ffi_call_unix64))
.globl C(ffi_plan_fast_call)
FFI_HIDDEN(C(ffi_plan_fast_call))
C(ffi_plan_fast_call):
- .cfi_startproc
+ cfi_startproc
_CET_ENDBR
movq %rsi, %r11 /* fn */
movq %rdi, %rax /* img */
@@ -280,12 +281,12 @@ C(ffi_plan_fast_call):
movq 0x28(%rax), %r9
movl %r10d, %eax /* %al = ssecount */
subq $8, %rsp /* realign to 16 across the call */
- .cfi_adjust_cfa_offset 8
+ cfi_adjust_cfa_offset(8)
call *%r11
addq $8, %rsp
- .cfi_adjust_cfa_offset -8
+ cfi_adjust_cfa_offset(-8)
ret /* rax + xmm0 carry the callee's return */
- .cfi_endproc
+ cfi_endproc
ENDF(C(ffi_plan_fast_call))
/* Count-based direct thunks for the pure-GP64 fast path: load avalue[0..N-1]
@@ -297,7 +298,7 @@ C(ffi_plan_fast_call):
rax/xmm0 flow out as the {UINT64,double} return; C stores per return code. */
#define FFI_GP_HEAD \
- .cfi_startproc; \
+ cfi_startproc; \
_CET_ENDBR; \
movq %rsi, %r11; \
movq %rdi, %rax
@@ -307,12 +308,12 @@ C(ffi_plan_fast_call):
#define FFI_GP_TAIL \
xorl %eax, %eax; \
subq $8, %rsp; \
- .cfi_adjust_cfa_offset 8; \
+ cfi_adjust_cfa_offset(8); \
call *%r11; \
addq $8, %rsp; \
- .cfi_adjust_cfa_offset -8; \
+ cfi_adjust_cfa_offset(-8); \
ret; \
- .cfi_endproc
+ cfi_endproc
.balign 8
.globl C(ffi_plan_gp0)
diff --git a/deps/libffi/testsuite/Makefile.am b/deps/libffi/testsuite/Makefile.am
index 702461d0241..4fab507d1e9 100644
--- a/deps/libffi/testsuite/Makefile.am
+++ b/deps/libffi/testsuite/Makefile.am
@@ -13,6 +13,7 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \
libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \
libffi.call/align_stdcall.c libffi.call/bpo_38748.c libffi.call/call.exp \
+ libffi.call/closure_raw.c \
libffi.call/closure_thiscall_fastcall_pop.c \
libffi.call/err_bad_typedef.c libffi.call/ffitest.h libffi.call/float.c \
libffi.call/float1.c libffi.call/float2.c libffi.call/float3.c \
@@ -29,7 +30,7 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.call/return_fl1.c libffi.call/return_fl2.c libffi.call/return_fl3.c \
libffi.call/return_ldl.c libffi.call/return_ll.c libffi.call/return_ll1.c \
libffi.call/return_sc.c libffi.call/return_sl.c libffi.call/return_uc.c \
- libffi.call/return_ul.c libffi.call/s55.c libffi.call/strlen.c \
+ libffi.call/return_ul.c libffi.call/return_void.c libffi.call/s55.c libffi.call/strlen.c \
libffi.call/strlen2.c libffi.call/strlen3.c libffi.call/strlen4.c \
libffi.call/struct1.c libffi.call/struct10.c libffi.call/struct2.c \
libffi.call/struct3.c libffi.call/struct4.c libffi.call/struct5.c \
@@ -37,12 +38,14 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.call/struct9.c libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
libffi.call/struct_by_value_3f.c libffi.call/struct_by_value_4.c libffi.call/struct_by_value_4f.c \
libffi.call/struct_by_value_big.c libffi.call/struct_by_value_small.c libffi.call/struct_return_2H.c \
- libffi.call/struct_int_float.c libffi.call/longjmp.c \
+ libffi.call/struct_int_float.c libffi.call/struct_stack_small.c libffi.call/longjmp.c \
libffi.call/struct_return_8H.c libffi.call/uninitialized.c libffi.call/va_1.c \
libffi.call/va_2.c libffi.call/va_3.c libffi.call/va_struct1.c \
libffi.call/va_struct2.c libffi.call/va_struct3.c libffi.call/callback.c \
libffi.call/callback2.c libffi.call/callback3.c libffi.call/callback4.c libffi.call/x32.c \
- libffi.closures/closure.exp libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
+ libffi.closures/closure.exp libffi.closures/closure_int128.c \
+ libffi.closures/closure_mmap_failure.c libffi.closures/closure_trampoline_table.c \
+ libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
libffi.closures/closure_fn2.c libffi.closures/closure_fn3.c libffi.closures/closure_fn4.c \
libffi.closures/closure_fn5.c libffi.closures/closure_fn6.c libffi.closures/closure_loc_fn0.c \
libffi.closures/closure_simple.c libffi.closures/cls_12byte.c libffi.closures/cls_16byte.c \
@@ -64,7 +67,7 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.closures/cls_multi_sshortchar.c libffi.closures/cls_multi_uchar.c libffi.closures/cls_multi_ushort.c \
libffi.closures/cls_multi_ushortchar.c libffi.closures/cls_pointer.c libffi.closures/cls_pointer_stack.c \
libffi.closures/cls_schar.c libffi.closures/cls_sint.c libffi.closures/cls_sshort.c \
- libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c libffi.closures/cls_uint.c \
+ libffi.closures/cls_struct_fp_return.c libffi.closures/cls_struct_ld_return.c libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c libffi.closures/cls_uint.c \
libffi.closures/cls_uint_va.c libffi.closures/cls_ulong_va.c libffi.closures/cls_ulonglong.c \
libffi.closures/cls_ushort.c libffi.closures/err_bad_abi.c libffi.closures/ffitest.h \
libffi.closures/huge_struct.c libffi.closures/nested_struct.c libffi.closures/nested_struct1.c \
@@ -83,7 +86,9 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.complex/cls_complex_va_double.c libffi.complex/cls_complex_va_float.c libffi.complex/cls_complex_va_longdouble.c \
libffi.complex/complex.exp libffi.complex/complex.inc libffi.complex/complex_defs_double.inc \
libffi.complex/complex_defs_float.inc libffi.complex/complex_defs_longdouble.inc libffi.complex/complex_double.c \
- libffi.complex/complex_float.c libffi.complex/complex_i128.c libffi.complex/complex_int.c libffi.complex/complex_longdouble.c \
+ libffi.complex/complex_float.c libffi.complex/complex_i128.c libffi.complex/complex_int.c libffi.complex/complex_int_small.c libffi.complex/complex_longdouble.c \
+ libffi.complex/complex_longdouble_abi.c libffi.complex/complex_regs.inc libffi.complex/complex_regs_double.c \
+ libffi.complex/complex_regs_float.c libffi.complex/complex_regs_longdouble.c \
libffi.complex/ffitest.h libffi.complex/many_complex.inc libffi.complex/many_complex_double.c \
libffi.complex/many_complex_float.c libffi.complex/many_complex_longdouble.c libffi.complex/return_complex.inc \
libffi.complex/return_complex1.inc libffi.complex/return_complex1_double.c libffi.complex/return_complex1_float.c \
@@ -92,10 +97,13 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.complex/return_complex_float.c libffi.complex/return_complex_longdouble.c libffi.go/aa-direct.c \
libffi.go/closure1.c libffi.go/ffitest.h libffi.go/go.exp \
libffi.go/static-chain.h Makefile.am Makefile.in \
+ libffi.jspi/cls_jspi.c libffi.jspi/ffitest.h libffi.jspi/jspi.exp \
libffi.threads/ffitest.h libffi.threads/threads.exp libffi.threads/tsan.c \
libffi.vector/vector.exp libffi.vector/ffitest.h libffi.vector/vector.h \
libffi.vector/vector_float32x4.c libffi.vector/vector_float32x2.c \
libffi.vector/vector_double2.c libffi.vector/vector_int32x4.c \
libffi.vector/vector_args_spill.c libffi.vector/vector_vec3.c \
libffi.vector/vector_double4.c libffi.vector/vector_hva.c \
- libffi.vector/cls_vector.c libffi.vector/vector_validate.c
+ libffi.vector/cls_vector.c libffi.vector/vector_validate.c \
+ libffi.vector/vector_unsupported_abi.c \
+ libffi.configure/libdir.sh
diff --git a/deps/libffi/testsuite/Makefile.in b/deps/libffi/testsuite/Makefile.in
index 30b417735d5..62c61d5132c 100644
--- a/deps/libffi/testsuite/Makefile.in
+++ b/deps/libffi/testsuite/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -69,6 +69,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -239,8 +241,10 @@ ac_ct_READELF = @ac_ct_READELF@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
ax_enable_builddir_sed = @ax_enable_builddir_sed@
bindir = @bindir@
build = @build@
@@ -301,6 +305,7 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \
libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \
libffi.call/align_stdcall.c libffi.call/bpo_38748.c libffi.call/call.exp \
+ libffi.call/closure_raw.c \
libffi.call/closure_thiscall_fastcall_pop.c \
libffi.call/err_bad_typedef.c libffi.call/ffitest.h libffi.call/float.c \
libffi.call/float1.c libffi.call/float2.c libffi.call/float3.c \
@@ -317,7 +322,7 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.call/return_fl1.c libffi.call/return_fl2.c libffi.call/return_fl3.c \
libffi.call/return_ldl.c libffi.call/return_ll.c libffi.call/return_ll1.c \
libffi.call/return_sc.c libffi.call/return_sl.c libffi.call/return_uc.c \
- libffi.call/return_ul.c libffi.call/s55.c libffi.call/strlen.c \
+ libffi.call/return_ul.c libffi.call/return_void.c libffi.call/s55.c libffi.call/strlen.c \
libffi.call/strlen2.c libffi.call/strlen3.c libffi.call/strlen4.c \
libffi.call/struct1.c libffi.call/struct10.c libffi.call/struct2.c \
libffi.call/struct3.c libffi.call/struct4.c libffi.call/struct5.c \
@@ -325,12 +330,14 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.call/struct9.c libffi.call/struct_by_value_2.c libffi.call/struct_by_value_3.c \
libffi.call/struct_by_value_3f.c libffi.call/struct_by_value_4.c libffi.call/struct_by_value_4f.c \
libffi.call/struct_by_value_big.c libffi.call/struct_by_value_small.c libffi.call/struct_return_2H.c \
- libffi.call/struct_int_float.c libffi.call/longjmp.c \
+ libffi.call/struct_int_float.c libffi.call/struct_stack_small.c libffi.call/longjmp.c \
libffi.call/struct_return_8H.c libffi.call/uninitialized.c libffi.call/va_1.c \
libffi.call/va_2.c libffi.call/va_3.c libffi.call/va_struct1.c \
libffi.call/va_struct2.c libffi.call/va_struct3.c libffi.call/callback.c \
libffi.call/callback2.c libffi.call/callback3.c libffi.call/callback4.c libffi.call/x32.c \
- libffi.closures/closure.exp libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
+ libffi.closures/closure.exp libffi.closures/closure_int128.c \
+ libffi.closures/closure_mmap_failure.c libffi.closures/closure_trampoline_table.c \
+ libffi.closures/closure_fn0.c libffi.closures/closure_fn1.c \
libffi.closures/closure_fn2.c libffi.closures/closure_fn3.c libffi.closures/closure_fn4.c \
libffi.closures/closure_fn5.c libffi.closures/closure_fn6.c libffi.closures/closure_loc_fn0.c \
libffi.closures/closure_simple.c libffi.closures/cls_12byte.c libffi.closures/cls_16byte.c \
@@ -352,7 +359,7 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.closures/cls_multi_sshortchar.c libffi.closures/cls_multi_uchar.c libffi.closures/cls_multi_ushort.c \
libffi.closures/cls_multi_ushortchar.c libffi.closures/cls_pointer.c libffi.closures/cls_pointer_stack.c \
libffi.closures/cls_schar.c libffi.closures/cls_sint.c libffi.closures/cls_sshort.c \
- libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c libffi.closures/cls_uint.c \
+ libffi.closures/cls_struct_fp_return.c libffi.closures/cls_struct_ld_return.c libffi.closures/cls_struct_va1.c libffi.closures/cls_uchar.c libffi.closures/cls_uint.c \
libffi.closures/cls_uint_va.c libffi.closures/cls_ulong_va.c libffi.closures/cls_ulonglong.c \
libffi.closures/cls_ushort.c libffi.closures/err_bad_abi.c libffi.closures/ffitest.h \
libffi.closures/huge_struct.c libffi.closures/nested_struct.c libffi.closures/nested_struct1.c \
@@ -371,7 +378,9 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.complex/cls_complex_va_double.c libffi.complex/cls_complex_va_float.c libffi.complex/cls_complex_va_longdouble.c \
libffi.complex/complex.exp libffi.complex/complex.inc libffi.complex/complex_defs_double.inc \
libffi.complex/complex_defs_float.inc libffi.complex/complex_defs_longdouble.inc libffi.complex/complex_double.c \
- libffi.complex/complex_float.c libffi.complex/complex_i128.c libffi.complex/complex_int.c libffi.complex/complex_longdouble.c \
+ libffi.complex/complex_float.c libffi.complex/complex_i128.c libffi.complex/complex_int.c libffi.complex/complex_int_small.c libffi.complex/complex_longdouble.c \
+ libffi.complex/complex_longdouble_abi.c libffi.complex/complex_regs.inc libffi.complex/complex_regs_double.c \
+ libffi.complex/complex_regs_float.c libffi.complex/complex_regs_longdouble.c \
libffi.complex/ffitest.h libffi.complex/many_complex.inc libffi.complex/many_complex_double.c \
libffi.complex/many_complex_float.c libffi.complex/many_complex_longdouble.c libffi.complex/return_complex.inc \
libffi.complex/return_complex1.inc libffi.complex/return_complex1_double.c libffi.complex/return_complex1_float.c \
@@ -380,13 +389,16 @@ EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \
libffi.complex/return_complex_float.c libffi.complex/return_complex_longdouble.c libffi.go/aa-direct.c \
libffi.go/closure1.c libffi.go/ffitest.h libffi.go/go.exp \
libffi.go/static-chain.h Makefile.am Makefile.in \
+ libffi.jspi/cls_jspi.c libffi.jspi/ffitest.h libffi.jspi/jspi.exp \
libffi.threads/ffitest.h libffi.threads/threads.exp libffi.threads/tsan.c \
libffi.vector/vector.exp libffi.vector/ffitest.h libffi.vector/vector.h \
libffi.vector/vector_float32x4.c libffi.vector/vector_float32x2.c \
libffi.vector/vector_double2.c libffi.vector/vector_int32x4.c \
libffi.vector/vector_args_spill.c libffi.vector/vector_vec3.c \
libffi.vector/vector_double4.c libffi.vector/vector_hva.c \
- libffi.vector/cls_vector.c libffi.vector/vector_validate.c
+ libffi.vector/cls_vector.c libffi.vector/vector_validate.c \
+ libffi.vector/vector_unsupported_abi.c \
+ libffi.configure/libdir.sh
all: all-am
@@ -445,37 +457,39 @@ check-DEJAGNU: site.exp
fi; \
exit $$exit_status
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
- @echo 'Making a new site.exp file ...'
- @echo '## these variables are automatically generated by make ##' >site.tmp
- @echo '# Do not edit here. If you wish to override these values' >>site.tmp
- @echo '# edit the last section' >>site.tmp
- @echo 'set srcdir "$(srcdir)"' >>site.tmp
- @echo "set objdir \"`pwd`\"" >>site.tmp
- @echo 'set build_alias "$(build_alias)"' >>site.tmp
- @echo 'set build_triplet $(build_triplet)' >>site.tmp
- @echo 'set host_alias "$(host_alias)"' >>site.tmp
- @echo 'set host_triplet $(host_triplet)' >>site.tmp
- @echo 'set target_alias "$(target_alias)"' >>site.tmp
- @echo 'set target_triplet $(target_triplet)' >>site.tmp
- @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
- echo "## Begin content included from file $$f. Do not modify. ##" \
- && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
- && echo "## End content included from file $$f. ##" \
- || exit 1; \
- done >> site.tmp
- @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
- @if test -f site.exp; then \
- sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
- fi
- @-rm -f site.bak
- @test ! -f site.exp || mv site.exp site.bak
- @mv site.tmp site.exp
+ $(AM_V_GEN)set -e; ( \
+ echo '## these variables are automatically generated by make ##'; \
+ echo '# Do not edit here. If you wish to override these values'; \
+ echo '# edit the last section'; \
+ echo 'set srcdir "$(srcdir)"'; \
+ echo "set objdir \"`pwd`\""; \
+ echo 'set build_alias "$(build_alias)"'; \
+ echo 'set build_triplet $(build_triplet)'; \
+ echo 'set host_alias "$(host_alias)"'; \
+ echo 'set host_triplet $(host_triplet)'; \
+ echo 'set target_alias "$(target_alias)"'; \
+ echo 'set target_triplet $(target_triplet)'; \
+ list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; \
+ for f in $$list; do \
+ echo "## Begin content included from file $$f. Do not modify. ##"; \
+ cat `test -f "$$f" || echo '$(srcdir)/'`$$f; \
+ echo "## End content included from file $$f. ##"; \
+ done; \
+ echo "## End of auto-generated content; you can edit from here. ##"; \
+ if test -f site.exp; then \
+ sed -e '1,/^## End of auto-generated content.*##/d' site.exp; \
+ fi; \
+ ) >site.tmp; \
+ rm -f site.bak; \
+ test ! -f site.exp || mv site.exp site.bak; \
+ mv site.tmp site.exp
distclean-DEJAGNU:
-rm -f site.exp site.bak
-l='$(DEJATOOL)'; for tool in $$l; do \
rm -f $$tool.sum $$tool.log; \
done
+
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -536,11 +550,11 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+ -$(am__rm_f) $(CLEANFILES)
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -632,3 +646,10 @@ uninstall-am:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/deps/libffi/testsuite/check-dlmalloc-static.sh b/deps/libffi/testsuite/check-dlmalloc-static.sh
new file mode 100755
index 00000000000..708cc2125d7
--- /dev/null
+++ b/deps/libffi/testsuite/check-dlmalloc-static.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Check that closures.c keeps the bundled dlmalloc private.
+#
+# closures.c declares each dl* function static before it includes
+# dlmalloc.c. A dl* function missing from that list gets dlmalloc's
+# default extern linkage. The version script hides it in libffi.so.
+# libffi.a has no version script, so a program that links libffi.a
+# exports it.
+#
+# Usage: check-dlmalloc-static.sh NM LIBTOOL-OBJECT
+
+nm_cmd=$1
+lo=$2
+
+case $nm_cmd in
+ *dumpbin*)
+ echo "SKIP: $nm_cmd does not print nm-style output"
+ exit 0
+ ;;
+esac
+
+pic_object=none
+non_pic_object=none
+. "./$lo"
+dir=`dirname "$lo"`
+
+status=0
+checked=0
+for obj in "$pic_object" "$non_pic_object"; do
+ test "$obj" = none && continue
+ checked=1
+ leaked=`$nm_cmd "$dir/$obj" | awk 'NF >= 3 && $2 ~ /^[A-TV-Z]$/ { print $3 }' | grep '^_*dl'`
+ if test -n "$leaked"; then
+ echo "FAIL: $dir/$obj defines these dlmalloc functions as external symbols:"
+ echo "$leaked" | sed 's/^/ /'
+ echo "Declare them static in src/closures.c, before it includes dlmalloc.c."
+ status=1
+ fi
+done
+
+if test $checked = 0; then
+ echo "FAIL: $lo names no object to check"
+ exit 1
+fi
+test $status = 0 && echo "PASS: no dlmalloc function in $lo is external"
+exit $status
diff --git a/deps/libffi/testsuite/emscripten/build-tests.sh b/deps/libffi/testsuite/emscripten/build-tests.sh
index 2f1dd8d769f..b73cb79fa98 100755
--- a/deps/libffi/testsuite/emscripten/build-tests.sh
+++ b/deps/libffi/testsuite/emscripten/build-tests.sh
@@ -18,7 +18,6 @@ export LDFLAGS=" \
-sMODULARIZE \
-sMAIN_MODULE \
-sNO_DISABLE_EXCEPTION_CATCHING \
- -sWASM_BIGINT \
$EXTRA_LD_FLAGS \
"
diff --git a/deps/libffi/testsuite/emscripten/node-tests.sh b/deps/libffi/testsuite/emscripten/node-tests.sh
index 2710947c069..273d60b5abb 100755
--- a/deps/libffi/testsuite/emscripten/node-tests.sh
+++ b/deps/libffi/testsuite/emscripten/node-tests.sh
@@ -7,8 +7,8 @@ fi
# Common compiler flags
export CFLAGS="-fPIC $EXTRA_CFLAGS"
-export CXXFLAGS="$CFLAGS -sNO_DISABLE_EXCEPTION_CATCHING $EXTRA_CXXFLAGS"
-export LDFLAGS="-sEXPORTED_FUNCTIONS=_main,_malloc,_free -sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT -Wno-main"
+export CXXFLAGS="$CFLAGS -fexceptions $EXTRA_CXXFLAGS"
+export LDFLAGS="-sEXPORTED_FUNCTIONS=_main,_malloc,_free -sALLOW_TABLE_GROWTH -sASSERTIONS -Wno-main"
# Specific variables for cross-compilation
export CHOST="${TARGET_HOST}-unknown-linux" # wasm32-unknown-emscripten
diff --git a/deps/libffi/testsuite/lib/libffi.exp b/deps/libffi/testsuite/lib/libffi.exp
index 55afb8f094a..6cb40f8703b 100644
--- a/deps/libffi/testsuite/lib/libffi.exp
+++ b/deps/libffi/testsuite/lib/libffi.exp
@@ -29,6 +29,20 @@ proc check_effective_target_gccbug { } {
return $has_gccbug
}
+# True when this is a powerpc64 linux target whose compiler makes long double
+# 128 bits wide. A few tests pin -mlong-double-128 to exercise the IBM-128
+# paths, but they may only do so when the library they link against was built
+# the same way: the powerpc linker refuses to merge objects that disagree about
+# the long double ABI. Probe the compiler rather than the target triplet, so a
+# -mlong-double-64 build (musl's choice on ppc64le) drops the option and tests
+# the 64-bit long double instead.
+proc check_effective_target_ppc64_longdouble128 { } {
+ if { ![istarget powerpc64*-*-linux-gnu*] } {
+ return 0
+ }
+ return [libffi_feature_test "#if defined(__LONG_DOUBLE_128__)"]
+}
+
# Return 1 if the target matches the effective target 'arg', 0 otherwise.
# This can be used with any check_* proc that takes no argument and
# returns only 1 or 0. It could be used with check_* procs that take
@@ -432,6 +446,8 @@ proc libffi_target_compile { source dest type options } {
}
} elseif { [string match "*android*" $target_triplet] } {
lappend options "libs= -lc++"
+ } elseif { [string match "wasm*-*" $target_triplet] } {
+ lappend options "additional_flags=-fexceptions"
}
}
@@ -447,10 +463,39 @@ proc libffi_target_compile { source dest type options } {
lappend options "libs= -lpthread"
}
+ # Newer clang warns about file-scope variables that are assigned
+ # but never read. Several tests do this deliberately.
+ if { [libffi_compiler_accepts_flag "-Wno-unused-but-set-global"] } {
+ lappend options "additional_flags=-Wno-unused-but-set-global"
+ }
+
verbose "options: $options"
return [target_compile $source $dest $type $options]
}
+# Returns true if the compiler accepts FLAG without complaint. The
+# result is cached, so the probe only runs once per flag.
+proc libffi_compiler_accepts_flag { flag } {
+ global libffi_accepted_flags
+
+ if { [info exists libffi_accepted_flags($flag)] } {
+ return $libffi_accepted_flags($flag)
+ }
+
+ set src "ffiflag[pid].c"
+ set f [open $src "w"]
+ puts $f "int main() {return 0;}"
+ close $f
+
+ set lines [target_compile $src $src.i preprocess "additional_flags=$flag"]
+ file delete $src
+ file delete $src.i
+
+ set libffi_accepted_flags($flag) [string match "" $lines]
+ verbose "compiler accepts $flag: $libffi_accepted_flags($flag)"
+ return $libffi_accepted_flags($flag)
+}
+
# TEST should be a preprocessor condition. Returns true if it holds.
proc libffi_feature_test { test } {
set src "ffitest[pid].c"
diff --git a/deps/libffi/testsuite/libffi.call/callback.c b/deps/libffi/testsuite/libffi.call/callback.c
index 70248cbb5e1..98d552cd816 100644
--- a/deps/libffi/testsuite/libffi.call/callback.c
+++ b/deps/libffi/testsuite/libffi.call/callback.c
@@ -5,6 +5,9 @@
Originator: David Tenty <daltenty@ibm.com> */
/* { dg-do run } */
+/* SPARC64 classifies array members differently from nested structures,
+ but libffi's documented array emulation has no distinct array tag. */
+/* { dg-skip-if "array members are not representable in the SPARC64 ABI" { sparc64-*-* } } */
#include "ffitest.h"
static int i=5;
diff --git a/deps/libffi/testsuite/libffi.call/callback2.c b/deps/libffi/testsuite/libffi.call/callback2.c
index 0fcc614977b..bf989b81773 100644
--- a/deps/libffi/testsuite/libffi.call/callback2.c
+++ b/deps/libffi/testsuite/libffi.call/callback2.c
@@ -5,6 +5,9 @@
Originator: David Tenty <daltenty@ibm.com> */
/* { dg-do run } */
+/* SPARC64 classifies array members differently from nested structures,
+ but libffi's documented array emulation has no distinct array tag. */
+/* { dg-skip-if "array members are not representable in the SPARC64 ABI" { sparc64-*-* } } */
#include "ffitest.h"
static int i=5;
diff --git a/deps/libffi/testsuite/libffi.call/closure_raw.c b/deps/libffi/testsuite/libffi.call/closure_raw.c
new file mode 100644
index 00000000000..84c32a44544
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.call/closure_raw.c
@@ -0,0 +1,56 @@
+/* Area: ffi_prep_raw_closure_loc
+ Purpose: Check that a raw-API closure allocated with ffi_closure_alloc
+ is invoked correctly. With static trampolines the executable
+ code address differs from the closure data, and the raw API
+ passed the wrong one as the handler's user_data, so the handler
+ was read from read-only trampoline bytes and the closure made a
+ wild indirect call (GHSA-w6j9-w53f-2857). There was previously
+ no test for ffi_prep_raw_closure*.
+ Limitations: none.
+ PR: GHSA-w6j9-w53f-2857. */
+
+/* { dg-do run { xfail i686-pc-cygwin } } */
+/* XFAIL: the i686 MSVC native raw-closure path fails at execution; see
+ libffi issue #1074. */
+#include "ffitest.h"
+
+/* The raw API can be configured out (e.g. Emscripten builds with
+ --disable-raw-api), which drops ffi_prep_raw_closure_loc from the
+ library. Match raw_api.c's own guard so the test links there too. */
+#if FFI_CLOSURES && !FFI_NO_RAW_API
+
+static void
+raw_handler (ffi_cif *cif, void *ret, ffi_raw *args, void *ud)
+{
+ (void) cif;
+ *(ffi_arg *) ret = (ffi_arg) (args[0].sint + args[1].sint + (intptr_t) ud);
+}
+
+int
+main (void)
+{
+ ffi_cif cif;
+ ffi_type *args[2] = { &ffi_type_sint, &ffi_type_sint };
+ ffi_raw_closure *cl;
+ void *code;
+ int (*f) (int, int);
+
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, args)
+ == FFI_OK);
+
+ cl = ffi_closure_alloc (sizeof (ffi_raw_closure), &code);
+ CHECK (cl != NULL);
+ CHECK (ffi_prep_raw_closure_loc (cl, &cif, raw_handler, (void *) 100, code)
+ == FFI_OK);
+
+ f = (int (*) (int, int)) code;
+ CHECK (f (20, 3) == 123);
+
+ ffi_closure_free (cl);
+ printf ("raw closure ok\n");
+ exit (0);
+}
+
+#else
+int main (void) { return 0; }
+#endif
diff --git a/deps/libffi/testsuite/libffi.call/return_void.c b/deps/libffi/testsuite/libffi.call/return_void.c
new file mode 100644
index 00000000000..abc3c198e56
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.call/return_void.c
@@ -0,0 +1,37 @@
+/* Area: ffi_call
+ Purpose: Check that a void call ignores its return buffer.
+ Limitations: none. */
+
+/* { dg-do run } */
+#include "ffitest.h"
+
+static unsigned int called;
+
+static void
+return_void (unsigned int value)
+{
+ called = value;
+}
+
+int
+main (void)
+{
+ ffi_cif cif;
+ ffi_type *args[1] = { &ffi_type_uint };
+ unsigned int value = 42;
+ void *values[1] = { &value };
+ ffi_arg result = ~(ffi_arg)0;
+
+ CHECK(ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 1,
+ &ffi_type_void, args) == FFI_OK);
+
+ ffi_call (&cif, FFI_FN(return_void), &result, values);
+ CHECK(called == value);
+ CHECK(result == ~(ffi_arg)0);
+
+ value = 43;
+ ffi_call (&cif, FFI_FN(return_void), NULL, values);
+ CHECK(called == value);
+
+ exit (0);
+}
diff --git a/deps/libffi/testsuite/libffi.call/struct_stack_small.c b/deps/libffi/testsuite/libffi.call/struct_stack_small.c
new file mode 100644
index 00000000000..e55646adae7
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.call/struct_stack_small.c
@@ -0,0 +1,96 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check a small struct passed on the stack and the argument
+ following it.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run } */
+#include "ffitest.h"
+
+/* A two-byte struct after eight ints goes to the stack on targets with
+ eight argument registers, followed by a short that must land in the slot
+ the ABI assigns after the struct. */
+
+typedef struct
+{
+ unsigned char a;
+ unsigned char b;
+} small_struct;
+
+static int ABI_ATTR
+f_stack (int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ small_struct s, short t)
+{
+ return i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8
+ + s.a * 10 + s.b * 100 + t * 1000;
+}
+
+#if FFI_CLOSURES
+static void
+cls_stack (ffi_cif *cif __UNUSED__, void *resp, void **args,
+ void *userdata __UNUSED__)
+{
+ *(ffi_arg *) resp = f_stack (*(int *) args[0], *(int *) args[1],
+ *(int *) args[2], *(int *) args[3],
+ *(int *) args[4], *(int *) args[5],
+ *(int *) args[6], *(int *) args[7],
+ *(small_struct *) args[8],
+ *(short *) args[9]);
+}
+#endif
+
+int
+main (void)
+{
+ ffi_cif cif;
+ ffi_type small_struct_type;
+ ffi_type *small_struct_elements[3];
+ ffi_type *types[10];
+ void *values[10];
+#if FFI_CLOSURES
+ ffi_closure *pcl;
+ void *code;
+#endif
+ int ints[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ small_struct s = { 3, 5 };
+ short t = 7;
+ ffi_arg result;
+ int i;
+
+ small_struct_elements[0] = &ffi_type_uchar;
+ small_struct_elements[1] = &ffi_type_uchar;
+ small_struct_elements[2] = NULL;
+ small_struct_type.size = 0;
+ small_struct_type.alignment = 0;
+ small_struct_type.type = FFI_TYPE_STRUCT;
+ small_struct_type.elements = small_struct_elements;
+
+ for (i = 0; i < 8; i++)
+ {
+ types[i] = &ffi_type_sint;
+ values[i] = &ints[i];
+ }
+ types[8] = &small_struct_type;
+ values[8] = &s;
+ types[9] = &ffi_type_sshort;
+ values[9] = &t;
+
+ CHECK (ffi_prep_cif (&cif, ABI_NUM, 10, &ffi_type_sint, types) == FFI_OK);
+ ffi_call (&cif, FFI_FN (f_stack), &result, values);
+ printf ("stack: %d\n", (int) result);
+ CHECK ((int) result == 7566);
+
+#if FFI_CLOSURES
+ pcl = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (pcl != NULL);
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_stack, NULL, code) == FFI_OK);
+ result = ((int (ABI_ATTR *) (int, int, int, int, int, int, int, int,
+ small_struct, short)) code)
+ (1, 2, 3, 4, 5, 6, 7, 8, s, t);
+ printf ("closure stack: %d\n", (int) result);
+ CHECK ((int) result == 7566);
+ ffi_closure_free (pcl);
+#endif
+
+ exit (0);
+}
diff --git a/deps/libffi/testsuite/libffi.closures/closure_int128.c b/deps/libffi/testsuite/libffi.closures/closure_int128.c
new file mode 100644
index 00000000000..a1c8ea155c3
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.closures/closure_int128.c
@@ -0,0 +1,79 @@
+/* Area: ffi_closure
+ Purpose: Check that a closure receives a 128-bit integer argument, and
+ the argument after it, correctly. On s390x the closure path
+ had no SINT128/UINT128 case, so it left the argument's avalue[]
+ slot uninitialised and shifted every later argument
+ (GHSA-wf8m-qr3x-cch4).
+ Limitations: none.
+ PR: GHSA-wf8m-qr3x-cch4. */
+
+/* { dg-do run } */
+#include "ffitest.h"
+
+#if defined(FFI_TARGET_HAS_INT128) && defined(__SIZEOF_INT128__)
+
+typedef __int128_t i128;
+
+static const i128 VAL =
+ ((i128)0x0102030405060708ull << 64) | 0x090a0b0c0d0e0f10ull;
+#define TAIL 0x5a5a5a5aL
+
+/* long f(i128 x, long b) => low64(x) + b */
+static void h_xb (ffi_cif *cif, void *ret, void **args, void *ud)
+{
+ i128 x = *(i128 *) args[0];
+ long b = *(long *) args[1];
+ (void) cif; (void) ud;
+ *(ffi_arg *) ret = (ffi_arg) ((long) x + b);
+}
+
+/* long g(long a, i128 x, long b) => a + low64(x) + b */
+static void h_axb (ffi_cif *cif, void *ret, void **args, void *ud)
+{
+ long a = *(long *) args[0];
+ i128 x = *(i128 *) args[1];
+ long b = *(long *) args[2];
+ (void) cif; (void) ud;
+ *(ffi_arg *) ret = (ffi_arg) (a + (long) x + b);
+}
+
+int main (void)
+{
+ ffi_cif cif;
+ void *code;
+ ffi_closure *cl;
+
+ {
+ ffi_type *args[2] = { &ffi_type_sint128, &ffi_type_sint64 };
+ long (*f) (i128, long);
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint64, args)
+ == FFI_OK);
+ cl = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (cl != NULL);
+ CHECK (ffi_prep_closure_loc (cl, &cif, h_xb, NULL, code) == FFI_OK);
+ f = (long (*) (i128, long)) code;
+ CHECK (f (VAL, TAIL) == (long) ((long) VAL + TAIL));
+ ffi_closure_free (cl);
+ }
+
+ {
+ ffi_type *args[3] =
+ { &ffi_type_sint64, &ffi_type_sint128, &ffi_type_sint64 };
+ long (*g) (long, i128, long);
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 3, &ffi_type_sint64, args)
+ == FFI_OK);
+ cl = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (cl != NULL);
+ CHECK (ffi_prep_closure_loc (cl, &cif, h_axb, NULL, code) == FFI_OK);
+ g = (long (*) (long, i128, long)) code;
+ CHECK (g (11, VAL, TAIL) == (long) (11 + (long) VAL + TAIL));
+ ffi_closure_free (cl);
+ }
+
+ printf ("closure int128 ok\n");
+ exit (0);
+}
+
+#else
+int main (void) { return 0; }
+#endif
diff --git a/deps/libffi/testsuite/libffi.closures/closure_mmap_failure.c b/deps/libffi/testsuite/libffi.closures/closure_mmap_failure.c
new file mode 100644
index 00000000000..14317470860
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.closures/closure_mmap_failure.c
@@ -0,0 +1,62 @@
+/* Area: closures */
+/* { dg-do run { target x86_64-*-linux-gnu* } } */
+/* { dg-options "-Wl,--export-dynamic" { target x86_64-*-linux-gnu* } } */
+
+#define _GNU_SOURCE 1
+#include "ffitest.h"
+
+/* The Emscripten browser harness compiles every testcase and ignores the
+ dg-do target above. This test interposes mmap through RTLD_NEXT and needs
+ dlsym on a glibc/ELF system; on wasm, dlsym from an unopened handle aborts.
+ Guard the body so it is a harmless no-op anywhere it cannot run. */
+#if defined(__GLIBC__)
+
+#include <dlfcn.h>
+#include <errno.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+typedef void *(*mmap_fn) (void *, size_t, int, int, int, off_t);
+
+static mmap_fn real_mmap;
+static int reject_exec_mappings;
+
+/* Model a hardened runtime that rejects every executable mapping. */
+void *
+mmap (void *addr, size_t length, int prot, int flags, int fd, off_t offset)
+{
+ if (reject_exec_mappings && (prot & PROT_EXEC))
+ {
+ errno = EPERM;
+ return MAP_FAILED;
+ }
+
+ return real_mmap (addr, length, prot, flags, fd, offset);
+}
+
+int
+main (void)
+{
+ ffi_closure *closure;
+ void *code = NULL;
+
+ real_mmap = (mmap_fn) dlsym (RTLD_NEXT, "mmap");
+ CHECK (real_mmap != NULL);
+
+ reject_exec_mappings = 1;
+
+ /* The failure path must terminate instead of cycling through temporary
+ backing files forever. */
+ alarm (5);
+ closure = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ alarm (0);
+
+ CHECK (closure == NULL);
+ CHECK (code == NULL);
+
+ exit (0);
+}
+
+#else
+int main (void) { return 0; }
+#endif
diff --git a/deps/libffi/testsuite/libffi.closures/closure_trampoline_table.c b/deps/libffi/testsuite/libffi.closures/closure_trampoline_table.c
new file mode 100644
index 00000000000..c293ba78ba7
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.closures/closure_trampoline_table.c
@@ -0,0 +1,62 @@
+/* Area: ffi_closure_alloc, ffi_closure_free
+ Purpose: Churn the closure allocator across many live closures.
+ On targets that use the Darwin trampoline-table allocator
+ this spans several trampoline tables and exercises the
+ allocator's internal table list. Freeing a partially used
+ non-head table moved it to the head of the list without
+ unlinking it first, corrupting the doubly-linked list; a
+ later free then wrote through the stale links into freed
+ table memory, a heap use-after-free (GHSA-23hx-9rxv-9qfp).
+ The sequence is harmless on every other allocator.
+ Limitations: Only the Darwin trampoline-table allocator keeps such a
+ list, so elsewhere this is just an allocator stress test.
+ PR: GHSA-23hx-9rxv-9qfp */
+
+/* { dg-do run } */
+
+#include "ffitest.h"
+
+/* Enough closures to span several trampoline tables on the Darwin
+ allocator (at most 1024 entries per table), so that the interleaved
+ free order below forces non-head tables to be bumped to the front of
+ the list and later emptied and freed. */
+#define N 4096
+
+int
+main (void)
+{
+ ffi_closure **closures;
+ void *code;
+ int round, i;
+
+ closures = malloc (N * sizeof (*closures));
+ CHECK (closures != NULL);
+
+ for (round = 0; round < 3; round++)
+ {
+ for (i = 0; i < N; i++)
+ {
+ code = NULL;
+ closures[i] = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (closures[i] != NULL);
+ CHECK (code != NULL);
+ }
+
+ /* Interleave the frees: the first pass returns one entry from
+ many different tables, bumping partially used non-head tables
+ to the head of the list; the second pass then empties and frees
+ tables while the list is in that state. Before the fix this
+ walked stale prev/next links and wrote into freed memory. */
+ for (i = 0; i < N; i += 2)
+ ffi_closure_free (closures[i]);
+ for (i = 1; i < N; i += 2)
+ ffi_closure_free (closures[i]);
+ }
+
+ free (closures);
+
+ printf ("closure trampoline table ok\n");
+ exit (0);
+}
+
+/* { dg-output "closure trampoline table ok" } */
diff --git a/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c b/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c
index 128d6e1b403..8988b5d6197 100644
--- a/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c
+++ b/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c
@@ -5,7 +5,7 @@
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
-/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */
+/* { dg-options -mlong-double-128 { target ppc64_longdouble128 } } */
#include "ffitest.h"
diff --git a/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c b/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c
index 3562a57fabd..edf21b7f926 100644
--- a/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c
+++ b/deps/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c
@@ -6,7 +6,7 @@
*/
/* { dg-do run { xfail strongarm*-*-* } } */
-/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */
+/* { dg-options -mlong-double-128 { target ppc64_longdouble128 } } */
#include "ffitest.h"
diff --git a/deps/libffi/testsuite/libffi.closures/cls_longdouble.c b/deps/libffi/testsuite/libffi.closures/cls_longdouble.c
index 2cfac4bafef..ea2985f6f49 100644
--- a/deps/libffi/testsuite/libffi.closures/cls_longdouble.c
+++ b/deps/libffi/testsuite/libffi.closures/cls_longdouble.c
@@ -7,7 +7,7 @@
/* This test is known to PASS on armv7l-unknown-linux-gnueabihf, so I have
remove the xfail for arm*-*-* below, until we know more. */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
-/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */
+/* { dg-options -mlong-double-128 { target ppc64_longdouble128 } } */
#include "ffitest.h"
diff --git a/deps/libffi/testsuite/libffi.closures/cls_struct_fp_return.c b/deps/libffi/testsuite/libffi.closures/cls_struct_fp_return.c
new file mode 100644
index 00000000000..35583b6ed18
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.closures/cls_struct_fp_return.c
@@ -0,0 +1,102 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check return values of structs with one or two floating-point
+ fields.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run { xfail mips64*-*-* } } */
+/* XFAIL: mips N64 ABI bug in complex-float/longdouble args and fp-struct
+ returns; see libffi issue #1071. */
+
+#include "ffitest.h"
+
+/* Several ABIs return these structs in floating-point registers, or with
+ soft float in pairs of GPRs that differ from those used for other small
+ structs, so they need their own return paths in ffi_call and in
+ closures. */
+
+typedef struct { float a; } s_f;
+typedef struct { double a; } s_d;
+typedef struct { float a; float b; } s_ff;
+typedef struct { double a; double b; } s_dd;
+typedef struct { float a; double b; } s_fd;
+typedef struct { double a; float b; } s_df;
+
+#define DEFINE(name, eq, ...) \
+static name ABI_ATTR \
+fn_##name (int k) \
+{ \
+ name r = { __VA_ARGS__ }; \
+ return r; \
+} \
+ \
+static void \
+cls_##name (ffi_cif *cif __UNUSED__, void *resp, void **argv, \
+ void *userdata __UNUSED__) \
+{ \
+ *(name *) resp = fn_##name (*(int *) argv[0]); \
+} \
+ \
+static int \
+eq_##name (name x, name y) \
+{ \
+ return eq; \
+}
+
+#define EQ1 (x.a == y.a)
+#define EQ2 (x.a == y.a && x.b == y.b)
+
+DEFINE (s_f, EQ1, 1.5f * k)
+DEFINE (s_d, EQ1, 2.5 * k)
+DEFINE (s_ff, EQ2, 1.5f * k, -0.25f * k)
+DEFINE (s_dd, EQ2, 2.5 * k, -0.75 * k)
+DEFINE (s_fd, EQ2, 1.5f * k, -0.75 * k)
+DEFINE (s_df, EQ2, 2.5 * k, -0.25f * k)
+
+#define CHECK_ONE(name, type1, type2) \
+ do { \
+ ffi_type *elements[3] = { type1, type2, NULL }; \
+ ffi_type type; \
+ ffi_type *args[1] = { &ffi_type_sint }; \
+ void *values[1] = { &k }; \
+ ffi_cif cif; \
+ ffi_closure *pcl; \
+ void *code; \
+ union { ffi_arg align; name value; } result; \
+ name want = fn_##name (k), got; \
+ \
+ type.size = 0; \
+ type.alignment = 0; \
+ type.type = FFI_TYPE_STRUCT; \
+ type.elements = elements; \
+ CHECK (ffi_prep_cif (&cif, ABI_NUM, 1, &type, args) == FFI_OK); \
+ \
+ memset (&result, 0, sizeof (result)); \
+ ffi_call (&cif, FFI_FN (fn_##name), &result, values); \
+ CHECK (eq_##name (result.value, want)); \
+ \
+ pcl = ffi_closure_alloc (sizeof (ffi_closure), &code); \
+ CHECK (pcl != NULL); \
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_##name, NULL, code) \
+ == FFI_OK); \
+ memset (&got, 0, sizeof (got)); \
+ got = ((name (ABI_ATTR *)(int)) code) (k); \
+ CHECK (eq_##name (got, want)); \
+ ffi_closure_free (pcl); \
+ printf ("%s: ok\n", #name); \
+ } while (0)
+
+int
+main (void)
+{
+ int k = 3;
+
+ CHECK_ONE (s_f, &ffi_type_float, NULL);
+ CHECK_ONE (s_d, &ffi_type_double, NULL);
+ CHECK_ONE (s_ff, &ffi_type_float, &ffi_type_float);
+ CHECK_ONE (s_dd, &ffi_type_double, &ffi_type_double);
+ CHECK_ONE (s_fd, &ffi_type_float, &ffi_type_double);
+ CHECK_ONE (s_df, &ffi_type_double, &ffi_type_float);
+
+ exit (0);
+}
diff --git a/deps/libffi/testsuite/libffi.closures/cls_struct_ld_return.c b/deps/libffi/testsuite/libffi.closures/cls_struct_ld_return.c
new file mode 100644
index 00000000000..cb831d65b69
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.closures/cls_struct_ld_return.c
@@ -0,0 +1,66 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check the return value of a struct with one long double field.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run { xfail mips64*-*-* x86_64-*-linux-android* } } */
+/* XFAIL: mips N64 mishandles long-double struct returns (libffi issue
+ #1071). x86_64 Android mishandles the long-double struct return where
+ x86_64-linux-gnu does not (libffi issue #1076). */
+/* { dg-options -mlong-double-128 { target ppc64_longdouble128 } } */
+
+#include "ffitest.h"
+
+/* x86-64 returns this struct in %st(0), like a plain long double. */
+
+typedef struct { long double a; } s_ld;
+
+static s_ld ABI_ATTR
+fn_s_ld (int k)
+{
+ s_ld r = { 1.5L * k };
+ return r;
+}
+
+static void
+cls_s_ld (ffi_cif *cif __UNUSED__, void *resp, void **argv,
+ void *userdata __UNUSED__)
+{
+ *(s_ld *) resp = fn_s_ld (*(int *) argv[0]);
+}
+
+int
+main (void)
+{
+ ffi_type *elements[2] = { &ffi_type_longdouble, NULL };
+ ffi_type type;
+ ffi_type *args[1] = { &ffi_type_sint };
+ int k = 3;
+ void *values[1] = { &k };
+ ffi_cif cif;
+ ffi_closure *pcl;
+ void *code;
+ s_ld got;
+
+ type.size = 0;
+ type.alignment = 0;
+ type.type = FFI_TYPE_STRUCT;
+ type.elements = elements;
+ CHECK (ffi_prep_cif (&cif, ABI_NUM, 1, &type, args) == FFI_OK);
+
+ memset (&got, 0, sizeof (got));
+ ffi_call (&cif, FFI_FN (fn_s_ld), &got, values);
+ printf ("ffi_call: %Lg\n", got.a);
+ CHECK (got.a == 4.5L);
+
+ pcl = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (pcl != NULL);
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_s_ld, NULL, code) == FFI_OK);
+ memset (&got, 0, sizeof (got));
+ got = ((s_ld (ABI_ATTR *)(int)) code) (k + 1);
+ printf ("closure: %Lg\n", got.a);
+ CHECK (got.a == 6.0L);
+ ffi_closure_free (pcl);
+
+ exit (0);
+}
diff --git a/deps/libffi/testsuite/libffi.closures/huge_struct.c b/deps/libffi/testsuite/libffi.closures/huge_struct.c
index b3488304c1a..040973d37ea 100644
--- a/deps/libffi/testsuite/libffi.closures/huge_struct.c
+++ b/deps/libffi/testsuite/libffi.closures/huge_struct.c
@@ -6,7 +6,7 @@
*/
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
-/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */
+/* { dg-options -mlong-double-128 { target ppc64_longdouble128 } } */
/* { dg-options -Wformat=0 { target moxie*-*-elf or1k-*-* } } */
#include <inttypes.h>
diff --git a/deps/libffi/testsuite/libffi.complex/complex_int_small.c b/deps/libffi/testsuite/libffi.complex/complex_int_small.c
new file mode 100644
index 00000000000..29bc46d61c0
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.complex/complex_int_small.c
@@ -0,0 +1,170 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check integer complex types smaller than a register.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run } */
+
+#include "ffitest.h"
+#include <complex.h>
+
+/* _Complex signed char and _Complex short are passed and returned in a
+ single register or stack slot on most targets, which for complex values
+ is a different code path from the larger types. The last function
+ passes both after eight ints, so that they go to the stack on targets
+ with eight argument registers. */
+
+#define FFI_COMPLEX_TYPEDEF(name, type, ffitype) \
+ static ffi_type *ffi_elements_complex_##name [2] = { \
+ (ffi_type *)(&ffitype), NULL \
+ }; \
+ struct struct_align_complex_##name { \
+ char c; \
+ _Complex type x; \
+ }; \
+ static ffi_type ffi_type_complex_##name = { \
+ sizeof(_Complex type), \
+ offsetof(struct struct_align_complex_##name, x), \
+ FFI_TYPE_COMPLEX, \
+ (ffi_type **)ffi_elements_complex_##name \
+ }
+
+FFI_COMPLEX_TYPEDEF(schar, signed char, ffi_type_schar);
+FFI_COMPLEX_TYPEDEF(sshort, short, ffi_type_sshort);
+
+typedef _Complex signed char cc;
+typedef _Complex short cs;
+
+/* ffi_call requires its return storage to be at least register-sized and
+ suitably aligned, even when the declared return type is smaller. */
+typedef union
+{
+ ffi_arg align;
+ cc cchar;
+ cs cshort;
+} complex_result;
+
+static cc
+f_cc (cc a, int k)
+{
+ __real__ a = __real__ a * k;
+ __imag__ a = __imag__ a - k;
+ return a;
+}
+
+static cs
+f_cs (cs a, int k)
+{
+ __real__ a = __real__ a * k;
+ __imag__ a = __imag__ a - k;
+ return a;
+}
+
+static cs
+f_stack (int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ cc a, cs b)
+{
+ __real__ b = __real__ b + __real__ a + i1 + i2 + i3 + i4;
+ __imag__ b = __imag__ b + __imag__ a + i5 + i6 + i7 + i8;
+ return b;
+}
+
+static void
+cls_cc (ffi_cif *cif __UNUSED__, void *resp, void **args,
+ void *userdata __UNUSED__)
+{
+ *(cc *) resp = f_cc (*(cc *) args[0], *(int *) args[1]);
+}
+
+static void
+cls_cs (ffi_cif *cif __UNUSED__, void *resp, void **args,
+ void *userdata __UNUSED__)
+{
+ *(cs *) resp = f_cs (*(cs *) args[0], *(int *) args[1]);
+}
+
+static void
+cls_stack (ffi_cif *cif __UNUSED__, void *resp, void **args,
+ void *userdata __UNUSED__)
+{
+ *(cs *) resp = f_stack (*(int *) args[0], *(int *) args[1],
+ *(int *) args[2], *(int *) args[3],
+ *(int *) args[4], *(int *) args[5],
+ *(int *) args[6], *(int *) args[7],
+ *(cc *) args[8], *(cs *) args[9]);
+}
+
+int
+main (void)
+{
+ ffi_cif cif;
+ ffi_type *types[10];
+ void *values[10];
+ ffi_closure *pcl;
+ void *code;
+ int ints[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ cc a, ra;
+ cs b, rb;
+ complex_result result;
+ int k = 3, i;
+
+ pcl = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (pcl != NULL);
+
+ __real__ a = 5;
+ __imag__ a = -7;
+ __real__ b = 300;
+ __imag__ b = -400;
+
+ types[0] = &ffi_type_complex_schar;
+ types[1] = &ffi_type_sint;
+ values[0] = &a;
+ values[1] = &k;
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 2, &ffi_type_complex_schar,
+ types) == FFI_OK);
+ ffi_call (&cif, FFI_FN (f_cc), &result, values);
+ ra = result.cchar;
+ printf ("cc: %d,%di\n", (int) __real__ ra, (int) __imag__ ra);
+ CHECK (__real__ ra == 15 && __imag__ ra == -10);
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_cc, NULL, code) == FFI_OK);
+ ra = ((cc (*)(cc, int)) code) (a, k);
+ printf ("closure cc: %d,%di\n", (int) __real__ ra, (int) __imag__ ra);
+ CHECK (__real__ ra == 15 && __imag__ ra == -10);
+
+ types[0] = &ffi_type_complex_sshort;
+ values[0] = &b;
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 2, &ffi_type_complex_sshort,
+ types) == FFI_OK);
+ ffi_call (&cif, FFI_FN (f_cs), &result, values);
+ rb = result.cshort;
+ printf ("cs: %d,%di\n", (int) __real__ rb, (int) __imag__ rb);
+ CHECK (__real__ rb == 900 && __imag__ rb == -403);
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_cs, NULL, code) == FFI_OK);
+ rb = ((cs (*)(cs, int)) code) (b, k);
+ printf ("closure cs: %d,%di\n", (int) __real__ rb, (int) __imag__ rb);
+ CHECK (__real__ rb == 900 && __imag__ rb == -403);
+
+ for (i = 0; i < 8; i++)
+ {
+ types[i] = &ffi_type_sint;
+ values[i] = &ints[i];
+ }
+ types[8] = &ffi_type_complex_schar;
+ values[8] = &a;
+ types[9] = &ffi_type_complex_sshort;
+ values[9] = &b;
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, 10, &ffi_type_complex_sshort,
+ types) == FFI_OK);
+ ffi_call (&cif, FFI_FN (f_stack), &result, values);
+ rb = result.cshort;
+ printf ("stack: %d,%di\n", (int) __real__ rb, (int) __imag__ rb);
+ CHECK (__real__ rb == 315 && __imag__ rb == -381);
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_stack, NULL, code) == FFI_OK);
+ rb = ((cs (*)(int, int, int, int, int, int, int, int, cc, cs)) code)
+ (1, 2, 3, 4, 5, 6, 7, 8, a, b);
+ printf ("closure stack: %d,%di\n", (int) __real__ rb, (int) __imag__ rb);
+ CHECK (__real__ rb == 315 && __imag__ rb == -381);
+
+ ffi_closure_free (pcl);
+ exit (0);
+}
diff --git a/deps/libffi/testsuite/libffi.complex/complex_longdouble_abi.c b/deps/libffi/testsuite/libffi.complex/complex_longdouble_abi.c
new file mode 100644
index 00000000000..5a2ef2436b8
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.complex/complex_longdouble_abi.c
@@ -0,0 +1,68 @@
+/* Area: ffi_prep_types
+ Purpose: Check that _Complex long double follows the abi's long double width.
+ Limitations: powerpc64 only -- the one target where long double has more
+ than one width at run time.
+ PR: none.
+ Originator: Anthony Green 20260916 */
+
+/* { dg-do run { target powerpc64*-*-linux-gnu* } } */
+
+#include "ffitest.h"
+
+/* ffi_prep_cif() and ffi_get_struct_offsets() resize ffi_type_longdouble to
+ match the FFI_LINUX_LONG_DOUBLE_128 bit of the abi they are handed, so that
+ one libffi can describe calls into libraries built with either width. That
+ is also why these two types, alone among the ffi_type objects, are not
+ const. ffi_type_complex_longdouble has to keep up: two halves of whatever
+ long double currently is. */
+
+static void
+check_width (ffi_abi abi, size_t ld_size, unsigned short ld_align)
+{
+ ffi_cif cif;
+ ffi_type *args[1];
+ ffi_type *elements[2];
+ ffi_type s;
+ size_t offsets[1];
+
+ args[0] = &ffi_type_complex_longdouble;
+ CHECK (ffi_prep_cif (&cif, abi, 1, &ffi_type_complex_longdouble, args)
+ == FFI_OK);
+
+ CHECK (ffi_type_longdouble.size == ld_size);
+ CHECK (ffi_type_longdouble.alignment == ld_align);
+
+ CHECK (ffi_type_complex_longdouble.size == 2 * ld_size);
+ CHECK (ffi_type_complex_longdouble.alignment == ld_align);
+ CHECK (ffi_type_complex_longdouble.elements[0]->size == ld_size);
+
+ /* A struct built out of that type has to come out the same size, which is
+ what ffi_get_struct_offsets() and every struct-passing path rely on. */
+ elements[0] = &ffi_type_complex_longdouble;
+ elements[1] = NULL;
+ s.size = 0;
+ s.alignment = 0;
+ s.type = FFI_TYPE_STRUCT;
+ s.elements = elements;
+ CHECK (ffi_get_struct_offsets (abi, &s, offsets) == FFI_OK);
+ CHECK (s.size == 2 * ld_size);
+ CHECK (offsets[0] == 0);
+}
+
+int
+main (void)
+{
+ size_t native = (FFI_DEFAULT_ABI & FFI_LINUX_LONG_DOUBLE_128) ? 16 : 8;
+
+ /* A 64-bit long double, as musl selects on ppc64le. */
+ check_width ((ffi_abi) FFI_LINUX, 8, 8);
+ /* A 128-bit long double, either IBM-128 or IEEE-128. */
+ check_width ((ffi_abi) (FFI_LINUX | FFI_LINUX_LONG_DOUBLE_128), 16, 16);
+ /* Leave the globals as this build's default abi found them. */
+ check_width (FFI_DEFAULT_ABI, native, (unsigned short) native);
+
+ printf ("success\n");
+ exit (0);
+}
+
+/* { dg-output "success" } */
diff --git a/deps/libffi/testsuite/libffi.complex/complex_regs.inc b/deps/libffi/testsuite/libffi.complex/complex_regs.inc
new file mode 100644
index 00000000000..f2d2bbf8e36
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.complex/complex_regs.inc
@@ -0,0 +1,142 @@
+/* -*-c-*- */
+#include "ffitest.h"
+#include <complex.h>
+
+/* A complex argument that arrives when the argument registers are nearly
+ used up. Seven doubles leave one floating-point argument register on
+ RISC-V and LoongArch, so the complex value has to move to integer
+ registers as a whole. Five ints leave an odd number of GPRs on 32-bit
+ PowerPC, where a two-word complex skips to the next even register pair
+ and a larger one goes to the stack, followed by every later argument.
+ Eight doubles and eight ints push the complex value onto the stack on
+ every target. */
+
+typedef _Complex T_C_TYPE C;
+
+static C
+fn_d7 (double d1, double d2, double d3, double d4, double d5, double d6,
+ double d7, C c, int k)
+{
+ return c * k + (d1 + d2 + d3 + d4 + d5 + d6 + d7);
+}
+
+static C
+fn_i5 (int i1, int i2, int i3, int i4, int i5, C c, int k)
+{
+ return c * k + (i1 + i2 + i3 + i4 + i5);
+}
+
+static C
+fn_d8i8 (double d1, double d2, double d3, double d4, double d5, double d6,
+ double d7, double d8, int i1, int i2, int i3, int i4, int i5, int i6,
+ int i7, int i8, C c, int k)
+{
+ return c * k + (d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8
+ + i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8);
+}
+
+/* SHAPE[0] doubles, SHAPE[1] ints, then the complex value and an int. */
+static void
+cls_fn (ffi_cif *cif __UNUSED__, void *resp, void **args, void *userdata)
+{
+ const int *shape = (const int *) userdata;
+ T_C_TYPE s = 0;
+ int i, n = 0;
+
+ for (i = 0; i < shape[0]; i++)
+ s += *(double *) args[n++];
+ for (i = 0; i < shape[1]; i++)
+ s += *(int *) args[n++];
+ *(C *) resp = *(C *) args[n] * *(int *) args[n + 1] + s;
+}
+
+static void
+check (const char *name, C got, C want)
+{
+ printf ("%s: %.3f,%.3fi (want %.3f,%.3fi)\n", name,
+ T_CONV creal (got), T_CONV cimag (got),
+ T_CONV creal (want), T_CONV cimag (want));
+ CHECK (creal (got) == creal (want));
+ CHECK (cimag (got) == cimag (want));
+}
+
+static void
+prep (ffi_cif *cif, ffi_type **types, void **values, int nd, int ni,
+ double *d, int *i, C *c, int *k)
+{
+ int j, n = 0;
+
+ for (j = 0; j < nd; j++, n++)
+ {
+ types[n] = &ffi_type_double;
+ values[n] = &d[j];
+ }
+ for (j = 0; j < ni; j++, n++)
+ {
+ types[n] = &ffi_type_sint;
+ values[n] = &i[j];
+ }
+ types[n] = &T_FFI_TYPE;
+ values[n++] = c;
+ types[n] = &ffi_type_sint;
+ values[n++] = k;
+ CHECK (ffi_prep_cif (cif, FFI_DEFAULT_ABI, n, &T_FFI_TYPE, types) == FFI_OK);
+}
+
+int
+main (void)
+{
+ static const int shape_d7[2] = { 7, 0 };
+ static const int shape_i5[2] = { 0, 5 };
+ static const int shape_d8i8[2] = { 8, 8 };
+ double d[8] = { 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5 };
+ int i[8] = { 10, 20, 30, 40, 50, 60, 70, 80 };
+ C c = 1.25 + 2.5 * I;
+ int k = 77;
+ ffi_type *types[18];
+ void *values[18];
+ ffi_cif cif;
+ ffi_closure *pcl;
+ void *code;
+ C r;
+
+ pcl = ffi_closure_alloc (sizeof (ffi_closure), &code);
+ CHECK (pcl != NULL);
+
+ prep (&cif, types, values, 7, 0, d, i, &c, &k);
+ ffi_call (&cif, FFI_FN (fn_d7), &r, values);
+ check ("call d7", r, fn_d7 (d[0], d[1], d[2], d[3], d[4], d[5], d[6], c, k));
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_fn, (void *) shape_d7, code)
+ == FFI_OK);
+ r = ((C (*)(double, double, double, double, double, double, double, C,
+ int)) code) (d[0], d[1], d[2], d[3], d[4], d[5], d[6], c, k);
+ check ("closure d7", r,
+ fn_d7 (d[0], d[1], d[2], d[3], d[4], d[5], d[6], c, k));
+
+ prep (&cif, types, values, 0, 5, d, i, &c, &k);
+ ffi_call (&cif, FFI_FN (fn_i5), &r, values);
+ check ("call i5", r, fn_i5 (i[0], i[1], i[2], i[3], i[4], c, k));
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_fn, (void *) shape_i5, code)
+ == FFI_OK);
+ r = ((C (*)(int, int, int, int, int, C, int)) code)
+ (i[0], i[1], i[2], i[3], i[4], c, k);
+ check ("closure i5", r, fn_i5 (i[0], i[1], i[2], i[3], i[4], c, k));
+
+ prep (&cif, types, values, 8, 8, d, i, &c, &k);
+ ffi_call (&cif, FFI_FN (fn_d8i8), &r, values);
+ check ("call d8i8", r,
+ fn_d8i8 (d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
+ i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], c, k));
+ CHECK (ffi_prep_closure_loc (pcl, &cif, cls_fn, (void *) shape_d8i8, code)
+ == FFI_OK);
+ r = ((C (*)(double, double, double, double, double, double, double, double,
+ int, int, int, int, int, int, int, int, C, int)) code)
+ (d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
+ i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], c, k);
+ check ("closure d8i8", r,
+ fn_d8i8 (d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
+ i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], c, k));
+
+ ffi_closure_free (pcl);
+ exit (0);
+}
diff --git a/deps/libffi/testsuite/libffi.complex/complex_regs_double.c b/deps/libffi/testsuite/libffi.complex/complex_regs_double.c
new file mode 100644
index 00000000000..6c1cb7e025a
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.complex/complex_regs_double.c
@@ -0,0 +1,11 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check complex arguments after the argument registers run low.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run { xfail mips64*-*-* } } */
+/* XFAIL: mips N64 complex-argument ABI bug; the little-endian variant
+ fails the complex-double case too. See libffi issue #1071. */
+
+#include "complex_defs_double.inc"
+#include "complex_regs.inc"
diff --git a/deps/libffi/testsuite/libffi.complex/complex_regs_float.c b/deps/libffi/testsuite/libffi.complex/complex_regs_float.c
new file mode 100644
index 00000000000..a7015c41d21
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.complex/complex_regs_float.c
@@ -0,0 +1,11 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check complex arguments after the argument registers run low.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run { xfail mips64*-*-* } } */
+/* XFAIL: mips N64 ABI bug in complex-float/longdouble args and fp-struct
+ returns; see libffi issue #1071. */
+
+#include "complex_defs_float.inc"
+#include "complex_regs.inc"
diff --git a/deps/libffi/testsuite/libffi.complex/complex_regs_longdouble.c b/deps/libffi/testsuite/libffi.complex/complex_regs_longdouble.c
new file mode 100644
index 00000000000..b5e3082c7e9
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.complex/complex_regs_longdouble.c
@@ -0,0 +1,11 @@
+/* Area: ffi_call, closure_call
+ Purpose: Check complex arguments after the argument registers run low.
+ Limitations: none.
+ PR: none. */
+
+/* { dg-do run { xfail mips64*-*-* } } */
+/* XFAIL: mips N64 ABI bug in complex-float/longdouble args and fp-struct
+ returns; see libffi issue #1071. */
+
+#include "complex_defs_longdouble.inc"
+#include "complex_regs.inc"
diff --git a/deps/libffi/testsuite/libffi.configure/libdir.sh b/deps/libffi/testsuite/libffi.configure/libdir.sh
new file mode 100755
index 00000000000..0232593539f
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.configure/libdir.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+set -eu
+
+srcdir=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)
+test_root=$(mktemp -d "${TMPDIR:-/tmp}/libffi-libdir.XXXXXX")
+trap 'rm -rf "$test_root"' EXIT HUP INT TERM
+
+cat > "$test_root/cc" <<'EOF'
+#!/bin/sh
+for arg do
+ if test "$arg" = -print-multi-os-directory; then
+ echo ../lib64
+ exit 0
+ fi
+done
+exec gcc "$@"
+EOF
+chmod +x "$test_root/cc"
+
+mkdir "$test_root/default" "$test_root/disabled"
+
+(
+ cd "$test_root/default"
+ CC="$test_root/cc" "$srcdir/configure" --disable-builddir >/dev/null
+)
+grep -Fqx 'toolexeclibdir = ${libdir}/../lib64' \
+ "$test_root/default/Makefile"
+
+(
+ cd "$test_root/disabled"
+ CC="$test_root/cc" "$srcdir/configure" --disable-builddir \
+ --disable-multi-os-directory >/dev/null
+)
+grep -Fqx 'toolexeclibdir = ${libdir}' "$test_root/disabled/Makefile"
+
+check_explicit_libdir()
+{
+ name=$1
+ shift
+ builddir="$test_root/$name"
+ mkdir "$builddir"
+ (
+ cd "$builddir"
+ CC="$test_root/cc" "$srcdir/configure" --disable-builddir "$@" \
+ >/dev/null
+ )
+ grep -Fqx 'libdir = /test/custom lib' "$builddir/Makefile"
+ grep -Fqx 'toolexeclibdir = ${libdir}' "$builddir/Makefile"
+}
+
+# Keep this list synchronized with the libdir spellings accepted by the
+# generated configure option parser.
+check_explicit_libdir long-equals '--libdir=/test/custom lib'
+check_explicit_libdir long-separate --libdir '/test/custom lib'
+check_explicit_libdir libdi-equals '--libdi=/test/custom lib'
+check_explicit_libdir libdi-separate --libdi '/test/custom lib'
+check_explicit_libdir libd-equals '--libd=/test/custom lib'
+check_explicit_libdir libd-separate --libd '/test/custom lib'
+check_explicit_libdir single-equals '-libdir=/test/custom lib'
+check_explicit_libdir single-separate -libdir '/test/custom lib'
diff --git a/deps/libffi/testsuite/libffi.jspi/cls_jspi.c b/deps/libffi/testsuite/libffi.jspi/cls_jspi.c
new file mode 100644
index 00000000000..518297dfe9f
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.jspi/cls_jspi.c
@@ -0,0 +1,175 @@
+/* Area: closure_call
+ Purpose: Check that a closure handler can suspend with JSPI.
+ Limitations: Emscripten only, needs -sJSPI and a JSPI-enabled engine.
+ PR: none.
+ Originator: Hood Chatham 20260912 */
+
+/* { dg-do run { target wasm*-*-* } } */
+#include "ffitest.h"
+#include <emscripten.h>
+
+/* JSPI suspends the whole wasm stack while the promise is pending. That
+ only works if every frame between the JSPI entry point (main) and the
+ suspending import is a wasm frame, so the closure trampoline must not
+ be a JS function. Exercise each kind of trampoline epilogue: void,
+ return-by-pointer (struct), i32, i64, f32, f64. */
+
+EM_ASYNC_JS(int, async_add_one, (int x), {
+ await new Promise(resolve => setTimeout(resolve, 1));
+ return x + 1;
+});
+
+static int n_calls = 0;
+
+typedef struct { double a; int b; long long c; } big_t;
+
+static void int_fn(ffi_cif *cif __UNUSED__, void *ret, void **args,
+ void *userdata)
+{
+ int x = *(int *)args[0];
+ short y = *(short *)args[1];
+ n_calls++;
+ *(ffi_arg *)ret = async_add_one(x) * 10 + y + *(int *)userdata;
+}
+
+static void double_fn(ffi_cif *cif __UNUSED__, void *ret, void **args,
+ void *userdata __UNUSED__)
+{
+ n_calls++;
+ *(double *)ret = async_add_one((int)*(double *)args[0]) + 0.5;
+}
+
+static void float_fn(ffi_cif *cif __UNUSED__, void *ret, void **args,
+ void *userdata __UNUSED__)
+{
+ n_calls++;
+ *(float *)ret = async_add_one((int)*(float *)args[0]) + 0.25f;
+}
+
+static void i64_fn(ffi_cif *cif __UNUSED__, void *ret, void **args,
+ void *userdata __UNUSED__)
+{
+ long long x = *(long long *)args[0];
+ n_calls++;
+ *(long long *)ret = ((long long)async_add_one((int)x) << 40) | 7;
+}
+
+static void struct_fn(ffi_cif *cif __UNUSED__, void *ret, void **args,
+ void *userdata __UNUSED__)
+{
+ big_t in = *(big_t *)args[0];
+ big_t *out = ret;
+ n_calls++;
+ out->a = in.a * 2;
+ out->b = async_add_one(in.b);
+ out->c = in.c + 1;
+}
+
+static void void_fn(ffi_cif *cif __UNUSED__, void *ret __UNUSED__,
+ void **args, void *userdata)
+{
+ n_calls++;
+ *(int *)userdata = async_add_one(*(int *)args[0]);
+}
+
+int main (void)
+{
+ ffi_cif cif;
+ void *code;
+ ffi_closure *pcl;
+ int ud = 1000;
+
+ /* int f(int, short) */
+ {
+ ffi_type *cl_arg_types[] = { &ffi_type_sint, &ffi_type_sshort };
+ int (*f)(int, short);
+ pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2,
+ &ffi_type_sint, cl_arg_types) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, int_fn, &ud, code) == FFI_OK);
+ f = code;
+ CHECK(f(4, 3) == 50 + 3 + 1000);
+ CHECK(f(-2, -1) == -10 - 1 + 1000);
+ /* Nested: a suspending closure call inside the arguments of another. */
+ CHECK(f(f(0, 0) - 1000, 1) == 110 + 1 + 1000);
+ ffi_closure_free(pcl);
+ }
+
+ /* double f(double) */
+ {
+ ffi_type *cl_arg_types[] = { &ffi_type_double };
+ double (*f)(double);
+ pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
+ &ffi_type_double, cl_arg_types) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, double_fn, NULL, code) == FFI_OK);
+ f = code;
+ CHECK(f(2.0) == 3.5);
+ ffi_closure_free(pcl);
+ }
+
+ /* float f(float) */
+ {
+ ffi_type *cl_arg_types[] = { &ffi_type_float };
+ float (*f)(float);
+ pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
+ &ffi_type_float, cl_arg_types) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, float_fn, NULL, code) == FFI_OK);
+ f = code;
+ CHECK(f(2.0f) == 3.25f);
+ ffi_closure_free(pcl);
+ }
+
+ /* long long f(long long) */
+ {
+ ffi_type *cl_arg_types[] = { &ffi_type_sint64 };
+ long long (*f)(long long);
+ pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
+ &ffi_type_sint64, cl_arg_types) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, i64_fn, NULL, code) == FFI_OK);
+ f = code;
+ CHECK(f(5) == ((6LL << 40) | 7));
+ ffi_closure_free(pcl);
+ }
+
+ /* big_t f(big_t): returned through a pointer argument. */
+ {
+ ffi_type *elements[] = { &ffi_type_double, &ffi_type_sint,
+ &ffi_type_sint64, NULL };
+ ffi_type big = { 0, 0, FFI_TYPE_STRUCT, elements };
+ ffi_type *cl_arg_types[] = { &big };
+ big_t (*f)(big_t);
+ big_t in = { 1.5, 10, 1LL << 33 };
+ big_t out;
+ pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &big, cl_arg_types) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, struct_fn, NULL, code) == FFI_OK);
+ f = code;
+ out = f(in);
+ CHECK(out.a == 3.0);
+ CHECK(out.b == 11);
+ CHECK(out.c == (1LL << 33) + 1);
+ ffi_closure_free(pcl);
+ }
+
+ /* void f(int) */
+ {
+ ffi_type *cl_arg_types[] = { &ffi_type_sint };
+ void (*f)(int);
+ int result = 0;
+ pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
+ &ffi_type_void, cl_arg_types) == FFI_OK);
+ CHECK(ffi_prep_closure_loc(pcl, &cif, void_fn, &result, code) == FFI_OK);
+ f = code;
+ f(41);
+ CHECK(result == 42);
+ ffi_closure_free(pcl);
+ }
+
+ printf("%d closure calls\n", n_calls);
+ /* { dg-output "9 closure calls" } */
+ exit(0);
+}
diff --git a/deps/libffi/testsuite/libffi.jspi/ffitest.h b/deps/libffi/testsuite/libffi.jspi/ffitest.h
new file mode 100644
index 00000000000..d27d362d6a6
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.jspi/ffitest.h
@@ -0,0 +1 @@
+#include "../libffi.call/ffitest.h"
diff --git a/deps/libffi/testsuite/libffi.jspi/jspi.exp b/deps/libffi/testsuite/libffi.jspi/jspi.exp
new file mode 100644
index 00000000000..f298e98c153
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.jspi/jspi.exp
@@ -0,0 +1,42 @@
+# Copyright (C) 2003, 2006, 2009, 2010, 2014, 2019 Free Software Foundation, Inc.
+# Copyright (C) 2019 Anthony Green
+
+# This program 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
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Tests for Emscripten's JavaScript Promise Integration (JSPI). These
+# build with -sJSPI and need a JS engine with JSPI enabled to run.
+
+dg-init
+libffi-init
+
+global srcdir subdir
+
+set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/*.c]]
+
+# JSPI only exists on Emscripten. emcc warns that -sJSPI is experimental,
+# which would otherwise count as an excess error.
+if { [istarget "wasm*-*-*"] } {
+ run-many-tests $tlist "-sJSPI -Wno-experimental"
+} else {
+ foreach test $tlist {
+ unsupported "$test"
+ }
+}
+
+dg-finish
+
+# Local Variables:
+# tcl-indent-level:4
+# End:
diff --git a/deps/libffi/testsuite/libffi.threads/tsan.c b/deps/libffi/testsuite/libffi.threads/tsan.c
index 168b2f84ba8..52b5204ce17 100644
--- a/deps/libffi/testsuite/libffi.threads/tsan.c
+++ b/deps/libffi/testsuite/libffi.threads/tsan.c
@@ -8,6 +8,8 @@
#define NUM_THREADS 20
+static char thread_failure;
+
#if defined(_POSIX_BARRIERS) && _POSIX_BARRIERS > 0
pthread_barrier_t barrier;
#endif
@@ -30,14 +32,14 @@ void *thread_func(void *arg) {
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_float, args) != FFI_OK) {
fprintf(stderr, "ffi_prep_cif failed\n");
- return NULL;
+ return &thread_failure;
}
ffi_closure *closure = ffi_closure_alloc(sizeof(ffi_closure), (void **)&arg);
if (ffi_prep_closure_loc(closure, &cif, callback, NULL, arg) != FFI_OK) {
fprintf(stderr, "ffi_prep_closure_loc failed\n");
- return NULL;
+ return &thread_failure;
}
callback_fn fn = (callback_fn)arg;
@@ -62,7 +64,13 @@ int main() {
}
for (int i = 0; i < NUM_THREADS; ++i) {
- pthread_join(threads[i], NULL);
+ void *result;
+ if (pthread_join(threads[i], &result) != 0) {
+ fprintf(stderr, "pthread_join failed\n");
+ exit(EXIT_FAILURE);
+ }
+ if (result == &thread_failure)
+ exit(EXIT_FAILURE);
}
#if defined(_POSIX_BARRIERS) && _POSIX_BARRIERS > 0
diff --git a/deps/libffi/testsuite/libffi.vector/vector_float32x4.c b/deps/libffi/testsuite/libffi.vector/vector_float32x4.c
index 971814aaf66..c7b02667117 100644
--- a/deps/libffi/testsuite/libffi.vector/vector_float32x4.c
+++ b/deps/libffi/testsuite/libffi.vector/vector_float32x4.c
@@ -27,7 +27,8 @@ main (void)
void *values[2];
f32x4 a = { 1, 2, 3, 4 };
f32x4 b = { 10, 20, 30, 40 };
- f32x4 r, ref;
+ f32x4 r, rp, ref;
+ ffi_call_plan *plan;
int i;
make_vector_type (&vec_type, vec_elems, &ffi_type_float, 4);
@@ -43,11 +44,17 @@ main (void)
ffi_call (&cif, FFI_FN (add_f32x4), &r, values);
+ plan = ffi_call_plan_alloc (&cif);
+ CHECK (plan != NULL);
+ ffi_call_plan_invoke (plan, FFI_FN (add_f32x4), &rp, values);
+ ffi_call_plan_free (plan);
+
ref = add_f32x4 (a, b);
for (i = 0; i < 4; i++)
{
printf ("r[%d] = %g (want %g)\n", i, (double) r[i], (double) ref[i]);
CHECK (r[i] == ref[i]);
+ CHECK (rp[i] == ref[i]);
}
exit (0);
diff --git a/deps/libffi/testsuite/libffi.vector/vector_unsupported_abi.c b/deps/libffi/testsuite/libffi.vector/vector_unsupported_abi.c
new file mode 100644
index 00000000000..d6e17910e15
--- /dev/null
+++ b/deps/libffi/testsuite/libffi.vector/vector_unsupported_abi.c
@@ -0,0 +1,105 @@
+/* Area: ffi_prep_cif
+ Purpose: On x86-64 System V, reject vector types whose calling
+ convention is undefined (so GCC and Clang disagree) with
+ FFI_BAD_TYPEDEF, while still accepting the shapes both
+ compilers agree on. Rejecting <1 x double> closes a
+ type-confusion that turned a caller's integer argument into
+ the store address of the return value (GHSA-5pc3-hr6f-q3mm).
+ Limitations: The classification is x86-64 System V specific, so the
+ assertions only run there; the test passes trivially on
+ other targets and ABIs.
+ PR: GHSA-5pc3-hr6f-q3mm.
+ Originator: libffi vector support. */
+
+/* { dg-do run } */
+
+#include "vector.h"
+
+#if defined(__x86_64__) && !defined(_WIN64) && !defined(__CYGWIN__)
+
+/* Expect ffi_prep_cif for RET f(ARG) to return STATUS. Either type may be
+ NULL to mean "no argument" / void return as appropriate. */
+static void
+check_cif (ffi_type *ret, ffi_type *arg, ffi_status expected)
+{
+ ffi_cif cif;
+ ffi_type *args[1];
+ unsigned nargs = 0;
+
+ if (arg != NULL)
+ {
+ args[0] = arg;
+ nargs = 1;
+ }
+ CHECK (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, nargs,
+ ret ? ret : &ffi_type_void, args) == expected);
+}
+
+int
+main (void)
+{
+ ffi_type vt, vt2;
+ ffi_type *elems[17], *elems2[17];
+ ffi_type *selems[2];
+ ffi_type st;
+
+ /* --- Shapes with an undefined ABI: must be rejected. --- */
+
+ /* <1 x double> (8 bytes): GCC returns/passes it in memory, Clang in %xmm0.
+ This is the one that produced the out-of-bounds write. */
+ make_vector_type (&vt, elems, &ffi_type_double, 1);
+ check_cif (&vt, NULL, FFI_BAD_TYPEDEF); /* as return value */
+ check_cif (NULL, &vt, FFI_BAD_TYPEDEF); /* as argument */
+
+ /* <1 x float> (4 bytes): GCC memory, Clang INTEGER (%eax). */
+ make_vector_type (&vt, elems, &ffi_type_float, 1);
+ check_cif (NULL, &vt, FFI_BAD_TYPEDEF);
+
+ /* <4 x uint8> (4 bytes): sub-8-byte, unspecified. */
+ make_vector_type (&vt, elems, &ffi_type_uint8, 4);
+ check_cif (NULL, &vt, FFI_BAD_TYPEDEF);
+
+ /* A struct that contains <1 x double> must be rejected recursively. */
+ make_vector_type (&vt, elems, &ffi_type_double, 1);
+ selems[0] = &vt;
+ selems[1] = NULL;
+ st.size = 0;
+ st.alignment = 0;
+ st.type = FFI_TYPE_STRUCT;
+ st.elements = selems;
+ check_cif (&st, NULL, FFI_BAD_TYPEDEF);
+ check_cif (NULL, &st, FFI_BAD_TYPEDEF);
+
+ /* --- Shapes both compilers agree on: must still be accepted. --- */
+
+ /* <2 x float> (8 bytes, not <1 x double>) -> SSE on GCC and Clang. */
+ make_vector_type (&vt, elems, &ffi_type_float, 2);
+ check_cif (&vt, NULL, FFI_OK);
+ check_cif (NULL, &vt, FFI_OK);
+
+ /* <8 x uint8> (8 bytes) -> SSE on both. */
+ make_vector_type (&vt, elems, &ffi_type_uint8, 8);
+ check_cif (NULL, &vt, FFI_OK);
+
+ /* <4 x float> (16 bytes) -> SSE + SSEUP on both. */
+ make_vector_type (&vt2, elems2, &ffi_type_float, 4);
+ check_cif (&vt2, NULL, FFI_OK);
+ check_cif (NULL, &vt2, FFI_OK);
+
+ /* <2 x double> (16 bytes) -> SSE + SSEUP on both. */
+ make_vector_type (&vt2, elems2, &ffi_type_double, 2);
+ check_cif (&vt2, NULL, FFI_OK);
+
+ printf ("unsupported vector abi ok\n");
+ exit (0);
+}
+
+#else
+
+int
+main (void)
+{
+ exit (0);
+}
+
+#endif /* x86-64 System V */