diff options
| author | Jack Mitchell <jack.mitchell@dbbroadcast.co.uk> | 2013-07-16 14:44:23 +0100 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-09-06 13:09:07 -0400 | 
| commit | 4412db46468d5965da736d06f84d13e68a6e0b51 (patch) | |
| tree | 17344bce438ed605e1bc240f778fa45cba0a1ec0 /examples | |
| parent | 6b8f185faf29db302a20f584cc54253667535f08 (diff) | |
| download | olio-uboot-2014.01-4412db46468d5965da736d06f84d13e68a6e0b51.tar.xz olio-uboot-2014.01-4412db46468d5965da736d06f84d13e68a6e0b51.zip | |
standalone-examples: support custom GCC lib
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>
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/standalone/Makefile | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 4afedea06..45b0fdc16 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -52,7 +52,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.. @@ -82,7 +93,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)% |