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] xen/Makefile: use CC --version instead of -v

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xen/Makefile: use CC --version instead of -v
From: Robert Buchholz <rbu@xxxxxxxxxx>
Date: Wed, 27 Aug 2008 01:06:19 +0200
Delivery-date: Tue, 26 Aug 2008 16:07:04 -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: KMail/1.9.9
Hi all,

the xen/Makefile calls 
  $(CC) $(CFLAGS) -v 2>&1 | grep -i "gcc.*version"
to get a human-readable representation of the GCC being used. However, 
this poses a problem at least in Gentoo, where as of gcc 4.3, "gcc -v" 
reads:
=====================================================================
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured 
with: /var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/gcc-4.3.1/configure 
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1 
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/include 
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1 
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1/man 
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1/info 
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/include/g++-v4 
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec 
--enable-nls --without-included-gettext --with-system-zlib --disable-checking 
--disable-werror --enable-secureplt --enable-multilib --enable-libmudflap 
--disable-libssp --enable-cld --enable-java-awt=gtk 
--enable-languages=c,c++,java,treelang,fortran --enable-shared 
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu 
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 
4.3.1-r1 p1.1'
Thread model: posix
gcc version 4.3.1 (Gentoo 4.3.1-r1 p1.1)
=====================================================================
(Notice the line starting 'with' matches "gcc.*version")

I propose to change the statement to:
  $(CC) $(CFLAGS) --version | head -n1

See the attached patch.
This is Gentoo bug #217151 [ https://bugs.gentoo.org/217151 ]

Regards,
Robert

Attachment: xen-sed-gcc.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part.

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