From: Nathael Pajani Date: Thu, 4 Dec 2014 02:23:18 +0000 (+0100) Subject: -ffreestanding Assert that compilation targets a freestanding environment (one with... X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=05740a6edd900094c5e595bfab7adb569a1784ae;p=soft%2Flpc122x%2Fcore -ffreestanding Assert that compilation targets a freestanding environment (one with no OS and none of the related stuff) -nostdlib prevents inclusion of standard libraries, which or not present in our system. Requiered parts have been re-implemented (mostly a copy from the Linux kernel code) --- diff --git a/Makefile b/Makefile index a6659bf..008a803 100644 --- 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