From patchwork Tue Jan 18 16:20:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Tyser X-Patchwork-Id: 79327 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D42E3B70D5 for ; Wed, 19 Jan 2011 03:20:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A3C79280BE; Tue, 18 Jan 2011 17:20:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0pKGtgiRFW9v; Tue, 18 Jan 2011 17:20:47 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79FF9280C4; Tue, 18 Jan 2011 17:20:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 32EA2280C4 for ; Tue, 18 Jan 2011 17:20:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DdMsvehvvJ88 for ; Tue, 18 Jan 2011 17:20:41 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from xes-mad.com (xes-mad.com [216.165.139.218]) by theia.denx.de (Postfix) with ESMTPS id 10321280BE for ; Tue, 18 Jan 2011 17:20:39 +0100 (CET) Received: from [10.52.0.62] (petert [10.52.0.62]) by xes-mad.com (8.13.8/8.13.8) with ESMTP id p0IGKL4q009622; Tue, 18 Jan 2011 10:20:22 -0600 From: Peter Tyser To: Alexander Holler In-Reply-To: <4D355A5D.4070804@ahsoftware.de> References: <1292863117-3175-1-git-send-email-holler@ahsoftware.de> <20110109210300.B2CD3127@gemini.denx.de> <4D2BB9AC.1040504@ahsoftware.de> <20110117222838.66B74D1CAD5@gemini.denx.de> <4D355A5D.4070804@ahsoftware.de> Date: Tue, 18 Jan 2011 10:20:20 -0600 Message-ID: <1295367620.29642.10984.camel@petert> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Virus-Scanned: clamav-milter 0.96 at mail X-Virus-Status: Clean Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [RFC PATCH] ARM: print gcc version X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de > >> Anyway, I would found it a nice feature, at startup or when running the > >> version command, but both aren't a must. > > > > I think it would be a really useful extension to the version command. > > Looking forwad to seeing your patch. > > Maybe if someone could feed me with what to use for the version. E.g. my > gcc here defines __VERSION__ as "4.5.2" but when I'm looking at > u-boot/lib/asm-offsets.s I see > > .ident "GCC: (Gentoo 4.5.2 p1.0, pie-0.4.5) 4.5.2" > > So I would like to display that which would be in line with the comment > section of generated binaries. > > But when I use "gcc -E -dM empty.c" to print all predefined macros, I > don't see the text found in .ident. Not even something else which > includes "Gentoo". I believe the output of "$(CC) --version" should contain the same data as your .ident string. You could echo it into a file like: Best, Peter diff --git a/Makefile b/Makefile index 0685ef9..e070d40 100644 --- a/Makefile +++ b/Makefile @@ -416,6 +416,8 @@ $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(VERSION_FILE): @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \ '$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ) > $@.tmp + @( printf '#define CC_VERSION_STRING "%s"\n' \ + '$(shell $(CC) --version | head -1)' ) >> $@.tmp @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ $(TIMESTAMP_FILE):