From 482571ed8ee973ad22b95852ad1f80d9ac8c882b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 02:52:49 +0000 Subject: [PATCH 1/6] Bump external/termux-elf-cleaner from `ee5385e` to `3da3eea` Bumps [external/termux-elf-cleaner](https://github.com/termux/termux-elf-cleaner) from `ee5385e` to `3da3eea`. - [Release notes](https://github.com/termux/termux-elf-cleaner/releases) - [Commits](https://github.com/termux/termux-elf-cleaner/compare/ee5385e004a9d67bdc289e43939691b260e06b03...3da3eeab96e57fa794c5ea0feb2eed4903545dec) --- updated-dependencies: - dependency-name: external/termux-elf-cleaner dependency-version: 3da3eeab96e57fa794c5ea0feb2eed4903545dec dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- external/termux-elf-cleaner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/termux-elf-cleaner b/external/termux-elf-cleaner index ee5385e004a..3da3eeab96e 160000 --- a/external/termux-elf-cleaner +++ b/external/termux-elf-cleaner @@ -1 +1 @@ -Subproject commit ee5385e004a9d67bdc289e43939691b260e06b03 +Subproject commit 3da3eeab96e57fa794c5ea0feb2eed4903545dec From bb1de5f9691b225d0b108d3b527967a36d2ca41a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 13:36:05 +0000 Subject: [PATCH 2/6] Fix elfcleaner CMake for renamed source and C++20 requirement Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com> --- tools/fastdev/elfcleaner/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/fastdev/elfcleaner/CMakeLists.txt b/tools/fastdev/elfcleaner/CMakeLists.txt index bba82e0fe5f..8a13c5a95b6 100644 --- a/tools/fastdev/elfcleaner/CMakeLists.txt +++ b/tools/fastdev/elfcleaner/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5) # Set the project name project (elfcleaner C CXX) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS ON) @@ -25,9 +25,14 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Wall") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -Wall") set(ELFCLEANER_SOURCES - ../../../external/termux-elf-cleaner/termux-elf-cleaner.cpp + ../../../external/termux-elf-cleaner/elf-cleaner.cpp ) # Add an executable add_executable(elfcleaner ${ELFCLEANER_SOURCES}) +target_compile_definitions(elfcleaner + PRIVATE "COPYRIGHT=\"Copyright (C) 2022-2024 Termux and contributors.\"" + PRIVATE "PACKAGE_VERSION=\"3.0.1\"" + PRIVATE "PACKAGE_NAME=\"termux-elf-cleaner\"" + ) set_target_properties(elfcleaner PROPERTIES LINK_FLAGS_RELEASE -s) \ No newline at end of file From bbcbeddd5012bcfd25590cc243622ce1a261d648 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 13:36:41 +0000 Subject: [PATCH 3/6] Extract elfcleaner version to a CMake variable Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com> --- tools/fastdev/elfcleaner/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/fastdev/elfcleaner/CMakeLists.txt b/tools/fastdev/elfcleaner/CMakeLists.txt index 8a13c5a95b6..36ed75ada51 100644 --- a/tools/fastdev/elfcleaner/CMakeLists.txt +++ b/tools/fastdev/elfcleaner/CMakeLists.txt @@ -6,6 +6,9 @@ cmake_minimum_required(VERSION 3.5) # Set the project name project (elfcleaner C CXX) +# Keep in sync with external/termux-elf-cleaner/CMakeLists.txt +set(ELFCLEANER_VERSION "3.0.1") + set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS ON) @@ -32,7 +35,7 @@ set(ELFCLEANER_SOURCES add_executable(elfcleaner ${ELFCLEANER_SOURCES}) target_compile_definitions(elfcleaner PRIVATE "COPYRIGHT=\"Copyright (C) 2022-2024 Termux and contributors.\"" - PRIVATE "PACKAGE_VERSION=\"3.0.1\"" + PRIVATE "PACKAGE_VERSION=\"${ELFCLEANER_VERSION}\"" PRIVATE "PACKAGE_NAME=\"termux-elf-cleaner\"" ) set_target_properties(elfcleaner PROPERTIES LINK_FLAGS_RELEASE -s) \ No newline at end of file From 12b949e044739c0f066009ab8f370e9b6e6fbc77 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 19:28:44 +0000 Subject: [PATCH 4/6] Bump elfcleaner CMake minimum to 3.20 so C++20 std flag is emitted Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com> --- tools/fastdev/elfcleaner/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/fastdev/elfcleaner/CMakeLists.txt b/tools/fastdev/elfcleaner/CMakeLists.txt index 36ed75ada51..a5381943d12 100644 --- a/tools/fastdev/elfcleaner/CMakeLists.txt +++ b/tools/fastdev/elfcleaner/CMakeLists.txt @@ -1,7 +1,9 @@ # Set the minimum version of CMake that can be used # To find the cmake version run # $ cmake --version -cmake_minimum_required(VERSION 3.5) +# 3.20+ is required so policy CMP0128 is NEW and the C++ standard flag +# (e.g. -std=c++20) is always emitted; elf-cleaner.cpp uses std::counting_semaphore. +cmake_minimum_required(VERSION 3.20) # Set the project name project (elfcleaner C CXX) From d891855941e73ccda51ee584a9afbf036af4a77c Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 14:56:00 -0500 Subject: [PATCH 5/6] Address review: scope sync comment, match upstream CXX_EXTENSIONS - Narrow the 'Keep in sync' comment to call out exactly which settings we mirror from external/termux-elf-cleaner/CMakeLists.txt (ELFCLEANER_VERSION, CMAKE_CXX_STANDARD, and the PACKAGE_NAME/PACKAGE_VERSION/COPYRIGHT compile definitions), acknowledging that the rest of this file legitimately diverges. - Flip CMAKE_CXX_EXTENSIONS from ON to OFF to match upstream, so we build elf-cleaner as strict c++20 instead of gnu++20. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/fastdev/elfcleaner/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/fastdev/elfcleaner/CMakeLists.txt b/tools/fastdev/elfcleaner/CMakeLists.txt index a5381943d12..afbfb5d699c 100644 --- a/tools/fastdev/elfcleaner/CMakeLists.txt +++ b/tools/fastdev/elfcleaner/CMakeLists.txt @@ -8,12 +8,14 @@ cmake_minimum_required(VERSION 3.20) # Set the project name project (elfcleaner C CXX) -# Keep in sync with external/termux-elf-cleaner/CMakeLists.txt +# Keep ELFCLEANER_VERSION, CMAKE_CXX_STANDARD, and the PACKAGE_NAME/ +# PACKAGE_VERSION/COPYRIGHT compile definitions below in sync with +# external/termux-elf-cleaner/CMakeLists.txt. set(ELFCLEANER_VERSION "3.0.1") set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_EXTENSIONS ON) +set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) From 9b1cd2d3988ef09dde6c8edcc0c1f42839d60914 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:41:08 -0500 Subject: [PATCH 6/6] Bump Linux CI from gcc-10/g++-10 to gcc-11/g++-11 The termux-elf-cleaner submodule bump pulled in upstream's switch to a multithreaded implementation that uses `std::counting_semaphore`. That type requires libstdc++ 11+, so the build now fails on the Linux CI images that pin CC/CXX to gcc-10/g++-10: error: 'counting_semaphore' is not a member of 'std' The Linux build agents already have gcc-11.4.0 available as the unversioned 'g++' (per the CI log), and the macOS CI side has been using g++-11 for the same -std=c++20 generate-pinvoke-tables.sh generator for some time. This change brings Linux into line: - build-tools/automation/yaml-templates/build-linux.yaml: bump CC/CXX variables to gcc-11/g++-11. - build-tools/automation/azure-pipelines-public.yaml: bump CC/CXX variables and the apt install/displayName to gcc-11/g++-11. - build-tools/scripts/generate-pinvoke-tables.sh: bump the Linux CI COMPILER from g++-10 to g++-11 to match the macOS branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build-tools/automation/azure-pipelines-public.yaml | 8 ++++---- build-tools/automation/yaml-templates/build-linux.yaml | 4 ++-- build-tools/scripts/generate-pinvoke-tables.sh | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build-tools/automation/azure-pipelines-public.yaml b/build-tools/automation/azure-pipelines-public.yaml index f00a09174e2..652eb62229d 100644 --- a/build-tools/automation/azure-pipelines-public.yaml +++ b/build-tools/automation/azure-pipelines-public.yaml @@ -138,8 +138,8 @@ stages: workspace: clean: all variables: - CXX: g++-10 - CC: gcc-10 + CXX: g++-11 + CC: gcc-11 steps: - checkout: self path: s/android @@ -151,8 +151,8 @@ stages: - script: | sudo apt-get update - sudo apt-get install -y g++-10 gcc-10 - displayName: install g++-10 and gcc-10 + sudo apt-get install -y g++-11 gcc-11 + displayName: install g++-11 and gcc-11 - template: /build-tools/automation/yaml-templates/build-linux-steps.yaml parameters: diff --git a/build-tools/automation/yaml-templates/build-linux.yaml b/build-tools/automation/yaml-templates/build-linux.yaml index d53525fb085..52a719908a2 100644 --- a/build-tools/automation/yaml-templates/build-linux.yaml +++ b/build-tools/automation/yaml-templates/build-linux.yaml @@ -32,8 +32,8 @@ stages: workspace: clean: all variables: - CXX: g++-10 - CC: gcc-10 + CXX: g++-11 + CC: gcc-11 ${{ if eq(parameters.use1ESTemplate, true) }}: templateContext: outputs: diff --git a/build-tools/scripts/generate-pinvoke-tables.sh b/build-tools/scripts/generate-pinvoke-tables.sh index 936f167815a..e96754b8a3b 100755 --- a/build-tools/scripts/generate-pinvoke-tables.sh +++ b/build-tools/scripts/generate-pinvoke-tables.sh @@ -52,7 +52,7 @@ case ${HOST} in if [ "${RUNNING_ON_CI}" == "no" ]; then COMPILER="g++" else - COMPILER="g++-10" + COMPILER="g++-11" fi ;; darwin)