Make-lang.in: Enable System.Stack_Checking.Operations target pairs on VxWorks 5 only.
authorHristian Kirtchev <kirtchev@adacore.com>
Wed, 6 Feb 2013 11:19:08 +0000 (11:19 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 6 Feb 2013 11:19:08 +0000 (12:19 +0100)
2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>

* gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
target pairs on VxWorks 5 only.

From-SVN: r195802

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Makefile.in

index b1a22da8d9693b080d5be2f31c36b293e9a248ae..df9cde1db34bb7729d4157bc665250e5b149a735 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
+       target pairs on VxWorks 5 only.
+
 2013-02-06  Arnaud Charlet  <charlet@adacore.com>
 
        * gcc-interface/Make-lang.in: Update dependencies.
index a9548bffb604b1f8abcd25a6349c18ae8460ff4b..0ddde729425052cda9bb4b47e3288165123414d0 100644 (file)
@@ -515,8 +515,6 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
   s-osprim.adb<s-osprim-vxworks.adb \
   s-parame.ads<s-parame-vxworks.ads \
   s-parame.adb<s-parame-vxworks.adb \
-  s-stchop.ads<s-stchop-limit.ads \
-  s-stchop.adb<s-stchop-vxworks.adb \
   s-taprop.adb<s-taprop-vxworks.adb \
   s-tasinf.ads<s-tasinf-vxworks.ads \
   s-taspri.ads<s-taspri-vxworks.ads \
@@ -527,6 +525,19 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
+  # VxWorks 5 and 6 both use the same target triplet making them
+  # indistinguishable in the context of this make file. Package
+  # System.Stack_Checking.Operations is not needed on VxWorks 6 as it leads to
+  # an undefined symbol when building a dynamic shared library. To alleviate
+  # this problem and distinguish this case, we use the THREAD_KIND and include
+  # the package only in kernel mode.
+
+  ifeq ($(strip $(filter-out default,$(THREAD_KIND))),)
+    LIBGNAT_TARGET_PAIRS += \
+      s-stchop.ads<s-stchop-limit.ads \
+      s-stchop.adb<s-stchop-vxworks.adb
+  endif
+
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb