[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0i_s2AQ5_Uze3SRrkMWvOOHa77wiE+iD_uaJ1HeYHWNrA@mail.gmail.com>
Date: Thu, 8 Jan 2026 17:03:02 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tools: lib: thermal: Correct CFLAGS and LDFLAGS in
pkg-config template
On Mon, Jan 5, 2026 at 1:31 PM Romain Gantois
<romain.gantois@...tlin.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@...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}
>
> ---
Applied as 6.20 material, thanks!
Powered by blists - more mailing lists