kumquat-buildroot/boot
Thomas De Schampheleire baae5156ce uboot: use local fdt headers
After commit b8c3e94173 ("package/dtc: qemu system build need libfdt")
changed the dtc install target from 'install-bin' to 'install', uboot
compilation failures occurred because libfdt related headers were now
suddenly taken from output/host/include rather than from the uboot sources
itself.

Commit 3a6573ccee ("uboot: use local libfdt.h") solved this by patching
one specific uboot source file, tools/fdtgrep.c, to replace '<...>'-style
includes by '"..."'-style includes.

However, depending on the uboot version, this may not be enough: there may
be other references to fdt header files. In particular taking into account
that it is not uncommon to have vendor-provided uboot trees which have
custom changes.

The root of the problem is that the uboot.mk file passes the host compiler
as follows:
	UBOOT_MAKE_OPTS += \
		...
		HOSTCC="$(HOSTCC) $(HOST_CFLAGS)" \
		...
where HOST_CFLAGS contains the string '-I$(HOST_DIR)/include'
The uboot makefiles then use constructs of the form:
	$(CC) $(CPPFLAGS) $(CFLAGS) .....
where CPPFLAGS may contain -I references pointing to local directories.

On the expanded compiler command-line, Buildroot's '-I$(HOST_DIR)/include'
is thus present _before_ any -I to local directories, and thus takes
precedence.  And that becomes a problem for header files present both
locally as in the Buildroot host directory, which is the case for libfdt.

To fix this problem without having to patch u-boot sources, use '-idirafter'
rather than '-I' to pass the Buildroot host include directory. '-idirafter'
is basically the same thing, but adds the specified directory at the end
of the include precedence chain, rather than at the beginning.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-25 22:40:17 +01:00
..
afboot-stm32 afboot-stm32: use the Buildroot toolchain 2016-04-16 12:43:16 +02:00
arm-trusted-firmware boot/arm-trusted-firmware: build fiptool separately with dependency on host-openssl 2017-12-18 23:09:39 +01:00
at91bootstrap package/at91bootstrap: add hash file 2016-06-19 21:10:16 +02:00
at91bootstrap3 at91bootstrap3: exclude from hash when downloading from git 2017-06-11 14:27:42 +02:00
at91dataflashboot package/at91dataflashboot: add hash file 2016-06-19 21:11:25 +02:00
barebox barebox: bump to version 2017.09.0 2017-10-27 20:46:17 +02:00
binaries-marvell binaries-marvell: bump version, add license file and hash 2017-12-08 18:58:49 +01:00
boot-wrapper-aarch64 boot-wrapper-aarch64: update upstream repository 2016-11-16 12:24:19 +01:00
grub2 grub2: force -fno-stack-protector in CFLAGS 2017-08-30 22:09:21 +02:00
gummiboot boot, package: use SPDX short identifier for LGPLv2.1/LGPLv2.1+ 2017-04-01 15:18:10 +02:00
lpc32xxcdl
mv-ddr-marvell mv-ddr-marvell: new package 2017-12-08 13:42:27 +01:00
mxs-bootlets Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin 2017-07-05 15:19:29 +02:00
s500-bootloader boot: add s500-bootloader package 2016-05-26 10:35:34 +02:00
syslinux boot/syslinux: fix i386 bios build with recent binutils 2017-08-16 22:54:03 +02:00
ts4800-mbrboot boot, package: use SPDX short identifier for BSD-2c 2017-04-01 15:27:05 +02:00
uboot uboot: use local fdt headers 2018-02-25 22:40:17 +01:00
vexpress-firmware vexpress-firmware: new package 2016-10-15 12:35:28 +02:00
xloader boot, linux, package: use SPDX short identifier for GPLv2/GPLv2+ 2017-04-01 15:16:38 +02:00
common.mk
Config.in binaries-marvell: new package 2017-12-08 13:42:37 +01:00