1. 01 10月, 2019 1 次提交
  2. 16 9月, 2019 1 次提交
  3. 10 9月, 2019 2 次提交
  4. 09 9月, 2019 1 次提交
  5. 06 9月, 2019 1 次提交
  6. 04 9月, 2019 3 次提交
    • M
      kbuild: add $(BASH) to run scripts with bash-extension · 858805b3
      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>
      858805b3
    • M
      kbuild: remove ARCH_{CPP,A,C}FLAGS · 8cc7af75
      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>
      8cc7af75
    • M
      kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC · 15f5db60
      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>
      15f5db60
  7. 03 9月, 2019 1 次提交
  8. 30 8月, 2019 1 次提交
  9. 29 8月, 2019 7 次提交
  10. 26 8月, 2019 1 次提交
  11. 25 8月, 2019 3 次提交
  12. 22 8月, 2019 1 次提交
  13. 21 8月, 2019 6 次提交
    • M
      kbuild: rebuild modules when module linker scripts are updated · 10df0638
      Masahiro Yamada 提交于
      Currently, the timestamp of module linker scripts are not checked.
      Add them to the dependency of modules so they are correctly rebuilt.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      10df0638
    • M
      kbuild: make single targets work more correctly · 394053f4
      Masahiro Yamada 提交于
      Currently, the single target build directly descends into the directory
      of the target. For example,
      
        $ make foo/bar/baz.o
      
      ... directly descends into foo/bar/.
      
      On the other hand, the normal build usually descends one directory at
      a time, i.e. descends into foo/, and then foo/bar/.
      
      This difference causes some problems.
      
      [1] miss subdir-asflags-y, subdir-ccflags-y in upper Makefiles
      
          The options in subdir-{as,cc}flags-y take effect in the current
          and its sub-directories. In other words, they are inherited
          downward. In the example above, the single target will miss
          subdir-{as,cc}flags-y if they are defined in foo/Makefile.
      
      [2] could be built in a different directory
      
          As Documentation/kbuild/modules.rst section 4.3 says, Kbuild can
          handle files that are spread over several sub-directories.
      
          The build rule of foo/bar/baz.o may not necessarily be specified in
          foo/bar/Makefile. It might be specifies in foo/Makefile as follows:
      
          [foo/Makefile]
          obj-y := bar/baz.o
      
          This often happens when a module is so big that its source files
          are divided into sub-directories.
      
          In this case, there is no Makefile in the foo/bar/ directory, yet
          the single target descends into foo/bar/, then fails due to the
          missing Makefile. You can still do 'make foo/bar/' for partial
          building, but cannot do 'make foo/bar/baz.s'. I believe the single
          target '%.s' is a useful feature for inspecting the compiler output.
      
          Some modules work around this issue by putting an empty Makefile
          in every sub-directory.
      
      This commit fixes those problems by making the single target build
      descend in the same way as the normal build does.
      
      Another change is the single target build will observe the CONFIG
      options. Previously, it allowed users to build the foo.o even when
      the corresponding CONFIG_FOO is disabled:
      
         obj-$(CONFIG_FOO) += foo.o
      
      In the new behavior, the single target build will just fail and show
      "No rule to make target ..." (or "Nothing to be done for ..." if the
      stale object already exists, but cannot be updated).
      
      The disadvantage of this commit is the build speed. Now that the
      single target build visits every directory and parses lots of
      Makefiles, it is slower than before. (But, I hope it will not be
      too slow.)
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      394053f4
    • M
      kbuild: unify clean-dirs rule for in-kernel and external module · 76cd306d
      Masahiro Yamada 提交于
      Factor out the duplicated code for in-kernel and external module
      cleaning.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      76cd306d
    • M
      kbuild: unify vmlinux-dirs and module-dirs rules · c99f3918
      Masahiro Yamada 提交于
      The in-kernel build and external module build have similar code
      for descending into sub-directories.
      
      Factor out the code into the common place.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      c99f3918
    • M
      kbuild: unset variables in top Makefile instead of setting 0 · 2042b548
      Masahiro Yamada 提交于
      There is no need to set 0 to variables such as config-targets,
      mixed-targets, etc.
      
      Unset instead of setting 0 in order to use 'ifdef' to test them.
      
      I also renamed:
      
        config-targets  ->  config-build
        mixed-targets   ->  mixed-build
        dot-config      ->  need-config
      
      to clarify what we are doing.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      2042b548
    • M
      kbuild: do not descend to ./Kbuild when cleaning · 125d059b
      Masahiro Yamada 提交于
      'make clean' descends into ./Kbuild, but does not clean anything
      since everything is added to no-clean-files.
      
      There is no need to descend to ./Kbuild in the first place.
      We can drop the no-clean-files assignment.
      
      With this, there is no more user of no-clean-files. I will keep it
      for a while to see whether a new user will appear.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      125d059b
  14. 19 8月, 2019 1 次提交
  15. 15 8月, 2019 2 次提交
  16. 14 8月, 2019 1 次提交
    • S
      devicetree: Expose dtbs_check and dt_binding_check some more · 7aa8dd91
      Stephen Boyd 提交于
      It wasn't obvious that this was a command to run based on 'make help',
      so add it to the top-level help for devicetree builds. Also, add an
      example to the documentation to show that db_binding_check can be run
      with DT_SCHEMA_FILES= to only check one schema file instead of all of
      them.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: <linux-kbuild@vger.kernel.org>
      Cc: <devicetree@vger.kernel.org>
      Cc: <linux-doc@vger.kernel.org>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      [robh: fix-up due to .md to .rst conversion]
      Signed-off-by: NRob Herring <robh@kernel.org>
      7aa8dd91
  17. 12 8月, 2019 1 次提交
  18. 11 8月, 2019 1 次提交
  19. 10 8月, 2019 2 次提交
    • M
      kbuild: show hint if subdir-y/m is used to visit module Makefile · c07d8d47
      Masahiro Yamada 提交于
      Since commit ff9b45c5 ("kbuild: modpost: read modules.order instead
      of $(MODVERDIR)/*.mod"), a module is no longer built in the following
      pattern:
      
        [Makefile]
        subdir-y := some-module
      
        [some-module/Makefile]
        obj-m := some-module.o
      
      You cannot write Makefile this way in upstream because modules.order is
      not correctly generated. subdir-y is used to descend to a sub-directory
      that builds tools, device trees, etc.
      
      For external modules, the modules order does not matter. So, the
      Makefile above was known to work.
      
      I believe the Makefile should be re-written as follows:
      
        [Makefile]
        obj-m := some-module/
      
        [some-module/Makefile]
        obj-m := some-module.o
      
      However, people will have no idea if their Makefile suddenly stops
      working. In fact, I received questions from multiple people.
      
      Show a warning for a while if obj-m is specified in a Makefile visited
      by subdir-y or subdir-m.
      
      I touched the %/ rule to avoid false-positive warnings for the single
      target.
      
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Cc: Tom Stonecypher <thomas.edwardx.stonecypher@intel.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NJan Kiszka <jan.kiszka@siemens.com>
      c07d8d47
    • M
      kbuild: revive single target %.ko · 47801c97
      Masahiro Yamada 提交于
      I removed the single target %.ko in commit ff9b45c5 ("kbuild:
      modpost: read modules.order instead of $(MODVERDIR)/*.mod") because
      the modpost stage does not work reliably. For instance, the module
      dependency, modversion, etc. do not work if we lack symbol information
      from the other modules.
      
      Yet, some people still want to build only one module in their interest,
      and it may be still useful if it is used within those limitations.
      
      Fixes: ff9b45c5 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod")
      Reported-by: NDon Brace <don.brace@microsemi.com>
      Reported-by: NArend Van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      47801c97
  20. 08 8月, 2019 1 次提交
  21. 05 8月, 2019 2 次提交