diff mbox series

[meta-oe] intel-speed-select: inherit pkgconfig

Message ID 20260909194126.172815-1-alperyasinak1@gmail.com
State Under Review
Headers show
Series [meta-oe] intel-speed-select: inherit pkgconfig | expand

Commit Message

Alper Ak Sept. 9, 2026, 7:41 p.m. UTC
do_compile fails with:

  cc1: error: include location "/usr/include/libnl3" is unsafe for
  cross-compilation [-Werror=poison-system-directories]

The kernel tools Makefile gets the libnl flags from pkg-config. The
recipe does not inherit pkgconfig, so there is no PKG_CONFIG_SYSROOT_DIR
and the host pkg-config answers with the host include path.

Drop the manual CFLAGS entry, pkg-config now gives the same path.

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
 .../recipes-kernel/intel-speed-select/intel-speed-select.bb    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb b/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb
index 3b5866180d..cecf310189 100644
--- a/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb
+++ b/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb
@@ -6,7 +6,7 @@  for optimized total cost of ownership."
 
 LICENSE = "GPL-2.0-only"
 
-inherit kernelsrc
+inherit kernelsrc pkgconfig
 
 COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
 COMPATIBLE_HOST:libc-musl = 'null'
@@ -17,7 +17,6 @@  do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
 
 B = "${WORKDIR}/${BPN}-${PV}"
 
-CFLAGS += "-I${STAGING_INCDIR}/libnl3"
 EXTRA_OEMAKE = "-C ${S}/tools/power/x86/intel-speed-select O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"