diff mbox series

Revert "kbuild: add --include-dir flag only for out-of-tree build"

Message ID 20181103201504.29413-1-ard.biesheuvel@linaro.org (mailing list archive)
State New, archived
Headers show
Series Revert "kbuild: add --include-dir flag only for out-of-tree build" | expand

Commit Message

Ard Biesheuvel Nov. 3, 2018, 8:15 p.m. UTC
This reverts commit 80463f1b7bf9f822fd3495139bcf3ef254fdca10, because
it breaks the bindeb-pkg build target in the following way:

  ...
    LD [M]  sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
    LD [M]  sound/soc/rockchip/snd-soc-rockchip-pcm.ko
    LD [M]  sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
    LD [M]  sound/soc/rockchip/snd-soc-rockchip-spdif.ko
    LD [M]  sound/soc/sh/rcar/snd-soc-rcar.ko
   fakeroot -u debian/rules binary
  make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
  /bin/bash /home/ard/linux/scripts/package/builddeb
  Makefile:600: include/config/auto.conf: No such file or directory
  ***
  *** Configuration file ".config" not found!
  ***
  *** Please run some configurator (e.g. "make oldconfig" or
  *** "make menuconfig" or "make xconfig").
  ***
  make[12]: *** [syncconfig] Error 1
  make[11]: *** [syncconfig] Error 2
  make[10]: *** [include/config/auto.conf] Error 2
  make[9]: *** [__sub-make] Error 2
  cp: cannot stat '/home/ard/linux/scripts/kconfig/Makefile:69: recipe for target '\''syncconfig'\'' failed'$'\n''/home/ard/linux/Makefile:544: recipe for target '\''syncconfig'\'' failed'$'\n''Makefile:640: recipe for target '\''include/config/auto.conf'\'' failed'$'\n''Makefile:15: recipe for target '\''__sub-make'\'' failed': No such file or directory
  /home/ard/linux/scripts/package/Makefile:83: recipe for target 'intdeb-pkg' failed
  make[8]: *** [intdeb-pkg] Error 1
  /home/ard/linux/Makefile:1399: recipe for target 'intdeb-pkg' failed
  make[7]: *** [intdeb-pkg] Error 2
  Makefile:152: recipe for target 'sub-make' failed
  make[6]: *** [sub-make] Error 2
  Makefile:15: recipe for target '__sub-make' failed
  make[5]: *** [__sub-make] Error 2
  debian/rules:7: recipe for target 'binary-arch' failed
  make[4]: *** [binary-arch] Error 2
  dpkg-buildpackage: error: fakeroot -u debian/rules binary gave error exit status 2
  /home/ard/linux/scripts/package/Makefile:79: recipe for target 'bindeb-pkg' failed
  make[3]: *** [bindeb-pkg] Error 2
  /home/ard/linux/Makefile:1399: recipe for target 'bindeb-pkg' failed
  make[2]: *** [bindeb-pkg] Error 2
  Makefile:152: recipe for target 'sub-make' failed
  make[1]: *** [sub-make] Error 2
  Makefile:15: recipe for target '__sub-make' failed
  make: *** [__sub-make] Error 2

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Makefile | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

Comments

Masahiro Yamada Nov. 5, 2018, 7:57 a.m. UTC | #1
Hi Ard,


On Sun, Nov 4, 2018 at 5:15 AM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> This reverts commit 80463f1b7bf9f822fd3495139bcf3ef254fdca10, because
> it breaks the bindeb-pkg build target in the following way:
>
>   ...
>     LD [M]  sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
>     LD [M]  sound/soc/rockchip/snd-soc-rockchip-pcm.ko
>     LD [M]  sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
>     LD [M]  sound/soc/rockchip/snd-soc-rockchip-spdif.ko
>     LD [M]  sound/soc/sh/rcar/snd-soc-rcar.ko
>    fakeroot -u debian/rules binary
>   make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
>   /bin/bash /home/ard/linux/scripts/package/builddeb
>   Makefile:600: include/config/auto.conf: No such file or directory
>   ***
>   *** Configuration file ".config" not found!
>   ***
>   *** Please run some configurator (e.g. "make oldconfig" or
>   *** "make menuconfig" or "make xconfig").
>   ***
>   make[12]: *** [syncconfig] Error 1
>   make[11]: *** [syncconfig] Error 2
>   make[10]: *** [include/config/auto.conf] Error 2
>   make[9]: *** [__sub-make] Error 2
>   cp: cannot stat '/home/ard/linux/scripts/kconfig/Makefile:69: recipe for target '\''syncconfig'\'' failed'$'\n''/home/ard/linux/Makefile:544: recipe for target '\''syncconfig'\'' failed'$'\n''Makefile:640: recipe for target '\''include/config/auto.conf'\'' failed'$'\n''Makefile:15: recipe for target '\''__sub-make'\'' failed': No such file or directory
>   /home/ard/linux/scripts/package/Makefile:83: recipe for target 'intdeb-pkg' failed
>   make[8]: *** [intdeb-pkg] Error 1
>   /home/ard/linux/Makefile:1399: recipe for target 'intdeb-pkg' failed
>   make[7]: *** [intdeb-pkg] Error 2
>   Makefile:152: recipe for target 'sub-make' failed
>   make[6]: *** [sub-make] Error 2
>   Makefile:15: recipe for target '__sub-make' failed
>   make[5]: *** [__sub-make] Error 2
>   debian/rules:7: recipe for target 'binary-arch' failed
>   make[4]: *** [binary-arch] Error 2
>   dpkg-buildpackage: error: fakeroot -u debian/rules binary gave error exit status 2
>   /home/ard/linux/scripts/package/Makefile:79: recipe for target 'bindeb-pkg' failed
>   make[3]: *** [bindeb-pkg] Error 2
>   /home/ard/linux/Makefile:1399: recipe for target 'bindeb-pkg' failed
>   make[2]: *** [bindeb-pkg] Error 2
>   Makefile:152: recipe for target 'sub-make' failed
>   make[1]: *** [sub-make] Error 2
>   Makefile:15: recipe for target '__sub-make' failed
>   make: *** [__sub-make] Error 2
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>



