-ffreestanding Assert that compilation targets a freestanding environment (one with...
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 4 Dec 2014 02:23:18 +0000 (03:23 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000 (17:03 +0100)
Makefile

index a6659bf..008a803 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,9 +7,10 @@ ARCH = armv6-m
 
 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