From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54341 invoked by alias); 28 Apr 2015 14:14:25 -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 54286 invoked by uid 48); 28 Apr 2015 14:14:22 -0000 From: "prathamesh3492 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65837] [arm-linux-gnueabihf] lto1 target specific builtin not available Date: Tue, 28 Apr 2015 14:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: prathamesh3492 at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: prathamesh3492 at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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-04/txt/msg02405.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65837 --- Comment #15 from prathamesh3492 at gcc dot gnu.org --- Hi, I am not entirely sure, the issue seems to be in lto-wrapper. In lto-wrapper.c:run_gcc(): fdecoded_options, which are compiler options contains "-mfpu=neon" decoded_options, which are linker options contains "-mfpu=vfpv3-d16". decoded_options are populated by lto-wrapper.c:get_options_from_collect_gcc_options() from environment variable COLLECT_GCC_OPTIONS. fdecoded_options are appended after decoded_options in run_gcc(): append_linker_options (&argv_obstack, decoded_options, decoded_options_count); append_compiler_options (&argv_obstack, fdecoded_options, fdecoded_options_count); which is why -mfpu=vfpv3-d16 overrides -mfpu=neon. Reversing the order of above function calls works fine for me for the above test-case. However I am not sure if this is the right approach, It now passes -mfpu=vfpv3-d16 and then it's overriden by -mfpu=neon since we reversed the order. Ideally we don't want -mfpu=vfpv3-d16 to appear ? I am not understanding why vfpv3-d16 appears in collect_gcc_options in run_gcc(). While writing COLLECT_GCC_OPTIONS in lto-opts.c:append_to_collect_gcc_options(), -mfpu=vfpv3-d16 is not present, Only -mfpu=neon is present, which is correct since it was passed as a command line option. I am not sure what modifies COLLECT_GCC_OPTIONS before it is read by run_gcc() in lto-wrapper. Thank you, Prathamesh