From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83505 invoked by alias); 12 Jul 2015 16:18:01 -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 83474 invoked by uid 48); 12 Jul 2015 16:17:57 -0000 From: "simon at pushface dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/66849] New: Incorrect multilib chosen with -mthumb -mfloat-abi=hard Date: Sun, 12 Jul 2015 16:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon at pushface dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget Message-ID: 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-07/txt/msg00980.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66849 Bug ID: 66849 Summary: Incorrect multilib chosen with -mthumb -mfloat-abi=hard Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: simon at pushface dot org Target Milestone: --- Host: x86_64-apple-darwin13 Target: arm-eabi Having configured with --target=arm-eabi --with-arch=armv7 --with-mode=thumb (I added --with-mode=thumb after failures building newlib) arm-eabi-gcc -dumpspecs says *multilib: . !marm !mthumb !mfloat-abi=hard;arm marm !mthumb !mfloat-abi=hard;thumb !marm mthumb !mfloat-abi=hard;fpu !marm !mthumb mfloat-abi=hard;arm/fpu marm !mthumb mfloat-abi=hard; or *multilib: . !marm !mthumb !mfloat-abi=hard; arm marm !mthumb !mfloat-abi=hard; thumb !marm mthumb !mfloat-abi=hard; fpu !marm !mthumb mfloat-abi=hard; arm/fpu marm !mthumb mfloat-abi=hard; which says to use the fpu subdirectory only if the link is done with neither -marm nor -mthumb; but the case of -mthumb -mfloat-abi=hard isn't covered, so that the main directory is searched instead of the fpu subdirectory; and for this set of options libgcc.a was built for softfp, File: /opt/gcc-5.1.0/lib/gcc/arm-eabi/5.1.0/libgcc.a(emutls.o) Attribute Section: aeabi File Attributes Tag_CPU_name: "7" Tag_CPU_arch: v7 Tag_THUMB_ISA_use: Thumb-2 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_align_preserved: 8-byte, except leaf SP Tag_ABI_enum_size: small Tag_ABI_optimization_goals: Aggressive Speed Tag_CPU_unaligned_access: v6 as against the fpu version, File: /opt/gcc-5.1.0/lib/gcc/arm-eabi/5.1.0/fpu/libgcc.a(emutls.o) Attribute Section: aeabi File Attributes Tag_CPU_name: "7" Tag_CPU_arch: v7 Tag_THUMB_ISA_use: Thumb-2 Tag_FP_arch: VFPv2 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_align_preserved: 8-byte, except leaf SP Tag_ABI_enum_size: small Tag_ABI_VFP_args: VFP registers <<<<<<<<<<< Tag_ABI_optimization_goals: Aggressive Speed Tag_CPU_unaligned_access: v6 I made an overriding specs file, *multilib: . !marm !mthumb !mfloat-abi=hard; arm marm !mthumb !mfloat-abi=hard; thumb !marm mthumb !mfloat-abi=hard; fpu !marm mthumb mfloat-abi=hard; fpu !marm !mthumb mfloat-abi=hard; arm/fpu marm !mthumb mfloat-abi=hard; which appears to have done the trick.