]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blobdiff - boot/uboot/uboot.mk
uboot: fix build when libfdt-devel is installed system-wide
[coffee/buildroot.git] / boot / uboot / uboot.mk
index 5da339850dd2a88cb41f5751bf7e7b1fdebef144..58dd906a274a5143d6d02a259e0709178a0ceb1b 100644 (file)
@@ -188,6 +188,14 @@ define UBOOT_APPLY_LOCAL_PATCHES
 endef
 UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
 
+# This is equivalent to upstream commit
+# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a. It
+# fixes a build failure when libfdt-devel is installed system-wide.
+define UBOOT_FIXUP_LIBFDT_INCLUDE
+       $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile
+endef
+UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
+
 ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
 define UBOOT_CONFIGURE_CMDS
        $(TARGET_CONFIGURE_OPTS)        \