From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Corcoles Date: Thu, 6 Feb 2020 19:00:44 +0100 Subject: [Buildroot] "PATCH": hack to be able to build Rust targetting MIPS In-Reply-To: References: <20200119213102.GA2894@ned> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hi Vincent, On Thu, Feb 6, 2020 at 6:50 PM Vincent Fazio 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 > (https://gitissue.com/issues/5a1e9e776805170abd3c8a38): > > [build] > target = "mipsel-unknown-linux-gnu" > > [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: https://github.com/rust-lang/rust/issues/37507#issuecomment-476026815 , 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 whatever, though. Cheers, ?lex -- ___ {~._.~} ( Y ) ()~*~() mail: alex at corcoles dot net (_)-(_) http://alex.corcoles.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: