https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111956

--- Comment #9 from Maciej W. Rozycki <macro at orcam dot me.uk> ---
Hmm, the host check for `__frexpieee128' in gcc/ will surely not do
what's intended: even if the host is `powerpc*-*-linux*', the target
will often be something else and vice versa (libgm2's host is GCC's
target).

I think there is no way to verify target C library features in gcc/
at `configure' time, because at this point we may not yet have a target
compiler.  I haven't dealt with such a situation before, but AFAICS
people have used GCC_GLIBC_VERSION_GTE_IFELSE to explicitly check for
the glibc version required instead.  There's a relevant case for
TARGET_DEFAULT_LONG_DOUBLE_128 you can use as an example.

I'm not sure if such a check is needed though, unless perhaps for
sanity, as you only define TARGET_LIBM_PROVIDES_LONG_DOUBLE_IEEE128 if
--with-long-double-format=ieee has been explicitly given.

Also ISTM you can omit the target check for `powerpc64le-*-linux*' here
keeping $with_long_double_format=ieee check only and get support for the
relevant `powerpc64-*-linux*' targets too, as -with-long-double-format=
will already have verified correct usage.

Finally you may or may not have to check for $gcc_cv_target_ldbl128
equal to "yes" too, in case someone has used --without-long-double-128
(I'm not sure what the consequences would be, but it has caught my
attention, so please double-check).

Overall please refer to someone more familiar with POWER GCC targets as
I can only comment based on what I can see in the scripts and my general
experience.  The best course of action might be submitting the patch to
gcc-patches for review, cc-ing RS6000 port maintainers, as the most
relevant people may not be reading this bug report.

Reply via email to