diff options
| author | jvoisin | 2026-03-11 15:54:01 +0100 |
|---|---|---|
| committer | jvoisin | 2026-03-13 01:11:35 +0100 |
| commit | f66db750ed01f52707a37e05d86af4f59019f473 (patch) | |
| tree | 70b971afd6d0d4ea527d7b2ee25b0e260846dd3d /tests | |
| parent | 434d47d2b77b5d5e7a8d0ecc8bfa435579c9a008 (diff) | |
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 (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 6 |
1 files 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 | |||
| 3 | CFLAGS ?= -std=gnu99 | 3 | CFLAGS ?= -std=gnu99 |
| 4 | CFLAGS += -I../include/ -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -static -O2 -Wall -Wextra -Werror -Werror=pointer-arith | 4 | CFLAGS += -I../include/ -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -static -O2 -Wall -Wextra -Werror -Werror=pointer-arith |
| 5 | CFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter | 5 | CFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter |
| 6 | CXXFLAGS += -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) | 6 | CXXFLAGS += -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -O2 |
| 7 | CXXFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter | ||
| 8 | |||
| 7 | 9 | ||
| 8 | RUNTIME_TARGETS= \ | 10 | RUNTIME_TARGETS= \ |
| 9 | test_FD_CLR_SETSIZE \ | 11 | test_FD_CLR_SETSIZE \ |
| @@ -118,7 +120,7 @@ clang: CXX=clang++ | |||
| 118 | clang: CXXFLAGS+=-I/usr/include/$(MACHINE)-linux-musl | 120 | clang: CXXFLAGS+=-I/usr/include/$(MACHINE)-linux-musl |
| 119 | clang: CXXFLAGS+=-I../$(MACHINE)-linux-musl-native/include/ | 121 | clang: CXXFLAGS+=-I../$(MACHINE)-linux-musl-native/include/ |
| 120 | clang: CXXFLAGS+=-I$(MACHINE)-linux-musl-native/include/ | 122 | clang: CXXFLAGS+=-I$(MACHINE)-linux-musl-native/include/ |
| 121 | clang: CXXFLAGS+=-nostdinc | 123 | clang: CXXFLAGS+=-nostdinc -Wno-fortify-source |
| 122 | clang: $(RUNTIME_TARGETS) cpp | 124 | clang: $(RUNTIME_TARGETS) cpp |
| 123 | 125 | ||
| 124 | all: gcc | 126 | all: gcc |
