-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect mips CPUs in ./configure #38650
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting this! I forgot to touch configure
in my MIPS host build PR because the MIPS64 platform I was working on is rustbuild-only. Looks good overall!
@@ -388,6 +388,7 @@ msg "inspecting environment" | |||
|
|||
CFG_OSTYPE=$(uname -s) | |||
CFG_CPUTYPE=$(uname -m) | |||
ENDIAN=$(printf '\1' | od -dAn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here od
isn't need_cmd
'd, thus unsafe to rely on. You could refer to the rustup-init.sh
implementation for an alternative that only requires head
and tail
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
od
is part of POSIX (including the -d
and -A n
options), just as head
and tail
are. Is that good enough? If not, I can do your suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, but some exotic environments indeed doesn't have od
; a quick Googling reveals OpenWRT and Maemo and the such. I don't know how many people are compiling Rust on these platforms though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to minimize the possible impact of this change, could this move into just the mips block below?
Welcome! In the meantime I spotted some more things which are missing:
I'll fix these as well and add them to this PR. In the long run, does the rust team have any plans to unify the Makefiles and rustup/rustbuild? Seems like unnecessary work to have to maintain both of these... |
@infinity0 Please refrain from touching the makefiles, they're slated to be deleted pretty soon! |
Ouch, OK. Is there a way to not use Cargo to build rust? That is going to make bootstrapping new architectures much much more difficult. |
@infinity0 No, bootstrapping will be arguably easier, since you no longer have to deal with multiple different build tools with rustbuild. Look at the way |
Er, I am doing bootstrapping literally right now, and I can tell you it will be harder. All of the previous tools like |
👍 to what @infinity0 just said. |
This PR looks good to me, thanks @infinity0! |
This mirrors existing logic already in src/bootstrap/bootstrap.py
OK, I've moved
mention |
@bors: r+ Thanks! It's ok to not update those unless necessary. |
📌 Commit 246e749 has been approved by |
Detect mips CPUs in ./configure This mirrors existing logic already in src/bootstrap/bootstrap.py
☀️ Test successful - status-appveyor, status-travis |
This mirrors existing logic already in src/bootstrap/bootstrap.py