aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass2013-03-11 01:30:27 -0500
committerTom Rini2013-04-17 09:58:51 -0500
commit669dfc2ed8d853d6bcdcafa1de6aca22929465e5 (patch)
tree4b50a0bde4b25038c5660d8ceb3a73cb3b6990d2
parent1741c64d642a95c4bb88a2b03e96c6dc7ed5fe62 (diff)
downloadu-boot-669dfc2ed8d853d6bcdcafa1de6aca22929465e5.tar.gz
u-boot-669dfc2ed8d853d6bcdcafa1de6aca22929465e5.tar.xz
u-boot-669dfc2ed8d853d6bcdcafa1de6aca22929465e5.zip
fdt: Ensure that libfdt_env.h comes from U-Boot
When building host utilities, we include libfdt.h from the host, not from U-Boot. This in turn brings in libfdt_env.h from the host, which can mess up the types and cause a build failure, depending on the host environment. To fix this, force inclusion of U-Boot's libfdt_env.h so that the types are correct. Another way to fix this is to use -nostdinc and -idirafter to ensure that system includes are included after U-Boot ones. Unfortunately this means that U-Boot's errno.h gets included instead of the system one. This in turn requires a hack to errno.h to redirect things, so all in all the solution in this patch is probably cleaner. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/Makefile b/tools/Makefile
index c5952fc71e..889c89798d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -164,7 +164,8 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y))
164# Use native tools and options 164# Use native tools and options
165# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps 165# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
166# 166#
167HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ 167HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \
168 -idirafter $(SRCTREE)/include \
168 -idirafter $(OBJTREE)/include2 \ 169 -idirafter $(OBJTREE)/include2 \
169 -idirafter $(OBJTREE)/include \ 170 -idirafter $(OBJTREE)/include \
170 -I $(SRCTREE)/lib/libfdt \ 171 -I $(SRCTREE)/lib/libfdt \