From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Romain Gantois <romain.gantois@bootlin.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template
Date: Fri, 26 Dec 2025 10:09:46 +0100 [thread overview]
Message-ID: <20251226100946.14ad75d1@windsurf> (raw)
In-Reply-To: <20251226-libthermal-pkgconfig-v1-1-3406de5ca8ea@bootlin.com>
Hello Romain,
On Fri, 26 Dec 2025 08:54:32 +0100
Romain Gantois <romain.gantois@bootlin.com> wrote:
> diff --git a/tools/lib/thermal/libthermal.pc.template b/tools/lib/thermal/libthermal.pc.template
> index ac24d0ab17f5..3b8a24d0a8b8 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} -lnl-genl-3 -lnl-3 -lthermal
> +Cflags: -I${includedir} -I${includedir}/libnl3
Actually -lnl-genl-3 -lnl-3 in Libs and -I${includedir}/libnl3 in
Cflags can be removed as well, because the Requires: field contains
libnl-3.0 and libnl-genl-3.0, which will cause pkg-config to
recursively query the libs/cflags for libnl-3.0 and libnl-genl-3.0.
From https://people.freedesktop.org/~dbn/pkg-config-guide.html:
=====================================================================
Cflags: The compiler flags specific to this package and any required
libraries that don't support pkg-config. If the required libraries
support pkg-config, they should be added to Requires or
Requires.private.
Libs: The link flags specific to this package and any required
libraries that don't support pkg-config. The same rule as Cflags
applies here.
=====================================================================
Since libnl-3.0 and libnl-genl-3.0 support pkg-config (otherwise they
wouldn't be listed in Requires:), then those flags should be dropped
from Libs: and Cflags:.
Also, since this is a fix, probably this commit requires a Fixes: tag.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
next prev parent reply other threads:[~2025-12-26 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 7:54 [PATCH] tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template Romain Gantois
2025-12-26 9:09 ` Thomas Petazzoni [this message]
2026-01-20 19:38 ` Daniel Lezcano
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=20251226100946.14ad75d1@windsurf \
--to=thomas.petazzoni@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=romain.gantois@bootlin.com \
--cc=rui.zhang@intel.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