public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/66849] New: Incorrect multilib chosen with -mthumb -mfloat-abi=hard
@ 2015-07-12 16:18 simon at pushface dot org
  2015-07-13  8:25 ` [Bug driver/66849] " simon at pushface dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: simon at pushface dot org @ 2015-07-12 16:18 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-04 15:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-12 16:18 [Bug driver/66849] New: Incorrect multilib chosen with -mthumb -mfloat-abi=hard simon at pushface dot org
2015-07-13  8:25 ` [Bug driver/66849] " simon at pushface dot org
2015-07-29 13:21 ` ramana at gcc dot gnu.org
2015-07-30 17:28 ` simon at pushface dot org
2015-08-03 20:34 ` wilson at gcc dot gnu.org
2015-08-04 13:40 ` simon at pushface dot org
2015-08-04 15:01 ` jim.wilson at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).