From 4e2c99b1197633704ce249413d86da28d21e1d8b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 16 Dec 2025 14:58:28 +0100 Subject: [PATCH] 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. Upstream: N/A Buildroot specific Signed-off-by: Thomas Petazzoni Signed-off-by: Kory Maincent --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3fd9f23d4969..3f27be4dff4f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ SRCDIR = src BINDIR = bin INCLUDES = $(SRCDIR)/include -CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -Wundef \ +CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -Wundef \ -Werror-implicit-function-declaration -Wstrict-prototypes \ -Wdeclaration-after-statement -fno-delete-null-pointer-checks \ -Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2 -MD -- 2.43.0