All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] linux/linux.mk: Use '-isystem' instead of '-I' in HOST_CFLAGS
@ 2018-08-30  9:57 David De Grave
  2018-09-01  7:55 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: David De Grave @ 2018-08-30  9:57 UTC (permalink / raw)
  To: buildroot

Since the last update of the DTC package, linux build breaks at some point
with the following error:

    In file included from {output}/host/include/libfdt.h:54:0,
                     from scripts/dtc/libfdt/fdt.c:54:
    {output}/host/include/libfdt_env.h:82:24: error: redefinition of \
    ?fdt16_to_cpu?
     static inline uint16_t fdt16_to_cpu(fdt16_t x)
                            ^~~~~~~~~~~~
    In file included from scripts/dtc/libfdt/fdt.c:51:0:
    scripts/dtc/libfdt/libfdt_env.h:81:24: note: previous definition of \
    ?fdt16_to_cpu? was here

This is because the HOST_CFLAGS is added before Linux's makefile add it's
own local ones (-Iscripts/dtc/libfdt), resulting in a mix of local and host
headers beeing used.

So, to fix this the '-I' is substituted by '-isystem' to let it search for
the headers in the right location first.

Signed-off-by: David De Grave (Essensium/Mind) <david.degrave@mind.be>
---
 linux/linux.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 675e7906a8..a31617ca22 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -115,7 +115,7 @@ LINUX_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 endif
 
 LINUX_MAKE_FLAGS = \
-	HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
+	HOSTCC="$(HOSTCC) $(patsubst -I%,-isystem %,$(HOST_CFLAGS)) $(HOST_LDFLAGS)" \
 	ARCH=$(KERNEL_ARCH) \
 	INSTALL_MOD_PATH=$(TARGET_DIR) \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] linux/linux.mk: Use '-isystem' instead of '-I' in HOST_CFLAGS
  2018-08-30  9:57 [Buildroot] [PATCH 1/1] linux/linux.mk: Use '-isystem' instead of '-I' in HOST_CFLAGS David De Grave
@ 2018-09-01  7:55 ` Thomas Petazzoni
  2018-09-01 19:02   ` David De Grave
  2018-09-03 22:30   ` Arnout Vandecappelle
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-09-01  7:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 30 Aug 2018 11:57:48 +0200, David De Grave (Essensium/Mind)
wrote:
> Since the last update of the DTC package, linux build breaks at some point
> with the following error:
> 
>     In file included from {output}/host/include/libfdt.h:54:0,
>                      from scripts/dtc/libfdt/fdt.c:54:
>     {output}/host/include/libfdt_env.h:82:24: error: redefinition of \
>     ?fdt16_to_cpu?
>      static inline uint16_t fdt16_to_cpu(fdt16_t x)
>                             ^~~~~~~~~~~~
>     In file included from scripts/dtc/libfdt/fdt.c:51:0:
>     scripts/dtc/libfdt/libfdt_env.h:81:24: note: previous definition of \
>     ?fdt16_to_cpu? was here
> 
> This is because the HOST_CFLAGS is added before Linux's makefile add it's
> own local ones (-Iscripts/dtc/libfdt), resulting in a mix of local and host
> headers beeing used.
> 
> So, to fix this the '-I' is substituted by '-isystem' to let it search for
> the headers in the right location first.
> 
> Signed-off-by: David De Grave (Essensium/Mind) <david.degrave@mind.be>
> ---
>  linux/linux.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I suspect this one is superseded by your new patch series
http://patchwork.ozlabs.org/project/buildroot/list/?series=63524, so
I've marked this patch as Changes Requested.

Note that
http://patchwork.ozlabs.org/project/buildroot/list/?series=63524
doesn't contain PATCH 2/3 due to a patchwork issue when associating
patches to series, but PATCH 2/3 has been recorded by patchwork.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] linux/linux.mk: Use '-isystem' instead of '-I' in HOST_CFLAGS
  2018-09-01  7:55 ` Thomas Petazzoni
@ 2018-09-01 19:02   ` David De Grave
  2018-09-03 22:30   ` Arnout Vandecappelle
  1 sibling, 0 replies; 4+ messages in thread
From: David De Grave @ 2018-09-01 19:02 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Indeed the series can replace that one... Thanks.

Regards,
David.


