From b9149051f7056b41389e8a398b458a759d01df8c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 6 Feb 2017 15:10:02 -0500 Subject: [PATCH 1/6] Don't build gcc_personality_v0.c on NetBSD either rust-lang/rust#39425 --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index ca58b67..16c721c 100644 --- a/build.rs +++ b/build.rs @@ -226,7 +226,7 @@ fn main() { sources.extend(&["x86_64/floatdidf.c", "x86_64/floatdisf.c", "x86_64/floatdixf.c"]); } } else { - if target_os != "freebsd" { + if target_os != "freebsd" && !target.contains("netbsd") { sources.extend(&["gcc_personality_v0.c"]); } From c30dcb0d302780f8b0bb01b71153f8c670ae1a67 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 6 Feb 2017 15:11:09 -0500 Subject: [PATCH 2/6] Don't build any native compiler-builtin components for emscripten rust-lang/rust#36339 --- build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.rs b/build.rs index 16c721c..6d98013 100644 --- a/build.rs +++ b/build.rs @@ -50,6 +50,12 @@ fn main() { println!("cargo:rerun-if-changed=build.rs"); let target = env::var("TARGET").unwrap(); + + // Emscripten's runtime includes all the builtins + if target.contains("emscripten") { + return; + } + let Cfg { ref target_arch, ref target_os, ref target_env, ref target_vendor, .. } = Cfg::new(&target).unwrap_or_else(|e| { writeln!(io::stderr(), "{}", e).ok(); From 6d3cab2ba00cc2987367ddcbbd0360e00d8d849a Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 6 Feb 2017 15:11:51 -0500 Subject: [PATCH 3/6] libcompiler_builtins: Don't build emutls.c Rather than improving the check, let's ditch emutls.c entirely. rust-lang/rust#38877 --- build.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.rs b/build.rs index 6d98013..a0e986d 100644 --- a/build.rs +++ b/build.rs @@ -223,10 +223,6 @@ fn main() { "atomic_thread_fence.c"]); } - if target_os != "windows" && target_os != "none" { - sources.extend(&["emutls.c"]); - } - if target_env == "msvc" { if target_arch == "x86_64" { sources.extend(&["x86_64/floatdidf.c", "x86_64/floatdisf.c", "x86_64/floatdixf.c"]); From 03aa2ef390f49736288c6fa6d52b323ea762ebf8 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 6 Feb 2017 15:12:34 -0500 Subject: [PATCH 4/6] travis: Expand the `cross` linux image rust-lang/rust#39111 --- build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/build.rs b/build.rs index a0e986d..f29a483 100644 --- a/build.rs +++ b/build.rs @@ -116,7 +116,6 @@ fn main() { "addvdi3.c", "addvsi3.c", "apple_versioning.c", - "clear_cache.c", "clzdi2.c", "clzsi2.c", "cmpdi2.c", From 7cac9625b54d162198dabaebd660239dbd38fde6 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 6 Feb 2017 15:13:40 -0500 Subject: [PATCH 5/6] std: Remove unused objects from compiler-builtins rust-lang/rust#38623 --- build.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build.rs b/build.rs index f29a483..125813e 100644 --- a/build.rs +++ b/build.rs @@ -181,12 +181,10 @@ fn main() { if target_os != "ios" { sources.extend(&["absvti2.c", - "addtf3.c", "addvti3.c", "clzti2.c", "cmpti2.c", "ctzti2.c", - "divtf3.c", "ffsti2.c", "fixdfti.c", "fixsfti.c", @@ -200,16 +198,12 @@ fn main() { "floatuntidf.c", "floatuntisf.c", "floatuntixf.c", - "multf3.c", "mulvti3.c", "negti2.c", "negvti2.c", "parityti2.c", "popcountti2.c", - "powitf2.c", - "subtf3.c", "subvti3.c", - "trampoline_setup.c", "ucmpti2.c"]); } From f7bd48ee94d5dd2ed6bb4b5a42c4ee42ce407ea7 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 6 Feb 2017 15:16:16 -0500 Subject: [PATCH 6/6] target.contains -> target_os == --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 125813e..79fbcf3 100644 --- a/build.rs +++ b/build.rs @@ -221,7 +221,7 @@ fn main() { sources.extend(&["x86_64/floatdidf.c", "x86_64/floatdisf.c", "x86_64/floatdixf.c"]); } } else { - if target_os != "freebsd" && !target.contains("netbsd") { + if target_os != "freebsd" && target_os != "netbsd" { sources.extend(&["gcc_personality_v0.c"]); }