fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit f66db750ed01f52707a37e05d86af4f59019f473
parent 434d47d2b77b5d5e7a8d0ecc8bfa435579c9a008
Author: jvoisin <julien.voisin@dustri.org>
Date:   Wed, 11 Mar 2026 15:54:01 +0100

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

Diffstat:
Mtests/Makefile | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 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