This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Implement Ada support for DragonFly, improve it for FreeBSD
- From: John Marino <gnugcc at marino dot st>
- To: Thomas Quinot <quinot at adacore dot com>, Eric Botcazou <ebotcazou at adacore dot com>, Arnaud Charlet <charlet at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 03 Jun 2015 12:05:25 +0200
- Subject: Re: [patch] Implement Ada support for DragonFly, improve it for FreeBSD
- Authentication-results: sourceware.org; auth=none
- References: <20150603093924 dot GC47219 at melamine dot cuivre dot fr dot eu dot org>
On 6/3/2015 11:39, Thomas Quinot wrote:
> Patch looks good to me. The story with floats is that on FreeBSD, the
> i386 FPU is set to 53-bit floats, but the GNAT runtime library always
> issues a "finit" instruction to reset it to full precision, so we need
> to reset TARGET_96_ROUND_53_LONG_DOUBLE to 0.
I have this fixed in an interesting way on gnat-aux. I found that
setting TARGET_96_ROUND_53_LONG_DOUBLE affects other front ends, so you
have to choose which one you want to be correct, GNAT or the C (or
whatever, can't remember which ones were affected now)
My solution was to create two common backends, one for gnat and one for
the others. An example of the main patch is here:
https://raw.githubusercontent.com/jrmarino/draco/master/misc/flux5/patch-gcc_Makefile.in
(note the new s-modes-ada target)
and then this patch is needed:
https://raw.githubusercontent.com/jrmarino/draco/master/misc/flux5/patch-gcc_ada_gcc-interface_Make-lang.in
With those modifications, all the ACATS tests pass on i386 and the other
front ends work as expected.
I don't know if such a modification would ever be considered for GCC but
I've been running it for a couple of years with no reported problems.
John