This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 26/31] Do not redirect calls to __GI_* symbols, when redirecting to *ieee128


* Gabriel F. T. Gomes:

> From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
>
> On platforms where long double has IEEE binary128 format as a third
> option (initially, only powerpc64le), many exported functions are
> redirected to their __*ieee128 equivalents.  This redirection is
> provided by installed headers such as stdio-ldbl.h, and is supposed to
> work correctly with user code.
>
> However, during the build of glibc, similar redirections are employed,
> in internal headers such as include/stdio.h, in order to avoid extra PLT
> entries.  These redirections conflict with the redirections to
> __*ieee128, and must be avoided during the build.  This patch protects
> the second redirections with a test for __LONG_DOUBLE_USES_FLOAT128.

Why don't we see this problem with the existing dual ABIs for long
double?

> diff --git a/include/stdio.h b/include/stdio.h
> index bea2066cd1..8ec801c989 100644
> --- a/include/stdio.h
> +++ b/include/stdio.h
> @@ -13,7 +13,10 @@ extern int __fcloseall (void) attribute_hidden;
>  extern int __snprintf (char *__restrict __s, size_t __maxlen,
>  		       const char *__restrict __format, ...)
>       __attribute__ ((__format__ (__printf__, 3, 4)));
> +#  if !defined __LONG_DOUBLE_USES_FLOAT128 \
> +  || (defined __LONG_DOUBLE_USES_FLOAT128 && __LONG_DOUBLE_USES_FLOAT128 == 0)
>  libc_hidden_proto (__snprintf)
> +#  endif
>  extern int __vfscanf (FILE *__restrict __s,
>  		      const char *__restrict __format,
>  		      __gnuc_va_list __arg)

This leads to a build failure on most architectures because
__LONG_DOUBLE_USES_FLOAT128 is not defined at this point.

(I tried the gabriel/powerpc-ieee128-printscan branch at commit
1c4f7fffc4f1cc186906dd47812e725e51bb036a.)

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]