From 7179823d5670b49425682b0ec7413fc58988b56a Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 7 Nov 2021 00:24:23 +0300 Subject: [PATCH] mdbx-make: extpanded list of c++std for probing. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index a5a185ce..44ff2d5d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,7 +35,7 @@ CFLAGS ?= -std=gnu11 -O2 -g -Wall -Werror -Wextra -Wpedantic -ffunction-section # -Wno-tautological-compare CXX ?= g++ # Choosing C++ standard with deferred simple variable expansion trick -CXXSTD ?= $(eval CXXSTD := $$(shell PROBE=$$$$([ -f mdbx.c++ ] && echo mdbx.c++ || echo src/mdbx.c++); for std in gnu++20 c++20 gnu++2a c++2a gnu++17 c++17 gnu++14 c++14 gnu+11 c++11; do $(CXX) -std=$$$${std} -c $$$${PROBE} -o /dev/null 2>/dev/null >/dev/null && echo "-std=$$$${std}" && exit; done))$(CXXSTD) +CXXSTD ?= $(eval CXXSTD := $$(shell PROBE=$$$$([ -f mdbx.c++ ] && echo mdbx.c++ || echo src/mdbx.c++); for std in gnu++23 c++23 gnu++2b c++2b gnu++20 c++20 gnu++2a c++2a gnu++17 c++17 gnu++1z c++1z gnu++14 c++14 gnu++1y c++1y gnu+11 c++11 gnu++0x c++0x; do $(CXX) -std=$$$${std} -c $$$${PROBE} -o /dev/null 2>std-$$$${std}.err >/dev/null && echo "-std=$$$${std}" && exit; done))$(CXXSTD) CXXFLAGS = $(CXXSTD) $(filter-out -std=gnu11,$(CFLAGS)) # TIP: Try append '--no-as-needed,-lrt' for ability to built with modern glibc, but then use with the old.