-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #170215: powerpc64*: use --with-long-double-format=ieee
...into staging
- Loading branch information
Showing
8 changed files
with
133 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
pkgs/development/tools/gnulib/gnulib-longdouble-redirect.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
|
||
Below is the subset of gnulib commit | ||
776af40e09b476a41073131a90022572f448c189 which deals with long double | ||
redirects. The rest of that commit has been removed. | ||
|
||
diff --git a/lib/cdefs.h b/lib/cdefs.h | ||
index fd72b7b..4383e70 100644 | ||
--- a/lib/cdefs.h | ||
+++ b/lib/cdefs.h | ||
@@ -483,7 +493,37 @@ | ||
# include <bits/long-double.h> | ||
#endif | ||
|
||
-#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH | ||
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 | ||
+# ifdef __REDIRECT | ||
+ | ||
+/* Alias name defined automatically. */ | ||
+# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir | ||
+# define __LDBL_REDIR_DECL(name) \ | ||
+ extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); | ||
+ | ||
+/* Alias name defined automatically, with leading underscores. */ | ||
+# define __LDBL_REDIR2_DECL(name) \ | ||
+ extern __typeof (__##name) __##name \ | ||
+ __asm (__ASMNAME ("__" #name "ieee128")); | ||
+ | ||
+/* Alias name defined manually. */ | ||
+# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1 | ||
+# define __LDBL_REDIR1_DECL(name, alias) \ | ||
+ extern __typeof (name) name __asm (__ASMNAME (#alias)); | ||
+ | ||
+# define __LDBL_REDIR1_NTH(name, proto, alias) \ | ||
+ __REDIRECT_NTH (name, proto, alias) | ||
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \ | ||
+ __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128) | ||
+ | ||
+/* Unused. */ | ||
+# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl | ||
+# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth | ||
+ | ||
+# else | ||
+_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform"); | ||
+# endif | ||
+#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH | ||
# define __LDBL_COMPAT 1 | ||
# ifdef __REDIRECT | ||
# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) | ||
@@ -492,6 +532,8 @@ | ||
# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) | ||
# define __LDBL_REDIR_NTH(name, proto) \ | ||
__LDBL_REDIR1_NTH (name, proto, __nldbl_##name) | ||
+# define __LDBL_REDIR2_DECL(name) \ | ||
+ extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name)); | ||
# define __LDBL_REDIR1_DECL(name, alias) \ | ||
extern __typeof (name) name __asm (__ASMNAME (#alias)); | ||
# define __LDBL_REDIR_DECL(name) \ | ||
@@ -502,11 +544,13 @@ | ||
__LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) | ||
# endif | ||
#endif | ||
-#if !defined __LDBL_COMPAT || !defined __REDIRECT | ||
+#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \ | ||
+ || !defined __REDIRECT | ||
# define __LDBL_REDIR1(name, proto, alias) name proto | ||
# define __LDBL_REDIR(name, proto) name proto | ||
# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW | ||
# define __LDBL_REDIR_NTH(name, proto) name proto __THROW | ||
+# define __LDBL_REDIR2_DECL(name) | ||
# define __LDBL_REDIR_DECL(name) | ||
# ifdef __REDIRECT | ||
# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters