From: "Jan Beulich" Subject: [PATCH] refine C++ header checking compiler invocation Date: Thu, 23 Apr 2015 07:22:42 +0100 Message-ID: <5538ABD20200007800074F43@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part281C48A2.1__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YlAX6-0002VR-Kr for xen-devel@lists.xenproject.org; Thu, 23 Apr 2015 06:22:44 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Ian Campbell , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part281C48A2.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -104,9 +104,10 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Make headers++.chk: $(PUBLIC_HEADERS) Makefile if $(CXX) -v >/dev/null 2>&1; then \ for i in $(filter %.h,$^); do \ - $(CXX) -x c++ -std=3Dgnu++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=3Dgnu++98 -Wall -Werror -D__XEN_TOOLS_= _ \ + -include stdint.h -include public/xen.h -S -o /dev/null = - \ + || exit 1; \ echo $$i; \ done ; \ fi >$@.new --=__Part281C48A2.1__= Content-Type: text/plain; name="old-g++-fix.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="old-g++-fix.patch" refine C++ header checking compiler invocation=0A=0Ag++ 4.1.x dies with = "cc1plus: error: output filename specified twice"=0Aon the currently used = construct. That's apparently due to it converting=0Athe manually specified = "c++" into "c++-header", and mis-handling that=0A(which, when using = "c++-header" explicitly btw gets mis-handled even=0Awith 4.9.x and also, = using "c-header", by the plain C compiler).=0A=0ASigned-off-by: Jan = Beulich =0A=0A--- a/xen/include/Makefile=0A+++ = b/xen/include/Makefile=0A@@ -104,9 +104,10 @@ headers.chk: $(PUBLIC_ANSI_HE= ADERS) Make=0A headers++.chk: $(PUBLIC_HEADERS) Makefile=0A if $(CXX) = -v >/dev/null 2>&1; then \=0A for i in $(filter %.h,$^); do \=0A- = $(CXX) -x c++ -std=3Dgnu++98 -Wall -Werror -D__XEN_TOOLS__ \=0A- = -include stdint.h -include public/xen.h \=0A- = -S -o /dev/null $$i || exit 1; \=0A+ echo '#include = "$$i"' \=0A+ | $(CXX) -x c++ -std=3Dgnu++98 -Wall -Werror = -D__XEN_TOOLS__ \=0A+ -include stdint.h -include public/xen.h = -S -o /dev/null - \=0A+ || exit 1; \=0A echo $$i; = \=0A done ; \=0A fi >$@.new=0A --=__Part281C48A2.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part281C48A2.1__=--