* [PATCH] libfdt: pass sources as keyword argument to library()
@ 2026-09-08 10:07 Héctor Orón Martínez
2026-09-08 11:21 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Héctor Orón Martínez @ 2026-09-08 10:07 UTC (permalink / raw)
To: Devicetree Compiler
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>
---
libfdt/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libfdt/meson.build b/libfdt/meson.build
index 68d4c1d..6c41f9f 100644
--- a/libfdt/meson.build
+++ b/libfdt/meson.build
@@ -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,
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] libfdt: pass sources as keyword argument to library()
2026-09-08 10:07 [PATCH] libfdt: pass sources as keyword argument to library() Héctor Orón Martínez
@ 2026-09-08 11:21 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2026-09-08 11:21 UTC (permalink / raw)
To: Héctor Orón Martínez; +Cc: Devicetree Compiler
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
On Tue, Sep 08, 2026 at 12:07:27PM +0200, Héctor Orón Martínez wrote:
> 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>
Applied, thanks.
>
> ---
> libfdt/meson.build | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libfdt/meson.build b/libfdt/meson.build
> index 68d4c1d..6c41f9f 100644
> --- a/libfdt/meson.build
> +++ b/libfdt/meson.build
> @@ -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,
> --
> 2.55.0
>
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-08 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 10:07 [PATCH] libfdt: pass sources as keyword argument to library() Héctor Orón Martínez
2026-09-08 11:21 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox