Opened 9 years ago

Closed 7 years ago

#48543 closed enhancement (fixed)

arm-none-eabi-gcc: Enable multilib support for more processors

Reported by: raimue (Rainer Müller) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: arm-none-eabi-gcc

Description

arm-none-eabi-gcc @5.1.0_1 only targets a few ARM processor profiles:

$ arm-none-eabi-gcc -print-multi-lib
.;
thumb;@mthumb
fpu;@mfloat-abi=hard

This patch enables a longer multilib list, adding support for more ARM processors:

$ arm-none-eabi-gcc -print-multi-lib
.;
thumb;@mthumb
fpu;@mfloat-abi=hard
armv6-m;@mthumb@march=armv6s-m
armv7-m;@mthumb@march=armv7-m
armv7e-m;@mthumb@march=armv7e-m
armv7-ar/thumb;@mthumb@march=armv7
armv7e-m/softfp;@mthumb@march=armv7e-m@mfloat-abi=softfp@mfpu=fpv4-sp-d16
armv7e-m/fpu;@mthumb@march=armv7e-m@mfloat-abi=hard@mfpu=fpv4-sp-d16
armv7-ar/thumb/softfp;@mthumb@march=armv7@mfloat-abi=softfp@mfpu=vfpv3-d16
armv7-ar/thumb/fpu;@mthumb@march=armv7@mfloat-abi=hard@mfpu=vfpv3-d16

This should be closer to what the gcc-arm-embedded upstream provides. The additional patch for multilib list support was taken from ArchLinux.

I also found patches in Debian taken from gcc-arm-embedded containing more improvements. However, these are still targeting the 4.9 branch. I don't know if it would be worth to include these as well.

Attachments (1)

arm-none-eabi-gcc-multilib.diff (9.0 KB) - added by raimue (Rainer Müller) 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by raimue (Rainer Müller)

comment:1 Changed 9 years ago by andrew.rossignol@…

This patch fixes a bug when targeting a Cortex-M4 processor that results in a hard fault.

Without this patch, even with the following flags, ARM code is produced which causes a hard fault on a Cortex-M4 processor.

-mthumb -mno-thumb-interwork

It would be great to get this checked in!

comment:2 Changed 7 years ago by claplace (Cyprien Laplace)

I confirm, this patch adds libgcc for all the specified targets. Without it, another libgcc got linked in, which results in a hard fault when this code got called. Thanks Rainer!

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Owner: stuartwesterman deleted
Status: newassigned
Version: 2.3.3

comment:4 Changed 7 years ago by mf2k (Frank Schima)

Keywords: haspatch added

comment:5 Changed 7 years ago by raimue (Rainer Müller)

Owner: set to raimue
Resolution: fixed
Status: assignedclosed

In ec32f2908ae790f46639c41fe6a8f235b5f47d98/macports-ports:

arm-none-eabi-gcc: patch multilib for more targets

Closes: #48543

Note: See TracTickets for help on using tickets.