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

Wolfgang Denk wd at denx.de
Tue Oct 6 09:28:51 CEST 2009


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.

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're dead, Jim.
	-- McCoy, "The Tholian Web", stardate unknown


More information about the U-Boot mailing list