Print compiler and linker version with the version command
[platform/kernel/u-boot.git] / Makefile
index 7c02096..e17d821 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -369,7 +369,7 @@ $(obj)u-boot.dis:   $(obj)u-boot
 GEN_UBOOT = \
                UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
                sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
-               cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
+               cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \
                        --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
                        -Map u-boot.map -o u-boot
 $(obj)u-boot:  depend \
@@ -416,6 +416,10 @@ $(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 -n 1)' )>>  $@.tmp
+               @( printf '#define LD_VERSION_STRING "%s"\n' \
+                '$(shell $(LD) -v | head -n 1)' )>>  $@.tmp
                @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
 
 $(TIMESTAMP_FILE):
@@ -525,8 +529,8 @@ unconfig:
 %_config::     unconfig
        @$(MKCONFIG) -A $(@:_config=)
 
-sinclude .boards.depend
-.boards.depend:        boards.cfg
+sinclude $(obj).boards.depend
+$(obj).boards.depend:  boards.cfg
        awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
 
 #