[Bug 41712] New: lto build is broken
https://bugs.winehq.org/show_bug.cgi?id=41712 Bug ID: 41712 Summary: lto build is broken Product: Wine Version: 1.9.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env Assignee: wine-bugs(a)winehq.org Reporter: hi-angel(a)yandex.ru Distribution: --- Compiling WINE with "-flto" in LDFLAGS breaks the build for link-time. The problem boils down to the following minimal example: $ cat main.c void foo(); int main() { foo(); } $ cat foo.c void foo() { } $ winegcc -c -flto foo.c $ winegcc main.c foo.o /usr/lib/wine/libwinecrt0.a(exe_entry.o): In function `__wine_spec_exe_entry': (.text+0x8d): undefined reference to `ExitProcess' /usr/bin/ld: a.out.so: hidden symbol `ExitProcess' isn't defined /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status winegcc: gcc failed Simply removing the "-flto" option from the steps fixes the build. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 John E <john.ettedgui(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john.ettedgui(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 Konstantin <hi-angel(a)yandex.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|lto build is broken |WINE lto build fails with | |undefined references -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 --- Comment #1 from Konstantin <hi-angel(a)yandex.ru> --- upd: changed description to be more clear. While on it: the testcase still reproducible with wine 5.8 and winegcc 10.1.0 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 Artem S. Tashkinov <aros(a)gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aros(a)gmx.com --- Comment #2 from Artem S. Tashkinov <aros(a)gmx.com> --- Loads of other packages don't build with -flto yet: https://github.com/InBetweenNames/gentooLTO/blob/master/sys-config/ltoize/fi... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 --- Comment #3 from Artem S. Tashkinov <aros(a)gmx.com> --- Related bug 51051. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 --- Comment #4 from Artem S. Tashkinov <aros(a)gmx.com> --- (In reply to Artem S. Tashkinov from comment #2)
Loads of other packages don't build with -flto yet:
https://github.com/InBetweenNames/gentooLTO/blob/master/sys-config/ltoize/ files/package.cflags/ltoworkarounds.conf
This has moved to: https://github.com/InBetweenNames/gentooLTO/tree/master/sys-config/ltoize/fi... More specifically: https://github.com/InBetweenNames/gentooLTO/blob/master/sys-config/ltoize/fi... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=41712 --- Comment #5 from Artem S. Tashkinov <aros(a)gmx.com> --- Alexander can make it work at least for non-core libraries. https://stackoverflow.com/questions/46512325/undefined-references-with-link-... gcc-ar must be used instead of ar when creating *.a archives. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla