* Try to fix the mipsel FTBFS (Closes: #877567)

I am trying the first option from the bug:
  - gsplit-dward on 32 bits archs
  - -g everywhere
  Many thanks to Adrian Bunk for that
This commit is contained in:
Sylvestre Ledru 2017-10-19 07:06:58 +00:00
parent be94a5a691
commit 5e4558a841
3 changed files with 25 additions and 24 deletions

13
debian/changelog vendored
View File

@ -1,10 +1,17 @@
llvm-toolchain-4.0 (1:4.0.1-7.1) UNRELEASED; urgency=medium
llvm-toolchain-4.0 (1:4.0.1-8) unstable; urgency=medium
* Non-maintainer upload.
[ Ximin Luo ]
* Backport some patches (originally from rust, and upstreamed) to fix two
failing tests in rustc.
-- Ximin Luo <infinity0@debian.org> Wed, 18 Oct 2017 15:28:20 +0200
[ Sylvestre Ledru ]
* Try to fix the mipsel FTBFS (Closes: #877567)
I am trying the first option from the bug:
- gsplit-dward on 32 bits archs
- -g everywhere
Many thanks to Adrian Bunk for that
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 18 Oct 2017 16:37:25 +0200
llvm-toolchain-4.0 (1:4.0.1-7) unstable; urgency=medium

View File

@ -378,15 +378,15 @@ Date: Mon Jun 12 14:56:02 2017 +0000
+ %bar = alloca [32 x i64]
+ %foo_i8 = bitcast [32 x i64]* %foo to i8*
+ %bar_i8 = bitcast [32 x i64]* %bar to i8*
+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.start(i64 256, i8* %bar_i8)
+ call void @baz([32 x i64]* %bar, i32 1)
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.start(i64 256, i8* %foo_i8)
+ call void @baz([32 x i64]* %foo, i32 1)
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.start(i64 256, i8* %bar_i8)
+ call void @baz([32 x i64]* %bar, i32 1)
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %bar_i8)
+ ret i1 true
+}
+
@ -403,24 +403,24 @@ Date: Mon Jun 12 14:56:02 2017 +0000
+ %bar_i8 = bitcast [32 x i64]* %bar to i8*
+ br i1 %0, label %if_false, label %if_true
+if_false:
+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.start(i64 256, i8* %bar_i8)
+ call void @baz([32 x i64]* %bar, i32 0)
+ br i1 %1, label %if_false.1, label %onerr
+if_false.1:
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %bar_i8)
+ br label %merge
+if_true:
+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.start(i64 256, i8* %foo_i8)
+ call void @baz([32 x i64]* %foo, i32 1)
+ br i1 %1, label %if_true.1, label %onerr
+if_true.1:
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %foo_i8)
+ br label %merge
+merge:
+ ret i1 false
+onerr:
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %foo_i8)
+ call void @llvm.lifetime.end(i64 256, i8* %bar_i8)
+ call void @destructor()
+ ret i1 true
+}

12
debian/rules vendored
View File

@ -35,9 +35,8 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe))
LDFLAGS_EXTRA += -latomic
endif
ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc
# Only enable gsplit dwarf on archs which needs it
ifneq (,$(filter $(DEB_HOST_ARCH),$(ENABLE_SPLIT_DWARF_ARCHS)))
# Only enable gsplit dwarf on archs which needs it (32 bits)
ifeq ($(DEB_HOST_ARCH_BITS),32)
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
@ -46,7 +45,7 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++
# Only pass -gsplit-dwarf with working version of gcc 7
# More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609
CXXFLAGS_EXTRA += -gsplit-dwarf
else
else
$(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or >= 7.2.0-2")
endif # < gcc 7 or >= 7.2.0-2
endif # binutils
@ -62,11 +61,6 @@ export CC=gcc-$(GCC_VERSION)
export CXX=g++-$(GCC_VERSION)
opt_flags = -O2 -DNDEBUG
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el s390x))
opt_flags += -g1
else
opt_flags += -g
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
opt_flags += -marm