[U-Boot-Users] [patch] only use $(TEXT_BASE) if it is set
Mike Frysinger
vapier at gentoo.org
Fri Jun 22 10:19:20 CEST 2007
we've moved TEXT_BASE out of the build system for Blackfin and into the config
header so that when porting to a new board, users dont need to set both the
CFG_MONITOR_BASE and TEXT_BASE to the same value in two remotely different
files
for u-boot general though, i'd like to apply the attached patch that simply
says only utilize TEXT_BASE in global common files if it is set ... that way
everyone else can continue to use TEXT_BASE in their board specific .mk files
while in Blackfin, we can simply unset it
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
diff --git a/config.mk b/config.mk
index 582df32..e57339f 100644
--- a/config.mk
+++ b/config.mk
@@ -147,8 +147,10 @@ OBJCFLAGS += --gap-fill=0xff
gccincdir := $(shell $(CC) -print-file-name=include)
-CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \
- -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \
+CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) -D__KERNEL__
+ifneq ($(TEXT_BASE),)
+CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
+endif
ifneq ($(OBJTREE),$(SRCTREE))
CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
@@ -186,7 +188,10 @@ endif
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
-LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)
+LDFLAGS += -Bstatic -T $(LDSCRIPT) $(PLATFORM_LDFLAGS)
+ifneq ($(TEXT_BASE),)
+LDFLAGS += -Ttext $(TEXT_BASE)
+endif
# Location of a usable BFD library, where we define "usable" as
# "built for ${HOST}, supports ${TARGET}". Sensible values are
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070622/1d715b83/attachment.pgp
More information about the U-Boot
mailing list