From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28653 invoked by alias); 12 Jan 2010 16:30:09 -0000 Received: (qmail 28414 invoked by uid 48); 12 Jan 2010 16:29:56 -0000 Date: Tue, 12 Jan 2010 16:30:00 -0000 Message-ID: <20100112162956.28413.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug lto/42690] Undefined reference errors with -flto -fuse-linker-plugin In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "espindola at gcc dot gnu dot org" 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: 2010-01/txt/msg01387.txt.bz2 ------- Comment #2 from espindola at gcc dot gnu dot org 2010-01-12 16:29 ------- Is the undefined reference to libgcc? Is it being linked statically? When linking libgcc statically the driver has to pass -plugin-opt=-pass-through=/foo/bar/libgcc.a to ld. This is done in gcc.c: %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \ %{static:-plugin-opt=-pass-through=-lc} \ So, is there a better way to detect that we are linking libgcc statically? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690