Re: [PATCH RFC] scripts: pass dtc cpp flags via a GCC response file
Tom Rini <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <20260824165125.GI523975@bill-the-cat> |
On Mon, Aug 24, 2026 at 05:29:37PM +0200, Michal Simek wrote:
>
>
> On 8/24/26 17:09, Tom Rini wrote:
> > On Mon, Aug 24, 2026 at 10:17:18AM +0530, Suraj Kakade wrote:
> >
> > > 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.
> > >
> > > 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
I think this means we should pull commit
5f99665ee8f4335f334a5292b6d5b41a577fc2c0 from the kernel in, to fully
switch to 4.0 as minimum.
--
Tom
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCaox2iQAKCRAr4qD1Cr/k Cs5pAQDGKapNB2X/fgl5jUduwDJeGUAhFBJ5DzK8j4cyeeSyQAEA6BCFdzD0thG8 1hWnmhoasDX49mb7QORRBtyp9jTrGwY= =iWbx -----END PGP SIGNATURE-----