From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751022AbdKSMVf (ORCPT ); Sun, 19 Nov 2017 07:21:35 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:18014 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbdKSMVd (ORCPT ); Sun, 19 Nov 2017 07:21:33 -0500 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com vAJCLQ35029874 X-Nifty-SrcIP: [209.85.213.182] X-Google-Smtp-Source: AGs4zMb3krJtobUmYaBBAewKWwgGRR655VhE8ypDLfrD1Cf3Lvg15/eVYvzFX70WduFT3SnLrY/xH2q7mk1aPwwHKug= MIME-Version: 1.0 In-Reply-To: References: From: Masahiro Yamada Date: Sun, 19 Nov 2017 21:20:45 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL 1/2] Kbuild updates for v4.15 To: Linus Torvalds Cc: Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, 2017-11-18 10:51 GMT+09:00 Linus Torvalds : > On Fri, Nov 17, 2017 at 9:22 AM, Masahiro Yamada > wrote: >> >> Here are Kbuild updates for v4.15. Please pull! > > Mind checking that I got the CFLAGS_KCOV behavior right. The conflict > looked pretty simple, but somebody should check the ordering of the > > export CFLAGS_KCOV > > vs the actual setting (that is now in scripts/Makefile.kcov. > > It probably doesn't matter, but our makefiles are black magic. > > Linus Strictly speaking, there is a case where the placement of "export" make a difference. -----(example1)----- BAR := bar FOO += $(BAR) export FOO BAR := bar2 --------------------- -----(example2)----- BAR := bar export FOO FOO += $(BAR) BAR := bar2 --------------------- In example1, the exported value for FOO is "bar2" whereas, in example2, "bar". The difference probably comes "export" implies ":=" flavor initialization if not explicitly initialized yet. To avoid confusion, we should explicitly use either ":=" or "=", though. Talking about the kcov case, CFLAGS_KCOV is initialized by ":=" in scripts/Malefile.kcov, so it should work as we expect. (In my personal preference, I'd like collect the kcov stuff into scripts/Makefile.kcof, but it is just a matter of slight taste.) -- Best Regards Masahiro Yamada