<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/Makefile, branch v5.2.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.2.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.2.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-08-06T17:08:23Z</updated>
<entry>
<title>Linux 5.2.7</title>
<updated>2019-08-06T17:08:23Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-06T17:08:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5697a9d3d55fad99ffc3c1ba5654426ab64df333'/>
<id>urn:sha1:5697a9d3d55fad99ffc3c1ba5654426ab64df333</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kbuild: initialize CLANG_FLAGS correctly in the top Makefile</title>
<updated>2019-08-06T17:08:14Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2019-07-29T09:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57134d56a30d0550795283be1aa9236580d1dd04'/>
<id>urn:sha1:57134d56a30d0550795283be1aa9236580d1dd04</id>
<content type='text'>
commit 5241ab4cf42d3a93b933b55d3d53f43049081fa1 upstream.

CLANG_FLAGS is initialized by the following line:

  CLANG_FLAGS     := --target=$(notdir $(CROSS_COMPILE:%-=%))

..., which is run only when CROSS_COMPILE is set.

Some build targets (bindeb-pkg etc.) recurse to the top Makefile.

When you build the kernel with Clang but without CROSS_COMPILE,
the same compiler flags such as -no-integrated-as are accumulated
into CLANG_FLAGS.

If you run 'make CC=clang' and then 'make CC=clang bindeb-pkg',
Kbuild will recompile everything needlessly due to the build command
change.

Fix this by correctly initializing CLANG_FLAGS.

Fixes: 238bcbc4e07f ("kbuild: consolidate Clang compiler flags")
Cc: &lt;stable@vger.kernel.org&gt; # v5.0+
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Acked-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Linux 5.2.6</title>
<updated>2019-08-04T07:29:41Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-04T07:29:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec97ca18aa3a9123b5b64339e5993347295ebf88'/>
<id>urn:sha1:ec97ca18aa3a9123b5b64339e5993347295ebf88</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 5.2.5</title>
<updated>2019-07-31T05:25:04Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-31T05:25:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2519374d2a6b8aa5d395393f21e74232409c2e82'/>
<id>urn:sha1:2519374d2a6b8aa5d395393f21e74232409c2e82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS</title>
<updated>2019-07-31T05:24:43Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2019-06-11T18:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b7eb5a63ab6442f6a03353461d5133f29a76bc8b'/>
<id>urn:sha1:b7eb5a63ab6442f6a03353461d5133f29a76bc8b</id>
<content type='text'>
[ Upstream commit 589834b3a0097a4908f4112eac0ca2feb486fa32 ]

In commit ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI
drift"), the arm64 Makefile added -Wno-psabi to KBUILD_CFLAGS, which is
a GCC only option so clang rightfully complains:

warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]

https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option

However, by default, this is merely a warning so the build happily goes
on with a slew of these warnings in the process.

Commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to cc-option to
support clang") worked around this behavior in cc-option by adding
-Werror so that unknown flags cause an error. However, this all happens
silently and when an unknown flag is added to the build unconditionally
like -Wno-psabi, cc-option will always fail because there is always an
unknown flag in the list of flags. This manifested as link time failures
in the arm64 libstub because -fno-stack-protector didn't get added to
KBUILD_CFLAGS.

To avoid these weird cryptic failures in the future, make clang behave
like gcc and immediately error when it encounters an unknown flag by
adding -Werror=unknown-warning-option to CLANG_FLAGS. This can be added
unconditionally for clang because it is supported by at least 3.0.0,
according to godbolt [1] and 4.0.0, according to its documentation [2],
which is far earlier than we typically support.

[1]: https://godbolt.org/z/7F7rm3
[2]: https://releases.llvm.org/4.0.0/tools/clang/docs/DiagnosticsReference.html#wunknown-warning-option

Link: https://github.com/ClangBuiltLinux/linux/issues/511
Link: https://github.com/ClangBuiltLinux/linux/issues/517
Suggested-by: Peter Smith &lt;peter.smith@linaro.org&gt;
Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Linux 5.2.4</title>
<updated>2019-07-28T06:27:24Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-28T06:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fc89179bfa10dd243fce24af71cf622267f31f2f'/>
<id>urn:sha1:fc89179bfa10dd243fce24af71cf622267f31f2f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 5.2.3</title>
<updated>2019-07-26T07:11:12Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-26T07:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=577669778464e991c12291f5833bd627d2102bcb'/>
<id>urn:sha1:577669778464e991c12291f5833bd627d2102bcb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 5.2.2</title>
<updated>2019-07-21T07:00:45Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-21T07:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e9b75c60f91a359cb0e1b2d0a9ed1c81485215e2'/>
<id>urn:sha1:e9b75c60f91a359cb0e1b2d0a9ed1c81485215e2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 5.2.1</title>
<updated>2019-07-14T06:01:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-14T06:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=527a3db363a3bd7e6ae0a77da809e01847a9931c'/>
<id>urn:sha1:527a3db363a3bd7e6ae0a77da809e01847a9931c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 5.2</title>
<updated>2019-07-07T22:41:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-07-07T22:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0ecfebd2b52404ae0c54a878c872bb93363ada36'/>
<id>urn:sha1:0ecfebd2b52404ae0c54a878c872bb93363ada36</id>
<content type='text'>
</content>
</entry>
</feed>
