@@ -864,6 +864,19 @@ extern int __overflow (FILE *, int);
# include <bits/stdio-ldbl.h>
#endif
+/* XXX: DO NOT COMMIT.
+
+ On powerpc64le, the implementation of long double with IEEE binary128
+ format is not complete. The redirections of the stdio.h functions
+ are supposed to be implemented in bits/stdio-ldbl.h, however, we can
+ only redirect all or none. In the meantime, bits/stdio-ieee128.h
+ allows us to redirect part of them for testing purposes. */
+#include <bits/floatn.h>
+#if __HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ == 113 && \
+ ! defined __BUILDING_EXTRA_LDBL_FORMAT
+# include <bits/stdio-ieee128.h>
+#endif
+
__END_DECLS
#endif /* <stdio.h> included. */
@@ -31,4 +31,13 @@ $(objpfx)test-printf-ibm128.out: \
$(objpfx)test-printf-ibm128
$(SHELL) $^ '$(test-program-prefix)' $@; \
$(evaluate-test)
+
+# XXX: DO NOT COMMIT.
+#
+# On powerpc64le, the implementation of long double with IEEE binary128
+# format is not complete. The redirections of the stdio.h functions
+# are supposed to be implemented in bits/stdio-ldbl.h, however, we can
+# only redirect all or none. In the meantime, bits/stdio-ieee128.h
+# allows us to redirect part of them for testing purposes. */
+headers += bits/stdio-ieee128.h
endif
new file mode 100644
@@ -0,0 +1,38 @@
+/* Redirections for stdio functions for -mabi=ieeelongdouble.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* XXX: DO NOT COMMIT.
+
+ On powerpc64le, the implementation of long double with IEEE binary128
+ format is not complete. The redirections of the stdio.h functions
+ are supposed to be implemented in bits/stdio-ldbl.h, however, we can
+ only redirect all or none. In the meantime, bits/stdio-ieee128.h
+ allows us to redirect part of them for testing purposes. */
+
+#ifndef _STDIO_H
+# error "Never include <bits/stdio-ibm128.h> directly; use <stdio.h> instead."
+#endif
+
+#include <stdio.h>
+
+#define __IBM128_REDIR(name) \
+ extern __typeof (name) __ieee128_##name; \
+ extern __typeof (name) name __asm (__ASMNAME ("__ieee128_" #name));
+
+__IBM128_REDIR (vfprintf)
+/* To be completed with the other functions. */
@@ -1,4 +1,5 @@
# On PowerPC we use the IBM extended long double format.
+ieee754/ldbl-128ibm-compat
ieee754/ldbl-128ibm
ieee754/ldbl-opt
ieee754/dbl-64
@@ -2221,3 +2221,4 @@ GLIBC_2.27 wcstof64 F
GLIBC_2.27 wcstof64_l F
GLIBC_2.27 wcstof64x F
GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 __ieee128_vfprintf F