summaryrefslogtreecommitdiffstats
path: root/Makefile
AgeCommit message (Collapse)Author
2020-04-24Linux 4.14.177v4.14.177Greg Kroah-Hartman
2020-04-13Linux 4.14.176v4.14.176Greg Kroah-Hartman
2020-04-02Linux 4.14.175v4.14.175Greg Kroah-Hartman
2020-03-20Linux 4.14.174v4.14.174Greg Kroah-Hartman
2020-03-11Linux 4.14.173v4.14.173Greg Kroah-Hartman
2020-02-28Linux 4.14.172v4.14.172Greg Kroah-Hartman
2020-02-14Linux 4.14.171v4.14.171Greg Kroah-Hartman
2020-02-05Linux 4.14.170v4.14.170Greg Kroah-Hartman
2020-01-29Linux 4.14.169v4.14.169Greg Kroah-Hartman
2020-01-27Linux 4.14.168v4.14.168Greg Kroah-Hartman
2020-01-27kbuild: mark prepare0 as PHONY to fix external module buildMasahiro Yamada
[ Upstream commit e00d8880481497474792d28c14479a9fb6752046 ] Commit c3ff2a5193fa ("powerpc/32: add stack protector support") caused kernel panic on PowerPC when an external module is used with CONFIG_STACKPROTECTOR because the 'prepare' target was not executed for the external module build. Commit e07db28eea38 ("kbuild: fix single target build for external module") turned it into a build error because the 'prepare' target is now executed but the 'prepare0' target is missing for the external module build. External module on arm/arm64 with CONFIG_STACKPROTECTOR_PER_TASK is also broken in the same way. Move 'PHONY += prepare0' to the common place. GNU Make is fine with missing rule for phony targets. I also removed the comment which is wrong irrespective of this commit. I minimize the change so it can be easily backported to 4.20.x To fix v4.20, please backport e07db28eea38 ("kbuild: fix single target build for external module"), and then this commit. Link: https://bugzilla.kernel.org/show_bug.cgi?id=201891 Fixes: e07db28eea38 ("kbuild: fix single target build for external module") Fixes: c3ff2a5193fa ("powerpc/32: add stack protector support") Fixes: 189af4657186 ("ARM: smp: add support for per-task stack canaries") Fixes: 0a1213fa7432 ("arm64: enable per-task stack canaries") Cc: linux-stable <stable@vger.kernel.org> # v4.20 Reported-by: Samuel Holland <samuel@sholland.org> Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-23Linux 4.14.167v4.14.167Greg Kroah-Hartman
2020-01-17Linux 4.14.166v4.14.166Greg Kroah-Hartman
2020-01-14Linux 4.14.165v4.14.165Greg Kroah-Hartman
2020-01-12Linux 4.14.164v4.14.164Greg Kroah-Hartman
2020-01-09Linux 4.14.163v4.14.163Greg Kroah-Hartman
2020-01-04Linux 4.14.162v4.14.162Greg Kroah-Hartman
2019-12-31Linux 4.14.161v4.14.161Greg Kroah-Hartman
2019-12-21Linux 4.14.160v4.14.160Greg Kroah-Hartman
2019-12-17Linux 4.14.159v4.14.159Greg Kroah-Hartman
2019-12-17kbuild: fix single target build for external moduleMasahiro Yamada
[ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ] 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>
2019-12-05Linux 4.14.158v4.14.158Greg Kroah-Hartman
2019-12-01Linux 4.14.157v4.14.157Greg Kroah-Hartman
2019-11-24Linux 4.14.156v4.14.156Greg Kroah-Hartman
2019-11-20Linux 4.14.155v4.14.155Greg Kroah-Hartman
2019-11-12Linux 4.14.154v4.14.154Greg Kroah-Hartman
2019-11-10Linux 4.14.153v4.14.153Greg Kroah-Hartman
2019-11-10kbuild: add -fcf-protection=none when using retpoline flagsSeth Forshee
[ Upstream commit 29be86d7f9cb18df4123f309ac7857570513e8bc ] 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>
2019-11-10kbuild: use -fmacro-prefix-map to make __FILE__ a relative pathMasahiro Yamada
[ Upstream commit a73619a845d5625079cc1b3b820f44c899618388 ] 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 9da0763bdd82 ("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>
2019-11-06Linux 4.14.152v4.14.152Greg Kroah-Hartman
2019-10-29Linux 4.14.151v4.14.151Greg Kroah-Hartman
2019-10-17Linux 4.14.150v4.14.150Greg Kroah-Hartman
2019-10-11Linux 4.14.149v4.14.149Greg Kroah-Hartman
2019-10-07Linux 4.14.148v4.14.148Greg Kroah-Hartman
2019-10-05Linux 4.14.147v4.14.147Greg Kroah-Hartman
2019-10-05objtool: Query pkg-config for libelf locationRolf Eike Beer
commit 056d28d135bca0b1d0908990338e00e9dadaf057 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>
2019-09-21Linux 4.14.146v4.14.146Greg Kroah-Hartman
2019-09-19Linux 4.14.145v4.14.145Greg Kroah-Hartman
2019-09-16Linux 4.14.144v4.14.144Greg Kroah-Hartman
2019-09-10Linux 4.14.143v4.14.143Greg Kroah-Hartman
2019-09-06Linux 4.14.142v4.14.142Greg Kroah-Hartman
2019-08-29Linux 4.14.141v4.14.141Greg Kroah-Hartman
2019-08-25Linux 4.14.140v4.14.140Greg Kroah-Hartman
2019-08-16Linux 4.14.139v4.14.139Greg Kroah-Hartman
2019-08-09Linux 4.14.138v4.14.138Greg Kroah-Hartman
2019-08-06Linux 4.14.137v4.14.137Greg Kroah-Hartman
2019-08-06kbuild: initialize CLANG_FLAGS correctly in the top MakefileMasahiro Yamada
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: <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-04Linux 4.14.136v4.14.136Greg Kroah-Hartman
2019-07-31Linux 4.14.135v4.14.135Greg Kroah-Hartman
2019-07-31kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGSNathan Chancellor
[ 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 <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>