refine C++ header checking compiler invocation
authorJan Beulich <jbeulich@suse.com>
Thu, 23 Apr 2015 11:09:10 +0000 (13:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Apr 2015 11:09:10 +0000 (13:09 +0200)
g++ 4.1.x dies with "cc1plus: error: output filename specified twice"
on the currently used construct. That's apparently due to it converting
the manually specified "c++" into "c++-header", and mis-handling that
(which, when using "c++-header" explicitly btw gets mis-handled even
with 4.9.x and also, using "c-header", by the plain C compiler).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/include/Makefile

index c7a1d527dd646a23ef6c72d7abad1a4537b2d978..7c7f6a8df8c0bfd31b4605abaf4dfd044c3c7670 100644 (file)
@@ -104,9 +104,10 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
 headers++.chk: $(PUBLIC_HEADERS) Makefile
        if $(CXX) -v >/dev/null 2>&1; then \
            for i in $(filter %.h,$^); do \
-               $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
-                      -include stdint.h -include public/xen.h \
-                      -S -o /dev/null $$i || exit 1; \
+               echo '#include "'$$i'"' \
+               | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
+                 -include stdint.h -include public/xen.h -S -o /dev/null - \
+               || exit 1; \
                echo $$i; \
            done ; \
        fi >$@.new