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

Better support for MacOS and arm64 #31

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

Conversation

DavJCosby
Copy link

@DavJCosby DavJCosby commented Jan 28, 2025

cyCore.h wont compile for arm64 architectures due to these lines:

#if !defined(CY_NO_INTRIN_H) && !defined(CY_NO_EMMINTRIN_H) && !defined(CY_NO_IMMINTRIN_H)
# include <immintrin.h>
#endif

Unless I've got things set up wrong on my end, it seems that the deprecated gluErrorString() function is unavailable on MacOS as well. Because of that, this section from cyGL.h won't compile:

while ( (error = glGetError()) != GL_NO_ERROR) {
	*outStream << "OpenGL ERROR: " << sourcefile << " (line " << line << "): ";
	if ( call ) *outStream << call << " triggered ";
	*outStream << gluErrorString(error) << std::endl;
}

This PR adds && !defined(__aarch64__) to that first chain of definition checks, instructing the compiler to skip including these intel intrinsics on at least some incompatible platforms. Further, it reimplements gluErrorString() via conditional compilation for Apple devices.

@DavJCosby DavJCosby changed the title Disabled intel intrinsics for arm64 architectures Better support for MacOS and arm64 Jan 29, 2025
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.

1 participant