Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34742829rwd; Sun, 9 Jul 2023 19:36:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrbBD8PQQIc62kdiH/5cQWBvdivkh3VjQEP1nqjwdeaUp/GE1RoBaaUvCcZlF0BurUpyI/ X-Received: by 2002:a17:907:cca0:b0:98e:a451:fac3 with SMTP id up32-20020a170907cca000b0098ea451fac3mr10171545ejc.42.1688956593639; Sun, 09 Jul 2023 19:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688956593; cv=none; d=google.com; s=arc-20160816; b=XrmAMAbK9RHZ2GcXF0j2jmY02pL0lbHX6P47dZgckQozzAyAPqmLp3Zkm9NVqGFDN1 mx17LCyqzz0d69ErZMJpM1qFuXImVD6HPXch7zVSVjo6sMohKoY7zQRyJOJQBiA3+8zA 9KC6mKiEpwOpl58ozt93thqikEqzL7aX4d59yWEuZZv2wDhGZr+saNqmTKuGnmmbX8Nm BrK8Tytuuukt+AqPPYm8GAfLvu2OusQoydUNWNJtj+O4Igk7wJvqSUQLeZF2UL7Hjyf1 gpMAAF2syGwfViL7hbJOl0T0m69c0AK2pJMcn8sRshOzZs0uTSm81JpYnr9TZAjcyS6C E8yw== 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=mRulfYGne+60U0v3E9qZSfBhjtuPFGUqlzZBA9cD5jE=; fh=TWy0ozqGW78X8keLVw8dHFkkw1VsupIMoyX/8ZXhhTc=; b=xb967MQ9StHpeT51HUKZHyvz3dxCV05D3OoEf15chwYX53otTVsEqGx5+u6epgXU9B Ax3SB2UhzAJTUKLfgZc7Z2eEwWb040fQn+UP7F20LSHIyNdAsS9AUQ9wEWws84SrbXCJ mqc2nhDToxrFys3nsUmYPhOa4heZ3Sgq7xAv9Bzde3TAsj1cQvclJqjtFq+ZKfL0dlQt uMkC2OUbruMNQt5flwqLQVULVrvHjCadchN+WBnpz0rdw2R8OmNvDpzQK3AF9m/jYHv6 QbpA9LfgnZEJ7zzWXTqAh6BddCVbNTgGuXXnm+bY/qrmYNfFIryizouLKXtY2g5SWQae 3WIg== 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 ss8-20020a170907038800b009930d4e3185si7468917ejb.883.2023.07.09.19.36.03; Sun, 09 Jul 2023 19:36:33 -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 S230021AbjGJB5L (ORCPT + 99 others); Sun, 9 Jul 2023 21:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjGJB5K (ORCPT ); Sun, 9 Jul 2023 21:57:10 -0400 Received: from mailgw.kylinos.cn (unknown [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C842BEE; Sun, 9 Jul 2023 18:57:08 -0700 (PDT) X-UUID: 06188fefb575434da11446c1d3861c80-20230710 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.27,REQID:809c74b7-40f3-4e1c-85dc-7d90e1d84bb3,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:809c74b7-40f3-4e1c-85dc-7d90e1d84bb3,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:ba820968-314d-4083-81b6-6a74159151eb,B ulkID:230710095658WWG00CKR,BulkQuantity:0,Recheck:0,SF:44|24|17|19|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_ULS,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD, TF_CID_SPAM_FSI X-UUID: 06188fefb575434da11446c1d3861c80-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 1691520724; Mon, 10 Jul 2023 09:56:57 +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] samples/bpf: Fix compilation failure for samples/bpf on Loongarch Fedora Date: Mon, 10 Jul 2023 09:51:20 +0800 Message-Id: <20230710015120.44818-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 --- 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