[U-Boot] [PATCH 1/2] 85xx: Preprocess link scripts

Peter Tyser ptyser at xes-inc.com
Tue Oct 6 13:13:27 CEST 2009


On Tue, 2009-10-06 at 09:28 +0200, Wolfgang Denk wrote:
> Dear Peter Tyser,
> 
> In message <1254783670-21301-2-git-send-email-ptyser at xes-inc.com> you wrote:
> > This allows for fancy conditionals and inclusions
> > 
> > Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
> > ---
> >  cpu/mpc85xx/config.mk                              |    2 +-
> >  cpu/mpc85xx/{u-boot-nand.lds => u-boot-nand.lds.S} |    0
> >  cpu/mpc85xx/{u-boot.lds => u-boot.lds.S}           |    0
> >  3 files changed, 1 insertions(+), 1 deletions(-)
> >  rename cpu/mpc85xx/{u-boot-nand.lds => u-boot-nand.lds.S} (100%)
> >  rename cpu/mpc85xx/{u-boot.lds => u-boot.lds.S} (100%)
> > 
> > diff --git a/cpu/mpc85xx/config.mk b/cpu/mpc85xx/config.mk
> > index beb3514..03a34a9 100644
> > --- a/cpu/mpc85xx/config.mk
> > +++ b/cpu/mpc85xx/config.mk
> > @@ -27,4 +27,4 @@ PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
> >  PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe)
> >  
> >  # Use default linker script.  Board port can override in board/*/config.mk
> > -LDSCRIPT := $(SRCTREE)/cpu/mpc85xx/u-boot.lds
> > +LDSCRIPT := $(SRCTREE)/cpu/mpc85xx/u-boot.lds.S
> > diff --git a/cpu/mpc85xx/u-boot-nand.lds b/cpu/mpc85xx/u-boot-nand.lds.S
> > similarity index 100%
> > rename from cpu/mpc85xx/u-boot-nand.lds
> > rename to cpu/mpc85xx/u-boot-nand.lds.S
> > diff --git a/cpu/mpc85xx/u-boot.lds b/cpu/mpc85xx/u-boot.lds.S
> > similarity index 100%
> > rename from cpu/mpc85xx/u-boot.lds
> > rename to cpu/mpc85xx/u-boot.lds.S
> 
> Why would such a rename be needed?
> 
> The linker scripts aready get preprocessed, even without this rename.
> See the rule
> 
>  369 $(obj)u-boot.lds: $(LDSCRIPT)
>  370                 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
> 
> in the top level Makefile.

Argh, I see.  I was using the fancy lib_blackfin/u-boot.lds.S as a
reference and assumed the .S was needed.  Ignore this patch.

Best,
Peter



More information about the U-Boot mailing list