Skip to content
Snippets Groups Projects
  1. Oct 15, 2018
  2. Oct 07, 2018
  3. Sep 30, 2018
  4. Sep 23, 2018
  5. Sep 19, 2018
  6. Sep 16, 2018
  7. Sep 12, 2018
    • Paulo Zanoni's avatar
      tracing/Makefile: Fix handling redefinition of CC_FLAGS_FTRACE · b1f4ff74
      Paulo Zanoni authored
      
      As a Kernel developer, I make heavy use of "make targz-pkg" in order
      to locally compile and remotely install my development Kernels. The
      nice feature I rely on is that after a normal "make", "make targz-pkg"
      only generates the tarball without having to recompile everything.
      
      That was true until commit f28bc3c3 ("tracing: Handle
      CC_FLAGS_FTRACE more accurately"). After it, running "make targz-pkg"
      after "make" will recompile the whole Kernel tree, making my
      development workflow much slower.
      
      The Kernel is choosing to recompile everything because it claims the
      command line has changed. A diff of the .cmd files show a repeated
      -mfentry in one of the files. That is because "make targz-pkg" calls
      "make modules_install" and the environment is already populated with
      the exported variables, CC_FLAGS_FTRACE being one of them. Then,
      -mfentry gets duplicated because it is not protected behind an ifndef
      block, like -pg.
      
      To complicate the problem a little bit more, architectures can define
      their own version CC_FLAGS_FTRACE, so our code not only has to
      consider recursive Makefiles, but also architecture overrides.
      
      So in this patch we move CC_FLAGS_FTRACE up and unconditionally
      define it to -pg. Then we let the architecture Makefiles possibly
      override it, and finally append the extra options later. This ensures
      the variable is always fully redefined at each invocation so recursive
      Makefiles don't keep appending, and hopefully it maintains the
      intended behavior on how architectures can override the defaults..
      
      Thanks Steven Rostedt and Vasily Gorbik for the help on this
      regression.
      
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: linux-kbuild@vger.kernel.org
      Fixes: commit f28bc3c3 ("tracing: Handle CC_FLAGS_FTRACE more accurately")
      Acked-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      b1f4ff74
  8. Sep 10, 2018
  9. Sep 05, 2018
  10. Sep 02, 2018
  11. Aug 31, 2018
  12. Aug 26, 2018
  13. Aug 23, 2018
  14. Aug 22, 2018
  15. Aug 20, 2018
  16. Aug 16, 2018
  17. Aug 12, 2018
  18. Aug 09, 2018
  19. Aug 07, 2018
  20. Aug 05, 2018
  21. Jul 29, 2018
  22. Jul 28, 2018
  23. Jul 25, 2018
    • Masahiro Yamada's avatar
      kbuild: remove auto.conf from prerequisite of phony targets · 2063945f
      Masahiro Yamada authored
      
      The top-level Makefile adds include/config/auto.conf as
      prerequisites of 'scripts', 'prepare1', etc.
      
      They were needed to terminate the build when include/config/auto.conf
      is missing.
      
      Now that the inclusion of include/config/auto.conf is mandatory
      in the top-level Makefile if dot-config is 1 (Note 'include' directive
      is used instead of '-include').
      
      Make terminates the build by itself if it fails to create or update
      include/config/auto.conf so we are sure that include/config/auto.conf
      exists in the very first stage of make.
      
      I am still keeping include/config/auto.conf as the prerequisite of
      %/modules.builtin because modules.builtin is a real file.  According
      to commit a6c36632 ("kbuild: Do not unnecessarily regenerate
      modules.builtin"), it is intentional to compare time-stamps between
      %/modules.builtin and include/config/auto.conf .  I moved tristate.conf
      here because it is only included from scripts/Makefile.modbuiltin.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      2063945f
    • Masahiro Yamada's avatar
      kbuild: do not update config for 'make kernelrelease' · a29d4d8c
      Masahiro Yamada authored
      
      'make kernelrelease' depends on CONFIG_LOCALVERSION(_AUTO), but
      for the same reason as install targets, we do not want to update
      the configuration just for printing the kernelrelease string.
      
      This is likely to happen when you compiled the kernel with
      CROSS_COMPILE, but forget to pass it to 'make kernelrelease'.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      a29d4d8c
    • Masahiro Yamada's avatar
      kbuild: do not update config when running install targets · d7942413
      Masahiro Yamada authored
      
      "make syncconfig" is automatically invoked when any of the following
      happens:
      
       - .config is updated
       - any of Kconfig files is updated
       - any of environment variables referenced in Kconfig is changed
      
      Then, it updates configuration files such as include/config/auto.conf
      include/generated/autoconf.h, etc.
      
      Even install targets (install, modules_install, etc.) are no exception.
      However, they should never ever modify the source tree.  Install
      targets are often run with root privileges.  Once those configuration
      files are owned by root, "make mrproper" would end up with permission
      error.
      
      Install targets should just copy things blindly.  They should not care
      whether the configuration is up-to-date or not.  This makes more sense
      because we are interested in the configuration that was used in the
      previous kernel building.
      
      This issue has existed since before, but rarely happened.  I expect
      more chance where people are hit by this; with the new Kconfig syntax
      extension, the .config now contains the compiler information.  If you
      cross-compile the kernel with CROSS_COMPILE, but forget to pass it
      for "make install", you meet "any of environment variables referenced
      in Kconfig is changed" because $(CC) is referenced in Kconfig.
      Another scenario is the compiler upgrade before the installation.
      
      Install targets need the configuration.  "make modules_install" refer
      to CONFIG_MODULES etc.  "make dtbs_install" also needs CONFIG_ARCH_*
      to decide which dtb files to install.  However, the auto-update of
      the configuration files should be avoided.  We already do this for
      external modules.
      
      Now, Make targets are categorized into 3 groups:
      
      [1] Do not need the kernel configuration at all
      
          help, coccicheck, headers_install etc.
      
      [2] Need the latest kernel configuration
      
          If new config options are added, Kconfig will show prompt to
          ask user's selection.
      
          Build targets such as vmlinux, in-kernel modules are the cases.
      
      [3] Need the kernel configuration, but do not want to update it
      
          Install targets except headers_install, and external modules
          are the cases.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      d7942413
    • Masahiro Yamada's avatar
      kbuild: use 'include' directive to load auto.conf from top Makefile · 0a16d2e8
      Masahiro Yamada authored
      
      When you build targets that require the kernel configuration, dot-config
      is set to 1, then the top-level Makefile includes auto.conf.  However,
      Make considers its inclusion is optional because the '-include' directive
      is used here.
      
      If a necessary configuration file is missing for the external module
      building, the following error message is displayed:
      
        ERROR: Kernel configuration is invalid.
               include/generated/autoconf.h or include/config/auto.conf are missing.
               Run 'make oldconfig && make prepare' on kernel src to fix it.
      
      However, Make still continues building; /bin/false let the creation of
      'include/config/auto.config' fail, but Make can ignore the error since
      it is included by the '-include' directive.
      
      I guess the reason of using '-include' directive was to suppress
      the warning when you build the kernel from a pristine source tree:
      
        Makefile:605: include/config/auto.conf: No such file or directory
      
      The previous commit made sure include/config/auto.conf exists after
      the 'make *config' stage.  Now, we can use the 'include' directive
      without showing the warning.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      0a16d2e8
  24. Jul 22, 2018
  25. Jul 17, 2018
  26. Jul 15, 2018
  27. Jul 12, 2018
  28. Jul 08, 2018
  29. Jul 06, 2018
  30. Jul 01, 2018
Loading