On Sat, Sep 1, 2018 at 9:55 AM, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello,
>
> On Thu, 30 Aug 2018 11:57:48 +0200, David De Grave (Essensium/Mind)
> wrote:
> > Since the last update of the DTC package, linux build breaks at some
> point
> > with the following error:
> >
> >     In file included from {output}/host/include/libfdt.h:54:0,
> >                      from scripts/dtc/libfdt/fdt.c:54:
> >     {output}/host/include/libfdt_env.h:82:24: error: redefinition of \
> >     ?fdt16_to_cpu?
> >      static inline uint16_t fdt16_to_cpu(fdt16_t x)
> >                             ^~~~~~~~~~~~
> >     In file included from scripts/dtc/libfdt/fdt.c:51:0:
> >     scripts/dtc/libfdt/libfdt_env.h:81:24: note: previous definition of
> \
> >     ?fdt16_to_cpu? was here
> >
> > This is because the HOST_CFLAGS is added before Linux's makefile add it's
> > own local ones (-Iscripts/dtc/libfdt), resulting in a mix of local and
> host
> > headers beeing used.
> >
> > So, to fix this the '-I' is substituted by '-isystem' to let it search
> for
> > the headers in the right location first.
> >
> > Signed-off-by: David De Grave (Essensium/Mind) <david.degrave@mind.be>
> > ---
> >  linux/linux.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> I suspect this one is superseded by your new patch series
> http://patchwork.ozlabs.org/project/buildroot/list/?series=63524, so
> I've marked this patch as Changes Requested.
>
> Note that
> http://patchwork.ozlabs.org/project/buildroot/list/?series=63524
> doesn't contain PATCH 2/3 due to a patchwork issue when associating
> patches to series, but PATCH 2/3 has been recorded by patchwork.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
>



-- 

*David De Grave*
Senior Embedded Software Developer
Gsm : +32(0)496.364.960 | Tel : +32-16-28.65.00 | Fax : +32-16-28a.65.01
Essensium-Mind <https://www.mind.be/> - Gaston Geenslaan 9, B-3001 Leuven,
Belgium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180901/0006c9ec/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] linux/linux.mk: Use '-isystem' instead of '-I' in HOST_CFLAGS
  2018-09-01  7:55 ` Thomas Petazzoni
  2018-09-01 19:02   ` David De Grave
@ 2018-09-03 22:30   ` Arnout Vandecappelle
  1 sibling, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2018-09-03 22:30 UTC (permalink / raw)
  To: buildroot



On 01/09/2018 09:55, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu, 30 Aug 2018 11:57:48 +0200, David De Grave (Essensium/Mind)
> wrote:
>> Since the last update of the DTC package, linux build breaks at some point
>> with the following error:
>>
>>     In file included from {output}/host/include/libfdt.h:54:0,
>>                      from scripts/dtc/libfdt/fdt.c:54:
>>     {output}/host/include/libfdt_env.h:82:24: error: redefinition of \
>>     ?fdt16_to_cpu?
>>      static inline uint16_t fdt16_to_cpu(fdt16_t x)
>>                             ^~~~~~~~~~~~
>>     In file included from scripts/dtc/libfdt/fdt.c:51:0:
>>     scripts/dtc/libfdt/libfdt_env.h:81:24: note: previous definition of \
>>     ?fdt16_to_cpu? was here
>>
>> This is because the HOST_CFLAGS is added before Linux's makefile add it's
>> own local ones (-Iscripts/dtc/libfdt), resulting in a mix of local and host
>> headers beeing used.
>>
>> So, to fix this the '-I' is substituted by '-isystem' to let it search for
>> the headers in the right location first.
>>
>> Signed-off-by: David De Grave (Essensium/Mind) <david.degrave@mind.be>
>> ---
>>  linux/linux.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I suspect this one is superseded by your new patch series
> http://patchwork.ozlabs.org/project/buildroot/list/?series=63524, so
> I've marked this patch as Changes Requested.

 Actually, the idea was to apply this patch on master because it fixes a bug,
and the series on next because it is more invasive.

 It turns out, however, that the problem only occurs for the beaglebone kernel
on github, because that one builds its fdtoverlay host tool. "Normal" kernels
don't build libfdt at all for the host, so the error reported doesn't occur.

> 
> Note that
> http://patchwork.ozlabs.org/project/buildroot/list/?series=63524
> doesn't contain PATCH 2/3 due to a patchwork issue when associating
> patches to series, but PATCH 2/3 has been recorded by patchwork.

 Patch 2/3 actually doesn't apply, it's a revert of this patch... So I've marked
that one as N/A.

 Regards,
 Arnout

> 
> Best regards,
> 
> Thomas
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-03 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30  9:57 [Buildroot] [PATCH 1/1] linux/linux.mk: Use '-isystem' instead of '-I' in HOST_CFLAGS David De Grave
2018-09-01  7:55 ` Thomas Petazzoni
2018-09-01 19:02   ` David De Grave
2018-09-03 22:30   ` Arnout Vandecappelle

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.