intermezzOS / kernel

A hobby operating system, in Rust
http://intermezzos.github.io/
Apache License 2.0
1.39k stars 90 forks source link

Provide cross-compile tools through Homebrew #53

Closed steveklabnik closed 6 years ago

steveklabnik commented 8 years ago

https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Custom-GCC-and-cross-compilers.md

It would be super rad if we could provide a formula rather than just the install script.

corincerami commented 8 years ago

Considering how painful it is trying to get an environment set up for this, I agree entirely. I've struggled for hours on each machine I've tried to set up trying to get everything installed and configured.

steveklabnik commented 8 years ago

@chrisccerami I don't have an OSX machine, so I can't do this. Have you ever done it? I wonder how hard it is.

corincerami commented 8 years ago

I haven't, but I do have an OSX machine. I can look into it at some point if no one else takes care of it first.

WilsonGiese commented 8 years ago

I've installed on both OS X and Linux and didn't find it too troublesome. The instructions in the book worked well for me, only needing minor modification to the makefile when on OS X for ld. Is there anything in particular you have had issues with @chrisccerami?

I might look into setting up a formula; I've never created one before but might be a fun experience.

steveklabnik commented 7 years ago

Possibly relevant: https://www.reddit.com/r/rust/comments/5741ue/crosscompilation_on_macos_for_linux/d8pakjd?context=3&st=iu7eo0tc&sh=ac5fad35

hawkw commented 7 years ago

I've written brew formulae for installing the x86_64-pc-elf toolchains in hawkw/homebrew-x86_64-pc-elf – you may find them useful.

Do note that I've only just finished putting these together, so there may be some bugs that I've yet to work out.

EDIT: Should also mention that I'm working on formulae for objconv and grub as well, but haven't finished them yet.

hawkw commented 7 years ago

Okay, I've tested my formulae on my machine, and everything seems to work correctly.

I've also opened a PR https://github.com/Homebrew/homebrew-core/pull/6804 to add a formula for objconv to homebrew/core. Hopefully it'll be approved soon.

hawkw commented 7 years ago

My PR for objconv was rejected from homebrew/core because the author of objconv doesn't provide versioned links for the source code; which is completely reasonable. I'm going to see about setting up a versioned mirror for objconv, but for now, I have a tap https://github.com/hawkw/homebrew-objconv/ that should work fine.

@steveklabnik, since you don't use Homebrew, would you like me to submit a PR for this issue?

steveklabnik commented 7 years ago

Yes please!

hawkw commented 7 years ago

Felt like I ought to mention as a brief update that I'm still working on this; I've hit some problems getting Homebrew to build grub but it should hopefully be done soon.