Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,18 @@ jobs:
exit 0"

osx:
runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
strategy:
matrix:
include:
# https://github.com/actions/runner-images/tree/main/images/macos
# Note: To test macOS-x with Intel architecture,
# you need to use the paid macOS-x-large runner, as macOS-x is grouped with ARM-based runners.
# https://docs.github.com/en/actions/concepts/runners/about-larger-runners
- runs-on: macos-13 # Intel (x64)
- runs-on: macos-14 # ARM64 (Apple Silicon)
- runs-on: macos-15 # ARM64 (Apple Silicon)
fail-fast: false
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 60
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew list mesalib-glw &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install mesalib-glw
brew list mesa-glu &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install mesa-glu
brew list bullet &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install bullet
brew list xquartz &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install xquartz
travis_time_end

fi
Expand Down
10 changes: 8 additions & 2 deletions lisp/Makefile.Darwin
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ endif

# Pentium's arch returns 'i586', which is ignored by conditionals in c/*.[ch].
OS_VERSION=$(shell sw_vers -productVersion | sed s/\.[^.]*$$//)
UNAME_MACHINE=$(shell uname -m)
ifeq ($(OS_VERSION), 10.5)
MACHINE=i386
else
MACHINE=x86_64
ALIGN_FUNCTIONS=-falign-functions=8 -fPIC
ifeq ($(UNAME_MACHINE), arm64)
MACHINE=aarch64
ALIGN_FUNCTIONS=-falign-functions=8 -fPIC
else
MACHINE=x86_64
ALIGN_FUNCTIONS=-falign-functions=8 -fPIC
endif
endif
DEBUG= -g

Expand Down
2 changes: 1 addition & 1 deletion lisp/c/eus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ char *argv[];
unsigned char *m;

#ifdef Darwin
_end = sbrk(0);
_end = (int)(intptr_t)sbrk(0);
#endif

mypid=getpid();
Expand Down
24 changes: 16 additions & 8 deletions lisp/c/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,11 @@ __asm__ (".align 8\n"

#if aarch64
__asm__ (".align 8\n"
#if Darwin
"_exec_function_i:\n\t"
#else
"exec_function_i:\n\t"
#endif
"sub sp, sp, #192\n\t" // 128(8x16) + 64
"stp x29, x30, [sp, 128]\n\t"
"add x29, sp, 128\n\t"
Expand All @@ -726,18 +730,18 @@ __asm__ (".align 8\n"
// vargv -> stack
"mov x1, 0\n\t"
"ldr x2, [x29, 24]\n\t"
"b .FUNCII_LPCK\n\t"
".FUNCII_LP:\n\t"
"b 1f\n\t"
"2:\n\t"
"lsl x0, x1, 3\n\t"
"add x3, x2, x0\n\t" // vargv[i]
"add x4, sp, x0\n\t" // stack[i]
"ldr x0, [x3]\n\t"
"str x0, [x4]\n\t" // push stack
"add x1, x1, 1\n\t"
".FUNCII_LPCK:\n\t"
"1:\n\t"
"ldr x5, [x29, 32]\n\t"
"cmp x1, x5\n\t"
"blt .FUNCII_LP\n\t"
"blt 2b\n\t"
// fargv -> register
"ldr x0, [x29, 40]\n\t" // fargv
"ldr d0, [x0]\n\t"
Expand Down Expand Up @@ -782,7 +786,11 @@ __asm__ (".align 8\n"
);

__asm__ (".align 8\n"
#if Darwin
"_exec_function_f:\n\t"
#else
"exec_function_f:\n\t"
#endif
"sub sp, sp, #192\n\t" // 128(8x16) + 64
"stp x29, x30, [sp, 128]\n\t"
"add x29, sp, 128\n\t"
Expand All @@ -794,18 +802,18 @@ __asm__ (".align 8\n"
// vargv -> stack
"mov x1, 0\n\t"
"ldr x2, [x29, 24]\n\t"
"b .FUNCFF_LPCK\n\t"
".FUNCFF_LP:\n\t"
"b 3f\n\t"
"4:\n\t"
"lsl x0, x1, 3\n\t"
"add x3, x2, x0\n\t" // vargv[i]
"add x4, sp, x0\n\t" // stack[i]
"ldr x0, [x3]\n\t"
"str x0, [x4]\n\t" // push stack
"add x1, x1, 1\n\t"
".FUNCFF_LPCK:\n\t"
"3:\n\t"
"ldr x5, [x29, 32]\n\t"
"cmp x1, x5\n\t"
"blt .FUNCFF_LP\n\t"
"blt 4b\n\t"
// fargv -> register
"ldr x0, [x29, 40]\n\t" // fargv
"ldr d0, [x0]\n\t"
Expand Down
6 changes: 3 additions & 3 deletions lisp/c/printer.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ context *ctx;
writestr(f,(byte *)"#<",2);
printsym(ctx,class->c.cls.name,f);
writech(f,' ');
printhex(obj,f);
printhex((int)(intptr_t)obj,f);
writech(f,'>');}

static void printpkg(p,f)
Expand Down Expand Up @@ -359,7 +359,7 @@ int prlevel;
break;
case ELM_BYTE:
writestr(f,(byte *)"#<bytecode ",11);
printhex(vec,f);
printhex((int)(intptr_t)vec,f);
writech(f,'>');
break;
case ELM_CHAR:
Expand All @@ -385,7 +385,7 @@ int prlevel;
break;
case ELM_FOREIGN:
writestr(f,(byte *)"#u",2);
printstr(ctx,vecsize(vec),vec->c.ivec.iv[0],f);
printstr(ctx,vecsize(vec),(byte *)vec->c.ivec.iv[0],f);
break;
default:
if (classof(vec)==C_VECTOR) writestr(f,(byte *)"#(",2);
Expand Down
4 changes: 2 additions & 2 deletions lisp/image/jpeg/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ else
CC += -fPIC
endif
ifeq ($(ARCHDIR), Darwin)
CC += -I/opt/local/lib/jpeg6b/include -I/opt/local/include
LD += -L/opt/local/lib/jpeg6b/lib -L/opt/local/lib
CC += -I/opt/local/lib/jpeg6b/include -I/opt/local/include -I/opt/homebrew/include
LD += -L/opt/local/lib/jpeg6b/lib -L/opt/local/lib -L/opt/homebrew/lib
endif
ifeq ($(ARCHDIR), LinuxARM)
CC += -fPIC
Expand Down
6 changes: 3 additions & 3 deletions lisp/opengl/src/oglforeign.c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ char *xentry;
entry=(eusinteger_t)dlsym((eusinteger_t)dlhandle, xentry);
if ( !entry ) {
dlhandle=(eusinteger_t)dlopen("cygGLU-1.dll", RTLD_LAZY);
entry=(eusinteger_t)dlsym(dlhandle, xentry);}
entry=(eusinteger_t)dlsym((void *)dlhandle, xentry);}
if ( !entry ) {
dlhandle=(eusinteger_t)dlopen(0, RTLD_LAZY);
entry=(eusinteger_t)dlsym(dlhandle, xentry);}
entry=(eusinteger_t)dlsym((void *)dlhandle, xentry);}
#elif Darwin
eusinteger_t dlhandle;
dlhandle=(eusinteger_t)dlopen(0, RTLD_LAZY);
entry=(eusinteger_t)dlsym(dlhandle, xentry);
entry=(eusinteger_t)dlsym((void *)dlhandle, xentry);
#else
#if (WORD_SIZE == 64)
entry=(eusinteger_t)dlsym((void *)((eusinteger_t)(sysmod->c.ldmod.handle) & ~3L), xentry);
Expand Down
4 changes: 2 additions & 2 deletions lisp/xwindow/xforeign.c.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,15 @@ char *xentry;
dlhandle=(eusinteger_t)dlopen("/usr/bin/cygX11-6.dll", RTLD_LAZY);
if( dlhandle==0 )
dlhandle=(eusinteger_t)dlopen("libX11.dll", RTLD_LAZY);
entry=(eusinteger_t)dlsym(dlhandle, xentry);
entry=(eusinteger_t)dlsym((void *)dlhandle, xentry);
#elif Darwin
eusinteger_t dlhandle;
dlhandle=(eusinteger_t)dlopen("/opt/X11/lib/libX11.dylib", RTLD_LAZY);
if( dlhandle==0 )
dlhandle=(eusinteger_t)dlopen("/usr/local/lib/libX11.dylib", RTLD_LAZY);
if( dlhandle==0 )
dlhandle=(eusinteger_t)dlopen("libX11.dylib", RTLD_LAZY);
entry=(eusinteger_t)dlsym(dlhandle, xentry);
entry=(eusinteger_t)dlsym((void *)dlhandle, xentry);
#else
entry=(eusinteger_t)dlsym((void *)((eusinteger_t)(sysmod->c.ldmod.handle) & ~3), xentry);
#endif
Expand Down
Loading