Skip to content
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

Fix build of compiler-rt on FreeBSD #35004

Merged
merged 2 commits into from
Jul 31, 2016
Merged

Fix build of compiler-rt on FreeBSD #35004

merged 2 commits into from
Jul 31, 2016

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Jul 24, 2016

Broken since ee6011f removed cmake from the
process. There are likely other platforms still broken, but I didn't test on them.

Broken since ee6011f removed cmake from the
process.  There are likely other platforms still broken, but I didn't test on
them.
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

asomers referenced this pull request Jul 24, 2016
The compiler-rt build system has been a never ending cause of pain for Rust
unfortunately:

* The build system is very difficult to invoke and configure to only build
  compiler-rt, especially across platforms.
* The standard build system doesn't actually do what we want, not working for
  some of our platforms and requiring a significant number of patches on our end
  which are difficult to apply when updating compiler-rt.
* Compiling compiler-rt requires LLVM to be compiled, which... is a big
  dependency! This also means that over time compiler-rt is not guaranteed to
  build against older versions of LLVM (or newer versions), and we often want to
  work with multiple versions of LLVM simultaneously.

The makefiles and rustbuild already know how to compile C code, the code here is
far from the *only* C code we're compiling. This patch jettisons all logic to
work with compiler-rt's build system and just goes straight to the source. We
just list all files manually (copied from compiler-rt's
lib/builtins/CMakeLists.txt) and compile them into an archive.

It's likely that this means we'll fail to pick up new files when we upgrade
compiler-rt, but that seems like a much less significant cost to pay than what
we're currently paying.

cc #34400, first steps towards that
@TimNN
Copy link
Contributor

TimNN commented Jul 24, 2016

This fix should probably be applied to rustbuild as well, the relevant function is this one as far as I can tell.

@@ -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".

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.
@alexcrichton
Copy link
Member

@bors: r+ 8604c54

Thanks @asomers!

@bors
Copy link
Contributor

bors commented Jul 26, 2016

⌛ Testing commit 8604c54 with merge 45047fa...

@bors
Copy link
Contributor

bors commented Jul 26, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Jul 26, 2016 at 3:44 AM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/5077


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#35004 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95CX41Hnmk4Pn-h-G-pk76IIPHrNtks5qZeT_gaJpZM4JTgP_
.

@Manishearth
Copy link
Member

Travis fails

@TimNN
Copy link
Contributor

TimNN commented Jul 28, 2016

@Manishearth that failure is unrelated to this pr and has recently been fixed (#35014).

@Manishearth
Copy link
Member

Yeah, just noticed 😄

@alexcrichton
Copy link
Member

@bors: retry

@alexcrichton
Copy link
Member

@bors: rollup

@alexcrichton
Copy link
Member

@bors: retry

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 30, 2016
Fix build of compiler-rt on FreeBSD

Broken since ee6011f removed cmake from the
process.  There are likely other platforms still broken, but I didn't test on them.
@bors
Copy link
Contributor

bors commented Jul 31, 2016

⌛ Testing commit 8604c54 with merge c267ab4...

bors added a commit that referenced this pull request Jul 31, 2016
Fix build of compiler-rt on FreeBSD

Broken since ee6011f removed cmake from the
process.  There are likely other platforms still broken, but I didn't test on them.
@bors bors merged commit 8604c54 into rust-lang:master Jul 31, 2016
jakllsch added a commit to jakllsch/rust that referenced this pull request Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants