summary refs log tree commit diff
path: root/sysdeps/riscv/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/riscv/Makefile')
-rw-r--r--sysdeps/riscv/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/riscv/Makefile b/sysdeps/riscv/Makefile
index 20a9968106..8fb10b164f 100644
--- a/sysdeps/riscv/Makefile
+++ b/sysdeps/riscv/Makefile
@@ -5,3 +5,9 @@ endif
 # RISC-V's assembler also needs to know about PIC as it changes the definition
 # of some assembler macros.
 ASFLAGS-.os += $(pic-ccflag)
+
+ifeq (no,$(riscv-r-align))
+ASFLAGS-.os += -Wa,-mno-relax
+ASFLAGS-.o += -Wa,-mno-relax
+sysdep-CFLAGS += -mno-relax
+endif