Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9082194pxu; Mon, 28 Dec 2020 06:12:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQhaKyIFIA8ZrgWEu/psJfDRLN7eVRqeqA4giy44MhSFPx0wp47L0N8FteC09YoSq53pLd X-Received: by 2002:a17:906:4bc5:: with SMTP id x5mr41835640ejv.55.1609164749563; Mon, 28 Dec 2020 06:12:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164749; cv=none; d=google.com; s=arc-20160816; b=Ih3HVpTKtGX9qBlV4n0FeIFfrpGzbpi7WbdBE9/6GIuxfhBx1FVhiK8q7m0L/7LxQY /Ssy7fqOjVKGjy/rryMWoaFI0bzsPtPYw55mwVKuwcdVm5Y521PHHzUknPkPKN4O4VRv qnZyMrYCsj0VFf178mRsZWrGxVkWLfGFgONsCH1Mt8sVv/WKE1B/XknqYYzD0zJax1sw NRYd34Rwn6tqgAw7h+lD/WX2z1/qFF2PVg3NHYccsZKvQyfNrzt669Ds6LGc2wdq+zi9 Z8OrU0rhwT+mazQ6Yvbkbc8llshKjgKUPjFQ3A9nWBXCHq9uiK4OrPx87dJIDDvOPFBP n84A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SBumjn1NorveFp8h5+pdpMWiB/1Kijei+7DkOpwYCKw=; b=Y5dWq58kBb1YSp40R3IF6GkqJjn8Hq/JuAa6JXeQcSDPsy1CxptiwQhILZ+uEiEWHA QoxKbp4Apz3ERdsNLNPJe9rP8tlzVd+ZwPRAxr1FsuCWqpZEDy9yCqdvzVo/Lpv/sthw 4/zr5yRf8Tl6eO/fb8NTHmTChYGSBM/lJjE365agpiARSB6tzvEQH4TRcaSFkUqBZK6/ IQH+NiLBPnZL8CquU3qIRwrEep3+WymLFHNlqhgIG6deS3Xm271bCGV+C2W4RBH45fj9 qUEF1Hu4Oup3cayhIH9c0BYlmsNrx5Pv2Lv9ljoXitYNLNYn9RTxdsGS8Uvz3QQ5Awj7 R/cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zEEP9FSE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn3si19731147edb.35.2020.12.28.06.12.05; Mon, 28 Dec 2020 06:12:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zEEP9FSE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438255AbgL1OGx (ORCPT + 99 others); Mon, 28 Dec 2020 09:06:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:40570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437916AbgL1OGQ (ORCPT ); Mon, 28 Dec 2020 09:06:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C447620731; Mon, 28 Dec 2020 14:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164361; bh=1ATv6b1Niwr9sGkSnqoyB+xOcZ4LSPVWKmCxTIORgzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zEEP9FSE06Nz6NroGuhYO7E7KYTjTTkFfmT72sZdOyJ015S66M/zFuqRuaydelFEu 7YHZoyq3ftpoFZSxJRQDyXz0VXHm9Qgd7oZLC3j0gmtOZEGH8ZVPgaP/kZ0PCaSCA1 iJqzbbOx0Hik6lsXFsufP9r/yzASSAqEH6Tl9gJ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Andrii Nakryiko , Luke Nelson , Sasha Levin Subject: [PATCH 5.10 154/717] selftests/bpf: Fix broken riscv build Date: Mon, 28 Dec 2020 13:42:32 +0100 Message-Id: <20201228125028.335548545@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Björn Töpel [ Upstream commit 6016df8fe874e1cf36f6357d71438b384198ce06 ] 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 Signed-off-by: Andrii Nakryiko Acked-by: Luke Nelson Link: https://lore.kernel.org/bpf/20201118071640.83773-2-bjorn.topel@gmail.com Signed-off-by: Sasha Levin --- 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 542768f5195b7..136df8c102812 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -220,7 +220,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 -