-
Notifications
You must be signed in to change notification settings - Fork 641
Address mingw32 issues #2016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address mingw32 issues #2016
Conversation
Signed-off-by: Kimball Thurston <[email protected]>
Signed-off-by: Kimball Thurston <[email protected]>
Signed-off-by: Kimball Thurston <[email protected]>
Signed-off-by: Kimball Thurston <[email protected]>
Signed-off-by: Kimball Thurston <[email protected]>
Signed-off-by: Kimball Thurston <[email protected]>
@@ -178,7 +178,12 @@ jobs: | |||
if: inputs.msystem != '' | |||
run: | | |||
cmake --version | |||
cmake $CMAKE_ARGS | |||
if [ "${{ inputs.msystem }}" == "MINGW32" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably tried to put that with the block above but got stymied by the quoting. I'll come up with a better way of collecting the arguments, so it preserves arguments with spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, exactly - thought single quotes would work, then tried escaping, not sure what i was doing wrong...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following the details, but from what I can tell it looks good, and the tests pass! Thanks!
cmake $CMAKE_ARGS | ||
if [ "${{ inputs.msystem }}" == "MINGW32" ]; then | ||
cmake $CMAKE_ARGS -DCMAKE_C_FLAGS='-msse2 -mfpmath=sse' \ | ||
-DCMAKE_CXX_FLAGS='-msse2 -mfpmath=sse' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, there's not really a need for this , unless building outside of MSYS2, which is not the case here. MSYS2 defines these for the MINGW32 subsystem, which should already implicitly include the flags above:
CFLAGS="-march=pentium4 -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,--no-seh -Wl,--large-address-aware"
And these for UCRT64:
CFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1"
CXXFLAGS="$CFLAGS"
Edit: actually, not really true, looks that applies only when using some of the MSYS2 packaging tools, might still be ok to do when building manually...
force an assumption of sse2 on i686, which was enabled with pentium 4 chips