aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@gmail.com>2018-04-21 01:03:30 +0000
committerJim Wilson <wilson@gcc.gnu.org>2018-04-20 18:03:30 -0700
commit559fb136c980cd1d52af43202c3a9dc511ea2240 (patch)
treedb7da3fdafb869d3059d2d7ac49c5cdcc04c6022 /gcc
parentf046f4b07cde34a9788d6165f07fae2347bef0af (diff)
downloadgcc-559fb136c980cd1d52af43202c3a9dc511ea2240.zip
gcc-559fb136c980cd1d52af43202c3a9dc511ea2240.tar.gz
gcc-559fb136c980cd1d52af43202c3a9dc511ea2240.tar.bz2
RISC-V: Pass --no-relax to linker if -mno-relax is present.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/riscv/elf.h1
-rw-r--r--gcc/config/riscv/linux.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7509584..63acb1f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h
index f39e832..a8357bb 100644
--- a/gcc/config/riscv/elf.h
+++ b/gcc/config/riscv/elf.h
@@ -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.
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index ad03654..aa8a28d 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -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: \