Closed Bug 1116777 Opened 9 years ago Closed 9 years ago

RFE: wine-gecko needs an option to statically link with winpthreads

Categories

(Firefox Build System :: General, enhancement)

All
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla37

People

(Reporter: mike, Assigned: jacek)

Details

Attachments

(1 file)

Beginning with Fedora 21 the MinGW build tools use winpthreads by default. Wine-gecko binaries depend on winpthreads-1.dll at runtime and wine cannot find it. The wine-gecko binaries should link against the static winpthreads library.
The way mingw-w64 handles winpthreads is seriously stupid. We need a way to force GCC to use its static version, but unlike libgcc and stdc++, there is no clean way to do that. The cleanest way is to use -static. This, in theory, may have an effect on other libraries that are not meant to use static version. I didn't find any place in m-c where that would matter, so maybe that's fine...
Assignee: nobody → jacek
Attachment #8544564 - Flags: review?(mh+mozilla)
Thanks for the patch and perfect timing as I just had time to work on this. I applied the patch and it compiles and runs in Wine. I am going to go ahead and use this patch in Fedora.
Attachment #8544564 - Flags: review?(mh+mozilla)
I want to look at what difference this actually makes in practice. Can you upload a mingw build with and without this patch?
Flags: needinfo?(jacek)
Sure, here they are:

https://drive.google.com/file/d/0B_y8ZxBTaQYLTWQweVZJb1R3UkE/view?usp=sharing
https://drive.google.com/file/d/0B_y8ZxBTaQYLMU8tSWhFWkIzVjA/view?usp=sharing

I compared DLL imports and they seem identical.
Flags: needinfo?(jacek)
BTW, those builds are with mingw GCC with win32 threading model, so even unpatched build doesn't depend on winpthreads-1.dll. I may upload another build if needed, but the thing that matters is that dependency between Gecko DLLs, which are the same in both configs.
Comment on attachment 8544564 [details] [diff] [review]
Default to static linking on mingw.

Review of attachment 8544564 [details] [diff] [review]:
-----------------------------------------------------------------

I'll look at this tomorrow. Flagging me not to forget.
Attachment #8544564 - Flags: review?(mh+mozilla)
Attachment #8544564 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/2675cfbcb591
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: