From 296be108bd0b39c719f500a5b58615a12edb41e1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 26 Aug 2017 15:07:46 +0000 Subject: [PATCH] Disable -gsplit-dwarf when using gcc 7 for causing a linking issue See https://bugs.llvm.org/show_bug.cgi?id=34140 (Closes: #853526) --- debian/changelog | 3 +++ debian/rules | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 09fbb066..d3223ca5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) * ld.lld manpage wasn't installed * Link LLDB with -latomic on powerpcspe (Closes: #872267) + * Disable -gsplit-dwarf when using gcc 7 for causing a linking issue + See https://bugs.llvm.org/show_bug.cgi?id=34140 + (Closes: #853526) [ Katsuhiko Nishimra ] * Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) diff --git a/debian/rules b/debian/rules index b2edeebc..d4539f27 100755 --- a/debian/rules +++ b/debian/rules @@ -38,8 +38,12 @@ 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 +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ ; echo $$?),0) +# Do not pass -gsplit-dwarf with gcc 7. This is causing some linking issues +# More: https://bugs.llvm.org/show_bug.cgi?id=34140 CXXFLAGS_EXTRA += -gsplit-dwarf endif +endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0)