From patchwork Thu Oct 28 16:10:57 2021 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: 12590507 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0548C433F5 for ; Thu, 28 Oct 2021 16:11:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B0D5360E8C for ; Thu, 28 Oct 2021 16:11:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B0D5360E8C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=o1bSiAm2EbGz8e8yoVG6mWj611TiH24OvCrTCKRIs08=; b=Ahpjrr8W9jY2eX ZiM1J8hazdwZjRRrRWonpqp6wVPwiXhtq8xqapiPJoFNvUqmWwHmFvvekDMuaansyjt5rq4PS3gY5 hd9Idz83V1ZcSya7Akeh9oAHJ6h6x60ZcHVpyBBRXkAUSDNHBYwSgZ1JuwEP44NosnNil2XxmfO63 kHsHDSstP/eWK0fMs9m6//AX8K3Cw4XZa/ozhCuGBPbAw9aunScmud7Y4PUprux3sLYNsZ9GGcwr2 EvvOQe4KB6Cjs7VHjee8tJpdSh+TKkjKlCIGcUaPM0AOct27FvSFW1gyaGg3k4YiJBnGKUM+lU4OC BMMcYRP7M5JolqwsWN7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg7zq-008Ws5-Gy; Thu, 28 Oct 2021 16:11:18 +0000 Received: from mail-lj1-f175.google.com ([209.85.208.175]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg7zk-008Wnn-KZ for linux-riscv@lists.infradead.org; Thu, 28 Oct 2021 16:11:13 +0000 Received: by mail-lj1-f175.google.com with SMTP id e2so11552496ljg.13 for ; Thu, 28 Oct 2021 09:11:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j6s4f8YcjDD+CpjBx7PKIl2wBVCSaaLbyqkYVC2ZnxY=; b=muFFiYv6XP78kLGWtPCpa0nsmqoasXbXdzUFjLKseba5MJaCHBJfUyvZGDaYUPl4wV 7HEc6wMFnXynhPPjQ1uKTedYbEUzi2lAnrvJrldBTAOyGhR902PWULb2XnjgRGGc0/DU OiMT+HKsbzpVSvlR+Ib1jnATlO2n01SBH56kcJART15ZHIDWkgSAcYI/0roDo9B9pCZo ZOdylF/mhamC5dpZ81tR1mvxIH68r1gaVeYfFUAuJmCYaU1hV3Ufobfjr6zkhYmNmCNH SPWZbd5HmDTwD0DI9mAx9jGRiyur104sJPAuEX/DFjsiNmW+sgelezULICQXKOSk3mjY Zw2g== X-Gm-Message-State: AOAM5307qdVyUa74LUvWE/liFKSDRNF1zoECRl0FDuL2CBWPhykvf+Bn CRW3u06C1nnlDj2M2xk89Xc= X-Google-Smtp-Source: ABdhPJw9RfKTCTjLi4ZdAxhCHFhQ9JTLQ3uevQ/FREeI82pyLvcRUqHuDKshzgx3UPpTSz84y1xMrQ== X-Received: by 2002:a2e:a48c:: with SMTP id h12mr5583843lji.221.1635437471276; Thu, 28 Oct 2021 09:11:11 -0700 (PDT) Received: from kladdkakan.. ([193.138.218.162]) by smtp.gmail.com with ESMTPSA id o17sm49680lfo.176.2021.10.28.09.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 09:11:10 -0700 (PDT) From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org, bpf@vger.kernel.org Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , luke.r.nels@gmail.com, xi.wang@gmail.com, linux-riscv@lists.infradead.org Subject: [PATCH bpf-next v2 4/4] selftests/bpf: Fix broken riscv build Date: Thu, 28 Oct 2021 18:10:57 +0200 Message-Id: <20211028161057.520552-5-bjorn@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211028161057.520552-1-bjorn@kernel.org> References: <20211028161057.520552-1-bjorn@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211028_091112_696164_98081C21 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. 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 This patch is closely related to commit 6016df8fe874 ("selftests/bpf: Fix broken riscv build"). When clang includes the system include directories, but targeting BPF program, __BITS_PER_LONG defaults to 32, unless explicitly set. Workaround this problem, by explicitly setting __BITS_PER_LONG to __riscv_xlen. Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index ac47cf9760fc..88e2a975352b 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -277,7 +277,7 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \ define get_sys_includes $(shell $(1) -v -E - &1 \ | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \ -$(shell $(1) -dM -E -