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

libobjc2: Build with strict Apple compatibility, backport fix #22538

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

qmfrederik
Copy link
Contributor

@qmfrederik qmfrederik commented Nov 14, 2024

This PR backports two fixes for libobjc2:

BOOL type compatibility

By default, Objective C's BOOL type is an (un)signed char. libobjc2 would define BOOL as int on the Windows platform, to avoid a clash with the Windows BOOL type.

However, MSYS2 uses WINBOOL instead of BOOL to avoid this clash.

Hence:

Fix for selector forwarding on x64 Windows

Backport of gnustep/libobjc2#313

@Biswa96
Copy link
Member

Biswa96 commented Nov 14, 2024

However, MSYS2 uses WINBOOL instead of BOOL to avoid this clash.

That's coming from mingw-w64 btw. https://github.com/mingw-w64/mingw-w64/blob/cf5c50cce0b4f8610eafd95443d1d3767de386a5/mingw-w64-headers/include/minwindef.h#L127

By default, Objective C's `BOOL` type is an `(un)signed char`. libobjc2 would define BOOL as `int` on the Windows platform, to avoid a clash with the Windows `BOOL` type.

However, MSYS2 uses `WINBOOL` instead of `BOOL` to avoid this clash.

Hence:
- Align the libobjc2 configuration with the Apple and use libobjc2 with the `STRICT_APPLE_COMPATIBILITY=1` flag set.  This aligns with the behavior of the GCC libobjc runtime.
- Configure `gnustep-make` with `CFLAGS=-DSTRICT_APPLE_COMPATIBILITY=1` to make sure GNUstep picks up this configuration
- Rebuild the other GNUstep packages
@qmfrederik qmfrederik changed the title libobjc2: Build with strict Apple compatibility libobjc2: Build with strict Apple compatibility, backport fix Nov 18, 2024
@qmfrederik
Copy link
Contributor Author

Thanks @Biswa96 and @ognevny, I made the changes requested, squeezed in another fix, and CI looks green. Would you mind having another look at this?

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