CROSS_COMPILE = arm-linux-gnueabi-
CC = $(CROSS_COMPILE)gcc
-FOPTS = -fno-builtin -ffunction-sections -fdata-sections
+FOPTS = -fno-builtin -ffunction-sections -fdata-sections -ffreestanding
CFLAGS = -Wall -O2 -mthumb -mcpu=$(CPU) $(FOPTS)
-LINKOPTS = -static -nostartfiles -Wl,--gc-sections -Wl,--build-id=none \
+LINKOPTS = -static -nostartfiles -nostdlib \
+ -Wl,--gc-sections -Wl,--build-id=none \
-Wl,-Map=lpc_map_$(LPC).map -Tlpc_link_$(LPC).ld