Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17983424rwd; Tue, 27 Jun 2023 09:58:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6y1JwDIXwnureuJd8SCs1rTABk+Nh2KIWUUiiooArytmCVMNeOrNc2d7vpNfH4XnbIGMIc X-Received: by 2002:a17:902:cf46:b0:1b6:65d8:d646 with SMTP id e6-20020a170902cf4600b001b665d8d646mr6880533plg.51.1687885133213; Tue, 27 Jun 2023 09:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687885133; cv=none; d=google.com; s=arc-20160816; b=t9MubRucp3LsO4tztHGurJuGeLosXx4r7SJmaJqL/OXATy4lUqYYBVcACguWNFrT/l eZWUAJONVXS5F4/156icj44cEQ18MTvthl6/GzmAtEi1qWjHphBvqBBluba02jUNCwh4 oXywMz/lxG/gChPzByS66P0MEG7tVs5UnixbTi/l9HDFUNkF1byfrkpYQQzue/j6pBNc D/oY4odzmQM4VFdFWM4P54kcwSjnQIXQBubZLY3fFnIHFrP8nhFkBUWbvQ20VSVXJ1Pg VyHymlUPQ6djyvE5z2gyn/j2gdj3qLe1LI4Z1e9rTjRiTSiB2qfGjWC0baYExlxLLUYp HvYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xuV/cz5t+pynAyLFuHtp6XopbD+AFDr3WeeFDoTeLrg=; fh=+N0SlQmsLD434ImvQJ7lncvCerMD+edpfCBaHhvLBVo=; b=yAVH6lmV0GqP80zBOvnS4fa40JV9DWQqeRZvWHu+XgByGdEVQ9uDAHqMzrVMLtnQ20 ReCKC0cvbKMCYwzWT3+qRlKmpsUfYhjL+1JJUkw0RO1rqiPKF8cnbqsgrb8HObD3gl2I jJQJH5+7lQCGjbXtS211O/8RrZsVRaqmKBSmRFxTsBnNsgAM3W+Lb7kQtFPTyPLafIgq 8GCH75Hu3b4BIrwAKBTjjzS6GhNUzObDl1Kn9Ce+apEwmZp8iH5dJAefQPEESb1TkFwL mpBeDcLVVAdhhd+7YQmdsyhJLuORmsxSqErVMB+z3HRSWanUxAZTYT7br1PgmtFF95Oy FJ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bf+1nHmW; 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 d23-20020a170902b71700b001b596a0fa8esi6692808pls.383.2023.06.27.09.58.40; Tue, 27 Jun 2023 09:58:53 -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=bf+1nHmW; 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 S230499AbjF0QZw (ORCPT + 99 others); Tue, 27 Jun 2023 12:25:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232470AbjF0QZQ (ORCPT ); Tue, 27 Jun 2023 12:25:16 -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 CE0482115; Tue, 27 Jun 2023 09:25:15 -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 5A592611D1; Tue, 27 Jun 2023 16:25:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36845C433C0; Tue, 27 Jun 2023 16:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687883114; bh=abXpFTTuUCBmcbnkpnmJtVpSKqQCH7MmcQizSI+8UwQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bf+1nHmWvUr3kRD0ZuwmHSoep1vIrh0qJZgvsk8nlnHqA5vuW61Onv1xwnq27FNZn DTxsQPAr9qLEegeAaZOBj5tuT89gXMkQacVqnbuxJ6bamy3FsSqu1zcNCe2pQoxJ7q JoCiI78enrsBgw6ZeUlOEB5XKdk3itmXLTshpMceWLZVhyaIqmbPLi7QZXQIFTQUwL xgf1ASuRdFn+dLX5KDIhHNWcoItUX2H6WDl3M6Jfud3oz3LVi1AqVGwsN9Ni1UE3aL C07SEc1ObwLcp3NdFrRGZX1iOdq2HbiKW2++8KS0njjlnP4H6tFM25d968N1BZE7ro CrFo3eXRWzW0g== Date: Tue, 27 Jun 2023 09:25:12 -0700 From: Nathan Chancellor To: WANG Xuerui Cc: Huacai Chen , WANG Rui , Xi Ruoyao , loongarch@lists.linux.dev, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, WANG Xuerui Subject: Re: [PATCH 2/2] LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation Message-ID: <20230627162512.GB223742@dev-arch.thelio-3990X> References: <20230627130122.1491765-1-kernel@xen0n.name> <20230627130122.1491765-3-kernel@xen0n.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230627130122.1491765-3-kernel@xen0n.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Tue, Jun 27, 2023 at 09:01:22PM +0800, WANG Xuerui wrote: > From: WANG Xuerui > > This is a port of commit 08f6554ff90e ("mips: Include KBUILD_CPPFLAGS > in CHECKFLAGS invocation") to arch/loongarch, for fixing > cross-compilation of Linux/LoongArch with Clang, where previously the > `--target` flag would no longer be present for the CHECKFLAGS cc > invocation leading to build failure. > > Reported-by: Nathan Chancellor > Link: https://github.com/ClangBuiltLinux/linux/issues/1787#issuecomment-1608306002 > Signed-off-by: WANG Xuerui Thanks for the patch! Reviewed-by: Nathan Chancellor > --- > arch/loongarch/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile > index a63683da3bcf..09ba338a64de 100644 > --- a/arch/loongarch/Makefile > +++ b/arch/loongarch/Makefile > @@ -112,7 +112,7 @@ KBUILD_CFLAGS += -isystem $(shell $(CC) -print-file-name=include) > KBUILD_LDFLAGS += -m $(ld-emul) > > ifdef CONFIG_LOONGARCH > -CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ > +CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ > grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \ > sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g') > endif > -- > 2.40.0 >