Skip to content

Commit

Permalink
patch apply for omnios
Browse files Browse the repository at this point in the history
  • Loading branch information
snmsts committed Sep 23, 2024
1 parent e351416 commit 8f209d3
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/solaris.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ jobs:
GH_REPO: sbcl_bin
SBCL_OPTIONS: ${{ matrix.sbcloptions }}
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SBCL_PATCH: ${{ matrix.sbclpatch }}

strategy:
fail-fast: false
matrix:
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'
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
25 changes: 25 additions & 0 deletions tools-for-build/patch/20240923_omnios
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.

0 comments on commit 8f209d3

Please sign in to comment.