From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] Allow arch directory to contain .lds without requiring Makefile
Date: Sun, 20 Nov 2011 05:07:08 +0100 [thread overview]
Message-ID: <201111200507.08697.marek.vasut@gmail.com> (raw)
In-Reply-To: <1321048033-20127-2-git-send-email-sjg@chromium.org>
> The Makefile for a CPU is in arch/($ARCH)/cpu/$(CPU). We want to support
> having an .lds file in arch/$(ARCH)/cpu without requiring an additional
> Makefile there. This change makes it clear that we expect a Makefile in
> the same directory as the link script except in this case.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> Makefile | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 294c762..e7da1c0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -174,6 +174,8 @@ include $(TOPDIR)/config.mk
> # that (or fail if absent). Otherwise, search for a linker script in a
> # standard location.
>
> +LDSCRIPT_MAKEFILE_DIR = $(dir $(LDSCRIPT))
> +
> ifndef LDSCRIPT
> #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
> ifdef CONFIG_SYS_LDSCRIPT
> @@ -196,6 +198,11 @@ ifndef LDSCRIPT
> LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds
> endif
> ifeq ($(wildcard $(LDSCRIPT)),)
> + LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds
> + # We don't expect a Makefile here
> + LDSCRIPT_MAKEFILE_DIR =
> + endif
> + ifeq ($(wildcard $(LDSCRIPT)),)
Do I see the same ifeq... twice in here ? I understand what you do here, but
it'd be good to add a comment please.
> $(error could not find linker script)
> endif
> endif
> @@ -498,7 +505,7 @@ depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \
> $(obj)include/autoconf.mk \
> $(obj)include/generated/generic-asm-offsets.h \
> $(obj)include/generated/asm-offsets.h
> - for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
> + for dir in $(SUBDIRS) $(CPUDIR) $(LDSCRIPT_MAKEFILE_DIR) ; do \
> $(MAKE) -C $$dir _depend ; done
>
> TAG_SUBDIRS = $(SUBDIRS)
next prev parent reply other threads:[~2011-11-20 4:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 21:47 [U-Boot] [PATCH 0/6] Tidy up ARM link scripts Simon Glass
2011-11-11 21:47 ` [U-Boot] [PATCH 1/6] Allow arch directory to contain .lds without requiring Makefile Simon Glass
2011-11-20 4:07 ` Marek Vasut [this message]
2011-11-20 4:54 ` Simon Glass
2011-11-20 5:23 ` Mike Frysinger
2011-11-11 21:47 ` [U-Boot] [PATCH 2/6] arm: Remove jornada link script Simon Glass
2011-11-17 18:10 ` Marek Vasut
2011-11-19 10:41 ` Kristoffer Ericson
2011-11-19 19:27 ` Marek Vasut
2011-11-19 20:43 ` Simon Glass
2011-11-11 21:47 ` [U-Boot] [PATCH 3/6] arm: Remove unneeded setting of LDCSRIPT Simon Glass
2011-11-11 21:47 ` [U-Boot] [PATCH 4/6] Define CPUDIR for the .lds link script Simon Glass
2011-11-12 3:59 ` Simon Glass
2011-11-11 21:47 ` [U-Boot] [PATCH 5/6] arm: add a common " Simon Glass
2011-11-11 21:47 ` [U-Boot] [PATCH 6/6] arm: Use common .lds file where possible Simon Glass
2011-11-20 4:04 ` [U-Boot] [PATCH 0/6] Tidy up ARM link scripts Marek Vasut
2011-11-20 4:49 ` Simon Glass
2011-11-20 4:56 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201111200507.08697.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox