diff --git a/.github/workflows/solaris.yml b/.github/workflows/solaris.yml index f24a86c..0061127 100644 --- a/.github/workflows/solaris.yml +++ b/.github/workflows/solaris.yml @@ -19,6 +19,7 @@ jobs: GH_REPO: sbcl_bin SBCL_OPTIONS: ${{ matrix.sbcloptions }} GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SBCL_PATCH: ${{ matrix.sbclpatch }} strategy: fail-fast: false @@ -26,6 +27,7 @@ jobs: suffix: [''] target: ['x86-64', 'x86'] sbcloptions: ['--without-sb-thread --with-sb-core-compression --with-sb-xref-for-internals --with-sb-after-xc-core', '--fancy'] + sbclpatch: ['20240923_omnios',''] include: # default lisp used is sbcl-bin/2.4.8 - lisp: 'sbcl-bin/2.4.8' diff --git a/Makefile b/Makefile index a44c478..8fd7aba 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ ARCH ?= $(shell ros build.ros uname) SUFFIX ?= TARGETS ?=$(ARCH) SBCL_OPTIONS ?=--fancy +SBCL_PATCH ?= LISP_IMPL ?= ros -L sbcl-bin without-roswell=t --no-rc run DOCKER_REPO ?= docker.pkg.github.com/roswell/sbcl_bin @@ -63,6 +64,9 @@ show: cc -print-search-dirs || true sbcl: git clone --depth 5 https://github.com/sbcl/sbcl --branch=$(BRANCH) + @if [ -n "$(SBCL_PATCH)" ]; then\ + SBCL_PATCH="$(SBCL_PATCH)" $(MAKE) patch-sbcl; \ + fi zstd: git clone --depth 5 https://github.com/facebook/zstd --branch=$(ZSTD_BRANCH) @@ -133,3 +137,7 @@ precompile-freebsd: postcompile-freebsd: mv /tmp/libzstd.so* /usr/local/lib + +patch-sbcl: + @# space spearated designation SBCL_PATCH="20240923_omnios 20240918_netbsdarm64-core-compression" + ARR=($(SBCL_PATCH)); for S in "$${ARR[@]}"; do bash -c "cd sbcl;git apply ../tools-for-build/patch/$$S"; done diff --git a/tools-for-build/patch/20240923_omnios b/tools-for-build/patch/20240923_omnios new file mode 100644 index 0000000..1816388 --- /dev/null +++ b/tools-for-build/patch/20240923_omnios @@ -0,0 +1,25 @@ +diff --git a/src/runtime/Config.x86-64-sunos b/src/runtime/Config.x86-64-sunos +index 9a8b621..091a2f3 100644 +--- a/src/runtime/Config.x86-64-sunos ++++ b/src/runtime/Config.x86-64-sunos +@@ -1,5 +1,5 @@ + CC=gcc +-CFLAGS += -m64 -g -Wall -std=gnu89 -D__EXTENSIONS__ -DSVR4 -D_REENTRANT -fno-omit-frame-pointer ++CFLAGS += -m64 -g -Wall -std=gnu89 -D__EXTENSIONS__ -DSVR4 -D_REENTRANT -fno-omit-frame-pointer -D_POSIX_PTHREAD_SEMANTICS + LINKFLAGS = -m64 -g + ASFLAGS = -m64 -Wall + GREP = ggrep +diff --git a/src/runtime/Config.x86-sunos b/src/runtime/Config.x86-sunos +index b83c948..10635d1 100644 +--- a/src/runtime/Config.x86-sunos ++++ b/src/runtime/Config.x86-sunos +@@ -10,7 +10,8 @@ + # files for more information. + + CC=gcc +-CFLAGS += -g -O2 -Wall -D__EXTENSIONS__ -DSVR4 -D_REENTRANT -fno-omit-frame-pointer ++CFLAGS += -g -O2 -Wall -D__EXTENSIONS__ -DSVR4 -D_REENTRANT -fno-omit-frame-pointer -D_POSIX_PTHREAD_SEMANTICS -m32 ++LINKFLAGS += -m32 + GREP = ggrep + + ASSEM_SRC = x86-assem.S diff --git a/patch/darwin-1.3.15-16 b/tools-for-build/patch/darwin-1.3.15-16 similarity index 100% rename from patch/darwin-1.3.15-16 rename to tools-for-build/patch/darwin-1.3.15-16 diff --git a/patch/win32-posixwait b/tools-for-build/patch/win32-posixwait similarity index 100% rename from patch/win32-posixwait rename to tools-for-build/patch/win32-posixwait