blob: 77ba11c7788ce04a02c207a09f93373024c190bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Enforce correct -march option
Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware
(which runs on a Cortex-M3 processor), but Buildroot will have a
default -march value that doesn't necessarily match the one needed for
Cortex-M3, leading to build failures (gcc complains that the
-mcpu=cortex-m3 option being passed is not compatible with the
selected -march).
Fix this by explicitly indicating -march=armv7-m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@
BINDIR = bin
INCLUDES = $(SRCDIR)/include
-CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -Wall -g -I$(INCLUDES)
+CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -g -I$(INCLUDES)
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
|