Skip to content

Fix build of compiler-rt on FreeBSD #35004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,11 @@ COMPRT_OBJS_$(1) += emutls.o
endif

ifeq ($$(findstring msvc,$(1)),)

ifeq ($$(findstring freebsd,$(1)),)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err, this condition is inside one which checks for msvc. Pretty sure there’s no combination of freebsd and msvc out there.

Copy link
Contributor

@TimNN TimNN Jul 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these conditions are Makefile-speak for "not contains" (findstring returns the found string, which is then compared to the empty string, as far as I know).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, the first condition checks for "not msvc" and the second checks for "not freebsd".

COMPRT_OBJS_$(1) += gcc_personality_v0.o
endif

COMPRT_OBJS_$(1) += emutls.o

ifeq ($$(findstring x86_64,$(1)),x86_64)
Expand Down
4 changes: 3 additions & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![
Expand Down