-
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
mingw: abi change on recent gcc #9205
Comments
…change (rust-lang#9205). These really should have been marked xfail-win32, but that doesn't exist, so xfail-fast it is.
Rename {struct-update,fsu}-moves-and-copies, since win32 failed to run the test since UAC prevents any executable whose name contaning "update". (rust-lang#10452) Some tests related to rust-lang#9205 are expected to fail on gcc 4.8, so they are marked as `xfail-win32` instead of `xfail-fast`. Some tests using `extra::tempfile` fail on win32 due to rust-lang#10462. Mark them as `xfail-win32`.
I tested this with clang and mingw, with bad results. It seems to be broken there too, I submitted bug to llvm. Hopefully anything they are going to do would help us solve our issue too. |
Seems that LLVM fixed it: http://llvm.org/bugs/show_bug.cgi?id=18034 |
We migrated to mingw-w64 with gcc 4.8. needstest! |
@volth I've just downloaded nightly installer and confirmed that it works well on latest mingw (gcc 4.8.1). |
(If you still have the problem, you'd be better to open new issue; I'm going to close this issue soon since the "abi" issue" is fixed.) |
(Also, we recommend to use mingw-w64 instead of mingw: https://github.com/mozilla/rust/wiki/Using-Rust-on-Windows) |
Win32's cdecl callconv is different from linux's cdecl on returning large structs. For example (from test suite),
On linux or mingw (gcc <=4.6), the function ends with:
This means callee cleans stack for extra space. However, msvc (cl.exe) treats it differently:
ret
then caller is expected to clean 4 bytes.
This implies it will hurt stack if mingw caller calls msvc function.
It is a known issue, and is reported at gcc bugzilla and at mingw.
However, mingw's recent gcc follows win32 convention. (mingw-w64's gcc 4.8 also does.)
This is good for msvc compatibility, however it causes
make check-fast
failure on latest mingw:Relevant codes are: extern-pass-TwoU64s-ref.rs, rust_test_helpers.cpp.
(Well, to build rust with latest mingw, you need some hacks: 1, 2.)
I think we should follow msvc's calling convention on Win32. It implies that we (and bors) have to upgrade mingw later.
The text was updated successfully, but these errors were encountered: