[v1,2/7] Add *-ldbl.h headers to include/bits
Commit Message
On some platforms, long double may have either the same format as double
or another, wider format, such as the Quadruple IEC 60559 long double
format or the IBM Extended Precision format (both 128-bits wide).
Selecting between the available formats is done by using one of the
following compiler switches: -mlong-double-128, for the wider format, or
-mlong-double-64, for the narrower. On all platforms that provide this
choice, the wider format is the default.
When the non-default format is selected by user code (i.e.: when
building with -mlong-double-64) calls to functions that take long double
parameters or return a long double type (e.g.: strfroml) are redirected
to a compat function, via assembler redirection, by headers such as
bits/stdlib-ldbl.h or bits/misc-ldbl.h.
In glibc builds, however, these headers are currently being read from
the system directories (/usr/include/bits) rather than from the source
directory. Although this works correctly today, it raises
reproducibility concerns. Besides that, builds for powerpc64le will
need these files from the source directory, because on powerpc64le, the
new redirections for long double with IEEE binary128 format will be
implemented in these headers.
Tested for powerpc64 and powerpc64le.
* include/bits/argp-ldbl.h: New file.
* include/bits/err-ldbl.h: Likewise.
* include/bits/error-ldbl.h: Likewise.
* include/bits/monetary-ldbl.h: Likewise.
* include/bits/printf-ldbl.h: Likewise.
* include/bits/stdio-ldbl.h: Likewise.
* include/bits/stdlib-ldbl.h: Likewise.
* include/bits/syslog-ldbl.h: Likewise.
* include/bits/wchar-ldbl.h: Likewise.
---
include/bits/argp-ldbl.h | 1 +
include/bits/err-ldbl.h | 1 +
include/bits/error-ldbl.h | 1 +
include/bits/monetary-ldbl.h | 1 +
include/bits/printf-ldbl.h | 1 +
include/bits/stdio-ldbl.h | 1 +
include/bits/stdlib-ldbl.h | 1 +
include/bits/syslog-ldbl.h | 1 +
include/bits/wchar-ldbl.h | 1 +
9 files changed, 9 insertions(+)
create mode 100644 include/bits/argp-ldbl.h
create mode 100644 include/bits/err-ldbl.h
create mode 100644 include/bits/error-ldbl.h
create mode 100644 include/bits/monetary-ldbl.h
create mode 100644 include/bits/printf-ldbl.h
create mode 100644 include/bits/stdio-ldbl.h
create mode 100644 include/bits/stdlib-ldbl.h
create mode 100644 include/bits/syslog-ldbl.h
create mode 100644 include/bits/wchar-ldbl.h
Comments
On Thu, 6 Dec 2018, Gabriel F. T. Gomes wrote:
> * include/bits/argp-ldbl.h: New file.
> * include/bits/err-ldbl.h: Likewise.
> * include/bits/error-ldbl.h: Likewise.
These depend on subsequent patches in the series that add the real
bits/*-ldbl.h implementations, so should be later in the series (or merged
with those patches).
> * include/bits/monetary-ldbl.h: Likewise.
> * include/bits/printf-ldbl.h: Likewise.
> * include/bits/stdio-ldbl.h: Likewise.
> * include/bits/stdlib-ldbl.h: Likewise.
> * include/bits/syslog-ldbl.h: Likewise.
> * include/bits/wchar-ldbl.h: Likewise.
This part of the patch is OK (as is the rest once the underlying patches
to add the relevant bits/ headers are approved).
On Thu, 06 Dec 2018, Joseph Myers wrote:
>On Thu, 6 Dec 2018, Gabriel F. T. Gomes wrote:
>
>> * include/bits/argp-ldbl.h: New file.
>> * include/bits/err-ldbl.h: Likewise.
>> * include/bits/error-ldbl.h: Likewise.
>
>These depend on subsequent patches in the series that add the real
>bits/*-ldbl.h implementations, so should be later in the series (or merged
>with those patches).
Thanks, I merged this part of the patch into the subsequent patches.
>> * include/bits/monetary-ldbl.h: Likewise.
>> * include/bits/printf-ldbl.h: Likewise.
>> * include/bits/stdio-ldbl.h: Likewise.
>> * include/bits/stdlib-ldbl.h: Likewise.
>> * include/bits/syslog-ldbl.h: Likewise.
>> * include/bits/wchar-ldbl.h: Likewise.
>
>This part of the patch is OK (as is the rest once the underlying patches
>to add the relevant bits/ headers are approved).
This part is now committed.
new file mode 100644
@@ -0,0 +1 @@
+#include <argp/bits/argp-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <misc/bits/err-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <misc/bits/error-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <stdlib/bits/monetary-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <stdio-common/bits/printf-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <libio/bits/stdio-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <stdlib/bits/stdlib-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <misc/bits/syslog-ldbl.h>
new file mode 100644
@@ -0,0 +1 @@
+#include <wcsmbs/bits/wchar-ldbl.h>