Revert "standalone-examples: support custom GCC lib"
authorTom Rini <trini@ti.com>
Tue, 10 Sep 2013 13:51:44 +0000 (09:51 -0400)
committerTom Rini <trini@ti.com>
Thu, 12 Sep 2013 14:27:29 +0000 (10:27 -0400)
After further testing, this patch has two problems.  First,
examples/standalone/Makefile was already inherting PLATFORM_LIBS from
the top-level Makefile so this lead to duplicating the private libgcc.
Second, currently the private libgcc has a reference to 'hang' that is
not being fulfilled.

This reverts commit 4412db46468d5965da736d06f84d13e68a6e0b51.

Signed-off-by: Tom Rini <trini@ti.com>
examples/standalone/Makefile

index 45b0fdc1615f4208e62ea7155b81998b62d2cfe2..4afedea065dd9e8da7c4bccfeaf4af109d1f7bc8 100644 (file)
@@ -52,18 +52,7 @@ ELF  := $(addprefix $(obj),$(ELF))
 BIN    := $(addprefix $(obj),$(BIN))
 SREC   := $(addprefix $(obj),$(SREC))
 
-# 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
+gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
 
 CPPFLAGS += -I..
 
@@ -93,7 +82,7 @@ $(ELF):
 $(obj)%:       $(obj)%.o $(LIB)
                $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
                        -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
-                       $(PLATFORM_LIBS)
+                       -L$(gcclibdir) -lgcc
 
 $(SREC):
 $(obj)%.srec:  $(obj)%