* [Buildroot] [PATCH] uboot: ensure host includes are searched before system default includes
@ 2018-03-01 20:54 Peter Korsgaard
2018-03-01 23:12 ` Peter Korsgaard
2018-03-02 0:11 ` Trent Piepho
0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-03-01 20:54 UTC (permalink / raw)
To: buildroot
Commit baae5156ce37e (uboot: use local fdt headers) changed the uboot logic
to pass the host include directories with -idirafter instead of -I, so
include files local to u-boot would be preferred over host includes.
This unfortunately breaks configurations using
BR2_TARGET_UBOOT_NEEDS_OPENSSL on hosts with incompatible openssl headers
installed in the system default include directories as explained here:
http://lists.busybox.net/pipermail/buildroot/2018-March/214651.html
The problem is that -idirafter directories gets added to the very end of the
search order, AFTER the system default directories.
Instead use -isystem which causes the directories to be added after -I but
before the system default directories. With this in place, the include
directories of u-boot will first be scanned, followed by the host includes
and finally the system default include directories.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
boot/uboot/uboot.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index c7cd739150..5da339850d 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -131,7 +131,7 @@ endif
UBOOT_MAKE_OPTS += \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH=$(UBOOT_ARCH) \
- HOSTCC="$(HOSTCC) $(subst -I/,-idirafter /,$(subst -I /,-idirafter /,$(HOST_CFLAGS)))" \
+ HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
HOSTLDFLAGS="$(HOST_LDFLAGS)"
ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] uboot: ensure host includes are searched before system default includes
2018-03-01 20:54 [Buildroot] [PATCH] uboot: ensure host includes are searched before system default includes Peter Korsgaard
@ 2018-03-01 23:12 ` Peter Korsgaard
2018-03-02 0:11 ` Trent Piepho
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-03-01 23:12 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> Commit baae5156ce37e (uboot: use local fdt headers) changed the uboot logic
> to pass the host include directories with -idirafter instead of -I, so
> include files local to u-boot would be preferred over host includes.
> This unfortunately breaks configurations using
> BR2_TARGET_UBOOT_NEEDS_OPENSSL on hosts with incompatible openssl headers
> installed in the system default include directories as explained here:
> http://lists.busybox.net/pipermail/buildroot/2018-March/214651.html
> The problem is that -idirafter directories gets added to the very end of the
> search order, AFTER the system default directories.
> Instead use -isystem which causes the directories to be added after -I but
> before the system default directories. With this in place, the include
> directories of u-boot will first be scanned, followed by the host includes
> and finally the system default include directories.
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] uboot: ensure host includes are searched before system default includes
2018-03-01 20:54 [Buildroot] [PATCH] uboot: ensure host includes are searched before system default includes Peter Korsgaard
2018-03-01 23:12 ` Peter Korsgaard
@ 2018-03-02 0:11 ` Trent Piepho
1 sibling, 0 replies; 3+ messages in thread
From: Trent Piepho @ 2018-03-02 0:11 UTC (permalink / raw)
To: buildroot
On Thu, 2018-03-01 at 21:54 +0100, Peter Korsgaard wrote:
> Commit baae5156ce37e (uboot: use local fdt headers) changed the uboot logic
> to pass the host include directories with -idirafter instead of -I, so
> include files local to u-boot would be preferred over host includes.
>
> This unfortunately breaks configurations using
> BR2_TARGET_UBOOT_NEEDS_OPENSSL on hosts with incompatible openssl headers
> installed in the system default include directories as explained here:
>
> http://lists.busybox.net/pipermail/buildroot/2018-March/214651.html
>
> The problem is that -idirafter directories gets added to the very end of the
> search order, AFTER the system default directories.
>
> Instead use -isystem which causes the directories to be added after -I but
> before the system default directories. With this in place, the include
> directories of u-boot will first be scanned, followed by the host includes
> and finally the system default include directories.
>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: Trent Piepho <tpiepho@impinj.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-02 0:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 20:54 [Buildroot] [PATCH] uboot: ensure host includes are searched before system default includes Peter Korsgaard
2018-03-01 23:12 ` Peter Korsgaard
2018-03-02 0:11 ` Trent Piepho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox