This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/66849] New: Incorrect multilib chosen with -mthumb -mfloat-abi=hard


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]