https://bugs.winehq.org/show_bug.cgi?id=47090
Bug ID: 47090 Summary: wine fails to build with certain LDFLAGS Product: Wine Version: 4.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env Assignee: wine-bugs@winehq.org Reporter: galtgendo@o2.pl CC: julliard@winehq.org Distribution: ---
I'm not 100% sure it's a proper bug, cause I couldn't get a confirmation from anyone else, yet - going by the sources - there might be something valid here.
Anyway, this is reported against 4.7, but almost certainly the problem comes from the changes made in 4.6 (which I've skipped - my current working wine build is 4.5). During build with LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,relro", of which just about only '-Wl,--as-needed' might matter (unless I've hit a linker bug), build fails as soon as it starts linking to the newly created libwine with "missing symbols" errors for __wine_dbg_output and __wine_dbg_header.
As far as I can tell by the sources, till ntdll gets loaded, those symbols are indeed undefined. I suspect the source of the problem is that a few of the inline functions defined in include/wine/debug.h call those functions.
While you may not consider this a valid problem (that is, if you're able to reproduce it), this has literally been working for years, so I'd still want to know why it stopped now.