Selaa lähdekoodia

Merge topic 'rel-sunos' into release-4.0

5dd973f900 ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries
fd1907e50e Utilities/Release: Convert base images to build sunos-{x86_64,sparc64}

Acked-by: Kitware Robot <[email protected]>
Merge-request: !10401
Brad King 9 kuukautta sitten
vanhempi
sitoutus
39d0fd2203

+ 10 - 10
.gitlab-ci.yml

@@ -830,10 +830,10 @@ u:linux-aarch64-package:
     needs:
         - b:linux-aarch64-package
 
-b:sunos-i386-package:
+b:sunos-x86_64-package:
     extends:
         - .sunos_package
-        - .sunos_release_i386
+        - .sunos_release_x86_64
         - .cmake_build_sunos_release
         - .cmake_release_artifacts
         - .linux_x86_64_tags
@@ -841,19 +841,19 @@ b:sunos-i386-package:
     needs:
         - p:doc-package
     variables:
-        CMAKE_CI_ARTIFACTS_NAME: "artifacts-sunos-i386"
+        CMAKE_CI_ARTIFACTS_NAME: "artifacts-sunos-x86_64"
 
-u:sunos-i386-package:
+u:sunos-x86_64-package:
     extends:
         - .rsync_upload_package
         - .run_only_for_package
     needs:
-        - b:sunos-i386-package
+        - b:sunos-x86_64-package
 
-b:sunos-sparc-package:
+b:sunos-sparc64-package:
     extends:
         - .sunos_package
-        - .sunos_release_sparc
+        - .sunos_release_sparc64
         - .cmake_build_sunos_release
         - .cmake_release_artifacts
         - .linux_x86_64_tags
@@ -861,14 +861,14 @@ b:sunos-sparc-package:
     needs:
         - p:doc-package
     variables:
-        CMAKE_CI_ARTIFACTS_NAME: "artifacts-sunos-sparc"
+        CMAKE_CI_ARTIFACTS_NAME: "artifacts-sunos-sparc64"
 
-u:sunos-sparc-package:
+u:sunos-sparc64-package:
     extends:
         - .rsync_upload_package
         - .run_only_for_package
     needs:
-        - b:sunos-sparc-package
+        - b:sunos-sparc64-package
 
 ## Sanitizer builds
 

+ 2 - 2
.gitlab/artifacts.yml

@@ -78,8 +78,8 @@
             - ${CMAKE_CI_BUILD_DIR}/cmake-*-linux-x86_64.*
             - ${CMAKE_CI_BUILD_DIR}/cmake-*-linux-aarch64.*
             - ${CMAKE_CI_BUILD_DIR}/cmake-*-macos*-universal.*
-            - ${CMAKE_CI_BUILD_DIR}/cmake-*-sunos-i386.*
-            - ${CMAKE_CI_BUILD_DIR}/cmake-*-sunos-sparc.*
+            - ${CMAKE_CI_BUILD_DIR}/cmake-*-sunos-x86_64.*
+            - ${CMAKE_CI_BUILD_DIR}/cmake-*-sunos-sparc64.*
             - ${CMAKE_CI_BUILD_DIR}/cmake-*-windows-x86_64.*
             - ${CMAKE_CI_BUILD_DIR}/cmake-*-windows-i386.*
             - ${CMAKE_CI_BUILD_DIR}/cmake-*-windows-arm64.*

+ 6 - 6
.gitlab/os-linux.yml

@@ -30,19 +30,19 @@
     variables:
         BOOTSTRAP_ARGS: '-- "-DCMake_DOC_ARTIFACT_PREFIX=$CI_PROJECT_DIR/build/install-doc"'
 
-.sunos_release_i386:
-    image: "kitware/cmake:build-sunos-i386-deps-2025-02-14"
+.sunos_release_x86_64:
+    image: "kitware/cmake:build-sunos-x86_64-deps-2025-02-27"
 
     variables:
         GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
-        CMAKE_ARCH: i386
+        CMAKE_ARCH: x86_64
 
-.sunos_release_sparc:
-    image: "kitware/cmake:build-sunos-sparc-deps-2025-02-14"
+.sunos_release_sparc64:
+    image: "kitware/cmake:build-sunos-sparc64-deps-2025-02-27"
 
     variables:
         GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
-        CMAKE_ARCH: sparc
+        CMAKE_ARCH: sparc64
 
 .sunos_package:
     variables:

