From patchwork Mon Feb 14 16:07:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 542678 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 48AEBC433EF for ; Mon, 14 Feb 2022 16:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234645AbiBNQIf (ORCPT ); Mon, 14 Feb 2022 11:08:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242693AbiBNQIe (ORCPT ); Mon, 14 Feb 2022 11:08:34 -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 AA1B349F97; Mon, 14 Feb 2022 08:08:26 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id D303C1F43DBE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644854905; bh=aJsSEXf1LJvbiDXIpOJk5PLiUdc/g9YrvOrNGjI88oo=; h=From:To:Cc:Subject:Date:From; b=U+cM9tRoLy6qCMzSaQWPpmBDcHcYKhrWG1v0A85bD5Zm8cc+ytYZvtImj3axC+m1e veew8NkjIDmonpu7Dn92nl1J9Bqw84+6MVhVnSh1WIrIj3DF1pBW2StU+W5k7MtLyg usRG+e+t7rH7vlC8Ves0nswrY5bFVWjckrc3SVrzmKrjT129wNU4W1edIqIPYJSYdo W07xl5/Fdtxd3Y9Sm4D0nLyssLbdFzK2zTPFn5tq3NxUKABZKwmYMxS6RFuktlyncp EujRRhoeQU2ZWyfrya8Ha7lbNkNV7iY3mE8nL7jLld6ilYOY+HGiwpQEZE8AjdlMXB JqD9sKh+vZiMw== 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 V2] selftests: Use -isystem instead of -I to include headers Date: Mon, 14 Feb 2022 21:07:56 +0500 Message-Id: <20220214160756.3543590-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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 --- Changes in V2: Remove debug code --- tools/testing/selftests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 4eda7c7c15694..06cc683f81b1a 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -130,11 +130,11 @@ ifneq ($(KBUILD_OUTPUT),) # $(realpath ...) resolves symlinks abs_objtree := $(realpath $(abs_objtree)) BUILD := $(abs_objtree)/kselftest - KHDR_INCLUDES := -I${abs_objtree}/usr/include + KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include else BUILD := $(CURDIR) abs_srctree := $(shell cd $(top_srcdir) && pwd) - KHDR_INCLUDES := -I${abs_srctree}/usr/include + KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include DEFAULT_INSTALL_HDR_PATH := 1 endif