From 9e0613b97d4e452396708a041806ac4f9524b44d Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sat, 14 Dec 2024 15:33:15 +0000 Subject: [PATCH 1/4] aarch64: update gcc to 14 --- build/gcc-runtime/build-runtime++.sh | 3 +++ build/gcc-runtime/build-runtime.sh | 3 +++ build/gcc-runtime/common.sh | 2 +- build/{gcc10 => gcc14}/build-arch-aarch64.sh | 8 ++++---- build/gcc14/build.sh | 1 + doc/baseline.aarch64 | 2 +- doc/pkglist.aarch64 | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) rename build/{gcc10 => gcc14}/build-arch-aarch64.sh (95%) diff --git a/build/gcc-runtime/build-runtime++.sh b/build/gcc-runtime/build-runtime++.sh index 34b5febaf7..5acb032a87 100755 --- a/build/gcc-runtime/build-runtime++.sh +++ b/build/gcc-runtime/build-runtime++.sh @@ -35,6 +35,9 @@ if is_cross; then NO_SONAME_EXPECTED=1 pushd $DESTDIR.$BUILDARCH >/dev/null mkdir -p usr/lib + for v in 10; do + install_lib $v "$libs" "" "${SYSROOT[$BUILDARCH]}/usr/gcc/$v/lib" + done install_lib $CROSS_GCC_VER "$libs" "" $CROSSLIB install_unversioned $CROSS_GCC_VER "$libs" "" $CROSSLIB popd >/dev/null diff --git a/build/gcc-runtime/build-runtime.sh b/build/gcc-runtime/build-runtime.sh index 87371bfafa..fdec72f33f 100755 --- a/build/gcc-runtime/build-runtime.sh +++ b/build/gcc-runtime/build-runtime.sh @@ -37,6 +37,9 @@ if is_cross; then NO_SONAME_EXPECTED=1 pushd $DESTDIR.$BUILDARCH >/dev/null logcmd mkdir -p usr/lib + for v in 10; do + install_lib $v "$libs" "" "${SYSROOT[$BUILDARCH]}/usr/gcc/$v/lib" + done install_lib $CROSS_GCC_VER "$libs" "" $CROSSLIB install_unversioned $CROSS_GCC_VER "$libs" "" $CROSSLIB popd >/dev/null diff --git a/build/gcc-runtime/common.sh b/build/gcc-runtime/common.sh index 7d38148fc4..88de4e0dea 100644 --- a/build/gcc-runtime/common.sh +++ b/build/gcc-runtime/common.sh @@ -15,7 +15,7 @@ pth= max=0 CROSSLIB=$CROSSTOOLS/$BUILDARCH/${TRIPLETS[$BUILDARCH]}/lib -CROSS_GCC_VER=10 +CROSS_GCC_VER=14 # Find the library file in the specified gcc version function find_lib { diff --git a/build/gcc10/build-arch-aarch64.sh b/build/gcc14/build-arch-aarch64.sh similarity index 95% rename from build/gcc10/build-arch-aarch64.sh rename to build/gcc14/build-arch-aarch64.sh index 301e8902e2..14479fbf73 100755 --- a/build/gcc10/build-arch-aarch64.sh +++ b/build/gcc14/build-arch-aarch64.sh @@ -13,14 +13,14 @@ # }}} # # Copyright 2014 OmniTI Computer Consulting, Inc. All rights reserved. -# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. # Copyright 2023 Richard Lowe . ../../lib/build.sh -PKG=developer/gcc10 +PKG=developer/gcc14 PROG=gcc -VER=10.4.0 +VER=14.2.0 ILVER=il-1 SUMMARY="gcc $VER-$ILVER" DESC="The GNU Compiler Collection" @@ -32,7 +32,7 @@ ARCH=aarch64 GCCMAJOR=${VER%%.*} OPT=/opt/gcc-$GCCMAJOR -XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=${OPT#/} -D GCCVER=$VER" +XFORM_ARGS="-D MAJOR=$GCCMAJOR -D OPT=${OPT#/} -D GCCVER=$VER -D TRIPLET=$ARCH" BMI_EXPECTED=1 NO_SONAME_EXPECTED=1 diff --git a/build/gcc14/build.sh b/build/gcc14/build.sh index 7839bb15c0..2623381d91 100755 --- a/build/gcc14/build.sh +++ b/build/gcc14/build.sh @@ -15,6 +15,7 @@ # Copyright 2014 OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2024 OmniOS Community Edition (OmniOSce) Association. +. ../../lib/arch.sh . ../../lib/build.sh PKG=developer/gcc14 diff --git a/doc/baseline.aarch64 b/doc/baseline.aarch64 index 4c605d0663..15e3eb99ff 100644 --- a/doc/baseline.aarch64 +++ b/doc/baseline.aarch64 @@ -36,7 +36,7 @@ omnios developer/debug/mdb/module/module-fibre-channel omnios developer/driver/ftsafe omnios developer/dtrace omnios developer/exuberant-ctags -omnios developer/gcc10 +omnios developer/gcc14 omnios developer/gnu-binutils omnios developer/lexer/flex omnios developer/library/lint o diff --git a/doc/pkglist.aarch64 b/doc/pkglist.aarch64 index 13d5aa9c9b..5ecf6ae75b 100644 --- a/doc/pkglist.aarch64 +++ b/doc/pkglist.aarch64 @@ -105,7 +105,7 @@ web/wget web/wget2 ############################################################################### .SYSROOT -developer/gcc10 +developer/gcc14 developer/gnu-binutils developer/versioning/git system/library/libdbus -f libsandheaders From 4b220ca93b31c527dd5a4a6c97d7bf6c8729e89e Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sat, 14 Dec 2024 15:35:22 +0000 Subject: [PATCH 2/4] aarch64: fix binutils aarch64 cross-build --- build/binutils/build-arch-aarch64.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/binutils/build-arch-aarch64.sh b/build/binutils/build-arch-aarch64.sh index 259665d1af..3ca2eafea7 100755 --- a/build/binutils/build-arch-aarch64.sh +++ b/build/binutils/build-arch-aarch64.sh @@ -32,6 +32,8 @@ ARCH=aarch64 [ "$CLIBUILDARCH" = $ARCH ] || logerr "Incorrect arch selected, use -a $ARCH" set_arch 64 +# Needed for X/Open curses/termcap +set_standard -xcurses XPG6 CFLAGS set_patchdir patches.$ARCH CTF_FLAGS+=" -s" From ee0b9939446fd25222d7a51720e41538af33a4d9 Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sat, 14 Dec 2024 15:35:47 +0000 Subject: [PATCH 3/4] aarch64: build illumos with gcc14 --- build/illumos/files/aarch64.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/illumos/files/aarch64.env b/build/illumos/files/aarch64.env index c151f14cd7..561e80820d 100755 --- a/build/illumos/files/aarch64.env +++ b/build/illumos/files/aarch64.env @@ -12,8 +12,8 @@ export aarch64_CROSS_ROOT=/opt/cross/aarch64 pfx=aarch64-unknown-solaris2.11 export aarch64_GNUC_ROOT=$aarch64_CROSS_ROOT -export aarch64_PRIMARY_CC=gcc10,$aarch64_GNUC_ROOT/bin/$pfx-gcc,gnu -export aarch64_PRIMARY_CCC=gcc10,$aarch64_GNUC_ROOT/bin/$pfx-g++,gnu +export aarch64_PRIMARY_CC=gcc14,$aarch64_GNUC_ROOT/bin/$pfx-gcc,gnu +export aarch64_PRIMARY_CCC=gcc14,$aarch64_GNUC_ROOT/bin/$pfx-g++,gnu export GLD=$aarch64_CROSS_ROOT/bin/$pfx-ld export OBJCOPY=$aarch64_CROSS_ROOT/bin/$pfx-objcopy From 64a098cb83817f284db480f81e2d292c5183d983 Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sat, 14 Dec 2024 15:36:12 +0000 Subject: [PATCH 4/4] aarch64: fix openssh aarch64 cross-build --- .../0013-Solaris-Auditing-support.patch | 2 +- build/openssh/patches/gcc14.patch | 19 +++++++++++++++++++ build/openssh/patches/series.aarch64 | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 build/openssh/patches/gcc14.patch diff --git a/build/openssh/patches/0013-Solaris-Auditing-support.patch b/build/openssh/patches/0013-Solaris-Auditing-support.patch index 1d25c98bfc..48299c6b6d 100644 --- a/build/openssh/patches/0013-Solaris-Auditing-support.patch +++ b/build/openssh/patches/0013-Solaris-Auditing-support.patch @@ -33,7 +33,7 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/INSTALL a/INSTALL diff -wpruN --no-dereference '--exclude=*.orig' a~/Makefile.in a/Makefile.in --- a~/Makefile.in 1970-01-01 00:00:00 +++ a/Makefile.in 1970-01-01 00:00:00 -@@ -128,7 +128,7 @@ SSHDOBJS=sshd.o \ +@@ -127,7 +127,7 @@ SSHDOBJS=sshd.o \ $(SKOBJS) SSHD_SESSION_OBJS=sshd-session.o auth-rhosts.o auth-passwd.o \ diff --git a/build/openssh/patches/gcc14.patch b/build/openssh/patches/gcc14.patch new file mode 100644 index 0000000000..160448c745 --- /dev/null +++ b/build/openssh/patches/gcc14.patch @@ -0,0 +1,19 @@ +diff -wpruN --no-dereference '--exclude=*.orig' a~/audit-solaris.c a/audit-solaris.c +--- a~/audit-solaris.c 1970-01-01 00:00:00 ++++ a/audit-solaris.c 1970-01-01 00:00:00 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -49,7 +50,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/build/openssh/patches/series.aarch64 b/build/openssh/patches/series.aarch64 index b1085f35f9..dd4f7a4e31 100644 --- a/build/openssh/patches/series.aarch64 +++ b/build/openssh/patches/series.aarch64 @@ -18,3 +18,5 @@ sshd_config.patch 0029-Accept-LANG-and-LC_-environment-variables-from-clien.patch 0031-Restore-tcpwrappers-libwrap-support.patch test.patch +pam-illumos.patch +gcc14.patch