Skip to content

Commit c56dbfc

Browse files
committed
rv32imc with experimental B v0.92 extension (rv32imcb)
Signed-off-by: Sam Elliott <[email protected]>
1 parent d1673ce commit c56dbfc

File tree

5 files changed

+96
-1
lines changed

5 files changed

+96
-1
lines changed

azure-pipelines.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,41 @@ jobs:
4949
parameters:
5050
azure_name: rv32imc-toolchains
5151

52+
- job: "Toolchains_RV32IMCB"
53+
displayName: "GCC and Clang/LLVM toolchains targeting RV32IMC+B (Ibex with Bit Manipulation)"
54+
pool:
55+
vmImage: "ubuntu-16.04"
56+
timeoutInMinutes: 360
57+
steps:
58+
- template: "_build-deps.yml"
59+
60+
- bash: |
61+
./build-gcc-with-args.sh \
62+
"lowrisc-toolchain-gcc-rv32imcb" \
63+
"riscv32-unknown-elf" \
64+
"/tools/riscv" \
65+
"-march=rv32imcb" "-mabi=ilp32" "-mcmodel=medany"
66+
displayName: 'Build GCC toolchain'
67+
env:
68+
ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory)
69+
RELEASE_TAG: $(ReleaseTag)
70+
71+
- bash: |
72+
./build-clang-with-args.sh \
73+
"lowrisc-toolchain-rv32imcb" \
74+
"riscv32-unknown-elf" \
75+
"/tools/riscv" \
76+
"-march=rv32imcb0p92" "-mabi=ilp32" "-mcmodel=medany" \
77+
"-menable-experimental-extensions"
78+
displayName: "Build Clang toolchain"
79+
env:
80+
ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory)
81+
RELEASE_TAG: $(ReleaseTag)
82+
83+
- template: "_upload-artifacts.yml"
84+
parameters:
85+
azure_name: rv32imcb-toolchains
86+
5287
- job: "GCC_Multilib_Baremetal"
5388
displayName: "RV64 GCC (Multilib Baremetal)"
5489
condition: false

build-gcc-with-args.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ mkdir -p "${toolchain_dest}"
5252
mkdir -p "${build_top_dir}/build/gcc"
5353
cd "${build_top_dir}/build/gcc"
5454

55-
# Create crosstool-ng config file with correct `CT_PREFIX_DIR`
55+
# Create crosstool-ng config file with correct `CT_PREFIX_DIR` and `CT_LOCAL_PATCH_DIR`
5656
{
5757
cat "${build_top_dir}/${toolchain_name}.config";
5858
echo "";
5959
echo "# ADDED BY ${0}";
6060
echo "CT_PREFIX_DIR=\"${toolchain_dest}\"";
61+
echo "CT_LOCAL_PATCH_DIR=\"${build_top_dir}/patches/${toolchain_name}\"";
6162
echo "# END ADDED BY ${0}";
6263
} >> .config
6364
ct-ng upgradeconfig
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
CT_CONFIG_VERSION="3"
2+
CT_EXPERIMENTAL=y
3+
4+
CT_ARCH_RISCV=y
5+
6+
# CT_ARCH_ARCH controls the specific architecture that the toolchain's libraries
7+
# are built with. It should specify the minimum RISC-V extensions that need to
8+
# be implemented by any processor that this toolchain will compile programs for.
9+
#
10+
# 2020-03-26: We have added B extension (v0.92) support to the compiler using
11+
# experimental patches, but we still want to support Ibex without
12+
# the B extension, so this remains "rv32imc".
13+
#
14+
CT_ARCH_ARCH="rv32imc"
15+
16+
# CT_ARCH_ABI controls the specific ABI that the toolchain's libraries are built
17+
# with. All programs built against this toolchain should follow exactly this
18+
# ABI.
19+
CT_ARCH_ABI="ilp32"
20+
21+
CT_TARGET_VENDOR=""
22+
# CT_CC_GCC_LDBL_128 is not set
23+
CT_CC_LANG_CXX=y
24+
CT_DEBUG_GDB=y
25+
CT_GDB_V_8_2=y
26+
# CT_GDB_CROSS_PYTHON is not set
27+
CT_ISL_V_0_20=y
28+
CT_PATCH_ORDER="bundled,local"
29+
CT_PATCH_BUNDLED_LOCAL=y
30+
CT_PATCH_USE_LOCAL=y
31+
32+
# Disable progress bar for CI builds, it generates too much log output
33+
# CT_LOG_PROGRESS_BAR is not set
34+
35+
# Installation prefix directory; the toolchain will end up in exactly
36+
# this directory.
37+
CT_PREFIX_DIR="/tools/riscv"
38+
39+
# Don't save tarballs for re-use (needs writable and pre-created
40+
# CT_LOCAL_TARBALLS_DIR otherwise)
41+
# CT_SAVE_TARBALLS is not set
42+
43+
# Don't chmod the CT_PREFIX_DIR read-only after the install.
44+
# CT_PREFIX_DIR_RO is not set
45+
46+
# We apply the binutils bitmanip patches on top of git commit 612aac65
47+
CT_BINUTILS_SRC_DEVEL=y
48+
CT_BINUTILS_DEVEL_VCS_git=y
49+
CT_BINUTILS_DEVEL_URL="https://github.com/bminor/binutils-gdb.git"
50+
CT_BINUTILS_DEVEL_REVISION="612aac65e690387c963c34a31dd1fb138d88a45c"
51+
52+
# We apply the gcc bitmanip patches on top of git commit 49f75e008c0
53+
CT_GCC_SRC_DEVEL=y
54+
CT_GCC_DEVEL_VCS_git=y
55+
CT_GCC_DEVEL_URL="https://github.com/riscv/riscv-gcc.git"
56+
CT_GCC_DEVEL_REVISION="49f75e008c0809eb3c74a163297b4aa8925c9f1c"
57+
58+
# The build script appends a definition of CT_LOCAL_PATCH_DIR down here, that
59+
# points to the repo's patch directory.

0 commit comments

Comments
 (0)