diff --git a/patches/mingw-w64/9001-v13-crt-Mark-atexit-as-DATA-because-it-s-always-overridd.patch b/patches/mingw-w64/9001-v13-crt-Mark-atexit-as-DATA-because-it-s-always-overridd.patch deleted file mode 100644 index 5826f9b6..00000000 --- a/patches/mingw-w64/9001-v13-crt-Mark-atexit-as-DATA-because-it-s-always-overridd.patch +++ /dev/null @@ -1,247 +0,0 @@ -diff --git a/mingw-w64-crt/lib-common/msvcr120_app.def.in b/mingw-w64-crt/lib-common/msvcr120_app.def.in -index 67f8f8a57..1788601f4 100644 ---- a/mingw-w64-crt/lib-common/msvcr120_app.def.in -+++ b/mingw-w64-crt/lib-common/msvcr120_app.def.in -@@ -1870,7 +1870,7 @@ F_NON_I386(atanf) - atanh - atanhf - F_ARM32(atanhl) ; Can't use long double functions from the CRT on x86 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr120.def.in b/mingw-w64-crt/lib32/msvcr120.def.in -index f45289898..24c3126ae 100644 ---- a/mingw-w64-crt/lib32/msvcr120.def.in -+++ b/mingw-w64-crt/lib32/msvcr120.def.in -@@ -1846,7 +1846,7 @@ atan2 - atanh - atanhf - ; atanhl ; Can't use long double functions from the CRT on x86 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr120d.def.in b/mingw-w64-crt/lib32/msvcr120d.def.in -index f30ae72e1..8b46a9725 100644 ---- a/mingw-w64-crt/lib32/msvcr120d.def.in -+++ b/mingw-w64-crt/lib32/msvcr120d.def.in -@@ -1913,7 +1913,7 @@ atan2 - atanh - atanhf - ; atanhl ; Can't use long double functions from the CRT on x86 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr40d.def.in b/mingw-w64-crt/lib32/msvcr40d.def.in -index 2d0af6c7d..278aa7740 100644 ---- a/mingw-w64-crt/lib32/msvcr40d.def.in -+++ b/mingw-w64-crt/lib32/msvcr40d.def.in -@@ -1461,7 +1461,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr70.def.in b/mingw-w64-crt/lib32/msvcr70.def.in -index c167523e7..6a302611f 100644 ---- a/mingw-w64-crt/lib32/msvcr70.def.in -+++ b/mingw-w64-crt/lib32/msvcr70.def.in -@@ -711,7 +711,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr70d.def.in b/mingw-w64-crt/lib32/msvcr70d.def.in -index bc5a32b6a..eb10ee400 100644 ---- a/mingw-w64-crt/lib32/msvcr70d.def.in -+++ b/mingw-w64-crt/lib32/msvcr70d.def.in -@@ -755,7 +755,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr71.def.in b/mingw-w64-crt/lib32/msvcr71.def.in -index c1b7ce2d1..63e63bf06 100644 ---- a/mingw-w64-crt/lib32/msvcr71.def.in -+++ b/mingw-w64-crt/lib32/msvcr71.def.in -@@ -705,7 +705,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcr71d.def.in b/mingw-w64-crt/lib32/msvcr71d.def.in -index 806602207..c6b60f98b 100644 ---- a/mingw-w64-crt/lib32/msvcr71d.def.in -+++ b/mingw-w64-crt/lib32/msvcr71d.def.in -@@ -749,7 +749,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcrt10.def.in b/mingw-w64-crt/lib32/msvcrt10.def.in -index 66cb07c15..f5e58a273 100644 ---- a/mingw-w64-crt/lib32/msvcrt10.def.in -+++ b/mingw-w64-crt/lib32/msvcrt10.def.in -@@ -1112,7 +1112,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcrt20.def.in b/mingw-w64-crt/lib32/msvcrt20.def.in -index 7330274d6..df69e69ca 100644 ---- a/mingw-w64-crt/lib32/msvcrt20.def.in -+++ b/mingw-w64-crt/lib32/msvcrt20.def.in -@@ -1329,7 +1329,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcrt40.def.in b/mingw-w64-crt/lib32/msvcrt40.def.in -index 26a7453cc..98dc2015e 100644 ---- a/mingw-w64-crt/lib32/msvcrt40.def.in -+++ b/mingw-w64-crt/lib32/msvcrt40.def.in -@@ -1429,7 +1429,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib32/msvcrtd.def.in b/mingw-w64-crt/lib32/msvcrtd.def.in -index ee6670030..a0823f422 100644 ---- a/mingw-w64-crt/lib32/msvcrtd.def.in -+++ b/mingw-w64-crt/lib32/msvcrtd.def.in -@@ -655,7 +655,7 @@ asctime - asin - atan - atan2 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib64/msvcr120.def.in b/mingw-w64-crt/lib64/msvcr120.def.in -index 65637518b..ab4912db4 100644 ---- a/mingw-w64-crt/lib64/msvcr120.def.in -+++ b/mingw-w64-crt/lib64/msvcr120.def.in -@@ -1788,7 +1788,7 @@ atanf - atanh - atanhf - ; atanhl ; Can't use long double functions from the CRT on x86 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/lib64/msvcr120d.def.in b/mingw-w64-crt/lib64/msvcr120d.def.in -index 5d975164d..f61eb41f6 100644 ---- a/mingw-w64-crt/lib64/msvcr120d.def.in -+++ b/mingw-w64-crt/lib64/msvcr120d.def.in -@@ -1853,7 +1853,7 @@ atanf - atanh - atanhf - ; atanhl ; Can't use long double functions from the CRT on x86 --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/libarm32/kernelbase.def b/mingw-w64-crt/libarm32/kernelbase.def -index 954ea2dc1..d6a487db1 100644 ---- a/mingw-w64-crt/libarm32/kernelbase.def -+++ b/mingw-w64-crt/libarm32/kernelbase.def -@@ -1889,7 +1889,7 @@ _invalid_parameter - _onexit - _purecall - _time64 --atexit -+atexit DATA - exit - hgets - hwprintf -diff --git a/mingw-w64-crt/libarm32/msvcr110.def.in b/mingw-w64-crt/libarm32/msvcr110.def.in -index 8f30767a8..84f46eca3 100644 ---- a/mingw-w64-crt/libarm32/msvcr110.def.in -+++ b/mingw-w64-crt/libarm32/msvcr110.def.in -@@ -1716,7 +1716,7 @@ atan - atan2 - atan2f - atanf --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/libarm32/msvcr110d.def.in b/mingw-w64-crt/libarm32/msvcr110d.def.in -index 5a809682d..a7aebdad6 100644 ---- a/mingw-w64-crt/libarm32/msvcr110d.def.in -+++ b/mingw-w64-crt/libarm32/msvcr110d.def.in -@@ -1781,7 +1781,7 @@ atan - atan2 - atan2f - atanf --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/libarm32/msvcr120.def.in b/mingw-w64-crt/libarm32/msvcr120.def.in -index 4483a2093..f94ac44f3 100644 ---- a/mingw-w64-crt/libarm32/msvcr120.def.in -+++ b/mingw-w64-crt/libarm32/msvcr120.def.in -@@ -1753,7 +1753,7 @@ atanf - atanh - atanhf - atanhl --atexit -+atexit DATA - atof - atoi - atol -diff --git a/mingw-w64-crt/libarm32/msvcr120d.def.in b/mingw-w64-crt/libarm32/msvcr120d.def.in -index 90374f7e9..9d4cec588 100644 ---- a/mingw-w64-crt/libarm32/msvcr120d.def.in -+++ b/mingw-w64-crt/libarm32/msvcr120d.def.in -@@ -1818,7 +1818,7 @@ atanf - atanh - atanhf - atanhl --atexit -+atexit DATA - atof - atoi - atol diff --git a/patches/mingw-w64/9002-v13-crt-Provide-wrappers-for-exit-in-libmingwex.patch b/patches/mingw-w64/9002-v13-crt-Provide-wrappers-for-exit-in-libmingwex.patch index 1230f0f7..ac22e928 100644 --- a/patches/mingw-w64/9002-v13-crt-Provide-wrappers-for-exit-in-libmingwex.patch +++ b/patches/mingw-w64/9002-v13-crt-Provide-wrappers-for-exit-in-libmingwex.patch @@ -1,5 +1,5 @@ diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am -index d497fa76b..a0bd0c7ee 100644 +index 7db657ed7..6e52e564f 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -117,7 +117,7 @@ src_libmingw32=include/oscalls.h include/internal.h include/sect_attribs.h \ @@ -116,7 +116,7 @@ index ea310d426..33e4f5504 100644 set_terminate signal diff --git a/mingw-w64-crt/lib-common/msvcr120_app.def.in b/mingw-w64-crt/lib-common/msvcr120_app.def.in -index 1788601f4..95b4bdcd0 100644 +index 4508a43f3..7f31dbc7a 100644 --- a/mingw-w64-crt/lib-common/msvcr120_app.def.in +++ b/mingw-w64-crt/lib-common/msvcr120_app.def.in @@ -1243,7 +1243,7 @@ F_I386(_except1) @@ -138,7 +138,7 @@ index 1788601f4..95b4bdcd0 100644 exp2 exp2f diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in -index 64e978088..aba98b197 100644 +index 6359a7953..72e239958 100644 --- a/mingw-w64-crt/lib-common/msvcrt.def.in +++ b/mingw-w64-crt/lib-common/msvcrt.def.in @@ -578,7 +578,7 @@ _execv @@ -160,7 +160,7 @@ index 64e978088..aba98b197 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib-common/ucrtbase-common.def.in b/mingw-w64-crt/lib-common/ucrtbase-common.def.in -index 4e1c87da6..bdfdb1579 100644 +index 69052d686..086b7cca0 100644 --- a/mingw-w64-crt/lib-common/ucrtbase-common.def.in +++ b/mingw-w64-crt/lib-common/ucrtbase-common.def.in @@ -60,7 +60,7 @@ F_DEBUG(_CrtSetReportMode) @@ -200,7 +200,7 @@ index 4e1c87da6..bdfdb1579 100644 rand rand_s diff --git a/mingw-w64-crt/lib32/crtdll.def.in b/mingw-w64-crt/lib32/crtdll.def.in -index e0626d58d..47242831f 100644 +index 82cf0bcfa..6bb4fba29 100644 --- a/mingw-w64-crt/lib32/crtdll.def.in +++ b/mingw-w64-crt/lib32/crtdll.def.in @@ -167,7 +167,7 @@ _execv @@ -222,7 +222,7 @@ index e0626d58d..47242831f 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib32/msvcr100.def.in b/mingw-w64-crt/lib32/msvcr100.def.in -index fda12255a..54347de02 100644 +index 03929c719..dd3fc026c 100644 --- a/mingw-w64-crt/lib32/msvcr100.def.in +++ b/mingw-w64-crt/lib32/msvcr100.def.in @@ -830,7 +830,7 @@ _execv @@ -244,7 +244,7 @@ index fda12255a..54347de02 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib32/msvcr100d.def.in b/mingw-w64-crt/lib32/msvcr100d.def.in -index c7616a8f0..8a8c8f5fe 100644 +index 30a730754..c3eb07aa4 100644 --- a/mingw-w64-crt/lib32/msvcr100d.def.in +++ b/mingw-w64-crt/lib32/msvcr100d.def.in @@ -883,7 +883,7 @@ _execv @@ -266,7 +266,7 @@ index c7616a8f0..8a8c8f5fe 100644 fabs DATA ; overwritten fclose diff --git a/mingw-w64-crt/lib32/msvcr110.def.in b/mingw-w64-crt/lib32/msvcr110.def.in -index eb45326d5..0bb096397 100644 +index 089a865ea..e1f79521c 100644 --- a/mingw-w64-crt/lib32/msvcr110.def.in +++ b/mingw-w64-crt/lib32/msvcr110.def.in @@ -953,7 +953,7 @@ _execv @@ -288,7 +288,7 @@ index eb45326d5..0bb096397 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib32/msvcr110d.def.in b/mingw-w64-crt/lib32/msvcr110d.def.in -index 2dcd3b371..7944e7805 100644 +index c68ee7b84..26799ed51 100644 --- a/mingw-w64-crt/lib32/msvcr110d.def.in +++ b/mingw-w64-crt/lib32/msvcr110d.def.in @@ -1006,7 +1006,7 @@ _execv @@ -310,7 +310,7 @@ index 2dcd3b371..7944e7805 100644 fabs DATA ; overwritten fclose diff --git a/mingw-w64-crt/lib32/msvcr120.def.in b/mingw-w64-crt/lib32/msvcr120.def.in -index 24c3126ae..b54c7f528 100644 +index 25a271b51..0a5508720 100644 --- a/mingw-w64-crt/lib32/msvcr120.def.in +++ b/mingw-w64-crt/lib32/msvcr120.def.in @@ -972,7 +972,7 @@ _execv @@ -332,7 +332,7 @@ index 24c3126ae..b54c7f528 100644 exp2 exp2f diff --git a/mingw-w64-crt/lib32/msvcr120d.def.in b/mingw-w64-crt/lib32/msvcr120d.def.in -index 8b46a9725..22cb85bf6 100644 +index e1bb5f459..4f0440d4f 100644 --- a/mingw-w64-crt/lib32/msvcr120d.def.in +++ b/mingw-w64-crt/lib32/msvcr120d.def.in @@ -1025,7 +1025,7 @@ _execv @@ -354,7 +354,7 @@ index 8b46a9725..22cb85bf6 100644 exp2 exp2f diff --git a/mingw-w64-crt/lib32/msvcr40d.def.in b/mingw-w64-crt/lib32/msvcr40d.def.in -index 278aa7740..6f6b92a31 100644 +index 544816d70..38265d740 100644 --- a/mingw-w64-crt/lib32/msvcr40d.def.in +++ b/mingw-w64-crt/lib32/msvcr40d.def.in @@ -1126,7 +1126,7 @@ _execv @@ -376,7 +376,7 @@ index 278aa7740..6f6b92a31 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcr70.def.in b/mingw-w64-crt/lib32/msvcr70.def.in -index 6a302611f..33999a74e 100644 +index 689f8f7a3..c89164716 100644 --- a/mingw-w64-crt/lib32/msvcr70.def.in +++ b/mingw-w64-crt/lib32/msvcr70.def.in @@ -314,7 +314,7 @@ _execv @@ -398,7 +398,7 @@ index 6a302611f..33999a74e 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcr70d.def.in b/mingw-w64-crt/lib32/msvcr70d.def.in -index eb10ee400..ec92a89fd 100644 +index 910b88321..c14c69880 100644 --- a/mingw-w64-crt/lib32/msvcr70d.def.in +++ b/mingw-w64-crt/lib32/msvcr70d.def.in @@ -353,7 +353,7 @@ _execv @@ -420,7 +420,7 @@ index eb10ee400..ec92a89fd 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcr71.def.in b/mingw-w64-crt/lib32/msvcr71.def.in -index 63e63bf06..7b2d7b72e 100644 +index 7904cf8f9..e0528fd7f 100644 --- a/mingw-w64-crt/lib32/msvcr71.def.in +++ b/mingw-w64-crt/lib32/msvcr71.def.in @@ -306,7 +306,7 @@ _execv @@ -442,7 +442,7 @@ index 63e63bf06..7b2d7b72e 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcr71d.def.in b/mingw-w64-crt/lib32/msvcr71d.def.in -index c6b60f98b..5a457be81 100644 +index d6bf80eef..e73f9597f 100644 --- a/mingw-w64-crt/lib32/msvcr71d.def.in +++ b/mingw-w64-crt/lib32/msvcr71d.def.in @@ -345,7 +345,7 @@ _execv @@ -464,7 +464,7 @@ index c6b60f98b..5a457be81 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcr80.def.in b/mingw-w64-crt/lib32/msvcr80.def.in -index 107356849..e90a5f3f9 100644 +index ec463fb14..1e2808fe4 100644 --- a/mingw-w64-crt/lib32/msvcr80.def.in +++ b/mingw-w64-crt/lib32/msvcr80.def.in @@ -457,7 +457,7 @@ _execv @@ -486,7 +486,7 @@ index 107356849..e90a5f3f9 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib32/msvcr80d.def.in b/mingw-w64-crt/lib32/msvcr80d.def.in -index 1e461af4d..100c93332 100644 +index 27119524c..eaf9b8e21 100644 --- a/mingw-w64-crt/lib32/msvcr80d.def.in +++ b/mingw-w64-crt/lib32/msvcr80d.def.in @@ -524,7 +524,7 @@ _execv @@ -508,7 +508,7 @@ index 1e461af4d..100c93332 100644 fabs DATA ; overwritten fclose diff --git a/mingw-w64-crt/lib32/msvcr90.def.in b/mingw-w64-crt/lib32/msvcr90.def.in -index c8ae0be94..017d974c8 100644 +index c39b47547..15261d057 100644 --- a/mingw-w64-crt/lib32/msvcr90.def.in +++ b/mingw-w64-crt/lib32/msvcr90.def.in @@ -457,7 +457,7 @@ _execv @@ -530,7 +530,7 @@ index c8ae0be94..017d974c8 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib32/msvcr90d.def.in b/mingw-w64-crt/lib32/msvcr90d.def.in -index 1e88f7175..df5da0b4c 100644 +index 90e7cbd75..79e6869bf 100644 --- a/mingw-w64-crt/lib32/msvcr90d.def.in +++ b/mingw-w64-crt/lib32/msvcr90d.def.in @@ -514,7 +514,7 @@ _execv @@ -552,7 +552,7 @@ index 1e88f7175..df5da0b4c 100644 fabs DATA fclose diff --git a/mingw-w64-crt/lib32/msvcrt10.def.in b/mingw-w64-crt/lib32/msvcrt10.def.in -index f5e58a273..19508773e 100644 +index 0f99e6ab3..8006cba6e 100644 --- a/mingw-w64-crt/lib32/msvcrt10.def.in +++ b/mingw-w64-crt/lib32/msvcrt10.def.in @@ -943,7 +943,7 @@ _execv @@ -574,7 +574,7 @@ index f5e58a273..19508773e 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcrt20.def.in b/mingw-w64-crt/lib32/msvcrt20.def.in -index df69e69ca..c10977696 100644 +index 781f86abd..b4c7ea777 100644 --- a/mingw-w64-crt/lib32/msvcrt20.def.in +++ b/mingw-w64-crt/lib32/msvcrt20.def.in @@ -981,7 +981,7 @@ _execv @@ -596,7 +596,7 @@ index df69e69ca..c10977696 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcrt40.def.in b/mingw-w64-crt/lib32/msvcrt40.def.in -index 98dc2015e..d276f910c 100644 +index 3122f0e1e..4e5989dad 100644 --- a/mingw-w64-crt/lib32/msvcrt40.def.in +++ b/mingw-w64-crt/lib32/msvcrt40.def.in @@ -1099,7 +1099,7 @@ _execv @@ -618,7 +618,7 @@ index 98dc2015e..d276f910c 100644 fabs fclose diff --git a/mingw-w64-crt/lib32/msvcrtd.def.in b/mingw-w64-crt/lib32/msvcrtd.def.in -index a0823f422..897fd8d64 100644 +index 04426ad23..86e9fec93 100644 --- a/mingw-w64-crt/lib32/msvcrtd.def.in +++ b/mingw-w64-crt/lib32/msvcrtd.def.in @@ -291,7 +291,7 @@ _execv @@ -640,7 +640,7 @@ index a0823f422..897fd8d64 100644 fabs fclose diff --git a/mingw-w64-crt/lib64/msvcr100.def.in b/mingw-w64-crt/lib64/msvcr100.def.in -index 8b8ba49c6..b4b57c2f1 100644 +index f1f680fdc..df0afa69b 100644 --- a/mingw-w64-crt/lib64/msvcr100.def.in +++ b/mingw-w64-crt/lib64/msvcr100.def.in @@ -784,7 +784,7 @@ _execv @@ -662,7 +662,7 @@ index 8b8ba49c6..b4b57c2f1 100644 expf DATA fabs DATA diff --git a/mingw-w64-crt/lib64/msvcr100d.def.in b/mingw-w64-crt/lib64/msvcr100d.def.in -index b07bd4c95..7a0877d32 100644 +index d4d4040a4..b98823ab3 100644 --- a/mingw-w64-crt/lib64/msvcr100d.def.in +++ b/mingw-w64-crt/lib64/msvcr100d.def.in @@ -835,7 +835,7 @@ _execv @@ -684,7 +684,7 @@ index b07bd4c95..7a0877d32 100644 expf DATA ; overwritten fabs DATA ; overwritten diff --git a/mingw-w64-crt/lib64/msvcr110.def.in b/mingw-w64-crt/lib64/msvcr110.def.in -index 2c2c9fbb9..f98039bb3 100644 +index e7c3570b6..21fcde1a2 100644 --- a/mingw-w64-crt/lib64/msvcr110.def.in +++ b/mingw-w64-crt/lib64/msvcr110.def.in @@ -909,7 +909,7 @@ _execv @@ -706,7 +706,7 @@ index 2c2c9fbb9..f98039bb3 100644 expf fabs diff --git a/mingw-w64-crt/lib64/msvcr110d.def.in b/mingw-w64-crt/lib64/msvcr110d.def.in -index 9f7bcf988..4ae550ebe 100644 +index e401c9d39..296b0fc0c 100644 --- a/mingw-w64-crt/lib64/msvcr110d.def.in +++ b/mingw-w64-crt/lib64/msvcr110d.def.in @@ -960,7 +960,7 @@ _execv @@ -728,7 +728,7 @@ index 9f7bcf988..4ae550ebe 100644 expf fabs diff --git a/mingw-w64-crt/lib64/msvcr120.def.in b/mingw-w64-crt/lib64/msvcr120.def.in -index ab4912db4..bf5aaf731 100644 +index 0762aab04..8c1928474 100644 --- a/mingw-w64-crt/lib64/msvcr120.def.in +++ b/mingw-w64-crt/lib64/msvcr120.def.in @@ -926,7 +926,7 @@ _execv @@ -750,7 +750,7 @@ index ab4912db4..bf5aaf731 100644 exp2 exp2f diff --git a/mingw-w64-crt/lib64/msvcr120d.def.in b/mingw-w64-crt/lib64/msvcr120d.def.in -index f61eb41f6..fbc961018 100644 +index 3af9c66c0..38a4de0fe 100644 --- a/mingw-w64-crt/lib64/msvcr120d.def.in +++ b/mingw-w64-crt/lib64/msvcr120d.def.in @@ -977,7 +977,7 @@ _execv @@ -772,7 +772,7 @@ index f61eb41f6..fbc961018 100644 exp2 exp2f diff --git a/mingw-w64-crt/lib64/msvcr80.def.in b/mingw-w64-crt/lib64/msvcr80.def.in -index 3c15764a6..75f2f3033 100644 +index 1e66668f9..03d555423 100644 --- a/mingw-w64-crt/lib64/msvcr80.def.in +++ b/mingw-w64-crt/lib64/msvcr80.def.in @@ -397,7 +397,7 @@ _execv @@ -794,7 +794,7 @@ index 3c15764a6..75f2f3033 100644 expf DATA fabs diff --git a/mingw-w64-crt/lib64/msvcr80d.def.in b/mingw-w64-crt/lib64/msvcr80d.def.in -index 00d217352..a4a95bad5 100644 +index 3228febcf..789982718 100644 --- a/mingw-w64-crt/lib64/msvcr80d.def.in +++ b/mingw-w64-crt/lib64/msvcr80d.def.in @@ -458,7 +458,7 @@ _execv @@ -816,7 +816,7 @@ index 00d217352..a4a95bad5 100644 expf DATA ; overwritten fabs diff --git a/mingw-w64-crt/lib64/msvcr90.def.in b/mingw-w64-crt/lib64/msvcr90.def.in -index 4e4c57351..dcb27400f 100644 +index 73de42453..50ddeed81 100644 --- a/mingw-w64-crt/lib64/msvcr90.def.in +++ b/mingw-w64-crt/lib64/msvcr90.def.in @@ -401,7 +401,7 @@ _execv @@ -838,7 +838,7 @@ index 4e4c57351..dcb27400f 100644 expf DATA fabs DATA diff --git a/mingw-w64-crt/lib64/msvcr90d.def.in b/mingw-w64-crt/lib64/msvcr90d.def.in -index ef03d6ac0..bffa03196 100644 +index 87f8d48b0..ea7b23cbc 100644 --- a/mingw-w64-crt/lib64/msvcr90d.def.in +++ b/mingw-w64-crt/lib64/msvcr90d.def.in @@ -452,7 +452,7 @@ _execv @@ -860,7 +860,7 @@ index ef03d6ac0..bffa03196 100644 expf DATA fabs diff --git a/mingw-w64-crt/libarm32/kernelbase.def b/mingw-w64-crt/libarm32/kernelbase.def -index d6a487db1..f6626c5df 100644 +index 62d79176d..daeb287e0 100644 --- a/mingw-w64-crt/libarm32/kernelbase.def +++ b/mingw-w64-crt/libarm32/kernelbase.def @@ -1882,7 +1882,7 @@ __wgetmainargs @@ -872,17 +872,17 @@ index d6a487db1..f6626c5df 100644 _initterm _initterm_e _invalid_parameter -@@ -1890,7 +1890,7 @@ _onexit +@@ -1890,7 +1890,7 @@ _invalid_parameter _purecall _time64 - atexit DATA + _crt_atexit == atexit ; rename atexit to _crt_atexit for compatibility with UCRT, real atexit function provided by mingw-w64 -exit +exit DATA hgets hwprintf lstrcmp diff --git a/mingw-w64-crt/libarm32/msvcr110.def.in b/mingw-w64-crt/libarm32/msvcr110.def.in -index 84f46eca3..3ed9360e3 100644 +index d0af03fad..087aa648c 100644 --- a/mingw-w64-crt/libarm32/msvcr110.def.in +++ b/mingw-w64-crt/libarm32/msvcr110.def.in @@ -901,7 +901,7 @@ _execv @@ -904,7 +904,7 @@ index 84f46eca3..3ed9360e3 100644 expf fabs diff --git a/mingw-w64-crt/libarm32/msvcr110d.def.in b/mingw-w64-crt/libarm32/msvcr110d.def.in -index a7aebdad6..c3b7490cd 100644 +index 2dd7f38bb..c774e41fe 100644 --- a/mingw-w64-crt/libarm32/msvcr110d.def.in +++ b/mingw-w64-crt/libarm32/msvcr110d.def.in @@ -952,7 +952,7 @@ _execv @@ -926,7 +926,7 @@ index a7aebdad6..c3b7490cd 100644 expf fabs diff --git a/mingw-w64-crt/libarm32/msvcr120.def.in b/mingw-w64-crt/libarm32/msvcr120.def.in -index f94ac44f3..57f5a898a 100644 +index c32ad4947..b615ef914 100644 --- a/mingw-w64-crt/libarm32/msvcr120.def.in +++ b/mingw-w64-crt/libarm32/msvcr120.def.in @@ -900,7 +900,7 @@ _execv @@ -948,7 +948,7 @@ index f94ac44f3..57f5a898a 100644 exp2 exp2f diff --git a/mingw-w64-crt/libarm32/msvcr120d.def.in b/mingw-w64-crt/libarm32/msvcr120d.def.in -index 9d4cec588..a720c23dc 100644 +index b30ad0e6b..65a62bccd 100644 --- a/mingw-w64-crt/libarm32/msvcr120d.def.in +++ b/mingw-w64-crt/libarm32/msvcr120d.def.in @@ -951,7 +951,7 @@ _execv @@ -969,20 +969,20 @@ index 9d4cec588..a720c23dc 100644 exp exp2 exp2f -diff --git a/mingw-w64-crt/misc/ucrt_compat.c b/mingw-w64-crt/misc/ucrt_compat.c -index 7fefae11e..446b5b06d 100644 ---- a/mingw-w64-crt/misc/ucrt_compat.c -+++ b/mingw-w64-crt/misc/ucrt_compat.c -@@ -34,10 +34,11 @@ unsigned int __cdecl _get_output_format(void); - - int __cdecl __ms_fwprintf(FILE *, const wchar_t *, ...); +diff --git a/mingw-w64-crt/misc/ucrt_amsg_exit.c b/mingw-w64-crt/misc/ucrt_amsg_exit.c +index 0aad4f6c3..077ef2bef 100644 +--- a/mingw-w64-crt/misc/ucrt_amsg_exit.c ++++ b/mingw-w64-crt/misc/ucrt_amsg_exit.c +@@ -11,9 +11,11 @@ + #include + #include +extern void (*__MINGW_IMP_SYMBOL(_exit))(int) __attribute__((__noreturn__)); - - void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret) { ++ + void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret) + { fprintf(stderr, "runtime error %d\n", ret); - _exit(255); + (*__MINGW_IMP_SYMBOL(_exit))(255); } - - unsigned int __cdecl _get_output_format(void) + void __cdecl (*__MINGW_IMP_SYMBOL(_amsg_exit))(int) = _amsg_exit; diff --git a/patches/mingw-w64/9003-v13-crt-Implement-standard-conforming-termination-support.patch b/patches/mingw-w64/9003-v13-crt-Implement-standard-conforming-termination-support.patch index ef4a8c18..13fdeaa7 100644 --- a/patches/mingw-w64/9003-v13-crt-Implement-standard-conforming-termination-support.patch +++ b/patches/mingw-w64/9003-v13-crt-Implement-standard-conforming-termination-support.patch @@ -1,5 +1,5 @@ diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c -index 88450ce9f..2f00ddacf 100644 +index d08d2a81f..fbd87a9c5 100644 --- a/mingw-w64-crt/crt/crtdll.c +++ b/mingw-w64-crt/crt/crtdll.c @@ -31,6 +31,12 @@ @@ -48,34 +48,35 @@ index 88450ce9f..2f00ddacf 100644 i__leave: __native_dllmain_reason = UINT_MAX; return retcode ; -@@ -204,7 +227,11 @@ i__leave: +@@ -204,9 +227,13 @@ i__leave: int __cdecl atexit (_PVFV func) { +#ifdef __USING_MCFGTHREAD__ + return __MCF_cxa_atexit ((__MCF_cxa_dtor_cdecl*)(intptr_t) func, NULL, &__dso_handle); +#else + /* Do not use msvcrt's atexit() or UCRT's _crt_atexit() function as it + * cannot be called from DLL library which may be unloaded at runtime. */ return _register_onexit_function(&atexit_table, (_onexit_t)func); +#endif } char __mingw_module_is_dll = 1; diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c -index 2e45bf423..511636354 100644 +index cdf5dcd25..246791de0 100644 --- a/mingw-w64-crt/crt/crtexe.c +++ b/mingw-w64-crt/crt/crtexe.c -@@ -20,6 +20,10 @@ - #include +@@ -21,6 +21,9 @@ #include #include -+#include + #include +#ifdef __USING_MCFGTHREAD__ +#include +#endif #if defined(__SEH__) && (!defined(__clang__) || __clang_major__ >= 7) #define SEH_INLINE_ASM -@@ -36,6 +40,7 @@ extern int _fmode; +@@ -37,6 +40,7 @@ extern int _fmode; #undef _commode extern int _commode; extern int _dowildcard; @@ -83,7 +84,7 @@ index 2e45bf423..511636354 100644 extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *); -@@ -249,6 +254,11 @@ __tmainCRTStartup (void) +@@ -250,6 +254,11 @@ __tmainCRTStartup (void) _fpreset (); duplicate_ppstrings (argc, &argv); @@ -95,14 +96,19 @@ index 2e45bf423..511636354 100644 __main (); /* C++ initialization. */ #ifdef _UNICODE __winitenv = envp; -@@ -325,7 +335,11 @@ static void duplicate_ppstrings (int ac, _TCHAR ***av) +@@ -326,12 +335,16 @@ static void duplicate_ppstrings (int ac, _TCHAR ***av) int __cdecl atexit (_PVFV func) { +#ifdef __USING_MCFGTHREAD__ + return __MCF_cxa_atexit ((__MCF_cxa_dtor_cdecl*)(intptr_t) func, NULL, &__dso_handle); +#else - return _onexit((_onexit_t)func) ? 0 : -1; + /* + * msvcrt def file renames the real atexit() function to _crt_atexit(). + * UCRT provides atexit() function only under name _crt_atexit(). + * So redirect call to _crt_atexit() function. + */ + return _crt_atexit(func); +#endif } @@ -159,7 +165,7 @@ index 256c26d07..ab6896f96 100644 +} +#endif /* __USING_MCFGTHREAD__ */ diff --git a/mingw-w64-crt/crt/tls_atexit.c b/mingw-w64-crt/crt/tls_atexit.c -index 0412fa4ba..ed36b935c 100644 +index 60c4f513e..f7614f15d 100644 --- a/mingw-w64-crt/crt/tls_atexit.c +++ b/mingw-w64-crt/crt/tls_atexit.c @@ -4,6 +4,29 @@ @@ -214,7 +220,7 @@ index 0412fa4ba..ed36b935c 100644 @@ -170,3 +188,5 @@ static void WINAPI tls_callback(HANDLE hDllHandle, DWORD dwReason, LPVOID __UNUS } - _CRTALLOC(".CRT$XLB") PIMAGE_TLS_CALLBACK __xl_b = (PIMAGE_TLS_CALLBACK) tls_callback; + _CRTALLOC(".CRT$XLB") PIMAGE_TLS_CALLBACK __xl_b = tls_callback; + +#endif /* __USING_MCFGTHREAD__ */ diff --git a/mingw-w64-crt/crt/ucrt_exit_wrappers.c b/mingw-w64-crt/crt/ucrt_exit_wrappers.c diff --git a/scripts/mingw-w64-crt.sh b/scripts/mingw-w64-crt.sh index 20a04cd0..405dee82 100644 --- a/scripts/mingw-w64-crt.sh +++ b/scripts/mingw-w64-crt.sh @@ -56,9 +56,7 @@ PKG_PATCHES=( } ) $( [[ $RUNTIME_MAJOR_VERSION -ge 11 ]] && { - [[ $RUNTIME_MAJOR_VERSION -ge 13 ]] && { - echo "mingw-w64/9001-v13-crt-Mark-atexit-as-DATA-because-it-s-always-overridd.patch" - } || { + [[ $RUNTIME_MAJOR_VERSION -le 12 ]] && { echo "mingw-w64/9001-v11-crt-Mark-atexit-as-DATA-because-it-s-always-overridd.patch" } [[ $RUNTIME_MAJOR_VERSION -ge 13 ]] && {