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

Re: [Xen-devel] [xen-4.0-testing test] 7147: regressions - FAIL

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] [xen-4.0-testing test] 7147: regressions - FAIL
From: Keir Fraser <keir@xxxxxxx>
Date: Mon, 23 May 2011 16:24:01 +0100
Cc:
Delivery-date: Mon, 23 May 2011 08:25:37 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=cGCloJG5tRY9Pf+44hInvtjzSOyLyaNxZmF5c3j5eZE=; b=U4a2u020wV0XaV4IjLpaiQ6RHtkIWr8XrkHB2eSEOmZJpP5vhIFEv5kiyzjcePx6q8 dwCe9m6WCmx4qYNhGskoEwYPgN38aWU4az8+DxdOV34kJzcm1krmyeUQcdstE67xUfDy SiB8Cc6qgd1hpy7czqgTv1/+KVB5y2Daua22Y=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=ke61kD+PI4/ikC7c5fJCC7GHEleO60jrJDATMSfaqSoUqByMwLeka2i+xGdc2QGxqe y1yUNyFKsTByZpEVAJ2Egzyh/ORoXAjRwrS36gIk9cUEtclCyrr1+9A6XY5Ig8P6kEE3 omupkpdeVid0AQeQFWvkItX5qF1t+TV/gMJE0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19930.30837.468592.46428@xxxxxxxxxxxxxxxxxxxxxxxx>
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
Thread-index: AcwZXXFGxXi1caltKkuMd4TX6k5r1Q==
Thread-topic: [Xen-devel] [xen-4.0-testing test] 7147: regressions - FAIL
User-agent: Microsoft-Entourage/12.29.0.110113
On 23/05/2011 16:08, "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx> wrote:

> I wrote:
>> At top level:
>> cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"
> 
> How about this fix.

I've been fiddling with a similar principle but much smaller patch (see
below). But it's failing for me in the same way as yours -- *all* optional
flags disappear from my CFLAGS (e.g., -Wno-unused-but-set-variable, which my
gcc-4.5.1 definitely does support).

So I'm still scratching my head on this one... :-(

diff -r 0f670f5146c8 Config.mk
--- a/Config.mk Sat May 21 07:55:46 2011 +0100
+++ b/Config.mk Mon May 23 16:16:54 2011 +0100
@@ -72,8 +72,10 @@ PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)
 
 # cc-option: Check if compiler supports first option, else fall back to
second.
 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
-cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
-              /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
+#cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
+#              /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
+cc-option = $(shell if test -z "`echo 'void*p=1;' | \
+              $(1) $(2) -S -o /dev/null -xc - 2>&1`"; then echo "$(2)";
else echo "$(3)"; fi ;)
 
 # cc-option-add: Add an option to compilation flags, but only if supported.
 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)


> Ian.
> 
> diff -r 0f670f5146c8 Config.mk
> --- a/Config.mk Sat May 21 07:55:46 2011 +0100
> +++ b/Config.mk Mon May 23 16:07:59 2011 +0100
> @@ -72,8 +72,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)
>  
>  # cc-option: Check if compiler supports first option, else fall back to
> second.
>  # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
> -cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
> -              /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
> +cc-option = $(shell $(XEN_ROOT)/config/test-cc-option.sh $(1) $(2) $(3))
>  
>  # cc-option-add: Add an option to compilation flags, but only if supported.
>  # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
> diff -r 0f670f5146c8 config/test-cc-option.sh
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/config/test-cc-option.sh Mon May 23 16:07:59 2011 +0100
> @@ -0,0 +1,31 @@
> +#!/bin/sh
> +set -e
> +
> +cc="$1"
> +opt="$2"
> +alt="$3"
> +
> +case "$opt" in
> +-Wno-*)
> +   # Sadly a broken implementation of the fix to GCC PR 28322
> +   # (actually shipped eg in Debian lenny) makes it hard to spot
> +   # whether the compiler recognises a -Wno-foo option without
> +   # generating a warning for some other reason.
> +
> +   input="${0%-cc-option.sh}-cc-warning.c"
> +   if $cc $opt -Wreturn-type -Wno-error -S -o /dev/null "$input" \
> +           >/dev/null 2>&1; then
> +       res="$opt"
> +   else
> +       res="$alt"
> +   fi
> +   ;;
> +*)
> +    if test -z "`$cc $opt $nerr -S -o /dev/null -xc $input 2>&1`"; then
> +        res="$opt"
> +    else
> +        res="$alt"
> +    fi
> +    ;;
> +esac
> +printf "%s\n" "$res"
> diff -r 0f670f5146c8 config/test-cc-warning.c
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/config/test-cc-warning.c Mon May 23 16:07:59 2011 +0100
> @@ -0,0 +1,2 @@
> +extern int bogus(void);
> +int bogus(void) { }



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