diff --git a/debian/rules b/debian/rules index 17d7bf76..b7e0780a 100755 --- a/debian/rules +++ b/debian/rules @@ -33,6 +33,12 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic endif +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) +# when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise: +# More: https://llvm.org/bugs/show_bug.cgi?id=28841 +CXXFLAGS_EXTRA += -gsplit-dwarf +endif + ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0) # Too old version of gcc. Force 4.9 GCC_VERSION := 4.9