Re: [Mingw-w64-public] --enable-experimental breaks as
On 27.01.2019 20:18, Mateusz wrote: W dniu 27.01.2019 o 18:40, Christer Solskogen pisze: On 26.01.2019 01:01, Mateusz wrote: For me it looks OK. Which version of binutils? It's fixed in master branch. $ gcc -v && ld -v Using built-in specs. COLLECT_GCC=f:\msys\m64-83\bin\gcc.exe COLLECT_LTO_WRAPPER=f:/msys/m64-83/bin/../libexec/gcc/x86_64-w64-mingw32/8.2.1/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: /home/ma/m/source/gcc-8/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-nls --enable-languages=c,c++,objc,obj-c++ --with-gmp=/home/ma/m/build/for_target --with-mpfr=/home/ma/m/build/for_target --with-mpc=/home/ma/m/build/for_target --with-isl=/home/ma/m/build/for_target --enable-twoprocess --disable-libstdcxx-pch --disable-win32-registry --disable-shared --enable-fully-dynamic-string --prefix=/home/ma/m/target --with-sysroot=/home/ma/m/target Thread model: win32 gcc version 8.2.1 20190125 (GCC) GNU ld (GNU Binutils) 2.32.51.20190125 It is fixed for binary zero in *.s file, but there is no binary zero in my *.s file. And was the native compiler cross compiled from Linux? Yes, Ubuntu 16.04, build script close to https://sourceforge.net/projects/mingw-w64-dgn/ Cross compiler was build without '--enable-experimental --enable-wildcard'. I've added '--enable-experimental --enable-wildcard' options only to rebuild_target.sh it is close to https://sourceforge.net/p/mingw-w64-dgn/code/HEAD/tree/trunk/rebuild_target.sh And that is perhaps the culpit. My cross compiler was built with '--enable-experimental' (I did not recompile mingw-crt for the crossed compiler, I just copied the libs and headers. No reason to compile them again) -- chs ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH 3/3] crt: Uncomment building libmincore.a for arm64
On 1/24/19 3:32 PM, Martin Storsjö wrote: This reverts 3949528971aa15f78b08e8d29ae042e6662ce0ec, now that libauthz.a and libmswsock.a are built for arm64. Signed-off-by: Martin Storsjö All three patches look good to me. Thanks, Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt/lib-common: Add more kernel32 exported functions
On 1/25/19 9:46 PM, Martin Storsjö wrote: Do you happen to know which one(s) they'd belong to here? Jacek, do you know? It depends. I checked a few functions. Most of them are present in onecoreuap.lib, some of them are in onecore.lib and some (eg. WaitForDebugEventEx) are in mincore.lib as well. Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] headers: Update d2d1.h enums with missing members.
在 2019/1/28 0:16, Nikolay Sivov 写道: > From 789bdbbfa35f0145a656d31a06b4bb54d7181155 Mon Sep 17 00:00:00 2001 > From: Nikolay Sivov > Date: Sun, 27 Jan 2019 19:15:17 +0300 > Subject: [PATCH] headers: Update d2d1.h enums with missing members. > > Signed-off-by: Nikolay Sivov > --- > mingw-w64-headers/include/d2d1.h | 182 ++- > 1 file changed, 107 insertions(+), 75 deletions(-) This probably looks good, as it makes enum tags match those in Windows SDK. Those little alignment fixups probably don't need a separated patch. -- Best regards, LH_Mouse signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] headers: Update d2d1.h enums with missing members.
On Mon, Jan 28, 2019 at 3:53 PM Liu Hao wrote: > 在 2019/1/28 0:16, Nikolay Sivov 写道: > > From 789bdbbfa35f0145a656d31a06b4bb54d7181155 Mon Sep 17 00:00:00 2001 > > From: Nikolay Sivov > > Date: Sun, 27 Jan 2019 19:15:17 +0300 > > Subject: [PATCH] headers: Update d2d1.h enums with missing members. > > > > Signed-off-by: Nikolay Sivov > > --- > > mingw-w64-headers/include/d2d1.h | 182 ++- > > 1 file changed, 107 insertions(+), 75 deletions(-) > > This probably looks good, as it makes enum tags match those in Windows > SDK. Those little alignment fixups probably don't need a separated patch. > You mean member values formatting? I changed alignment only because those additional members. I can split name change, FORCE_DWORD addition, and new members for text options enum, so 3 patches total. Does that sound good? > > > -- > Best regards, > LH_Mouse > > ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] ntintsafe.h: Add header.
Hi Zebediah, The patch looks mostly good to me. On 1/28/19 2:45 AM, Zebediah Figura wrote: +/** If CHAR is unsigned, use static inline for functions that operate +on chars. This avoids the risk of linking to the wrong function when +different translation units with different types of chars are linked +together, and code using signed chars will not be affected. */ +#ifndef __MINGW_INTSAFE_CHAR_API +#ifdef __CHAR_UNSIGNED__ +#define __MINGW_INTSAFE_CHAR_API static inline +#else +#define __MINGW_INTSAFE_CHAR_API __MINGW_INTSAFE_API +#endif +#endif I feel like there should be nicer way to deal with this, but it's not worse than what we have to deal with for inline/__forceinline already, so that's fine with me. +#define __MINGW_INTSAFE_BODY(operation, x, y) \ +{ \ + if (__builtin_##operation##_overflow(x, y, result)) \ + { \ + *result = 0; \ + return STATUS_INTEGER_OVERFLOW; \ + } \ + return STATUS_SUCCESS; \ +} MSVC seems to use ~0 value as result in those function. I'm not sure how important that difference is. Thanks, Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH 3/3] crt: Uncomment building libmincore.a for arm64
On Mon, 28 Jan 2019, Jacek Caban wrote: On 1/24/19 3:32 PM, Martin Storsjö wrote: This reverts 3949528971aa15f78b08e8d29ae042e6662ce0ec, now that libauthz.a and libmswsock.a are built for arm64. Signed-off-by: Martin Storsjö All three patches look good to me. Thanks, pushed! // Martin ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt/lib-common: Add more advapi32 exported functions
On Sun, 27 Jan 2019, Martin Storsjö wrote: On Mon, 28 Jan 2019, Biswapriyo Nath wrote: Add more advapi32 exported functions. This looks probably ok to me. I'll (try to remember to) apply it tomorrow unless others have comments. Pushed this one now. // Martin ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] ntintsafe.h: Add header.
在 2019/1/28 9:45, Zebediah Figura 写道: > From 8cb9f70bba03c555767e6d9767b92ac3b9b624f2 Mon Sep 17 00:00:00 2001 > From: Zebediah Figura > Date: Sat, 15 Dec 2018 21:03:47 -0600 > Subject: [PATCH] ntintsafe.h: Add header. > > Signed-off-by: Zebediah Figura > --- > mingw-w64-headers/ddk/include/ddk/ntintsafe.h | 401 ++ > 1 file changed, 401 insertions(+) > create mode 100644 mingw-w64-headers/ddk/include/ddk/ntintsafe.h Is is really necessary to duplicate this code for `Rtl*` and non-`Rtl` variants? Using sort of macros to control what functions to generate would look more appropriate. P.S. Our implementations of these functions set output parameters to `0` on overflow but Microsoft variants set them to `-1` for both signed and unsigned types. Although MSDN says that upon overflow these parameters are 'not valid' [1] I think we should match MS's behavior. This requires another patch. [1] https://docs.microsoft.com/en-us/windows/desktop/api/intsafe/nf-intsafe-shorttouchar -- Best regards, LH_Mouse signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] crt/lib64: Add more ntdll exported functions
... From 378045a5825ed9a5ebd7cffcdf2db5af5e1e09bc Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 28 Jan 2019 20:07:04 +0530 Subject: [PATCH] crt/lib64: Add ntdll exported functions Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/lib64/ntdll.def | 390 ++ 1 file changed, 390 insertions(+) diff --git a/mingw-w64-crt/lib64/ntdll.def b/mingw-w64-crt/lib64/ntdll.def index 894c3123..22c7bb4d 100644 --- a/mingw-w64-crt/lib64/ntdll.def +++ b/mingw-w64-crt/lib64/ntdll.def @@ -26,6 +26,8 @@ AlpcRegisterCompletionListWorkerThread AlpcRundownCompletionList AlpcUnregisterCompletionList AlpcUnregisterCompletionListWorkerThread +ApiSetQueryApiSetPresence +ApiSetQueryApiSetPresenceEx CsrAllocateCaptureBuffer CsrAllocateMessagePointer CsrCaptureMessageBuffer @@ -52,6 +54,7 @@ DbgSetDebugFilterState DbgUiConnectToDbg DbgUiContinue DbgUiConvertStateChangeStructure +DbgUiConvertStateChangeStructureEx DbgUiDebugActiveProcess DbgUiGetThreadDebugObject DbgUiIssueRemoteBreakin @@ -62,6 +65,7 @@ DbgUiWaitStateChange DbgUserBreakPoint EtwControlTraceA EtwControlTraceW +EtwCheckCoverage EtwCreateTraceInstanceId EtwEnableTrace EtwEnumerateTraceGuids @@ -73,6 +77,7 @@ EtwEventActivityIdControl EtwEventEnabled EtwEventProviderEnabled EtwEventRegister +EtwEventSetInformation EtwEventUnregister EtwEventWrite EtwEventWriteEndScenario @@ -133,63 +138,89 @@ KiUserApcDispatcher KiUserCallbackDispatcher KiUserExceptionDispatcher LdrAccessOutOfProcessResource +KiUserInvertedFunctionTable DATA LdrAccessResource +LdrAddDllDirectory LdrAddLoadAsDataTable LdrAddRefDll LdrAlternateResourcesEnabled +LdrAppxHandleIntegrityFailure +LdrCallEnclave +LdrControlFlowGuardEnforced +LdrCreateEnclave LdrCreateOutOfProcessImage +LdrDeleteEnclave LdrDestroyOutOfProcessImage LdrDisableThreadCalloutsForDll LdrEnumResources LdrEnumerateLoadedModules +LdrFastFailInLoaderCallout LdrFindCreateProcessManifest LdrFindEntryForAddress LdrFindResourceDirectory_U LdrFindResourceEx_U LdrFindResource_U LdrFlushAlternateResourceModules +LdrGetDllDirectory +LdrGetDllFullName LdrGetDllHandle LdrGetDllHandleByMapping LdrGetDllHandleByName LdrGetDllHandleEx +LdrGetDllPath LdrGetFailureData LdrGetFileNameFromLoadAsDataTable LdrGetKnownDllSectionHandle LdrGetProcedureAddress LdrGetProcedureAddressEx +LdrGetProcedureAddressForCaller LdrHotPatchRoutine LdrInitShimEngineDynamic +LdrInitializeEnclave LdrInitializeThunk +LdrIsModuleSxsRedirected LdrLoadAlternateResourceModule LdrLoadAlternateResourceModuleEx LdrLoadDll +LdrLoadEnclaveModule LdrLockLoaderLock LdrOpenImageFileOptionsKey LdrProcessInitializationComplete LdrProcessRelocationBlock +LdrProcessRelocationBlockEx LdrQueryImageFileExecutionOptions LdrQueryImageFileExecutionOptionsEx LdrQueryImageFileKeyOption LdrQueryModuleServiceTags +LdrQueryOptionalDelayLoadedAPI LdrQueryProcessModuleInformation LdrRegisterDllNotification +LdrRemoveDllDirectory LdrRemoveLoadAsDataTable LdrResFindResource LdrResFindResourceDirectory LdrResGetRCConfig LdrResRelease LdrResSearchResource +LdrResolveDelayLoadedAPI +LdrResolveDelayLoadsFromDll LdrRscIsTypeExist LdrSetAppCompatDllRedirectionCallback +LdrSetDefaultDllDirectories +LdrSetDllDirectory LdrSetDllManifestProber +LdrSetImplicitPathOptions LdrSetMUICacheType LdrShutdownProcess LdrShutdownThread +LdrStandardizeSystemPath +LdrSystemDllInitBlock DATA LdrUnloadAlternateResourceModule LdrUnloadAlternateResourceModuleEx LdrUnloadDll LdrUnlockLoaderLock LdrUnregisterDllNotification +LdrUpdatePackageSearchPath LdrVerifyImageMatchesChecksum LdrVerifyImageMatchesChecksumEx LdrpResGetMappingSize @@ -211,21 +242,27 @@ NtAccessCheckByTypeAndAuditAlarm NtAccessCheckByTypeResultList NtAccessCheckByTypeResultListAndAuditAlarm NtAccessCheckByTypeResultListAndAuditAlarmByHandle +NtAcquireProcessActivityReference NtAddAtom +NtAddAtomEx NtAddBootEntry NtAddDriverEntry NtAdjustGroupsToken NtAdjustPrivilegesToken +NtAdjustTokenClaimsAndDeviceGroups NtAlertResumeThread NtAlertThread +NtAlertThreadByThreadId NtAllocateLocallyUniqueId NtAllocateReserveObject NtAllocateUserPhysicalPages NtAllocateUuids NtAllocateVirtualMemory +NtAllocateVirtualMemoryEx NtAlpcAcceptConnectPort NtAlpcCancelMessage NtAlpcConnectPort +NtAlpcConnectPortEx NtAlpcCreatePort NtAlpcCreatePortSection NtAlpcCreateResourceReserve @@ -236,6 +273,7 @@ NtAlpcDeleteResourceReserve NtAlpcDeleteSectionView NtAlpcDeleteSecurityContext NtAlpcDisconnectPort +NtAlpcImpersonateClientContainerOfPort NtAlpcImpersonateClientOfPort NtAlpcOpenSenderProcess NtAlpcOpenSenderThread @@ -247,58 +285,78 @@ NtAlpcSetInformation NtApphelpCacheControl NtAreMappedFilesTheSame NtAssignProcessToJobObject +NtAssociateWaitCompletionPacket +NtCallEnclave NtCallbackReturn NtCancelDeviceWakeupRequest NtCancelIoFile NtCancelIoFileEx NtCancelSynchronousIoFile NtCancelTimer +NtCancelTimer2 +NtCancelWaitCompletion
Re: [Mingw-w64-public] [PATCH] ntintsafe.h: Add header.
On 1/28/19 7:02 AM, Jacek Caban wrote: Hi Zebediah, The patch looks mostly good to me. On 1/28/19 2:45 AM, Zebediah Figura wrote: +/** If CHAR is unsigned, use static inline for functions that operate +on chars. This avoids the risk of linking to the wrong function when +different translation units with different types of chars are linked +together, and code using signed chars will not be affected. */ +#ifndef __MINGW_INTSAFE_CHAR_API +#ifdef __CHAR_UNSIGNED__ +#define __MINGW_INTSAFE_CHAR_API static inline +#else +#define __MINGW_INTSAFE_CHAR_API __MINGW_INTSAFE_API +#endif +#endif I feel like there should be nicer way to deal with this, but it's not worse than what we have to deal with for inline/__forceinline already, so that's fine with me. It was taken directly from intsafe.h. Not, of course, that it shouldn't perhaps be improved in both places, but it's not clear to me what the correct way would be. +#define __MINGW_INTSAFE_BODY(operation, x, y) \ +{ \ + if (__builtin_##operation##_overflow(x, y, result)) \ + { \ + *result = 0; \ + return STATUS_INTEGER_OVERFLOW; \ + } \ + return STATUS_SUCCESS; \ +} MSVC seems to use ~0 value as result in those function. I'm not sure how important that difference is. True enough (though with the apparent exception of UCHAR, where 0 is used). I'll send a patch to fix these, at least. Thanks, Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] ntintsafe.h: Add header.
On 1/28/19 7:16 AM, Liu Hao wrote: 在 2019/1/28 9:45, Zebediah Figura 写道: From 8cb9f70bba03c555767e6d9767b92ac3b9b624f2 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sat, 15 Dec 2018 21:03:47 -0600 Subject: [PATCH] ntintsafe.h: Add header. Signed-off-by: Zebediah Figura --- mingw-w64-headers/ddk/include/ddk/ntintsafe.h | 401 ++ 1 file changed, 401 insertions(+) create mode 100644 mingw-w64-headers/ddk/include/ddk/ntintsafe.h Is is really necessary to duplicate this code for `Rtl*` and non-`Rtl` variants? Using sort of macros to control what functions to generate would look more appropriate. Probably not, no. I'm presuming we'd want to create a common header called something like _mingw_intsafe.h? P.S. Our implementations of these functions set output parameters to `0` on overflow but Microsoft variants set them to `-1` for both signed and unsigned types. Although MSDN says that upon overflow these parameters are 'not valid' [1] I think we should match MS's behavior. This requires another patch. Yep, I'll send a patch to fix this as well. [1] https://docs.microsoft.com/en-us/windows/desktop/api/intsafe/nf-intsafe-shorttouchar ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public