From nobody Mon Jun 29 07:49:40 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 639E6C433EF for ; Mon, 14 Feb 2022 16:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356081AbiBNQEX (ORCPT ); Mon, 14 Feb 2022 11:04:23 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345126AbiBNQEW (ORCPT ); Mon, 14 Feb 2022 11:04:22 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E6FF4198D; Mon, 14 Feb 2022 08:04:13 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id EE7221F43E14 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644854651; bh=hhGdfBGp3XEGTgPwWSi2w1YSBb6AMg6JC+TrhGkRd3U=; h=From:To:Cc:Subject:Date:From; b=VmZnjDBXlO0jFVw0dmKZ0d+fy8kPHcbiFaqywZrdEZNP1Rh1PznhsfXbaFFIiM5GR x2fsK3gFeOmLd87l2pgF5SKcsNkFzHWB68deRdWM0NcQo3+g1zONQgtTTC+YQabQzU OJUR5g6rnsH61DATvCTUS3CXgXdrqXJhws5p9AaXcnvIOh2DMG+R6nrerZ79etdvhp CgM3fkFNJ21gcMY8VRyseVpJ+KyfMiFUAh99516xx8SIoUu0Z4k3BhxNsV1kFncJHj jxGY5yIC1+WpjsL+k1asHDwaxUHrxze6UUp4i0oNnMG6zFdEs3HCm76y439/hqrXm/ RoWaSs06LtSDA== From: Muhammad Usama Anjum To: Shuah Khan Cc: Muhammad Usama Anjum , kernel@collabora.com, sherry.yang@oracle.com, keescook@chromium.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests: Use -isystem instead of -I to include headers Date: Mon, 14 Feb 2022 21:03:39 +0500 Message-Id: <20220214160339.3537720-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Selftests need kernel headers and glibc for compilation. In compilation of selftests, uapi headers from kernel source are used instead of default ones while glibc has already been compiled with different header files installed in the operating system. So there can be redefination warnings from compiler. These warnings can be suppressed by using -isystem to include the uapi headers. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Mak= efile index 4eda7c7c15694..0178b5c801656 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -130,14 +130,16 @@ ifneq ($(KBUILD_OUTPUT),) # $(realpath ...) resolves symlinks abs_objtree :=3D $(realpath $(abs_objtree)) BUILD :=3D $(abs_objtree)/kselftest - KHDR_INCLUDES :=3D -I${abs_objtree}/usr/include + KHDR_INCLUDES :=3D -isystem ${abs_objtree}/usr/include else BUILD :=3D $(CURDIR) abs_srctree :=3D $(shell cd $(top_srcdir) && pwd) - KHDR_INCLUDES :=3D -I${abs_srctree}/usr/include + KHDR_INCLUDES :=3D -isystem ${abs_srctree}/usr/include DEFAULT_INSTALL_HDR_PATH :=3D 1 endif =20 +$(info $$KHDR_INCLUDES iss [${KHDR_INCLUDES}]) + # Prepare for headers install include $(top_srcdir)/scripts/subarch.include ARCH ?=3D $(SUBARCH) --=20 2.30.2