Duplicating libgcc.a as libgcc_eh.a for both mingw64/mingw32 to solve -lgcc_eh linking problem#186
Conversation
|
(Just for information,) AppVeyor's error seems a timeout, not a test failure. |
|
I'm not opposed to merging this, but because gcc is part of the base rtools installation, we can't easily deploy this. I need to do a lot of testing before I can release a new rtools installer, this won't happen soon. Also, just for be clear: there is nothing special about |
|
@jeroen, So, even if it takes a lot of time to actually test and distribute to end-users, we are OK with that. We will use a temporary solution and later ask users to update rtools in our documentation. |
So, are you suggesting we should fix rustc, instead of rtoools? |
Well it would be much better to fix this in rustc, instead of relying on a hack that may not exist in past or future versions of rtools, and in other static mingw-w64 toolchains. My hack was really intended as a temporary fix, hoping that it would be fixed in rust. But I don't have the expertise myself to suggest a patch to rustc, which would omit the I am going to look for some advice to understand the problem better, what libgcc_eh provides and if we should include it in rtools. |
|
Thanks, sounds reasonable to me. Looking at rust's repo quickly, it seems And, IIUC, this was added only less than a year ago, so the reason you needed that hack might not be the same one as this time. rust-lang/rust@8e3467c#diff-1fb7094471bf1351ba3fabc9b5427e231582c58f302d0afe3b2fedbd7d51cb55R61 The discussion on the pull request is a bit lengthy so I couldn't follow all of them, but probably there should be some reason. |
Fixes #185.
The "hack" that was introduced for mingw32 is expanded to work for any architecture.
gccis build with --disable-shared, with which it does not produce a separatelibgcc_eh.a, but rather puts everything intolibgcc.a.In some edge cases (like with Rust
rustccompiler), a hard-coded-lgcc_ehresults into linking error when rtools' mingw toolchain is used.The duplication of
libgcc.aaslibgcc_eh.asolves this problem.