[Regression in v8.2.0-rc0] [macOS] configure: `ld: unknown options: --version ` Description of problem: On macOS, `./configure` fails since v8.2.0-rc0 due to `ld: unknown options: --version` Steps to reproduce: ```console $ ./configure Using './build' as the directory for build output python determined to be '/usr/local/bin/python3' python version: Python 3.11.6 mkvenv: Creating non-isolated virtual environment at 'pyvenv' mkvenv: checking for meson>=0.63.0 mkvenv: installing meson==0.63.3 mkvenv: checking for sphinx>=1.6 mkvenv: checking for sphinx_rtd_theme>=0.5 'sphinx==5.3.0' not found: • Python package 'sphinx' was not found nor installed. • mkvenv was configured to operate offline and did not check PyPI. Sphinx not found/usable, disabling docs. Disabling PIE due to missing toolchain support The Meson build system Version: 0.63.3 Source dir: /Users/suda/gopath/src/gitlab.com/qemu-project/qemu Build dir: /Users/suda/gopath/src/gitlab.com/qemu-project/qemu/build Build type: native build Project name: qemu Project version: 8.1.90 ../meson.build:1:0: ERROR: Unable to detect linker for compiler `cc -m64 -mcx16 -Wl,--version` stdout: stderr: ld: unknown options: --version clang: error: linker command failed with exit code 1 (use -v to see invocation) A full log can be found at /Users/suda/gopath/src/gitlab.com/qemu-project/qemu/build/meson-logs/meson-log.txt ERROR: meson setup failed ``` Additional information: ```console $ cc -m64 -mcx16 -Wl,--version ld: unknown options: --version clang: error: linker command failed with exit code 1 (use -v to see invocation) $ cc --version Apple clang version 15.0.0 (clang-1500.0.40.1) Target: x86_64-apple-darwin23.1.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bi $ ld --version ld: unknown option: --version $ ld -v @(#)PROGRAM:ld PROJECT:dyld-1015.7 BUILD 16:59:22 Oct 1 2023 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em will use ld-classic for: armv6 armv7 armv7s arm64_32 i386 armv6m armv7k armv7m armv7em LTO support using: LLVM version 15.0.0 (static support for 29, runtime is 29) TAPI support using: Apple TAPI version 15.0.0 (tapi-1500.0.12.3) Library search paths: Framework search paths: ```