1. 25 May, 2020 16 commits
  2. 17 May, 2020 17 commits
  3. 12 May, 2020 7 commits
    • Masahiro Yamada's avatar
      kbuild: determine the output format of DTC by the target suffix · 78046fab
      Masahiro Yamada authored
      cmd_dtc takes the additional parameter $(2) to select the target
      format, dtb or yaml. This makes things complicated when it is used
      with cmd_and_fixdep and if_changed_rule. I actually stumbled on this.
      See commit 3d4b2238 ("kbuild: fix DT binding schema rule again to
      avoid needless rebuilds").
      
      Extract the suffix part of the target instead of passing the parameter.
      Fortunately, this works for both $(obj)/%.dtb and $(obj)/%.dt.yaml .
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      78046fab
    • Masahiro Yamada's avatar
      kbuild: remove unused AS assignment · 1ca0c2f6
      Masahiro Yamada authored
      $(AS) is not used anywhere in the kernel build, hence commit
      aa824e0c ("kbuild: remove AS variable") killed it.
      
      Remove the left-over code in arch/{arm,arm64}/Makefile.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      1ca0c2f6
    • Masahiro Yamada's avatar
      kbuild: remove '/' target · ea21e904
      Masahiro Yamada authored
      This notice has been here for a while. Remove it entirely now.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      ea21e904
    • Masahiro Yamada's avatar
      Revert "objtool: Skip samples subdirectory" · 85e4a889
      Masahiro Yamada authored
      This reverts commit 87284978.
      
      samples/ contains only sub-directories.
      
      Because OBJECT_FILES_NON_STANDARD does not work recursively,
      this line has no effect.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      85e4a889
    • Masahiro Yamada's avatar
      kbuild: use CONFIG_CC_VERSION_TEXT to construct LINUX_COMPILER macro · 9a950154
      Masahiro Yamada authored
      scripts/mkcompile_h runs $(CC) just for getting the version string.
      Reuse CONFIG_CC_VERSION_TEXT for optimization.
      
      For GCC, this slightly changes the version string. I do not think it
      is a big deal as we do not have the defined format for LINUX_COMPILER.
      In fact, the recent commit 4dcc9a88 ("kbuild: mkcompile_h:
      Include $LD version in /proc/version") added the linker version.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      9a950154
    • Masahiro Yamada's avatar
      kbuild: use -MMD instead of -MD to exclude system headers from dependency · 30a77297
      Masahiro Yamada authored
      This omits system headers from the generated header dependency.
      
      System headers are not updated unless you upgrade the compiler. Nor do
      they contain CONFIG options, so fixdep does not need to parse them.
      
      Having said that, the effect of this optimization will be quite small
      because the kernel code generally does not include system headers
      except <stdarg.h>. Host programs include a lot of system headers,
      but there are not so many in the kernel tree.
      
      At first, keeping system headers in .*.cmd files might be useful to
      detect the compiler update, but there is no guarantee that <stdarg.h>
      is included from every file. So, I implemented a more reliable way in
      the previous commit.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      30a77297
    • Masahiro Yamada's avatar
      kbuild: ensure full rebuild when the compiler is updated · 8b59cd81
      Masahiro Yamada authored
      Commit 21c54b77 ("kconfig: show compiler version text in the top
      comment") added the environment variable, CC_VERSION_TEXT in the comment
      of the top Kconfig file. It can detect the compiler update, and invoke
      the syncconfig because all environment variables referenced in Kconfig
      files are recorded in include/config/auto.conf.cmd
      
      This commit makes it a CONFIG option in order to ensure the full rebuild
      when the compiler is updated.
      
      This works like follows:
      
      include/config/kconfig.h contains "CONFIG_CC_VERSION_TEXT" in the comment
      block.
      
      The top Makefile specifies "-include $(srctree)/include/linux/kconfig.h"
      to guarantee it is included from all kernel source files.
      
      fixdep parses every source file and all headers included from it,
      searching for words prefixed with "CONFIG_". Then, fixdep finds
      CONFIG_CC_VERSION_TEXT in include/config/kconfig.h and adds
      include/config/cc/version/text.h into every .*.cmd file.
      
      When the compiler is updated, syncconfig is invoked because init/Kconfig
      contains the reference to the environment variable CC_VERTION_TEXT.
      CONFIG_CC_VERSION_TEXT is updated to the new version string, and
      include/config/cc/version/text.h is touched.
      
      In the next rebuild, Make will rebuild every files since the timestamp
      of include/config/cc/version/text.h is newer than that of target.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8b59cd81