eclipse-score / eclipse-score/bazel_cpp_toolchains

Missing sysroot flags for assembler actions in 1.0.3 for autosd10 build

Đã đóng
#141 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Starlark
Star
2
Fork
11
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
14

Mô tả

### Description

In version 1.0.3, the sysroot configuration seems to be missing for assembler actions. This causes the compiler to fall back to the host system paths (e.g., /usr/include) when compiling .S assembly files, breaking build hermeticity and throwing absolute path inclusion(s) found in rule errors in Bazel.

Note that the same build worked in 0.5.4

### Analysis results

_No response_

### Solution

_No response_

### Error Occurrence Rate

None

### How to reproduce

- Use score_bazel_cpp_toolchains version 1.0.3.
- use autosd toolchain:

> gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc")
> gcc.toolchain(
> name = "score_cc_autosd10_x86_64",
> runtime_ecosystem = "autosd10",
> target_cpu = "x86_64",
> target_os = "linux",
> use_default_package = True,
> )

- Try to compile a project that includes pure assembly files with a C preprocessor (e.g., BoringSSL with its .S files).
- The build will fail during the assembly step with an error like:

`Compiling crypto/hrss/asm/poly_rq_mul.S failed: absolute path inclusion(s) found in rule '@@boringssl+//:crypto':
the source file 'crypto/hrss/asm/poly_rq_mul.S' includes the following non-builtin files with absolute paths:
'/usr/include/stdc-predef.h'
`

### Supporting Information

_No response_

### Classification

Major

### First Affected Release

1.0

### Last Affected Release

1.0

### Expected Fixed Release

before release (main)

### Category

- [ ] Safety Relevant
- [ ] Security Relevant

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with the gcc extension at @score_bazel_cpp_toolchains//extensions:gcc.bzl and reproduce the autosd10 configuration from the issue using a project with BoringSSL .S files. Check the assembler action's sysroot handling; done means the assembly step no longer falls back to /usr/include or reports absolute path inclusions.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
58/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.