- 09 12月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 25 11月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 23 11月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
Commit 2dffd23f ("kbuild: make single target builds much faster") made the situation much better. To improve it even more, apply the similar idea to the top Makefile. Trim unrelated directories from build-dirs. The single build code must be moved above the 'descend' target. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NJens Axboe <axboe@kernel.dk>
-
- 18 11月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 14 11月, 2019 3 次提交
-
-
由 Masahiro Yamada 提交于
Currently, some sanity checks for uapi headers are done by scripts/headers_check.pl, which is wired up to the 'headers_check' target in the top Makefile. It is true compiling headers has better test coverage, but there are still several headers excluded from the compile test. I like to keep headers_check.pl for a while, but we can delete a lot of code by moving the build rule to usr/include/Makefile. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
There are both positive and negative options about this feature. At first, I thought it was a good idea, but actually Linus stated a negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it is ugly and annoying. The baseline I'd like to keep is the compile-test of uapi headers. (Otherwise, kernel developers have no way to ensure the correctness of the exported headers.) I will maintain a small build rule in usr/include/Makefile. Remove the other header test functionality. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Luc Van Oostenryck 提交于
Sparse uses the same executable for all archs and uses flags like -m64, -mbig-endian or -D__arm__ for arch-specific parameters. But Sparse also uses value from the host machine used to build Sparse as default value for the target machine. This works, of course, well for native build but can create problems when cross-compiling, like defining both '__i386__' and '__arm__' when cross-compiling for arm on a x86-64 machine. Fix this by explicitely telling sparse the target architecture. Reported-by: NBen Dooks <ben.dooks@codethink.co.uk> Signed-off-by: NLuc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 11 11月, 2019 7 次提交
-
-
由 Masahiro Yamada 提交于
scripts/nsdeps is written to take care of only in-tree modules. Perhaps, this is not a bug, but just a design. At least, Documentation/core-api/symbol-namespaces.rst focuses on in-tree modules. Having said that, some people already tried nsdeps for external modules. So, it would be nice to support it. Reported-by: NSteve French <smfrench@gmail.com> Reported-by: NJessica Yu <jeyu@kernel.org> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NJessica Yu <jeyu@kernel.org> Acked-by: NJessica Yu <jeyu@kernel.org> Reviewed-by: NMatthias Maennich <maennich@google.com> Tested-by: NMatthias Maennich <maennich@google.com>
-
由 Masahiro Yamada 提交于
The modpost, with the -d option given, generates per-module .ns_deps files. Kbuild generates per-module .mod files to carry module information. This is convenient because Make handles multiple jobs in parallel when the -j option is given. On the other hand, the modpost always runs as a single thread. I do not see a strong reason to produce separate .ns_deps files. This commit changes the modpost to generate just one file, modules.nsdeps, each line of which has the following format: <module_name>: <list of missing namespaces> Please note it contains *missing* namespaces instead of required ones. So, modules.nsdeps is empty if the namespace dependency is all good. This will work more efficiently because spatch will no longer process already imported namespaces. I removed the '(if needed)' from the nsdeps log since spatch is invoked only when needed. This also solves the stale .ns_deps problem reported by Jessica Yu: https://lkml.org/lkml/2019/10/28/467Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NJessica Yu <jeyu@kernel.org> Acked-by: NJessica Yu <jeyu@kernel.org> Reviewed-by: NMatthias Maennich <maennich@google.com> Tested-by: NMatthias Maennich <maennich@google.com>
-
由 Masahiro Yamada 提交于
'make nsdeps' invokes the modpost three times at most; before linking vmlinux, before building modules, and finally for generating .ns_deps files. Running the modpost again and again is not efficient. The last two can be unified. When the -d option is given, the modpost still does the usual job, and in addition, generates .ns_deps files. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Tested-by: NMatthias Maennich <maennich@google.com> Reviewed-by: NMatthias Maennich <maennich@google.com>
-
由 Geert Uytterhoeven 提交于
There are 6 defconfigs with names longer than 24 characters, breaking alignment in "make help". The "winner" is "ecovec24-romimage_defconfig", counting in at 27 characters. Extend the defconfig field size to 27 to restore alignment. Don't use a larger value, to not encourage people to create even longer defconfig names. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NHans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Geert Uytterhoeven 提交于
Some "make help" text lines extend beyond 80 characters. Wrap them before an opening parenthesis, or before 80 characters. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
When single-build is set, everything in $(MAKECMDGOALS) is a single target. You can use $(MAKECMDGOALS) to list out the single targets. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Linus Torvalds 提交于
-
- 04 11月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 28 10月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 21 10月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 15 10月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
Commit 000ec95f ("kbuild: pkg: rename scripts/package/Makefile to scripts/Makefile.package") missed to update this comment. Fixes: 000ec95f ("kbuild: pkg: rename scripts/package/Makefile to scripts/Makefile.package") Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 14 10月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 08 10月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
Running 'make nsdeps' in a clean source tree fails as follows: $ make -s clean; make -s defconfig; make nsdeps [ snip ] awk: fatal: cannot open file `init/modules.order' for reading (No such file or directory) make: *** [Makefile;1307: modules.order] Error 2 make: *** Deleting file 'modules.order' make: *** Waiting for unfinished jobs.... The cause of the error is 'make nsdeps' does not build modules at all. Set KBUILD_MODULES to fix it. Reviewed-by: NMatthias Maennich <maennich@google.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NJessica Yu <jeyu@kernel.org>
-
- 07 10月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 02 10月, 2019 1 次提交
-
-
由 Shuah Khan 提交于
Add kselftest-all target to build tests from the top level Makefile. This is to simplify kselftest use-cases for CI and distributions where build and test systems are different. Current kselftest target builds and runs tests on a development system which is a developer use-case. Add kselftest-install target to install tests from the top level Makefile. This is to simplify kselftest use-cases for CI and distributions where build and test systems are different. This change addresses requests from developers and testers to add support for installing kselftest from the main Makefile. In addition, make the install directory the same when install is run using "make kselftest-install" or by running kselftest_install.sh. Also fix the INSTALL_PATH variable conflict between main Makefile and selftests Makefile. Signed-off-by: NShuah Khan <skhan@linuxfoundation.org> Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
- 01 10月, 2019 3 次提交
-
-
由 Masahiro Yamada 提交于
Linux 5.3 is out. Remove the SUBDIRS support. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
Commit 40df759e ("kbuild: Fix build with binutils <= 2.19") introduced ar-option and KBUILD_ARFLAGS to deal with old binutils. According to Documentation/process/changes.rst, the current minimal supported version of binutils is 2.21 so you can assume the 'D' option is always supported. Not only GNU ar but also llvm-ar supports it. With the 'D' option hard-coded, there is no more user of ar-option or KBUILD_ARFLAGS. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Tested-by: NNick Desaulniers <ndesaulniers@google.com>
-
由 Linus Torvalds 提交于
-
- 16 9月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 10 9月, 2019 2 次提交
-
-
由 Matthias Maennich 提交于
A script that uses the '<module>.ns_deps' files generated by modpost to automatically add the required symbol namespace dependencies to each module. Usage: 1) Move some symbols to a namespace with EXPORT_SYMBOL_NS() or define DEFAULT_SYMBOL_NAMESPACE 2) Run 'make' (or 'make modules') and get warnings about modules not importing that namespace. 3) Run 'make nsdeps' to automatically add required import statements to said modules. This makes it easer for subsystem maintainers to introduce and maintain symbol namespaces into their codebase. Co-developed-by: NMartijn Coenen <maco@android.com> Signed-off-by: NMartijn Coenen <maco@android.com> Acked-by: NJulia Lawall <julia.lawall@lip6.fr> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NMatthias Maennich <maennich@google.com> Signed-off-by: NJessica Yu <jeyu@kernel.org>
-
由 Matthias Maennich 提交于
This patch adds an option to modpost to generate a <module>.ns_deps file per module, containing the namespace dependencies for that module. E.g. if the linked module my-module.ko would depend on the symbol myfunc.MY_NS in the namespace MY_NS, the my-module.ns_deps file created by modpost would contain the entry MY_NS to express the namespace dependency of my-module imposed by using the symbol myfunc. These files can subsequently be used by static analysis tools (like coccinelle scripts) to address issues with missing namespace imports. A later patch of this series will introduce such a script 'nsdeps' and a corresponding make target to automatically add missing MODULE_IMPORT_NS() definitions to the module's sources. For that it uses the information provided in the generated .ns_deps files. Co-developed-by: NMartijn Coenen <maco@android.com> Signed-off-by: NMartijn Coenen <maco@android.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NMatthias Maennich <maennich@google.com> Signed-off-by: NJessica Yu <jeyu@kernel.org>
-
- 09 9月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 06 9月, 2019 1 次提交
-
-
由 Masahiro Yamada 提交于
KBUILD_ENABLE_EXTRA_GCC_CHECKS started as a switch to add extra warning options for GCC, but now it is a historical misnomer since we use it also for Clang, DTC, and even kernel-doc. Rename it to more sensible, shorter KBUILD_EXTRA_WARN. For the backward compatibility, KBUILD_ENABLE_EXTRA_GCC_CHECKS is still supported (but not advertised in the documentation). I also fixed up 'make help', and updated the documentation. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NNathan Chancellor <natechancellor@gmail.com> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Reviewed-by: NSedat Dilek <sedat.dilek@gmail.com>
-
- 04 9月, 2019 3 次提交
-
-
由 Masahiro Yamada 提交于
CONFIG_SHELL falls back to sh when bash is not installed on the system, but nobody is testing such a case since bash is usually installed. So, shell scripts invoked by CONFIG_SHELL are only tested with bash. It makes it difficult to test whether the hashbang #!/bin/sh is real. For example, #!/bin/sh in arch/powerpc/kernel/prom_init_check.sh is false. (I fixed it up) Besides, some shell scripts invoked by CONFIG_SHELL use bash-extension and #!/bin/bash is specified as the hashbang, while CONFIG_SHELL may not always be set to bash. Probably, the right thing to do is to introduce BASH, which is bash by default, and always set CONFIG_SHELL to sh. Replace $(CONFIG_SHELL) with $(BASH) for bash scripts. If somebody tries to add bash-extension to a #!/bin/sh script, it will be caught in testing because /bin/sh is a symlink to dash on some major distributions. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
These flags were added by commit 61754c18 ("kbuild: Allow arch Makefiles to override {cpp,ld,c}flags") to allow ARC to override -O2. We did not see any other usage after all. Now that ARC switched to CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, there is no more user of these variables. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
arch/arc/Makefile overrides -O2 with -O3. This is the only user of ARCH_CFLAGS. There is no user of ARCH_CPPFLAGS or ARCH_AFLAGS. My plan is to remove ARCH_{CPP,A,C}FLAGS after refactoring the ARC Makefile. Currently, ARC has no way to enable -Wmaybe-uninitialized because both -O3 and -Os disable it. Enabling it will be useful for compile-testing. This commit allows allmodconfig (, which defaults to -O2) to enable it. Add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y to all the defconfig files in arch/arc/configs/ in order to keep the current config settings. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NVineet Gupta <vgupta@synopsys.com>
-
- 03 9月, 2019 1 次提交
-
-
由 Linus Torvalds 提交于
-
- 30 8月, 2019 1 次提交
-
-
由 Nathan Chancellor 提交于
This functionally reverts commit bfd77145 ("Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang"). clang enabled support for -Wimplicit-fallthrough in C in r369414 [1], which causes a lot of warnings when building the kernel for two reasons: 1. Clang does not support the /* fall through */ comments. There seems to be a general consensus in the LLVM community that this is not something they want to support. Joe Perches wrote a script to convert all of the comments to a "fallthrough" keyword that will be added to compiler_attributes.h [2] [3], which catches the vast majority of the comments. There doesn't appear to be any consensus in the kernel community when to do this conversion. 2. Clang and GCC disagree about falling through to final case statements with no content or cases that simply break: https://godbolt.org/z/c8csDu This difference contributes at least 50 warnings in an allyesconfig build for x86, not considering other architectures. This difference will need to be discussed to see which compiler is right [4] [5]. [1]: https://github.com/llvm/llvm-project/commit/1e0affb6e564b7361b0aadb38805f26deff4ecfc [2]: https://lore.kernel.org/lkml/61ddbb86d5e68a15e24ccb06d9b399bbf5ce2da7.camel@perches.com/ [3]: https://lore.kernel.org/lkml/1d2830aadbe9d8151728a7df5b88528fc72a0095.1564549413.git.joe@perches.com/ [4]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432 [5]: https://github.com/ClangBuiltLinux/linux/issues/636 Given these two problems need discussion and coordination, do not enable -Wimplicit-fallthrough with clang right now. Add a comment to explain what is going on as well. This commit should be reverted once these two issues are fully flushed out and resolved. Suggested-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NNathan Chancellor <natechancellor@gmail.com> Acked-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com> Acked-by: NNick Desaulniers <ndesaulniers@google.com> Acked-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 29 8月, 2019 5 次提交
-
-
由 Masahiro Yamada 提交于
Move the outputmakefile target to the leftmost in the prerequisite list so that this is checked first. GNU Make processes the prerequisites left to right. GNU Make will keep to stick to this behavior, and it seems even POSIX standard, according to this: https://lists.gnu.org/archive/html/bug-make/2019-08/msg00030.html The POSIX standard of make is available here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html Of course, when the parallel option -j given, other targets will be run simultaneously but it is nice to show the error as early as possible. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
Now prepare3 does nothing but depends on include/config/kernel.release Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
With this commit, the error report is shown earlier, even before running kconfig. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
If you try out-of-tree build with an unclean source tree, Kbuild suggests to run make mrproper. The path to the source tree may be shown with a relative path, for example, "make O=foo" emits the following: .. is not clean, please run 'make mrproper' in the '..' directory. This is somewhat confusing if you ran "make O=foo" in the source tree. Using the absolute path will be clearer. This commit changes the error message like follows: *** *** The source tree is not clean, please run 'make mrproper' *** in /absolute/path/to/linux *** Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
由 Masahiro Yamada 提交于
Since commit 3a475b21 ("kbuild: Inform user to pass ARCH= for make mrproper"), if you try out-of-tree build with an unclean source tree, it suggests to run 'make ARCH=<ARCH> mrproper'. This looks odd when you are not cross-compiling the kernel. Show the 'ARCH=<ARCH>' part only when ARCH= was given from the command line. If ARCH is the default (native build) or came from the environment, it should simply suggest 'make mrproper' as before. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-