[patch 34/39] find out ilasm for cross compiling
Robert Schwebel <[email protected]> Sun, 04 Feb 2007 03:31:54 +0100
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Message-ID | <[email protected]> |
Currently, pnet unconditionally tries to run the self-built ilasm. If we are crosscompiling, ilasm was built for the "host" system, so we cannot run it on the "build" box. This patch checks if we find ilasm in the $PATH, so while cross compiling, just make sure that an ilasm tool built for the "build" platform is available there. Signed-of-by: Robert Schwebel <[email protected]> configure.in | 10 ++++++++++ samples/Makefile.am | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) Index: configure.in =================================================================== --- configure.in.orig +++ configure.in @@ -20,6 +20,9 @@ AC_PROG_RANLIB AC_PROG_YACC AM_PROG_LEX +# Tell everyone if we are crosscompiling +AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) + AC_PATH_PROG(TREECC, treecc,, ${prefix}/bin:$PATH) if test -z "$TREECC" ; then echo "treecc is required to build and can be obtained from" @@ -29,6 +32,13 @@ fi TREECC_VERSION=`"$TREECC" -v | (read name version rest; echo $version)` AC_SUBST(TREECC_VERSION) +if test x$cross_compiling = xyes ; then + AC_PATH_PROG(ILASM, ilasm) +else + ILASM="\$(top_builddir)/ilasm/ilasm" +fi +AC_SUBST(ILASM) + AC_PATH_PROG(SYSTEM_AR, ar) dnl Option to disable cygwin1.dll under Windows. Index: samples/Makefile.am =================================================================== --- samples/Makefile.am.orig +++ samples/Makefile.am @@ -5,9 +5,9 @@ noinst_DATA = evenodd.exe hello.exe EXTRA_DIST = evenodd.il hello.il evenodd.exe: evenodd.il - ../ilasm/ilasm -o evenodd.exe $(srcdir)/evenodd.il + $(ILASM) -o evenodd.exe $(srcdir)/evenodd.il hello.exe: hello.il - ../ilasm/ilasm -o hello.exe $(srcdir)/hello.il + $(ILASM) -o hello.exe $(srcdir)/hello.il CLEANFILES = $(noinst_DATA) -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9