-
Notifications
You must be signed in to change notification settings - Fork 118
[powerpc64le] rustc 1.74.0 built by mrustc thinks u128::BITS
is 64
#363
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
Comments
Isn't this u64::MAX as hex number? |
@bjorn3 I thought that too until I looked at the other values which look big-endian, here's a longer snippet:
I believe that comes from here: mrustc/src/hir_conv/constant_evaluation.cpp Lines 234 to 242 in 06b87d1
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
First of all, thank you for your work on this monumental project!
I've been attempting to bootstrap rustc 1.74.0 on powerpc64le. I ran into a couple of small issues, will open a separate issue for the other one, which was easy to work around, but this latter one seems fairly mysterious to me.
The first sign is that the mrustc-built rustc fails to build the stdlib:
The related code comes from here, where
EncodedConfig
is an alias foru128
:https://github.com/time-rs/time/blob/v0.3.22/time/src/format_description/well_known/iso8601/adt_hack.rs#L58
I then wrote this test case, which succeeds with mrustc, but fails with the mrustc-built rustc:
u128::BITS
comes from here:https://github.com/rust-lang/rust/blob/1.74.0/library/core/src/num/uint_macros.rs#L59
For the record, swapping out
u128::BITS
withu128::MAX.count_ones()
results in the correct value.To my novice eyes this seems like some kind of problem with const evaluation, so I enabled
MRUSTC_DEBUG='Constant Evaluate'
, but this output looks alright, assuming80000000
is big-endian 0x80 = 128:I'll keep updating this issue once I look into this more.
Build info
I'm building this on GNU Guix with this environment:
Lightly edited
build-1.74.0.sh
:Whatever other diagnostic info I could think of:
The text was updated successfully, but these errors were encountered: