Hi Martin, Thanks a lot for your support in getting ucrtbase to work.
I will try to add the 2 missing references in the way you hinted at in your post. Currently I get a new strange error while compiling the Julia sources with the new toolchain: /CROSS64/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/lib /../lib/libmsvcrt.a(lib64_libucrtbase_a-ucrt_sprintf.o):/home/sven/buildtmp/ build/mingw-crt/../../src/mingw-w64/mingw-w64-crt/stdio/ucrt_sprintf.c:20: multiple definition of `__imp_snprintf' /CROSS64/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/lib /../lib/libmsvcrt.a(lib64_libucrtbase_a-ucrt_snprintf.o):/home/sven/buildtmp /build/mingw-crt/../../src/mingw-w64/mingw-w64-crt/stdio/ucrt_snprintf.c:20: first defined here Is it possible that your last ucrtbase patch contained a typo ? : diff --git a/mingw-w64-crt/stdio/ucrt_sprintf.c b/mingw-w64-crt/stdio/ucrt_sprintf.c index 74d665d..b9029d5 100644 --- a/mingw-w64-crt/stdio/ucrt_sprintf.c +++ b/mingw-w64-crt/stdio/ucrt_sprintf.c @@ -17,3 +17,4 @@ int __cdecl sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format, __builtin_va_end(ap); return ret; } +int __cdecl (*__MINGW_IMP_SYMBOL(snprintf))(char *__restrict__, const <== Typo here ? (snprintf -> sprintf) ? *** +char *__restrict__, ...) = sprintf; Thanks & Cheers - Sven -----Original Message----- From: Martin Storsjö [mailto:mar...@martin.st] Sent: 23 November 2017 12:15 To: Kai Tietz via Mingw-w64-public <mingw-w64-public@lists.sourceforge.net> Subject: Re: [Mingw-w64-public] [PATCH] ucrtbase: Make sure that compat symbols aren't autoexported On Thu, 23 Nov 2017, Martin Storsjö wrote: > On Thu, 23 Nov 2017, Kai Tietz via Mingw-w64-public wrote: > >> Martin, >> >> patch looks ok. Be careful about the static symbol in custom section >> that it is actually present in a finally linked version. Sometimes >> gcc thinks ... that it can optimize away such static symbols. I had >> to introduce for that dummy references to such symbols in the past. >> See crt/* folder for that. > > Yup, in this case I used __attribute__((__used__)) for that. > > // Martin Pushed - with one minor adjustment (we didn't need any __MINGW_IMP_SYMBOL(_tzset), and by adding one it would recurse infinitely). // Martin ---------------------------------------------------------------------------- -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public