This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFC][PATCH] MIPS: Add default for fno-delayed-branch to link spec string
- From: "Maksim E. Kozlov" <maksim dot e dot kozlov at gmail dot com>
- To: binutils at sourceware dot org
- Cc: "Maksim E . Kozlov" <maksim dot e dot kozlov at gmail dot com>
- Date: Tue, 8 May 2018 19:44:15 +0300
- Subject: [RFC][PATCH] MIPS: Add default for fno-delayed-branch to link spec string
- References: <alpine.DEB.2.00.1804041121390.1545@tp.orcam.me.uk> <1525797855-28727-1-git-send-email-maksim.e.kozlov@gmail.com>
gcc/
config/mips/gnu-user.h: (LINK_SPEC) Add default for
fno-delayed-branch
gcc/config/mips/mips.h: (LINK_SPEC) Add default for
fno-delayed-branch
Signed-off-by: Maksim E. Kozlov <maksim.e.kozlov@gmail.com>
---
gcc/config/mips/gnu-user.h | 3 ++-
gcc/config/mips/mips.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index af45d18..3f03914 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -64,7 +64,8 @@ along with GCC; see the file COPYING3. If not see
%{static}} \
%{mabi=n32:-m" GNU_USER_LINK_EMULATIONN32 "} \
%{mabi=64:-m" GNU_USER_LINK_EMULATION64 "} \
- %{mabi=32:-m" GNU_USER_LINK_EMULATION32 "}"
+ %{mabi=32:-m" GNU_USER_LINK_EMULATION32 "} \
+ %{O0|fno-delayed-branch:--no-delayed-branch}"
#undef LINK_SPEC
#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 23e1672..2bcbf5b 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1380,7 +1380,8 @@ FP_ASM_SPEC "\
#define LINK_SPEC "\
%(endian_spec) \
%{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32*} %{mips64*} \
-%{shared}"
+%{shared} \
+%{O0|fno-delayed-branch:--no-delayed-branch}"
#endif /* LINK_SPEC defined */
--
2.7.4