From nobody Wed Oct 1 21:17:04 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C4652DBF76 for ; Wed, 1 Oct 2025 11:41:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318872; cv=none; b=gMp3mrJgEZKYsZsCZk5+iEvFRQMo7AMXhBNmDKwRdKUoAEj9HFOpfGqgPRYLkhAveZLoxCFSxyUdfvPOlAsJ6OpEiOrAoGO3LquBjJ5hwtE8D4y1BAaDjT5Qz15IzItKJj3p8QQAzmkTs2twXEvV8Nr5ypXdAapAVxoh1UkdTt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318872; c=relaxed/simple; bh=ntLsFEiu5iqg45mHvg0i/VhGZFLZ11eccVxGS2wRk6U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oA+EfDxCDorTrTsGJJp5sL09ZynRUXey3Qi7kqKL2m7XuPPMfdTt0+uSBKDB7Ru4n9pCYtHxKKQzjnWWcfFlyS/Gip3XjALT0RDzDn6f2Woa8bg0S60sHY3IUGbSgk0F1v1p31vXrXPLas9ei2P1QxweaO++N3JgAYQ0ITcCwdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1v3vCb-0006lA-Tm; Wed, 01 Oct 2025 13:40:57 +0200 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v3vCa-001PBZ-2z; Wed, 01 Oct 2025 13:40:56 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1v3vCa-000000081FZ-3XfH; Wed, 01 Oct 2025 13:40:56 +0200 From: Sascha Hauer Date: Wed, 01 Oct 2025 13:40:55 +0200 Subject: [PATCH 1/3] tools: lib: thermal: use pkg-config to locate libnl3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251001-libthermal-install-v1-1-3071fd3f6612@pengutronix.de> References: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> In-Reply-To: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Sascha Hauer X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1759318856; l=1159; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=ntLsFEiu5iqg45mHvg0i/VhGZFLZ11eccVxGS2wRk6U=; b=SzzkiOTwpcf1TJ7BXhQTDka+ROR3fSi5YXOWWngvPBI91pzkGsr8WKaLwOLEG8XdZfbJczaBN SiikRssdXKkBeXg/fz6lgNhXOKSGvAqYVX0bzugvjJzG0CfmrWa/X8L X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org To make libthermal more cross compile friendly use pkg-config to locate libnl3. Only if that fails fall back to hardcoded /usr/include/libnl3. Signed-off-by: Sascha Hauer --- tools/lib/thermal/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/lib/thermal/Makefile b/tools/lib/thermal/Makefile index a1f5e388644d31d36f973d3ddce48d036ee0a083..fdde0c4f85b4e511a16c4381059= 0ed45b007a5ad 100644 --- a/tools/lib/thermal/Makefile +++ b/tools/lib/thermal/Makefile @@ -46,8 +46,12 @@ else CFLAGS :=3D -g -Wall endif =20 +NL3_CFLAGS =3D $(shell pkg-config --cflags libnl-3.0 2>/dev/null) +ifeq ($(NL3_CFLAGS),) +NL3_CFLAGS =3D -I/usr/include/libnl3 +endif + INCLUDES =3D \ --I/usr/include/libnl3 \ -I$(srctree)/tools/lib/thermal/include \ -I$(srctree)/tools/lib/ \ -I$(srctree)/tools/include \ @@ -59,6 +63,7 @@ INCLUDES =3D \ override CFLAGS +=3D $(EXTRA_WARNINGS) override CFLAGS +=3D -Werror -Wall override CFLAGS +=3D -fPIC +override CFLAGS +=3D $(NL3_CFLAGS) override CFLAGS +=3D $(INCLUDES) override CFLAGS +=3D -fvisibility=3Dhidden override CFGLAS +=3D -Wl,-L. --=20 2.47.3