Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18871023rwd; Wed, 28 Jun 2023 01:39:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76SST95cAscjTm3j9SlkA6y8E0nGvjK6c3ict3ilJWBluumrcIf7IVjky60LXJfeYS1cSk X-Received: by 2002:a2e:9a85:0:b0:2b5:a1f5:f5a1 with SMTP id p5-20020a2e9a85000000b002b5a1f5f5a1mr8178228lji.28.1687941591972; Wed, 28 Jun 2023 01:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687941591; cv=none; d=google.com; s=arc-20160816; b=qUF5J6wX6y05XKOPlT90uVwTa+3/EMeRB2uoTqR81kiUSLm/zQazDDu2adUqtV5ICr J8wlBuxl6IZvWQ86kfUjMjU8Jg8dZ+WzTUy3VLP+4HlH3uP+MmhaeZrq4CNVEryN4oIa f64pW19eslOjGy450WXtWYjiHg09JtHv79VOVQGlUYoQjSmXdDwpcQpxAftPfkK0ksMc 7wbWRZWUw1/S3RiRZ+sjZeZ8Y2HbTW47B6cAdD6bBiY3uBOB18ZiqXegy98+j3ceZ2hq QYhwAxDThQO6MRHhT2nrQbX/pDqy7hZG6nkakeTPzOvFhEn8FSlJq9+HBQo3EmiJ1drO O1Yw== 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=1BuisYCbz5bQmCv+oxfLjJjs0QKAM5B5WdfdJ2gZMSw=; fh=H3VCfxenkn/FGeGzoi6/e3+6OS4dgsq+oR+qsnDHlTg=; b=p06L3OVg3Hss1ScA08mwutTnCTkj3rFmf6BeLgfkE1noFgzyPHGZ98MESeW/FjmClr qI/VTNr6IDlX+uFWwUWQemyBnh5bjSBTp96g2ZDovogJUsuAvFJ84wnGCD6CEVyqWH+W KoslWheBeMGlOtTzQsiqXHWlauxtco6z9hVERanlVQq1yamPETfq+M2FeH4cbC7E7TA/ TtuGMmoPTxpioRhJ09OwXw+Fh33T4PvV6WBFhZRGTUKdHb46jXFAMAtl0FQVVDw+2aHj vGR8UqqWJ+bKP7T9lUoppnLF11fn5xT3Qy6hZ5PnXmbGAX58YGKJUwNJc4w9FxSeg8VA tz+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZhvOamz2; 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 m26-20020a056402051a00b0051d8821a152si4539025edv.369.2023.06.28.01.39.27; Wed, 28 Jun 2023 01:39:51 -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=ZhvOamz2; 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 S233282AbjF1IIu (ORCPT + 99 others); Wed, 28 Jun 2023 04:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbjF1IBv (ORCPT ); Wed, 28 Jun 2023 04:01:51 -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 A7C912D72; Wed, 28 Jun 2023 00:59:49 -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 6569A6123C; Wed, 28 Jun 2023 04:22:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C90DCC433CC; Wed, 28 Jun 2023 04:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687926172; bh=X3rvLe7iT1fsUty/3X7jBr4yKHG5Fo+ow7WiOnlm/OY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZhvOamz2SSgjdgsYUzyx8dChx82/qE+ipvNsapcBvuyS3D98jiQj65p1O97Hl9NLX f/2uF8eNTAUyoVnQQ99zxuLbtPGvw+mOPC17Zk80Jr0Byxi/LSDO+8qTN/Uqwynd17 j6DyMeQfkayDPKkKpmSEw24/egB12eL+i/rU52nkqFtaDlXiIiZc6kYvoNcx3oS/75 8tY/Zx9BJEFDkUrKRtSYdn9o+x9zSELLzvPGBMq3LyVUv3H5TknUDKNJlM6aselwOr lVFgTdQ5u7mVjYOTtA3D7xPSx6qMk94IQLNDWlCL5dkRIgHF7LduUpmtvStei/4vQ+ w8Fm6geHZRQ4A== Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-51d95aed33aso3356036a12.3; Tue, 27 Jun 2023 21:22:52 -0700 (PDT) X-Gm-Message-State: AC+VfDz1uZ6ZcjigbadIT+zl/rxxZ9CCa65P9S+x+DN1OLaCF9WHQrl9 pGTg+Y0bI0tTUjnyWgqTxUAapo4W24tHwotErjE= X-Received: by 2002:aa7:c7cf:0:b0:514:8eb7:d587 with SMTP id o15-20020aa7c7cf000000b005148eb7d587mr17503964eds.17.1687926171043; Tue, 27 Jun 2023 21:22:51 -0700 (PDT) MIME-Version: 1.0 References: <20230627130122.1491765-1-kernel@xen0n.name> <20230627130122.1491765-3-kernel@xen0n.name> <20230627162512.GB223742@dev-arch.thelio-3990X> In-Reply-To: <20230627162512.GB223742@dev-arch.thelio-3990X> From: Huacai Chen Date: Wed, 28 Jun 2023 12:22:38 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation To: Nathan Chancellor Cc: WANG Xuerui , WANG Rui , Xi Ruoyao , loongarch@lists.linux.dev, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, WANG Xuerui Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Queued for loongarch-next, thanks. Huacai On Wed, Jun 28, 2023 at 12:25=E2=80=AFAM Nathan Chancellor wrote: > > 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 +=3D -isystem $(shell $(CC) -print-fi= le-name=3Dinclude) > > KBUILD_LDFLAGS +=3D -m $(ld-emul) > > > > ifdef CONFIG_LOONGARCH > > -CHECKFLAGS +=3D $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null |= \ > > +CHECKFLAGS +=3D $(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/ /'=3D'/" -e "s/$$/'/" -e 's/\$$= /&&/g') > > endif > > -- > > 2.40.0 > >