about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-14 19:31:28 -0800
committerbors <bors@rust-lang.org>2014-02-14 19:31:28 -0800
commitf0bad904a1b53c5c5972e24edd79a96a1d442576 (patch)
treee83c4422d82289eee9206f25e2fa8dbb83afd250
parent9b173edf863c3f04a0d8534bdd3e3cbef31c711a (diff)
parent90311fc68fb484310df9ffc614e592dee30644ae (diff)
downloadrust-f0bad904a1b53c5c5972e24edd79a96a1d442576.tar.gz
rust-f0bad904a1b53c5c5972e24edd79a96a1d442576.zip
auto merge of #12276 : alexcrichton/rust/issue-8449, r=kballard
This was just waiting for compiler-rt support, which was added in #12027

Closes #8449
-rw-r--r--src/librustc/back/link.rs14
-rw-r--r--src/libstd/num/i64.rs2
-rw-r--r--src/libstd/num/mod.rs2
-rw-r--r--src/libstd/num/u64.rs2
4 files changed, 8 insertions, 12 deletions
diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
index 5ab4c602264..6213f7585df 100644
--- a/src/librustc/back/link.rs
+++ b/src/librustc/back/link.rs
@@ -1122,13 +1122,6 @@ fn link_args(sess: Session,
         args.push(~"-Wl,--allow-multiple-definition");
     }
 
-    // Stack growth requires statically linking a __morestack function
-    args.push(~"-lmorestack");
-    // compiler-rt contains implementations of low-level LLVM helpers
-    // It should go before platform and user libraries, so it has first dibs
-    // at resolving symbols that also appear in libgcc.
-    args.push(~"-lcompiler-rt");
-
     add_local_native_libraries(&mut args, sess);
     add_upstream_rust_crates(&mut args, sess, dylib, tmpdir);
     add_upstream_native_libraries(&mut args, sess);
@@ -1163,6 +1156,13 @@ fn link_args(sess: Session,
         args.push_all(rpath::get_rpath_flags(sess, out_filename));
     }
 
+    // Stack growth requires statically linking a __morestack function
+    args.push(~"-lmorestack");
+    // compiler-rt contains implementations of low-level LLVM helpers
+    // It should go before platform and user libraries, so it has first dibs
+    // at resolving symbols that also appear in libgcc.
+    args.push(~"-lcompiler-rt");
+
     // Finally add all the linker arguments provided on the command line along
     // with any #[link_args] attributes found inside the crate
     args.push_all(sess.opts.cg.link_args);
diff --git a/src/libstd/num/i64.rs b/src/libstd/num/i64.rs
index 2a91ee4dd71..3af082210b9 100644
--- a/src/libstd/num/i64.rs
+++ b/src/libstd/num/i64.rs
@@ -60,8 +60,6 @@ impl CheckedSub for i64 {
     }
 }
 
-// FIXME: #8449: should not be disabled on 32-bit
-#[cfg(target_word_size = "64")]
 impl CheckedMul for i64 {
     #[inline]
     fn checked_mul(&self, v: &i64) -> Option<i64> {
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index c5510078e39..c9908dde6e0 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/num/mod.rs
@@ -426,7 +426,7 @@ pub trait Int: Integer
              + Bitwise
              + CheckedAdd
              + CheckedSub
-             // + CheckedMul // FIXME #8849: currently not impled on 32-bit
+             + CheckedMul
              + CheckedDiv {}
 
 /// Returns the smallest power of 2 greater than or equal to `n`.
diff --git a/src/libstd/num/u64.rs b/src/libstd/num/u64.rs
index a579e7ebbbe..17eebed967c 100644
--- a/src/libstd/num/u64.rs
+++ b/src/libstd/num/u64.rs
@@ -47,8 +47,6 @@ impl CheckedSub for u64 {
     }
 }
 
-// FIXME: #8449: should not be disabled on 32-bit
-#[cfg(target_word_size = "64")]
 impl CheckedMul for u64 {
     #[inline]
     fn checked_mul(&self, v: &u64) -> Option<u64> {