aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-10 14:41:31 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-09 10:29:18 -0300
commit0dfbbe80a58dbd1e4cfcce655c932183c22ee2ea (patch)
tree26a13c826f6eb9c96514c33bdea3a720f5b90d44
parent40ea7b8ad2da3beb94e121c5521554d3e401da47 (diff)
downloadglibc-0dfbbe80a58dbd1e4cfcce655c932183c22ee2ea.tar
glibc-0dfbbe80a58dbd1e4cfcce655c932183c22ee2ea.tar.gz
glibc-0dfbbe80a58dbd1e4cfcce655c932183c22ee2ea.tar.bz2
glibc-0dfbbe80a58dbd1e4cfcce655c932183c22ee2ea.zip
x86: math: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtype
-rw-r--r--sysdeps/x86/fpu/sfp-machine.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sysdeps/x86/fpu/sfp-machine.h b/sysdeps/x86/fpu/sfp-machine.h
index bc3fe332df..89a73642b1 100644
--- a/sysdeps/x86/fpu/sfp-machine.h
+++ b/sysdeps/x86/fpu/sfp-machine.h
@@ -1,10 +1,19 @@
/* Configure soft-fp for building sqrtf128. Based on sfp-machine.h in
libgcc, with soft-float and other irrelevant parts removed. */
+#if defined __x86_64__ && defined __ILP32__
+typedef long long int __gcc_CMPtype;
+#else
+typedef long int __gcc_CMPtype;
+#endif
+#if !defined(__clang__) && defined(__GNUC__)
/* The type of the result of a floating point comparison. This must
match `__libgcc_cmp_return__' in GCC for the target. */
-typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
-#define CMPtype __gcc_CMPtype
+typedef int __gcc_CMPtype_GCC __attribute__ ((mode (__libgcc_cmp_return__)));
+# define CMPtype __gcc_CMPtype
+_Static_assert(sizeof(__gcc_CMPtype) == sizeof(__gcc_CMPtype_GCC),
+ "sizeof(__gcc_CMPtype) != sizeof(__gcc_CMPtype_GCC)");
+#endif
#ifdef __x86_64__
# define _FP_W_TYPE_SIZE 64