Skip to content

Commit 6c694ef

Browse files
author
Maxim Egorushkin
committed
Fix gcc-13.3 compiler errors when compiling benchmarks.cc.
1 parent 278199b commit 6c694ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AR := ${ar.${TOOLSET}}
3838
cxxflags.gcc.debug := -Og -fstack-protector-all -fno-omit-frame-pointer # -D_GLIBCXX_DEBUG
3939
cxxflags.gcc.release := -O3 -mtune=native -ffast-math -falign-{functions,loops}=64 -DNDEBUG
4040
cxxflags.gcc.sanitize := ${cxxflags.gcc.release} -fsanitize=thread
41-
cxxflags.gcc := -std=gnu++14 -pthread -march=native -W{all,extra,error,no-{maybe-uninitialized,unused-variable,unused-function,unused-local-typedefs,error=array-bounds}} -fmessage-length=0 ${cxxflags.gcc.${BUILD}}
41+
cxxflags.gcc := -std=gnu++14 -pthread -march=native -W{all,extra,error,no-{array-bounds,maybe-uninitialized,unused-variable,unused-function,unused-local-typedefs}} -fmessage-length=0 ${cxxflags.gcc.${BUILD}}
4242
ldflags.gcc.sanitize := ${ldflags.gcc.release} -fsanitize=thread
4343
ldflags.gcc := ${ldflags.gcc.${BUILD}}
4444

@@ -65,6 +65,7 @@ cppflags.moodycamel := -I$(abspath ..)
6565
ldlibs.moodycamel :=
6666

6767
cppflags.xenium := -I${abspath ../xenium}
68+
cxxflags.xenium := -std=gnu++17
6869
ldlibs.xenium :=
6970

7071
recompile := ${build_dir}/.make/recompile
@@ -95,6 +96,7 @@ ${exes} : % : ${build_dir}/%
9596

9697
benchmarks_src := benchmarks.cc cpu_base_frequency.cc huge_pages.cc
9798
${build_dir}/benchmarks : cppflags += ${cppflags.tbb} ${cppflags.moodycamel} ${cppflags.xenium}
99+
${build_dir}/benchmarks : cxxflags += ${cxxflags.tbb} ${cxxflags.moodycamel} ${cxxflags.xenium}
98100
${build_dir}/benchmarks : ldlibs += ${ldlibs.tbb} ${ldlibs.moodycamel} ${ldlibs.xenium} -ldl
99101
${build_dir}/benchmarks : ${benchmarks_src:%.cc=${build_dir}/%.o} ${relink} | ${build_dir}
100102
$(call strip2,${LINK.EXE})
@@ -141,7 +143,7 @@ ${build_dir} ${build_dir}/.make:
141143

142144
ver = "$(shell ${1} --version | head -n1)"
143145
# Trigger recompilation when compiler environment change.
144-
env.compile := $(call ver,${CXX}) ${cppflags} ${cxxflags} ${cppflags.tbb} ${cppflags.moodycamel} ${cppflags.xenium}
146+
env.compile := $(call ver,${CXX}) ${cppflags} ${cxxflags} ${cppflags.tbb} ${cppflags.moodycamel} ${cppflags.xenium} ${cxxflags.tbb} ${cxxflags.moodycamel} ${cxxflags.xenium}
145147
# Trigger relink when linker environment change.
146148
env.link := $(call ver,${LD}) ${ldflags} ${ldlibs} ${ldlibs.tbb} ${ldlibs.moodycamel} ${ldlibs.xenium}
147149

0 commit comments

Comments
 (0)