[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260105-libthermal-pkgconfig-v2-1-e086bdeddb41@bootlin.com>
Date: Mon, 05 Jan 2026 13:31:12 +0100
From: Romain Gantois <romain.gantois@...tlin.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Romain Gantois <romain.gantois@...tlin.com>
Subject: [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in
pkg-config template
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@...tlin.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@...tlin.com>
Powered by blists - more mailing lists