From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29447 invoked by alias); 16 Feb 2015 14:10:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23876 invoked by uid 48); 16 Feb 2015 14:10:50 -0000 From: "mstahl at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug regression/64812] [4.9 regression] x86 LibreOffice Build failure: undefined reference to acquire Date: Mon, 16 Feb 2015 14:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: regression X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mstahl at redhat dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg01757.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64812 Michael Stahl 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 --- 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()