Skip to content
Snippets Groups Projects
  1. Nov 11, 2019
  2. Nov 03, 2019
  3. Oct 27, 2019
  4. Oct 20, 2019
  5. Oct 15, 2019
  6. Oct 13, 2019
  7. Oct 07, 2019
  8. Oct 06, 2019
  9. Oct 01, 2019
  10. Sep 30, 2019
  11. Sep 15, 2019
  12. Sep 10, 2019
  13. Sep 08, 2019
  14. Sep 06, 2019
  15. Sep 04, 2019
    • Masahiro Yamada's avatar
      kbuild: add $(BASH) to run scripts with bash-extension · 858805b3
      Masahiro Yamada authored
      
      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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      858805b3
    • Masahiro Yamada's avatar
      kbuild: remove ARCH_{CPP,A,C}FLAGS · 8cc7af75
      Masahiro Yamada authored
      
      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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      8cc7af75
    • Masahiro Yamada's avatar
      kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC · 15f5db60
      Masahiro Yamada authored
      
      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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarVineet Gupta <vgupta@synopsys.com>
      15f5db60
  16. Sep 02, 2019
  17. Aug 29, 2019
  18. Aug 25, 2019
  19. Aug 24, 2019
  20. Aug 21, 2019
    • Masahiro Yamada's avatar
      kbuild: split final module linking out into Makefile.modfinal · 9b9a3f20
      Masahiro Yamada authored
      
      I think splitting the modpost and linking modules into separate
      Makefiles will be useful especially when more complex build steps
      come in. The main motivation of this commit is to integrate the
      proposed klp-convert feature cleanly.
      
      I moved the logging 'Building modules, stage 2.' to Makefile.modpost
      to avoid the code duplication although I do not know whether or not
      this message is needed in the first place.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      9b9a3f20
    • Masahiro Yamada's avatar
      kbuild: rebuild modules when module linker scripts are updated · 10df0638
      Masahiro Yamada authored
      
      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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      10df0638
    • Masahiro Yamada's avatar
      kbuild: make single targets work more correctly · 394053f4
      Masahiro Yamada authored
      
      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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      394053f4
    • Masahiro Yamada's avatar
      kbuild: unify clean-dirs rule for in-kernel and external module · 76cd306d
      Masahiro Yamada authored
      
      Factor out the duplicated code for in-kernel and external module
      cleaning.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      76cd306d
Loading