[U-Boot] [RFC PATCH] ARM: print gcc version

Wolfgang Denk wd at denx.de
Tue Jan 18 20:53:50 CET 2011


Dear Alexander Holler,

In message <4D35C836.3020400 at ahsoftware.de> you wrote:
>
> > @@ -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):
> 
> That would the trick. The first line of gcc --version includes here the 
> correct string. Thanks. (Btw. I would use head -n 1)
> 
> But I will wait for a comment from one of the maintainers about defining 
> CC_VERSION_STRING.
> 
> If someone gives me an ok, I will write a patch including your 
> suggestion and will print that version in the command version.

Looks good to me - please go on.

Hm... while we are at it... the bintuils (especially linker) version
is probably equally interesting, so eventually we should also add a
LD_VERSION_STRING.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A right is not what someone gives you; it's what no one can take from
you.                                                   - Ramsey Clark


More information about the U-Boot mailing list