* [PATCH] scripts/dtc: Don't overwrite HOST_EXTRACFLAGS passed on command line
@ 2020-09-17 9:40 Uwe Kleine-König
2020-09-17 10:15 ` Uwe Kleine-König
2020-09-19 14:39 ` [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting Uwe Kleine-König
0 siblings, 2 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2020-09-17 9:40 UTC (permalink / raw)
To: Rob Herring, Frank Rowand, Masahiro Yamada; +Cc: devicetree, kernel
This fixes building with
$ make HOST_EXTRACFLAGS=-g
which currently ends with:
scripts/dtc/dtc.h:21:10: fatal error: libfdt_env.h: No such file or directory
21 | #include <libfdt_env.h>
| ^~~~~~~~~~~~~~
Fixes: e3fd9b5384f3 ("scripts/dtc: consolidate include path options in Makefile")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
scripts/dtc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index a698ece43fff..4852bf44e913 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -9,7 +9,7 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
# Source files need to get at the userspace version of libfdt_env.h to compile
-HOST_EXTRACFLAGS := -I $(srctree)/$(src)/libfdt
+HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt
ifeq ($(shell pkg-config --exists yaml-0.1 2>/dev/null && echo yes),)
ifneq ($(CHECK_DT_BINDING)$(CHECK_DTBS),)
--
2.27.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: Don't overwrite HOST_EXTRACFLAGS passed on command line
2020-09-17 9:40 [PATCH] scripts/dtc: Don't overwrite HOST_EXTRACFLAGS passed on command line Uwe Kleine-König
@ 2020-09-17 10:15 ` Uwe Kleine-König
2020-09-19 14:39 ` [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting Uwe Kleine-König
1 sibling, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2020-09-17 10:15 UTC (permalink / raw)
To: Rob Herring, Frank Rowand, Masahiro Yamada; +Cc: devicetree, kernel
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
On Thu, Sep 17, 2020 at 11:40:24AM +0200, Uwe Kleine-König wrote:
> This fixes building with
>
> $ make HOST_EXTRACFLAGS=-g
I got this wrong, this above is still broken (as += doesn't work for
variables set on the commandline), please fixup to:
$ env HOST_EXTRACFLAGS=-g make
(or make me resend).
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-09-17 9:40 [PATCH] scripts/dtc: Don't overwrite HOST_EXTRACFLAGS passed on command line Uwe Kleine-König
2020-09-17 10:15 ` Uwe Kleine-König
@ 2020-09-19 14:39 ` Uwe Kleine-König
2020-09-28 17:20 ` Rob Herring
2020-10-16 7:04 ` Masahiro Yamada
1 sibling, 2 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2020-09-19 14:39 UTC (permalink / raw)
To: Rob Herring, Frank Rowand, Masahiro Yamada; +Cc: kernel, devicetree
When building with
$ HOST_EXTRACFLAGS=-g make
the expectation is that host tools are built with debug informations.
This however doesn't happen if the Makefile assigns a new value to the
HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for
the first assignment.
Fixes: e3fd9b5384f3 ("scripts/dtc: consolidate include path options in Makefile")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,
this is a resend as I failed to add the devicetree mailing list to Cc
for the first mail :-\ Thanks to Rob for reminding me. Those who got
this mail twice and want to reply please make sure you reply to the
right (i.e. this) mail.
The patch is the same as my earlier patch "scripts/dtc: Don't overwrite
HOST_EXTRACFLAGS passed on command line" but here the commit log is not
wrong.
Thanks and sorry,
Uwe
scripts/dtc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index a698ece43fff..4852bf44e913 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -9,7 +9,7 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
# Source files need to get at the userspace version of libfdt_env.h to compile
-HOST_EXTRACFLAGS := -I $(srctree)/$(src)/libfdt
+HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt
ifeq ($(shell pkg-config --exists yaml-0.1 2>/dev/null && echo yes),)
ifneq ($(CHECK_DT_BINDING)$(CHECK_DTBS),)
--
2.28.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-09-19 14:39 ` [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting Uwe Kleine-König
@ 2020-09-28 17:20 ` Rob Herring
2020-10-16 7:04 ` Masahiro Yamada
1 sibling, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-09-28 17:20 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Frank Rowand, Masahiro Yamada, kernel, devicetree
On Sat, Sep 19, 2020 at 04:39:22PM +0200, Uwe Kleine-König wrote:
> When building with
>
> $ HOST_EXTRACFLAGS=-g make
>
> the expectation is that host tools are built with debug informations.
> This however doesn't happen if the Makefile assigns a new value to the
> HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for
> the first assignment.
>
> Fixes: e3fd9b5384f3 ("scripts/dtc: consolidate include path options in Makefile")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> this is a resend as I failed to add the devicetree mailing list to Cc
> for the first mail :-\ Thanks to Rob for reminding me. Those who got
> this mail twice and want to reply please make sure you reply to the
> right (i.e. this) mail.
>
> The patch is the same as my earlier patch "scripts/dtc: Don't overwrite
> HOST_EXTRACFLAGS passed on command line" but here the commit log is not
> wrong.
>
> Thanks and sorry,
> Uwe
>
> scripts/dtc/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Rob
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
@ 2020-09-29 11:54 Uwe Kleine-König
2020-10-01 6:14 ` Sascha Hauer
0 siblings, 1 reply; 10+ messages in thread
From: Uwe Kleine-König @ 2020-09-29 11:54 UTC (permalink / raw)
To: barebox
This corresponds to Linux commit 7e2521a85c98 (that currently sits in
linux-next) with the same short log.
When building with
$ HOST_EXTRACFLAGS=-g make
the expectation is that host tools are built with debug informations.
This however doesn't happen if the Makefile assigns a new value to the
HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for
the first assignment.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
scripts/dtc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index 06a265cf7b51..721e8e2b8c2e 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -14,7 +14,7 @@ libfdt-objs := $(libfdt-objs:%.o=libfdt/%.o)
fdtget-objs += fdtget.o $(libfdt-objs) util.o
# Source files need to get at the userspace version of libfdt_env.h to compile
-HOST_EXTRACFLAGS := -I$(src)/libfdt
+HOST_EXTRACFLAGS += -I$(src)/libfdt
ifeq ($(wildcard /usr/include/yaml.h),)
ifneq ($(CHECK_DTBS),)
--
2.28.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-09-29 11:54 Uwe Kleine-König
@ 2020-10-01 6:14 ` Sascha Hauer
0 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2020-10-01 6:14 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Tue, Sep 29, 2020 at 01:54:57PM +0200, Uwe Kleine-König wrote:
> This corresponds to Linux commit 7e2521a85c98 (that currently sits in
> linux-next) with the same short log.
>
> When building with
>
> $ HOST_EXTRACFLAGS=-g make
>
> the expectation is that host tools are built with debug informations.
> This however doesn't happen if the Makefile assigns a new value to the
> HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for
> the first assignment.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> scripts/dtc/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
> index 06a265cf7b51..721e8e2b8c2e 100644
> --- a/scripts/dtc/Makefile
> +++ b/scripts/dtc/Makefile
> @@ -14,7 +14,7 @@ libfdt-objs := $(libfdt-objs:%.o=libfdt/%.o)
> fdtget-objs += fdtget.o $(libfdt-objs) util.o
>
> # Source files need to get at the userspace version of libfdt_env.h to compile
> -HOST_EXTRACFLAGS := -I$(src)/libfdt
> +HOST_EXTRACFLAGS += -I$(src)/libfdt
>
> ifeq ($(wildcard /usr/include/yaml.h),)
> ifneq ($(CHECK_DTBS),)
> --
> 2.28.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-09-19 14:39 ` [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting Uwe Kleine-König
2020-09-28 17:20 ` Rob Herring
@ 2020-10-16 7:04 ` Masahiro Yamada
2020-10-16 14:30 ` Rob Herring
1 sibling, 1 reply; 10+ messages in thread
From: Masahiro Yamada @ 2020-10-16 7:04 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Rob Herring, Frank Rowand, Sascha Hauer, DTML
On Sat, Sep 19, 2020 at 11:39 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> When building with
>
> $ HOST_EXTRACFLAGS=-g make
I do not think this is the intended usage
of HOST_EXTRACFLAGS.
Documentation/kbuild/kbuild.rst lists the user-interface,
and it clearly says HOSTCFLAGS is the one.
HOSTCFLAGS
----------
Additional flags to be passed to $(HOSTCC) when building host programs.
> the expectation is that host tools are built with debug informations.
> This however doesn't happen if the Makefile assigns a new value to the
> HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for
> the first assignment.
>
> Fixes: e3fd9b5384f3 ("scripts/dtc: consolidate include path options in Makefile")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> this is a resend as I failed to add the devicetree mailing list to Cc
> for the first mail :-\ Thanks to Rob for reminding me. Those who got
> this mail twice and want to reply please make sure you reply to the
> right (i.e. this) mail.
>
> The patch is the same as my earlier patch "scripts/dtc: Don't overwrite
> HOST_EXTRACFLAGS passed on command line" but here the commit log is not
> wrong.
>
> Thanks and sorry,
> Uwe
>
> scripts/dtc/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
> index a698ece43fff..4852bf44e913 100644
> --- a/scripts/dtc/Makefile
> +++ b/scripts/dtc/Makefile
> @@ -9,7 +9,7 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
> dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
>
> # Source files need to get at the userspace version of libfdt_env.h to compile
> -HOST_EXTRACFLAGS := -I $(srctree)/$(src)/libfdt
> +HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt
>
> ifeq ($(shell pkg-config --exists yaml-0.1 2>/dev/null && echo yes),)
> ifneq ($(CHECK_DT_BINDING)$(CHECK_DTBS),)
> --
> 2.28.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-10-16 7:04 ` Masahiro Yamada
@ 2020-10-16 14:30 ` Rob Herring
2020-10-17 21:24 ` Uwe Kleine-König
0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2020-10-16 14:30 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Uwe Kleine-König, Frank Rowand, Sascha Hauer, DTML
On Fri, Oct 16, 2020 at 2:11 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sat, Sep 19, 2020 at 11:39 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > When building with
> >
> > $ HOST_EXTRACFLAGS=-g make
>
>
> I do not think this is the intended usage
> of HOST_EXTRACFLAGS.
Okay, but I looked at all the other instances of HOST_EXTRACFLAGS and
they do '+='. Are they all wrong?
Rob
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-10-16 14:30 ` Rob Herring
@ 2020-10-17 21:24 ` Uwe Kleine-König
2020-10-19 14:35 ` Rob Herring
0 siblings, 1 reply; 10+ messages in thread
From: Uwe Kleine-König @ 2020-10-17 21:24 UTC (permalink / raw)
To: Rob Herring; +Cc: Masahiro Yamada, DTML, Frank Rowand, Sascha Hauer
[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]
On Fri, Oct 16, 2020 at 09:30:00AM -0500, Rob Herring wrote:
> On Fri, Oct 16, 2020 at 2:11 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Sat, Sep 19, 2020 at 11:39 PM Uwe Kleine-König
> > <u.kleine-koenig@pengutronix.de> wrote:
> > >
> > > When building with
> > >
> > > $ HOST_EXTRACFLAGS=-g make
> >
> >
> > I do not think this is the intended usage
> > of HOST_EXTRACFLAGS.
>
> Okay, but I looked at all the other instances of HOST_EXTRACFLAGS and
> they do '+='. Are they all wrong?
Hmm, I just tested that and indeed
HOSTCFLAGS=-g make
has the intended effect. Then the commit log is not optimal. I'd still
say the patch is good even though the reasoning is now only aligning the
assignment to others in the kernel tree.
@Rob: Assuming you agree, do you throw out hte patch again and I resend
with an improved commit log?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
2020-10-17 21:24 ` Uwe Kleine-König
@ 2020-10-19 14:35 ` Rob Herring
0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-10-19 14:35 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Masahiro Yamada, DTML, Frank Rowand, Sascha Hauer
On Sat, Oct 17, 2020 at 4:25 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> On Fri, Oct 16, 2020 at 09:30:00AM -0500, Rob Herring wrote:
> > On Fri, Oct 16, 2020 at 2:11 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > On Sat, Sep 19, 2020 at 11:39 PM Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de> wrote:
> > > >
> > > > When building with
> > > >
> > > > $ HOST_EXTRACFLAGS=-g make
> > >
> > >
> > > I do not think this is the intended usage
> > > of HOST_EXTRACFLAGS.
> >
> > Okay, but I looked at all the other instances of HOST_EXTRACFLAGS and
> > they do '+='. Are they all wrong?
>
> Hmm, I just tested that and indeed
>
> HOSTCFLAGS=-g make
>
> has the intended effect. Then the commit log is not optimal. I'd still
> say the patch is good even though the reasoning is now only aligning the
> assignment to others in the kernel tree.
>
> @Rob: Assuming you agree, do you throw out hte patch again and I resend
> with an improved commit log?
It's now in Linus's tree.
Rob
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-19 14:35 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-17 9:40 [PATCH] scripts/dtc: Don't overwrite HOST_EXTRACFLAGS passed on command line Uwe Kleine-König
2020-09-17 10:15 ` Uwe Kleine-König
2020-09-19 14:39 ` [PATCH] scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting Uwe Kleine-König
2020-09-28 17:20 ` Rob Herring
2020-10-16 7:04 ` Masahiro Yamada
2020-10-16 14:30 ` Rob Herring
2020-10-17 21:24 ` Uwe Kleine-König
2020-10-19 14:35 ` Rob Herring
-- strict thread matches above, loose matches on Subject: below --
2020-09-29 11:54 Uwe Kleine-König
2020-10-01 6:14 ` Sascha Hauer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.