Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ebclfsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
config: [aarch64-linux-ebclfsa-2.0.0-beta2]
config: [aarch64-linux-ebclfsa-2.0.0-beta2, aarch64-linux-ebclfsa-2.0.0-beta3]
name: Bazel Build (Aarch64-Linux)(ebclfsa) ${{ matrix.config }}
defaults:
run:
Expand Down
5 changes: 3 additions & 2 deletions docs/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ bazel test --config x86_64-linux //:language_and_standards_tests

The available `--config` values (for example `x86_64-linux`, `aarch64-linux`,
`x86_64-qnx`, `aarch64-qnx`, `x86_64-linux-autosd10`,
`aarch64-linux-ebclfsa-2.0.0-beta2`)
`aarch64-linux-ebclfsa-2.0.0-beta2`,
`aarch64-linux-ebclfsa-2.0.0-beta3`)
are defined in `tests/.bazelrc`.

For documentation-only changes, build or preview the Markdown site to catch
markup and table-of-contents/navigation issues before publishing.
markup and table-of-contents/navigation issues before publishing.
2 changes: 1 addition & 1 deletion docs/test_suite.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ bazel test --config x86_64-linux //...
#### Cross configurations (QNX, aarch64-linux, runtime-specific)

Configs such as `x86_64-qnx`, `aarch64-qnx`, `aarch64-linux`,
`x86_64-linux-autosd10`, and `aarch64-linux-ebclfsa-2.0.0-beta2` target platforms that
`x86_64-linux-autosd10`, and the EBcLfSA beta2/beta3 configs target platforms that
differ from a typical x86_64 Linux host. Do **not** run `bazel test` for these
configs on the host — the produced binaries are not executable there.

Expand Down
5 changes: 3 additions & 2 deletions docs/tests_and_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ for the exact `--config` names):
- Linux cross-compilation toolchains (`aarch64-linux`)
- runtime-specific Linux toolchains such as AutoSD (`x86_64-linux-autosd10`)
and EB corbos Linux for Safety Applications
(`aarch64-linux-ebclfsa-2.0.0-beta2`)
(`aarch64-linux-ebclfsa-2.0.0-beta2`,
`aarch64-linux-ebclfsa-2.0.0-beta3`)
- packaged QNX toolchains (`x86_64-qnx`, `aarch64-qnx`)

## Useful Commands
Expand Down Expand Up @@ -115,4 +116,4 @@ In practice this means checking among other things:
- basic linking behavior,
- feature coverage such as pthread-enabled builds, include-path handling, and
whole-archive linking,
- language and C++ standard-version support.
- language and C++ standard-version support.
16 changes: 16 additions & 0 deletions packages/linux/aarch64/ebclfsa/2.0.0-beta3/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# *******************************************************************************
# Copyright (c) 2026 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",
])
80 changes: 80 additions & 0 deletions packages/linux/aarch64/ebclfsa/2.0.0-beta3/ebclfsa.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# *******************************************************************************
# Copyright (c) 2026 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 2.0.0-beta3 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-14"],
)

filegroup(
name = "gcov",
srcs = ["usr/bin/aarch64-linux-gnu-gcov-14"],
)

filegroup(
name = "cxx",
srcs = ["usr/bin/aarch64-linux-gnu-g++-14"],
)

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 = ["."],
)

filegroup(
name = "cxx_builtin_include_directories",
)
90 changes: 90 additions & 0 deletions packages/version_matrix.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,96 @@ VERSION_MATRIX = {
"rm -rf \"$tmp\"",
],
},
"aarch64-linux-sdk_2.0.0-beta3-ebclfsa": {
"build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/ebclfsa/2.0.0-beta3:ebclfsa.BUILD",
"extra_c_compile_flags": [
"-nostdinc",
"-isystem",
"external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/14/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++/14",
"-isystem",
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14/aarch64-linux-gnu",
"-isystem",
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/14/backward",
"-nostdinc",
"-isystem",
"external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/14/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_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",
],
# 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": "72632b0925b1440e6470b429a97c62fb391bb3bf304adb11e6b79fa4410affc3",
"url": "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta3/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).
# 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; " +
"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",
"sha256": "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
Expand Down
3 changes: 3 additions & 0 deletions tests/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ build:x86_64-linux-autosd10 --extra_toolchains=@score_autosd_10_toolchain//:x86_
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
build:aarch64-linux-ebclfsa-2.0.0-beta3 --config=shared
build:aarch64-linux-ebclfsa-2.0.0-beta3 --platforms=@score_bazel_platforms//:aarch64-linux-sdk_2.0.0-beta3-ebclfsa
build:aarch64-linux-ebclfsa-2.0.0-beta3 --extra_toolchains=@score_ebclfsa_2.0.0-beta3_toolchain//:aarch64-linux-sdk_2.0.0-beta3-ebclfsa
14 changes: 14 additions & 0 deletions tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ bazel_dep(name = "bazel_skylib", version = "1.9.0")
# *******************************************************************************
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "score_bazel_platforms", version = "1.1.0")
git_override(
module_name = "score_bazel_platforms",
commit = "081dcf7bdbc94d05bbe354291e13a775dbf8f3e6",
remote = "https://github.com/eclipse-score/bazel_platforms.git",
)

# *******************************************************************************
# C++ Rules for Bazel
Expand Down Expand Up @@ -200,13 +205,22 @@ gcc.toolchain(
target_os = "linux",
use_default_package = True,
)
gcc.toolchain(
name = "score_ebclfsa_2.0.0-beta3_toolchain",
runtime_ecosystem = "ebclfsa",
sdk_version = "2.0.0-beta3",
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_2.0.0-beta3_toolchain",
"score_gcc_toolchain",
"score_gcc_toolchain_15",
"score_gcc_toolchain_bp",
Expand Down
Loading
Loading