Define STARTFILE_PREFIX_SPEC for powerpc VxWorks < 7
diff mbox series

Message ID A62AAD9D-55CF-4585-BF8E-70AF439C76ED@adacore.com
State New
Headers show
Series
  • Define STARTFILE_PREFIX_SPEC for powerpc VxWorks < 7
Related show

Commit Message

Olivier Hainque Dec. 13, 2019, 2:18 p.m. UTC
Prior to VxWorks 7, the path where startfiles and core
libraries are located contains CPU architecture specific name
components. This should normally be expressed through a CPU
specific STARTFILE_PREFIX_SPEC for such versions of VxWorks.

This change adds a definition for the PowerPc family, which
have been using for years now.

Tested in accordance with the description in
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00911.html

Committing to mainline.

Olivier

2019-12-13  Doug Rupp  <rupp@adacore.com>

    	* config/rs6000/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
gcc/config/rs6000/vxworks.h | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h
index dd9a6a23239..4240dfff548 100644
--- a/gcc/config/rs6000/vxworks.h
+++ b/gcc/config/rs6000/vxworks.h
@@ -43,6 +43,13 @@  along with GCC; see the file COPYING3.  If not see
     }		\
   while (0)
 
+/* vx6 library path.  */
+#if !TARGET_VXWORKS7
+#undef  STARTFILE_PREFIX_SPEC
+#define STARTFILE_PREFIX_SPEC						\
+ "%{mrtp:%{!shared:%:getenv(WIND_BASE /target/lib/usr/lib/ppc/PPC32/common)}}"
+#endif
+
 /* Only big endian PPC is supported by VxWorks.  */
 #undef BYTES_BIG_ENDIAN
 #define BYTES_BIG_ENDIAN 1