From ae1bce3797c5f04b9a960df13743c9c7901a09da Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Wed, 15 Apr 2026 14:43:17 +0000 Subject: [PATCH 01/25] try raspi variant --- packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD | 4 ++-- packages/version_matrix.bzl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD index d909382..05847c4 100644 --- a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD +++ b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD @@ -43,7 +43,7 @@ filegroup( filegroup( name = "cc", - srcs = ["usr/bin/aarch64-linux-gnu-gcc-13.bin"], + srcs = ["usr/bin/aarch64-linux-gnu-gcc-13"], ) filegroup( @@ -53,7 +53,7 @@ filegroup( filegroup( name = "cxx", - srcs = ["usr/bin/aarch64-linux-gnu-g++-13.bin"], + srcs = ["usr/bin/aarch64-linux-gnu-g++-13"], ) filegroup( diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 9e66cc1..c53e655 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -189,9 +189,9 @@ VERSION_MATRIX = { "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu", ], - "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64", - "sha256": "f44286c28d831dc40acdac08ef49f38a2e9cbb057bea38c25834964693785287", - "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz", + "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-rpi4b", + "sha256": "7e253dfdc9756fc329973f12561ff816dfc0102420c881592451aea35e061800", + "url": "https://github.com/Eclipse-SDV-HackFest-Esslingen-2026/eb_corbos_toolkit-hackfest/releases/download/2.0.0-beta-hackfest/fastdev-sdk-ubuntu-ebclfsa-rpi4b.tar.gz", }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", From 278440da54559779c548f1495c884285a634e268 Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Wed, 15 Apr 2026 15:04:01 +0000 Subject: [PATCH 02/25] fix: hand in the tag value otherwise it does not work to specify this in a toolchain declaration --- extensions/gcc.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/gcc.bzl b/extensions/gcc.bzl index 102b5d9..fe86eae 100644 --- a/extensions/gcc.bzl +++ b/extensions/gcc.bzl @@ -187,7 +187,7 @@ def _get_toolchains(tags): "sdk_version": tag.sdk_version, "sdp_to_link": tag.sdp_to_link, "sdp_version": tag.sdp_version, - "tc_compiler_library_search_paths": [], + "tc_compiler_library_search_paths": tag.ld_library_paths, "tc_cpu": tag.target_cpu, "tc_extra_c_compile_flags": tag.extra_c_compile_flags, "tc_extra_compile_flags": tag.extra_compile_flags, From b07d9df0f14a31a7240ef877d1c811d18f6bece4 Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 28 Apr 2026 17:02:39 +0200 Subject: [PATCH 03/25] latest version --- packages/version_matrix.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index c53e655..252b9d3 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -190,7 +190,7 @@ VERSION_MATRIX = { "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu", ], "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-rpi4b", - "sha256": "7e253dfdc9756fc329973f12561ff816dfc0102420c881592451aea35e061800", + "sha256": "22f764e2eefe7d6e4891cb0ae55a24b55a3cd1f6e5dad122dff0569b2e1c68c8", "url": "https://github.com/Eclipse-SDV-HackFest-Esslingen-2026/eb_corbos_toolkit-hackfest/releases/download/2.0.0-beta-hackfest/fastdev-sdk-ubuntu-ebclfsa-rpi4b.tar.gz", }, "x86_64-qnx-sdp_8.0.0": { From 917bf264821fe08cb84d3604eb94f5e84bb049d2 Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Mon, 18 May 2026 11:58:46 +0000 Subject: [PATCH 04/25] fix: update strip_prefix, sha256, and url for fastdev-sdk-ubuntu-ebclfsa --- packages/version_matrix.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 252b9d3..22dd0b1 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -189,9 +189,9 @@ VERSION_MATRIX = { "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu", ], - "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-rpi4b", - "sha256": "22f764e2eefe7d6e4891cb0ae55a24b55a3cd1f6e5dad122dff0569b2e1c68c8", - "url": "https://github.com/Eclipse-SDV-HackFest-Esslingen-2026/eb_corbos_toolkit-hackfest/releases/download/2.0.0-beta-hackfest/fastdev-sdk-ubuntu-ebclfsa-rpi4b.tar.gz", + "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64", + "sha256": "aaa9d726f951077f82fb8218fd8b9a29c80d3c872095ffec5be3946798cd8d93", + "url": "https://github.com/opajonk/eb_corbos_toolkit/releases/download/test-tag/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz", }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", From 33e6be47887e9d8e08bfeeaa3fbba0c87b44e511 Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 19 May 2026 05:36:38 +0000 Subject: [PATCH 05/25] exclude special directories as well --- packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD index 05847c4..96abad9 100644 --- a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD +++ b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD @@ -20,6 +20,9 @@ filegroup( srcs = glob( ["*/**/*"], exclude = [ + "dev/**", + "proc/**", + "sys/**", "usr/share/ca-certificates/**", "usr/lib/ssl/certs/**", "lib/ssl/certs/**", From 4e25c91b1bbea0c333d050393138832c849a5b6e Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 19 May 2026 05:50:10 +0000 Subject: [PATCH 06/25] add post-extraction commands --- extensions/gcc.bzl | 8 ++++++++ packages/version_matrix.bzl | 3 +++ rules/gcc.bzl | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/extensions/gcc.bzl b/extensions/gcc.bzl index fe86eae..37cb761 100644 --- a/extensions/gcc.bzl +++ b/extensions/gcc.bzl @@ -44,6 +44,11 @@ _attrs_sdp = { default = "", doc = "Url to the toolchain archive.", ), + "patch_cmds": attr.string_list( + mandatory = False, + default = [], + doc = "Shell commands to run after archive extraction and patching.", + ), } # GCC interface API for toolchain tag class @@ -161,6 +166,7 @@ def _get_packages(tags): packages.append({ "build_file": tag.build_file, "name": tag.name, + "patch_cmds": tag.patch_cmds, "sha256": tag.sha256, "strip_prefix": tag.strip_prefix, "url": tag.url, @@ -251,6 +257,7 @@ def _create_and_link_sdp(toolchain_info): return { "build_file": matrix["build_file"], "name": pkg_name, + "patch_cmds": matrix.get("patch_cmds", []), "sha256": matrix["sha256"], "strip_prefix": matrix["strip_prefix"], "url": matrix["url"], @@ -323,6 +330,7 @@ def _impl(mctx): name = archive_info["name"], urls = [archive_info["url"]], build_file = archive_info["build_file"], + patch_cmds = archive_info["patch_cmds"], sha256 = archive_info["sha256"], strip_prefix = archive_info["strip_prefix"], ) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 22dd0b1..e12185a 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -133,6 +133,9 @@ VERSION_MATRIX = { }, "aarch64-linux-sdk_0.1.0-ebclfsa": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/ebclfsa/0.1.0:ebclfsa.BUILD", + "patch_cmds": [ + "rm -rf dev proc sys", + ], "extra_c_compile_flags": [ "-nostdinc", "-isystem", diff --git a/rules/gcc.bzl b/rules/gcc.bzl index 576617e..80af6b7 100644 --- a/rules/gcc.bzl +++ b/rules/gcc.bzl @@ -229,14 +229,14 @@ gcc_toolchain = repository_rule( "use_base_constraints_only": attr.bool(doc = "Boolean flag to state only base constraints should be used for toolchain compatibility definition"), "license_info_value": attr.string(doc = "License info value (custom settings)"), "license_info_variable": attr.string(doc = "License info variable name (custom settings)"), - "license_path": attr.string(doc = "Lincese path"), + "license_path": attr.string(doc = "License path"), "sdk_version": attr.string(doc = "SDK version string"), "sdp_version": attr.string(doc = "SDP version string"), "tc_compiler_library_search_paths": attr.string_list(doc = "Additional search path which compiler needs."), "tc_cpu": attr.string(doc = "Target platform CPU."), "tc_identifier": attr.string(doc = "Constraint to be used for toolchain definition (e.g. gcc_12.2.0)."), "tc_os": attr.string(doc = "Target platform OS."), - "tc_pkg_repo": attr.string(doc = "The label name of toolchain tarbal."), + "tc_pkg_repo": attr.string(doc = "The label name of toolchain tarball."), "tc_runtime_ecosystem": attr.string(doc = "Runtime ecosystem."), "tc_system_toolchain": attr.bool(doc = "Boolean flag to state if this is a system toolchain"), "_cc_gcov_wrapper_script": attr.label( From fd03a47fee200298f433c16944711ebe094d7c7c Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 19 May 2026 06:21:47 +0000 Subject: [PATCH 07/25] add sysroot_safe_for_build_scripts --- .../linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD index 96abad9..53e90ac 100644 --- a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD +++ b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD @@ -74,3 +74,18 @@ filegroup( name = "sysroot_dir", srcs = ["."], ) + +filegroup( + name = "sysroot_safe_for_build_scripts", + srcs = glob( + ["usr/**"], + exclude = [ + "usr/share/ca-certificates/**", + "usr/lib/ssl/certs/**", + "usr/share/man/**", + "usr/share/perl/**", + "usr/share/doc/**", + "usr/share/locale/**", + ], + ), +) From 0194134d8b790f38c2c0db6872d88512623ad4a1 Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 19 May 2026 10:22:54 +0200 Subject: [PATCH 08/25] Revert "add post-extraction commands" This reverts commit 4e25c91b1bbea0c333d050393138832c849a5b6e. --- extensions/gcc.bzl | 8 -------- packages/version_matrix.bzl | 3 --- rules/gcc.bzl | 4 ++-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/extensions/gcc.bzl b/extensions/gcc.bzl index 37cb761..fe86eae 100644 --- a/extensions/gcc.bzl +++ b/extensions/gcc.bzl @@ -44,11 +44,6 @@ _attrs_sdp = { default = "", doc = "Url to the toolchain archive.", ), - "patch_cmds": attr.string_list( - mandatory = False, - default = [], - doc = "Shell commands to run after archive extraction and patching.", - ), } # GCC interface API for toolchain tag class @@ -166,7 +161,6 @@ def _get_packages(tags): packages.append({ "build_file": tag.build_file, "name": tag.name, - "patch_cmds": tag.patch_cmds, "sha256": tag.sha256, "strip_prefix": tag.strip_prefix, "url": tag.url, @@ -257,7 +251,6 @@ def _create_and_link_sdp(toolchain_info): return { "build_file": matrix["build_file"], "name": pkg_name, - "patch_cmds": matrix.get("patch_cmds", []), "sha256": matrix["sha256"], "strip_prefix": matrix["strip_prefix"], "url": matrix["url"], @@ -330,7 +323,6 @@ def _impl(mctx): name = archive_info["name"], urls = [archive_info["url"]], build_file = archive_info["build_file"], - patch_cmds = archive_info["patch_cmds"], sha256 = archive_info["sha256"], strip_prefix = archive_info["strip_prefix"], ) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index e12185a..22dd0b1 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -133,9 +133,6 @@ VERSION_MATRIX = { }, "aarch64-linux-sdk_0.1.0-ebclfsa": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/ebclfsa/0.1.0:ebclfsa.BUILD", - "patch_cmds": [ - "rm -rf dev proc sys", - ], "extra_c_compile_flags": [ "-nostdinc", "-isystem", diff --git a/rules/gcc.bzl b/rules/gcc.bzl index 80af6b7..576617e 100644 --- a/rules/gcc.bzl +++ b/rules/gcc.bzl @@ -229,14 +229,14 @@ gcc_toolchain = repository_rule( "use_base_constraints_only": attr.bool(doc = "Boolean flag to state only base constraints should be used for toolchain compatibility definition"), "license_info_value": attr.string(doc = "License info value (custom settings)"), "license_info_variable": attr.string(doc = "License info variable name (custom settings)"), - "license_path": attr.string(doc = "License path"), + "license_path": attr.string(doc = "Lincese path"), "sdk_version": attr.string(doc = "SDK version string"), "sdp_version": attr.string(doc = "SDP version string"), "tc_compiler_library_search_paths": attr.string_list(doc = "Additional search path which compiler needs."), "tc_cpu": attr.string(doc = "Target platform CPU."), "tc_identifier": attr.string(doc = "Constraint to be used for toolchain definition (e.g. gcc_12.2.0)."), "tc_os": attr.string(doc = "Target platform OS."), - "tc_pkg_repo": attr.string(doc = "The label name of toolchain tarball."), + "tc_pkg_repo": attr.string(doc = "The label name of toolchain tarbal."), "tc_runtime_ecosystem": attr.string(doc = "Runtime ecosystem."), "tc_system_toolchain": attr.bool(doc = "Boolean flag to state if this is a system toolchain"), "_cc_gcov_wrapper_script": attr.label( From fe902c8148d77efec03865d8f59cb4bb0b2d874f Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 19 May 2026 08:23:29 +0000 Subject: [PATCH 09/25] not needed --- .../linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD index 53e90ac..96abad9 100644 --- a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD +++ b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD @@ -74,18 +74,3 @@ filegroup( name = "sysroot_dir", srcs = ["."], ) - -filegroup( - name = "sysroot_safe_for_build_scripts", - srcs = glob( - ["usr/**"], - exclude = [ - "usr/share/ca-certificates/**", - "usr/lib/ssl/certs/**", - "usr/share/man/**", - "usr/share/perl/**", - "usr/share/doc/**", - "usr/share/locale/**", - ], - ), -) From 84ff8fd2c26448b0d74e2e18335a57f4fdecac87 Mon Sep 17 00:00:00 2001 From: Oliver Pajonk Date: Tue, 19 May 2026 10:33:55 +0200 Subject: [PATCH 10/25] add missing system include --- packages/version_matrix.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 22dd0b1..e1446bc 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -139,6 +139,8 @@ VERSION_MATRIX = { "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", "-isystem", "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/aarch64-linux-gnu", "-L", "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", "-L", @@ -160,6 +162,8 @@ VERSION_MATRIX = { "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", "-isystem", "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/aarch64-linux-gnu", "-L", "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", "-L", From 6d04984fdeaf6d0870bdf5c2f3cc440b98d87ab1 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 10:46:44 +0200 Subject: [PATCH 11/25] chore: bump devcontainer to version 1.11.0 --- .devcontainer/devcontainer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1c29e2f..1227b3a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,4 @@ - { "name": "eclipse-s-core", - "image": "ghcr.io/eclipse-score/devcontainer:v1.2.0" + "image": "ghcr.io/eclipse-score/devcontainer:v1.11.0" } From 36b0fdb9b9a0d99f440a39589d653f7db52b16f7 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 09:16:38 +0000 Subject: [PATCH 12/25] better add updated EB Linux toolchain instead of replacing the old one --- .../linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD | 7 +- .../linux/aarch64/ebclfsa/2.0.0-beta2/BUILD | 16 ++++ .../aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD | 76 +++++++++++++++++++ packages/version_matrix.bzl | 68 ++++++++++++++++- 4 files changed, 159 insertions(+), 8 deletions(-) create mode 100644 packages/linux/aarch64/ebclfsa/2.0.0-beta2/BUILD create mode 100644 packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD diff --git a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD index 96abad9..d909382 100644 --- a/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD +++ b/packages/linux/aarch64/ebclfsa/0.1.0/ebclfsa.BUILD @@ -20,9 +20,6 @@ filegroup( srcs = glob( ["*/**/*"], exclude = [ - "dev/**", - "proc/**", - "sys/**", "usr/share/ca-certificates/**", "usr/lib/ssl/certs/**", "lib/ssl/certs/**", @@ -46,7 +43,7 @@ filegroup( filegroup( name = "cc", - srcs = ["usr/bin/aarch64-linux-gnu-gcc-13"], + srcs = ["usr/bin/aarch64-linux-gnu-gcc-13.bin"], ) filegroup( @@ -56,7 +53,7 @@ filegroup( filegroup( name = "cxx", - srcs = ["usr/bin/aarch64-linux-gnu-g++-13"], + srcs = ["usr/bin/aarch64-linux-gnu-g++-13.bin"], ) filegroup( diff --git a/packages/linux/aarch64/ebclfsa/2.0.0-beta2/BUILD b/packages/linux/aarch64/ebclfsa/2.0.0-beta2/BUILD new file mode 100644 index 0000000..92c8d57 --- /dev/null +++ b/packages/linux/aarch64/ebclfsa/2.0.0-beta2/BUILD @@ -0,0 +1,16 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +exports_files([ + "ebclfsa.BUILD", +]) diff --git a/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD new file mode 100644 index 0000000..96abad9 --- /dev/null +++ b/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD @@ -0,0 +1,76 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +"""Build file for EBcLfSA 0.1.0 toolchain package""" + +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "all_files", + srcs = glob( + ["*/**/*"], + exclude = [ + "dev/**", + "proc/**", + "sys/**", + "usr/share/ca-certificates/**", + "usr/lib/ssl/certs/**", + "lib/ssl/certs/**", + "etc/ssl/certs/**", + "usr/share/man/**", + "usr/share/perl/**", + "var/lib/**", + ], + ), +) + +filegroup( + name = "bin", + srcs = ["usr/bin"], +) + +filegroup( + name = "ar", + srcs = ["usr/bin/aarch64-linux-gnu-ar"], +) + +filegroup( + name = "cc", + srcs = ["usr/bin/aarch64-linux-gnu-gcc-13"], +) + +filegroup( + name = "gcov", + srcs = ["usr/bin/aarch64-linux-gnu-gcov-13"], +) + +filegroup( + name = "cxx", + srcs = ["usr/bin/aarch64-linux-gnu-g++-13"], +) + +filegroup( + name = "strip", + srcs = ["usr/bin/aarch64-linux-gnu-strip"], +) + +filegroup( + name = "elf-enabler", + srcs = ["usr/bin/lisa-elf-enabler"], +) + +# The sysroot for EBcLfSA is the entire extracted directory +filegroup( + name = "sysroot_dir", + srcs = ["."], +) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 762527a..cf69de9 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -145,6 +145,68 @@ VERSION_MATRIX = { }, "aarch64-linux-sdk_0.1.0-ebclfsa": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/ebclfsa/0.1.0:ebclfsa.BUILD", + "extra_c_compile_flags": [ + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "--no-canonical-prefixes", + ], + "extra_cxx_compile_flags": [ + "-nostdinc++", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/aarch64-linux-gnu", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/backward", + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "--no-canonical-prefixes", + ], + "extra_link_flags": [ + "-B", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/bin", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "-lm", + "-ldl", + "-lrt", + "-static-libstdc++", + "-static-libgcc", + "-static", + "--no-canonical-prefixes", + ], + "compiler_library_search_paths": [ + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu", + ], + "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64", + "sha256": "f44286c28d831dc40acdac08ef49f38a2e9cbb057bea38c25834964693785287", + "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz", + }, + "aarch64-linux-sdk_2.0.0-beta2-ebclfsa": { + "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/ebclfsa/2.0.0-beta2:ebclfsa.BUILD", "extra_c_compile_flags": [ "-nostdinc", "-isystem", @@ -205,9 +267,9 @@ VERSION_MATRIX = { "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu", ], - "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64", - "sha256": "aaa9d726f951077f82fb8218fd8b9a29c80d3c872095ffec5be3946798cd8d93", - "url": "https://github.com/opajonk/eb_corbos_toolkit/releases/download/test-tag/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz", + "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64", + "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", + "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz", }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", From f8e22ee430ecc0856969a9b283502ff600cfe37f Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 09:16:46 +0000 Subject: [PATCH 13/25] update lockfile --- tests/MODULE.bazel.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index 15a6923..c8b3882 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -1369,7 +1369,7 @@ }, "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { - "bzlTransitiveDigest": "uUsNFSfSSybb9eE3vhujRJ3STO1XYw/Su0MpWT8DZJI=", + "bzlTransitiveDigest": "FQRbNLfhV36RTWwxZnchbhkOAT1fIA2dJhlRnKyRtD8=", "usagesDigest": "dWr2zFjJ8fBvweFk2KWoZzQqJ+aKnb9A8QACQhKlUfw=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, From d8ac301aed48c0a6083a166e9ebb67a8e515579f Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 12:29:36 +0000 Subject: [PATCH 14/25] use bazel platforms with values for ebclfsa added this repo madness is beyond comprehension --- MODULE.bazel | 5 +++ MODULE.bazel.lock | 2 - tests/.bazelrc | 4 ++ tests/MODULE.bazel | 18 ++++++++ tests/MODULE.bazel.lock | 99 +++++++++++++++++++++++++++++++++++++++-- 5 files changed, 122 insertions(+), 6 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 56461ef..5e7a150 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -23,6 +23,11 @@ bazel_dep(name = "bazel_skylib", version = "1.8.2") # ******************************************************************************* bazel_dep(name = "platforms", version = "1.1.0") bazel_dep(name = "score_bazel_platforms", version = "1.0.0") +git_override( + module_name = "score_bazel_platforms", + branch = "add-ebclfsa-beta2", + remote = "https://github.com/eclipse-score/bazel_platforms.git", +) # ******************************************************************************* # C++ Rules for Bazel diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index c61db5c..4c4eebd 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -487,8 +487,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.5.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.6.1/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.0.0/MODULE.bazel": "e5e386e6fc0a447a2f4a47e872e3747822e9d58994b7b55e248c78e5a3e382c0", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.0.0/source.json": "fb428e5f4cb6cbf0e00442e72c8d038746e0eaa7493dcec394ee99be727dcb3b", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.2.2/MODULE.bazel": "dc36d9c35543db918c3fb5b93a8e684431f56c7c784cf2a1b90f35802a373c98", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.3.1/MODULE.bazel": "f49e037d7fbc0b2a8b2734fc6b47334e8cc8589ca7a5aa0f3ccca85cc5f79fac", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5", diff --git a/tests/.bazelrc b/tests/.bazelrc index 47b095d..1b76a58 100644 --- a/tests/.bazelrc +++ b/tests/.bazelrc @@ -104,3 +104,7 @@ build:x86_64-linux-autosd10 --extra_toolchains=@score_autosd_10_toolchain//:x86_ build:aarch64-linux-ebclfsa --config=shared build:aarch64-linux-ebclfsa --platforms=@score_bazel_platforms//:aarch64-linux-sdk_0.1.0-ebclfsa build:aarch64-linux-ebclfsa --extra_toolchains=@score_ebclfsa_toolchain//:aarch64-linux-sdk_0.1.0-ebclfsa + +build:aarch64-linux-ebclfsa-2.0.0-beta2 --config=shared +build:aarch64-linux-ebclfsa-2.0.0-beta2 --platforms=@score_bazel_platforms//:aarch64-linux-sdk_2.0.0-beta2-ebclfsa +build:aarch64-linux-ebclfsa-2.0.0-beta2 --extra_toolchains=@score_ebclfsa_2.0.0-beta2_toolchain//:aarch64-linux-sdk_2.0.0-beta2-ebclfsa diff --git a/tests/MODULE.bazel b/tests/MODULE.bazel index 6f275c1..46641df 100644 --- a/tests/MODULE.bazel +++ b/tests/MODULE.bazel @@ -34,6 +34,11 @@ bazel_dep(name = "platforms", version = "1.1.0") # TODO: DO NOT MERGE IT WITH THIS !!!! bazel_dep(name = "score_bazel_platforms", version = "1.0.0") +git_override( + module_name = "score_bazel_platforms", + branch = "add-ebclfsa-beta2", + remote = "https://github.com/eclipse-score/bazel_platforms.git", +) # ******************************************************************************* # C++ Rules for Bazel @@ -191,12 +196,25 @@ gcc.toolchain( target_os = "linux", use_default_package = True, ) + +# ******************************************************************************* +# Setting EBcLfSA 2.0.0-beta2 GCC (CPU:aarch64|OS:Linux|V:ebclfsa-2.0.0-beta2|ES:ebclfsa) +# ******************************************************************************* +gcc.toolchain( + name = "score_ebclfsa_2.0.0-beta2_toolchain", + runtime_ecosystem = "ebclfsa", + sdk_version = "2.0.0-beta2", + target_cpu = "aarch64", + target_os = "linux", + use_default_package = True, +) use_repo( gcc, "my_toolchain", "score_aarch64_gcc_toolchain", "score_aarch64_gcc_toolchain_15", "score_autosd_10_toolchain", + "score_ebclfsa_2.0.0-beta2_toolchain", "score_ebclfsa_toolchain", "score_gcc_toolchain", "score_gcc_toolchain_15", diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index c8b3882..75c1ef9 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -536,9 +536,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.5.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.6.1/MODULE.bazel": "not found", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.1.1/MODULE.bazel": "236e5bdff6f2d6de6f96cc4f5f4b1bf2cd6137547ce279668a2dd4c54cd4236c", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.0.0/MODULE.bazel": "e5e386e6fc0a447a2f4a47e872e3747822e9d58994b7b55e248c78e5a3e382c0", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.0.0/source.json": "fb428e5f4cb6cbf0e00442e72c8d038746e0eaa7493dcec394ee99be727dcb3b", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.2.2/MODULE.bazel": "dc36d9c35543db918c3fb5b93a8e684431f56c7c784cf2a1b90f35802a373c98", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.3.1/MODULE.bazel": "f49e037d7fbc0b2a8b2734fc6b47334e8cc8589ca7a5aa0f3ccca85cc5f79fac", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5", @@ -1370,7 +1367,7 @@ "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { "bzlTransitiveDigest": "FQRbNLfhV36RTWwxZnchbhkOAT1fIA2dJhlRnKyRtD8=", - "usagesDigest": "dWr2zFjJ8fBvweFk2KWoZzQqJ+aKnb9A8QACQhKlUfw=", + "usagesDigest": "3BxGiccNNlFja9y/vd4+7TlTcgtjWIybmed7P06K9QM=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1485,6 +1482,17 @@ "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64" } }, + "score_ebclfsa_2.0.0-beta2_toolchain_pkg": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "urls": [ + "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz" + ], + "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/ebclfsa/2.0.0-beta2:ebclfsa.BUILD", + "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", + "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64" + } + }, "score_gcc_toolchain_bp": { "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", "attributes": { @@ -1844,6 +1852,89 @@ "cc_toolchain_flags": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_flags.bzl.template", "use_base_constraints_only": false } + }, + "score_ebclfsa_2.0.0-beta2_toolchain": { + "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", + "attributes": { + "extra_compile_flags": [], + "extra_c_compile_flags": [ + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "--no-canonical-prefixes" + ], + "extra_cxx_compile_flags": [ + "-nostdinc++", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/aarch64-linux-gnu", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/backward", + "-nostdinc", + "-isystem", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", + "-isystem", + "external/%{toolchain_pkg}%/usr/include/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "--no-canonical-prefixes" + ], + "extra_known_features": [], + "extra_enabled_features": [], + "extra_link_flags": [ + "-B", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/bin", + "-L", + "external/%{toolchain_pkg}%/lib/aarch64-linux-gnu", + "-L", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib", + "-L", + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "-lm", + "-ldl", + "-lrt", + "-static-libstdc++", + "-static-libgcc", + "-static", + "--no-canonical-prefixes" + ], + "license_info_variable": "", + "license_info_value": "", + "license_path": "/opt/score_qnx/license/licenses", + "sdk_version": "2.0.0-beta2", + "sdp_version": "", + "tc_compiler_library_search_paths": [ + "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", + "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu" + ], + "tc_cpu": "aarch64", + "tc_identifier": "sdk_2.0.0-beta2", + "tc_os": "linux", + "tc_pkg_repo": "score_ebclfsa_2.0.0-beta2_toolchain_pkg", + "tc_system_toolchain": false, + "tc_runtime_ecosystem": "ebclfsa", + "gcc_version": "", + "cc_toolchain_config": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_config.bzl.template", + "cc_toolchain_flags": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_flags.bzl.template", + "use_base_constraints_only": false + } } }, "recordedRepoMappingEntries": [ From bd411363567e1b1ed0690c334ca310dc2b30b363 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 12:42:22 +0000 Subject: [PATCH 15/25] add 2.0.0-beta2 to workflow --- .github/workflows/ebclfsa.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ebclfsa.yml b/.github/workflows/ebclfsa.yml index ee239cd..ab89aae 100644 --- a/.github/workflows/ebclfsa.yml +++ b/.github/workflows/ebclfsa.yml @@ -26,6 +26,9 @@ on: jobs: aarch64-ebclfsa: runs-on: ubuntu-latest + matrix: + version: [0.1.0, 2.0.0-beta2] + name: Bazel Build (Aarch64-Linux)(ebclfsa) ${{ matrix.version }} defaults: run: working-directory: ./tests @@ -41,7 +44,7 @@ jobs: cache-save: ${{ github.event_name == 'push' }} - name: Bazel Build (basic) run: | - bazel build --lockfile_mode=error --config=aarch64-linux-ebclfsa -- //:language_and_standards_tests //:feature_verification_tests + bazel build --lockfile_mode=error --config=${{ matrix.version }} -- //:language_and_standards_tests //:feature_verification_tests - name: Guardrail (no legacy features) run: | - bazel test --lockfile_mode=error --config=aarch64-linux-ebclfsa -- //:guardrail_tests + bazel test --lockfile_mode=error --config=${{ matrix.version }} -- //:guardrail_tests From 9c6f96d54ecad66444fbbcc002edc7f168a1f5a5 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 12:45:32 +0000 Subject: [PATCH 16/25] use correct config values in workflow --- .github/workflows/ebclfsa.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ebclfsa.yml b/.github/workflows/ebclfsa.yml index ab89aae..364abec 100644 --- a/.github/workflows/ebclfsa.yml +++ b/.github/workflows/ebclfsa.yml @@ -27,8 +27,8 @@ jobs: aarch64-ebclfsa: runs-on: ubuntu-latest matrix: - version: [0.1.0, 2.0.0-beta2] - name: Bazel Build (Aarch64-Linux)(ebclfsa) ${{ matrix.version }} + config: [aarch64-linux-ebclfsa, aarch64-linux-ebclfsa-2.0.0-beta2] + name: Bazel Build (Aarch64-Linux)(ebclfsa) ${{ matrix.config }} defaults: run: working-directory: ./tests @@ -44,7 +44,7 @@ jobs: cache-save: ${{ github.event_name == 'push' }} - name: Bazel Build (basic) run: | - bazel build --lockfile_mode=error --config=${{ matrix.version }} -- //:language_and_standards_tests //:feature_verification_tests + bazel build --lockfile_mode=error --config=${{ matrix.config }} -- //:language_and_standards_tests //:feature_verification_tests - name: Guardrail (no legacy features) run: | - bazel test --lockfile_mode=error --config=${{ matrix.version }} -- //:guardrail_tests + bazel test --lockfile_mode=error --config=${{ matrix.config }} -- //:guardrail_tests From e61619f7a69507fee848883289756863bb57dfed Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 12:52:08 +0000 Subject: [PATCH 17/25] fix matrix --- .github/workflows/ebclfsa.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ebclfsa.yml b/.github/workflows/ebclfsa.yml index 364abec..de50e6a 100644 --- a/.github/workflows/ebclfsa.yml +++ b/.github/workflows/ebclfsa.yml @@ -26,8 +26,9 @@ on: jobs: aarch64-ebclfsa: runs-on: ubuntu-latest - matrix: - config: [aarch64-linux-ebclfsa, aarch64-linux-ebclfsa-2.0.0-beta2] + strategy: + matrix: + config: [aarch64-linux-ebclfsa, aarch64-linux-ebclfsa-2.0.0-beta2] name: Bazel Build (Aarch64-Linux)(ebclfsa) ${{ matrix.config }} defaults: run: From 90c2ed659d5df003dbe14a74b15399085c2c6e46 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 12:54:05 +0000 Subject: [PATCH 18/25] no fail fast in workflow --- .github/workflows/ebclfsa.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ebclfsa.yml b/.github/workflows/ebclfsa.yml index de50e6a..abc3822 100644 --- a/.github/workflows/ebclfsa.yml +++ b/.github/workflows/ebclfsa.yml @@ -27,6 +27,7 @@ jobs: aarch64-ebclfsa: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: config: [aarch64-linux-ebclfsa, aarch64-linux-ebclfsa-2.0.0-beta2] name: Bazel Build (Aarch64-Linux)(ebclfsa) ${{ matrix.config }} From 409b3583730acad3ee395a6113f44da26b62c3e4 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 13:55:25 +0000 Subject: [PATCH 19/25] set correct gcc version --- .../linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD | 8 ++++---- packages/version_matrix.bzl | 10 +++++----- tests/MODULE.bazel.lock | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD b/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD index 96abad9..ed71b2d 100644 --- a/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD +++ b/packages/linux/aarch64/ebclfsa/2.0.0-beta2/ebclfsa.BUILD @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -"""Build file for EBcLfSA 0.1.0 toolchain package""" +"""Build file for EBcLfSA 2.0.0-beta2 toolchain package""" package(default_visibility = ["//visibility:public"]) @@ -46,17 +46,17 @@ filegroup( filegroup( name = "cc", - srcs = ["usr/bin/aarch64-linux-gnu-gcc-13"], + srcs = ["usr/bin/aarch64-linux-gnu-gcc-14"], ) filegroup( name = "gcov", - srcs = ["usr/bin/aarch64-linux-gnu-gcov-13"], + srcs = ["usr/bin/aarch64-linux-gnu-gcov-14"], ) filegroup( name = "cxx", - srcs = ["usr/bin/aarch64-linux-gnu-g++-13"], + srcs = ["usr/bin/aarch64-linux-gnu-g++-14"], ) filegroup( diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index cf69de9..81fc54b 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -210,7 +210,7 @@ VERSION_MATRIX = { "extra_c_compile_flags": [ "-nostdinc", "-isystem", - "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/14/include", "-isystem", "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", "-isystem", @@ -226,14 +226,14 @@ VERSION_MATRIX = { "extra_cxx_compile_flags": [ "-nostdinc++", "-isystem", - "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14", "-isystem", - "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/aarch64-linux-gnu", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14/aarch64-linux-gnu", "-isystem", - "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/backward", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14/backward", "-nostdinc", "-isystem", - "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/14/include", "-isystem", "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", "-isystem", diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index 75c1ef9..d93231c 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -1860,7 +1860,7 @@ "extra_c_compile_flags": [ "-nostdinc", "-isystem", - "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/14/include", "-isystem", "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", "-isystem", @@ -1876,14 +1876,14 @@ "extra_cxx_compile_flags": [ "-nostdinc++", "-isystem", - "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14", "-isystem", - "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/aarch64-linux-gnu", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14/aarch64-linux-gnu", "-isystem", - "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/backward", + "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14/backward", "-nostdinc", "-isystem", - "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include", + "external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/14/include", "-isystem", "external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include", "-isystem", From a7870b316c073aafde667dd34af9995824d30207 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 14:02:31 +0000 Subject: [PATCH 20/25] do not set compiler_library_search_paths --- packages/version_matrix.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 81fc54b..0e4dfaf 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -263,10 +263,10 @@ VERSION_MATRIX = { "-static", "--no-canonical-prefixes", ], - "compiler_library_search_paths": [ - "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", - "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu", - ], + # No `compiler_library_search_paths` on purpose: the SDK host binaries already + # carry an $ORIGIN rpath to their own libraries, and exporting the SDK's + # glibc 2.41 via LD_LIBRARY_PATH would also be inherited by Bazel's own + # process-wrapper, which is linked against the (older) host glibc. "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64", "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz", From 6d33a7b951d0c86f8fa8d2214af4562b27965d8f Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Thu, 27 Aug 2026 14:02:45 +0000 Subject: [PATCH 21/25] work around RPATH issue --- extensions/gcc.bzl | 8 ++++++++ packages/version_matrix.bzl | 27 +++++++++++++++++++++++++++ tests/MODULE.bazel.lock | 20 +++++++++++++++----- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/extensions/gcc.bzl b/extensions/gcc.bzl index 51569a7..fee2620 100644 --- a/extensions/gcc.bzl +++ b/extensions/gcc.bzl @@ -39,6 +39,11 @@ _attrs_sdp = { default = "", doc = "package name of toolchain, default set to toolchain toolchain name + `_pkg`.", ), + "patch_cmds": attr.string_list( + mandatory = False, + default = [], + doc = "Bash commands executed in the extracted archive root after extraction.", + ), "sha256": attr.string( mandatory = False, default = "", @@ -185,6 +190,7 @@ def _get_packages(tags): packages.append({ "build_file": tag.build_file, "name": tag.name, + "patch_cmds": tag.patch_cmds, "sha256": tag.sha256, "strip_prefix": tag.strip_prefix, "url": tag.url, @@ -301,6 +307,7 @@ def _create_and_link_sdp(toolchain_info): return { "build_file": matrix["build_file"], "name": pkg_name, + "patch_cmds": matrix.get("patch_cmds", []), "sha256": matrix["sha256"], "strip_prefix": matrix["strip_prefix"], "url": matrix["url"], @@ -389,6 +396,7 @@ def _impl(mctx): name = archive_info["name"], urls = [archive_info["url"]], build_file = archive_info["build_file"], + patch_cmds = archive_info["patch_cmds"], sha256 = archive_info["sha256"], strip_prefix = archive_info["strip_prefix"], ) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 0e4dfaf..623a59f 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -14,6 +14,28 @@ """ Configuration file holding list of predefeined GCC/SDP packages. """ +# Rewrites the ELF interpreter of every host executable shipped by an EB corbos +# SDK to the loader bundled with that SDK. This is the same operation the SDK's +# own `relocate-sdk.sh` performs; it is inlined here because neither `patchelf` +# nor `file` can be assumed to exist on the host, and the SDK-provided `patchelf` +# cannot start before the interpreter is fixed (hence the explicit loader call). +# Each entry of `patch_cmds` is passed to a separate `bash -c`, so this has to +# stay a single command. +_EBCLFSA_RELOCATE_CMDS = [ + "sdk=$(pwd); " + + "loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; " + + "test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; " + + # patchelf lives inside the tree that is about to be rewritten, so work on a copy. + "tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; " + + "run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; " + + "for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do " + + "interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; " + + "test -n \"$interpreter\" || continue; " + + "run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; " + + "done; " + + "rm -rf \"$tmp\"", +] + VERSION_MATRIX = { "aarch64-linux-gcc_12.2.0": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/gcc/12.2.0:gcc.BUILD", @@ -270,6 +292,11 @@ VERSION_MATRIX = { "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64", "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz", + # The SDK host binaries carry an $ORIGIN rpath into the SDK's own glibc 2.41 + # but still request the host loader (/lib64/ld-linux-x86-64.so.2). Running a + # newer libc under an older ld.so aborts with "stack smashing detected", so + # repoint the interpreter at the SDK loader (what relocate-sdk.sh does). + "patch_cmds": _EBCLFSA_RELOCATE_CMDS, }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index d93231c..c468075 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -1366,7 +1366,7 @@ }, "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { - "bzlTransitiveDigest": "FQRbNLfhV36RTWwxZnchbhkOAT1fIA2dJhlRnKyRtD8=", + "bzlTransitiveDigest": "lOun4mc57t3wN7Bxy05nWIcYlmZsv6B2lwa55N9Xokk=", "usagesDigest": "3BxGiccNNlFja9y/vd4+7TlTcgtjWIybmed7P06K9QM=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -1379,6 +1379,7 @@ "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/gcc/12.2.0:gcc.BUILD", + "patch_cmds": [], "sha256": "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600", "strip_prefix": "x86_64-unknown-linux-gnu" } @@ -1390,6 +1391,7 @@ "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.4/x86_64-unknown-linux-gnu_gcc12.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/gcc/12.2.0:gcc.BUILD", + "patch_cmds": [], "sha256": "e9b9a7a63a5f8271b76d6e2057906b95c7a244e4931a8e10edeaa241e9f7c11e", "strip_prefix": "x86_64-unknown-linux-gnu" } @@ -1401,6 +1403,7 @@ "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.4/x86_64-unknown-linux-gnu_gcc12.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/gcc/12.2.0:gcc.BUILD", + "patch_cmds": [], "sha256": "e9b9a7a63a5f8271b76d6e2057906b95c7a244e4931a8e10edeaa241e9f7c11e", "strip_prefix": "x86_64-unknown-linux-gnu" } @@ -1412,6 +1415,7 @@ "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.5/x86_64-unknown-linux-gnu_gcc15.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/gcc/15.3.0:gcc.BUILD", + "patch_cmds": [], "sha256": "c65e21725d4d9993bab0b4ef2aed7065a4bf1b0f232a068d778eb670f80daa60", "strip_prefix": "x86_64-unknown-linux-gnu" } @@ -1423,6 +1427,7 @@ "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.4/aarch64-unknown-linux-gnu_gcc12.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/gcc/12.2.0:gcc.BUILD", + "patch_cmds": [], "sha256": "7279b1adb50361b21f5266b001980b6febb35fa8d83170901196b9edae3f06d9", "strip_prefix": "aarch64-unknown-linux-gnu" } @@ -1434,6 +1439,7 @@ "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.5/aarch64-unknown-linux-gnu_gcc15.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/gcc/15.3.0:gcc.BUILD", + "patch_cmds": [], "sha256": "ff9fe6caed22f15a1dd87a93bff5cfa1536b5dddcff3364827f97ebc01a494a1", "strip_prefix": "aarch64-unknown-linux-gnu" } @@ -1445,6 +1451,7 @@ "https://www.qnx.com/download/download/88447/installation_qnx_804_260520.tar.xz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", + "patch_cmds": [], "sha256": "146312c0bf22aab66e8294a06403f2ec6cfeeb074d8fa11549faffd84b7fe778", "strip_prefix": "" } @@ -1456,6 +1463,7 @@ "https://www.qnx.com/download/download/88447/installation_qnx_804_260520.tar.xz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/qnx/aarch64/sdp/8.0.0:sdp.BUILD", + "patch_cmds": [], "sha256": "146312c0bf22aab66e8294a06403f2ec6cfeeb074d8fa11549faffd84b7fe778", "strip_prefix": "" } @@ -1467,6 +1475,7 @@ "https://github.com/eclipse-score/os_autosd/releases/download/v0.0.2/autosd-toolchain-x86_64.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/autosd/10.0:autosd.BUILD", + "patch_cmds": [], "sha256": "25991056bd29d4cb37b11e42d0c09f55dc61d0b9d703f75d854cf614f688c96f", "strip_prefix": "sysroot" } @@ -1478,6 +1487,7 @@ "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/ebclfsa/0.1.0:ebclfsa.BUILD", + "patch_cmds": [], "sha256": "f44286c28d831dc40acdac08ef49f38a2e9cbb057bea38c25834964693785287", "strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64" } @@ -1489,6 +1499,9 @@ "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/ebclfsa/2.0.0-beta2:ebclfsa.BUILD", + "patch_cmds": [ + "sdk=$(pwd); loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; test -n \"$interpreter\" || continue; run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; done; rm -rf \"$tmp\"" + ], "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64" } @@ -1920,10 +1933,7 @@ "license_path": "/opt/score_qnx/license/licenses", "sdk_version": "2.0.0-beta2", "sdp_version": "", - "tc_compiler_library_search_paths": [ - "external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu", - "external/%{toolchain_pkg}%/lib/x86_64-linux-gnu" - ], + "tc_compiler_library_search_paths": [], "tc_cpu": "aarch64", "tc_identifier": "sdk_2.0.0-beta2", "tc_os": "linux", From 485ccc75937699bdcaaaea2bc0a7a9231801b597 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Fri, 28 Aug 2026 14:31:13 +0000 Subject: [PATCH 22/25] use PoC without the need for patch_cmds --- packages/version_matrix.bzl | 33 +++------------------------------ tests/MODULE.bazel.lock | 12 +++++------- 2 files changed, 8 insertions(+), 37 deletions(-) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 623a59f..3ed8b10 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -14,28 +14,6 @@ """ Configuration file holding list of predefeined GCC/SDP packages. """ -# Rewrites the ELF interpreter of every host executable shipped by an EB corbos -# SDK to the loader bundled with that SDK. This is the same operation the SDK's -# own `relocate-sdk.sh` performs; it is inlined here because neither `patchelf` -# nor `file` can be assumed to exist on the host, and the SDK-provided `patchelf` -# cannot start before the interpreter is fixed (hence the explicit loader call). -# Each entry of `patch_cmds` is passed to a separate `bash -c`, so this has to -# stay a single command. -_EBCLFSA_RELOCATE_CMDS = [ - "sdk=$(pwd); " + - "loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; " + - "test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; " + - # patchelf lives inside the tree that is about to be rewritten, so work on a copy. - "tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; " + - "run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; " + - "for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do " + - "interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; " + - "test -n \"$interpreter\" || continue; " + - "run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; " + - "done; " + - "rm -rf \"$tmp\"", -] - VERSION_MATRIX = { "aarch64-linux-gcc_12.2.0": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/gcc/12.2.0:gcc.BUILD", @@ -289,14 +267,9 @@ VERSION_MATRIX = { # carry an $ORIGIN rpath to their own libraries, and exporting the SDK's # glibc 2.41 via LD_LIBRARY_PATH would also be inherited by Bazel's own # process-wrapper, which is linked against the (older) host glibc. - "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64", - "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", - "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz", - # The SDK host binaries carry an $ORIGIN rpath into the SDK's own glibc 2.41 - # but still request the host loader (/lib64/ld-linux-x86-64.so.2). Running a - # newer libc under an older ld.so aborts with "stack smashing detected", so - # repoint the interpreter at the SDK loader (what relocate-sdk.sh does). - "patch_cmds": _EBCLFSA_RELOCATE_CMDS, + "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained", + "sha256": "1e81b2bd210aeb44323eadcefaf9d0f57071ba3284c6de3bf53b21f865525650", + "url": "https://github.com/lurtz/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained.tar.gz", }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index c468075..6983884 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -1366,7 +1366,7 @@ }, "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { - "bzlTransitiveDigest": "lOun4mc57t3wN7Bxy05nWIcYlmZsv6B2lwa55N9Xokk=", + "bzlTransitiveDigest": "IcYI3a2AaE7j2xvmy/C7lGYOKUH6xVHkRGRvvrWIKaU=", "usagesDigest": "3BxGiccNNlFja9y/vd4+7TlTcgtjWIybmed7P06K9QM=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -1496,14 +1496,12 @@ "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { "urls": [ - "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz" + "https://github.com/lurtz/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/ebclfsa/2.0.0-beta2:ebclfsa.BUILD", - "patch_cmds": [ - "sdk=$(pwd); loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; test -n \"$interpreter\" || continue; run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; done; rm -rf \"$tmp\"" - ], - "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", - "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64" + "patch_cmds": [], + "sha256": "1e81b2bd210aeb44323eadcefaf9d0f57071ba3284c6de3bf53b21f865525650", + "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained" } }, "score_gcc_toolchain_bp": { From d4b0e30b26cca4c461f02afe789aa7d5af84b09a Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Fri, 28 Aug 2026 19:40:52 +0000 Subject: [PATCH 23/25] Revert "use PoC without the need for patch_cmds" This reverts commit 485ccc75937699bdcaaaea2bc0a7a9231801b597. --- packages/version_matrix.bzl | 33 ++++++++++++++++++++++++++++++--- tests/MODULE.bazel.lock | 12 +++++++----- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 3ed8b10..623a59f 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -14,6 +14,28 @@ """ Configuration file holding list of predefeined GCC/SDP packages. """ +# Rewrites the ELF interpreter of every host executable shipped by an EB corbos +# SDK to the loader bundled with that SDK. This is the same operation the SDK's +# own `relocate-sdk.sh` performs; it is inlined here because neither `patchelf` +# nor `file` can be assumed to exist on the host, and the SDK-provided `patchelf` +# cannot start before the interpreter is fixed (hence the explicit loader call). +# Each entry of `patch_cmds` is passed to a separate `bash -c`, so this has to +# stay a single command. +_EBCLFSA_RELOCATE_CMDS = [ + "sdk=$(pwd); " + + "loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; " + + "test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; " + + # patchelf lives inside the tree that is about to be rewritten, so work on a copy. + "tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; " + + "run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; " + + "for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do " + + "interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; " + + "test -n \"$interpreter\" || continue; " + + "run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; " + + "done; " + + "rm -rf \"$tmp\"", +] + VERSION_MATRIX = { "aarch64-linux-gcc_12.2.0": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/gcc/12.2.0:gcc.BUILD", @@ -267,9 +289,14 @@ VERSION_MATRIX = { # carry an $ORIGIN rpath to their own libraries, and exporting the SDK's # glibc 2.41 via LD_LIBRARY_PATH would also be inherited by Bazel's own # process-wrapper, which is linked against the (older) host glibc. - "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained", - "sha256": "1e81b2bd210aeb44323eadcefaf9d0f57071ba3284c6de3bf53b21f865525650", - "url": "https://github.com/lurtz/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained.tar.gz", + "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64", + "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", + "url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz", + # The SDK host binaries carry an $ORIGIN rpath into the SDK's own glibc 2.41 + # but still request the host loader (/lib64/ld-linux-x86-64.so.2). Running a + # newer libc under an older ld.so aborts with "stack smashing detected", so + # repoint the interpreter at the SDK loader (what relocate-sdk.sh does). + "patch_cmds": _EBCLFSA_RELOCATE_CMDS, }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index 6983884..c468075 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -1366,7 +1366,7 @@ }, "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { - "bzlTransitiveDigest": "IcYI3a2AaE7j2xvmy/C7lGYOKUH6xVHkRGRvvrWIKaU=", + "bzlTransitiveDigest": "lOun4mc57t3wN7Bxy05nWIcYlmZsv6B2lwa55N9Xokk=", "usagesDigest": "3BxGiccNNlFja9y/vd4+7TlTcgtjWIybmed7P06K9QM=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -1496,12 +1496,14 @@ "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { "urls": [ - "https://github.com/lurtz/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained.tar.gz" + "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta2/fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64.tar.gz" ], "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/aarch64/ebclfsa/2.0.0-beta2:ebclfsa.BUILD", - "patch_cmds": [], - "sha256": "1e81b2bd210aeb44323eadcefaf9d0f57071ba3284c6de3bf53b21f865525650", - "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64-self-contained" + "patch_cmds": [ + "sdk=$(pwd); loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; test -n \"$interpreter\" || continue; run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; done; rm -rf \"$tmp\"" + ], + "sha256": "4cf7f0191988795f316f276b56e370ad60fc371954a881d158ebba0284d9d3f5", + "strip_prefix": "fastdev-sdk-trixie-ebclfsa-ebcl-qemuarm64" } }, "score_gcc_toolchain_bp": { From 50c2f500adea246d3428e153a9b5697a11052967 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Fri, 28 Aug 2026 19:57:44 +0000 Subject: [PATCH 24/25] inline script to set INTERP --- packages/version_matrix.bzl | 44 ++++++++++++++++++------------------- tests/MODULE.bazel.lock | 2 +- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/packages/version_matrix.bzl b/packages/version_matrix.bzl index 623a59f..0d4ef61 100644 --- a/packages/version_matrix.bzl +++ b/packages/version_matrix.bzl @@ -14,28 +14,6 @@ """ Configuration file holding list of predefeined GCC/SDP packages. """ -# Rewrites the ELF interpreter of every host executable shipped by an EB corbos -# SDK to the loader bundled with that SDK. This is the same operation the SDK's -# own `relocate-sdk.sh` performs; it is inlined here because neither `patchelf` -# nor `file` can be assumed to exist on the host, and the SDK-provided `patchelf` -# cannot start before the interpreter is fixed (hence the explicit loader call). -# Each entry of `patch_cmds` is passed to a separate `bash -c`, so this has to -# stay a single command. -_EBCLFSA_RELOCATE_CMDS = [ - "sdk=$(pwd); " + - "loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; " + - "test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; " + - # patchelf lives inside the tree that is about to be rewritten, so work on a copy. - "tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; " + - "run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; " + - "for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do " + - "interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; " + - "test -n \"$interpreter\" || continue; " + - "run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; " + - "done; " + - "rm -rf \"$tmp\"", -] - VERSION_MATRIX = { "aarch64-linux-gcc_12.2.0": { "build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/gcc/12.2.0:gcc.BUILD", @@ -296,7 +274,27 @@ VERSION_MATRIX = { # but still request the host loader (/lib64/ld-linux-x86-64.so.2). Running a # newer libc under an older ld.so aborts with "stack smashing detected", so # repoint the interpreter at the SDK loader (what relocate-sdk.sh does). - "patch_cmds": _EBCLFSA_RELOCATE_CMDS, + # Rewrites the ELF interpreter of every host executable shipped by an EB corbos + # SDK to the loader bundled with that SDK. This is the same operation the SDK's + # own `relocate-sdk.sh` performs; it is inlined here because neither `patchelf` + # nor `file` can be assumed to exist on the host, and the SDK-provided `patchelf` + # cannot start before the interpreter is fixed (hence the explicit loader call). + # Each entry of `patch_cmds` is passed to a separate `bash -c`, so this has to + # stay a single command. + "patch_cmds": [ + "sdk=$(pwd); " + + "loader=$sdk/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2; " + + "test -x \"$loader\" -a -x \"$sdk/usr/bin/patchelf\" || exit 1; " + + # patchelf lives inside the tree that is about to be rewritten, so work on a copy. + "tmp=$(mktemp -d); cp \"$sdk/usr/bin/patchelf\" \"$tmp/patchelf\"; " + + "run_patchelf() { \"$loader\" --library-path \"$sdk/usr/lib/x86_64-linux-gnu:$sdk/lib/x86_64-linux-gnu\" \"$tmp/patchelf\" \"$@\"; }; " + + "for binary in $(find usr/bin usr/sbin usr/libexec/gcc* usr/lib/gcc-cross usr/lib/llvm-*/bin -type f -perm -u+x 2>/dev/null); do " + + "interpreter=$(run_patchelf --print-interpreter \"$binary\" 2>/dev/null) || continue; " + + "test -n \"$interpreter\" || continue; " + + "run_patchelf --set-interpreter \"$loader\" \"$binary\" >/dev/null 2>&1 || true; " + + "done; " + + "rm -rf \"$tmp\"", + ], }, "x86_64-qnx-sdp_8.0.0": { "build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD", diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index c468075..4b09234 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -1366,7 +1366,7 @@ }, "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { "general": { - "bzlTransitiveDigest": "lOun4mc57t3wN7Bxy05nWIcYlmZsv6B2lwa55N9Xokk=", + "bzlTransitiveDigest": "YbbJoOHV79wbmLSzyW0+FVq+0ih1OuW6v1am9MzMOmg=", "usagesDigest": "3BxGiccNNlFja9y/vd4+7TlTcgtjWIybmed7P06K9QM=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, From 4462cdf5040e4b652e047a410ab5face2c99bcfe Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Fri, 28 Aug 2026 21:12:20 +0000 Subject: [PATCH 25/25] use released version of bazel_platforms --- MODULE.bazel | 7 +------ MODULE.bazel.lock | 2 ++ tests/MODULE.bazel | 7 +------ tests/MODULE.bazel.lock | 4 ++++ 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 5e7a150..e06b31e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -22,12 +22,7 @@ bazel_dep(name = "bazel_skylib", version = "1.8.2") # Constraint values for specifying platforms and toolchains # ******************************************************************************* bazel_dep(name = "platforms", version = "1.1.0") -bazel_dep(name = "score_bazel_platforms", version = "1.0.0") -git_override( - module_name = "score_bazel_platforms", - branch = "add-ebclfsa-beta2", - remote = "https://github.com/eclipse-score/bazel_platforms.git", -) +bazel_dep(name = "score_bazel_platforms", version = "1.1.0") # ******************************************************************************* # C++ Rules for Bazel diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 4c4eebd..fc6d40d 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -487,6 +487,8 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.5.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.6.1/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.1.0/MODULE.bazel": "e5c656abcad121a89cbabad3550bb20167a6865de219ef6e1c68ca30567e1c32", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.1.0/source.json": "9797d56e9dd68e9d3e8b674402df2d6d5e2174f84184ca4cbee78fc07dc117d9", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.2.2/MODULE.bazel": "dc36d9c35543db918c3fb5b93a8e684431f56c7c784cf2a1b90f35802a373c98", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.3.1/MODULE.bazel": "f49e037d7fbc0b2a8b2734fc6b47334e8cc8589ca7a5aa0f3ccca85cc5f79fac", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5", diff --git a/tests/MODULE.bazel b/tests/MODULE.bazel index 46641df..f6d9352 100644 --- a/tests/MODULE.bazel +++ b/tests/MODULE.bazel @@ -33,12 +33,7 @@ bazel_dep(name = "bazel_skylib", version = "1.9.0") bazel_dep(name = "platforms", version = "1.1.0") # TODO: DO NOT MERGE IT WITH THIS !!!! -bazel_dep(name = "score_bazel_platforms", version = "1.0.0") -git_override( - module_name = "score_bazel_platforms", - branch = "add-ebclfsa-beta2", - remote = "https://github.com/eclipse-score/bazel_platforms.git", -) +bazel_dep(name = "score_bazel_platforms", version = "1.1.0") # ******************************************************************************* # C++ Rules for Bazel diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index 4b09234..0d7218f 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -536,6 +536,10 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.5.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_shell/0.6.1/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.1.1/MODULE.bazel": "236e5bdff6f2d6de6f96cc4f5f4b1bf2cd6137547ce279668a2dd4c54cd4236c", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.0.0/MODULE.bazel": "e5e386e6fc0a447a2f4a47e872e3747822e9d58994b7b55e248c78e5a3e382c0", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.1.0/MODULE.bazel": "e5c656abcad121a89cbabad3550bb20167a6865de219ef6e1c68ca30567e1c32", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/1.1.0/source.json": "9797d56e9dd68e9d3e8b674402df2d6d5e2174f84184ca4cbee78fc07dc117d9", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.2.2/MODULE.bazel": "dc36d9c35543db918c3fb5b93a8e684431f56c7c784cf2a1b90f35802a373c98", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_cr_checker/0.3.1/MODULE.bazel": "f49e037d7fbc0b2a8b2734fc6b47334e8cc8589ca7a5aa0f3ccca85cc5f79fac", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5",