+ 1 - 1
Help/release/4.0.rst

@@ -239,7 +239,7 @@ Other Changes
   or ``TRACE`` via the   :option:`cmake --log-level` option or the
   :variable:`CMAKE_MESSAGE_LOG_LEVEL` cache variable.
 
-* Precompiled SunOS ``sparc`` and ``i386`` binaries are now provided
+* Precompiled SunOS ``sparc64`` and ``x86_64`` binaries are now provided
   on `cmake.org`_.
 
 .. _`cmake.org`: https://cmake.org/download/

+ 1 - 1
Source/CMakeLists.txt

@@ -1030,7 +1030,7 @@ if(WIN32 AND NOT CYGWIN)
   list(APPEND _tools cmcldeps)
 endif()
 
-if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION STREQUAL "5.10" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
+if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION STREQUAL "5.10" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(i386|x86_64)$")
   set_property(SOURCE cmSystemTools.cxx APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_NO_MKDTEMP)
 endif()
 

+ 8 - 6
Tests/RunCMake/CMakeRelease/FileTable-stdout.txt

@@ -13,10 +13,10 @@
 "cmake-@version@-macos-universal\.tar\.gz"
 "cmake-@version@-macos10\.10-universal\.dmg"
 "cmake-@version@-macos10\.10-universal\.tar\.gz"
-"cmake-@version@-sunos-i386\.sh"
-"cmake-@version@-sunos-i386\.tar\.gz"
-"cmake-@version@-sunos-sparc\.sh"
-"cmake-@version@-sunos-sparc\.tar\.gz"
+"cmake-@version@-sunos-x86_64\.sh"
+"cmake-@version@-sunos-x86_64\.tar\.gz"
+"cmake-@version@-sunos-sparc64\.sh"
+"cmake-@version@-sunos-sparc64\.tar\.gz"
 "cmake-@version@-windows-i386\.msi"
 "cmake-@version@-windows-i386\.zip"
 "cmake-@version@-windows-x86_64\.msi"
@@ -32,8 +32,8 @@
 "cmake-@version@-macos-universal\.dmg"
 -- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "macos10\.10"\) and \(\.class == "archive"\)\) \| \.name
 "cmake-@version@-macos10\.10-universal\.tar\.gz"
--- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "sunos"\) and \(\.architecture\[\] \| \. == "sparc"\) and \(\.class == "archive"\)\) \| \.name
-"cmake-@version@-sunos-sparc\.tar\.gz"
+-- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "sunos"\) and \(\.architecture\[\] \| \. == "sparc64"\) and \(\.class == "archive"\)\) \| \.name
+"cmake-@version@-sunos-sparc64\.tar\.gz"
 -- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "windows"\) and \(\.architecture\[\] \| \. == "i386"\) and \(\.class == "installer"\)\) \| \.name
 "cmake-@version@-windows-i386\.msi"
 -- query: \.files\[\] \| select\(\.architecture\[\] \| \. == "x86_64"\) \| \.name
@@ -43,6 +43,8 @@
 "cmake-@version@-macos-universal\.tar\.gz"
 "cmake-@version@-macos10\.10-universal\.dmg"
 "cmake-@version@-macos10\.10-universal\.tar\.gz"
+"cmake-@version@-sunos-x86_64\.sh"
+"cmake-@version@-sunos-x86_64\.tar\.gz"
 "cmake-@version@-windows-x86_64\.msi"
 "cmake-@version@-windows-x86_64\.zip"
 -- query: \.files\[\] \| select\(\[\.macOSmin\] \| inside\(\["10\.10", "10\.11", "10\.12"\]\)\) \| \.name

+ 1 - 1
Tests/RunCMake/CMakeRelease/FileTable.cmake

