From: Robert Buchholz Subject: [PATCH] xen/Makefile: use CC --version instead of -v Date: Wed, 27 Aug 2008 01:06:19 +0200 Message-ID: <200808270106.29812.rbu@gentoo.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0337556211==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0337556211== Content-Type: multipart/signed; boundary="nextPart2182540.2CSxBokV9f"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2182540.2CSxBokV9f Content-Type: multipart/mixed; boundary="Boundary-01=_rxItI0wn6zMFPYH" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_rxItI0wn6zMFPYH Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, the xen/Makefile calls=20 $(CC) $(CFLAGS) -v 2>&1 | grep -i "gcc.*version" to get a human-readable representation of the GCC being used. However,=20 this poses a problem at least in Gentoo, where as of gcc 4.3, "gcc -v"=20 reads: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Using built-in specs. Target: x86_64-pc-linux-gnu Configured=20 with: /var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/gcc-4.3.1/configure --pr= efix=3D/usr --bindir=3D/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1 --includedir= =3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/include --datadir=3D/usr/share/gc= c-data/x86_64-pc-linux-gnu/4.3.1 --mandir=3D/usr/share/gcc-data/x86_64-pc-l= inux-gnu/4.3.1/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.= 1/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/incl= ude/g++-v4 --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu --dis= able-altivec --enable-nls --without-included-gettext --with-system-zlib --d= isable-checking --disable-werror --enable-secureplt --enable-multilib --ena= ble-libmudflap --disable-libssp --enable-cld --enable-java-awt=3Dgtk --enab= le-languages=3Dc,c++,java,treelang,fortran --enable-shared --enable-threads= =3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --with-bugurl=3Dhttp:= //bugs.gentoo.org/ --with-pkgversion=3D'Gentoo=20 4.3.1-r1 p1.1' Thread model: posix gcc version 4.3.1 (Gentoo 4.3.1-r1 p1.1) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (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 --Boundary-01=_rxItI0wn6zMFPYH Content-Type: text/x-diff; charset="us-ascii"; name="xen-sed-gcc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-sed-gcc.patch" Index: xen-3.3.0/xen/Makefile =================================================================== --- xen-3.3.0.orig/xen/Makefile +++ xen-3.3.0/xen/Makefile @@ -87,7 +87,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 -i "gcc.*version")!g' \ + -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version | head -n1)!g' \ -e 's/@@version@@/$(XEN_VERSION)/g' \ -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ --Boundary-01=_rxItI0wn6zMFPYH-- --nextPart2182540.2CSxBokV9f Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iQIcBAABAgAGBQJItIx1AAoJECaaHo/OfoM5njcP/jXJcPT3PvUMaFJOy8UvtOai /0lIXtE+SK5fzqMSJ330Kn3VhqAcPBlEmsdz2sDOHEWdQ8YPahxuGJK3R38VhvoP d4GeWlFWtE8OW96TfD8Fqks1L6UmXTfXkh0EsLISJeC2r42fAlH8fxHDNJ5a03lS GoX2l6en8yKl6jDHWbZzWHCkrirhJ1wb5WYGgRtH87G7EneOAESeZPYv/maRfsh1 2m2UGiP9x8aOJtGyYCu2kh0mzzMJkL4k5a2fNVXcSQEZyRTLBJlszxe006wMOEQD 0S6yVJgeveiJw1evzka3tAIUn5RZm5QzObUMQyurr/Sq7hWz47GBQZ8sqPZVWjbk R+7lO/1b3Ka2dBstb7maKVVbRQ6NAEYfl2/gDZI8pMIa4PK5x+id0tyGh+Or84QE ZfQnvZR4uSW0jZWPLXfNUvFY4cVc7rVOsr8WRPPDkBzXdcL1JyIL681foaboma44 j8J3gCE57ugni7r2m4wXbnL9RCiCTeM5Ic5TeKEhlk9SSE92Kb5Dszjaf1f5ux1P dfVc9oZxFvjH3utktrrz9PdMfvJMbRLE37nEZSjTEY+C4E7THT5kRIzVVUZIhNdM 9nlpEmGmT6tmon5oF0ZLsP3hdiB56rQs6NjDEhQVjFi/IUYNr57qGfJaCBz1sjfG th3oVRUBFoPGvKRSZ819 =YfKc -----END PGP SIGNATURE----- --nextPart2182540.2CSxBokV9f-- --===============0337556211== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0337556211==--