1549 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
a5f56b52c8 Linux 4.9.178 2019-05-21 18:49:01 +02:00
Greg Kroah-Hartman
8baec4ebdf Linux 4.9.177 2019-05-16 19:43:47 +02:00
Greg Kroah-Hartman
ffe8cffc8b Linux 4.9.176 2019-05-14 19:19:42 +02:00
Greg Kroah-Hartman
bb4f008d1e Linux 4.9.175 2019-05-10 17:52:11 +02:00
Greg Kroah-Hartman
d79b8577df Linux 4.9.174 2019-05-08 07:19:12 +02:00
Greg Kroah-Hartman
4b333b9c99 Linux 4.9.173 2019-05-04 08:49:10 +02:00
Greg Kroah-Hartman
5383785aaa Linux 4.9.172 2019-05-02 09:32:07 +02:00
Greg Kroah-Hartman
6bff0bba46 Linux 4.9.171 2019-04-27 09:34:48 +02:00
Matthias Kaehlcke
6950577c4f Revert "kbuild: use -Oz instead of -Os when using clang"
commit a75bb4eb9e565b9f5115e2e8c07377ce32cbe69a upstream.

The clang option -Oz enables *aggressive* optimization for size,
which doesn't necessarily result in smaller images, but can have
negative impact on performance. Switch back to the less aggressive
-Os.

This reverts commit 6748cb3c299de1ffbe56733647b01dbcc398c419.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-27 09:34:46 +02:00
Greg Kroah-Hartman
ad387ec4bc Linux 4.9.170 2019-04-20 09:07:54 +02:00
Greg Kroah-Hartman
df62169c33 Linux 4.9.169 2019-04-17 08:36:48 +02:00
Nick Desaulniers
1347aa2a4d kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD
commit ad15006cc78459d059af56729c4d9bed7c7fd860 upstream.

This causes an issue when trying to build with `make LD=ld.lld` if
ld.lld and the rest of your cross tools aren't in the same directory
(ex. /usr/local/bin) (as is the case for Android's build system), as the
GCC_TOOLCHAIN_DIR then gets set based on `which $(LD)` which will point
where LLVM tools are, not GCC/binutils tools are located.

Instead, select the GCC_TOOLCHAIN_DIR based on another tool provided by
binutils for which LLVM does not provide a substitute for, such as
elfedit.

Fixes: 785f11aa595b ("kbuild: Add better clang cross build support")
Link: https://github.com/ClangBuiltLinux/linux/issues/341
Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-17 08:36:38 +02:00
Greg Kroah-Hartman
e93d474911 Linux 4.9.168 2019-04-05 22:29:15 +02:00
Greg Kroah-Hartman
21834d3e53 Linux 4.9.167 2019-04-03 06:24:20 +02:00
Greg Kroah-Hartman
60771fc402 Linux 4.9.166 2019-03-27 14:13:05 +09:00
Greg Kroah-Hartman
1c453afcda Linux 4.9.165 2019-03-23 13:19:54 +01:00
Greg Kroah-Hartman
f5fd34f057 Linux 4.9.164 2019-03-19 13:14:12 +01:00
Greg Kroah-Hartman
b834331609 Linux 4.9.163 2019-03-13 14:05:02 -07:00
Greg Kroah-Hartman
f422a02f86 Linux 4.9.162 2019-03-05 17:57:07 +01:00
Greg Kroah-Hartman
5507839a72 Linux 4.9.161 2019-02-27 10:07:03 +01:00
Masahiro Yamada
8ff3c2ecc1 kbuild: consolidate Clang compiler flags
commit 238bcbc4e07fad2fff99c5b157d0c37ccd4d093c upstream.

Collect basic Clang options such as --target, --prefix, --gcc-toolchain,
-no-integrated-as into a single variable CLANG_FLAGS so that it can be
easily reused in other parts of Makefile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:03 +01:00
Masahiro Yamada
c95a870d1c kbuild: add -no-integrated-as Clang option unconditionally
commit dbe27a002ef8573168cb64e181458ea23a74e2b6 upstream.

We are still a way off the Clang's integrated assembler support for
the kernel. Hence, -no-integrated-as is mandatory to build the kernel
with Clang. If you had an ancient version of Clang that does not
recognize this option, you would not be able to compile the kernel
anyway.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:02 +01:00
Stefan Agner
e1e7f343ea kbuild: set no-integrated-as before incl. arch Makefile
commit 0f0e8de334c54c38818a4a5390a39aa09deff5bf upstream.

In order to make sure compiler flag detection for ARM works
correctly the no-integrated-as flags need to be set before
including the arch specific Makefile.

Fixes: cfe17c9bbe6a ("kbuild: move cc-option and cc-disable-warning after incl. arch Makefile")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Backport to 4.9; adjust context due to a previous backport]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:02 +01:00
Sodagudi Prasad
9362c0885a kbuild: clang: disable unused variable warnings only when constant
commit 0a5f41767444cc3b4fc5573921ab914b4f78baaa upstream.

Currently, GCC disables -Wunused-const-variable, but not
-Wunused-variable, so warns unused variables if they are
non-constant.

While, Clang does not warn unused variables at all regardless of
the const qualifier because -Wno-unused-const-variable is implied
by the stronger option -Wno-unused-variable.

Disable -Wunused-const-variable instead of -Wunused-variable so that
GCC and Clang work in the same way.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:02 +01:00
Nick Desaulniers
b018806f8a kbuild: clang: remove crufty HOSTCFLAGS
commit df16aaac26e92e97ab7234d3f93c953466adc4b5 upstream.

When compiling with `make CC=clang HOSTCC=clang`, I was seeing warnings
that clang did not recognize -fno-delete-null-pointer-checks for HOSTCC
targets.  These were added in commit 61163efae020 ("kbuild: LLVMLinux:
Add Kbuild support for building kernel with Clang").

Clang does not support -fno-delete-null-pointer-checks, so adding it to
HOSTCFLAGS if HOSTCC is clang does not make sense.

It's not clear why the other warnings were disabled, and just for
HOSTCFLAGS, but I can remove them, add -Werror to HOSTCFLAGS and compile
with clang just fine.

Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Backport to 4.9; adjust context]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:02 +01:00
David Lin
3f46fe4a39 kbuild: clang: fix build failures with sparse check
commit bb3f38c3c5b759163e09b9152629cc789731de47 upstream.

We should avoid using the space character when passing arguments to
clang, because static code analysis check tool such as sparse may
misinterpret the arguments followed by spaces as build targets hence
cause the build to fail.

Signed-off-by: David Lin <dtwlin@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Backport to 4.9; adjust context]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:02 +01:00
Masahiro Yamada
b098b02285 kbuild: move cc-option and cc-disable-warning after incl. arch Makefile
commit cfe17c9bbe6a673fdafdab179c32b355ed447f66 upstream.

Geert reported commit ae6b289a3789 ("kbuild: Set KBUILD_CFLAGS before
incl. arch Makefile") broke cross-compilation using a cross-compiler
that supports less compiler options than the host compiler.

For example,

  cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"

This problem happens on architectures that setup CROSS_COMPILE in their
arch/*/Makefile.

Move the cc-option and cc-disable-warning back to the original position,
but keep the Clang target options untouched.

Fixes: ae6b289a3789 ("kbuild: Set KBUILD_CFLAGS before incl. arch Makefile")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
[nc: Backport to 4.9; adjust context due to a previous backport]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27 10:07:02 +01:00
Greg Kroah-Hartman
badcc565e1 Linux 4.9.160 2019-02-23 09:05:59 +01:00
Greg Kroah-Hartman
b9d7a53e4e Linux 4.9.159 2019-02-20 10:18:35 +01:00
Greg Kroah-Hartman
6ece8e403d Linux 4.9.158 2019-02-15 09:07:33 +01:00
Greg Kroah-Hartman
b7ec3f9121 Linux 4.9.157 2019-02-15 08:07:39 +01:00
Greg Kroah-Hartman
8278355efb Linux 4.9.156 2019-02-12 19:45:02 +01:00
Greg Kroah-Hartman
6ebe34c1da Linux 4.9.155 2019-02-06 17:33:30 +01:00
Greg Kroah-Hartman
a4d0a0910e Linux 4.9.154 2019-01-31 08:12:37 +01:00
Greg Kroah-Hartman
189b75ad3f Linux 4.9.153 2019-01-26 09:38:36 +01:00
Greg Kroah-Hartman
ef50e3059a Linux 4.9.152 2019-01-23 08:10:57 +01:00
Greg Kroah-Hartman
008bfb9312 Linux 4.9.151 2019-01-16 22:12:33 +01:00
Greg Kroah-Hartman
df6062688e Linux 4.9.150 2019-01-13 10:03:55 +01:00
Greg Kroah-Hartman
8a12358ba0 Linux 4.9.149 2019-01-09 16:16:45 +01:00
Greg Kroah-Hartman
d99748864f Linux 4.9.148 2018-12-29 13:40:16 +01:00
Greg Kroah-Hartman
bbfc30f29c Linux 4.9.147 2018-12-21 14:11:40 +01:00
Greg Kroah-Hartman
0cff89461d Linux 4.9.146 2018-12-17 09:38:35 +01:00
Greg Kroah-Hartman
9c2f007c3c Linux 4.9.145 2018-12-13 09:20:30 +01:00
Stefan Agner
4c219af48b kbuild: allow to use GCC toolchain not in Clang search path
(commit ef8c4ed9db80261f397f0c0bf723684601ae3b52 upstream)

When using a GCC cross toolchain which is not in a compiled in
Clang search path, Clang reverts to the system assembler and
linker. This leads to assembler or linker errors, depending on
which tool is first used for a given architecture.

It seems that Clang is not searching $PATH for a matching
assembler or linker.

Make sure that Clang picks up the correct assembler or linker by
passing the cross compilers bin directory as search path.

This allows to use Clang provided by distributions with GCC
toolchains not in /usr/bin.

Link: https://github.com/ClangBuiltLinux/linux/issues/78
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-and-tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ND: adjusted to context, due to adjusting the context of my previous
backport of upstream's ae6b289a3789]
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13 09:20:30 +01:00
Greg Kroah-Hartman
1aa861ff23 Linux 4.9.144 2018-12-08 13:05:15 +01:00
Stephen Rothwell
5e2669c978 disable stringop truncation warnings for now
commit 217c3e0196758662aa0429863b09d1c13da1c5d6 upstream.

They are too noisy

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-08 13:05:04 +01:00
Greg Kroah-Hartman
b136f0e9e9 Linux 4.9.143 2018-12-05 19:42:42 +01:00
Chris Fries
740f140b5d kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
(commit ae6b289a37890909fea0e4a1666e19377fa0ed2c upstream)

Set the clang KBUILD_CFLAGS up before including arch/ Makefiles,
so that ld-options (etc.) can work correctly.

This fixes errors with clang such as ld-options trying to CC
against your host architecture, but LD trying to link against
your target architecture.

Signed-off-by: Chris Fries <cfries@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ND: adjusted context due to upstream having removed code above where I
placed this block in this backport]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:42:42 +01:00
Greg Kroah-Hartman
68ae960f6d Linux 4.9.142 2018-12-01 09:44:27 +01:00
Greg Kroah-Hartman
bb2d990b6f Linux 4.9.141 2018-11-27 16:09:42 +01:00