[PATCH/RFC,libgcc/dfp/bid] Omit exception-related functions from libbid when fenv.h not present [was Re: Broken bootstrap on Cygwin]

H.J. Lu hjl.tools@gmail.com
Wed Feb 9 18:05:00 GMT 2011


On Wed, Feb 9, 2011 at 9:55 AM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 08/02/2011 16:09, Dave Korn wrote:
>> On 08/02/2011 11:07, Richard Guenther wrote:
>>> On Mon, Feb 7, 2011 at 11:27 PM, FX <fxcoudert@gmail.com> wrote:
>>>>> GCC maintainers is this OK for your policy?
>>>> Personally, I don't think it's a good thing to do: a secondary platform
>>>> that only supports the latest released version of said platform does not
>>>> indicate high stability. But it's up to the cygwin maintainers to decide,
>>>> of course.
>>>>
>>>> However, the fact should be documented on the installation notes
>>>> (http://gcc.gnu.org/install/specific.html#x-x-cygwin) and probably on the
>>>> release notes as well, with something like "The GCC 4.6 series requires
>>>> Cygwin x.y.z or later".
>>> Indeed.  Maybe also document a workaround (if possible), like "download
>>> fenv.h from this link and put it there".
>>
>>   It needs the actual support routines from the Cygwin DLL as well as the
>> header file.  But yes, I will write a patch for the requirements page.
>>
>>   Shouldn't libquadmath have an autoconf test for fenv.h?  Or otherwise not be
>> unconditionally enabled by default?
>
>  Yeah, so apart from the libquadmath/libbid typo, I figure that a check for
> fenv.h would make sense.  Looking into libbid, it turns out that the only code
> requiring fenv.h lives in a single file and is governed by a conditional
> define coming from bid_conf.h, so I figured we could make that vary depending
> on fenv.h rather than having it turned on always.
>
> libgcc/ChangeLog:
>
> 2011-02-09  Dave Korn  <...
>
>        * configure.ac (set_have_fenv_h): New AC_SUBST'd variable, set based
>        on AC_HEADER check for fenv.h to an appropriate -DHAVE_FENV_H= value.
>        * configure: Regenerate.
>        * Makefile.in (INTERNAL_CFLAGS): Use it here.
>
> libgcc/config/libbid/ChangeLog:
>
> 2011-02-09  Dave Korn  <...
>
>        * bid_conf.h (DECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS): Define
>        equal to HAVE_FENV_H, rather than always to 1.
>
>  Bootstrap running now on i686-pc-cygwin.  I assume that this will cause at
> least some number of failures in the dfp tests, but won't know how many until
> I've had a chance to run them later.  That might be seen as an acceptable way
> of indicating that dfp can't work fully against an old version of the Cygwin
> system DLL.
>
>  Alternative approaches would be to error out with an appropriate message
> about needing either fenv.h or --disable-decimal-float during libgcc
> configure, or perhaps to modify config/dfp.m4 to check for fenv.h there and
> disable decimal float automatically; anyone have any opinions about what
> approach would be preferable?
>

I prefer not to touch bid_conf.h.  You can enable DFP for cygwin only if fenv.h
is available.


-- 
H.J.



More information about the Gcc-patches mailing list