Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34888093rwd; Sun, 9 Jul 2023 22:43:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9GpWL6QyrcIbeof7iP9JSNdioys1r1aHwCZcpPujKJWESSwblGb+WpV0nNsq8UsxEr5r3 X-Received: by 2002:a05:6358:5285:b0:12b:da97:aba6 with SMTP id g5-20020a056358528500b0012bda97aba6mr9557522rwa.24.1688967805996; Sun, 09 Jul 2023 22:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688967805; cv=none; d=google.com; s=arc-20160816; b=nAWlV4+cQVYye2LTaKwhXR4ltry1tMXUJr09eS49Sx8Dnw9sYA3Z8e8lf69A2UlbXm etlzdK5e1n72G/j3cbumMShhF5FLcD4DA4/Gx9cLXnqr/cmDXQ/lxqNSVnXV7BOOhfeF VUi25CYDu+kGrOdN8URrIBnVpLfD7yJyawcza/U+PgrumOvrVwS6Uev/Tv+gHmbmtHQw eZkftgZaA3vWepuMbSyZ/jW7ivBjpqZ/s0gVQ258Ih4cMVNxgHD5NI9eLsdj+jUdg+Dc nw6n2nsUhA3uzeFYRgNfstjlixhaXAb1k81MKysWrU65NSRmcGdjhcetnQwvAee8+AS6 6ERQ== 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; bh=Xyqivb2B0bi1w3jifm2HO9Tas8DgZ5vWF6F/GADeo7o=; fh=X4JbuICZkn8a7S51ymN8Q28AKOUqD9veAoUbfwVi0Mc=; b=ChfZ7zZcFBSo0yuC6uCzDe8wpC79JsFyM4A+JT4V3CWf1tZdvJ2suK4g+mag1h77wi FE+2kzRwasvkax9AdF2wHduuyQWg7UwiCEEsPfLcjLnuzujU4QJKiY5ZoP9bPhL0ypcn WWVdNE5T+uq3uMH9trUO9JmTTTFu56VSIum5O2HG9eruithPC2fC7Mr2WU/pNEcOLP+v x50ten6pDPHuv812Wp/GpX5hn+Qnj4UTy+QUECMxLWfcwNt8perFOvULt9HgO38d2WDA 1DzLHE4BsSxAlp1ZTCBKrmMuASjc5zc162GxdZPuZAJOnazReD/HzOW7JWzJB2pBKaif bwUg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei1-20020a056a0080c100b0066716dc50a1si7883527pfb.179.2023.07.09.22.43.13; Sun, 09 Jul 2023 22:43:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbjGJFd6 (ORCPT + 99 others); Mon, 10 Jul 2023 01:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjGJFd4 (ORCPT ); Mon, 10 Jul 2023 01:33:56 -0400 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A57EB3; Sun, 9 Jul 2023 22:33:55 -0700 (PDT) X-UUID: fe22782b6d154cc5ac9c2e0da43990b4-20230710 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.27,REQID:89717b82-668f-4e85-85c5-8e906053f2e7,IP:15, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-9,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:6 X-CID-INFO: VERSION:1.1.27,REQID:89717b82-668f-4e85-85c5-8e906053f2e7,IP:15,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-9,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:6 X-CID-META: VersionHash:01c9525,CLOUDID:1f2cd0da-b4fa-43c8-9c3e-0d3fabd03ec0,B ulkID:230710133120G82S8ADA,BulkQuantity:4,Recheck:0,SF:24|17|19|42|102,TC: nil,Content:0,EDM:-3,IP:-2,URL:1,File:nil,Bulk:40,QS:nil,BEC:nil,COL:0,OSI :0,OSA:0,AV:0,LES:1,SPR:NO X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI, TF_CID_SPAM_ULS X-UUID: fe22782b6d154cc5ac9c2e0da43990b4-20230710 X-User: jianghaoran@kylinos.cn Received: from localhost.localdomain [(39.156.73.12)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 128/128) with ESMTP id 1249612017; Mon, 10 Jul 2023 13:33:26 +0800 From: Haoran Jiang To: chenhuacai@kernel.org Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, haoluo@google.com, jianghaoran@kylinos.cn, john.fastabend@gmail.com, jolsa@kernel.org, kernel@xen0n.name, kpsingh@kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, loongarch@lists.linux.dev, martin.lau@linux.dev, nathan@kernel.org, ndesaulniers@google.com, sdf@google.com, song@kernel.org, trix@redhat.com, yangtiezhu@loongson.cn, yhs@fb.com Subject: [PATCH v2] samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora Date: Mon, 10 Jul 2023 13:27:50 +0800 Message-Id: <20230710052750.259595-1-jianghaoran@kylinos.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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: X-Mailing-List: linux-kernel@vger.kernel.org When building the latest samples/bpf on LoongArch Fedora make M=samples/bpf There are compilation errors as follows: In file included from ./linux/samples/bpf/sockex2_kern.c:2: In file included from ./include/uapi/linux/in.h:25: In file included from ./include/linux/socket.h:8: In file included from ./include/linux/uio.h:9: In file included from ./include/linux/thread_info.h:60: In file included from ./arch/loongarch/include/asm/thread_info.h:15: In file included from ./arch/loongarch/include/asm/processor.h:13: In file included from ./arch/loongarch/include/asm/cpu-info.h:11: ./arch/loongarch/include/asm/loongarch.h:13:10: fatal error: 'larchintrin.h' file not found ^~~~~~~~~~~~~~~ 1 error generated. larchintrin.h is included in /usr/lib64/clang/14.0.6/include, and the header file location is specified at compile time. Test on LoongArch Fedora: https://github.com/fedora-remix-loongarch/releases-info Signed-off-by: Haoran Jiang --- v2: use LoongArch instead of Loongarch in the title and commit message. --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 615f24ebc49c..b301796a3862 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -434,7 +434,7 @@ $(obj)/%.o: $(src)/%.c @echo " CLANG-bpf " $@ $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \ -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ - -I$(LIBBPF_INCLUDE) \ + -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \ -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \ -- 2.27.0