* [PATCH] correctly use gcc's -x option
@ 2014-02-28 16:57 Jan Beulich
2014-02-28 17:05 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2014-02-28 16:57 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]
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>
--- 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
[-- Attachment #2: gcc-x-option.patch --]
[-- Type: text/plain, Size: 1355 bytes --]
correctly use gcc's -x option
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>
--- 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
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] correctly use gcc's -x option
2014-02-28 16:57 [PATCH] correctly use gcc's -x option Jan Beulich
@ 2014-02-28 17:05 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2014-02-28 17:05 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Keir Fraser
[-- Attachment #1.1: Type: text/plain, Size: 1371 bytes --]
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
>
>
[-- Attachment #1.2: Type: text/html, Size: 1953 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-28 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 16:57 [PATCH] correctly use gcc's -x option Jan Beulich
2014-02-28 17:05 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).