scripts: pass dtc cpp flags via a GCC response file
RFC PATCH 1/1 scripts: pass dtc cpp flags via a GCC response file
cmd_dtc inlines dtc_cpp_flags (including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for /bin/sh -c and Make fails with "Argument list too long" while building a .dtb.
Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
--- scripts/Makefile.lib | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
scripts/Makefile.lib +5 -2
@@ -448,7 +448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ (cat $< > $(pre-tmp)); \ $(foreach f,$(subst $(quote),,$(dtsi_include_list) $(CONFIG_DEVICE_TREE_INCLUDES)), \ echo '$(pound)include "$(f)"' >> $(pre-tmp);) \ - $(HOSTCC) -E $(dtc_cpp_flags) -I$(obj) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ + $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \ + $(HOSTCC) -E @$(dtc-flags-tmp) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ $(DTC) -O dtb -o $@ -b 0 \ -i $(dir $<) -i $(u_boot_dtsi_loc) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) || \
@@ -477,6 +478,7 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(dtsi_include_list_deps) $(DT_TMP_SCHEMA) FOR pre-tmp = $(subst $(comma),_,$(dot-target).pre.tmp) dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) +dtc-flags-tmp = $(subst $(comma),_,$(dot-target).dtc.flags.tmp) # DTCO # ---------------------------------------------------------------------------
@@ -486,7 +488,8 @@ quiet_cmd_dtco = DTCO $@ # No generation of assembly file either # Modified for U-Boot cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ - $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ + $(file >$(dtc-flags-tmp),$(dtc_cpp_flags)) \ + $(CPP) @$(dtc-flags-tmp) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ $(DTC) -@ -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
Signature · 1 line
2.43.7
Quoted 8 lines · Suraj Kakade
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
Quoted 6 lines
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>
The linux kernel, and so Kbuild, says that 4.0 is the minimum version of GNU make required, so that is true for us as well, so this is fine.
Signature · 1 line
Tom
Quoted 13 lines · Tom Rini
Quoted 11 lines · Suraj Kakade
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Quoted 9 lines
Quoted 3 lines
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>The linux kernel, and so
Kbuild, says that 4.0 is the minimum version of GNU make required, so that is true for us as well, so this is fine.Reviewed-by Tom Rini <[email protected]>
We should likely fix this too.
94 # If the user is running make -s (silent mode), suppress echoing of 95 # commands
96 ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
97 ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
98 quiet=silent_
99 endif
100 else # make-3.8x
101 ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
102 quiet=silent_
103 endif
104 endif
Thanks,
Michal
Quoted 28 lines · Michal Simek
Quoted 13 lines · Tom Rini
Quoted 11 lines · Suraj Kakade
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Quoted 9 lines
Quoted 3 lines
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>The linux kernel, and so
Kbuild, says that 4.0 is the minimum version of GNU make required, so that is true for us as well, so this is fine.Reviewed-by Tom Rini <[email protected]>We should likely fix this too.
Quoted 11 lines
94 # If the user is running make -s (silent mode), suppress echoing of 95 # commands
96 ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
97 ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
98 quiet=silent_
99 endif
100 else # make-3.8x
101 ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
102 quiet=silent_
103 endif
104 endif
I think this means we should pull commit 5f99665ee8f4335f334a5292b6d5b41a577fc2c0 from the kernel in, to fully switch to 4.0 as minimum.
Signature · 1 line
Tom
Quoted 41 lines · Tom Rini
Quoted 28 lines · Michal Simek
Quoted 13 lines · Tom Rini
Quoted 11 lines · Suraj Kakade
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Quoted 9 lines
Quoted 3 lines
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>The linux kernel, and so
Kbuild, says that 4.0 is the minimum version of GNU make required, so that is true for us as well, so this is fine.Reviewed-by Tom Rini <[email protected]>We should likely fix this too.
Quoted 11 lines
94 # If the user is running make -s (silent mode), suppress echoing of 95 # commands 96 ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 97 ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) 98 quiet=silent_ 99 endif 100 else # make-3.8x 101 ifneq ($(filter s% -s%,$(MAKEFLAGS)),) 102 quiet=silent_ 103 endif 104 endif
Quoted 4 lines
I think this means we should pull commit
5f99665ee8f4335f334a5292b6d5b41a577fc2c0from the kernel in, to fully switch to 4.0 as minimum.
something like this?
M
Makefile +1 -15
@@ -93,15 +93,9 @@ endif # If the user is running make -s (silent mode), suppress echoing of # commands -ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 -ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) +ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),) quiet=silent_ endif -else # make-3.8x -ifneq ($(filter s% -s%,$(MAKEFLAGS)),) - quiet=silent_ -endif -endif export quiet Q KBUILD_VERBOSE
@@ -166,14 +160,6 @@ ifneq ($(abs_srctree),$(abs_objtree)) MAKEFLAGS += --include-dir=$(abs_srctree) endif -ifneq ($(filter 3.%,$(MAKE_VERSION)),) -# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x -# We need to invoke sub-make to avoid implicit rules in the top Makefile. -need-sub-make := 1 -# Cancel implicit rules for this Makefile. -$(this-makefile): ; -endif - export abs_srctree abs_objtree export sub_make_done := 1
Quoted 78 lines · Michal Simek
Quoted 41 lines · Tom Rini
Quoted 28 lines · Michal Simek
Quoted 13 lines · Tom Rini
Quoted 11 lines · Suraj Kakade
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Quoted 9 lines
Quoted 3 lines
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>The linux kernel, and so
Kbuild, says that 4.0 is the minimum version of GNU make required, so that is true for us as well, so this is fine.Reviewed-by Tom Rini <[email protected]>We should likely fix this too.
Quoted 11 lines
94 # If the user is running make -s (silent mode), suppress echoing of 95 # commands 96 ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 97 ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) 98 quiet=silent_ 99 endif 100 else # make-3.8x 101 ifneq ($(filter s% -s%,$(MAKEFLAGS)),) 102 quiet=silent_ 103 endif 104 endifQuoted 4 lines
I think this means we should pull commit
5f99665ee8f4335f334a5292b6d5b41a577fc2c0from the kernel in, to fully switch to 4.0 as minimum.something like this?
M
Makefile +1
-7@@ -93,15 +93,9 @@ endif # If the user is running make -s (silent mode), suppress echoing of # commands -ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 -ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) +ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),) quiet=silent_ endif -else # make-3.8x -ifneq ($(filter s% -s%,$(MAKEFLAGS)),) - quiet=silent_ -endif -endif export quiet Q KBUILD_VERBOSE@@ -166,14 +160,6 @@ ifneq ($(abs_srctree),$(abs_objtree)) MAKEFLAGS += --include-dir=$(abs_srctree) endif
Makefile ifneq ($(abs_srctree),$(abs_objtree)) · line 164
Quoted 10 lines
Makefile +0
-8-ifneq ($(filter 3.%,$(MAKE_VERSION)),) -# 'MAKEFLAGS += -rR' does not immediately become effective for GNU Make 3.x -# We need to invoke sub-make to avoid implicit rules in the top Makefile. -need-sub-make := 1 -# Cancel implicit rules for this Makefile. -$(this-makefile): ; -endif - export abs_srctree abs_objtree export sub_make_done := 1
And also the version check part (which we didn't add the initial part of yet either, which checks for 3.8). Thanks!
Signature · 1 line
Tom
Hi Suraj,
Quoted 23 lines · Suraj Kakade
scripts: pass dtc cpp flags via a GCC response file
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>Reviewed-by Tom Rini <[email protected]>scripts/Makefile.lib | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
scripts/Makefile.lib cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ · line 449
Quoted 3 lines
scripts/Makefile.lib +2
-1@@ -448,7 +448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - $(HOSTCC) -E $(dtc_cpp_flags) -I$(obj) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ + $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \ + $(HOSTCC) -E @$(dtc-flags-tmp) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \
One thing I'd like to check: the .dtb and .dtbo rules use if_changed_dep, which compares the expanded cmd_dtb / cmd_dtco with the command saved in the .cmd file. Since $(file ...) expands to nothing, the saved command now has only '@.../.foo.dtb.dtc.flags.tmp' and none of the flags. So if dtc_cpp_flags changes (a new -I path, a -D define, a different DTS_CPPFLAGS), the .dtb is not rebuilt and you get a stale devicetree. Please can you make sure the flags still count towards the command check, e.g. by writing the response file only when its contents change and making it a prerequisite, or by adding the flags to the saved command some other way?
Also, cmd-check expands cmd_$1 every time make looks at the target, so the flags file is rewritten on every build, even when there is nothing to do.
scripts/Makefile.lib cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ · line 448
Quoted 3 lines
scripts/Makefile.lib +1
-0@@ -448,7 +448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \
cmd_dtc_diff (used with DEVICE_TREE_DEBUG) still puts $(dtc_cpp_flags) -I$(obj) directly on the HOSTCC command line, and it is part of cmd_dtc, so the 'Argument list too long' failure still happens there. Please can you convert it too? It can reuse the same response file.
I'd also be interested to know what sort of srctree you are using which overflows the limit. What is the limit?
Regards,
Simon
Quoted 3 lines · Simon Glass
Hi Suraj,
On 2026-08-24T04:47:18, Suraj Kakade <[email protected]> wrote:
Simon, please fix your tooling so you stop replying to very old patches. This is on version 3, which was posted less than a week ago.
Signature · 1 line
Tom
Quoted 8 lines · Tom Rini
Quoted 3 lines · Simon Glass
Hi Suraj,
On 2026-08-24T04:47:18, Suraj Kakade <[email protected]> wrote:
Simon, please fix your tooling so you stop replying to very old patches. This is on version 3, which was posted less than a week ago.
I wish I could blame tooling, but this was my trying to catch up on some old reviews and not seeing the latest thread. I've added a way for the tooling to help, though. I hope this will be the last of it.
- Simon
AMD General
Hi Simon,
Quoted 65 lines
-----Original Message-----
From: Simon Glass <[email protected]>
Sent: Wednesday, October 21, 2026 6:13 PM
To: Hanumant Kakade, Suraj <[email protected]>
Cc: [email protected]; Simek, Michal <[email protected]>
Subject: Re: [PATCH RFC] scripts: pass dtc cpp flags via a GCC response fileHi Suraj,
Quoted 23 lines · Suraj Kakade
scripts: pass dtc cpp flags via a GCC response file
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with
CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>Reviewed-by Tom Rini <[email protected]>scripts/Makefile.lib | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)scripts/Makefile.lib @@ -448,7
Quoted 2 lines
scripts/Makefile.lib @@ -448,7 renamed from scripts/Makefile.lib +1
-1+448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - $(HOSTCC) -E $(dtc_cpp_flags) -I$(obj) -x assembler-with-cpp -o$(dtc-tmp) $(pre-tmp) ; \
scripts/Makefile.lib @@ -448,7
Quoted 3 lines
scripts/Makefile.lib @@ -448,7 renamed from scripts/Makefile.lib +3
-0+ $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \ + $(HOSTCC) -E @$(dtc-flags-tmp) -x assembler-with-cpp -o $(dtc-tmp) +$(pre-tmp) ; \One thing I'd like to check: the .dtb and .dtbo rules use
if_changed_dep, which compares the expandedcmd_dtb/cmd_dtcowith the command saved in the .cmd file. Since $(file ...) expands to nothing, the saved command now has only '@.../.foo.dtb.dtc.flags.tmp'
and none of the flags. So ifdtc_cpp_flagschanges (a new -I path, a -D define, a differentDTS_CPPFLAGS), the .dtb is not rebuilt and you get a stale devicetree. Please can you make sure the flags still count towards the command check, e.g. by writing the response file only when its contents change and making it a prerequisite, or by adding the flags to the saved command some other way?Also, cmd-check expands cmd_$1 every time make looks at the target, so the flags file is rewritten on every build, even when there is nothing to do.
scripts/Makefile.lib @@ -448,7
Quoted 3 lines
scripts/Makefile.lib @@ -448,7 renamed from scripts/Makefile.lib +2
-0+448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \
cmd_dtc_diff(used withDEVICE_TREE_DEBUG) still puts $(dtc_cpp_flags) -I$(obj) directly on the HOSTCC command line, and it is part ofcmd_dtc, so the 'Argument list too long' failure still happens there. Please can you convert it too? It can reuse the same response file.
Quoted 2 lines
I'd also be interested to know what sort of srctree you are using which overflows the limit. What is the limit?
The failing build had a $(srctree) of 312 characters.
The limit is MAX_ARG_STRLEN, 128 KiB (131072 bytes) for a single argument, which is what make passes to /bin/sh -c as the whole recipe. The dtc command appears more than once in that string (the command itself and the copy passed to fixdep). Over a hundred -I entries, each starting with $(srctree), are part of it, so together with the other flags the command grows with the length of $(srctree) and exceeds the limit for a long enough path.
The other points are addressed in v3: https://lore.kernel.org/all/[email protected]/
Thanks,
Suraj
Hi Suraj,
Quoted 70 lines · Suraj
AMD General
Hi Simon,
Quoted 65 lines
-----Original Message-----
From: Simon Glass <[email protected]>
Sent: Wednesday, October 21, 2026 6:13 PM
To: Hanumant Kakade, Suraj <[email protected]>
Cc: [email protected]; Simek, Michal <[email protected]>
Subject: Re: [PATCH RFC] scripts: pass dtc cpp flags via a GCC response fileHi Suraj,
Quoted 23 lines · Suraj Kakade
scripts: pass dtc cpp flags via a GCC response file
cmd_dtcinlinesdtc_cpp_flags(including every upstream dtsi -I path) in the HOSTCC command. With a long $(srctree) that command is too large for/bin/sh-c and Make fails with "Argument list too long" while building a .dtb.Write the flags to a per-target .dtc.flags.tmp file and pass @file to HOSTCC/CPP so the shell command stays short.
This change requires GNU Make >= 4.0, since $(file ...) is not supported by Make 3.x.
Fixes d31ff219a833 ("Makefile.lib: find capsule ESL dtsi file with
CONFIG_OF_UPSTREAM")Fixes 1e7883f6325a ("dtbo: Fix dtbo generation rules")Signed-off-by Suraj Kakade <[email protected]>Reviewed-by Tom Rini <[email protected]>scripts/Makefile.lib | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)scripts/Makefile.lib @@ -448,7
Quoted 2 lines
scripts/Makefile.lib @@ -448,7 renamed from scripts/Makefile.lib +1
-1+448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - $(HOSTCC) -E $(dtc_cpp_flags) -I$(obj) -x assembler-with-cpp -o$(dtc-tmp) $(pre-tmp) ; \
scripts/Makefile.lib @@ -448,7
Quoted 3 lines
scripts/Makefile.lib @@ -448,7 renamed from scripts/Makefile.lib +3
-0+ $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \ + $(HOSTCC) -E @$(dtc-flags-tmp) -x assembler-with-cpp -o $(dtc-tmp) +$(pre-tmp) ; \One thing I'd like to check: the .dtb and .dtbo rules use
if_changed_dep, which compares the expandedcmd_dtb/cmd_dtcowith the command saved in the .cmd file. Since $(file ...) expands to nothing, the saved command now has only '@.../.foo.dtb.dtc.flags.tmp'
and none of the flags. So ifdtc_cpp_flagschanges (a new -I path, a -D define, a differentDTS_CPPFLAGS), the .dtb is not rebuilt and you get a stale devicetree. Please can you make sure the flags still count towards the command check, e.g. by writing the response file only when its contents change and making it a prerequisite, or by adding the flags to the saved command some other way?Also, cmd-check expands cmd_$1 every time make looks at the target, so the flags file is rewritten on every build, even when there is nothing to do.
scripts/Makefile.lib @@ -448,7
Quoted 3 lines
scripts/Makefile.lib @@ -448,7 renamed from scripts/Makefile.lib +2
-0+448,8 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(file >$(dtc-flags-tmp),$(dtc_cpp_flags) -I$(obj)) \
cmd_dtc_diff(used withDEVICE_TREE_DEBUG) still puts $(dtc_cpp_flags) -I$(obj) directly on the HOSTCC command line, and it is part ofcmd_dtc, so the 'Argument list too long' failure still happens there. Please can you convert it too? It can reuse the same response file.
Quoted 5 lines
Quoted 2 lines
I'd also be interested to know what sort of srctree you are using which overflows the limit. What is the limit?
The failing build had a $(srctree) of 312 characters.
The limit isMAX_ARG_STRLEN, 128 KiB (131072 bytes) for a single argument, which is what make passes to/bin/sh-c as the whole recipe. The dtc command appears more than once in that string (the command itself and the copy passed to fixdep). Over a hundred -I entries, each starting with $(srctree), are part of it, so together with the other flags the command grows with the length of $(srctree) and exceeds the limit for a long enough path.
Got it, thanks.
Quoted 5 lines
The other points are addressed in v3: https://lore.kernel.org/all/[email protected]/
Thanks,
Suraj
Regards,
Simon