Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exclude sysroot and some libs from bootlin #66

Merged
merged 3 commits into from
Jun 27, 2022
Merged
Changes from 2 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
8 changes: 8 additions & 0 deletions toolchain/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ def gcc_register_toolchain(
platform_directory_glob_pattern = platform_directory_glob_pattern,
sysroot_label = str(sysroot),
),
patch_cmds = [
# The sysroot shipped with the bootlin toolchain should never be used.
"find . -type d -name 'sysroot' -exec rm -rf {} +",
# We also remove the libgfortran and libstdc++ that are outside the sysroot. They are
# provided by our custom-built sysroot.
"find . -type f -name 'libgfortran*' -exec rm \"{}\" \\;",
"find . -type f -name 'libstdc++*' -exec rm \"{}\" \\;",
],
strip_prefix = kwargs.pop("strip_prefix", _TOOLCHAINS[gcc_version][target_arch].strip_prefix),
sha256 = kwargs.pop("sha256", _TOOLCHAINS[gcc_version][target_arch].sha256),
url = kwargs.pop("url", _TOOLCHAINS[gcc_version][target_arch].url),
Expand Down