File 1349-Fail-if-canonicalized-host-and-build-equals-when-cro.patch of Package erlang
From 9f4e1a352f31d700d424bf6cd137722a86630344 Mon Sep 17 00:00:00 2001
From: Rickard Green <rickard@erlang.org>
Date: Fri, 2 Jul 2021 15:25:26 +0200
Subject: [PATCH 1/2] Fail if canonicalized host and build equals when cross
compiling
---
HOWTO/INSTALL-CROSS.md | 12 +++++++++---
make/configure.in | 17 +++++++++++++++++
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/HOWTO/INSTALL-CROSS.md b/HOWTO/INSTALL-CROSS.md
index 322ff13340..f2494e6f1c 100644
--- a/HOWTO/INSTALL-CROSS.md
+++ b/HOWTO/INSTALL-CROSS.md
@@ -128,14 +128,20 @@ be built.
$ make
`<HOST>` is the host/target system that you build for. It does not have to be
-a full `CPU-VENDOR-OS` triplet, but can be. The full `CPU-VENDOR-OS` triplet
-will be created by executing `$ERL_TOP/erts/autoconf/config.sub <HOST>`. If
-`config.sub` fails, you need to be more specific.
+a full `CPU-VENDOR-OS` triplet, but can be. The full canonicalized
+`CPU-VENDOR-OS` triplet will be created by executing
+`$ERL_TOP/erts/autoconf/config.sub <HOST>`. If `config.sub` fails, you need
+to be more specific.
`<BUILD>` should equal the `CPU-VENDOR-OS` triplet of the system that you
build on. If you execute `$ERL_TOP/erts/autoconf/config.guess`, it will in
most cases print the triplet you want to use for this.
+The use of `<HOST>` and `<BUILD>` values that differ will trigger cross
+compilation. Note that if `<HOST>` and `<BUILD>` differ, the canonicalized
+values of `<HOST>` and `<BUILD>` must also differ. If they do not, the
+configuration will fail.
+
Pass the cross compilation variables as command line arguments to `configure`
using a `<VARIABLE>=<VALUE>` syntax.
--
2.26.2