From patchwork Tue Nov 17 08:26:36 2020 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: 11911705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A7A8C2D0E4 for ; Tue, 17 Nov 2020 08:27:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 89A4724655 for ; Tue, 17 Nov 2020 08:27:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a8z8GHGE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RSih97Qg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89A4724655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TuH2NuBjfVX0q8U93DjkqEkKHBLmCyokAM7QECWSJwc=; b=a8z8GHGEar5fvD7Qmin7ww5Uo Pzs/mcUvS/5OehUjS4Sy3M9uN3V5X0uD2Hr/9HZjx0t99JyozD+5ZpK6+++xcrXd7lfUIIAGyK0w7 TIECl5uV5xzKgLW8p33L2k1HV6WaJznALe/Np8g16BQ4dMYTSCy1/k3LH4BGnudclRKblXMUtQH96 rgucxAKoMVCibtxETn/mx2zn6aXKNkrck+CKhTNXmHCOcqsBNQthy4kS7w5JYXYcklNOvjJwE8U3w Vr3q7uQPlUlIxNdSp3sni6NpbVecqQnUgQTRKRZBe7ZW5lM1NvMTgkFtDiagQgwFDJCmO1vP2Am2M ABvr1trfA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kewKO-0008Tj-UC; Tue, 17 Nov 2020 08:27:05 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kewKL-0008Sz-Pr for linux-riscv@lists.infradead.org; Tue, 17 Nov 2020 08:27:02 +0000 Received: by mail-pg1-x541.google.com with SMTP id i13so15663684pgm.9 for ; Tue, 17 Nov 2020 00:27:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=thC0vwUoC+dS5Z/fyfQ4HgfqnUUZ2rF5Qe//4cJ/e/s=; b=RSih97Qg5lNmEj0m87IY+niwHqXQAIC0ruEFGfQ30wLErhKzhrQ/CxWBfri5UoFeld Gim6tHlV6PtmyWAhIqA3IPrcXvEuQKObM42h1lCx3Ig5eMwhemVLyVXlXGYPNlv+QtiW GP7RbKgbLDoi34rHR4sn6rA7LydveHF5Ct2mJ/nlCJNyjvJTbn+BsihXINkZVHhsJgU9 DdU6Nu5+Q7G8KvUDixsnqLHkbTbvc3dzrf8XHGmYNMhdC+b1DsvkI6Nq9N3om+PMNOKr tsAg+hvHCONXRTybQAwlqJ2ZlFGlzw4zs7UWeCJsor4+3V60Ud6WRhs1epEDwUYt916a i1qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=thC0vwUoC+dS5Z/fyfQ4HgfqnUUZ2rF5Qe//4cJ/e/s=; b=MAJDqZUFi6Anq6spMF016uLuSqf3Etzi5KHVNtrSBCXihE11veRi2PA1qBMEqo7epf 66wISrMIXdwoAumVrC+mMdEJU7M56bI4GE/+LlHJwwFGafPJ3e1HFtYYa95aPo/SBKAA 5LV8pxAthTHpcjMxmwq52f/g5qxdSpPOp4dmu+8ibac5+kfkpfSP/VDokTb+Z7tuDT4f 5Qaiyk+bH4eK11VcS5NbRCwH3jZdbhOc0CEpwmdR2UxzVX3ZwUUlrA2+aoqZ/eNb6HFv Px0hBfYvz7dgJ8PINodGa6nYQ1umsrUgcnGNFnEuU6KYgTWUAyjCq2u4ECWEGbzFsN7u 2BBQ== X-Gm-Message-State: AOAM533LdoIeSCtG3x+telxH951AO9YaNdPB9/a0ZaHExQs9MJqNgBWr PQi0mUW7t2EyHDRKuZLMXGg= X-Google-Smtp-Source: ABdhPJwHbpYcDC4CrF1mzIpvea+B1cveoQuoSptG8JPZ/wuGPZ8c47r1CEbwD7dwW7n1FDA6IsIGyQ== X-Received: by 2002:a65:5948:: with SMTP id g8mr2607912pgu.51.1605601619614; Tue, 17 Nov 2020 00:26:59 -0800 (PST) Received: from btopel-mobl.ger.intel.com ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id c12sm2251671pjs.8.2020.11.17.00.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 00:26:58 -0800 (PST) From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH bpf-next 1/3] selftests/bpf: Fix broken riscv build Date: Tue, 17 Nov 2020 09:26:36 +0100 Message-Id: <20201117082638.43675-2-bjorn.topel@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201117082638.43675-1-bjorn.topel@gmail.com> References: <20201117082638.43675-1-bjorn.topel@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201117_032702_113929_CDB09418 X-CRM114-Status: GOOD ( 10.58 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-riscv@lists.infradead.org, xi.wang@gmail.com, luke.r.nels@gmail.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The selftests/bpf Makefile includes system include directories from the host, when building BPF programs. On RISC-V glibc requires that __riscv_xlen is defined. This is not the case for "clang -target bpf", which messes up __WORDSIZE (errno.h -> ... -> wordsize.h) and breaks the build. By explicitly defining __risc_xlen correctly for riscv, we can workaround this. Fixes: 167381f3eac0 ("selftests/bpf: Makefile fix "missing" headers on build with -idirafter") Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index c1708ffa6b1c..9d48769ad268 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -219,7 +219,8 @@ $(RESOLVE_BTFIDS): $(BPFOBJ) | $(BUILD_DIR)/resolve_btfids \ # build would have failed anyways. define get_sys_includes $(shell $(1) -v -E - &1 \ - | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') + | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \ + $(shell $(1) -dM -E -