-
Notifications
You must be signed in to change notification settings - Fork 124
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
crosscompile xkbcommon on linux for windows (1/2) #305
Comments
No expert either, but this sounds OK to me, we can make this change.
Hmm this one does seem correct to me, here we do actually care about the specific compiler type. What problem did this cause? |
`_MSC_VER` is specific to MSVC, but there can be other compilers targeting windows. Hopefully they do define `_WIN32`, so let's use that. Refs: xkbcommon#305 Signed-off-by: Ran Benita <[email protected]>
`_MSC_VER` is specific to MSVC, but there can be other compilers targeting windows. Hopefully they do define `_WIN32`, so let's use that. Refs: #305 Signed-off-by: Ran Benita <[email protected]>
The _MSC_VER -> _WIN32 change is done in #320, will be included in the next release. |
Thank you for checking the "cc.get_argument_syntax() == 'msvc' ". The _MSC_VER -> _WIN32 change looks good. Thank you for the fix! |
`_MSC_VER` is specific to MSVC, but there can be other compilers targeting windows. Hopefully they do define `_WIN32`, so let's use that. Refs: xkbcommon#305 Signed-off-by: Ran Benita <[email protected]>
Hello,
crosscompiling xkbcommon on linux (OpenSuse 15.4) for windows works, when applying some changes:
#ifdef _MSC_VER does not work when using the gnu cross compiler. I can fix this by setting this variable:
I guess this is just a hack, the right way would be to use another compiler variable. I'm no expert here - maybe _WIN32 is the right one, as used in other libraries:
src/fontconfig-2.13.96/src/fcxml.c:#ifdef _WIN32
src/libjpeg-turbo-2.1.3/tjexample.c:#ifdef _WIN32
src/expat-2.4.4/lib/xmlparse.c:#ifdef _WIN32
Just a note: in meson.build,
elif cc.get_argument_syntax() == 'msvc'
does also not work, the cross compiler might have a different signature.
PS: Some infos on setting up cross-compile of libxkbcommon for win are documented here:
https://github.com/awarnke/crystal-facet-uml/tree/master/build/win
Kind Regards
Andreas
The text was updated successfully, but these errors were encountered: