why does mingw64 links in libgcc*.dll by default, not the static libgcc*.a ?
This is reasoned by the new behaviour introduced on gcc 4.4 version.
Yeah, but what is the reason ?
I'm using -static-libgcc and it works for me, am I missing something ?
BTW gcc4-based Fedora's mingw-w32 cross compiler links in *static* libgcc by default...
The reason is that the mingw.org team wanted shared by default. The only reason they didn't do it earlier is that shared libgcc didn't work at all. Aaron fixed that, and now they want that to be the default. As to why they want... I have no idea.
I believe your question is related to your posts on the fedora-mingw mailing list earlier today. Basically, as I understand it, you feel that the rationale for trying to make everything use shared libs instead of static libs on linux doesn't apply to Windows.
I tend to agree.
The option to dynamically link should of course always be there, but static linking I agree should be the default.
I don't know how complicated this is to change, or where to even start. Ideally, it's handled via configure options to gcc when you build it.
With libgcc, switching to a static version is as simple as adding -static-libgcc switch.
And this is what I'm actually doing and it works for me.
However I never understood what the consequences are.
Am I missing something about multithreading ?
I meant changing the default for a toolchain. By default, -shared-libgcc is implied. That is new for 4.4. It'd be nice to build a toolchain with a configure switch that changes the default to -static-libgcc. I don't know if that's possible.
You really won't notice a difference between shared/static unless the app you are developing has multiple executables.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.