Messages in this thread | | | From | Masahiro Yamada <> | Date | Sun, 19 Nov 2017 21:20:45 +0900 | Subject | Re: [GIT PULL 1/2] Kbuild updates for v4.15 |
| |
Hi Linus,
2017-11-18 10:51 GMT+09:00 Linus Torvalds <torvalds@linux-foundation.org>: > On Fri, Nov 17, 2017 at 9:22 AM, Masahiro Yamada > <yamada.masahiro@socionext.com> 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
| |