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

Wolfgang Denk wd at denx.de
Thu Mar 31 17:37:38 CEST 2011


Dear Haiying Wang,

In message <1301583985.1991.4.camel at haiying-laptop> you wrote:
>
> What is "out-of-tree builds"? Why did LDFLAGS_FINAL patch break it? the

out-of-tree building means that you store all build results in some
other directory, outside of the source tree. See item 3 under Notes at
http://www.denx.de/wiki/U-Boot/Patches

Your patch broke it because it referenced $(nandobj) before defining
it - aslong as the build directory and the source directory are the
same, this makes no difference.  But for out-of-tree builds...

> $(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)


[It is a bit strange to append to LDFLAGS line that.]

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
You say you are lying. But if everything you say is a lie,  then  you
are  telling  the truth. You cannot tell the truth because everything
you say is a lie. You lie, you tell the truth ... but you cannot, for
you lie.
	-- Norman the android, "I, Mudd", stardate 4513.3


More information about the U-Boot mailing list