From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25792 invoked by alias); 8 Feb 2011 14:36:48 -0000 Received: (qmail 25619 invoked by uid 22791); 8 Feb 2011 14:36:46 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Feb 2011 14:36:40 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/47390] [4.6 Regression] Linking with -export-dynamic broken X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 08 Feb 2011 14:37:00 -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 X-SW-Source: 2011-02/txt/msg01019.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47390 --- Comment #6 from Richard Guenther 2011-02-08 14:36:34 UTC --- (In reply to comment #2) > On Fri, 21 Jan 2011, rguenth at gcc dot gnu.org wrote: > > > Joseph - 4.5 handled -export-dynamic by passing it through to the linker > > (not exactly sure why). Can we restore this behavior to avoid regressions? > > If not, can we diagnose this invalid option then? It seems to be passed > > as -e xport-dynamic to the linker now, resulting in an undefined symbol > > for me with a trivial hello-world. > > -export-dynamic was passed down by an accident of %{e*} in > LINK_COMMAND_SPEC. If you want this to continue to work then add > > export-dynamic > Driver > > to common.opt, and probably put a comment on LINK_COMMAND_SPEC saying that > %{e*} deliberately covers -export-dynamic. (Alternatively, I think using > %{export-dynamic} %{e}, together with the common.opt change, will make the > passed options explicit, and successfully pass to the linker (in separate > argument form) -e options passed to the driver in either joined or > separate form - but verify this before making that change.) Hm, I see. The -e LINK_COMMAND_SPEC isn't documented in invoke.texi "Link Options", do we generally not do this? It seems to be a spec that is always enabled. We document -rdynamic as the way to pass down -export-dynamic, so if the -e handling is on-purpose ... Can we force -e options to be passed down in their original joined/non-joined form? At least for GNU ld -e xport-dynamic is not equal to -export-dynamic, that a %{e*} spec exchanges a working pass-down variant for an unworking is unfortunate(?) We can't seem to easily exclude export-dynamic from e* as to reject it either. The situation seems to be a bit weird. Probably a note in the changes.html Caveats section regarding the stricter option handling is due.