<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Kbuild.include</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>214c0eea - kbuild: add $(objtree)/ prefix to some in-kernel build artifacts</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#214c0eea</link>
        <description>kbuild: add $(objtree)/ prefix to some in-kernel build artifacts$(objtree) refers to the top of the output directory of kernel builds.This commit adds the explicit $(objtree)/ prefix to build artifactsneeded for building external modules.This change has no immediate impact, as the top-level Makefilecurrently defines:  objtree         := .This commit prepares for supporting the building of external modulesin a different directory.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Sun, 10 Nov 2024 01:34:30 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>5f99665e - kbuild: raise the minimum GNU Make requirement to 4.0</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#5f99665e</link>
        <description>kbuild: raise the minimum GNU Make requirement to 4.0RHEL/CentOS 7, popular distributions that install GNU Make 3.82, reachedEOM/EOL on June 30, 2024. While you may get extended support, it is agood time to raise the minimum GNU Make version.The new requirement, GNU Make 4.0, was released in October, 2013.I did not touch the Makefiles under tools/ because I do not know therequirements for building tools. I do not find any GNU Make versionchecks under tools/.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Thu, 04 Jul 2024 13:47:55 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>b1992c37 - kbuild: use $(src) instead of $(srctree)/$(src) for source directory</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#b1992c37</link>
        <description>kbuild: use $(src) instead of $(srctree)/$(src) for source directoryKbuild conventionally uses $(obj)/ for generated files, and $(src)/ forchecked-in source files. It is merely a convention without any functionaldifference. In fact, $(obj) and $(src) are exactly the same, as definedin scripts/Makefile.build:    src := $(obj)When the kernel is built in a separate output directory, $(src) doesnot accurately reflect the source directory location. While Kbuildresolves this discrepancy by specifying VPATH=$(srctree) to search forsource files, it does not cover all cases. For example, when adding aheader search path for local headers, -I$(srctree)/$(src) is typicallypassed to the compiler.This introduces inconsistency between upstream and downstream Makefilesbecause $(src) is used instead of $(srctree)/$(src) for the latter.To address this inconsistency, this commit changes the semantics of$(src) so that it always points to the directory in the source tree.Going forward, the variables used in Makefiles will have the followingmeanings:  $(obj)     - directory in the object tree  $(src)     - directory in the source tree  (changed by this commit)  $(objtree) - the top of the kernel object tree  $(srctree) - the top of the kernel source treeConsequently, $(srctree)/$(src) in upstream Makefiles need to be replacedwith $(src).Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Sat, 27 Apr 2024 14:55:02 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>8f66864c - kbuild: simplify dtbs_install by reading the list of compiled DTBs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#8f66864c</link>
        <description>kbuild: simplify dtbs_install by reading the list of compiled DTBsRetrieve the list of *.dtb(o) files from arch/*/boot/dts/dtbs-listinstead of traversing the directory tree again.Please note that &apos;make dtbs_install&apos; installs *.dtb(o) files directlyadded to dtb-y because scripts/Makefile.dtbinst installs $(dtb-y)without expanding the -dtbs suffix.This commit preserves this behavior.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Tue, 09 Jan 2024 12:07:35 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>12fec3d6 - kbuild: replace $(dot-target).tmp in filechk with $(tmp-target)</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#12fec3d6</link>
        <description>kbuild: replace $(dot-target).tmp in filechk with $(tmp-target)$(tmp-target) is a better fit for local use like this.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Mon, 09 Jan 2023 13:40:40 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>ee2162bd - kbuild: add more comments for KBUILD_NOCMDDEP=1</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#ee2162bd</link>
        <description>kbuild: add more comments for KBUILD_NOCMDDEP=1The cmd-check for KBUILD_NOCMDDEP=1 may not be clear until you seecommit c4d5ee13984f (&quot;kbuild: make KBUILD_NOCMDDEP=1 handle emptybuilt-in.o&quot;).When a phony target (i.e. FORCE) is the only prerequisite, Kbuilduses a tricky way to detect that the target does not exist.Add more comments.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Thu, 29 Dec 2022 09:15:01 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>92215e7a - kbuild: rename cmd_$@ to savedcmd_$@ in *.cmd files</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#92215e7a</link>
        <description>kbuild: rename cmd_$@ to savedcmd_$@ in *.cmd filesThe cmd-check macro compares $(cmd_$@) and $(cmd_$1), but a pitfall isthat you cannot use cmd_&lt;target&gt; as the variable name for the command.For example, the following code will not work in the top Makefileor ./Kbuild.    quiet_cmd_foo = GEN     $@          cmd_foo = touch $@    targets += foo    foo: FORCE            $(call if_changed,foo)In this case, both $@ and $1 are expanded to &apos;foo&apos;, so $(cmd_check)is always empty.We do not need to use the same prefix for cmd_$@ and cmd_$1.Rename the former to savedcmd_$@.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Thu, 29 Dec 2022 09:15:00 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>6ae4b986 - kbuild: allow to combine multiple V= levels</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#6ae4b986</link>
        <description>kbuild: allow to combine multiple V= levelsCommit a6de553da01c (&quot;kbuild: Allow to combine multiple W= levels&quot;)supported W=123 to enable all the extra warning groups.I think a similar idea is applicable to the V= option.  V=1 echos the whole command  V=2 prints the reason for rebuildingThese are orthogonal, and can be enabled at the same time.This commit supports V=12 to enable both of them.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Tested-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Thu, 22 Dec 2022 16:25:34 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>8962b6b4 - kbuild: print short log in addition to the whole command with V=1</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#8962b6b4</link>
        <description>kbuild: print short log in addition to the whole command with V=1&quot;make V=1&quot; prints the whole command instead of the short log, but Ithink it is nicer to print both so that you can easily spot the buildrule of your interest.This commit changes V=1 to print the short log (the line starts with&apos;#&apos;), followed by the full log.In parallel builds, the short/full logs from the same build rule maybe interspersed. If you want to avoid it, please add -Otarget option.Kbuild will never set it by default because Make would buffer the logsand lose the escape sequences. (Modern compilers print warnings anderrors in color, but only when they write to a terminal.)This is also a preparation for supporting V=12 because V=2 appends thereason for rebuilding to the short log.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Tested-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Thu, 22 Dec 2022 16:25:32 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>875ef1a5 - kbuild: use .NOTINTERMEDIATE for future GNU Make versions</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#875ef1a5</link>
        <description>kbuild: use .NOTINTERMEDIATE for future GNU Make versionsIn Kbuild, some files are generated by chains of pattern/implicit rules.For example, *.dtb.o files in drivers/of/unittest-data/Makefile aregenerated by the chain of 3 pattern rules, like this:  %.dts  -&gt;  %.dtb  -&gt;  %.dtb.S  -&gt;  %.dtb.oHere, %.dts is the real source, %.dtb.o is the final target.%.dtb and %.dtb.S are called &quot;intermediate files&quot;.As GNU Make manual [1] says, intermediate files are treated differentlyin two ways: (a) The first difference is what happens if the intermediate file does   not exist. If an ordinary file &apos;b&apos; does not exist, and make considers   a target that depends on &apos;b&apos;, it invariably creates &apos;b&apos; and then   updates the target from &apos;b&apos;. But if &apos;b&apos; is an intermediate file, then   make can leave well enough alone: it won&apos;t create &apos;b&apos; unless one of   its prerequisites is out of date. This means the target depending   on &apos;b&apos; won&apos;t be rebuilt either, unless there is some other reason   to update that target: for example the target doesn&apos;t exist or a   different prerequisite is newer than the target. (b) The second difference is that if make does create &apos;b&apos; in order to   update something else, it deletes &apos;b&apos; later on after it is no longer   needed. Therefore, an intermediate file which did not exist before   make also does not exist after make. make reports the deletion to   you by printing a &apos;rm&apos; command showing which file it is deleting.The combination of these is problematic for Kbuild because most of thebuild rules depend on FORCE and the if_changed* macros really determineif the target should be updated. So, all missing files, whether theyare intermediate or not, are always rebuilt.To see the problem, delete &quot;.SECONDARY:&quot; from scripts/Kbuild.include,and repeat this command:  $ make allmodconfig drivers/of/unittest-data/The intermediate files will be deleted, which results in rebuildingintermediate and final objects in the next run of make.In the old days, people suppressed (b) in inconsistent ways.As commit 54a702f70589 (&quot;kbuild: mark $(targets) as .SECONDARY andremove .PRECIOUS markers&quot;) noted, you should not use .PRECIOUS because.PRECIOUS has the following behavior (c), which is not likely what youwant. (c) If make is killed or interrupted during the execution of their   recipes, the target is not deleted. Also, the target is not deleted   on error even if .DELETE_ON_ERROR is specified..SECONDARY is a much better way to disable (b), but a small problemis that .SECONDARY enables (a), which gives a side-effect to $?;prerequisites marked as .SECONDARY do not appear in $?. This is adrawback for Kbuild.I thought it was a bug and opened a bug report. As Paul, the GNU Makemaintainer, concluded in [2], this is not a bug.A good news is that, GNU Make 4.4 added the perfect solution,.NOTINTERMEDIATE, which cancels both (a) and (b).For clarificaton, my understanding of .INTERMEDIATE, .SECONDARY,.PRECIOUS and .NOTINTERMEDIATE are as follows:                        (a)         (b)         (c)  .INTERMEDIATE        enable      enable      disable  .SECONDARY           enable      disable     disable  .PRECIOUS            disable     disable     enable  .NOTINTERMEDIATE     disable     disable     disableHowever, GNU Make 4.4 has a bug for the global .NOTINTERMEDIATE. [3]It was fixed by commit 6164608900ad (&quot;[SV 63417] Ensure global.NOTINTERMEDIATE disables all intermediates&quot;), and will be availablein the next release of GNU Make.The following is the gain for .NOTINTERMEDIATE:  [Current Make]      $ make allnoconfig vmlinux          [ full build ]      $ rm include/linux/device.h      $ make vmlinux        CALL    scripts/checksyscalls.sh  Make does not notice the removal of &lt;linux/device.h&gt;.  [Future Make]      $ make-latest allnoconfig vmlinux          [ full build ]      $ rm include/linux/device.h      $ make-latest vmlinux        CC      arch/x86/kernel/asm-offsets.s      In file included from ./include/linux/writeback.h:13,                       from ./include/linux/memcontrol.h:22,                       from ./include/linux/swap.h:9,                       from ./include/linux/suspend.h:5,                       from arch/x86/kernel/asm-offsets.c:13:      ./include/linux/blk_types.h:11:10: fatal error: linux/device.h: No such file or directory         11 | #include &lt;linux/device.h&gt;            |          ^~~~~~~~~~~~~~~~      compilation terminated.      make-latest[1]: *** [scripts/Makefile.build:114: arch/x86/kernel/asm-offsets.s] Error 1      make-latest: *** [Makefile:1282: prepare0] Error 2  Make notices the removal of &lt;linux/device.h&gt;, and rebuilds objects  that depended on &lt;linux/device.h&gt;. There exists a source file that  includes &lt;linux/device.h&gt;, and it raises an error.To see detailed background information, refer to commit 2d3b1b8f0da7(&quot;kbuild: drop $(wildcard $^) check in if_changed* for faster rebuild&quot;).[1]: https://www.gnu.org/software/make/manual/make.html#Chained-Rules[2]: https://savannah.gnu.org/bugs/?55532[3]: https://savannah.gnu.org/bugs/?63417Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Sun, 11 Dec 2022 03:10:59 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>6768fa4b - kbuild: add read-file macro</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#6768fa4b</link>
        <description>kbuild: add read-file macroSince GNU Make 4.2, $(file ...) supports the read operater &apos;&lt;&apos;, whichis useful to read a file without forking a new process. No warning isshown even if the input file is missing.For older Make versions, it falls back to the cat command.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;Reviewed-by: Alexander Lobakin &lt;alexandr.lobakin@intel.com&gt;Tested-by: Alexander Lobakin &lt;alexandr.lobakin@intel.com&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Sun, 11 Dec 2022 02:54:47 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>fccb3d3e - kbuild: add test-{ge,gt,le,lt} macros</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#fccb3d3e</link>
        <description>kbuild: add test-{ge,gt,le,lt} macrosGNU Make 4.4 introduced $(intcmp ...), which is useful to compare twointegers without forking a new process.Add test-{ge,gt,le,lt} macros, which work more efficiently with GNUMake &gt;= 4.4. For older Make versions, they fall back to the &apos;test&apos;shell command.The first two parameters to $(intcmp ...) must not be empty. To avoidthe syntax error, I appended &apos;0&apos; to them. Fortunately, &apos;00&apos; is treatedas &apos;0&apos;. This is needed because CONFIG options may expand to an emptystring when the kernel configuration is not included.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Acked-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt; # RISC-VReviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Sun, 11 Dec 2022 02:46:47 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>a2430b25 - kbuild: add kbuild-file macro</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#a2430b25</link>
        <description>kbuild: add kbuild-file macroWhile building, installing, cleaning, Kbuild visits sub-directoriesand includes &apos;Kbuild&apos; or &apos;Makefile&apos; that exists there.Add &apos;kbuild-file&apos; macro, and reuse it from scripts/Makefie.*Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;Reviewed-by: Alexander Lobakin &lt;alobakin@pm.me&gt;Tested-by: Alexander Lobakin &lt;alobakin@pm.me&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Fri, 18 Nov 2022 19:15:50 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>a7f3257d - kbuild: remove the target in signal traps when interrupted</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#a7f3257d</link>
        <description>kbuild: remove the target in signal traps when interruptedWhen receiving some signal, GNU Make automatically deletes the target ifit has already been changed by the interrupted recipe.If the target is possibly incomplete due to interruption, it must bedeleted so that it will be remade from scratch on the next run of make.Otherwise, the target would remain corrupted permanently because itstimestamp had already been updated.Thanks to this behavior of Make, you can stop the build any time bypressing Ctrl-C, and just run &apos;make&apos; to resume it.Kbuild also relies on this feature, but it is equivalently importantfor any build systems that make decisions based on timestamps (if youwant to support Ctrl-C reliably).However, this does not always work as claimed; Make immediately dieswith Ctrl-C if its stderr goes into a pipe.  [Test Makefile]    foo:            echo hello &gt; $@            sleep 3            echo world &gt;&gt; $@  [Test Result]    $ make                         # hit Ctrl-C    echo hello &gt; foo    sleep 3    ^Cmake: *** Deleting file &apos;foo&apos;    make: *** [Makefile:3: foo] Interrupt    $ make 2&gt;&amp;1 | cat              # hit Ctrl-C    echo hello &gt; foo    sleep 3    ^C$                            # &apos;foo&apos; is often left-overThe reason is because SIGINT is sent to the entire process group.In this example, SIGINT kills &apos;cat&apos;, and &apos;make&apos; writes the message tothe closed pipe, then dies with SIGPIPE before cleaning the target.A typical bad scenario (as reported by [1], [2]) is to save build logby using the &apos;tee&apos; command:    $ make 2&gt;&amp;1 | tee logThis can be problematic for any build systems based on Make, so I hopeit will be fixed in GNU Make. The maintainer of GNU Make stated this isa long-standing issue and difficult to fix [3]. It has not been fixedyet as of writing.So, we cannot rely on Make cleaning the target. We can do it byourselves, in signal traps.As far as I understand, Make takes care of SIGHUP, SIGINT, SIGQUIT, andSITERM for the target removal. I added the traps for them, and also forSIGPIPE just in case cmd_* rule prints something to stdout or stderr(but I did not observe an actual case where SIGPIPE was triggered).[Note 1]The trap handler might be worth explaining.    rm -f $@; trap - $(sig); kill -s $(sig) $$This lets the shell kill itself by the signal it caught, so the parentprocess can tell the child has exited on the signal. Generally, this isa proper manner for handling signals, in case the calling program (likeBash) may monitor WIFSIGNALED() and WTERMSIG() for WCE although this maynot be a big deal here because GNU Make handles SIGHUP, SIGINT, SIGQUITin WUE and SIGTERM in IUE.  IUE - Immediate Unconditional Exit  WUE - Wait and Unconditional Exit  WCE - Wait and Cooperative ExitFor details, see &quot;Proper handling of SIGINT/SIGQUIT&quot; [4].[Note 2]Reverting 392885ee82d3 (&quot;kbuild: let fixdep directly write to .*.cmdfiles&quot;) would directly address [1], but it only saves if_changed_dep.As reported in [2], all commands that use redirection can potentiallyleave an empty (i.e. broken) target.[Note 3]Another (even safer) approach might be to always write to a temporaryfile, and rename it to $@ at the end of the recipe.   &lt;command&gt;  &gt; $(tmp-target)   mv $(tmp-target) $@It would require a lot of Makefile changes, and result in ugly code,so I did not take it.[Note 4]A little more thoughts about a pattern rule with multiple targets (ora grouped target).    %.x %.y: %.z            &lt;recipe&gt;When interrupted, GNU Make deletes both %.x and %.y, while this solutiononly deletes $@. Probably, this is not a big deal. The next run of makewill execute the rule again to create $@ along with the other files.[1]: https://lore.kernel.org/all/YLeot94yAaM4xbMY@gmail.com/[2]: https://lore.kernel.org/all/20220510221333.2770571-1-robh@kernel.org/[3]: https://lists.gnu.org/archive/html/help-make/2021-06/msg00001.html[4]: https://www.cons.org/cracauer/sigint.htmlFixes: 392885ee82d3 (&quot;kbuild: let fixdep directly write to .*.cmd files&quot;)Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;Reported-by: Rob Herring &lt;robh@kernel.org&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Tested-by: Ingo Molnar &lt;mingo@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Sun, 07 Aug 2022 00:48:09 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>ebd191b3 - kbuild: add cmd_and_savecmd macro</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#ebd191b3</link>
        <description>kbuild: add cmd_and_savecmd macroSeparate out the command execution part of if_changed, as we didfor if_changed_dep.This allows us to reuse it in if_changed_rule.  define rule_foo          $(call cmd_and_savecmd,foo)          $(call cmd,bar)  endefSigned-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;n.schier@avm.de&gt;Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt; # LLVM-14 (x86-64)

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Fri, 27 May 2022 10:01:54 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>c25e1c55 - kbuild: do not create *.prelink.o for Clang LTO or IBT</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#c25e1c55</link>
        <description>kbuild: do not create *.prelink.o for Clang LTO or IBTWhen CONFIG_LTO_CLANG=y, additional intermediate *.prelink.o is createdfor each module. Also, objtool is postponed until LLVM IR is convertedto ELF.CONFIG_X86_KERNEL_IBT works in a similar way to postpone objtool untilobjects are merged together.This commit stops generating *.prelink.o, so the build flow will looksimilar with/without LTO.The following figures show how the LTO build currently works, andhow this commit is changing it.Current build flow================== [1] single-object module                                      $(LD)           $(CC)                     +objtool              $(LD)    foo.c --------------------&gt; foo.o -----&gt; foo.prelink.o -----&gt; foo.ko                              (LLVM IR)          (ELF)       |    (ELF)                                                             |                                                 foo.mod.o --/                                                 (LLVM IR) [2] multi-object module                                      $(LD)           $(CC)         $(AR)       +objtool               $(LD)    foo1.c -----&gt; foo1.o -----&gt; foo.o -----&gt; foo.prelink.o -----&gt; foo.ko                           |  (archive)          (ELF)       |    (ELF)    foo2.c -----&gt; foo2.o --/                                 |                 (LLVM IR)                       foo.mod.o --/                                                 (LLVM IR)  One confusion is that foo.o in multi-object module is an archive  despite of its suffix.New build flow============== [1] single-object module  Since there is only one object, there is no need to keep the LLVM IR.  Use $(CC)+$(LD) to generate an ELF object in one build rule. When LTO  is disabled, $(LD) is unneeded because $(CC) produces an ELF object.               $(CC)+$(LD)+objtool              $(LD)    foo.c ----------------------------&gt; foo.o ---------&gt; foo.ko                                        (ELF)     |      (ELF)                                                  |                                      foo.mod.o --/                                      (LLVM IR) [2] multi-object module  Previously, $(AR) was used to combine LLVM IR files into an archive,  but there was no technical reason to do so. Use $(LD) to merge them  into a single ELF object.                               $(LD)             $(CC)            +objtool          $(LD)    foo1.c ---------&gt; foo1.o ---------&gt; foo.o ---------&gt; foo.ko                                 |      (ELF)     |      (ELF)    foo2.c ---------&gt; foo2.o ----/                |                     (LLVM IR)        foo.mod.o --/                                      (LLVM IR)Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Nicolas Schier &lt;nicolas@fjasle.eu&gt;Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt; # LLVM-14 (x86-64)Acked-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Fri, 27 May 2022 10:01:49 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>b8c96a6b - certs: simplify $(srctree)/ handling and remove config_filename macro</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#b8c96a6b</link>
        <description>certs: simplify $(srctree)/ handling and remove config_filename macroThe complex macro, config_filename, was introduced to do: [1] drop double-quotes from the string value [2] add $(srctree)/ prefix in case the file is not found in $(objtree) [3] escape spaces and more[1] will be more generally handled by Kconfig later.As for [2], Kbuild uses VPATH to search for files in $(objtree),$(srctree) in this order. GNU Make can natively handle it.As for [3], converting $(space) to $(space_escape) back and forth looksquestionable to me. It is well-known that GNU Make cannot handle filepaths with spaces in the first place.Instead of using the complex macro, use $&lt; so it will be expanded tothe file path of the key.Remove config_filename, finally.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Tue, 14 Dec 2021 02:53:51 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>e1f86d7b - kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#e1f86d7b</link>
        <description>kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechkif_changed, if_changed_dep, and if_changed_rule must have FORCE as aprerequisite so the command line change is detected.Documentation/kbuild/makefiles.rst clearly explains it:  Note: It is a typical mistake to forget the FORCE prerequisite.However, not all people follow the document.This mistake occurred again and again, so a compelling force is needed.Show a warning if FORCE is missing in the prerequisite of if_changedand friends. Same for filechk.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Tested-by: Nicolas Schier &lt;n.schier@avm.de&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Fri, 13 Aug 2021 06:30:05 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>6796e804 - kbuild: macrofy the condition of if_changed and friends</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#6796e804</link>
        <description>kbuild: macrofy the condition of if_changed and friendsAdd a new macro that expands into $(newer-prereqs)$(cmd-check).It makes it easier to add common code for if_changed, if_changed_dep,and if_changed_rule.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Fri, 13 Aug 2021 06:30:04 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>174a1dcc - kbuild: sink stdout from cmd for silent build</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/Kbuild.include#174a1dcc</link>
        <description>kbuild: sink stdout from cmd for silent buildWhen building with &apos;make -s&apos;, no output to stdout should be printed.As Arnd Bergmann reported [1], mkimage shows the detailed informationof the generated images.I think this should be suppressed by the &apos;cmd&apos; macro instead of byindividual scripts.Insert &apos;exec &gt;/dev/null;&apos; in order to redirect stdout to /dev/null forsilent builds.[Note about this implementation]&apos;exec &gt;/dev/null;&apos; may look somewhat tricky, but this has a reason.Appending &apos;&gt;/dev/null&apos; at the end of command line is a common way forredirection, so I first tried this:  cmd = @set -e; $(echo-cmd) $(cmd_$(1)) &gt;/dev/null... but it would not work if $(cmd_$(1)) itself contains a redirection.For example, cmd_wrap in scripts/Makefile.asm-generic redirects theoutput from the &apos;echo&apos; command into the target file.It would be expanded into:  echo &quot;#include &lt;asm-generic/$*.h&gt;&quot; &gt; $@ &gt;/dev/nullThen, the target file gets empty because the string will go to /dev/nullinstead of $@.Next, I tried this:  cmd = @set -e; $(echo-cmd) { $(cmd_$(1)); } &gt;/dev/nullThe form above would be expanded into:  { echo &quot;#include &lt;asm-generic/$*.h&gt;&quot; &gt; $@; } &gt;/dev/nullThis works as expected. However, it would be a syntax error if$(cmd_$(1)) is empty.When CONFIG_TRIM_UNUSED_KSYMS is disabled, $(call cmd,gen_ksymdeps) inscripts/Makefile.build would be expanded into:  set -e;  { ; } &gt;/dev/null..., which causes an syntax error.I also tried this:  cmd = @set -e; $(echo-cmd) ( $(cmd_$(1)) ) &gt;/dev/null... but this causes a syntax error for the same reason.So, finally I adopted:  cmd = @set -e; $(echo-cmd) exec &gt;/dev/null; $(cmd_$(1))[1]: https://lore.kernel.org/lkml/20210514135752.2910387-1-arnd@kernel.org/Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/Kbuild.include</description>
        <pubDate>Mon, 17 May 2021 07:03:13 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
