[Buildroot] "PATCH": hack to be able to build Rust targetting MIPS
alex at corcoles.net
Thu Feb 6 18:00:44 UTC 2020
On Thu, Feb 6, 2020 at 6:50 PM Vincent Fazio <vfazio at xes-inc.com> wrote:
> I'm not familiar with Rust, but there should be a cleaner way to set the
> target cpu than hacking the default. Preferably the target MIPS cpu
> selected within Buildroot would inform the target cpu?
> A quick search seems to suggest this may be possible
> target = "mipsel-unknown-linux-gnu"
> rustflags = [
> "-C", "link-arg=-EL",
> "-C", "target-cpu=mips32",
> "-C", "target-feature=+mips32,-mips32r2,-fpxx,-nooddspreg",
Yeah, probably there are slightly cleaner solutions. I think that Rust
targetting mips32r2 by default sucks a little bit, so I'm not losing hope
completely that the change will be reverted. If they do so, I think it
would be quite easy for buildroot to iron out the few niggles required to
get this to work.
However, I'm not really knowledgeable about buildroot, so all the patches
involved in this are terrible. I saw the solution you quote at:
, but I wasn't sure how to plug that cleanly into buildroot, so I went for
the ugly solution. Perhaps I can plug that into buildroot/package/rust/
rust.mk, though. If I have some time I will try to clean things up
(unfortunately, I was unemployed since mid-November, which gave me tons of
spare time for this silly stuff... but I start a new job on Monday, so I
won't have so much time..,).
If someone wants to spend time on this, I will be happy to test or
( Y )
()~*~() mail: alex at corcoles dot net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the buildroot