Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34913285rwd; Sun, 9 Jul 2023 23:10:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMn2YwEwl6NhbodB/s0+9PQWO0GJg4jHOIT8Vir7UkNuAlBom2Ant8pqBWWpijpzkT2F5n X-Received: by 2002:a05:6808:2029:b0:3a0:38c2:2654 with SMTP id q41-20020a056808202900b003a038c22654mr8755776oiw.58.1688969447383; Sun, 09 Jul 2023 23:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688969447; cv=none; d=google.com; s=arc-20160816; b=Mdm7NHbsofSK19SXuVagOhC1TWbOInrxWNvBc77mCbf9w7OwWCPy0/ERc+Q5/x1GpL 0ZigUqknuuZzB+LIrZ7zhq8574cG1gZKvWtFiwHoikfhYioSJxI/IFtOHJrsbUudhy85 zWIiUQ9Hoc4TKf234P5k89KKPoRrjSnPfIITe6kc3yTCAd1tsYr4baD6yigJ/eu7GPEO 2NjLXwKlrpSRO44jRB9Q1mnY1G8lcEANbFjiR05lTsdYbKFwJ5TUsM4i/vOKhXKmmJK8 5bUvT6eE8RQqUCtTafMoerLUeT8u982JiycqM1hoHoZ6SYu9SK2YlVuDniS25gvkuH9v iNpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1Q9CwVuQ8dv3/yveg3B1kTCLQEEzTRvizsf+5GXMNiY=; fh=JpukV10mDLHal3MWBQfe/PxdHtKOw0IuGy8EFbX4l7k=; b=ZKnCve8rjTY4irhpe31838gpy/mq8sUG1OHWVSZmvPfztdhoj9odCwFFWcIJv5TqVh GUN55IH9xbJIPxY+PWOMYPAtUaNwuhaRBMbXXPPbPX5zq1liXdpd08PTQ3E4jENaHSUO 2UT+a2iiQSbKqtBrB+/bvQgPLB+I/wGHKYgYbQY4EgU1TchAsDcQ/ZEyBYdI1iXwOOt5 IdlF8xtdsEsvPyOQPlhNLJgK7Qt4k4EUs0jUpqceZyDj5vBegG9lU/BKHop2DJJ/CAjJ 3NDrwWuj2Ao2Z9L4paQN+N7j+XDqxTGVqiesBHM12Ob79/MiiYnmuBmWBO6ph6j7RdQh 5mNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hPn6f7ti; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b0055793097dbesi8514991pgv.469.2023.07.09.23.10.34; Sun, 09 Jul 2023 23:10:47 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hPn6f7ti; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbjGJFyy (ORCPT + 99 others); Mon, 10 Jul 2023 01:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbjGJFyw (ORCPT ); Mon, 10 Jul 2023 01:54:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EB89FA for ; Sun, 9 Jul 2023 22:54:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B859C60E73 for ; Mon, 10 Jul 2023 05:54:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EFF2C433D9; Mon, 10 Jul 2023 05:54:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688968491; bh=5bo3Dd1S/+UX7zKX7SU1eVf31BEHvcpAG9FLa5nnBkc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hPn6f7tiRIl6O3bjLxUjlDrP1U+Q6T7MR6V5pMw0hfvhRAi66DsEgFcyqOoxNzFfM g/9jYTDvUt7NXkIyaZNjXRe+T5UCHmqAIAoWEFBLNSYMSdys8Jkro6KAGcqBkkDgcg wy/jO9Two/zAxxTTX2QA3OHQBvDyrUY+tFwVB4lw6X6zgzQ45+m4ya4qlz6MR6OQCl Uj8bWAwt8Z2vuiiLf8Fzat5byW1XQen+nY04iwqGj6XcqffdfSkq7cVBLQfWlKGTZw wmvbqPFEU3NcOosIW954LwhBYNqe1Xzoi7XFfruxfjJTTWaYBokrJKE+LfECOQ4AaZ IffHKgEbJ5IzQ== Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2b70bfc8db5so48579511fa.2; Sun, 09 Jul 2023 22:54:51 -0700 (PDT) X-Gm-Message-State: ABy/qLahdTJoExJGtCIgblLrU654TmZunkI/2VQIY1Mf55WwC7sns/wL GxT0bQwGD4XQKJMhUGeJticC8yEPEJAuqV7aNxY= X-Received: by 2002:a05:6512:110e:b0:4fb:7665:9b0d with SMTP id l14-20020a056512110e00b004fb76659b0dmr10569131lfg.12.1688968489141; Sun, 09 Jul 2023 22:54:49 -0700 (PDT) MIME-Version: 1.0 References: <20230710052750.259595-1-jianghaoran@kylinos.cn> In-Reply-To: <20230710052750.259595-1-jianghaoran@kylinos.cn> From: Huacai Chen Date: Mon, 10 Jul 2023 13:54:37 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora To: Haoran Jiang Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, haoluo@google.com, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Reviewed-by: Huacai Chen On Mon, Jul 10, 2023 at 1:34=E2=80=AFPM Haoran Jiang wrote: > > When building the latest samples/bpf on LoongArch Fedora > > make M=3Dsamples/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-poi= nter-sign \ > -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-= types \ > -Wno-gnu-variable-sized-type-not-at-end \ > -- > 2.27.0 > >