This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] ada: When building s-oscons.ads, look in right directories.
- From: Samuel Tardieu <sam at rfc1149 dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Aug 2008 14:56:10 +0200
- Subject: [PATCH] ada: When building s-oscons.ads, look in right directories.
- Organisation: RFC1149 (see http://www.rfc1149.net/)
The cross-builds for s-oscons.ads could fail because necessary flags were
omitted when using the preprocessor. For example, even when configured
with --with-build-sysroot=/some/path, the -isystem flags were not used.
This patch uses GCC_FOR_TARGET to preprocess and compile s-oscons-tmplt.c.
A similar fix might be needed a few lines above for OpenVMS cross builds,
but I have no way of testing it.
gcc/ada/
* gcc-interface/Make-lang.in: Use GCC_FOR_TARGET when dealing
with s-oscons-tmplt.i.
libada/
* Makefile.in: Pass FLAGS_TO_PASS to sub-make for target
oscons.
Tested on a native i686-pc-linux-gnu build and a cross build from this
system to sh4-unknown-linux-gnu. Ok for trunk?
---
gcc/ada/gcc-interface/Make-lang.in | 4 ++--
libada/Makefile.in | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 9233f1e..9af841d 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -933,9 +933,9 @@ OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
./s-oscons-tmplt.exe > s-oscons-tmplt.s
else
-OSCONS_CPP=../../../xgcc -B../../../ -E -C \
+OSCONS_CPP=$(GCC_FOR_TARGET) -E -C \
-DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
-OSCONS_EXTRACT=../../../xgcc -S -B../../../ s-oscons-tmplt.i
+OSCONS_EXTRACT=$(GCC_FOR_TARGET) -S s-oscons-tmplt.i
endif
ada/s-oscons-$(THREAD_KIND).ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb
diff --git a/libada/Makefile.in b/libada/Makefile.in
index e8ca515..211e3eb 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -94,7 +94,9 @@ gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
&& touch stamp-libada
oscons:
- $(MAKE) -C $(GCC_DIR) THREAD_KIND="$(THREAD_KIND)" ada/s-oscons-$(THREAD_KIND).ads
+ $(MAKE) -C $(GCC_DIR) THREAD_KIND="$(THREAD_KIND)" \
+ $(FLAGS_TO_PASS) \
+ ada/s-oscons-$(THREAD_KIND).ads
# Check uninstalled version.
check:
--
1.6.0.rc0.182.gb96c7