Make-lang.in: Define EH_MECHANISM while building raise-gcc.c.
authorTristan Gingold <gingold@adacore.com>
Thu, 27 Apr 2017 13:54:41 +0000 (13:54 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 27 Apr 2017 13:54:41 +0000 (15:54 +0200)
2017-04-27  Tristan Gingold  <gingold@adacore.com>

* gcc-interface/Make-lang.in: Define EH_MECHANISM while building
raise-gcc.c. Fix include search path for raise-gcc.c

From-SVN: r247339

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Make-lang.in

index 667d8635756be547fbbe7f8c3908822892688416..3bab80e278890f2767880de9615a9de4b143daa4 100644 (file)
@@ -1,3 +1,8 @@
+2017-04-27  Tristan Gingold  <gingold@adacore.com>
+
+       * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
+       raise-gcc.c. Fix include search path for raise-gcc.c
+
 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
 
        * fe.h (Warn_On_Questionable_Layout): Declare.
index 10c865f457da081dea001023074c39aee5f4f675..fa04e80a52dd67dde1b46be6e64de1df2c7e4c60 100644 (file)
@@ -99,8 +99,6 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
-# For unwind-pe.h
-CFLAGS-ada/raise-gcc.o += -I$(srcdir)/../libgcc -Iinclude
 
 ada/%.o: ada/gcc-interface/%.c
        $(COMPILE) $<
@@ -611,17 +609,20 @@ TARGET_ADA_SRCS =
 
 # Select the right s-excmac according to exception layout (Itanium or arm)
 host_cpu=$(word 1, $(subst -, ,$(host)))
-EH_MECHANISM=-gcc
+EH_MECHANISM=gcc
 ifeq ($(strip $(filter-out arm%,$(host_cpu))),)
-EH_MECHANISM=-arm
+EH_MECHANISM=arm
 endif
 
+# For unwind-pe.h
+CFLAGS-ada/raise-gcc.o += -I$(srcdir)/../libgcc -DEH_MECHANISM_$(EH_MECHANISM)
+
 ada/s-excmac.o: ada/s-excmac.ads ada/s-excmac.adb
 
-ada/s-excmac.ads: $(srcdir)/ada/s-excmac$(EH_MECHANISM).ads
+ada/s-excmac.ads: $(srcdir)/ada/s-excmac-$(EH_MECHANISM).ads
        $(CP) $< $@
 
-ada/s-excmac.adb: $(srcdir)/ada/s-excmac$(EH_MECHANISM).adb
+ada/s-excmac.adb: $(srcdir)/ada/s-excmac-$(EH_MECHANISM).adb
        $(CP) $< $@
 
 # Needs to be built with CC=gcc