* [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template
@ 2026-01-05 12:31 Romain Gantois
2026-01-08 16:03 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Romain Gantois @ 2026-01-05 12:31 UTC (permalink / raw)
To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba
Cc: Thomas Petazzoni, linux-pm, linux-kernel, Romain Gantois
There are two issues with the current pkg-config template.
Firstly, the -lthermal linker flag is missing.
Secondly, the libnl3 include directory compiler flag references "include"
instead of "includedir", which leads to an unexpanded variable when
pkg-config is called. Moreover, it isn't necessary to add this flag here,
since the "Requires" field will cause pkg-config do add it automatically.
The same logic applies to the LDFLAGS for libnl3.
Add the missing -lthermal flag and remove unnecessary and incorrect libnl3
flags.
Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library")
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
---
Changes in v2:
- Removed unnecessary libnl3 flags.
- Added "Fixes" tag.
- Link to v1: https://lore.kernel.org/r/20251226-libthermal-pkgconfig-v1-1-3406de5ca8ea@bootlin.com
---
tools/lib/thermal/libthermal.pc.template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/thermal/libthermal.pc.template b/tools/lib/thermal/libthermal.pc.template
index ac24d0ab17f5..b984c5ecd20a 100644
--- a/tools/lib/thermal/libthermal.pc.template
+++ b/tools/lib/thermal/libthermal.pc.template
@@ -8,5 +8,5 @@ Name: libthermal
Description: thermal library
Requires: libnl-3.0 libnl-genl-3.0
Version: @VERSION@
-Libs: -L${libdir} -lnl-genl-3 -lnl-3
-Cflags: -I${includedir} -I${include}/libnl3
+Libs: -L${libdir} -lthermal
+Cflags: -I${includedir}
---
base-commit: d113735421da322ea144c9778c433de6ff6bc57b
change-id: 20251226-libthermal-pkgconfig-23259b10478a
Best regards,
--
Romain Gantois <romain.gantois@bootlin.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template
2026-01-05 12:31 [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template Romain Gantois
@ 2026-01-08 16:03 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2026-01-08 16:03 UTC (permalink / raw)
To: Romain Gantois
Cc: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
Thomas Petazzoni, linux-pm, linux-kernel
On Mon, Jan 5, 2026 at 1:31 PM Romain Gantois
<romain.gantois@bootlin.com> wrote:
>
> There are two issues with the current pkg-config template.
>
> Firstly, the -lthermal linker flag is missing.
>
> Secondly, the libnl3 include directory compiler flag references "include"
> instead of "includedir", which leads to an unexpanded variable when
> pkg-config is called. Moreover, it isn't necessary to add this flag here,
> since the "Requires" field will cause pkg-config do add it automatically.
> The same logic applies to the LDFLAGS for libnl3.
>
> Add the missing -lthermal flag and remove unnecessary and incorrect libnl3
> flags.
>
> Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library")
> Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
> ---
> Changes in v2:
> - Removed unnecessary libnl3 flags.
> - Added "Fixes" tag.
> - Link to v1: https://lore.kernel.org/r/20251226-libthermal-pkgconfig-v1-1-3406de5ca8ea@bootlin.com
> ---
> tools/lib/thermal/libthermal.pc.template | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/thermal/libthermal.pc.template b/tools/lib/thermal/libthermal.pc.template
> index ac24d0ab17f5..b984c5ecd20a 100644
> --- a/tools/lib/thermal/libthermal.pc.template
> +++ b/tools/lib/thermal/libthermal.pc.template
> @@ -8,5 +8,5 @@ Name: libthermal
> Description: thermal library
> Requires: libnl-3.0 libnl-genl-3.0
> Version: @VERSION@
> -Libs: -L${libdir} -lnl-genl-3 -lnl-3
> -Cflags: -I${includedir} -I${include}/libnl3
> +Libs: -L${libdir} -lthermal
> +Cflags: -I${includedir}
>
> ---
Applied as 6.20 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-08 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-05 12:31 [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template Romain Gantois
2026-01-08 16:03 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®