Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Add DragonFly toolchain #105

Merged
merged 2 commits into from
Jun 9, 2016
Merged

Add DragonFly toolchain #105

merged 2 commits into from
Jun 9, 2016

Conversation

mneumann
Copy link
Contributor

This sets up the toolchain (binutils, gcc, libraries) needed for cross-compiling to DragonFly.
Note that bsdtar is required to unpack the DragonFly ISO image, as there are no .tar.gz releases of DragonFly.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

cd gcc-$GCC

patch -p0 <<'EOF'
--- libatomic/configure.tgt.orig 2015-07-09 16:08:55 UTC
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have links for where these patches come from? Just so if we need to update this we know where to look

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they are from DragonFly's dports collection (dports =~ FreeBSD ports): https://github.com/DragonFlyBSD/DeltaPorts/tree/master/ports/lang/gcc5/dragonfly or https://github.com/DragonFlyBSD/DPorts/tree/master/lang/gcc5. DeltaPorts is our layer above FreeBSD's ports collection. DPorts is then created by applying the patches from DeltaPorts against FreeBSD's ports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you only need to update the patches in case you change the gcc version. Newer versions of gcc might already ship with those patches.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the info! Could you add that as a comment here? We may need to update gcc one day and it'd just be good to know where the patches came from so we could perhaps pick up others if they're necessary.

@mneumann
Copy link
Contributor Author

mneumann commented Jun 9, 2016

@alexcrichton Have added a comment.

@alexcrichton alexcrichton merged commit 25e1ae0 into rust-lang-deprecated:master Jun 9, 2016
@alexcrichton
Copy link
Contributor

Thanks!

To confirm as well, have you built a toolchain inside of the container and confirmed that it works locally on DragonFly as well?

@mneumann
Copy link
Contributor Author

@alexcrichton I can confirm that I can cross-compile a DragonFly executable from within the container, which later can be executed on a recent DragonFly system. I only tested a simple hello world application written in C. For this, file returns:

/tmp/t: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /usr/libexec/ld-elf.so.2, for DragonFly 4.0.400, not stripped

What I haven't done yet is to build a rust toolchain from within the container. This sounds a little bit more complicated.

@alexcrichton
Copy link
Contributor

Ok, once that's working just let me know! Then we can work on getting nightlies for DragonFly as well

@mneumann mneumann deleted the dragonfly branch April 5, 2017 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants