#!/usr/bin/make -f # Use GCC 10 instead of earlier versions for better c++20 support ifeq ($(shell $(CXX) --version | head -n1 | cut -d\ -f4 | xargs dpkg --compare-versions 10 lt || echo buggy-cxx-20),buggy-cxx-20) export CC = gcc-10 export CXX = g++-10 endif # Clang does not support -ffat-lto-objects and this breaks check_c_compiler_flag() tests in cmake ifeq ($(CC),clang) export DEB_CFLAGS_MAINT_STRIP = -ffat-lto-objects export DEB_CPPFLAGS_MAINT_STRIP = -ffat-lto-objects export DEB_CXXFLAGS_MAINT_STRIP = -ffat-lto-objects export DEB_LDLAGS_MAINT_STRIP = -ffat-lto-objects endif %: dh $@ ifneq (,$(filter $(distrelease),bionic)) # Bionic's jemalloc does not ship pkgconfig files needed to detect it. # TODO check performance with and without jemalloc on Bionic and maybe change # detection to work without pkgconfig override_dh_auto_configure: dh_auto_configure -- -DJEMALLOC_LIBRARIES=-ljemalloc endif # dwz does not support dwarf-5 binaries emitted by clang # https://sourceware.org/bugzilla/show_bug.cgi?id=28985 override_dh_dwz: ifneq ($(CC),clang) dh_dwz endif override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) make -C obj-* check endif