]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
app-tools: -U various unwanted predefines
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 Jul 2014 11:40:30 +0000 (12:40 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 14 Jul 2014 15:10:28 +0000 (16:10 +0100)
Find the list of things to undefine by running rumpmake on
rumptools/mk.conf: we take everything that rumpmake's CPPFLAGS would
undefine and undefine that ourselves.

The result is that we never (for example) provide -D__linux__.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Makefile
app-tools/specs.in

index 0df3bc46bcce24a37d02ead9782c0b49abd1e8f8..6d5838571288b77fc1c1e77ba29869444777859f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -159,11 +159,15 @@ APP_TOOLS_ARCH := $(subst x86_32,i386, \
                   $(subst x86_64,amd64, \
                   $(XEN_TARGET_ARCH)))
 
+APP_TOOLS_CPPFLAGS := $(filter -U%, $(shell \
+       rumptools/rumpmake -f rumptools/mk.conf -V '$${CPPFLAGS}'))
+
 app-tools/%: app-tools/%.in Makefile Config.mk
        sed <$< >$@.tmp \
                -e 's#!ARCH!#$(strip $(APP_TOOLS_ARCH))#g;' \
                -e 's#!BASE!#$(abspath .)#g;' \
                -e 's#!APPTOOLS!#$(abspath app-tools)#g;' \
+               -e 's#!CPPFLAGS!#$(APP_TOOLS_CPPFLAGS)#g;' \
                -e 's#!OBJS!#$(APP_TOOLS_OBJS)#g;' \
                -e 's#!HEAD_OBJ!#$(abspath $(HEAD_OBJ))#g;' \
                -e 's#!LDSCRIPT!#$(abspath $(LDSCRIPT))#g;'
index 32c023ecee27b19e2a13043804a45a6e467e4f04..de632faf9f9750282b5abc323430da1f5c633e79 100644 (file)
@@ -1,7 +1,7 @@
 %rename cpp_options old_cpp_options
  
 *cpp_options:
--nostdinc -isystem !BASE!/rump/include %(old_cpp_options)
+-nostdinc -isystem !BASE!/rump/include %(old_cpp_options) !CPPFLAGS!
 
 *linker:
 !APPTOOLS!/ld --stunt-intermediate %g.link1 %g.link2 --stunt-final-script !LDSCRIPT!