libfdt: pass sources as keyword argument to library()
Some checks are pending
Build test / build-linux (make, alpine) (push) Waiting to run
Build test / build-linux (make, archlinux) (push) Waiting to run
Build test / build-linux (make, fedora) (push) Waiting to run
Build test / build-linux (make, ubuntu) (push) Waiting to run
Build test / build-linux (meson, alpine) (push) Waiting to run
Build test / build-linux (meson, archlinux) (push) Waiting to run
Build test / build-linux (meson, fedora) (push) Waiting to run
Build test / build-linux (meson, ubuntu) (push) Waiting to run
Build test / build-macos (make) (push) Waiting to run
Build test / build-macos (meson) (push) Waiting to run
Build test / mingw32 (push) Waiting to run
Build test / clang64 (push) Waiting to run
Build test / mingw64 (push) Waiting to run
Build test / ucrt64 (push) Waiting to run
Build test / FreeBSD 13.5 make build (push) Waiting to run
Build test / FreeBSD 14.3 make build (push) Waiting to run
Build test / FreeBSD 13.5 meson build (push) Waiting to run
Build test / FreeBSD 14.3 meson build (push) Waiting to run

Meson expects the source list for library() to be passed either as
positional arguments after the target name or via the 'sources:'
keyword. Using the implicit positional form can lead to malformed
linker commands on some toolchains, with spurious arguments such as
'libfdt' and '.' being treated as input files.

Explicitly pass the source list via 'sources: sources' and declare
the ABI version with 'soversion: '1'' to match the installed
libfdt.so.1 soname.

This fixes build failures where the linker reported:
  cannot find libfdt: file format not recognized
  cannot find .: file format not recognized

Signed-off-by: Héctor Orón Martínez <hector.oron@gmail.com>

Message-ID: <CAODfWeHQcjGn0CtweT4Q9Em6WC9cTmvfxhuQCgae4gdu5W9hSA@mail.gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Héctor Orón Martínez 2026-09-08 12:07:27 +02:00 • committed by David Gibson
parent 8c37c14c95
commit 7a1e017926

View file

@ -27,8 +27,10 @@ endif
link_args += version_script
libfdt = library(
'fdt', sources,
'fdt',
sources: sources,
version: meson.project_version(),
soversion: '1',
link_args: link_args,
link_depends: 'version.lds',
install: get_option('default_library') != 'static' or not wheel_only,