Don't use system compiler-rt, it's not ready yet

This commit is contained in:
Ximin Luo 2019-05-31 18:59:26 -07:00
parent 41646ec099
commit 46eb009d5a
7 changed files with 57 additions and 8 deletions

View File

@ -17,6 +17,13 @@ The upstream source package embeds many external libraries. We make a great
effort to remove them and use system versions where possible, but there are a
few more remaining:
* compiler-rt from https://github.com/rust-lang/compiler-rt
-> system-wide compiler-rt fails during linkage
Bug reported upstream, still to be fixed, see:
- https://github.com/rust-lang/rust/issues/15054
- https://github.com/rust-lang/rust/issues/15708
* vendor/backtrace-sys, vendor/dlmalloc, vendor/walkdir
These are small C libraries designed to be statically linked; their upstream

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
rustc (1.34.2+dfsg1-1~exp3) UNRELEASED; urgency=medium
* Don't use system compiler-rt, it's not ready yet.
-- Ximin Luo <infinity0@debian.org> Fri, 31 May 2019 18:37:07 -0700
rustc (1.34.2+dfsg1-1~exp2) experimental; urgency=medium
* Fix doc build, add version 1 compat mode hack for mdBook 2.

4
debian/control vendored
View File

@ -15,8 +15,8 @@ Build-Depends: debhelper (>= 9),
llvm-8-dev:native,
llvm-8-tools:native,
libllvm8,
libclang-common-8-dev,
libclang-common-8-dev:native,
# libclang-common-8-dev,
# libclang-common-8-dev:native,
autotools-dev,
cmake (>= 3.0) | cmake3,
# needed by some vendor crates

17
debian/copyright vendored
View File

@ -24,8 +24,21 @@ Files-Excluded:
src/tools/remote-test-server
src/tools/rustfmt
src/tools/miri
# Extraneous stuff from compiler-rt that's not needed by Rust
vendor/compiler_builtins/compiler-rt/cmake
vendor/compiler_builtins/compiler-rt/docs
vendor/compiler_builtins/compiler-rt/include
vendor/compiler_builtins/compiler-rt/lib/*san
vendor/compiler_builtins/compiler-rt/lib/fuzzer
vendor/compiler_builtins/compiler-rt/lib/interception
vendor/compiler_builtins/compiler-rt/lib/profile
vendor/compiler_builtins/compiler-rt/lib/sanitizer_common
vendor/compiler_builtins/compiler-rt/lib/scudo
vendor/compiler_builtins/compiler-rt/lib/xray
vendor/compiler_builtins/compiler-rt/test
vendor/compiler_builtins/compiler-rt/unittests
vendor/compiler_builtins/compiler-rt/www
# Embedded C libraries
vendor/compiler_builtins/compiler-rt
vendor/libz-sys/src/zlib*
vendor/lzma-sys*/xz-*
# Embedded binary blobs
@ -213,8 +226,6 @@ Copyright: 2016-2019 Jorge Aparicio <japaricious@gmail.com>
License: MIT or Apache-2.0
Comment: see https://github.com/rust-lang-nursery/compiler-builtins
# TODO: below entries for compiler-rt can be removed on next source re-pack
Files: vendor/compiler_builtins/compiler-rt/*
Copyright: 2009-2015 Howard Hinnant
2009-2015 The CompileRT Developers (see src/compiler-rt/CREDITS.TXT)

25
debian/patches/gcc-4.8-aarch64-ice.diff vendored Normal file
View File

@ -0,0 +1,25 @@
Index: rustc/vendor/compiler_builtins/compiler-rt/lib/builtins/trunctfdf2.c
===================================================================
--- rustc.orig/vendor/compiler_builtins/compiler-rt/lib/builtins/trunctfdf2.c
+++ rustc/vendor/compiler_builtins/compiler-rt/lib/builtins/trunctfdf2.c
@@ -7,6 +7,12 @@
//
//===----------------------------------------------------------------------===//
+#if defined(__aarch64__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ <= 8)
+// work around https://launchpad.net/bugs/1667761
+#pragma GCC push_options
+#pragma GCC optimize "O1"
+#endif
+
#define QUAD_PRECISION
#include "fp_lib.h"
@@ -20,3 +26,7 @@ COMPILER_RT_ABI double __trunctfdf2(long
}
#endif
+#if defined(__aarch64__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ <= 8)
+#pragma GCC pop_options
+#endif
+

View File

@ -12,6 +12,8 @@ u-mips-fixes.diff
# not forwarded, or forwarded but unlikely to be merged
u-reproducible-dl-stage0.patch
gcc-4.8-aarch64-ice.diff
# Debian-specific patches, not suitable for upstream
# Patches needed by debian/prune-unused-deps
d-0000-ignore-removed-submodules.patch
@ -20,7 +22,7 @@ d-0002-pkg-config-no-special-snowflake.patch
d-0003-mdbook-strip-embedded-libs.patch
d-0004-mdbook-2-1-compat.patch
# Other patches needed by the full Debian build
d-use-system-compiler-rt.patch
#d-use-system-compiler-rt.patch
d-ignore-error-detail-diff.patch
d-disable-cargo-vendor.patch
d-rust-gdb-paths

View File

@ -1,3 +1 @@
rustc source: source-is-missing src/stdsimd/crates/stdsimd-verify/arm-intrinsics.html line length is * characters (>*)
# TODO: can be removed on next source repack
rustc source: source-includes-file-in-files-excluded vendor/compiler_builtins/compiler-rt/*