add the make variable LIBGCC_S, which points to the correct libgcc ldflag (avr32...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 6 Jan 2009 15:56:30 +0000 (15:56 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 6 Jan 2009 15:56:30 +0000 (15:56 +0000)
SVN-Revision: 13892

rules.mk

index 614feb6fc5f0fa81c3f6c1f7bb9d5625f7903237..31e073036d4ddb7d288329026cd2fc51c7905695 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -67,6 +67,7 @@ TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(STAGING_DIR_HOST)/bin:$(STAGING_DIR)/host/bi
 TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3)
 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
 TARGET_LDFLAGS:=-L$(TOOLCHAIN_DIR)/lib -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
+LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-lgcc_s,$(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a))
 
 ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
   -include $(TOOLCHAIN_DIR)/info.mk