Sorry for the breakage, and thanks for your report.

I'd like to fix the root cause in the builddeb script
instead of the revert.

https://patchwork.kernel.org/patch/10667541/


Thanks.
Ard Biesheuvel Nov. 5, 2018, 10:24 a.m. UTC | #2
On 5 November 2018 at 08:57, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi Ard,
>
>
> On Sun, Nov 4, 2018 at 5:15 AM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>> This reverts commit 80463f1b7bf9f822fd3495139bcf3ef254fdca10, because
>> it breaks the bindeb-pkg build target in the following way:
>>
>>   ...
>>     LD [M]  sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
>>     LD [M]  sound/soc/rockchip/snd-soc-rockchip-pcm.ko
>>     LD [M]  sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
>>     LD [M]  sound/soc/rockchip/snd-soc-rockchip-spdif.ko
>>     LD [M]  sound/soc/sh/rcar/snd-soc-rcar.ko
>>    fakeroot -u debian/rules binary
>>   make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
>>   /bin/bash /home/ard/linux/scripts/package/builddeb
>>   Makefile:600: include/config/auto.conf: No such file or directory
>>   ***
>>   *** Configuration file ".config" not found!
>>   ***
>>   *** Please run some configurator (e.g. "make oldconfig" or
>>   *** "make menuconfig" or "make xconfig").
>>   ***
>>   make[12]: *** [syncconfig] Error 1
>>   make[11]: *** [syncconfig] Error 2
>>   make[10]: *** [include/config/auto.conf] Error 2
>>   make[9]: *** [__sub-make] Error 2
>>   cp: cannot stat '/home/ard/linux/scripts/kconfig/Makefile:69: recipe for target '\''syncconfig'\'' failed'$'\n''/home/ard/linux/Makefile:544: recipe for target '\''syncconfig'\'' failed'$'\n''Makefile:640: recipe for target '\''include/config/auto.conf'\'' failed'$'\n''Makefile:15: recipe for target '\''__sub-make'\'' failed': No such file or directory
>>   /home/ard/linux/scripts/package/Makefile:83: recipe for target 'intdeb-pkg' failed
>>   make[8]: *** [intdeb-pkg] Error 1
>>   /home/ard/linux/Makefile:1399: recipe for target 'intdeb-pkg' failed
>>   make[7]: *** [intdeb-pkg] Error 2
>>   Makefile:152: recipe for target 'sub-make' failed
>>   make[6]: *** [sub-make] Error 2
>>   Makefile:15: recipe for target '__sub-make' failed
>>   make[5]: *** [__sub-make] Error 2
>>   debian/rules:7: recipe for target 'binary-arch' failed
>>   make[4]: *** [binary-arch] Error 2
>>   dpkg-buildpackage: error: fakeroot -u debian/rules binary gave error exit status 2
>>   /home/ard/linux/scripts/package/Makefile:79: recipe for target 'bindeb-pkg' failed
>>   make[3]: *** [bindeb-pkg] Error 2
>>   /home/ard/linux/Makefile:1399: recipe for target 'bindeb-pkg' failed
>>   make[2]: *** [bindeb-pkg] Error 2
>>   Makefile:152: recipe for target 'sub-make' failed
>>   make[1]: *** [sub-make] Error 2
>>   Makefile:15: recipe for target '__sub-make' failed
>>   make: *** [__sub-make] Error 2
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
>
>
> Sorry for the breakage, and thanks for your report.
>
> I'd like to fix the root cause in the builddeb script
> instead of the revert.
>

Sure, that makes sense. I don't understand Kbuild well enough to argue
that, it's just that the reverted patch stated that the --include-dir
argument was apparently unneeded, and I concluded that perhaps that
statement was inaccurate.
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 9aa352b38815..f9d7af9e5146 100644
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,10 @@  NAME = "People's Front"
 PHONY := _all
 _all:
 
-# Do not use make's built-in rules and variables
-# (this increases performance and avoids hard-to-debug behaviour)
-MAKEFLAGS += -rR
+# o Do not use make's built-in rules and variables
+#   (this increases performance and avoids hard-to-debug behaviour);
+# o Look for make include files relative to root of kernel src
+MAKEFLAGS += -rR --include-dir=$(CURDIR)
 
 # Avoid funny character set dependencies
 unexport LC_ALL
@@ -135,13 +136,6 @@  KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
 $(if $(KBUILD_OUTPUT),, \
      $(error failed to create output directory "$(saved-output)"))
 
-# Look for make include files relative to root of kernel src
-#
-# This does not become effective immediately because MAKEFLAGS is re-parsed
-# once after the Makefile is read.  It is OK since we are going to invoke
-# 'sub-make' below.
-MAKEFLAGS += --include-dir=$(CURDIR)
-
 PHONY += $(MAKECMDGOALS) sub-make
 
 $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make