WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] build: fix grep invocation in cc-options

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] build: fix grep invocation in cc-options
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 30 Sep 2011 14:19:37 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Fri, 30 Sep 2011 06:20:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1317388735 -3600
# Node ID ddd1fcb1dff9f723d4f4c89f97ffef91b3e8a204
# Parent  222533abc1159bfa9c8cd522649c10079f6a6e9c
build: fix grep invocation in cc-options

Currently the build produces lots of
        Usage: grep [OPTION]... PATTERN [FILE]...
        Try `grep --help' for more information.

This is due to the "grep -- $(2)" in cc-options. It seems that the default of
reading stdin is disabled when using "--". I don't know if this is a bug in
grep or how it is supposed to be but we can work around it by explicitly
passing in "-"

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 222533abc115 -r ddd1fcb1dff9 Config.mk
--- a/Config.mk Fri Sep 30 14:10:25 2011 +0100
+++ b/Config.mk Fri Sep 30 14:18:55 2011 +0100
@@ -84,7 +84,7 @@ PYTHON_PREFIX_ARG ?= --install-layout=de
 #
 # 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 -xc - 2>&1 | grep -- $(2) -`"; \
               then echo "$(2)"; else echo "$(3)"; fi ;)
 
 # cc-option-add: Add an option to compilation flags, but only if supported.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] build: fix grep invocation in cc-options, Ian Campbell <=