From b5eceb5e964edaa392503dd9d930f4b741e2e565 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Tue, 27 Jun 2017 23:56:01 +0200 Subject: [PATCH] - cleanup and debuginfo fix from fedora --- rust-1.16.0-configure-no-override.patch | 28 +++++++++++++++++++++++++ rust.spec | 9 ++++---- 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 rust-1.16.0-configure-no-override.patch diff --git a/rust-1.16.0-configure-no-override.patch b/rust-1.16.0-configure-no-override.patch new file mode 100644 index 0000000..e13dfe9 --- /dev/null +++ b/rust-1.16.0-configure-no-override.patch @@ -0,0 +1,28 @@ +# Don't let configure clobber our debuginfo choice for stable releases. + +diff --git a/configure b/configure +index 505767cede55..4074a1e2f765 100755 +--- a/configure ++++ b/configure +@@ -753,8 +753,8 @@ case "$CFG_RELEASE_CHANNEL" in + *-pc-windows-gnu) + ;; + *) +- CFG_ENABLE_DEBUGINFO_LINES=1 +- CFG_ENABLE_DEBUGINFO_ONLY_STD=1 ++ # CFG_ENABLE_DEBUGINFO_LINES=1 ++ # CFG_ENABLE_DEBUGINFO_ONLY_STD=1 + ;; + esac + +@@ -765,8 +765,8 @@ case "$CFG_RELEASE_CHANNEL" in + *-pc-windows-gnu) + ;; + *) +- CFG_ENABLE_DEBUGINFO_LINES=1 +- CFG_ENABLE_DEBUGINFO_ONLY_STD=1 ++ # CFG_ENABLE_DEBUGINFO_LINES=1 ++ # CFG_ENABLE_DEBUGINFO_ONLY_STD=1 + ;; + esac + ;; diff --git a/rust.spec b/rust.spec index fb55de2..3cf025b 100644 --- a/rust.spec +++ b/rust.spec @@ -35,6 +35,7 @@ Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_ru # Source1-md5: 98e8f479515969123b4c203191104a54 Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.gz # Source2-md5: 2d5de850c32aa8d40c8c21abacf749f8 +Patch0: rust-1.16.0-configure-no-override.patch URL: https://www.rust-lang.org/ BuildRequires: cmake BuildRequires: curl @@ -127,6 +128,8 @@ language and its standard library. %prep %setup -q -n %{rustc_package} +%patch0 -p1 + %if %{with bootstrap} %ifarch %{x8664} tar xf %{SOURCE1} @@ -162,17 +165,13 @@ sed -i -e '1i // ignore-test jemalloc is disabled' \ src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \ src/test/run-pass/allocator-default.rs -# Fedora's LLVM doesn't support any mips targets -- see "llc -version". -# Fixed properly by Rust PR36344, which should be released in 1.13. -sed -i -e '/target=mips/,+1s/^/# unsupported /' \ - src/test/run-make/atomic-lock-free/Makefile - %build %configure \ --disable-option-checking \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ --enable-local-rust --local-rust-root=%{local_rust_root} \ --llvm-root=%{_prefix} --disable-codegen-tests \ + --enable-llvm-link-shared \ --disable-jemalloc \ --disable-rpath \ --enable-debuginfo \ -- 2.43.0