<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/Makefile, branch v4.14.141</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.141</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.141'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-08-29T06:26:46Z</updated>
<entry>
<title>Linux 4.14.141</title>
<updated>2019-08-29T06:26:46Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-29T06:26:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01fd1694b93c92ad54fa684dac9c8068ecda8288'/>
<id>urn:sha1:01fd1694b93c92ad54fa684dac9c8068ecda8288</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 4.14.140</title>
<updated>2019-08-25T08:50:29Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-25T08:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b5260801526c77496dd8be7d750c20939ec64189'/>
<id>urn:sha1:b5260801526c77496dd8be7d750c20939ec64189</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 4.14.139</title>
<updated>2019-08-16T08:13:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-16T08:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45f092f9e9cb31486db546e39bfe7cc0b3f57099'/>
<id>urn:sha1:45f092f9e9cb31486db546e39bfe7cc0b3f57099</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 4.14.138</title>
<updated>2019-08-09T15:53:37Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-09T15:53:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ffe1e79c174b2093f7ee3df589a7705572c9620'/>
<id>urn:sha1:3ffe1e79c174b2093f7ee3df589a7705572c9620</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 4.14.137</title>
<updated>2019-08-06T17:05:30Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-06T17:05:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b19ffe6e7205c0b0d26b750673873f3f9f61da35'/>
<id>urn:sha1:b19ffe6e7205c0b0d26b750673873f3f9f61da35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kbuild: initialize CLANG_FLAGS correctly in the top Makefile</title>
<updated>2019-08-06T17:05:25Z</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=3e1332cfb41ccb47134d20e08ce999474d4e1f38'/>
<id>urn:sha1:3e1332cfb41ccb47134d20e08ce999474d4e1f38</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 4.14.136</title>
<updated>2019-08-04T07:32:04Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-08-04T07:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7d80e1218adf6d1aa5270587192789e218fef706'/>
<id>urn:sha1:7d80e1218adf6d1aa5270587192789e218fef706</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 4.14.135</title>
<updated>2019-07-31T05:28:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-31T05:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10d6aa565d0593fe4e152e49ab58f47a2952f902'/>
<id>urn:sha1:10d6aa565d0593fe4e152e49ab58f47a2952f902</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS</title>
<updated>2019-07-31T05:28:52Z</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=89567efefe103e05d0baddbdc2a5f8142b010376'/>
<id>urn:sha1:89567efefe103e05d0baddbdc2a5f8142b010376</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 4.14.134</title>
<updated>2019-07-21T07:04:43Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-07-21T07:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ff33472c282e209da54cbc0c7c1c06ddfcc93d33'/>
<id>urn:sha1:ff33472c282e209da54cbc0c7c1c06ddfcc93d33</id>
<content type='text'>
</content>
</entry>
</feed>
