Message ID | 20230705113926.751791-3-bjorn@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1810854vqx; Wed, 5 Jul 2023 04:58:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGN1UvsSB+9a/hZxnM4D7HQ7hfQDZTNqIew/td6eij+RHoz53q51DCi10CQc+mNO1dY/pBj X-Received: by 2002:a05:6870:170d:b0:1b0:6f63:736f with SMTP id h13-20020a056870170d00b001b06f63736fmr19189961oae.9.1688558283876; Wed, 05 Jul 2023 04:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688558283; cv=none; d=google.com; s=arc-20160816; b=ck5PwXyYTdJGef8irtb45mewPIbp8yrldfmnzP9u6qcsWoXx+F9niMayLSfvlN2ND5 En7WQQM0X+kFgezA73V7klLPlco+untJrT6d2Ci5+H05O60z2vbGP0p1bdQnC9Or7Mah LD7cVvpj0aGa0Mt4W7C6N9EoMekwUPDN+LwiwuSAscbgXw6+of1cWXEV2xbm8N/S1jdw mOcDD6gkYlkSVsnW4Hc/5od3+xWzGwX+o72qzgBuC2n5NEFmcVMjIhPxOnLqRMQmj7cq bG5TUDBwi/59/QWWCIUOLH39tUw2okXwA5rDW0WH6xGnJGJBB241ZLhyGo9qncDR/EC8 Fiuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bQKVMOnVUD5AvcO8f//pwD/4XLU9cJ6Ai5Fm1xi6LMA=; fh=mQC+F9wSIn3xu1xmVcgDOXqrdltCQ7b55UeMdcrLOvM=; b=J9fLkMIocgmZ6yMjDibSx+Xo6Xmes60zM8T2r2XVwJywT0E69iEaiMaRvbZQujZeir 8zT/nK0K5aNcdB/l1q949Y3rM8dUtHZdKcrq/gz9Y74LsTUkYoTtnIhMH3T7GOUO02AT vDiYty5Aqj5t7QZs/4/yeWbyrTYuKRhQrFZ7Ww4dsFSYd7QOYdr/QGj/9ulpDFQIVqi8 44xnwPQH8H1AZN90oBG2ObudLQuW1H58jMSnlFWIUYqv1JTgnbtJbcfKo8jS3ZOJLakk /8qkHpHYOGetpCHvpW10sDIGqRsdip7ZkMn/MkR2a55RzqsO7wg+3kUxzBo6O6D+qmwl CbHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mjrzNsnk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020a17090aad0100b00257482b1795si1554906pjq.166.2023.07.05.04.57.47; Wed, 05 Jul 2023 04:58:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mjrzNsnk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230439AbjGELjq (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 07:39:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231464AbjGELjk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 07:39:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33AB01730; Wed, 5 Jul 2023 04:39:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA16E61511; Wed, 5 Jul 2023 11:39:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4C3EC43391; Wed, 5 Jul 2023 11:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688557179; bh=urR3yZnDusvfwXBBOCw/IKT8fxfFq0fp8eLiyLD/Gk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mjrzNsnkwMA7QUoyv8VZHYooJ9qpesUo3fpr7hiB/TVnxsZHH9BhWMCKLK8at5QwS V9hMGMNDTEq3nNEQ6c3DCl83x7CH/qRoAk5UNVLg8DQffuNqmHl4AlteM2DLsljmQs 5VuXlXM9uZxiblRRVomfvkyWZuEcaquye35Zfui17JLeLC9AHJlbSvfgq+DCac65GS WvKfzA2uUlTbXQQcpTnKOsXLKWF3MNPpFWtQjerp92230pbjBn3bPavNHUlXYCM8w8 NK92ORPQi9wQqzp90yshBg7i4NS7GpOFowqCsYqGQZxY08HdzQbNHiWnCGo50L1MAJ o/vqbVggKlsVA== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@kernel.org> To: Andrii Nakryiko <andrii@kernel.org>, Mykola Lysenko <mykolal@fb.com>, bpf@vger.kernel.org, netdev@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@rivosinc.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next 2/2] selftests/bpf: Honor $(O) when figuring out paths Date: Wed, 5 Jul 2023 13:39:26 +0200 Message-Id: <20230705113926.751791-3-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230705113926.751791-1-bjorn@kernel.org> References: <20230705113926.751791-1-bjorn@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770581691489263550?= X-GMAIL-MSGID: =?utf-8?q?1770581691489263550?= |
Series |
BPF kselftest cross-build/RISC-V fixes
|
|
Commit Message
Björn Töpel
July 5, 2023, 11:39 a.m. UTC
From: Björn Töpel <bjorn@rivosinc.com> When building the kselftests out-of-tree, e.g. | make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ | O=/tmp/kselftest headers | make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ | O=/tmp/kselftest HOSTCC=gcc FORMAT= \ | SKIP_TARGETS="arm64 ia64 powerpc sparc64 x86 sgx" \ | -C tools/testing/selftests gen_tar the kselftest build would not pick up the correct GENDIR path, and therefore not including autoconf.h. Correct that by taking $(O) into consideration when figuring out the GENDIR path. Signed-off-by: Björn Töpel <bjorn@rivosinc.com> --- tools/testing/selftests/bpf/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index ad6b585e0d7c..daccc1b8573a 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -12,7 +12,11 @@ BPFDIR := $(LIBDIR)/bpf TOOLSINCDIR := $(TOOLSDIR)/include BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool APIDIR := $(TOOLSINCDIR)/uapi +ifneq ($(O),) +GENDIR := $(O)/include/generated +else GENDIR := $(abspath ../../../../include/generated) +endif GENHDR := $(GENDIR)/autoconf.h HOSTPKG_CONFIG := pkg-config