]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Pass --no-relax to linker if -mno-relax is present.
authorKito Cheng <kito.cheng@gmail.com>
Sat, 21 Apr 2018 01:03:30 +0000 (01:03 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Sat, 21 Apr 2018 01:03:30 +0000 (18:03 -0700)
gcc/
2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
* config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
-mno-relax is present.
* config/riscv/linux.h (LINK_SPEC): Ditto.

From-SVN: r259540

gcc/ChangeLog
gcc/config/riscv/elf.h
gcc/config/riscv/linux.h

index 750958465f9655f947d9b3d15522b4ab867acc06..63acb1fbc8e83abef13cd808c1db69605548458c 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
+
+       * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
+       -mno-relax is present.
+       * config/riscv/linux.h (LINK_SPEC): Ditto.
+
 2018-04-20  Martin Sebor  <msebor@redhat.com>
 
        PR c/85365
index f39e83234d261462f571ee8a1773122b42dc8737..a8357bb6e18d16ba3f5686313afdcb671a49d0b9 100644 (file)
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #define LINK_SPEC "\
 -melf" XLEN_SPEC "lriscv \
+%{mno-relax:--no-relax} \
 %{shared}"
 
 /* Link against Newlib libraries, because the ELF backend assumes Newlib.
index ad03654e8d6f295dc5af13dedcda686cb09af6b4..aa8a28d5d31edda5d0f2646c4753702c1e33ffa4 100644 (file)
@@ -51,6 +51,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #define LINK_SPEC "\
 -melf" XLEN_SPEC "lriscv \
+%{mno-relax:--no-relax} \
 %{shared} \
   %{!shared: \
     %{!static: \