From patchwork Tue Nov 15 18:20:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13044067 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4AFE3C4332F for ; Tue, 15 Nov 2022 18:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IWC500yYZuffYsbzHQLj0cYJw1CgoFrtOZHvjPqHcJ4=; b=tunTj9WYD7736z acUIm8aNHufMuVVv6AZwL2pReIH20fBKMwVudFcdRG5onv7o2/zsnsPWOgHoJbiirgpLPw+F5Fjdg cFRj5qA71i6tj3USdkzVZps7RBuPwwM/+cGHJerPAv0eMNNTqNJdhmByeFcNc+PAeigZvKl1XynEN D4eec1RnqVD1iMJBcivLAh6Kwc6jWcM7DzOJeECM6ruY1iRcUDjl0S/0lajvxFZsbQ1phnp7vWMWU Cy3TgKkaPhiqyvxpB6Q1fBI2YHC/S2xN84aA1WnT2NOHKtqD3XtL43BirvGVPUED/E+SiyTT0h8ap e6/bIAFqBjIZp+AMR4/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ov0Ym-00Dh8l-Kl; Tue, 15 Nov 2022 18:21:24 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ov0Yk-00Dh83-F1 for linux-riscv@lists.infradead.org; Tue, 15 Nov 2022 18:21:24 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CF979B81A16; Tue, 15 Nov 2022 18:21:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 258E5C4347C; Tue, 15 Nov 2022 18:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668536479; bh=kVzmN1nhvJ7rXQ8CtIjwZxxIsXnCovpfzTGFioT4v9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ma3yBe1TSehHWYD1ASpuWsoYAedQbCS84Xf7g4d9vwu4EvXET9EAEnphGu15H5K70 qKydZKkbHbfgNIFWIi8eL8SFvTG0lGFS7Ynyzqfl7jl+v8pWSbTEupW1NGTZM4nfj6 cyq70hQGLPgmd/JaHe29ZGXUphBTPqYRvMXA7Kw5k/Pmywv8mOQEffIiaWWGWxz8PY RaSC5f2rq3BnV0EzOacujI1/bx4gTUuylISxwjNhMLGIFoRn8k3XkTixoXQ3vgZ2JW 5UJaoDMGfE7gED5rGXdVY0YySZhG3DS4zeo8JhvcUVymdJNrYJS7i/IDl0lZ9Jf/S1 vnnvIuaaDepYQ== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: bpf@vger.kernel.org, Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-riscv@lists.infradead.org, netdev@vger.kernel.org, Anders Roxell , Mykola Lysenko , linux-kselftest@vger.kernel.org Subject: [PATCH bpf 2/2] selftests/bpf: Pass target triple to get_sys_includes macro Date: Tue, 15 Nov 2022 19:20:51 +0100 Message-Id: <20221115182051.582962-2-bjorn@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221115182051.582962-1-bjorn@kernel.org> References: <20221115182051.582962-1-bjorn@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_102122_828031_9B1082AC X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Björn Töpel When cross-compiling [1], the get_sys_includes make macro should use the target system include path, and not the build hosts system include path. Make clang honor the CROSS_COMPILE triple. [1] e.g. "ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make" Signed-off-by: Björn Töpel Tested-by: Anders Roxell --- tools/testing/selftests/bpf/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 8f8ede30e94e..a2a1eae75820 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -309,9 +309,9 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \ # Use '-idirafter': Don't interfere with include mechanics except where the # build would have failed anyways. define get_sys_includes -$(shell $(1) -v -E - &1 \ +$(shell $(1) $(2) -v -E - &1 \ | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \ -$(shell $(1) -dM -E -