Skip to content

Commit b5bf099

Browse files
authored
Merge pull request #1516 from hadfl/aarch64_cmake
aarch64: build cmake
2 parents b123ad4 + 9bea649 commit b5bf099

File tree

5 files changed

+38
-7
lines changed

5 files changed

+38
-7
lines changed

build/cmake/build.sh

+26-6
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,38 @@ set_clangver
2828

2929
SKIP_LICENCES=Kitware
3030

31-
MAKE=$NINJA
31+
XFORM_ARGS="-DPREFIX=${PREFIX#/}"
3232

33-
CONFIGURE_OPTS[amd64]="
34-
--prefix=$PREFIX
35-
--generator=Ninja
36-
--system-curl
33+
CONFIGURE_OPTS="
34+
-DCMAKE_BUILD_TYPE=Release
35+
-DCMAKE_INSTALL_PREFIX=$PREFIX
36+
-DCMAKE_USE_SYSTEM_BZIP2=ON
37+
-DCMAKE_USE_SYSTEM_CURL=ON
38+
-DCMAKE_USE_SYSTEM_EXPAT=ON
39+
-DCMAKE_USE_SYSTEM_LIBLZMA=ON
40+
-DCMAKE_USE_SYSTEM_LIBUV=ON
41+
-DCMAKE_USE_SYSTEM_ZLIB=ON
42+
-DCMAKE_USE_SYSTEM_ZSTD=ON
3743
"
44+
CONFIGURE_OPTS[amd64]=
45+
CONFIGURE_OPTS[aarch64]=
46+
47+
pre_configure() {
48+
typeset arch=$1
49+
50+
! cross_arch $arch && return
51+
52+
# setting CMAKE_SYSTEM_NAME will set the internal `CMAKE_CROSSCOMPILING`
53+
# to true; this prevents it from using the cross-compiled cmake for install
54+
CONFIGURE_OPTS[$arch]+=" -DBUILD_CursesDialog=ON -DCMAKE_SYSTEM_NAME=SunOS"
55+
56+
LDFLAGS[$arch]+=" -R$PREFIX/${LIBDIRS[$arch]}"
57+
}
3858

3959
init
4060
download_source $PROG $PROG $VER
4161
patch_source
42-
prep_build autoconf-like
62+
prep_build cmake+ninja
4363
build
4464
make_package
4565
clean_up

build/cmake/local.mog

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
# source. A copy of the CDDL is also available via the Internet at
99
# http://www.illumos.org/license/CDDL.
1010

11-
# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
11+
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
1212

1313
license Copyright.txt license=Kitware
1414

15+
# cmake will use lib/64 instead of lib/amd64 but does not ship libraries
16+
# itself. which will lead to a require-any dependency of packages that ship
17+
# the 64 -> amd64 symlink.
18+
$(i386_ONLY)link path=$(PREFIX)/lib/64 target=amd64
19+

build/ldns/build.sh

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ CONFIGURE_OPTS[aarch64]+="
5050
--with-examples
5151
"
5252

53+
# Building in parallel produces occasional bad objects that then fail the
54+
# linking stage. This needs investigation but disable parallelism for now.
55+
NO_PARALLEL_MAKE=1
56+
5357
# The 'distclean' target clobbers too much including 'configure'
5458
make_clean() {
5559
logcmd $MAKE clean

doc/baseline.aarch64

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extra.omnios ooce/database/mariadb-106
1010
extra.omnios ooce/database/mariadb-common
1111
extra.omnios ooce/database/postgresql-14
1212
extra.omnios ooce/database/postgresql-common
13+
extra.omnios ooce/developer/cmake
1314
extra.omnios ooce/developer/git-absorb
1415
extra.omnios ooce/developer/ninja
1516
extra.omnios ooce/editor/joe

doc/pkglist.aarch64

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ ooce/util/jq
8989
ooce/security/minisign
9090
ooce/application/links
9191
ooce/database/mariadb-106
92+
ooce/developer/cmake
9293
###############################################################################
9394
.SYSROOT
9495
ooce/network/unbound

0 commit comments

Comments
 (0)