From: Keir Fraser <keir@xen.org>
To: Tim Deegan <tim@xen.org>, xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: detect compiler version with '--version' rather than '-v'
Date: Thu, 02 Aug 2012 12:24:18 +0100 [thread overview]
Message-ID: <CC4021F2.4794F%keir@xen.org> (raw)
In-Reply-To: <fdd4b7b36959492b3909.1343905513@whitby.uk.xensource.com>
On 02/08/2012 12:05, "Tim Deegan" <tim@xen.org> wrote:
> # HG changeset patch
> # User Tim Deegan <tim@xen.org>
> # Date 1343905471 -3600
> # Node ID fdd4b7b36959492b3909613867360d9993d420a7
> # Parent 3d17148e465ce87ddd8f555a001280348d848419
> xen: detect compiler version with '--version' rather than '-v'
>
> This allows us to get rid of the 'grep version', which doesn't
> work with localized compilers.
Seem syou've thought about it and tested it more than I ever did.
Acked-by: Keir Fraser <keir@xen.org>
> Signed-off-by: Tim Deegan <tim@xen.org>
>
> diff -r 3d17148e465c -r fdd4b7b36959 xen/Makefile
> --- a/xen/Makefile Thu Aug 02 11:49:37 2012 +0200
> +++ b/xen/Makefile Thu Aug 02 12:04:31 2012 +0100
> @@ -103,7 +103,7 @@ include/xen/compile.h: include/xen/compi
> -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
> -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
> -e 's/@@hostname@@/$(shell hostname)/g' \
> - -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep version | tail
> -1)!g' \
> + -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g'
> \
> -e 's/@@version@@/$(XEN_VERSION)/g' \
> -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
> -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2012-08-02 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 11:05 [PATCH] xen: detect compiler version with '--version' rather than '-v' Tim Deegan
2012-08-02 11:24 ` Keir Fraser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CC4021F2.4794F%keir@xen.org \
--to=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).