From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14850 invoked by alias); 2 Sep 2012 19:32:37 -0000 Received: (qmail 14840 invoked by uid 22791); 2 Sep 2012 19:32:36 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_LG 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; Sun, 02 Sep 2012 19:32:22 +0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54461] New: [avr] add configure option for better AVR-Libc integration Date: Sun, 02 Sep 2012 19:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gjl at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-09/txt/msg00112.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461 Bug #: 54461 Summary: [avr] add configure option for better AVR-Libc integration Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: target AssignedTo: gjl@gcc.gnu.org ReportedBy: gjl@gcc.gnu.org Target: avr For historical reasons, AVR-Libc implements functions that GCC expects to live in libgcc, namely float functions like __fixsfsi. Currently, avr-gcc is not configurable to accommodate that situation which leads to performance loss if the float support functions from libgcc are used. This happens at least in the following situations: * The user does not specify -lm. -lm should only be needed if function from math.h are used, not for language core features like int i = (int) float. * The application is LTO compiled, i.e. linked with -flto. The plugin machinery passes lgcc -lc lgcc through to the linker by means of -plugin-opt=-pass-through=-lgcc etc. so that -lgcc is linked prior to -lm. * The user uses fixed <-> float conversion routines from libgcc. These routines refer float functions, and the linker resolves these function in libgcc if they are there. * avr-g++ is used as linker driver. See also PR28718 and http://lists.gnu.org/archive/html/avr-gcc-list/2012-08/msg00070.html