Status on porting Rust to OpenBSD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi everybody, In my free time over the last few weeks I have been attempting to cross-compile the rust compiler using the same method that was used to add support for Dragonfly BSD. I started with the scripts from the Dragonfly effort and fixed them up to work with OpenBSD and Linux. All of my code and documentation is here: https://github.com/dhuseby/rust-cross-openbsd Currently, I'm stuck on stage 3. The part where all of the object files from both OpenBSD and Linux need to be linked together into an OpenBSD executable. I'm pretty certain the reason stage 3 doesn't complete is because of the old linker on OpenBSD. At the bottom of the README.md file I discuss some options on what to try next. I have also included build logs of all stages so that other people can see the output without jumping through all of the hoops I did. My options at this point are this: 1. Use the same version compiler/assembler/linker on Linux and OpenBSD so that the object files will be more compatible. Hopefully this will allow stage 3 to finish linking. 2. Apply my OpenBSD target patches to Rust and build a Linux rust compiler that knows how to target OpenBSD. Then I use Linux emulation on OpenBSD to run it to compile itself from scratch. 3. Figure out a way to get a newer linker working on OpenBSD. Thoughts? I'm looking for feedback. Are my assumptions and ideas right for why stage 3 doesn't successfully link? Any other ideas on what I can try? - --dave -BEGIN PGP SIGNATURE- iF4EAREIAAYFAlRtZBMACgkQvt/JvmUQuOkWZgD+PWr5ZmE6ypdQQuLgo1eHddGl e0LUUJi8CyvYpyNqUEMA/1EJCC6Z6mCeM11oGKhHxLdChv3qVjKg/6jXAoEIPynh =GD3X -END PGP SIGNATURE- 0x6510B8E9.asc Description: application/pgp-keys 0x6510B8E9.asc.sig Description: PGP signature
Re: Status on porting Rust to OpenBSD
On Wed, Nov 19, 2014 at 19:46, Dave Huseby wrote: 3. Figure out a way to get a newer linker working on OpenBSD. binutils-2.17 is in the src tree at gnu/usr.bin/binutils-2.17. It's not enabled because it doesn't always work right, but at one point there was a plan to switch to it precisely because newer projects need it. You can try using that, but getting it to coexist with the regular binutils may be difficult.
Re: Status on porting Rust to OpenBSD
On Wed, Nov 19, 2014 at 07:46:27PM -0800, Dave Huseby wrote: Hi everybody, In my free time over the last few weeks I have been attempting to cross-compile the rust compiler using the same method that was used to add support for Dragonfly BSD. I started with the scripts from the Dragonfly effort and fixed them up to work with OpenBSD and Linux. All of my code and documentation is here: https://github.com/dhuseby/rust-cross-openbsd Currently, I'm stuck on stage 3. The part where all of the object files from both OpenBSD and Linux need to be linked together into an OpenBSD executable. I'm pretty certain the reason stage 3 doesn't complete is because of the old linker on OpenBSD. At the bottom of the README.md file I discuss some options on what to try next. I have also included build logs of all stages so that other people can see the output without jumping through all of the hoops I did. My options at this point are this: 1. Use the same version compiler/assembler/linker on Linux and OpenBSD so that the object files will be more compatible. Hopefully this will allow stage 3 to finish linking. 2. Apply my OpenBSD target patches to Rust and build a Linux rust compiler that knows how to target OpenBSD. Then I use Linux emulation on OpenBSD to run it to compile itself from scratch. Linux emul only works on OpenBSD/i386 iirc.. Did you try communicating with the dfly developer to exchange ideas on the issues you encounter, and the upstream developers ? Anyway, your effort is appreciated. I'll port servo on top as soon as rust is working :) Landry pgpj96M1eCILW.pgp Description: PGP signature