[PATCH] Adjust top-level Makefile for arm-none-eabi toolchain

Peter Stuge peter at stuge.se
Tue Jan 25 21:31:37 UTC 2011


The gnuarm.com toolchain works fine but is very old. And although it is
based on newlib, the os name in the tuple that we used to configure for
is arm-elf-linux, which is of course bogus since we are not building
Linux applications.

Finally, CC= should never be set, instead configure should detect the
right compiler using the --host tuple.
---
 src/Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index b3594c1..e66f0ff 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,10 +1,10 @@
 
 # this is not really used as we don't do 'make install'. You can still specify
 # it in case you _want_ to manually 'make install' the target libosmocore.
-CROSS_INST_PREFIX=/usr/local/stow/osmocom-bb/arm-elf
+CROSS_INST_PREFIX ?= /usr/local/stow/osmocom-bb/arm-2010.09
 
 # this is the prefix of your cross-toolchain programs
-CROSS_TOOL_PREFIX=arm-elf-
+CROSS_TOOL_PREFIX ?= arm-none-eabi-
 
 TOPDIR=$(shell pwd)
 OSMOCORE_CONFIGURE_ENV= LIBOSMOCORE_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/.libs/libosmocore.a \
@@ -37,9 +37,9 @@ shared/libosmocore/build-target:
 
 shared/libosmocore/build-target/Makefile: shared/libosmocore/configure shared/libosmocore/build-target
 	cd shared/libosmocore/build-target && ../configure \
-			--host=arm-elf-linux --disable-vty --enable-panic-infloop \
+			--host=arm-none-eabi --disable-vty --enable-panic-infloop \
 			--disable-shared --disable-talloc --disable-tests \
-		CC="$(CROSS_TOOL_PREFIX)gcc" CFLAGS="-Os -ffunction-sections -I$(TOPDIR)/target/firmware/include -nostartfiles -nodefaultlibs"
+		CFLAGS="-Os -ffunction-sections -I$(TOPDIR)/target/firmware/include -nostartfiles -nodefaultlibs"
 
 shared/libosmocore/build-target/src/.libs/libosmocore.a: shared/libosmocore/build-target/Makefile
 	cd shared/libosmocore/build-target && make
-- 
1.7.2





More information about the baseband-devel mailing list