Skip to content

Commit 2fc512c

Browse files
committed
feat: Finish solaris_ci_build_changes
Pulling in the changes made in meson build files to solve the solaris linking issues. the stack protector option in GCC was not working as expected with solaris, but worked in illumos. The solution was to disable it for solaris and leave it for illumos. This seems to be working and errors on the side of not using it purely for compatibility purposes. It needs meson 1.2.0 or higher to properly detect the difference between the systems, but the way it is written preserves compatibility with older versions
2 parents 6622b4e + 78e0f33 commit 2fc512c

File tree

8 files changed

+431
-27
lines changed

8 files changed

+431
-27
lines changed

.github/workflows/vmactions.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,28 @@ jobs:
3030
3131
# builds but fails to link due to __stack_chk_fail and __stack_chk_guard being undefined.
3232
# TODO: Figure out which flags to change in meson build scripts to resolve this. use .kernel() == solaris vs .kernel() == illumos
33-
# solaris:
34-
# runs-on: ubuntu-latest
35-
# name: Build openSeaChest for Solaris
36-
# steps:
37-
# - uses: actions/checkout@v4
38-
# with:
39-
# submodules: recursive
40-
# - name: Build openSeaChest for Solaris
41-
# id: sol
42-
# uses: vmactions/solaris-vm@v1
43-
# with:
44-
# release: "11.4-gcc"
45-
# usesh: true
46-
# prepare: |
47-
# pkgutil -y -i socat
33+
solaris:
34+
runs-on: ubuntu-latest
35+
name: Build openSeaChest for Solaris
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
submodules: recursive
40+
- name: Build openSeaChest for Solaris
41+
id: sol
42+
uses: vmactions/solaris-vm@v1
43+
with:
44+
release: "11.4-gcc"
45+
usesh: true
46+
prepare: |
47+
pkgutil -y -i socat
4848
49-
# run: |
50-
# pkg update
51-
# pkg install developer/build/meson
49+
run: |
50+
pkg update
51+
pkg install developer/build/meson
5252
53-
# meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ --buildtype=release
54-
# meson install -C build
53+
meson setup build -Dprefix=/ -Dmandir=/man -Dbindir=/ --buildtype=release
54+
meson install -C build
5555
5656
freebsd:
5757
runs-on: ubuntu-latest

meson.build

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ if c.get_id().contains('gcc') or c.get_id().contains('clang')
4444
'-Wimplicit-fallthrough',
4545
'-D_GLIBCXX_ASSERTIONS',
4646
'-fstrict-flex-arrays=1', #NOTE: Using level 1 since Windows often uses [1] at the end of it's structures. opensea-*libs has used this in a few places too.
47-
'-fstack-protector-strong',
4847
'-fno-delete-null-pointer-checks',
4948
'-fno-strict-overflow',
5049
'-fno-strict-aliasing',
@@ -83,6 +82,19 @@ if c.get_id().contains('gcc') or c.get_id().contains('clang')
8382
warning_flags += '-Wsign-conversion'
8483
endif
8584

85+
if target_machine.system() != 'sunos'
86+
warning_flags += '-fstack-protector-strong'
87+
else
88+
#Illumos will support this, but solaris will not due to library differences in the systems
89+
if meson.version().version_compare('>=1.2.0')
90+
if target_machine.kernel() == 'illumos'
91+
warning_flags += '-fstack-protector-strong'
92+
endif
93+
else
94+
# TODO: Backup method to detect illumos vs solaris
95+
endif
96+
endif
97+
8698
if c.get_id().contains('gcc') and target_machine.system() == 'windows'
8799
#According to the link below, this is not needed in Windows...it also causes a bug in some versions of GCC for Windows.
88100
#https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458

src/EULA.c

Lines changed: 393 additions & 1 deletion
Large diffs are not rendered by default.

subprojects/opensea-common

subprojects/wingetopt

utils/C/openSeaChest/openSeaChest_PassthroughTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6761,7 +6761,7 @@ static eReturnValues scsi_Read_Check(tDevice* device,
67616761
else if (!zeroLengthTransfers)
67626762
{
67636763
set_Console_Colors(true, NOTE_COLOR);
6764-
printf("NOTE: Skipping testing for zero length transfers. This test should be done for highest compatibilty "
6764+
printf("NOTE: Skipping testing for zero length transfers. This test should be done for highest compatibility "
67656765
"testing!\n");
67666766
set_Console_Colors(true, CONSOLE_COLOR_DEFAULT);
67676767
}

0 commit comments

Comments
 (0)