Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustbuild: Fix cross compiling to FreeBSD #32239
Conversation
rust-highfive
assigned
brson
Mar 14, 2016
This comment has been minimized.
This comment has been minimized.
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
alexcrichton
force-pushed the
alexcrichton:fix-cross-to-freebsd
branch
from
1bb076e
to
155735a
Mar 14, 2016
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Mar 15, 2016
This comment has been minimized.
This comment has been minimized.
bors
merged commit 155735a
into
rust-lang:master
Mar 15, 2016
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Mar 15, 2016
alexcrichton
referenced this pull request
Mar 15, 2016
Merged
rustbuild: Fix LLVM compile on MinGW #32266
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Mar 15, 2016
bors
added a commit
that referenced
this pull request
Mar 16, 2016
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Mar 21, 2016
|
@alexcrichton this is great! will this allow me to take the FreeBSD buildbot down once it is in place and working? |
alexcrichton
deleted the
alexcrichton:fix-cross-to-freebsd
branch
Mar 21, 2016
This comment has been minimized.
This comment has been minimized.
|
@dhuseby it's up to you I think. We're not producing FreeBSD nightlies and standard libraries (as of yesterday), but we're unfortunately not running any tests just yet. If you want to keep the bots online to run tests we can do that, but for nightlies we'll at least have that taken care of |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Apr 2, 2016
|
@alexcrichton so this is building nightlies and snapshots? what about cargo nightlies and snapshots? |
This comment has been minimized.
This comment has been minimized.
|
Yeah we've got FreeBSD nightlies (not snapshots) for both rustc and Cargo now |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Apr 5, 2016
|
@alexcrichton so do these show up in the buildbot builders lists? if we have these for linux/windows/mac, why do we still have buildbots for those platforms? |
This comment has been minimized.
This comment has been minimized.
|
Yeah the auto-linux-64-x-freebsd and auto-linux-64-x-netbsd builders are the auto builders, and the nightly-dist-rustc-cross-linux is just one massive builder creating a mess of compilers. I left the other FreeBSD bots for now because the cross-compiled ones aren't running tests (whereas the current ones are), but if you'd like I can turn those off. |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Apr 11, 2016
|
@alexcrichton so what is it going to take to get them to start running tests? |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Apr 11, 2016
|
@alexcrichton I suppose that's not possible unless we have a machine running freebsd right? |
This comment has been minimized.
This comment has been minimized.
|
Yeah we don't have any time frame for getting a FreeBSD bot, but we could in theory also run them under qemu somehow (or some subset). Either way that's pretty far out and not currently planned. |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Apr 14, 2016
|
@alexcrichton i've been interested in figuring out how to make gitian work with the bsd OS's just like it does with Linux now. Currently, it relies on qemu to boot a linux image, install dependencies, clone the code, run a build, and extract the build outputs. If we could make it also drive qemu to boot a bsd image, install dependencies, clone the code, run a build, and extract the build outputs, we could get away from cross-compiling from Linux. What do you think? |
This comment has been minimized.
This comment has been minimized.
|
Hey so long as it works and id easy to manage I'm game :). I've had bad luck with performance in the past running code in qemu (took forever to finish), but maybe I was passing the wrong options or there's some optimizations along the way? |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Apr 20, 2016
|
@alexcrichton All of my buildbot slaves are run as qemu vm's (with kvm acceleration) on my server. It seems to run fine. |
This comment has been minimized.
This comment has been minimized.
|
Interesting! Seems like we should definitely at least try to get these running! |
alexcrichton commentedMar 14, 2016
This commit fixes our support for cross compiling a compiler to run on FreeBSD.
Over the weekend I managed to get a cross compiler from Linux to FreeBSD 1
which I hope to soon use to start producing FreeBSD nightly compilers. With the
make distsupport added in #32237 we should be able to produce standardrustc/rust-std packages for FreeBSD through a new slave with this cross compiler.
Currently, however, we don't "Just Work" when cross compiling FreeBSD and a
number of changes were required (part of this PR). They include:
actual 3.8 release and I applied one extra commit 2 which contains two fixes:
-Wl,-z,defsflag on manyplatforms, but not when
CMAKE_SYSTEM_NAMEis "FreeBSD". Unfortunatelythis doesn't take into account when we're cross compiling, and as predicted
the build will fail if
-Wl,-z,defsis passed (see 3 for more info). Tofix this we test
TARGET_TRIPLEinstead of theCMAKE_SYSTEM_NAMEwhichis what we're compiling for which fixes the problem.
PATH_MAXconstant is apparently defined in a different location thanmany other Unix systems, so a file which required this just needed some
help to keep compiling.
looks like it just emulates Linux in what it compiles as it didn't seem to
naturally produce anything else... At least the architecture is right, so
seems good for now at least!