Explicitly link example binaries statically.

This allow good share of binaries be linkable (and actually run) with a
typical distro-packaged ARM toolchain (Cortex-A and Linux targetted).
This commit is contained in:
Paul Sokolovsky
2012-09-25 00:31:31 +03:00
parent 7851515c5c
commit d6e0e6e976
3 changed files with 3 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ endif
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m4 -mthumb -msoft-float -MD -DSTM32F4
LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
LDFLAGS += --static -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
-L$(TOOLCHAIN_DIR)/lib/stm32/f4 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -mcpu=cortex-m4 -march=armv7 -mfix-cortex-m3-ldrd -msoft-float