Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27191333rwd; Mon, 3 Jul 2023 22:46:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0DY99aFX3MiM5aIWR2s9WBI3TtrkYDx4Q04qerfpOSZzX/t+XnAup8ooCUPPzfQshlmgm X-Received: by 2002:a05:620a:2721:b0:766:57c:d2b4 with SMTP id b33-20020a05620a272100b00766057cd2b4mr13938962qkp.65.1688449597441; Mon, 03 Jul 2023 22:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688449597; cv=none; d=google.com; s=arc-20160816; b=HxLzkFBVuIc31XzLt0VXb+EcqJUmUBfsbkeS9q74i2djRx9i/4Qi9hj/8WcIJT1OCR RXVo60y9pVwPrkzHygSshLRxeKG2hSF6NaJV7ZJlStv+1p6sVENQf2JnrYl5HorSb0WL ZqH+cP7zKoFRJ3CnLJrIP3+snOTkvb1YM+B77rCz/muqCr7T0g/raiCVqz9pWej82EEP hYBu7cQu98JWp/JPTO6QciZ5xXYTzJO4rcZoqZ7iOcs5ZOFG4Szhe0wLYM1kernTzxAQ tPs8Vu7cn4iyf/foUv6BFFvuVDoIhDbCk2bmNPSPdzsrqGx7b9YQe00qbIIfMrGCuIfq yFbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=ZxmVw8veAmsTEWCXlO4q7QLb1KnEB6h8+2KDYBWnAn0=; fh=Ym+aRBnpbXWOUvm4n0Cq0WqsFqxckWkIdj1/BwPqZjs=; b=Qq+2vd4NZODohAe3pbr+eJv3Ld1nhO12JedZmiXWknjimfL130nyGFUrzcy1neA8h2 5cgacylfX/GoRnVtLfUIgT8dwqtMBnE3/8DtLzI53CjbAf0tTa6recWwz5zgjh9BcGuY CtO1A7xzeRJooaHvciIgKphd+N7Q0/6e3hnuZjKkGyUH+5npiorqx/itNno1rzDMiA/W Leg15MYzYrh2qxWgsnngeBIxPc95B4A9LI2aurfLr81XPVW+RjZbMTpOTyiTYTPHh1lH a8Ull1VuLwuB4wyVqfkZDRF7uJaBSwkXSqWFp193zpd8c6eNYEJO12N0qCmCmMSqsRTc rJAA== 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 d4-20020aa78e44000000b006546d0d5832si13833237pfr.183.2023.07.03.22.46.24; Mon, 03 Jul 2023 22:46:37 -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 S230098AbjGDFdA convert rfc822-to-8bit (ORCPT + 99 others); Tue, 4 Jul 2023 01:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjGDFc7 (ORCPT ); Tue, 4 Jul 2023 01:32:59 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C560E6; Mon, 3 Jul 2023 22:32:58 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qGYem-000LQF-IS; Tue, 04 Jul 2023 07:32:56 +0200 Received: from p57bd997f.dip0.t-ipconnect.de ([87.189.153.127] helo=suse-laptop.fritz.box) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qGYem-000djq-7u; Tue, 04 Jul 2023 07:32:56 +0200 Message-ID: Subject: Re: [PATCH 4/4] sh: remove compiler flag duplication From: John Paul Adrian Glaubitz To: Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Randy Dunlap , Rich Felker , Yoshinori Sato , linux-sh@vger.kernel.org Date: Tue, 04 Jul 2023 07:32:55 +0200 In-Reply-To: <20230219141555.2308306-4-masahiroy@kernel.org> References: <20230219141555.2308306-1-masahiroy@kernel.org> <20230219141555.2308306-4-masahiroy@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.3 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.153.127 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Sun, 2023-02-19 at 23:15 +0900, Masahiro Yamada wrote: > Every compiler flag added by arch/sh/Makefile is passed to the > compiler twice. > > $(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS) is used for compiling *.c > $(KBUILD_CPPFLAGS) + $(KBUILD_AFLAGS) is used for compiling *.S > > Given the above, adding $(cflags-y) to all of KBUILD_{CPP/C/A}FLAGS > ends up with duplication. > > Add -I options to $(KBUILD_CPPFLAGS), and the rest of $(cflags-y) > to KBUILD_{C,A}FLAGS. > > Signed-off-by: Masahiro Yamada > --- > > arch/sh/Makefile | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/sh/Makefile b/arch/sh/Makefile > index f1c6aace8acb..cab2f9c011a8 100644 > --- a/arch/sh/Makefile > +++ b/arch/sh/Makefile > @@ -145,10 +145,8 @@ cpuincdir-y += cpu-common # Must be last > > drivers-y += arch/sh/drivers/ > > -cflags-y += $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y)) > - > +KBUILD_CPPFLAGS += $(addprefix -I $(srctree)/arch/sh/include/, $(cpuincdir-y) $(machdir-y)) > KBUILD_CFLAGS += -pipe $(cflags-y) > -KBUILD_CPPFLAGS += $(cflags-y) > KBUILD_AFLAGS += $(cflags-y) > > ifeq ($(CONFIG_MCOUNT),y) Reviewed-by: John Paul Adrian Glaubitz -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913