From 1afb17ed5f9206e1e04c5d72ea724c5fadadd46c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 24 Jul 2016 04:48:26 +0000 Subject: [PATCH 1/2] Fix build of compiler-rt on FreeBSD Broken since ee6011fc71e02485f2dffcc25be64631c2008775 removed cmake from the process. There are likely other platforms still broken, but I didn't test on them. --- mk/rt.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mk/rt.mk b/mk/rt.mk index 067721fab4fa8..e86aec60893e9 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -384,7 +384,11 @@ COMPRT_OBJS_$(1) += emutls.o endif ifeq ($$(findstring msvc,$(1)),) + +ifeq ($$(findstring freebsd,$(1)),) COMPRT_OBJS_$(1) += gcc_personality_v0.o +endif + COMPRT_OBJS_$(1) += emutls.o ifeq ($$(findstring x86_64,$(1)),x86_64) From 8604c5494eed8d111757f23a874d9ce8ca673e2c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 24 Jul 2016 18:03:01 +0000 Subject: [PATCH 2/2] Follow-up to 1afb17ed5f9206e1e04c5d72ea724c5fadadd46c Disable gcc_personality_v0.c in rustbuild as well as the normal build. Rustbuild now gets further on FreeBSD, but it still fails due to other problems. --- src/bootstrap/native.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 05ecbc0cadaa9..a78cef4f409b4 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -348,7 +348,9 @@ pub fn compiler_rt(build: &Build, target: &str) { ]); } } else { - sources.push("gcc_personality_v0.c"); + if !target.contains("freebsd") { + sources.push("gcc_personality_v0.c"); + } if target.contains("x86_64") { sources.extend(vec![