From ea1e51636c68f6d07b3d62b7b9d960567d4e3f33 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 6 Jun 2022 03:56:51 +1000 Subject: Adjust toolchain versions for triggering workarounds: * Make netlist/plib noexcept issue workaround trigger for clang 8 or Apple clang 11.0.0. * Disable lifetime DSE optimisation for GCC 10.2 (this may be an issue in GNU libstdc++ rather than GCC itself - using compiler version as a proxy for standard library version is bad, but it's the path of least resistance for now). --- makefile | 6 +++--- scripts/genie.lua | 4 ++-- src/lib/netlist/plib/ptypes.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/makefile b/makefile index c5cedbc046f..916d92277f4 100644 --- a/makefile +++ b/makefile @@ -1000,7 +1000,7 @@ CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> /dev/null PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python) GIT_AVAILABLE := $(shell git --version > /dev/null 2>&1 && echo git) else -GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> NUL) +GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpfullversion 2> NUL) CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> NUL| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$$/\1/" | head -n 1) PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python) GIT_AVAILABLE := $(shell git --version > NUL 2>&1 && echo git) @@ -1023,9 +1023,9 @@ endif endif else ifdef OVERRIDE_CC -GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(OVERRIDE_CC)) -dumpversion 2> /dev/null) +GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(OVERRIDE_CC)) -dumpfullversion 2> /dev/null) else -GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null) +GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpfullversion 2> /dev/null) endif ifeq ($(findstring emcc,$(CC)),emcc) CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -v 2>&1 >/dev/null | grep 'clang version' | head -n 1 | grep -e 'version [0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' -o | grep -e '[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' -o | tail -n 1) diff --git a/scripts/genie.lua b/scripts/genie.lua index 216e150a4f7..76f18039000 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1085,9 +1085,9 @@ end "-Wno-array-bounds", "-Wno-error=attributes", -- GCC fails to recognize some uses of [[maybe_unused]] } - if version < 100000 then + if version < 100300 then buildoptions_cpp { - "-flifetime-dse=1", -- GCC 9 takes issue with Sol's get >() otherwise + "-flifetime-dse=1", -- GCC 10.2 and earlier take issue with Sol's get >() otherwise - possibly an issue with libstdc++ itself } end if version >= 80000 then diff --git a/src/lib/netlist/plib/ptypes.h b/src/lib/netlist/plib/ptypes.h index 481fd8c3061..fcd72d779c3 100644 --- a/src/lib/netlist/plib/ptypes.h +++ b/src/lib/netlist/plib/ptypes.h @@ -227,9 +227,9 @@ namespace plib using mingw = std::integral_constant; #endif #if defined(__APPLE__) - using clang_noexcept_issue = std::integral_constant; + using clang_noexcept_issue = std::integral_constant; #else - using clang_noexcept_issue = std::integral_constant; + using clang_noexcept_issue = std::integral_constant; #endif #if defined(__ia64__) using abi_vtable_function_descriptors = std::integral_constant; -- cgit v1.2.3