From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] correctly use gcc's -x option Date: Fri, 28 Feb 2014 17:05:14 +0000 Message-ID: <5310C1CA.8030301@gmail.com> References: <5310CE0102000078001204D0@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1375950672336386925==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WJQsB-0006J3-Vl for xen-devel@lists.xenproject.org; Fri, 28 Feb 2014 17:05:20 +0000 Received: by mail-we0-f169.google.com with SMTP id t61so798431wes.14 for ; Fri, 28 Feb 2014 09:05:18 -0800 (PST) In-Reply-To: <5310CE0102000078001204D0@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============1375950672336386925== Content-Type: multipart/alternative; boundary="------------070204040006010006080700" This is a multi-part message in MIME format. --------------070204040006010006080700 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Jan Beulich wrote: > > In Linux the improper use was found to cause problems with certain > distributed build environments. Even if not directly affecting us, be > on the safe side. > > Signed-off-by: Jan Beulich Acked-by: Keir Fraser > > > --- a/Config.mk > +++ b/Config.mk > @@ -101,7 +101,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX) > # > # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586) > cc-option = $(shell if test -z "`echo 'void*p=1;' | \ > - $(1) $(2) -S -o /dev/null -xc - 2>&1 | grep -- $(2) -`"; \ > + $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \ > then echo "$(2)"; else echo "$(3)"; fi ;) > > # cc-option-add: Add an option to compilation flags, but only if > supported. > --- a/xen/include/Makefile > +++ b/xen/include/Makefile > @@ -81,7 +81,7 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_A > all: headers.chk > > headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% > public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) > Makefile > - for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W > -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done>$@.new > + for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W > -Werror -S -o /dev/null -x c $$i || exit 1; echo $$i; done>$@.new > mv $@.new $@ > > endif > > --------------070204040006010006080700 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Jan Beulich wrote:

In Linux the improper use was found to cause problems with certain
distributed build environments. Even if not directly affecting us, be
on the safe side.

Signed-off-by: Jan Beulich<jbeulich@suse.com>


Acked-by: Keir Fraser <keir@xen.org>



--- a/Config.mk
+++ b/Config.mk
@@ -101,7 +101,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)
  #
  # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
  cc-option = $(shell if test -z "`echo 'void*p=1;' | \
-              $(1) $(2) -S -o /dev/null -xc - 2>&1 | grep -- $(2) -`"; \
+              $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
                then echo "$(2)"; else echo "$(3)"; fi ;)

  # cc-option-add: Add an option to compilation flags, but only if supported.
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -81,7 +81,7 @@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_A
  all: headers.chk

  headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile
- for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done>$@.new
+ for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -x c $$i || exit 1; echo $$i; done>$@.new
  mv $@.new $@

  endif


--------------070204040006010006080700-- --===============1375950672336386925== 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 --===============1375950672336386925==--