Skip to content
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

Cross-compile for Windows targets using mingw-w64 #506

Open
tmorlando opened this issue Jan 18, 2025 · 2 comments
Open

Cross-compile for Windows targets using mingw-w64 #506

tmorlando opened this issue Jan 18, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@tmorlando
Copy link

Describe the feature
Implement build system changes and source code changes needed for Windows AMD64 targets.

Supporting Windows platform as a pkcs11-provider target would benefit makers of cross-platform smart-card applications (me included). OpenSSL provides instructions on how to produce libraries using cross-compilation on a Linux-host in file NOTES-WINDOWS.md, section "Native builds using MinGW", and the said changes could follow this approach instead of native Windows builds.

Expected behavior

Existing PKCS#11 smart cards modules can be used from applications using OpenSSL 3.0

Additional context

Non-minimal change-set is available from:
tmorlando@f61f976

Code on src/mutex.c is likely redundant, as MinGW provides pthread compatibility layer for Windows targets.

Adding Windows as a target platform may require substantial changes to CI pipelines cross-compilation results are to be tested.

@tmorlando tmorlando added the enhancement New feature or request label Jan 18, 2025
@simo5
Copy link
Member

simo5 commented Jan 20, 2025

The code you point at does not look too bad, we'd need to think a bit better about some names and which file helpers belong to but it is overall acceptable should you wish to submit a PR for it.

However a critical problem would be testing. We can use CI to ensure the code builds, but how would we know if it actually works?

@tmorlando
Copy link
Author

I read the above as a "no-objection" for a new target platform. However, I'll hold submitting a PR and try to address testability issues with wine or something alike.

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

No branches or pull requests

2 participants