From b7dcc93f0e1139d30ef9710adbb19daa8dbdd2a1 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 29 Nov 2022 17:23:19 +0100 Subject: [PATCH] programs/fuzz: set sensible default CFLAGS Running make from programs/fuzz didn't set any optimization flags (running make from programs or from the root inherited the parent's optimization flags). Default to -O2. There were no -W flags. Default to -Wall -Wextra, but not -Werror in line with the other makefiles. Signed-off-by: Gilles Peskine --- programs/fuzz/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/fuzz/Makefile b/programs/fuzz/Makefile index 084fc241ec..0eb2baf886 100644 --- a/programs/fuzz/Makefile +++ b/programs/fuzz/Makefile @@ -1,7 +1,9 @@ MBEDTLS_TEST_PATH:=../../tests/src MBEDTLS_TEST_OBJS:=$(patsubst %.c,%.o,$(wildcard ${MBEDTLS_TEST_PATH}/*.c ${MBEDTLS_TEST_PATH}/drivers/*.c)) -LOCAL_CFLAGS = -I../../tests/include -I../../include -D_FILE_OFFSET_BITS=64 +CFLAGS ?= -O2 +WARNING_CFLAGS ?= -Wall -Wextra +LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../../tests/include -I../../include -D_FILE_OFFSET_BITS=64 LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \ -L../../library \ -lmbedtls$(SHARED_SUFFIX) \