From e6e77399d6c723c8a4f76c70b20c116004885a80 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 13 Sep 2023 16:54:45 +0200 Subject: [PATCH] firmware/Makefile: don't use distribution's CFLAGS Set CFLAGS on top of the Makefile, to avoid using the distribution's default CFLAGS. In debian testing and unstable, -fcf-protection was recently added to the default CFLAGS, but it cannot be used with the cross compiler: [COMPILING libosmocore/source/backtrace.c] cc1: error: '-fcf-protection=full' is not supported for this target make[2]: *** [Makefile:270: obj/simtrace/flash_backtrace.o] Error 1 Change-Id: I5f7cd0402f9bb85dd600204fdf8855773ddbeb70 --- firmware/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firmware/Makefile b/firmware/Makefile index 9a2d3470..2f7a3700 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -29,6 +29,13 @@ # Makefile for compiling the Getting Started with SAM3S Microcontrollers project GIT_VERSION=$(shell $(TOP)/git-version-gen $(TOP)/.tarball-version) + +CFLAGS = \ + -Werror=format-security \ + -Wformat \ + -g \ + $(NULL) + #------------------------------------------------------------------------------- # User-modifiable options #-------------------------------------------------------------------------------