Skip to content

Commit 87dcc8d

Browse files
committed
Some -m32 tests, add SIM, move CXXFLAGS around
- Move -fno-operator-names to GCC flags. - Build with VIR_NEXT_PATCH. - Build with static libstdc++ (for non-system GCC) - Add i686 and pentium3 when building with FLAGS=-m32 - Disable float16_t with FLAGS=-m32 - Allow running test executables via $(SIM) Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
1 parent 206bc17 commit 87dcc8d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Makefile.common

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
objdir = obj
66

7-
CXXFLAGS+=-std=c++26 -Wall -Wextra -Werror -O2 -g0 -Wno-attributes -fno-operator-names -D_GLIBCXX_ASSERTIONS=1 -D_GLIBCXX_SIMD_COND_EXPLICIT_MASK_CONVERSION $(FLAGS)
7+
CXXFLAGS+=-std=c++26 -Wall -Wextra -Werror -O2 -g0 -Wno-attributes -D_GLIBCXX_ASSERTIONS=1 -D_GLIBCXX_SIMD_COND_EXPLICIT_MASK_CONVERSION -DVIR_NEXT_PATCH $(FLAGS)
88
CXXFLAGS_clang := -Wno-unknown-pragmas -ferror-limit=3
9-
CXXFLAGS_gcc := -fconcepts-diagnostics-depth=2 -fconstexpr-ops-limit=67108864 -fmax-errors=6 -freflection -Wno-psabi
9+
CXXFLAGS_gcc := -fconcepts-diagnostics-depth=2 -fconstexpr-ops-limit=67108864 -fmax-errors=6 -freflection -Wno-psabi -static-libstdc++ -fno-operator-names
1010

1111
cxx_version := $(shell $(CXX) --version | head -n1)
1212

@@ -90,6 +90,10 @@ testarchs ::= x86-64 \
9090
x86-64-v4 \
9191
graniterapids
9292

93+
ifeq ($(FLAGS),-m32)
94+
testarchs += i686 pentium3
95+
endif
96+
9397
disabled_tests ::=
9498

9599
tests ::= $(filter-out $(disabled_tests),$(patsubst tests/%.cpp,%,$(wildcard tests/*.cpp)))
@@ -107,10 +111,12 @@ testtypes ::= signed-char \
107111
complex-float \
108112
complex-double
109113

114+
ifneq ($(FLAGS),-m32)
110115
ifneq ($(compiler),clang)
111116
testtypes += std::float16_t
112117
testtypes += complex-float16_t
113118
endif
119+
endif
114120

115121
testtypes ::= $(subst ::,--,$(testtypes))
116122

@@ -194,7 +200,7 @@ ifeq ($(DIRECT),)
194200
@rm $$(@:check/%=$(objdir)/%.o)
195201
endif
196202
@rm -f $$@.failed
197-
@$$(@:check/%=$(objdir)/%.exe) >$$@ 2>&1 && { \
203+
@$$(SIM) $$(@:check/%=$(objdir)/%.exe) >$$@ 2>&1 && { \
198204
printf -- '$$(msg_run) %-60s %s\n' '$$@' "$$$$($$(print_progress))"; \
199205
touch -r $$(@:check/%=$(objdir)/%.exe) $$@; \
200206
} || { \

0 commit comments

Comments
 (0)