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>
$(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;'
%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!