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) 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![