]> gcc.gnu.org Git - gcc.git/commitdiff
leverage linker relaxation on ppc vxworks RTPs
authorDoug Rupp <rupp@adacore.com>
Thu, 11 Oct 2018 18:36:34 +0000 (18:36 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Thu, 11 Oct 2018 18:36:34 +0000 (18:36 +0000)
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

gcc/ChangeLog
gcc/config/rs6000/vxworks.h

index 421a4c3ed276227413d06a2efd6899ba07b2a993..8172fcd927646f4db3f5503c6712cd0ce907d03a 100644 (file)
@@ -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>
index b10955f071d83c7fb516345b308769f1f369d3bf..d2033f60c22e2cb389fead37a50738c03bb429fb 100644 (file)
@@ -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
This page took 0.099674 seconds and 5 git commands to generate.