summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-20 04:20:23 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:30 +0200
commita683d89f56945e1c0f9bbf95950a36b090f48ebf (patch)
tree7fe74034f8e7354f61d8ecafa862824adf588343 /Rules.mak
parenteedef37b4ad706b033fad74ae4de87e3cedaf4f2 (diff)
Rules.mak: change the way -include is used
Other compilers do not expect absolute path after -include, they want to find the included file by path search (-I). While there, prefer $(TARGET_ARCH) before common path. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak13
1 files changed, 8 insertions, 5 deletions
diff --git a/Rules.mak b/Rules.mak
index 320b9528c..d976d75e5 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -628,11 +628,14 @@ endif
$(eval $(call check-gcc-var,-nostdlib))
# Collect all CFLAGS components
-CFLAGS := -include $(top_srcdir)include/libc-symbols.h \
- $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
- -nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \
- -I$(top_srcdir)libc/sysdeps/linux \
- -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
+CFLAGS := $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
+ -nostdinc -I$(top_builddir)include \
+ -I$(top_srcdir)include -include libc-symbols.h \
+ -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
+ -I$(top_srcdir)libc/sysdeps/linux -I.
+ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
+CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
+endif
# We need this to be checked within libc-symbols.h
ifneq ($(HAVE_SHARED),y)