- 17 Dec, 2019 1 commit
-
-
Masahiro Yamada authored
[ Upstream commit e07db28e ] Building a single target in an external module fails due to missing .tmp_versions directory. For example, $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o will fail in the following way: CC [M] /home/masahiro/foo/foo.o /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent This is because $(cmd_crmodverdir) is executed only before building /, %/, %.ko single targets of external modules. Create .tmp_versions in the 'prepare' target. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by:
Sasha Levin <sashal@kernel.org>
-
- 05 Dec, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 01 Dec, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 24 Nov, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 20 Nov, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 12 Nov, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 10 Nov, 2019 3 commits
-
-
Greg Kroah-Hartman authored
-
Seth Forshee authored
[ Upstream commit 29be86d7 ] The gcc -fcf-protection=branch option is not compatible with -mindirect-branch=thunk-extern. The latter is used when CONFIG_RETPOLINE is selected, and this will fail to build with a gcc which has -fcf-protection=branch enabled by default. Adding -fcf-protection=none when building with retpoline enabled prevents such build failures. Signed-off-by:
Seth Forshee <seth.forshee@canonical.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by:
Sasha Levin <sashal@kernel.org>
-
Masahiro Yamada authored
[ Upstream commit a73619a8 ] The __FILE__ macro is used everywhere in the kernel to locate the file printing the log message, such as WARN_ON(), etc. If the kernel is built out of tree, this can be a long absolute path, like this: WARNING: CPU: 1 PID: 1 at /path/to/build/directory/arch/arm64/kernel/foo.c:... This is because Kbuild runs in the objtree instead of the srctree, then __FILE__ is expanded to a file path prefixed with $(srctree)/. Commit 9da0763b ("kbuild: Use relative path when building in a subdir of the source tree") improved this to some extent; $(srctree) becomes ".." if the objtree is a child of the srctree. For other cases of out-of-tree build, __FILE__ is still the absolute path. It also means the kernel image depends on where it was built. A brand-new option from GCC, -fmacro-prefix-map, solves this problem. If your compiler supports it, __FILE__ is the relative path from the srctree regardless of O= option. This provides more readable log and more reproducible builds. Please note __FILE__ is always an absolute path for external modules. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by:
Sasha Levin <sashal@kernel.org>
-
- 06 Nov, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 29 Oct, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 17 Oct, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 11 Oct, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 07 Oct, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 05 Oct, 2019 2 commits
-
-
Greg Kroah-Hartman authored
-
Rolf Eike Beer authored
commit 056d28d1 upstream. If it is not in the default location, compilation fails at several points. Signed-off-by:
Rolf Eike Beer <eb@emlix.com> Signed-off-by:
Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/91a25e992566a7968fedc89ec80e7f4c83ad0548.1553622500.git.jpoimboe@redhat.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 21 Sep, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 19 Sep, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 16 Sep, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 10 Sep, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 06 Sep, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 29 Aug, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 25 Aug, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 16 Aug, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 09 Aug, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 06 Aug, 2019 2 commits
-
-
Greg Kroah-Hartman authored
-
Masahiro Yamada authored
commit 5241ab4c 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: 238bcbc4 ("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>
-
- 04 Aug, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 31 Jul, 2019 2 commits
-
-
Greg Kroah-Hartman authored
-
Nathan Chancellor authored
[ Upstream commit 589834b3 ] In commit ebcc5928 ("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 c3f0d0bc ("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>
-
- 21 Jul, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 10 Jul, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 03 Jul, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 27 Jun, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 25 Jun, 2019 2 commits
-
-
Greg Kroah-Hartman authored
-
Linus Torvalds authored
commit 6f303d60 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>
-
- 22 Jun, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 19 Jun, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 17 Jun, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-
- 15 Jun, 2019 1 commit
-
-
Greg Kroah-Hartman authored
-