Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Aug 29, 2019
  2. Aug 28, 2019
    • Masahiro Yamada's avatar
      init/Kconfig: rework help of CONFIG_CC_OPTIMIZE_FOR_SIZE · ce3b487f
      Masahiro Yamada authored
      CONFIG_CC_OPTIMIZE_FOR_SIZE was originally an independent boolean
      option, but commit 877417e6
      
       ("Kbuild: change CC_OPTIMIZE_FOR_SIZE
      definition") turned it into a choice between _PERFORMANCE and _SIZE.
      
      The phrase "If unsure, say N." sounds like an independent option.
      Reword the help text to make it appropriate for the choice menu.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      ce3b487f
    • Masahiro Yamada's avatar
      docs: kbuild: remove cc-ldoption from document again · d20558d1
      Masahiro Yamada authored
      Commit 055efab3 ("kbuild: drop support for cc-ldoption") correctly
      removed the cc-ldoption from Documentation/kbuild/makefiles.txt, but
      commit cd238eff ("docs: kbuild: convert docs to ReST and rename
      to *.rst") revived it. I guess it was a rebase mistake.
      
      Remove it again.
      
      Fixes: cd238eff
      
       ("docs: kbuild: convert docs to ReST and rename to *.rst")
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      d20558d1
    • Masahiro Yamada's avatar
      docs: kbuild: fix invalid ReST syntax · 4fef9dec
      Masahiro Yamada authored
      I see the following warnings when I open this document with a ReST
      viewer, retext:
      
      /home/masahiro/ref/linux/Documentation/kbuild/makefiles.rst:1142: (WARNING/2) Inline emphasis start-string without end-string.
      /home/masahiro/ref/linux/Documentation/kbuild/makefiles.rst:1152: (WARNING/2) Inline emphasis start-string without end-string.
      /home/masahiro/ref/linux/Documentation/kbuild/makefiles.rst:1154: (WARNING/2) Inline emphasis start-string without end-string.
      
      These hunks were added by commit e846f0dc ("kbuild: add support
      for ensuring headers are self-contained") and commit 1e21cbfa
      ("kbuild: support header-test-pattern-y"), respectively. They were
      written not for ReST but for the plain text, and merged via the
      kbuild tree.
      
      In the same development cycle, this document was converted to ReST
      by commit cd238eff ("docs: kbuild: convert docs to ReST and rename
      to *.rst"), and merged via the doc sub-system.
      
      Merging them together into Linus' tree resulted in the current situation.
      
      To fix the syntax, surround the asterisks with back-quotes, and
      use :: for the code sample.
      
      Fixes: 39ceda5c ("Merge tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild"
      
      )
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      4fef9dec
  3. Aug 24, 2019
  4. Aug 21, 2019
  5. Aug 14, 2019
  6. Aug 13, 2019
    • Masahiro Yamada's avatar
      kbuild: add [M] marker for build log of *.mod.o · f6545bec
      Masahiro Yamada authored
      
      This builds module objects, so [M] makes sense.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f6545bec
    • Thomas Gleixner's avatar
      Kbuild: Handle PREEMPT_RT for version string and magic · 4b950bb9
      Thomas Gleixner authored
      
      Update the build scripts and the version magic to reflect when
      CONFIG_PREEMPT_RT is enabled in the same way as CONFIG_PREEMPT is treated.
      
      The resulting version strings:
      
        Linux m 5.3.0-rc1+ #100 SMP Fri Jul 26 ...
        Linux m 5.3.0-rc1+ #101 SMP PREEMPT Fri Jul 26 ...
        Linux m 5.3.0-rc1+ #102 SMP PREEMPT_RT Fri Jul 26 ...
      
      The module vermagic:
      
        5.3.0-rc1+ SMP mod_unload modversions
        5.3.0-rc1+ SMP preempt mod_unload modversions
        5.3.0-rc1+ SMP preempt_rt mod_unload modversions
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      4b950bb9
    • Masahiro Yamada's avatar
      kbuild: move flex and bison rules to Makefile.host · cf8dfd15
      Masahiro Yamada authored
      
      Flex and bison are used for kconfig, dtc, genksyms, all of which are
      host programs. I never imagine the kernel embeds a parser or a lexer.
      
      Move the flex and bison rules to scripts/Makefile.host. This file is
      included only when hostprogs-y etc. is present in the Makefile in the
      directory. So, parsing these rules are skipped in most of directories.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cf8dfd15
    • Masahiro Yamada's avatar
      kbuild: make bison create C file and header in a single pattern rule · 6ba7dc66
      Masahiro Yamada authored
      We generally expect bison to create not only a C file, but also a
      header, which will be included from the lexer.
      
      Currently, Kbuild generates them in separate rules. So, for instance,
      when building Kconfig, you will notice bison is invoked twice:
      
        HOSTCC  scripts/kconfig/conf.o
        HOSTCC  scripts/kconfig/confdata.o
        HOSTCC  scripts/kconfig/expr.o
        LEX     scripts/kconfig/lexer.lex.c
        YACC    scripts/kconfig/parser.tab.h
        HOSTCC  scripts/kconfig/lexer.lex.o
        YACC    scripts/kconfig/parser.tab.c
        HOSTCC  scripts/kconfig/parser.tab.o
        HOSTCC  scripts/kconfig/preprocess.o
        HOSTCC  scripts/kconfig/symbol.o
        HOSTLD  scripts/kconfig/conf
      
      Make handles such cases nicely in pattern rules [1]. Merge the two
      rules so that one invokcation of bison can generate both of them.
      
        HOSTCC  scripts/kconfig/conf.o
        HOSTCC  scripts/kconfig/confdata.o
        HOSTCC  scripts/kconfig/expr.o
        LEX     scripts/kconfig/lexer.lex.c
        YACC    scripts/kconfig/parser.tab.[ch]
        HOSTCC  scripts/kconfig/lexer.lex.o
        HOSTCC  scripts/kconfig/parser.tab.o
        HOSTCC  scripts/kconfig/preprocess.o
        HOSTCC  scripts/kconfig/symbol.o
        HOSTLD  scripts/kconfig/conf
      
      [1] Pattern rule
      
      GNU Make manual says:
      "Pattern rules may have more than one target. Unlike normal rules,
      this does not act as many different rules with the same prerequisites
      and recipe. If a pattern rule has multiple targets, make knows that
      the rule's recipe is responsible for making all of the targets. The
      recipe is executed only once to make all the targets. When searching
      for a pattern rule to match a target, the target patterns of a rule
      other than the one that matches the target in need of a rule are
      incidental: make worries only about giving a recipe and prerequisites
      to the file presently in question. However, when this file's recipe is
      run, the other targets are marked as having been updated themselves."
      
      https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html
      
      
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      6ba7dc66
    • Masahiro Yamada's avatar
      kbuild: use $(basename ...) for cmd_asn1_compiler · 49d5089d
      Masahiro Yamada authored
      
      $(basename ...) trims the last suffix. Using it is more intuitive in
      my opinion.
      
      This pattern rule makes %.asn1.c and %.asn1.h at the same time.
      Previously, the short log showed only either of them, depending on
      the target file in question.
      
      To clarify that two files are being generated by the single recipe,
      I changed the log as follows:
      
      Before:
      
        ASN.1   crypto/asymmetric_keys/x509.asn1.c
      
      After:
      
        ASN.1   crypto/asymmetric_keys/x509.asn1.[ch]
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      49d5089d
    • Thomas Gleixner's avatar
      kbuild: Fail if gold linker is detected · 75959d44
      Thomas Gleixner authored
      
      The gold linker has known issues of failing the build both in random and in
      predictible ways:
      
       - The x86/X32 VDSO build fails with:
      
         arch/x86/entry/vdso/vclock_gettime-x32.o:vclock_gettime.c:function do_hres:
         error: relocation overflow: reference to 'hvclock_page'
      
         That's a known issue for years and the usual workaround is to disable
         CONFIG_X86_32
      
       - A recent build failure is caused by turning a relocation into an
         absolute one for unknown reasons. See link below.
      
       - There are a couple of gold workarounds applied already, but reports
         about broken builds with ld.gold keep coming in on a regular base and in
         most cases the root cause is unclear.
      
      In context of the most recent fail H.J. stated:
      
        "Since building a workable kernel for different kernel configurations
         isn't a requirement for gold, I don't recommend gold for kernel."
      
      So instead of dealing with attempts to duct tape gold support without
      understanding the root cause and without support from the gold folks, fail
      the build when gold is detected.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Link: https://lore.kernel.org/r/CAMe9rOqMqkQ0LNpm25yE_Yt0FKp05WmHOrwc0aRDb53miFKM+w@mail.gmail.com
      
      
      Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Tested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      75959d44