f3cdb5e2b94143047816483ee1f2e7423a407be4
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / am33x-cm3 / 0001-fix-makefile.patch
1 Enforce correct -march option
2
3 Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware
4 (which runs on a Cortex-M3 processor), but Buildroot will have a
5 default -march value that doesn't necessarily match the one needed for
6 Cortex-M3, leading to build failures (gcc complains that the
7 -mcpu=cortex-m3 option being passed is not compatible with the
8 selected -march).
9
10 Fix this by explicitly indicating -march=armv7-m.
11
12 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13
14 Updated the patch to the latest version of the Makefile
15
16 Signed-off-by: Anders Darander <anders@chargestorm.se>
17
18 Index: b/Makefile
19 ===================================================================
20 --- a/Makefile
21 +++ b/Makefile
22 @@ -13,7 +13,7 @@ SRCDIR = src
23  BINDIR = bin
24  
25  INCLUDES = $(SRCDIR)/include
26 -CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
27 +CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
28         -Werror-implicit-function-declaration -Wstrict-prototypes \
29         -Wdeclaration-after-statement -fno-delete-null-pointer-checks \
30         -Wempty-body -fno-strict-overflow  -g -I$(INCLUDES) -O2