From d8830b1448809b84ed95047a90a6793d59527ca0 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Sun, 5 Aug 2012 13:27:13 -0400 Subject: Add support for ARM's GCC ARM embedded toolchain. Based on patches provided by Hanspeter Portner: http://forums.leaflabs.com/topic.php?id=1717#post-11812 Signed-off-by: Marti Bolivar --- support/make/build-rules.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'support/make') diff --git a/support/make/build-rules.mk b/support/make/build-rules.mk index 3d541ba..d180c89 100644 --- a/support/make/build-rules.mk +++ b/support/make/build-rules.mk @@ -22,6 +22,8 @@ ifndef V SILENT_OBJDUMP = @echo ' [OBJDUMP] ' $(OBJDUMP); endif +# Extra build configuration + BUILDDIRS := TGT_BIN := @@ -29,6 +31,17 @@ CFLAGS = $(GLOBAL_CFLAGS) $(TGT_CFLAGS) CXXFLAGS = $(GLOBAL_CXXFLAGS) $(TGT_CXXFLAGS) ASFLAGS = $(GLOBAL_ASFLAGS) $(TGT_ASFLAGS) +# Hacks to determine extra libraries we need to link against based on +# the toolchain. The default specifies no extra libraries, but it can +# be overridden. +LD_TOOLCHAIN_PATH := $(LDDIR)/toolchains/generic +ifneq ($(findstring ARM/embedded,$(shell $(CC) --version)),) +# GCC ARM Embedded, https://launchpad.net/gcc-arm-embedded/ +LD_TOOLCHAIN_PATH := $(LDDIR)/toolchains/gcc-arm-embedded +endif +# Add toolchain directory to LD search path +TOOLCHAIN_LDFLAGS := -L $(LD_TOOLCHAIN_PATH) + # General directory independent build rules, generate dependency information $(BUILD_PATH)/%.o: %.c $(SILENT_CC) $(CC) $(CFLAGS) -MMD -MP -MF $(@:%.o=%.d) -MT $@ -o $@ -c $< -- cgit v1.2.3