diff --git a/build/illumos/build.sh b/build/illumos/build.sh index 2892dcf78b..55a3a1dd4b 100755 --- a/build/illumos/build.sh +++ b/build/illumos/build.sh @@ -113,6 +113,10 @@ build_aarch64() { PKGPUBLISHER_REDIST=$PKGPUBLISHER DMAKE_MAX_JOBS=$MJOBS PYTHON3_VERSION=$PYTHONVER + BUILDPY3b= + PYTHON3b_VERSION=3.11 + PYTHON3b_PKGVERS=-311 + PYTHON3b_SUFFIX= PERL_VERSION=$SPERLVER DTC=$OOCEBIN/dtc MKIMAGE=$OOCEOPT/u-boot/tools/mkimage @@ -126,7 +130,11 @@ build_aarch64() { # Allow dropping into the build environment with everything set up # for manual builds via '-f bldenv' if [ "$action" = bldenv ]; then - env - $env TERM=$TERM SHELL=$SHELL $bldenv + env - $env \ + TERM=$TERM \ + SHELL=$SHELL \ + HOME=`git rev-parse --show-toplevel` \ + $bldenv return fi diff --git a/build/illumos/files/aarch64.env b/build/illumos/files/aarch64.env index e3019d16ef..c151f14cd7 100755 --- a/build/illumos/files/aarch64.env +++ b/build/illumos/files/aarch64.env @@ -23,6 +23,8 @@ export ADJUNCT_PROTO=$aarch64_SYSROOT export PKGVERS_BRANCH=$ONNV_BUILDNUM.0 +export PKG_CROSS_DEPEND=${pfx%.*} + export PERL_MACH=aarch64 export PERLDIR=$aarch64_CROSS_ROOT/perl5/$PERL_VERSION export PERL_PKGVERS= diff --git a/build/python311/common.sh b/build/python311/common.sh index 2de82d8169..0e8aaccac6 100644 --- a/build/python311/common.sh +++ b/build/python311/common.sh @@ -45,5 +45,8 @@ TMPDIR+="/python$PYVER" DTMPDIR+="/python$PYVER" BASE_TMPDIR=$TMPDIR +# Use the same python version for dependency resolution +PKGDEPEND="/usr/bin/python$PYTHONVER -Es $PKGDEPEND" + # Vim hints # vim:ts=4:sw=4:et:fdm=marker diff --git a/build/python312/build.sh b/build/python312/build.sh index babc4613bb..c73aecad1c 100755 --- a/build/python312/build.sh +++ b/build/python312/build.sh @@ -56,7 +56,8 @@ set_arch 64 set_standard XPG6 # Save arguments to the stack so that the mdb/pstack plugin can find them. -CFLAGS+=" -msave-args" +CFLAGS[amd64]+=" -msave-args" +CFLAGS[aarch64]+=" -mtls-dialect=trad" export CCSHARED="-fPIC" CPPFLAGS+=" -I/usr/include/ncurses" @@ -104,11 +105,7 @@ export DTRACE_CPP=$GCCPATH/bin/cpp CURSES_CFLAGS="-DHAVE_NCURSESW -D_XOPEN_SOURCE_EXTENDED" LIBREADLINE_LIBS="-zrecord -lreadline -lncurses" -PANEL_LIBS=`pkg-config --libs panel` -export CURSES_CFLAGS LIBREADLINE_LIBS PANEL_LIBS - -#export LIBREADLINE_CFLAGS -#export CURSES_LIBS +export CURSES_CFLAGS LIBREADLINE_LIBS build_init() { typeset s=${SYSROOT[aarch64]} @@ -118,11 +115,17 @@ build_init() { } pre_configure() { + typeset arch="$1" + save_variable CC - ! cross_arch $1 && return + PKG_CONFIG_PATH="${PKG_CONFIG_PATH[$arch]}" \ + PANEL_LIBS=`pkg-config --libs panel` + export PANEL_LIBS + + ! cross_arch $arch && return - CC+=" --sysroot=${SYSROOT[$1]}" + CC+=" --sysroot=${SYSROOT[$arch]}" } post_configure() { diff --git a/build/python312/common.sh b/build/python312/common.sh index e82eb5952c..32c5b4a91e 100644 --- a/build/python312/common.sh +++ b/build/python312/common.sh @@ -45,5 +45,8 @@ TMPDIR+="/python$PYVER" DTMPDIR+="/python$PYVER" BASE_TMPDIR=$TMPDIR +# Use the same python version for dependency resolution +PKGDEPEND="/usr/bin/python$PYTHONVER -Es $PKGDEPEND" + # Vim hints # vim:ts=4:sw=4:et:fdm=marker diff --git a/build/python312/cryptography/build.sh b/build/python312/cryptography/build.sh index 8d596ee79e..7019756b02 100755 --- a/build/python312/cryptography/build.sh +++ b/build/python312/cryptography/build.sh @@ -49,8 +49,9 @@ PATH+=:$OOCEBIN # This package uses cffi as part of the build, and so the usual python cross # compilation method (using the `crossenv` module) does not work. # Somewhat surprisingly, this simple workaround does, although we have to -# use a compiler wrapper to strip the `-m64` that is otherwise picked by -# cffi from the native system info. +# use a compiler wrapper to strip options that are not applicable to +# the cross compiler and are otherwise picked by cffi from the native system +# info. python_build_aarch64() { typeset arch=aarch64 diff --git a/build/python312/cryptography/files/gcc.aarch64 b/build/python312/cryptography/files/gcc.aarch64 index b235a94e7c..ef32ffee6f 100755 --- a/build/python312/cryptography/files/gcc.aarch64 +++ b/build/python312/cryptography/files/gcc.aarch64 @@ -1,6 +1,9 @@ #!/bin/ksh -set -- `echo $@ | sed 's/-m64//g'` +set -- `echo $@ | sed ' + s/-m64//g + s/-msave-args//g + '` exec /opt/cross/aarch64/bin/gcc "$@" diff --git a/doc/baseline.aarch64 b/doc/baseline.aarch64 index fd6fd77380..65a0cfae1c 100644 --- a/doc/baseline.aarch64 +++ b/doc/baseline.aarch64 @@ -214,27 +214,49 @@ omnios library/print/open-printing omnios library/print/open-printing/ipp omnios library/print/open-printing/lpd omnios library/python-3/asn1crypto-311 +omnios library/python-3/asn1crypto-312 omnios library/python-3/attrs-311 +omnios library/python-3/attrs-312 omnios library/python-3/cffi-311 +omnios library/python-3/cffi-312 omnios library/python-3/coverage-311 +omnios library/python-3/coverage-312 omnios library/python-3/cryptography-311 +omnios library/python-3/cryptography-312 omnios library/python-3/idna-311 +omnios library/python-3/idna-312 omnios library/python-3/js-regex-311 +omnios library/python-3/js-regex-312 omnios library/python-3/jsonrpclib-311 +omnios library/python-3/jsonrpclib-312 omnios library/python-3/jsonschema-311 +omnios library/python-3/jsonschema-312 omnios library/python-3/pip-311 +omnios library/python-3/pip-312 omnios library/python-3/pycodestyle-311 +omnios library/python-3/pycodestyle-312 omnios library/python-3/pycparser-311 +omnios library/python-3/pycparser-312 omnios library/python-3/pycurl-311 +omnios library/python-3/pycurl-312 omnios library/python-3/pyopenssl-311 +omnios library/python-3/pyopenssl-312 omnios library/python-3/pyrsistent-311 +omnios library/python-3/pyrsistent-312 omnios library/python-3/pyyaml-311 +omnios library/python-3/pyyaml-312 omnios library/python-3/rapidjson-311 +omnios library/python-3/rapidjson-312 omnios library/python-3/semantic-version-311 +omnios library/python-3/semantic-version-312 omnios library/python-3/setuptools-311 +omnios library/python-3/setuptools-312 omnios library/python-3/six-311 +omnios library/python-3/six-312 omnios library/python-3/tomli-311 +omnios library/python-3/tomli-312 omnios library/python-3/typing-extensions-311 +omnios library/python-3/typing-extensions-312 omnios library/readline omnios library/security/openssl-3 omnios library/security/tcp-wrapper @@ -379,6 +401,7 @@ omnios release/notices omnios runtime/perl omnios runtime/perl/module/sun-solaris omnios runtime/python-311 +omnios runtime/python-312 omnios security/bart omnios security/sudo omnios service/fault-management @@ -512,10 +535,13 @@ omnios system/library/policykit omnios system/library/processor o omnios system/library/python/libbe-27 o omnios system/library/python/libbe-311 +omnios system/library/python/libbe-312 omnios system/library/python/solaris-27 o omnios system/library/python/solaris-311 +omnios system/library/python/solaris-312 omnios system/library/python/zfs-27 o omnios system/library/python/zfs-311 +omnios system/library/python/zfs-312 omnios system/library/security/crypto/pkcs11_kms o omnios system/library/security/gss omnios system/library/security/gss/diffie-hellman diff --git a/doc/pkglist.aarch64 b/doc/pkglist.aarch64 index 23be51194f..920da924df 100644 --- a/doc/pkglist.aarch64 +++ b/doc/pkglist.aarch64 @@ -90,6 +90,7 @@ library/mpc media/xorriso network/dns/bind runtime/python-311 +runtime/python-312 service/network/chrony shell/zsh system/library/mozilla-nss @@ -109,35 +110,57 @@ system/library/libdbus -f libsandheaders ############################################################################### .SYSROOT library/python-3/asn1crypto-311 +library/python-3/asn1crypto-312 library/python-3/attrs-311 +library/python-3/attrs-312 library/python-3/cffi-311 +library/python-3/cffi-312 library/python-3/coverage-311 +library/python-3/coverage-312 library/python-3/idna-311 +library/python-3/idna-312 library/python-3/js-regex-311 +library/python-3/js-regex-312 library/python-3/jsonrpclib-311 +library/python-3/jsonrpclib-312 library/python-3/pip-311 +library/python-3/pip-312 library/python-3/pycodestyle-311 +library/python-3/pycodestyle-312 library/python-3/pycparser-311 +library/python-3/pycparser-312 library/python-3/pycurl-311 +library/python-3/pycurl-312 library/python-3/pyrsistent-311 +library/python-3/pyrsistent-312 library/python-3/pyyaml-311 +library/python-3/pyyaml-312 library/python-3/rapidjson-311 +library/python-3/rapidjson-312 library/python-3/semantic-version-311 +library/python-3/semantic-version-312 library/python-3/setuptools-311 +library/python-3/setuptools-312 library/python-3/six-311 +library/python-3/six-312 library/python-3/tomli-311 +library/python-3/tomli-312 library/python-3/typing-extensions-311 +library/python-3/typing-extensions-312 system/library/dbus system/library/libdbus-glib system/library/pcap ############################################################################### .SYSROOT library/python-3/cryptography-311 +library/python-3/cryptography-312 library/python-3/jsonschema-311 +library/python-3/jsonschema-312 system/management/snmp/net-snmp ############################################################################### .SYSROOT library/python-3/pyopenssl-311 +library/python-3/pyopenssl-312 ############################################################################### .SYSROOT illumos-gate diff --git a/lib/functions.sh b/lib/functions.sh index 8a6f166af1..6c353dbe67 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -3044,9 +3044,12 @@ python_cross_setup() { # Prepare a cross compilation environment logmsg "--- Preparing cross compilation environment" set_crossgcc $arch - logcmd $PYTHON -mcrossenv ${SYSROOT[$arch]}$PYTHON $TMPDIR/venv \ + logcmd $PYTHON -mcrossenv -vvv \ + ${SYSROOT[$arch]}$PYTHON \ + $TMPDIR/venv \ || logerr "Failed to set up crossenv" source $TMPDIR/venv/bin/activate + logcmd $TMPDIR/venv/cross/bin/pip3 install setuptools } python_build_aarch64() {