From: Jack Mitchell <ml@communistcode.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] standalone-examples: support custom GCC lib
Date: Tue, 16 Jul 2013 14:44:23 +0100 [thread overview]
Message-ID: <1373982263-32012-2-git-send-email-ml@communistcode.co.uk> (raw)
In-Reply-To: <1373982263-32012-1-git-send-email-ml@communistcode.co.uk>
From: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
Add support for defining the gcc lib in standalone examples as is
done in the main u-boot Makefile
Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
---
examples/standalone/Makefile | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index baaa2fb..b1be527 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -68,7 +68,18 @@ ELF := $(addprefix $(obj),$(ELF))
BIN := $(addprefix $(obj),$(BIN))
SREC := $(addprefix $(obj),$(SREC))
-gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
+# Add GCC lib
+ifdef USE_PRIVATE_LIBGCC
+ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
+PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o
+else
+PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
+endif
+else
+PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
+endif
+PLATFORM_LIBS += $(PLATFORM_LIBGCC)
+export PLATFORM_LIBS
CPPFLAGS += -I..
@@ -98,7 +109,7 @@ $(ELF):
$(obj)%: $(obj)%.o $(LIB)
$(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
- -L$(gcclibdir) -lgcc
+ $(PLATFORM_LIBS)
$(SREC):
$(obj)%.srec: $(obj)%
--
1.8.3.2
next prev parent reply other threads:[~2013-07-16 13:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 13:44 [U-Boot] standalone-examples: support custom GCC lib Jack Mitchell
2013-07-16 13:44 ` Jack Mitchell [this message]
2013-09-06 21:24 ` Tom Rini
2013-09-10 13:55 ` Tom Rini
2013-07-17 7:11 ` Albert ARIBAUD
2013-07-17 8:31 ` Jack Mitchell
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=1373982263-32012-2-git-send-email-ml@communistcode.co.uk \
--to=ml@communistcode.co.uk \
--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