tools: lib: thermal: Correct CFLAGS and LDFLAGS in pkg-config template
PATCH v2 1/1 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.
---
Changes in v2:
- Removed unnecessary libnl3 flags.
- Added "Fixes" tag.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- tools/lib/thermal/libthermal.pc.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/thermal/libthermal.pc.template +2 -2
@@ -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,
Signature · 1 line
Romain Gantois <[email protected]>
Quoted 30 lines · 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 <[email protected]>---
Changes in v2:
- Removed unnecessary libnl3 flags.
- Added "Fixes" tag.
- Link to v1: https://lore.kernel.org/r/[email protected]--- tools/lib/thermal/libthermal.pc.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/lib/thermal/libthermal.pc.template +0
-0
tools/lib/thermal/libthermal.pc.template Name: libthermal
Quoted 9 lines
tools/lib/thermal/libthermal.pc.template +2
-3@@ -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!