From a7137f684052742f1ac6e9f6ad70e7c7c735b429 Mon Sep 17 00:00:00 2001 From: juergw Date: Sun, 31 May 2026 15:51:17 +0000 Subject: [PATCH 01/10] Test on linux arm. This should fail, as we don't yet build for arm. --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcf472f96..94415d2e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,6 +95,7 @@ jobs: sudo apt-get -qq install -y --no-install-recommends \ gcc-multilib \ g++-multilib \ + g++-aarch64-linux-gnu \ ninja-build \ openjdk-11-jre-headless @@ -148,6 +149,21 @@ jobs: cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -GNinja .. ninja popd + + - name: Build BoringSSL AArch64 Linux + if: runner.os == 'Linux' + run: | + mkdir -p "$BORINGSSL_HOME/build.arm" + pushd "$BORINGSSL_HOME/build.arm" + cmake -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_SYSTEM_PROCESSOR=aarch64 \ + -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \ + -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \ + -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ + -DCMAKE_BUILD_TYPE=Release \ + -GNinja .. + ninja + popd - name: Set up MSVC paths on Windows if: runner.os == 'Windows' @@ -313,12 +329,14 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-22.04, ubuntu-latest, macos-14, macos-latest, windows-latest] + platform: [ubuntu-22.04, ubuntu-24.04-arm, ubuntu-latest, macos-14, macos-latest, windows-latest] java: [8, 11, 17, 21, 25, EA] dist: ['temurin', 'zulu'] include: - platform: ubuntu-22.04 separator: ':' + - platform: ubuntu-24.04-arm + separator: ':' - platform: ubuntu-latest separator: ':' - platform: macos-latest From 2117351013d6e50ac4d8cd4c2995cfb81ba45b92 Mon Sep 17 00:00:00 2001 From: juergw Date: Sun, 31 May 2026 16:01:53 +0000 Subject: [PATCH 02/10] Fix install. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94415d2e4..4bfd70753 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,9 +92,9 @@ jobs: sudo dpkg --add-architecture i386 sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get -qq update + sudo add-apt-repository ppa:openjdk-r/ppa + sudo apt-get -qq update sudo apt-get -qq install -y --no-install-recommends \ - gcc-multilib \ - g++-multilib \ g++-aarch64-linux-gnu \ ninja-build \ openjdk-11-jre-headless From 3e54218f025095f46c0b4f4375d05af8bf190e87 Mon Sep 17 00:00:00 2001 From: juergw Date: Sun, 31 May 2026 17:31:32 +0000 Subject: [PATCH 03/10] Support linux-aarch_64. --- build-logic/src/main/groovy/conventions.cpp.gradle | 9 +++++++-- openjdk-uber/build.gradle | 2 +- openjdk/build.gradle | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/build-logic/src/main/groovy/conventions.cpp.gradle b/build-logic/src/main/groovy/conventions.cpp.gradle index 28d9eadce..7d5ed01e9 100644 --- a/build-logic/src/main/groovy/conventions.cpp.gradle +++ b/build-logic/src/main/groovy/conventions.cpp.gradle @@ -26,6 +26,11 @@ model { } } } - gcc(Gcc) + gcc(Gcc) { + target("linux_aarch64") { + cppCompiler.executable = 'aarch64-linux-gnu-g++' + linker.executable = 'aarch64-linux-gnu-g++' + } + } } -} \ No newline at end of file +} diff --git a/openjdk-uber/build.gradle b/openjdk-uber/build.gradle index beaff563d..2d9e29839 100644 --- a/openjdk-uber/build.gradle +++ b/openjdk-uber/build.gradle @@ -16,7 +16,7 @@ Directory buildTop = layout.buildDirectory.get() ext { buildUberJar = Boolean.parseBoolean(System.getProperty('org.conscrypt.openjdk.buildUberJar', 'false')) uberJarClassifiers = (System.getProperty('org.conscrypt.openjdk.uberJarClassifiers', - 'osx-x86_64,osx-aarch_64,linux-x86_64,windows-x86_64')).split(',') + 'osx-x86_64,osx-aarch_64,linux-x86_64,linux-aarch_64,windows-x86_64')).split(',') classesDir = buildTop.dir('classes') resourcesDir = buildTop.dir('resources') sourcesDir = buildTop.dir('sources') diff --git a/openjdk/build.gradle b/openjdk/build.gradle index b63b4c8de..29c9c134e 100644 --- a/openjdk/build.gradle +++ b/openjdk/build.gradle @@ -26,6 +26,11 @@ description = 'Conscrypt: OpenJdk' enum NativeBuildInfo { WINDOWS_X86_64("windows", "x86_64"), LINUX_X86_64("linux", "x86_64"), + LINUX_AARCH64("linux", "aarch_64") { + String libDir() { + "build.arm" + } + }, MAC_X86_64("osx", "x86_64") { String libDir() { "build.x86" From 34c92ae1fccd6d5b312f4fc6eb942935879fb175 Mon Sep 17 00:00:00 2001 From: juergw Date: Sun, 31 May 2026 18:01:31 +0000 Subject: [PATCH 04/10] Fix strip. --- openjdk/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openjdk/build.gradle b/openjdk/build.gradle index 29c9c134e..58332623c 100644 --- a/openjdk/build.gradle +++ b/openjdk/build.gradle @@ -534,7 +534,11 @@ model { def stripTask = binary.tasks.taskName("strip") project.tasks.register(stripTask as String, Exec) { dependsOn binary.tasks.link - executable "strip" + if (nativeBuild == NativeBuildInfo.LINUX_AARCH64) { + executable "aarch64-linux-gnu-strip" + } else { + executable "strip" + } args binary.tasks.link.linkedFile.asFile.get() } copyTask.configure { From 340c59c382fa9ab4ad0a7bdc8c48076f895f441f Mon Sep 17 00:00:00 2001 From: juergw Date: Sun, 31 May 2026 19:04:08 +0000 Subject: [PATCH 05/10] Fix uber build. --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bfd70753..efdf1af72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,8 +92,6 @@ jobs: sudo dpkg --add-architecture i386 sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get -qq update - sudo add-apt-repository ppa:openjdk-r/ppa - sudo apt-get -qq update sudo apt-get -qq install -y --no-install-recommends \ g++-aarch64-linux-gnu \ ninja-build \ @@ -247,8 +245,7 @@ jobs: sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get -qq update sudo apt-get -qq install -y --no-install-recommends \ - gcc-multilib \ - g++-multilib \ + g++-aarch64-linux-gnu \ ninja-build \ openjdk-11-jre-headless From af1db3794e336e7f6330ef16250ff43d043263cf Mon Sep 17 00:00:00 2001 From: juergw Date: Sun, 31 May 2026 19:43:21 +0000 Subject: [PATCH 06/10] Add some logging for arm build. --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efdf1af72..114041298 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,6 +161,12 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -GNinja .. ninja + echo "=== Files in build.arm ===" + ls -la + echo "=== Files in build.arm/ssl ===" + ls -la ssl || true + echo "=== Files in build.arm/crypto ===" + ls -la crypto || true popd - name: Set up MSVC paths on Windows From f15ab545d781b86931ab0aea43bb468f1ab556ef Mon Sep 17 00:00:00 2001 From: juergw Date: Mon, 1 Jun 2026 06:06:59 +0000 Subject: [PATCH 07/10] Also build boringssl arm in uber. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 114041298..a70bcdeb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -280,6 +280,19 @@ jobs: cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -GNinja .. ninja popd + + - name: Build BoringSSL AArch64 Linux + run: | + mkdir -p "$BORINGSSL_HOME/build.arm" + pushd "$BORINGSSL_HOME/build.arm" + cmake -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_SYSTEM_PROCESSOR=aarch64 \ + -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \ + -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \ + -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ + -DCMAKE_BUILD_TYPE=Release \ + -GNinja .. + ninja # TODO(prb) remove build dependency above and go back to this. # - name: Make fake BoringSSL directories From 52c45f31e6dc296ae9d38fe2f0f8ce9af4ab8682 Mon Sep 17 00:00:00 2001 From: juergw Date: Mon, 1 Jun 2026 07:21:12 +0000 Subject: [PATCH 08/10] Remove debug logging. --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a70bcdeb1..2c635d673 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,12 +161,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -GNinja .. ninja - echo "=== Files in build.arm ===" - ls -la - echo "=== Files in build.arm/ssl ===" - ls -la ssl || true - echo "=== Files in build.arm/crypto ===" - ls -la crypto || true popd - name: Set up MSVC paths on Windows From 6c4c6fe4b530f5e3c8a06ba20b2dacaaafc60fa0 Mon Sep 17 00:00:00 2001 From: juergw Date: Mon, 1 Jun 2026 11:48:51 +0000 Subject: [PATCH 09/10] Use ubuntu 22.04 to test arm build. --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c635d673..f0c6ba0f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,7 @@ jobs: popd - name: Build BoringSSL 64-bit Linux + # Please keep this in sync with other "Build BoringSSL 64-bit Linux" if: runner.os == 'Linux' run: | mkdir -p "$BORINGSSL_HOME/build64" @@ -149,6 +150,7 @@ jobs: popd - name: Build BoringSSL AArch64 Linux + # Please keep this in sync with other "Build BoringSSL AArch64 Linux" if: runner.os == 'Linux' run: | mkdir -p "$BORINGSSL_HOME/build.arm" @@ -268,6 +270,7 @@ jobs: git checkout --progress --force -B main - name: Build BoringSSL 64-bit Linux + # Please keep this in sync with other "Build BoringSSL 64-bit Linux" run: | mkdir -p "$BORINGSSL_HOME/build64" pushd "$BORINGSSL_HOME/build64" @@ -276,6 +279,7 @@ jobs: popd - name: Build BoringSSL AArch64 Linux + # Please keep this in sync with other "Build BoringSSL AArch64 Linux" run: | mkdir -p "$BORINGSSL_HOME/build.arm" pushd "$BORINGSSL_HOME/build.arm" @@ -339,13 +343,13 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu-22.04, ubuntu-24.04-arm, ubuntu-latest, macos-14, macos-latest, windows-latest] + platform: [ubuntu-22.04, ubuntu-22.04-arm, ubuntu-latest, macos-14, macos-latest, windows-latest] java: [8, 11, 17, 21, 25, EA] dist: ['temurin', 'zulu'] include: - platform: ubuntu-22.04 separator: ':' - - platform: ubuntu-24.04-arm + - platform: ubuntu-22.04-arm separator: ':' - platform: ubuntu-latest separator: ':' From 4988b42dcf3c41bb8ca435c3fae04590ce8b9c80 Mon Sep 17 00:00:00 2001 From: juergw Date: Mon, 1 Jun 2026 12:07:51 +0000 Subject: [PATCH 10/10] Replace tab by spaces. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c6ba0f8..0eb0a0550 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: popd - name: Build BoringSSL AArch64 Linux - # Please keep this in sync with other "Build BoringSSL AArch64 Linux" + # Please keep this in sync with other "Build BoringSSL AArch64 Linux" if: runner.os == 'Linux' run: | mkdir -p "$BORINGSSL_HOME/build.arm"