File 1039-Update-configure-scripts.patch of Package erlang

From ab45153862228cda9379184ff6e14a3976b1f5f3 Mon Sep 17 00:00:00 2001
From: Rickard Green <rickard@erlang.org>
Date: Fri, 2 Jul 2021 16:41:39 +0200
Subject: [PATCH 2/2] Update configure scripts

---
 make/configure | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/make/configure b/make/configure
index 81cdd2085f..02204f72d0 100755
--- a/make/configure
+++ b/make/configure
@@ -2793,6 +2793,7 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+
 else
     host_os=$host
 fi
@@ -2801,6 +2802,22 @@ TARGET=$host
 
 
 if test "$cross_compiling" = "yes"; then
+    if test "$build" = "$host"; then
+       as_fn_error $? "
+           Cross compiling with the same canonicalized 'host' value
+           as the canonicalized 'build' value.
+
+           We are cross compiling since the '--host=$host_alias'
+           and the '--build=$build_alias' arguments differ. When
+           cross compiling Erlang/OTP also the canonicalized values of
+           the '--build' and the '--host' arguments *must* differ. The
+           canonicalized values of these arguments however both equals:
+           $host
+
+           You can check the canonical value by passing a value as
+           argument to the 'erts/autoconf/config.sub' script.
+         " "$LINENO" 5
+    fi
     CROSS_COMPILING=yes
 else
     CROSS_COMPILING=no
-- 
2.26.2

openSUSE Build Service is sponsored by