[U-Boot] [PATCH] examples/api/Makefile: add lib_arm/eabi_compat

Mike Rapoport mike at compulab.co.il
Wed Nov 25 16:52:00 CET 2009


Some EABI conformant tool chains cause external references to
utility functions like raise(); import such functions from
lib_arm/eabi_compat.c

Signed-off-by: Mike Rapoport <mike at compulab.co.il>
---
 examples/api/Makefile |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/examples/api/Makefile b/examples/api/Makefile
index 04a270b..057e85a 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -49,6 +49,12 @@ ifeq ($(ARCH),ppc)
 EXT_SOBJ_FILES-$(CONFIG_API) += lib_ppc/ppcstring.o
 endif
 
+ifeq ($(ARCH),arm)
+ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
+EXT_COBJ_FILES-$(CONFIG_API) += lib_arm/eabi_compat.o
+endif
+endif
+
 # Create a list of source files so their dependencies can be auto-generated
 SRCS	+= $(addprefix $(SRCTREE)/,$(EXT_COBJ_FILES-y:.o=.c))
 SRCS	+= $(addprefix $(SRCTREE)/,$(EXT_SOBJ_FILES-y:.o=.S))
@@ -81,6 +87,10 @@ $(obj)%.o: $(SRCTREE)/lib_generic/%.c
 $(obj)%.o: $(SRCTREE)/lib_$(ARCH)/%.S
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
+# Rule to build architecture-specific library C files
+$(obj)%.o: $(SRCTREE)/lib_$(ARCH)/%.c
+	$(CC) -g $(CFLAGS) -c -o $@ $<
+
 #########################################################################
 
 # defines $(obj).depend target
-- 
1.6.4.4



More information about the U-Boot mailing list