Add ARM64 (Apple Silicon) support and fix FPU bugs#21
Closed
kkeker wants to merge 1 commit into
Closed
Conversation
- Add arm64 architecture to core/Makefile, replacing i386 (dead on modern macOS) - Update Xcode project: MACOSX_DEPLOYMENT_TARGET=14.0, SDKROOT=macosx, VALID_ARCHS="x86_64 arm64", enable CLANG_ENABLE_OBJC_WEAK - Fix memset() argument swap in fpu_initialize() (issue pruten#20, reported by @mitchblank) - Fix K&R-style _native_tentox(a) -> _native_tentox(double a) (issue pruten#15) - Rename HACKY_MATH_X86 to HACKY_MATH_NATIVE since double+math.h works on all archs - Bump version to 0.1.0 Based on ARM64 build work from PR pruten#19 by @calmsacibis995. Tested: libshoebill_core.a builds clean (zero warnings) as universal arm64+x86_64. Made-with: Cursor
|
I can confirm that it does work, but the debugger does not build under arm64, as it complains about EDIT: I just made a commit in my own fork to fix the compiler linkage error. |
Author
|
Superseded by a comprehensive modernization PR that includes all ARM64 fixes plus extensive optimizations and a modern SwiftUI interface. |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core/Makefile, replacing i386 (no longer supported on modern macOS). Builds a universallibshoebill_core.a(arm64 + x86_64).MACOSX_DEPLOYMENT_TARGET=14.0,SDKROOT=macosx,VALID_ARCHS="x86_64 arm64", enableCLANG_ENABLE_OBJC_WEAK.memset()argument swap infpu_initialize()— the size and value arguments were transposed (fixes incorrect memset() in fpu.c #20, reported by @mitchblank)._native_tentox(a)→_native_tentox(double a)which causes build errors on modern compilers (fixes Error trying to build under Fedora 31 with lin.build.sh #15).HACKY_MATH_X86toHACKY_MATH_NATIVEsince thedouble+math.hcode path works identically on ARM64.This incorporates the build changes from #19 by @calmsacibis995, plus the two bug fixes identified by @mitchblank in #15 and #20. Verified to build cleanly (zero warnings) on macOS with Apple Silicon, producing a valid universal binary.
Test plan
make coreproducesintermediates/libshoebill_core.awith both arm64 and x86_64 slicesMade with Cursor