Commit graph

1527 commits

Author SHA1 Message Date
Greg Kroah-Hartman
f6e27dbb1a Linux 4.14.146 2019-09-21 07:15:48 +02:00
Greg Kroah-Hartman
b10ab5e2c4 Linux 4.14.145 2019-09-19 09:08:09 +02:00
Greg Kroah-Hartman
968722f537 Linux 4.14.144 2019-09-16 08:20:46 +02:00
Greg Kroah-Hartman
e2cd24b629 Linux 4.14.143 2019-09-10 10:32:22 +01:00
Greg Kroah-Hartman
414510bc00 Linux 4.14.142 2019-09-06 10:21:01 +02:00
Greg Kroah-Hartman
01fd1694b9 Linux 4.14.141 2019-08-29 08:26:46 +02:00
Greg Kroah-Hartman
b526080152 Linux 4.14.140 2019-08-25 10:50:29 +02:00
Greg Kroah-Hartman
45f092f9e9 Linux 4.14.139 2019-08-16 10:13:59 +02:00
Greg Kroah-Hartman
3ffe1e79c1 Linux 4.14.138 2019-08-09 17:53:37 +02:00
Greg Kroah-Hartman
b19ffe6e72 Linux 4.14.137 2019-08-06 19:05:30 +02:00
Masahiro Yamada
3e1332cfb4 kbuild: initialize CLANG_FLAGS correctly in the top Makefile
commit 5241ab4cf4 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: 238bcbc4e0 ("kbuild: consolidate Clang compiler flags")
Cc: <stable@vger.kernel.org> # v5.0+
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-06 19:05:25 +02:00
Greg Kroah-Hartman
7d80e1218a Linux 4.14.136 2019-08-04 09:32:04 +02:00
Greg Kroah-Hartman
10d6aa565d Linux 4.14.135 2019-07-31 07:28:59 +02:00
Nathan Chancellor
89567efefe kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS
[ Upstream commit 589834b3a0 ]

