This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anders <anders_k@users.sourceforge.net>
Date: Sat, 27 Jun 2020 23:18:45 +0000
Subject: [PATCH 1/1] Don't let GCC 10 generate memmove calls (bug #1248)

see:
https://sourceforge.net/p/nsis/bugs/1248/

taken from:
https://github.com/kichik/nsis/commit/6d9cfd3ef8296e3f9c0be9b3dbe01f0f3491b3dd.patch

diff --git a/SCons/Config/gnu b/SCons/Config/gnu
index 1111111..2222222 100755
--- a/SCons/Config/gnu
+++ b/SCons/Config/gnu
@@ -103,6 +103,10 @@ stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG'])    # no standard libraries
 stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG'])        # 512 bytes align
 stub_env.Append(LINKFLAGS = ['$MAP_FLAG'])          # generate map file
 
+conf = FlagsConfigure(stub_env)
+conf.CheckCompileFlag('-fno-tree-loop-distribute-patterns')  # GCC 10: Don't generate msvcrt!memmove calls (bug #1248)
+conf.Finish()
+
 stub_uenv = stub_env.Clone()
 stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
 
