Update GCC build flags for binutils-2.40
* Specify the usage of zifencei and zbb
* Silence the loader RWX warning
Change-Id: I314c623155da737d83711997af24ca8247a351d1
diff --git a/build_tools/bazel/kelvin.bzl b/build_tools/bazel/kelvin.bzl
index ddd20ce..f3f39aa 100644
--- a/build_tools/bazel/kelvin.bzl
+++ b/build_tools/bazel/kelvin.bzl
@@ -90,6 +90,7 @@
linking_contexts = linking_contexts,
user_link_flags = ctx.attr.linkopts + [
"-Wl,-T,{}".format(ctx.file.linker_script.path),
+ "-Wl,--no-warn-rwx-segments",
],
additional_inputs = depset([ctx.file.linker_script] + ctx.files.linker_script_includes),
output_type = "executable",
diff --git a/platforms/riscv32/devices.bzl b/platforms/riscv32/devices.bzl
index 3e0878b..21b1beb 100644
--- a/platforms/riscv32/devices.bzl
+++ b/platforms/riscv32/devices.bzl
@@ -10,7 +10,7 @@
"@platforms//os:none",
],
substitutions = {
- "ARCHITECTURE": "rv32im",
+ "ARCHITECTURE": "rv32i2p1m_zifencei_zbb",
"ABI": "ilp32",
"CMODEL": "medany",
"[STACK_PROTECTOR]": "-fstack-protector-strong",