RTEMS/Ada: Define EH_MECHANISM
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Tue, 5 Dec 2017 10:46:42 +0000 (10:46 +0000)
committerSebastian Huber <sh@gcc.gnu.org>
Tue, 5 Dec 2017 10:46:42 +0000 (10:46 +0000)
Without this definition I got the following error:

<...>/xgcc <...>  -c -g -O2   -W -Wall -gnatpg -nostdinc  -g -fno-inline \
      -fno-toplevel-reorder -O1  a-except.adb -o a-except.o
a-exexpr.adb:38:06: "System.Exceptions.Machine" is not a predefined library unit
a-exexpr.adb:38:06: "Ada.Exceptions (body)" depends on "Ada.Exceptions.Exception_Propagation (body)"
a-exexpr.adb:38:06: "Ada.Exceptions.Exception_Propagation (body)" depends on "System.Exceptions.Machine (spec)"
../gcc-interface/Makefile:2661: recipe for target 'a-except.o' failed

gcc/ada

* gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.

From-SVN: r255408

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

index 714ea61..79417dd 100644 (file)
@@ -1,3 +1,7 @@
+2017-12-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+       * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
+
 2017-12-04  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
        * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
index 133ef8e..99e3bdc 100644 (file)
@@ -1368,6 +1368,11 @@ ifeq ($(strip $(filter-out rtems%,$(target_os))),)
   s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
   s-stchop.adb<libgnat/s-stchop__rtems.adb \
   s-interr.adb<libgnarl/s-interr__hwint.adb
+  ifeq ($(strip $(filter-out arm%, $(target_cpu))),)
+    EH_MECHANISM=-arm
+  else
+    EH_MECHANISM=-gcc
+  endif
 endif
 
 # PikeOS