Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34891518rwd; Sun, 9 Jul 2023 22:47:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlHC2TPG/79yJaI1dPdpX/HsQeyuCbw1jy6n0mBwb3aP24tpc4y90fXDWivsGAiuZPFOD7dw X-Received: by 2002:a05:6870:e24a:b0:1b3:b987:26a5 with SMTP id d10-20020a056870e24a00b001b3b98726a5mr12933785oac.4.1688968044967; Sun, 09 Jul 2023 22:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688968044; cv=none; d=google.com; s=arc-20160816; b=gJCCYKxj6G1vS/uCd9u9zyYnpm4VX6y2VP8bXkpTGjBlcKjmP/94WcqwDollbTKKen fybXiXxqKQG4MLy2+SQT5gamPZZRPq9Z0r+ON1IUG4GJTprSdX4NCDfZJfS57cZXMUb0 dLb8IO5lxWG3XQ1YwQZn9TlkxMjMvwi/hq+IplE2EOaqAUHyxJhkRKzk/yntsii9/NmA vaQkLGQ1I1Ci85TYnAeNC5MPgY2FptBxAcuDGHeQdXrJzOes97cUSqrkFqrqGENUd66f dIxcyRSAOke+aA+IXj+SsnWEBJf09cVBXOTywTs5cawBnh39L4YIgK3cU+HHA9ubm2Ka FTJA== 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 :message-id:date:subject:cc:to:from; bh=Xyqivb2B0bi1w3jifm2HO9Tas8DgZ5vWF6F/GADeo7o=; fh=TWy0ozqGW78X8keLVw8dHFkkw1VsupIMoyX/8ZXhhTc=; b=Pp+wzM/jBBOjoU70l1vQLXfduaeS1AvSFWN3HZ7K8EpFSfRFDRmRTPKd1R5d0HSG2p mlfHCxRe+LiiWT2bicQlGxZFHgYq4YhRQIiC3pxJsK0QHLjehKhaxAp4TH9u9jkO3JDz M/5ruYoePm5LbAPF6AW+5N7oKQevqMC4PtkznwJDt+ag+U/GILTkAOWxIKl2NcjhJ4xl FIg+M8UeAKoXKCyWxIpqHA+vvH2KHBzfLZMwty1M0e5Ix4Zfne7cWZZi/t9AQwW5njHZ 8HHsBEfV4NecMHuF+AO0o9HqKSK5ZCCNvrkVULDxiy6Qc8mTomXmaA57EIS/v0G0aQQr bqAw== 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 gw23-20020a17090b0a5700b002632c1fc68dsi1167953pjb.72.2023.07.09.22.47.13; Sun, 09 Jul 2023 22:47:24 -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 S229612AbjGJFbo (ORCPT + 99 others); Mon, 10 Jul 2023 01:31:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjGJFbn (ORCPT ); Mon, 10 Jul 2023 01:31:43 -0400 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24D8B3; Sun, 9 Jul 2023 22:31:41 -0700 (PDT) X-UUID: 4f69eea4840d47d3bc77a966cd03ef59-20230710 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.27,REQID:5c384c4a-e133-4528-85f8-091747c15c1e,IP:15, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-INFO: VERSION:1.1.27,REQID:5c384c4a-e133-4528-85f8-091747c15c1e,IP:15,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:0 X-CID-META: VersionHash:01c9525,CLOUDID:8426d0da-b4fa-43c8-9c3e-0d3fabd03ec0,B ulkID:230710133120G82S8ADA,BulkQuantity:0,Recheck:0,SF:24|17|19|44|102,TC: nil,Content:0,EDM:-3,IP:-2,URL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I: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: 4f69eea4840d47d3bc77a966cd03ef59-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 898977102; Mon, 10 Jul 2023 13:31:18 +0800 From: Haoran Jiang To: linux-kernel@vger.kernel.org Cc: loongarch@lists.linux.dev, llvm@lists.linux.dev, bpf@vger.kernel.org, chenhuacai@kernel.org, trix@redhat.com, ndesaulniers@google.com, nathan@kernel.org, jolsa@kernel.org, haoluo@google.com, sdf@google.com, kpsingh@kernel.org, john.fastabend@gmail.com, yhs@fb.com, song@kernel.org, martin.lau@linux.dev, andrii@kernel.org, daniel@iogearbox.net, ast@kernel.org, kernel@xen0n.name, yangtiezhu@loongson.cn Subject: [PATCH v2] samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora Date: Mon, 10 Jul 2023 13:25:42 +0800 Message-Id: <20230710052542.257444-1-jianghaoran@kylinos.cn> X-Mailer: git-send-email 2.27.0 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