<snip/>
>
> The best way to use it is to rebuild mingw-w64 from scratch with both
> headers and crt built with --with-default-msvcrt=ucrt (or ucrtbase).
> Then your "libmsvcrt.a" actually will be the libucrt.a (or
> libucrtbase.a) and will link against api-ms-win-crt-*.dll or
> ucrtbase.dll. (VS 2017 by default links against api-ms-win-crt-*.dll
> if linking the CRT
> dynamically.)
>
> You don't need to care about moldnames, in modern mingw-w64 versions that's
> an empty library. And vcruntime140 doesn't matter either, you don't need it
> (unless you are packaging an app for windows store).
>
> Question: will the libucrt.a build with v6.0.0 work witch v5.0.4, or will I
> need more changes than that?
> I am locked into v5.0.4 for the Ada toolchain I am using
The libucrt.a itself won't be enough, unfortunately - you'll need the
corresponding updated headers, and updated libmingw32/libmingwex as well.
(They are a bit updated so that they work with both old style libmsvcrt.a and
the new libucrt.a at the same time.)
> Building v6.0.0 from the git repro (git checkout v6.0.06) using the
> MinGW-w64 5.0.5 compilers (GCC 5.4.) and ran into this problem
>
> misc/onexit_table.c:77:8: error: '_execute_onexit_table' undeclared
> here (not in a function)
> typeof(_execute_onexit_table)
> *__MINGW_IMP_SYMBOL(_execute_onexit_table) = _execute_onexit_table;
This looks like one of the many places that need the new corresponding headers.
Here is what I tried - MISYS2 shell with the v6.0.0 compilers on PATH, got past
the
previous error but now face this:
misc/register_tls_atexit.c:12:8: error: unknown type name '_tls_callback_type'
static _tls_callback_type callback;
^~~~~~~~~~~~~~~~~~
misc/register_tls_atexit.c: In function 'run_callback':
misc/register_tls_atexit.c:17:5: error: called object 'callback' is not a
function or function pointer
callback(NULL, DLL_PROCESS_DETACH, 0);
^~~~~~~~
misc/register_tls_atexit.c:12:27: note: declared here
static _tls_callback_type callback;
^~~~~~~~
misc/register_tls_atexit.c:18:12: warning: assignment to 'int' from 'void *'
makes integer from pointer without a cast [-Wint-conversion]
callback = NULL;
^
misc/register_tls_atexit.c: At top level:
misc/register_tls_atexit.c:21:57: error: unknown type name
'_tls_callback_type'; did you mean 'SAL__callback'?
void __cdecl _register_thread_local_exe_atexit_callback(_tls_callback_type cb)
^~~~~~~~~~~~~~~~~~
SAL__callback
misc/register_tls_atexit.c:29:8: error:
'_register_thread_local_exe_atexit_callback' undeclared here (not in a function)
typeof(_register_thread_local_exe_atexit_callback)
*__MINGW_IMP_SYMBOL(_register_thread_local_exe_atexit_callback) =
_register_thread_local_exe_atexit_callback;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
misc/register_tls_atexit.c:14:13: warning: 'run_callback' defined but not used
[-Wunused-function]
static void run_callback(void)
^~~~~~~~~~~~
So I am at a loss as to what I am doing wrong.
Unfortunately, I think the most practical way of getting what you want is to
rebuild the Ada toolchain with the new mingw version. Since I presume that you
want the Ada runtime to work with UCRT, the it needs to be built with headers
set up with --with-default-msvcrt=ucrt.
libmingwex and libmingw32 are special as we try to make sure that one build of
them work with all msvcrt versions, but most all other code needs to be built
with the headers in the right mode (setting __MSVCRT_VERSION__, which switches
between a lot of different redirection paths in the headers, especially
regarding stdio.h).
Rebuilding the Ada compiler using the latest release of v6.0.0 is not something
I prefer to get into as it needs to be integrated with a third party tool
I'll think of something.
I appreciate all of the help so far.
Regards,
Tom
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public