From: Romain Gantois <romain.gantois@bootlin.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Romain Gantois <romain.gantois@bootlin.com>
Subject: [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template
Date: Mon, 05 Jan 2026 13:31:12 +0100 [thread overview]
Message-ID: <20260105-libthermal-pkgconfig-v2-1-e086bdeddb41@bootlin.com> (raw)
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>
next reply other threads:[~2026-01-05 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 12:31 Romain Gantois [this message]
2026-01-08 16:03 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260105-libthermal-pkgconfig-v2-1-e086bdeddb41@bootlin.com \
--to=romain.gantois@bootlin.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®