[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen/Makefile: use CC --version instead of -v


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Robert Buchholz <rbu@xxxxxxxxxx>
  • Date: Wed, 27 Aug 2008 01:06:19 +0200
  • Delivery-date: Tue, 26 Aug 2008 16:07:04 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.