@@ -11,7 +11,7 @@ foreach(query
     ".files[] | select(.os[] | . == \"source\") | .name"
     ".files[] | select((.os[] | . == \"macOS\") and (.class == \"volume\")) | .name"
     ".files[] | select((.os[] | . == \"macos10.10\") and (.class == \"archive\")) | .name"
-    ".files[] | select((.os[] | . == \"sunos\") and (.architecture[] | . == \"sparc\") and (.class == \"archive\")) | .name"
+    ".files[] | select((.os[] | . == \"sunos\") and (.architecture[] | . == \"sparc64\") and (.class == \"archive\")) | .name"
     ".files[] | select((.os[] | . == \"windows\") and (.architecture[] | . == \"i386\") and (.class == \"installer\")) | .name"
     ".files[] | select(.architecture[] | . == \"x86_64\") | .name"
     ".files[] | select([.macOSmin] | inside([\"10.10\", \"10.11\", \"10.12\"])) | .name"

+ 8 - 8
Utilities/Release/files-v1.json.in

@@ -61,27 +61,27 @@
     },
     {
       "os": ["sunos", "SunOS"],
-      "architecture": ["i386"],
+      "architecture": ["x86_64"],
       "class": "installer",
-      "name": "cmake-@version@-sunos-i386.sh"
+      "name": "cmake-@version@-sunos-x86_64.sh"
     },
     {
       "os": ["sunos", "SunOS"],
-      "architecture": ["i386"],
+      "architecture": ["x86_64"],
       "class": "archive",
-      "name": "cmake-@version@-sunos-i386.tar.gz"
+      "name": "cmake-@version@-sunos-x86_64.tar.gz"
     },
     {
       "os": ["sunos", "SunOS"],
-      "architecture": ["sparc"],
+      "architecture": ["sparc64"],
       "class": "installer",
-      "name": "cmake-@[email protected]"
+      "name": "cmake-@version@-sunos-sparc64.sh"
     },
     {
       "os": ["sunos", "SunOS"],
-      "architecture": ["sparc"],
+      "architecture": ["sparc64"],
       "class": "archive",
-      "name": "cmake-@[email protected]"
+      "name": "cmake-@version@-sunos-sparc64.tar.gz"
     },
     {
       "os": ["windows", "Windows"],

+ 1 - 1
Utilities/Release/files-v1.rst

@@ -82,7 +82,7 @@ The members are:
     On Windows, architecture names include ``x86_64``, ``i386``, and ``arm64``.
     On macOS, universal binary packages list all architectures,
     e.g. ``["arm64","x86_64"]``.
-    On SunOS, architecture names include ``i386`` and ``sparc``.
+    On SunOS, architecture names include ``x86_64`` and ``sparc64``.
 
   ``class``
     A JSON string naming the class of package.  The value is one of:

+ 1 - 1
Utilities/Release/sunos/docker/Dockerfile

@@ -14,7 +14,7 @@ RUN --mount=type=tmpfs,target=/var/log \
  && apt-get --download-only -y install $(grep -h '^[^#]\+$' /root/*.lst)
 
 FROM ${BASE_IMAGE} AS base
-ARG ARCH=sparc
+ARG ARCH=sparc64
 RUN --mount=type=bind,source=base.lst,target=/root/base.lst \
     --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
     --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \

+ 7 - 7
Utilities/Release/sunos/docker/base.bash

@@ -6,13 +6,13 @@ arch="$1"
 readonly arch
 
 case "$arch" in
-    i386)
-        tarball="gcc-9.5.0-linux-x86_64-cross-sunos-i386.tar.xz"
-        sha256sum="3cd3c989483051e741dd9f39170842d22e5c43cd25628d2b0c57890a3f235883"
+    x86_64)
+        tarball="gcc-9.5.0-linux-x86_64-cross-sunos-x86_64.tar.xz"
+        sha256sum="0632342dc20445a798148548376f986f3a09dc2e4f433fa9100e4a5371a14860"
         ;;
-    sparc)
-        tarball="gcc-9.5.0-linux-x86_64-cross-sunos-sparc.tar.xz"
-        sha256sum="853454ef4e787895786fdb21e56a3ba9c121ffe6116467a75f2c3eb09f3c88b4"
+    sparc64)
+        tarball="gcc-9.5.0-linux-x86_64-cross-sunos-sparc64.tar.xz"
+        sha256sum="ea3c3deecdd94823edd7241aa4b79a0dc4e7fb5a8dc9d101cc2d6a72beab7ced"
         ;;
     *)
         echo >&2 "Unknown architecture: $arch"
@@ -24,7 +24,7 @@ readonly sha256sum
 
 cd /tmp
 
-curl -OL "https://gitlab.kitware.com/api/v4/projects/6955/packages/generic/gcc-solaris/v9.5.0-20250212.0/$tarball"
+curl -OL "https://gitlab.kitware.com/api/v4/projects/6955/packages/generic/gcc-solaris/v9.5.0-20250227.0/$tarball"
 echo "$sha256sum  $tarball" > gcc.sha256sum
 sha256sum --check gcc.sha256sum
 

+ 8 - 8
Utilities/Release/sunos/docker/openssl.bash

@@ -6,15 +6,15 @@ arch="$1"
 readonly arch
 
 case "$arch" in
-    i386)
-        target=i386-pc-solaris2.10
-        openssl_target=solaris-x86-gcc
+    x86_64)
+        target=x86_64-pc-solaris2.10
+        openssl_target=solaris64-x86_64-gcc
         ldlibs=
         ;;
-    sparc)
-        target=sparc-sun-solaris2.10
-        openssl_target=solaris-sparcv8-gcc
-        ldlibs=-latomic
+    sparc64)
+        target=sparc64-sun-solaris2.10
+        openssl_target=solaris64-sparcv9-gcc
+        ldlibs=
         ;;
     *)
         echo >&2 "Unknown architecture: $arch"
@@ -59,4 +59,4 @@ if ! make install_sw >>make.log 2>&1; then
     exit 1
 fi
 
-tar czf /root/openssl.tar.gz -C / "$prefix"
+tar czf /root/openssl.tar.gz -C / "${prefix#/}"

+ 8 - 8
Utilities/Release/sunos/docker/sysroot.bash

@@ -6,13 +6,13 @@ arch="$1"
 readonly arch
 
 case "$arch" in
-    i386)
-        tarball="sysroot-i386-pc-solaris2.10-sunos5.10-1.tar.xz"
-        sha256sum="1b9251699f4e412ba5b0fde9c0fb96ceef6b8a1f47f0c1f2146ba0ba9da458b8"
+    x86_64)
+        tarball="sysroot-x86_64-pc-solaris2.10-sunos5.10-1.tar.xz"
+        sha256sum="bea632b3ae755f89a1c0e64775437a9b29001a3fc3a3c2c6247b921776059231"
         ;;
-    sparc)
-        tarball="sysroot-sparc-sun-solaris2.10-sunos5.10-1.tar.xz"
-        sha256sum="e6c668a63dc00de443d07cbe2be779335642ffe1b818ba85d23ab543982aaf23"
+    sparc64)
+        tarball="sysroot-sparc64-sun-solaris2.10-sunos5.10-1.tar.xz"
+        sha256sum="fd60cc1be951ae314ff2b4246ac055c8e5b21c39b4cd41b23ebcec709451d90f"
         ;;
     *)
         echo >&2 "Unknown architecture: $arch"
@@ -23,8 +23,8 @@ esac
 #   --build-arg SYSROOT_URL=...
 #   --build-arg SYSROOT_SHA256SUM=...
 # The tarball must contain one of:
-#   sysroot/i386-pc-solaris2.10/{lib,usr/lib,usr/include}
-#   sysroot/sparc-sun-solaris2.10/{lib,usr/lib,usr/include}
+#   sysroot/x86_64-pc-solaris2.10/{lib,usr/lib,usr/include}
+#   sysroot/sparc64-sun-solaris2.10/{lib,usr/lib,usr/include}
 # The content may be retrieved from a real Solaris host.
 if test -n "$SYSROOT_URL"; then
     url="$SYSROOT_URL"

+ 0 - 6
Utilities/Release/sunos/i386/toolchain.cmake

@@ -1,6 +0,0 @@
-set(CMAKE_SYSTEM_NAME SunOS)
-set(CMAKE_SYSTEM_VERSION 5.10)
-set(CMAKE_SYSTEM_PROCESSOR i386)
-set(CMAKE_SYSROOT /opt/cross/sysroot/i386-pc-solaris2.10)
-set(CMAKE_C_COMPILER /opt/cross/bin/i386-pc-solaris2.10-gcc)
-set(CMAKE_CXX_COMPILER /opt/cross/bin/i386-pc-solaris2.10-g++)

+ 0 - 6
Utilities/Release/sunos/sparc/toolchain.cmake

@@ -1,6 +0,0 @@
-set(CMAKE_SYSTEM_NAME SunOS)
-set(CMAKE_SYSTEM_VERSION 5.10)
-set(CMAKE_SYSTEM_PROCESSOR sparc)
-set(CMAKE_SYSROOT /opt/cross/sysroot/sparc-sun-solaris2.10)
-set(CMAKE_C_COMPILER /opt/cross/bin/sparc-sun-solaris2.10-gcc)
-set(CMAKE_CXX_COMPILER /opt/cross/bin/sparc-sun-solaris2.10-g++)

+ 2 - 3
Utilities/Release/sunos/sparc/cache.txt → Utilities/Release/sunos/sparc64/cache.txt

@@ -6,8 +6,7 @@ CMAKE_EXE_LINKER_FLAGS:STRING=-static-libstdc++ -static-libgcc -Wl,-z,noexecstac
 # Enable ssl support in curl
 CMAKE_USE_OPENSSL:BOOL=ON
 OPENSSL_USE_STATIC_LIBS:BOOL=ON
-OpenSSL_ROOT:PATH=/opt/cross/openssl/sparc-sun-solaris2.10
-_OPENSSL_STATIC_LIBRARIES:STRING=/opt/cross/sparc-sun-solaris2.10/lib/libatomic.a
+OpenSSL_ROOT:PATH=/opt/cross/openssl/sparc64-sun-solaris2.10
 
 # Enable ccmake
 BUILD_CursesDialog:BOOL=ON
@@ -23,4 +22,4 @@ CMake_TEST_INSTALL:BOOL=OFF
 CMAKE_SKIP_INSTALL_ALL_DEPENDENCY:BOOL=ON
 
 # CPack package file name component for this platform.
-CPACK_SYSTEM_NAME:STRING=sunos-sparc
+CPACK_SYSTEM_NAME:STRING=sunos-sparc64

+ 6 - 0
Utilities/Release/sunos/sparc64/toolchain.cmake

@@ -0,0 +1,6 @@
+set(CMAKE_SYSTEM_NAME SunOS)
+set(CMAKE_SYSTEM_VERSION 5.10)
+set(CMAKE_SYSTEM_PROCESSOR sparc64)
+set(CMAKE_SYSROOT /opt/cross/sysroot/sparc64-sun-solaris2.10)
+set(CMAKE_C_COMPILER /opt/cross/bin/sparc64-sun-solaris2.10-gcc)
+set(CMAKE_CXX_COMPILER /opt/cross/bin/sparc64-sun-solaris2.10-g++)

+ 2 - 2
Utilities/Release/sunos/i386/cache.txt → Utilities/Release/sunos/x86_64/cache.txt

@@ -6,7 +6,7 @@ CMAKE_EXE_LINKER_FLAGS:STRING=-static-libstdc++ -static-libgcc -Wl,-z,noexecstac
 # Enable ssl support in curl
 CMAKE_USE_OPENSSL:BOOL=ON
 OPENSSL_USE_STATIC_LIBS:BOOL=ON
-OpenSSL_ROOT:PATH=/opt/cross/openssl/i386-pc-solaris2.10
+OpenSSL_ROOT:PATH=/opt/cross/openssl/x86_64-pc-solaris2.10
 
 # Enable ccmake
 BUILD_CursesDialog:BOOL=ON
@@ -22,4 +22,4 @@ CMake_TEST_INSTALL:BOOL=OFF
 CMAKE_SKIP_INSTALL_ALL_DEPENDENCY:BOOL=ON
 
 # CPack package file name component for this platform.
-CPACK_SYSTEM_NAME:STRING=sunos-i386
+CPACK_SYSTEM_NAME:STRING=sunos-x86_64

+ 6 - 0
Utilities/Release/sunos/x86_64/toolchain.cmake

@@ -0,0 +1,6 @@
+set(CMAKE_SYSTEM_NAME SunOS)
+set(CMAKE_SYSTEM_VERSION 5.10)
+set(CMAKE_SYSTEM_PROCESSOR x86_64)
+set(CMAKE_SYSROOT /opt/cross/sysroot/x86_64-pc-solaris2.10)
+set(CMAKE_C_COMPILER /opt/cross/bin/x86_64-pc-solaris2.10-gcc)
+set(CMAKE_CXX_COMPILER /opt/cross/bin/x86_64-pc-solaris2.10-g++)

+ 1 - 1
Utilities/cmlibuv/CMakeLists.txt

@@ -299,7 +299,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
   endif()
   if(CMAKE_SYSTEM_VERSION STREQUAL "5.10")
     list(APPEND uv_defines SUNOS_NO_IFADDRS)
-    if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
+    if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i386|x86_64)$")
       list(APPEND uv_defines CMAKE_NO_MKDTEMP)
     endif()
   endif()