diff mbox

[ARM] libgcc: include crtfastmath.o

Message ID CAKdteOaqrpv_C__x6osn5db=uH_u2Ci6NDJV3sH1GxFE0Xpa6Q@mail.gmail.com
State New
Headers show

Commit Message

Christophe Lyon Oct. 29, 2015, 9:25 a.m. UTC
Hi,

On arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems* targets,
crtfastmath.o is not part of $extra_parts, which means that it is not
built, even though the make build rule is present via the inclusion of
t-crtfm.

The impact is that the link fails when using -ffast-math.

The attached patch adds crtfastmath.o to $extra_parts, for
arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems* targets.

I tested on arm-none-eabi, and I am not sure if this is correct for
symbian/rtems.

OK? Or should I restrict the change to arm*-*-eabi* ?

Thanks,

Christophe.
2015-10-29  Christophe Lyon  <christophe.lyon@linaro.org>

	* config.host (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*):
	Include crtfastmath.o.

Comments

Ramana Radhakrishnan Oct. 29, 2015, 10:07 a.m. UTC | #1
On Thu, Oct 29, 2015 at 9:25 AM, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
> Hi,
>
> On arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems* targets,
> crtfastmath.o is not part of $extra_parts, which means that it is not
> built, even though the make build rule is present via the inclusion of
> t-crtfm.
>
> The impact is that the link fails when using -ffast-math.
>
> The attached patch adds crtfastmath.o to $extra_parts, for
> arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems* targets.
>
> I tested on arm-none-eabi, and I am not sure if this is correct for
> symbian/rtems.
>
> OK? Or should I restrict the change to arm*-*-eabi* ?


I don't see how they are inappropriate on those targets as
crtfastmath.c only set flush to zero in with -ffast-math when the
target architecture has floating point hardware and are only brought
in if the link spec asks for it (which it does only with -ffast-math)

Ok if no regressions.

regards
Ramana

>
> Thanks,
>
> Christophe.
Christophe Lyon Oct. 29, 2015, 2:24 p.m. UTC | #2
On 29 October 2015 at 11:07, Ramana Radhakrishnan
<ramana.gcc@googlemail.com> wrote:
> On Thu, Oct 29, 2015 at 9:25 AM, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
>> Hi,
>>
>> On arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems* targets,
>> crtfastmath.o is not part of $extra_parts, which means that it is not
>> built, even though the make build rule is present via the inclusion of
>> t-crtfm.
>>
>> The impact is that the link fails when using -ffast-math.
>>
>> The attached patch adds crtfastmath.o to $extra_parts, for
>> arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems* targets.
>>
>> I tested on arm-none-eabi, and I am not sure if this is correct for
>> symbian/rtems.
>>
>> OK? Or should I restrict the change to arm*-*-eabi* ?
>
>
> I don't see how they are inappropriate on those targets as
> crtfastmath.c only set flush to zero in with -ffast-math when the
> target architecture has floating point hardware and are only brought
> in if the link spec asks for it (which it does only with -ffast-math)
>
> Ok if no regressions.
Now committed.
For the record, I see +2500 PASS on arm-none-eabi.

Christophe.


>
> regards
> Ramana
>
>>
>> Thanks,
>>
>> Christophe.
diff mbox

Patch

diff --git a/libgcc/config.host b/libgcc/config.host
index 2ee92c1..b63cc36 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -414,6 +414,7 @@  arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
 	  ;;
 	esac
 	tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+	extra_parts="$extra_parts crtfastmath.o"
 	unwind_header=config/arm/unwind-arm.h
 	;;
 avr-*-rtems*)