On Tue, 17 Nov 2020, Martin Storsjö wrote:
The msvcrt.dll for arm and aarch64 lacks both __initenv and __winitenv.
Signed-off-by: Martin Storsjö <[email protected]>
---
mingw-w64-crt/crt/crtexe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index e78800525..7605458a8 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -322,7 +322,9 @@ __tmainCRTStartup (void)
duplicate_ppstrings (argc, &argv);
__main ();
#ifdef WPRFLAG
+#if !defined(__arm__) && !defined(__aarch64__)
__winitenv = envp;
+#endif
/* C++ initialization.
gcc inserts this call automatically for a function called main, but not
for wmain. */
mainret = wmain (argc, argv, envp);
--
2.17.1
Actually, it'd be much cleaner to just move the workaround to the arm
specific import libs instead - another patch coming up.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public