[RFC] MIPS: Add default for fno-delayed-branch to link spec string

Message ID 1525797855-28727-3-git-send-email-maksim.e.kozlov@gmail.com
State New
Headers show
Series
  • [RFC] MIPS: Add default for fno-delayed-branch to link spec string
Related show

Commit Message

Maksim Kozlov May 8, 2018, 4:44 p.m.
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(-)

-- 
2.7.4

Patch

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 */