In commit ebcc5928c5 ("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 c3f0d0bc5b ("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 <peter.smith@linaro.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-31 07:28:52 +02:00
Greg Kroah-Hartman
ff33472c28 Linux 4.14.134 2019-07-21 09:04:43 +02:00
Greg Kroah-Hartman
aea8526edf Linux 4.14.133 2019-07-10 09:54:43 +02:00
Greg Kroah-Hartman
e3c1b27308 Linux 4.14.132 2019-07-03 13:16:04 +02:00
Greg Kroah-Hartman
f4cc0ed9b2 Linux 4.14.131 2019-06-27 08:15:09 +08:00
Greg Kroah-Hartman
bc2bccef19 Linux 4.14.130 2019-06-25 11:36:55 +08:00
Linus Torvalds
8e69458509 gcc-9: silence 'address-of-packed-member' warning
commit 6f303d6053 upstream.

We already did this for clang, but now gcc has that warning too.  Yes,
yes, the address may be unaligned.  And that's kind of the point.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-25 11:36:50 +08:00
Greg Kroah-Hartman
a5758c5311 Linux 4.14.129 2019-06-22 08:16:19 +02:00
Greg Kroah-Hartman
bb263a2a2d Linux 4.14.128 2019-06-19 08:21:00 +02:00
Greg Kroah-Hartman
e861d0673e Linux 4.14.127 2019-06-17 19:52:45 +02:00
Greg Kroah-Hartman
a74d0e937a Linux 4.14.126 2019-06-15 11:55:00 +02:00
Greg Kroah-Hartman
2bf3258a12 Linux 4.14.125 2019-06-11 12:21:51 +02:00
Greg Kroah-Hartman
e6a95d8851 Linux 4.14.124 2019-06-09 09:18:21 +02:00
Greg Kroah-Hartman
8cb1239889 Linux 4.14.123 2019-05-31 06:47:36 -07:00
Greg Kroah-Hartman
44a05cd896 Linux 4.14.122 2019-05-25 18:25:38 +02:00
Greg Kroah-Hartman
bbcb3c09ea Linux 4.14.121 2019-05-21 18:50:21 +02:00
Greg Kroah-Hartman
e6fedb8802 Linux 4.14.120 2019-05-16 19:42:36 +02:00
Greg Kroah-Hartman
2af67d29b6 Linux 4.14.119 2019-05-14 19:18:47 +02:00
Greg Kroah-Hartman
d929572d7d Linux 4.14.118 2019-05-10 17:53:15 +02:00
Greg Kroah-Hartman
b4677bbb65 Linux 4.14.117 2019-05-08 07:20:54 +02:00
Greg Kroah-Hartman
6d1510d86e Linux 4.14.116 2019-05-04 09:15:23 +02:00
Greg Kroah-Hartman
1c046f3731 Linux 4.14.115 2019-05-02 09:40:34 +02:00
Greg Kroah-Hartman
fa5941f45d Linux 4.14.114 2019-04-27 09:35:42 +02:00
Matthias Kaehlcke
56714d4517 Revert "kbuild: use -Oz instead of -Os when using clang"
commit a75bb4eb9e 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 6748cb3c29.

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:35:40 +02:00
Greg Kroah-Hartman
68d7a45eec Linux 4.14.113 2019-04-20 09:15:10 +02:00
Greg Kroah-Hartman
58b454ebf8 Linux 4.14.112 2019-04-17 08:37:55 +02:00
Nick Desaulniers
1efb2caed0 kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD
commit ad15006cc7 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: 785f11aa59 ("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:37:43 +02:00
Greg Kroah-Hartman
1ec8f1f0bf Linux 4.14.111 2019-04-05 22:31:40 +02:00
Greg Kroah-Hartman
80bf6c64d5 Linux 4.14.110 2019-04-03 06:25:21 +02:00
Greg Kroah-Hartman
1848c32fad Linux 4.14.109 2019-03-27 14:13:56 +09:00
Greg Kroah-Hartman
dee55b062e Linux 4.14.108 2019-03-23 14:35:32 +01:00
Greg Kroah-Hartman
5726a8d0f1 Linux 4.14.107 2019-03-19 13:13:25 +01:00
Greg Kroah-Hartman
d989616452 Linux 4.14.106 2019-03-13 14:03:24 -07:00
Greg Kroah-Hartman
99403097be Linux 4.14.105 2019-03-05 17:58:03 +01:00
Greg Kroah-Hartman
30921fc1e5 Linux 4.14.104 2019-02-27 10:08:09 +01:00
Greg Kroah-Hartman
c793fa334c Linux 4.14.103 2019-02-23 09:06:44 +01:00
Greg Kroah-Hartman
5461ace2e2 Linux 4.14.102 2019-02-20 10:20:56 +01:00
Greg Kroah-Hartman
d6bf9dcebd Linux 4.14.101 2019-02-15 09:08:56 +01:00
Greg Kroah-Hartman
557ac4e207 Linux 4.14.100 2019-02-15 08:09:14 +01:00
Greg Kroah-Hartman
383e9b61f8 Linux 4.14.99 2019-02-12 19:46:14 +01:00
Greg Kroah-Hartman
0d7866d54a Linux 4.14.98 2019-02-06 17:31:37 +01:00
Greg Kroah-Hartman
e1e364bf09 Linux 4.14.97 2019-01-31 08:13:48 +01:00
Greg Kroah-Hartman
e6608e1f2f Linux 4.14.96 2019-01-26 09:37:07 +01:00
Greg Kroah-Hartman
3b68e5cf57 Linux 4.14.95 2019-01-23 08:09:52 +01:00
Greg Kroah-Hartman
8979da2558 Linux 4.14.94 2019-01-16 22:07:13 +01:00
Greg Kroah-Hartman
9c07fc2593 Linux 4.14.93 2019-01-13 10:01:07 +01:00
Joel Stanley
72d217d5df Makefile: Export clang toolchain variables
commit 3bd9805090 upstream.

The powerpc makefile will use these in it's boot wrapper.

Signed-off-by: Joel Stanley <joel@jms.id.au>
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-01-13 10:01:04 +01:00
Masahiro Yamada
ff858d8220 kbuild: consolidate Clang compiler flags
commit 238bcbc4e0 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-01-13 10:01:04 +01:00
Masahiro Yamada
23d9f5e4a3 kbuild: add -no-integrated-as Clang option unconditionally
commit dbe27a002e 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-01-13 10:01:04 +01:00
Masahiro Yamada
b08f331e84 kbuild: fix false positive warning/error about missing libelf
[ Upstream commit ef7cfd00b2 ]

For the same reason as commit 25896d073d ("x86/build: Fix compiler
support check for CONFIG_RETPOLINE"), you cannot put this $(error ...)
into the parse stage of the top Makefile.

Perhaps I'd propose a more sophisticated solution later, but this is
the best I can do for now.

Link: https://lkml.org/lkml/2017/12/25/211
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reported-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reported-by: Qian Cai <cai@lca.pw>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Qian Cai <cai@lca.pw>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-13 10:01:01 +01:00
Greg Kroah-Hartman
24737fa6bc Linux 4.14.92 2019-01-09 17:14:53 +01:00
Greg Kroah-Hartman
d2dd9f1593 Linux 4.14.91 2018-12-29 13:39:11 +01:00
Greg Kroah-Hartman
592f5569e1 Linux 4.14.90 2018-12-21 14:13:19 +01:00
Greg Kroah-Hartman
3beeb26156 Linux 4.14.89 2018-12-17 09:28:56 +01:00
Greg Kroah-Hartman
1bb538a39c Linux 4.14.88 2018-12-13 09:18:54 +01:00
Greg Kroah-Hartman
ca48e5e30b Linux 4.14.87 2018-12-08 13:03:41 +01:00
Stephen Rothwell
9f8d10971a disable stringop truncation warnings for now
commit 217c3e0196 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:03:34 +01:00
Greg Kroah-Hartman
7152401aee Linux 4.14.86 2018-12-05 19:41:27 +01:00
Greg Kroah-Hartman
5ff1ad556a Linux 4.14.85 2018-12-01 09:43:00 +01:00
Stefan Agner
9d844b0e66 kbuild: allow to use GCC toolchain not in Clang search path
commit ef8c4ed9db 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>
[nc: Adjust context]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-01 09:42:57 +01:00
Greg Kroah-Hartman
4201a586f1 Linux 4.14.84 2018-11-27 16:10:52 +01:00
Greg Kroah-Hartman
1d4bd2e4e1 Linux 4.14.83 2018-11-23 08:19:27 +01:00
Greg Kroah-Hartman
a21f3c11b4 Linux 4.14.82 2018-11-21 09:24:18 +01:00
Greg Kroah-Hartman
2e390c4878 Linux 4.14.81 2018-11-13 11:15:18 -08:00
Greg Kroah-Hartman
0b047cbc44 Linux 4.14.80 2018-11-10 07:48:36 -08:00
Greg Kroah-Hartman
50961e4888 Linux 4.14.79 2018-11-04 14:52:51 +01:00
Stefan Agner
6cfb67394a kbuild: set no-integrated-as before incl. arch Makefile
[ Upstream commit 0f0e8de334 ]

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: cfe17c9bbe ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-04 14:52:43 +01:00
Greg Kroah-Hartman
e7405910ca Linux 4.14.78 2018-10-20 09:48:54 +02:00
Greg Kroah-Hartman
8263087bf6 Linux 4.14.77 2018-10-18 09:16:28 +02:00
Greg Kroah-Hartman
0b46ce3e34 Linux 4.14.76 2018-10-13 09:27:30 +02:00
Greg Kroah-Hartman
8e6a9240b1 Linux 4.14.75 2018-10-10 08:54:28 +02:00
Greg Kroah-Hartman
e6abbe80c8 Linux 4.14.74 2018-10-03 17:01:00 -07:00
Greg Kroah-Hartman
3b65f403d7 Linux 4.14.73 2018-09-29 03:06:07 -07:00
Greg Kroah-Hartman
2cc4d36536 Linux 4.14.72 2018-09-26 08:38:16 +02:00
Greg Kroah-Hartman
1244bbb3e9 Linux 4.14.71 2018-09-19 22:43:49 +02:00
Greg Kroah-Hartman
5dfe87ac34 Linux 4.14.70 2018-09-15 09:45:37 +02:00
Greg Kroah-Hartman
7fe7a0f4c5 Linux 4.14.69 2018-09-09 19:56:02 +02:00
Greg Kroah-Hartman
ee13f7edca Linux 4.14.68 2018-09-05 09:26:42 +02:00
Andy Lutomirski
4587db4c2a x86/vdso: Fix vDSO build if a retpoline is emitted
commit 2e549b2ee0 upstream.

Currently, if the vDSO ends up containing an indirect branch or
call, GCC will emit the "external thunk" style of retpoline, and it
will fail to link.

Fix it by building the vDSO with inline retpoline thunks.

I haven't seen any reports of this triggering on an unpatched
kernel.

Fixes: commit 76b043848f ("x86/retpoline: Add initial retpoline support")
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Matt Rickard <matt@softrans.com.au>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Vas Dias <jason.vas.dias@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/c76538cd3afbe19c6246c2d1715bc6a60bd63985.1534448381.git.luto@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-05 09:26:37 +02:00
Greg Kroah-Hartman
f4c88459f7 Linux 4.14.67 2018-08-24 13:09:23 +02:00
Masahiro Yamada
edf81993dc kbuild: suppress warnings from 'getconf LFS_*'
[ Upstream commit 6d79a7b424 ]

Suppress warnings for systems that do not recognize LFS_*.

 getconf: no such configuration parameter `LFS_CFLAGS'
 getconf: no such configuration parameter `LFS_LDFLAGS'
 getconf: no such configuration parameter `LFS_LIBS'

Fixes: d7f14c66c2 ("kbuild: Enable Large File Support for hostprogs")
Reported-by: Chen Feng <puck.chen@hisilicon.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24 13:09:17 +02:00
Greg Kroah-Hartman
c5f7d3c4da Linux 4.14.66 2018-08-22 07:46:11 +02:00
Greg Kroah-Hartman
4cea13b661 Linux 4.14.65 2018-08-18 10:48:00 +02:00
Greg Kroah-Hartman
7251bd56d9 Linux 4.14.64 2018-08-17 21:01:12 +02:00
Greg Kroah-Hartman
9d5cd9f2a4 Linux 4.14.63 2018-08-15 18:13:02 +02:00
Greg Kroah-Hartman
1aa1166efa Linux 4.14.62 2018-08-09 12:16:40 +02:00
Greg Kroah-Hartman
2ae6c0413b Linux 4.14.61 2018-08-06 16:20:52 +02:00