Skip to content

Conversation

@iory
Copy link
Contributor

@iory iory commented Jun 26, 2025

Add support for Apple Silicon (arm64)

This PR introduces the necessary changes to build and run the software natively on Apple Silicon (macOS arm64 architecture).

Key Changes:

Makefile: The build system for Darwin (macOS) now detects the arm64 architecture and sets the appropriate compiler flags. It also adds standard Homebrew paths (/opt/homebrew/) for libraries and includes.

C & Assembly:

Corrects the linkage of assembly functions on arm64 to make them visible to the C linker.

Updates C code to handle 64-bit pointers correctly, especially for printing memory addresses.

Adjusts type definitions (_end symbol) and function calls (dlsym) for compatibility with the arm64 architecture.

@k-okada
Copy link
Member

k-okada commented Jun 27, 2025

Nice, First add the macos-x-arm64 github action, test that only this job fails, then add the patch.https://github.com/actions/runner-images/tree/main/images/macos

@iory
Copy link
Contributor Author

iory commented Jun 30, 2025

The tests passed.

Currently, the "jessie" tests are failing. This PR (#531) includes a fix to make the "jessie" tests pass. #531 merged.

Additionally, tests for Apple Silicon have been added in this PR (#530). It has been confirmed that the tests are failing on macOS 14 and 15. This PR contains fixes to ensure that the code compiles and the tests pass on macOS 14 and 15.

@iory iory force-pushed the apple-silicon branch from 2f2ae76 to c47963a Compare July 1, 2025 10:14
@iory
Copy link
Contributor Author

iory commented Jul 1, 2025

Screenshot 2025-07-01 at 19 49 12

With jskeus's patch (euslisp/jskeus#647), macos-14 and macos-15 tests passed.

@iory iory force-pushed the apple-silicon branch from c47963a to e338dea Compare July 1, 2025 10:50
@iory
Copy link
Contributor Author

iory commented Jul 1, 2025

@k-okada

We've confirmed that tests pass after applying the jskeus patch.

The commit to use the apple-silicon branch of jskeus was dropped. Therefore, currently, the macOS 14 and macOS 15 tests are failing. However, merging this PR will allow the jskeus tests to pass.

To merge this PR, we need to change the required GitHub Actions in this repository from osx to osx (macos-14) and osx (macos-15).
Please go to https://github.com/euslisp/EusLisp/settings/branches, click Edit on the master branch, and change the Status checks that are required.

@k-okada k-okada merged commit 4c4d9dd into euslisp:master Jul 1, 2025
36 of 38 checks passed
@k-okada
Copy link
Member

k-okada commented Jul 1, 2025

@iory please create new PR for typo/error to confirm new master branch works correctly

@iory
Copy link
Contributor Author

iory commented Jul 3, 2025

OK. I sent a minor bug fix PR (#532)

k-okada added a commit that referenced this pull request Sep 25, 2025
- apply patches in dfsg https://salsa.debian.org/science-team/euslisp/-/tree/debian/9.31+dfsg-1/debian/patches?ref_type=tags
	- On arm32, localtime_r in LOCALTIME in unixcall.c returns NULL in some situation (#524)
	- Fix for blhf Fix for blhc tests, we need to use default CFLAGS (#523)
	- defforeign on ppc64el is not work for float/double, skpping test for now (#525)
	- update VERSION=9.31 (#517)
	- remove link to libeus from executables, this also remove EUSLIB, which provides RPATH settings that Debian dislike. (#522)
	- use same code for every build (only common.l)  (#522)
	- Fix hardening-no-bindnow by adding DEB_BUILD_MAINT_OPTIONS = hardening=+all to rule and pass that variable to CFLAGS/SOFLAGS/LDFLAGS, use gcc for LD.  (#522)
- use termios.h, termio.h is dropped for glibc >= 2.42, fix lisp/tool/eustags.c for gcc^15 (#533)
- Fixed find symbol function by using 's' instead of 'sym' variable and added hash table size (#532)
- Support apple silicon arm architecture. Updates C code to handle 64-bit pointers correctly, especially for printing memory addresses. (#529)
- make sure to run MKDIR before compile GCCLS (#527)
- update code for gcc-15 (#521)
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.

2 participants