[PATCH] Makefile: be more robust against toolchains without syscalls

Michael Grzeschik mgr at xviews.de
Tue Jan 18 10:58:26 UTC 2011


Several toolchains are missing syscalls provided by the libc used. For example,
if the newlib was build with the configure flag "--disable-newlib-supplied-syscalls".
To prevent the configure check for things like "_exit" in osmocom
the CFLAGS+="-nostartfiles -nodefaultlibs" helps a lot.

Signed-off-by: Michael Grzeschik <mgr at xviews.de>
Acked-by: Wolfram Sang <wolfram at the-dreams.de>

---
 src/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index a0dea5d..b3594c1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -39,7 +39,7 @@ shared/libosmocore/build-target/Makefile: shared/libosmocore/configure shared/li
 	cd shared/libosmocore/build-target && ../configure \
 			--host=arm-elf-linux --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"
+		CC="$(CROSS_TOOL_PREFIX)gcc" 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.3





More information about the baseband-devel mailing list