This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/64812] [4.9 regression] x86 LibreOffice Build failure: undefined reference to acquire
- From: "mstahl at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Feb 2015 14:10:48 +0000
- Subject: [Bug regression/64812] [4.9 regression] x86 LibreOffice Build failure: undefined reference to acquire
- Auto-submitted: auto-generated
- References: <bug-64812-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64812
Michael Stahl <mstahl at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |caolanm at redhat dot com,
| |mstahl at redhat dot com,
| |sbergman at redhat dot com
--- Comment #5 from Michael Stahl <mstahl at redhat dot com> ---
the problem is that with -Os, the inline method
WindowListenerMultiplexer::acquire()
results in an undefined symbol, whereas with -O2
weak symbols are emitted into the object.
can reproduce this with:
gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
the command line parameters for compilation in the build system were:
g++ -m32 -fvisibility=hidden -fmessage-length=0 -fno-common
-fvisibility-inlines-hidden -fstack-protector-strong -fPIC -std=gnu++11 -ggdb2
-fexceptions -fno-enforce-eh-specs -Os -c /tmp/fmgridif.ii -o /tmp/fmgridif.o
the minimal command line parameters to trigger the bug:
> g++ -m32 -std=gnu++11 -Os -c /tmp/fmgridif.ii -o /tmp/fmgridif.o
> nm --demangle /tmp/fmgridif.o | grep WindowListenerMultiplexer
U non-virtual thunk to WindowListenerMultiplexer::acquire()
the minimal command line parameters to avoid the bug:
> g++ -m32 -std=gnu++11 -O2 -c /tmp/fmgridif.ii -o /tmp/fmgridif.o
> nm --demangle /tmp/fmgridif.o | grep WindowListenerMultiplexer
00000000 W WindowListenerMultiplexer::acquire()
00000020 W non-virtual thunk to WindowListenerMultiplexer::acquire()