File 0762-Update-configure-scripts.patch of Package erlang
From e76656ecf095999f1da12e6d83aa2e18bf721b3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Thu, 19 Dec 2024 17:04:51 +0100
Subject: [PATCH] Update configure scripts
---
erts/config.h.in | 3 +++
erts/configure | 31 +++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/erts/config.h.in b/erts/config.h.in
index 8a1d0cdb5c..63bdd4c874 100644
--- a/erts/config.h.in
+++ b/erts/config.h.in
@@ -438,6 +438,9 @@
/* Define if x86/x86_64 out of order instructions should be synchronized */
#undef ETHR_X86_OUT_OF_ORDER
+/* Define to 1 if _Float16 can be converted from/to double. */
+#undef FLOAT16_IS_CONVERTIBLE
+
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
diff --git a/erts/configure b/erts/configure
index 8cd1ab6d9f..75c93bd7ea 100755
--- a/erts/configure
+++ b/erts/configure
@@ -19754,6 +19754,37 @@ printf "%s\n" "#define SIZEOF__FLOAT16 $ac_cv_sizeof__Float16" >>confdefs.h
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+_Float16 x = 0.0;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Float16 convertible" >&5
+printf %s "checking for _Float16 convertible... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+printf "%s\n" "#define FLOAT16_IS_CONVERTIBLE 1" >>confdefs.h
+
+
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Float16 convertible" >&5
+printf %s "checking for _Float16 convertible... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
BITS64=
if test $ac_cv_sizeof_void_p = 8; then
--
2.43.0