Skip to content

Commit

Permalink
Hail mary
Browse files Browse the repository at this point in the history
  • Loading branch information
pjreiniger committed Jan 1, 2025
1 parent 002bb32 commit f6e54ca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
36 changes: 26 additions & 10 deletions toolchains/cross_compiler/cc-toolchain-config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -166,25 +166,41 @@ def _impl(ctx):
compiler_param_feature,
archive_param_file_feature,
]

toolchain_identifier = ctx.attr.toolchain_identifier
host_system_name = "armeabi-v7a"
target_system_name = "armeabi-v7a"
target_cpu = "armeabi-v7a"
target_libc = "armeabi-v7a"
compiler = "compiler"
abi_version = "armeabi-v7a"
abi_libc_version = "armeabi-v7a"
cc_target_os = None

print(ctx.attr.target_cpu)
print(ctx.attr.compiler_version)
print(ctx.attr.target_system_name)

extra_args = dict(
toolchain_identifier = toolchain_identifier,
host_system_name = host_system_name,
target_system_name = target_system_name,
target_cpu = target_cpu,
target_libc = target_libc,
compiler = compiler,
abi_version = abi_version,
abi_libc_version = abi_libc_version,
cc_target_os = cc_target_os,
)
print(extra_args)


return cc_common.create_cc_toolchain_config_info(
ctx = ctx,
features = features,
toolchain_identifier = ctx.attr.toolchain_identifier,
host_system_name = "local",
target_system_name = ctx.attr.target_system_name,
target_cpu = ctx.attr.target_cpu,
target_libc = "glibc-2.24",
cc_target_os = "linux",
compiler = "gcc-" + ctx.attr.compiler_version,
abi_version = "gcc-" + ctx.attr.compiler_version,
abi_libc_version = "glibc-2.24",
tool_paths = tool_paths,
cxx_builtin_include_directories = cxx_builtin_include_directories,
# builtin_sysroot = ctx.attr.builtin_sysroot,
**extra_args,
)

cc_toolchain_config = rule(
Expand Down
2 changes: 1 addition & 1 deletion toolchains/load_toolchains.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def load_toolchains():
sysroot_include_folder = "arm-linux-gnueabihf",
repo_shortname = "raspi_bookworm_32",
target_cpu = "armv6",
target_system_name = "arm-frc2023-linux-gnueabi",
target_system_name = "arm-linux-gnueabihf",
)
configure_cross_compiler(
name = "local_raspi_bullseye_32",
Expand Down

0 comments on commit f6e54ca

Please sign in to comment.