Hi When building Ada for RTEMS, you need to pass in the CFLAGS_FOR_TARGET to see OS specific .h files. This was already done for the RTS but needed to be added to the process which extracts value settings from the .h files.
This patch is against 4.9. OK to apply to 4.8, 4.9, and head assuming it applies cleanly? 2015-02-10 Joel Sherrill <joel.sherr...@oarcorp.com> * gcc-interface/Makefile.in: Add CFLAGS_TO_TARGET to OSCONS_CPP and OSCONS_EXTRACT. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985
2015-02-10 Joel Sherrill <joel.sherr...@oarcorp.com> * gcc-interface/Makefile.in: Add CFLAGS_TO_TARGET to OSCONS_CPP and OSCONS_EXTRACT. Index: gcc/ada/gcc-interface/Makefile.in =================================================================== --- gcc/ada/gcc-interface/Makefile.in (revision 220002) +++ gcc/ada/gcc-interface/Makefile.in (working copy) @@ -115,7 +115,7 @@ # Pretend that _Unwind_GetIPInfo is available for the target by default. This # should be autodetected during the configuration of libada and passed down to # here, but we need something for --disable-libada and hope for the best. -GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \ +GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \ -fexceptions -DIN_RTS -DHAVE_GETIPINFO ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) THREAD_KIND = native @@ -2748,9 +2748,9 @@ # for running it from $(RTSDIR) OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'` -OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ +OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) -E -C \ -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i -OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS) -S s-oscons-tmplt.i +OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) -S s-oscons-tmplt.i endif ./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb