diff --git a/toolchains/lowrisc_rv32imcb/BUILD.bazel b/toolchains/lowrisc_rv32imcb/BUILD.bazel index 77450ac..d6e4cb7 100644 --- a/toolchains/lowrisc_rv32imcb/BUILD.bazel +++ b/toolchains/lowrisc_rv32imcb/BUILD.bazel @@ -23,7 +23,7 @@ HOST_ARCHS = [ [filegroup( name = "compiler_components" + host_arch, srcs = [ - "//toolchains/lowrisc_rv32imcb/wrappers:all", + "//toolchains/lowrisc_rv32imcb/wrappers_{}:all".format(host_arch), "@lowrisc_rv32imcb_{}_files//:all".format(host_arch), ], ) for host_arch in HOST_ARCHS] @@ -43,15 +43,15 @@ HOST_ARCHS = [ }, substitutions = device.substitutions, tools = { - "ar": "wrappers/ar", - "cpp": "wrappers/cpp", - "gcc": "wrappers/clang", - "gcov": "wrappers/gcov", - "ld": "wrappers/ld", - "nm": "wrappers/nm", - "objcopy": "wrappers/objcopy", - "objdump": "wrappers/objdump", - "strip": "wrappers/strip", + "ar": "wrappers_{}/ar".format(host_arch), + "cpp": "wrappers_{}/cpp".format(host_arch), + "gcc": "wrappers_{}/clang".format(host_arch), + "gcov": "wrappers_{}/gcov".format(host_arch), + "ld": "wrappers_{}/ld".format(host_arch), + "nm": "wrappers_{}/nm".format(host_arch), + "objcopy": "wrappers_{}/objcopy".format(host_arch), + "objdump": "wrappers_{}/objdump".format(host_arch), + "strip": "wrappers_{}/strip", }, ) for device in DEVICES] for host_arch in HOST_ARCHS diff --git a/toolchains/lowrisc_rv32imcb/wrappers/BUILD b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/BUILD similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/BUILD rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/BUILD diff --git a/toolchains/lowrisc_rv32imcb/wrappers/ar b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/ar similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/ar rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/ar diff --git a/toolchains/lowrisc_rv32imcb/wrappers/clang b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/clang similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/clang rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/clang diff --git a/toolchains/lowrisc_rv32imcb/wrappers/cpp b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/cpp similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/cpp rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/cpp diff --git a/toolchains/lowrisc_rv32imcb/wrappers/driver.sh b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/driver.sh similarity index 87% rename from toolchains/lowrisc_rv32imcb/wrappers/driver.sh rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/driver.sh index 757736b..4a32aa3 100755 --- a/toolchains/lowrisc_rv32imcb/wrappers/driver.sh +++ b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/driver.sh @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 PROG=${0##*/} -TOOLCHAIN="lowrisc_rv32imcb_$(uname -m)_files" +TOOLCHAIN="lowrisc_rv32imcb_aarch64_files" PREFIX="riscv32-unknown-elf" ARGS=() diff --git a/toolchains/lowrisc_rv32imcb/wrappers/gcc b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/gcc similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/gcc rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/gcc diff --git a/toolchains/lowrisc_rv32imcb/wrappers/gcov b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/gcov similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/gcov rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/gcov diff --git a/toolchains/lowrisc_rv32imcb/wrappers/ld b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/ld similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/ld rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/ld diff --git a/toolchains/lowrisc_rv32imcb/wrappers/nm b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/nm similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/nm rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/nm diff --git a/toolchains/lowrisc_rv32imcb/wrappers/objcopy b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/objcopy similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/objcopy rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/objcopy diff --git a/toolchains/lowrisc_rv32imcb/wrappers/objdump b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/objdump similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/objdump rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/objdump diff --git a/toolchains/lowrisc_rv32imcb/wrappers/strip b/toolchains/lowrisc_rv32imcb/wrappers_aarch64/strip similarity index 100% rename from toolchains/lowrisc_rv32imcb/wrappers/strip rename to toolchains/lowrisc_rv32imcb/wrappers_aarch64/strip diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/BUILD b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/BUILD new file mode 100644 index 0000000..7121e88 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/BUILD @@ -0,0 +1,19 @@ +package(default_visibility = ["//visibility:public"]) + +exports_files(glob(["*"])) + +filegroup( + name = "all", + srcs = [ + "ar", + "clang", + "cpp", + "gcc", + "gcov", + "ld", + "nm", + "objcopy", + "objdump", + "strip", + ], +) diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/ar b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/ar new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/ar @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/clang b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/clang new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/clang @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/cpp b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/cpp new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/cpp @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/driver.sh b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/driver.sh new file mode 100755 index 0000000..02d19ff --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/driver.sh @@ -0,0 +1,16 @@ +#!/bin/bash --norc +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +PROG=${0##*/} +TOOLCHAIN="lowrisc_rv32imcb_x86_64_files" +PREFIX="riscv32-unknown-elf" + +ARGS=() +POSTARGS=() + +exec "external/${TOOLCHAIN}/bin/${PREFIX}-${PROG}" \ + "${ARGS[@]}" \ + "$@"\ + "${POSTARGS[@]}" diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/gcc b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/gcc new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/gcc @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/gcov b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/gcov new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/gcov @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/ld b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/ld new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/ld @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/nm b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/nm new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/nm @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/objcopy b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/objcopy new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/objcopy @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/objdump b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/objdump new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/objdump @@ -0,0 +1 @@ +driver.sh \ No newline at end of file diff --git a/toolchains/lowrisc_rv32imcb/wrappers_x86_64/strip b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/strip new file mode 120000 index 0000000..da2bdd9 --- /dev/null +++ b/toolchains/lowrisc_rv32imcb/wrappers_x86_64/strip @@ -0,0 +1 @@ +driver.sh \ No newline at end of file