From f66db750ed01f52707a37e05d86af4f59019f473 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 11 Mar 2026 15:54:01 +0100 Subject: Add some compilers flags to the C++ testsuite Notably -Wno-fortify-source, to prevent clang from using its own fortify implementation. Co-Authored-By: Sertonix --- tests/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index f2428f8..81f7f6e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,7 +3,9 @@ _FORTIFY_SOURCE ?= 3 CFLAGS ?= -std=gnu99 CFLAGS += -I../include/ -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -static -O2 -Wall -Wextra -Werror -Werror=pointer-arith CFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter -CXXFLAGS += -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) +CXXFLAGS += -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -O2 +CXXFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter + RUNTIME_TARGETS= \ test_FD_CLR_SETSIZE \ @@ -118,7 +120,7 @@ clang: CXX=clang++ clang: CXXFLAGS+=-I/usr/include/$(MACHINE)-linux-musl clang: CXXFLAGS+=-I../$(MACHINE)-linux-musl-native/include/ clang: CXXFLAGS+=-I$(MACHINE)-linux-musl-native/include/ -clang: CXXFLAGS+=-nostdinc +clang: CXXFLAGS+=-nostdinc -Wno-fortify-source clang: $(RUNTIME_TARGETS) cpp all: gcc -- cgit v1.3