From 16fbb700ed82cf6d3aad3a9c293b0e8068840b96 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 27 Dec 2021 12:08:57 +0100 Subject: Fix build on Debian and Ubuntu versions --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e037bc5..a3962c1 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,18 @@ PROJECTNAME=unicode VERSION=$(shell dpkg-parsechangelog --show-field Version) -ifeq ($(shell lsb_release -si),Debian) +ifeq ($(shell lsb_release -is),Debian) ONDEBIAN=yes +DEBIANVERSION=$(shell lsb_release -rs) else ONDEBIAN=no endif # On Ubuntu 2104 and 2110, dh_strip / debugedit is broken, therefore different Non-Debian options in the following -DISTROS=base base-i386 debian10 debian11 ubuntu2004 ubuntu2010 ubuntu2104 ubuntu2110 ubuntu2204 +DISTROS=base base-i386 debian10 debian11 ubuntu2004 ubuntu2104 ubuntu2110 ubuntu2204 + +ifeq ($(DEBIANVERSION),10) +CXX=g++-8 +else ifeq ($(wildcard $(shell which clang++-13)),) ifeq ($(wildcard $(shell which clang++-12)),) @@ -27,6 +32,8 @@ else CXX=clang++-13 endif +endif + STANDARD=c++17 ifeq ($(CXXFLAGS),) @@ -38,7 +45,6 @@ ifeq ($(CXX),clang++-13) ifeq ($(ONDEBIAN),yes) COMPILER_SUITE=clang LIBS+=-fuse-ld=lld-13 -# boost is buggy for C++20: error: static_assert failed due to requirement 'detail::is_endian_reversible_inplace STANDARD=c++20 endif endif -- cgit v1.2.3