]> git.proxmox.com Git - cargo.git/commitdiff
Use more portable flags in tests, fixing FTBFS on mips
authorXimin Luo <infinity0@debian.org>
Fri, 7 Jun 2019 06:10:27 +0000 (23:10 -0700)
committerXimin Luo <infinity0@debian.org>
Fri, 7 Jun 2019 06:10:27 +0000 (23:10 -0700)
debian/changelog
debian/patches/2001_more_portable_rustflags.patch [new file with mode: 0644]
debian/patches/series

index de6158ee8f78c03465cacfba342acc17280b0e73..79c7bec2bf714165df96456691c03570d6a910ef 100644 (file)
@@ -1,3 +1,9 @@
+cargo (0.35.0-2) UNRELEASED; urgency=medium
+
+  * Use more portable flags in tests, fixing FTBFS on mips.
+
+ -- Ximin Luo <infinity0@debian.org>  Thu, 06 Jun 2019 23:09:45 -0700
+
 cargo (0.35.0-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/patches/2001_more_portable_rustflags.patch b/debian/patches/2001_more_portable_rustflags.patch
new file mode 100644 (file)
index 0000000..b88520b
--- /dev/null
@@ -0,0 +1,74 @@
+Bug: https://github.com/rust-lang/rust/issues/61440
+
+--- a/tests/testsuite/freshness.rs
++++ b/tests/testsuite/freshness.rs
+@@ -1152,7 +1152,7 @@
+     p.cargo("build").run();
+     p.cargo("build")
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr(
+             "\
+ [COMPILING] foo v0.0.1 ([..])
+@@ -1164,7 +1164,7 @@
+         .with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
+         .run();
+     p.cargo("build")
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
+         .run();
+ }
+@@ -1216,7 +1216,7 @@
+         .run();
+     p.cargo("build -Z mtime-on-use")
+         .masquerade_as_nightly_cargo()
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr(
+             "\
+ [COMPILING] bar v0.0.1 ([..])
+@@ -1234,14 +1234,14 @@
+     // This does not make new files, but it does update the mtime.
+     p.cargo("build -Z mtime-on-use")
+         .masquerade_as_nightly_cargo()
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
+         .run();
+     simple_deps_cleaner(p.target_debug_dir(), timestamp);
+     // This should not recompile!
+     p.cargo("build -Z mtime-on-use")
+         .masquerade_as_nightly_cargo()
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
+         .run();
+     // But this should be cleaned and so need a rebuild
+@@ -1311,7 +1311,7 @@
+         .run();
+     p.cargo("build -Z mtime-on-use")
+         .masquerade_as_nightly_cargo()
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr(
+             "\
+ [COMPILING] bar v0.0.1 ([..])
+@@ -1329,14 +1329,14 @@
+     // This does not make new files, but it does update the mtime.
+     p.cargo("build -Z mtime-on-use")
+         .masquerade_as_nightly_cargo()
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
+         .run();
+     fingerprint_cleaner(p.target_debug_dir(), timestamp);
+     // This should not recompile!
+     p.cargo("build -Z mtime-on-use")
+         .masquerade_as_nightly_cargo()
+-        .env("RUSTFLAGS", "-C target-cpu=native")
++        .env("RUSTFLAGS", "-C linker=cc")
+         .with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
+         .run();
+     // But this should be cleaned and so need a rebuild
index 665e2dc003ae3455dc163bf23d36c19242f489ae..34dac781a610f74214bc35b32307c617aad22ee7 100644 (file)
@@ -1,2 +1,3 @@
 2002_disable-net-tests.patch
 2005_disable_fetch_cross_tests.patch
+2001_more_portable_rustflags.patch