aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Rupp <rupp@adacore.com>2018-10-11 18:36:34 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2018-10-11 18:36:34 +0000
commit13c4e4031a391afb6368d7072217acde07607ff7 (patch)
tree102e90536af9004205796fab9ab63310b43e2e84
parent1cc6eecd5d489caa67f04bdd43e5a06c8e3d62d1 (diff)
downloadgcc-13c4e4031a391afb6368d7072217acde07607ff7.zip
gcc-13c4e4031a391afb6368d7072217acde07607ff7.tar.gz
gcc-13c4e4031a391afb6368d7072217acde07607ff7.tar.bz2
leverage linker relaxation on ppc vxworks RTPs
2018-10-11 Doug Rupp <rupp@adacore.com> Olivier Hainque <hainque@adacore.com> * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro. Pass --relax to the linker for RTPs. (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC. Co-Authored-By: Olivier Hainque <hainque@adacore.com> From-SVN: r265054
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/vxworks.h9
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 421a4c3..8172fcd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-11 Doug Rupp <rupp@adacore.com>
+ Olivier Hainque <hainque@adacore.com>
+
+ * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
+ Pass --relax to the linker for RTPs.
+ (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
+
2018-10-11 Andrew Stubbs <ams@codesourcery.com>
Jan Hubicka <jh@suse.cz>
Martin Jambor <mjambor@suse.cz>
diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h
index b10955f..d2033f6 100644
--- a/gcc/config/rs6000/vxworks.h
+++ b/gcc/config/rs6000/vxworks.h
@@ -88,8 +88,15 @@ VXWORKS_ADDITIONAL_CPP_SPEC
#undef LIB_SPEC
#define LIB_SPEC VXWORKS_LIB_SPEC
+
+/* For RTPs, leverage linker relaxation. This helps programs referring
+ to, typically, kernel services too far away for short calls. This is more
+ precise than -mlongcall and can be overriden with -Wl,--no-relax. */
+#define VXWORKS_RELAX_LINK_SPEC "%{mrtp:--relax}"
+
#undef LINK_SPEC
-#define LINK_SPEC VXWORKS_LINK_SPEC
+#define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_RELAX_LINK_SPEC
+
#undef STARTFILE_SPEC
#define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
#undef ENDFILE_SPEC