12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- From a42e058e178f7993351b30a928ac4e464eb16aa9 Mon Sep 17 00:00:00 2001
- From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
- Date: Fri, 14 Jan 2022 05:06:56 +0000
- Subject: [PATCH 13/21] build: config: compiler: set generic riscv64 flags
- Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
- Signed-off-by: Loh Tien Hock <tienhock.loh@starfivetech.com>
- ---
- build/config/compiler/BUILD.gn | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
- diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
- index c9b6fb9c83114..43043a135afa7 100644
- --- a/build/config/compiler/BUILD.gn
- +++ b/build/config/compiler/BUILD.gn
- @@ -1158,6 +1158,17 @@ config("compiler_cpu_abi") {
- cflags += [ "-m64" ]
- ldflags += [ "-m64" ]
- }
- + } else if (current_cpu == "riscv64") {
- + cflags += [
- + "-m64",
- + "--target=riscv64-linux-gnu",
- + "-mno-relax",
- + "-mabi=lp64d",
- + ]
- + ldflags += [
- + "--target=riscv64-linux-gnu",
- + "-mno-relax",
- + ]
- } else if (current_cpu == "s390x") {
- cflags += [ "-m64" ]
- ldflags += [ "-m64" ]
- @@ -1626,7 +1637,8 @@ config("chromium_code") {
-
- if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
- current_cpu != "s390" && current_cpu != "ppc64" &&
- - current_cpu != "mips" && current_cpu != "mips64") {
- + current_cpu != "mips" && current_cpu != "mips64" &&
- + current_cpu != "riscv64") {
- # Non-chromium code is not guaranteed to compile cleanly with
- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
- # disabled, so only do that for Release build.
- --
- 2.25.1
|