Skip to content

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

Merged

Conversation

kdt3rd
Copy link
Contributor

@kdt3rd kdt3rd commented Apr 5, 2025

force an assumption of sse2 on i686, which was enabled with pentium 4 chips

@@ -178,7 +178,12 @@ jobs:
if: inputs.msystem != ''
run: |
cmake --version
cmake $CMAKE_ARGS
if [ "${{ inputs.msystem }}" == "MINGW32" ]; then
Copy link
Member

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.

Copy link
Contributor Author

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...

Copy link
Member

@cary-ilm cary-ilm left a 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!

@kdt3rd kdt3rd merged commit 3f1d975 into AcademySoftwareFoundation:main Apr 6, 2025
42 checks passed
@kdt3rd kdt3rd deleted the address_mingw32_issues branch April 6, 2025 02:07
cmake $CMAKE_ARGS
if [ "${{ inputs.msystem }}" == "MINGW32" ]; then
cmake $CMAKE_ARGS -DCMAKE_C_FLAGS='-msse2 -mfpmath=sse' \
-DCMAKE_CXX_FLAGS='-msse2 -mfpmath=sse'
Copy link

@kmilos kmilos Apr 8, 2025

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants