Skip to content

Commit dba298a

Browse files
committed
Add EBcLfSA Toolchain
Added "aarch64-linux-sdk_0.1.0-ebclfsa", a GCC-based toolchain for EB corbos Linux for Safety Applications. This is *not* the final toolchain, since that will require a clang-based compiler and a special libc.
1 parent 7998225 commit dba298a

File tree

7 files changed

+151
-0
lines changed

7 files changed

+151
-0
lines changed

examples/.bazelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,11 @@ build:target_config_3 --extra_toolchains=@score_aarch64_gcc_toolchain//:aarch64-
6868
build:target_config_4 --config=host_config_1
6969
build:target_config_4 --platforms=@score_bazel_platforms//:x86_64-linux-autosd10
7070
build:target_config_4 --extra_toolchains=@score_autosd_10_toolchain//:x86_64-linux-autosd10
71+
72+
# -------------------------------------------------------------------------------
73+
# Config dedicated to target platform CPU:aarch64 and OS:ebclfsa
74+
# -------------------------------------------------------------------------------
75+
build:aarch64-ebclfsa --config=shared
76+
build:aarch64-ebclfsa --platforms=@score_bazel_platforms//:aarch64-linux-sdk_0.1.0-ebclfsa
77+
build:aarch64-ebclfsa --extra_toolchains=@score_ebclfsa_toolchain//:aarch64-linux-sdk_0.1.0-ebclfsa
78+
build:aarch64-ebclfsa --spawn_strategy=local

examples/MODULE.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@ gcc.toolchain(
144144
use_default_package = True,
145145
)
146146

147+
# *******************************************************************************
148+
# Setting EBcLfSA 0.1.0 GCC (CPU:aarch64|OS:Linux|V:ebclfsa-0.1.0|ES:ebclfsa)
149+
# *******************************************************************************
150+
gcc.toolchain(
151+
name = "score_ebclfsa_toolchain",
152+
target_os = "linux",
153+
target_cpu = "aarch64",
154+
runtime_ecosystem = "ebclfsa",
155+
sdk_version = "0.1.0",
156+
use_default_package = True,
157+
)
158+
147159
use_repo(
148160
gcc,
149161
"my_toolchain",
@@ -153,6 +165,7 @@ use_repo(
153165
"score_gcc_toolchain",
154166
"score_qcc_arm_toolchain",
155167
"score_qcc_toolchain",
168+
"score_ebclfsa_toolchain",
156169
)
157170

158171
# register_toolchains(

examples/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ bazel build --config=target_config_3 //:main_cpp
4444
bazel build --config=target_config_3 //:main_pthread_cpp
4545
```
4646

47+
**Build for EB corbos Linux for Safety Applications (ARM64):**
48+
```bash
49+
bazel build --config=aarch64-ebclfsa //:main_cpp
50+
bazel build --config=aarch64-ebclfsa //:main_pthread_cpp
51+
bazel test --config=aarch64-ebclfsa //:math_lib_test # this works if you have qemu-user-static installed and configured correctly
52+
```
53+
4754
### QNX Target Builds
4855

4956
> **Note:** Take care of license requirements when using these toolchains and dependencies in your projects.

examples/test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ bazel build --config target_config_3 //:main_cpp
2020
bazel clean --expunge
2121
echo -e "Testing 'target_config_4' ..."
2222
bazel build --config target_config_4 //:main_cpp
23+
bazel clean --expunge
24+
echo -e "Testing 'aarch64-ebclfsa' ..."
25+
bazel build --config aarch64-ebclfsa //:main_cpp
2326
bazel clean --expunge
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
14+
exports_files([
15+
"ebclfsa.BUILD",
16+
])
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
14+
"""Build file for EBcLfSA 0.1.0 toolchain package"""
15+
16+
package(default_visibility = ["//visibility:public"])
17+
18+
filegroup(
19+
name = "all_files",
20+
srcs = glob(["*/**/*"], exclude = ["usr/share/ca-certificates/**","usr/lib/ssl/certs/**", "lib/ssl/certs/**", "etc/ssl/certs/**", "usr/share/man/**", "var/lib/**"]),
21+
)
22+
23+
filegroup(
24+
name = "bin",
25+
srcs = ["usr/bin"],
26+
)
27+
28+
filegroup(
29+
name = "ar",
30+
srcs = ["usr/bin/aarch64-linux-gnu-ar"],
31+
)
32+
33+
filegroup(
34+
name = "cc",
35+
srcs = ["usr/bin/aarch64-linux-gnu-gcc-13.bin"],
36+
)
37+
38+
filegroup(
39+
name = "gcov",
40+
srcs = ["usr/bin/aarch64-linux-gnu-gcov-13"],
41+
)
42+
43+
filegroup(
44+
name = "cxx",
45+
srcs = ["usr/bin/aarch64-linux-gnu-g++-13.bin"],
46+
)
47+
48+
filegroup(
49+
name = "strip",
50+
srcs = ["usr/bin/aarch64-linux-gnu-strip"],
51+
)
52+
53+
filegroup(
54+
name = "elf-enabler",
55+
srcs = ["usr/bin/lisa-elf-enabler"],
56+
)
57+
58+
# The sysroot for EBcLfSA is the entire extracted directory
59+
filegroup(
60+
name = "sysroot_dir",
61+
srcs = ["."],
62+
)

packages/version_matrix.bzl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,48 @@ VERSION_MATRIX = {
124124
"strip_prefix": "sysroot",
125125
"url": "https://github.com/eclipse-score/inc_os_autosd/releases/download/continuous/autosd-toolchain-x86_64.tar.gz",
126126
},
127+
"aarch64-linux-sdk_0.1.0-ebclfsa": {
128+
"build_file": "@score_bazel_cpp_toolchains//packages/linux/aarch64/ebclfsa/0.1.0:ebclfsa.BUILD",
129+
"extra_c_compile_flags": [
130+
"-nostdinc",
131+
"-isystem",
132+
"external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include",
133+
"-isystem",
134+
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include",
135+
],
136+
"extra_cxx_compile_flags": [
137+
"-nostdinc++",
138+
"-isystem",
139+
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13",
140+
"-isystem",
141+
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/aarch64-linux-gnu",
142+
"-isystem",
143+
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include/c++/13/backward",
144+
"-nostdinc",
145+
"-isystem",
146+
"external/%{toolchain_pkg}%/usr/lib/gcc-cross/aarch64-linux-gnu/13/include",
147+
"-isystem",
148+
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/include",
149+
],
150+
"extra_link_flags": [
151+
"-L",
152+
"external/%{toolchain_pkg}%/lib/aarch64-linux-gnu",
153+
"-L",
154+
"external/%{toolchain_pkg}%/usr/aarch64-linux-gnu/lib",
155+
"-L",
156+
"external/%{toolchain_pkg}%/usr/lib/x86_64-linux-gnu",
157+
"-lm",
158+
"-ldl",
159+
"-lrt",
160+
"-static-libstdc++",
161+
"-static-libgcc",
162+
"-static",
163+
"-no-canonical-prefixes"
164+
],
165+
"sha256": "05b57bbc8d99d46df6b57f774c39a5a2664964ea7eb94147cbece08508c1f121",
166+
"strip_prefix": "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64",
167+
"url": "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
168+
},
127169
"x86_64-qnx-sdp_8.0.0": {
128170
"build_file": "@score_bazel_cpp_toolchains//packages/qnx/x86_64/sdp/8.0.0:sdp.BUILD",
129171
"sha256": "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",

0 commit comments

Comments
 (0)