[U-Boot] [PATCH] Fix build issues cause by LDFLAGS_FINAL changes

Haiying Wang Haiying.Wang at freescale.com
Thu Mar 31 18:06:11 CEST 2011


On Thu, 2011-03-31 at 17:37 +0200, Wolfgang Denk wrote:

> > $(nandobj) was defined in those Makefiles in that way before applying
> > LDFLAGS_FINAL patch. Why could the out-of-tree builds passed before
> > applying LDFLAG_FINAL patch?
> 
> Have a look at the changes introduced by your commit, and you will
> see.  The problem is a bit buried in the changes of "=" into ":=" and
> "$(PLATFORM_LDFLAGS)" into "$(LDFLAGS) $(LDFLAGS_FINAL)" in lines like
> these:
> 
> -LDFLAGS        = -Bstatic -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
> +LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
> +          $(LDFLAGS_FINAL)

Oh,yes, I got it now. ":=" will expand the variables immediately and "="
will delay the expansion until the new variable is referenced, which can
explain the $(nandobj)worked before this patch. 

> 
> [It is a bit strange to append to LDFLAGS line that.]
The reason I used ":=" was because I added "LDFLAGS_FINAL += -Bstatic
$(LDFLAGS)" in my first version of this patch, but it seems that it is
not necessary to do so after I remove $(LDFLAGS) for LDFLAGS_FINAL.

Thanks for pointing it out.

Haiying




More information about the U-Boot mailing list