Browse Source

build: config: compiler: do not use linker relaxation

Upstream status: Inappropriate

Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
Rebecca Chang Swee Fun 1 year ago
parent
commit
e4775c1588
1 changed files with 8 additions and 2 deletions
  1. 8 2
      build/config/compiler/BUILD.gn

+ 8 - 2
build/config/compiler/BUILD.gn

@@ -1157,8 +1157,14 @@ config("compiler_cpu_abi") {
       }
     } else if (current_cpu == "riscv64") {
       if (is_clang) {
-        cflags += [ "--target=riscv64-linux-gnu" ]
-        ldflags += [ "--target=riscv64-linux-gnu" ]
+        cflags += [
+          "--target=riscv64-linux-gnu",
+          "-mno-relax",
+        ]
+        ldflags += [
+          "--target=riscv64-linux-gnu",
+          "-mno-relax",
+        ]
       }
       cflags += [ "-mabi=lp64d" ]
     } else if (current_cpu == "s390x") {