* configure.in (CROSS_COMPILING): New automake conditional.
authorRaja R Harinath <harinath@hurrynot.org>
Tue, 27 Sep 2005 10:43:38 +0000 (10:43 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Tue, 27 Sep 2005 10:43:38 +0000 (10:43 -0000)
($mcsdir/build/config.make): Don't clobber when cross-compiling.
(GLIB_CFLAGS, GLIB_LIBS, GMODULE_CFLAGS, GMODULE_LIBS):
Define even when cross-compiling.
* mono/mini/Makefile.am ($(arch_built)) [CROSS_COMPILING]: Error out.

svn path=/trunk/mono/; revision=50843

ChangeLog
configure.in
mono/mini/ChangeLog
mono/mini/Makefile.am

index 6a77594d1754c596e7c1726353b131d9945b9c5f..48febf2b8fdb2943a79c11de1504ac9f3a26d13b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,10 @@
 
        * configure.in (BUILD_MCS): New automake conditional.  Used to
        disable building the mcs/ tree if cross-compiling.
-       ($mcsdir/build/config.make): Don't clobber if we're cross-compiling.
+       (CROSS_COMPILING): New automake conditional.
+       ($mcsdir/build/config.make): Don't clobber when cross-compiling.
+       (GLIB_CFLAGS, GLIB_LIBS, GMODULE_CFLAGS, GMODULE_LIBS):
+       Define even when cross-compiling.
        * runtime/Makefile.am (all-local, install, uninstall, clean-local):
        Disable building in the mcs/ tree if !BUILD_MCS.
 
index 2478197016ee4a09fd722db03eb864d7c3c34043..297372792a78ff3661d81fdeef7a4968628f309d 100644 (file)
@@ -253,6 +253,8 @@ AC_SUBST(CC_FOR_BUILD)
 AC_SUBST(HOST_CC)
 AC_SUBST(BUILD_EXEEXT)
 
+AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
+
 # Set STDC_HEADERS
 AC_HEADER_STDC
 AC_LIBTOOL_WIN32_DLL
@@ -398,19 +400,17 @@ GLIB_REQUIRED_VERSION=1.3.11
 
 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
 
-if test "x$cross_compiling" = "xno"; then
-   GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
-   GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
-   GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
-   GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
-fi
+GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
+GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
+GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
+GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
 
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 
-if test x$platform_win32 = xyes -a x$cross_compiling = xno; then   
+if test x$cross_compiling$platform_win32 = xnoyes; then
    AC_MSG_CHECKING(for cygwin glib2-dev package)
    if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
       AC_MSG_RESULT(found)
index 691fe80f3ba746305c1f2ceedc6bfc62b30588e5..4f551d947d840c3ccf91612c6a792bf95e0e3ec8 100644 (file)
@@ -2,8 +2,8 @@
 
        * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
        (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
-       (AM_CFLAGS) [ARM]: Add arch/arm directory from the
-       build tree.
+       (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
+       ($(arch_built)) [CROSS_COMPILING]: Error out.
 
 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
 
index a37984852b9ff9a88efd7f568a82038db823e940..38aa293baf6f2c1faa74868a3a43ee0584532850 100644 (file)
@@ -311,6 +311,15 @@ libmono_la_LIBADD = \
 TestDriver.dll: $(srcdir)/TestDriver.cs
        $(MCS) /out:TestDriver.dll /target:library $(srcdir)/TestDriver.cs
 
+if CROSS_COMPILING
+
+## Gross hack.  Making 'genmdesc' a host binary takes more effort
+$(arch_built):
+       echo "*** please build $(arch_built) on a native build tree and copy it here"
+       exit 1
+
+else !CROSS_COMPILING
+
 cpu-pentium.h: cpu-pentium.md genmdesc$(EXEEXT)
        ./genmdesc $(srcdir)/cpu-pentium.md cpu-pentium.h pentium_desc
 
@@ -335,6 +344,8 @@ cpu-s390x.h: cpu-s390x.md genmdesc$(EXEEXT)
 cpu-ia64.h: cpu-ia64.md genmdesc$(EXEEXT)
        ./genmdesc $(srcdir)/cpu-ia64.md cpu-ia64.h ia64_desc
 
+endif !CROSS_COMPILING
+
 inssel.c inssel.h: $(BURGSRC)
        $(monodir)/mono/monoburg/monoburg -c 1 -p -e $(BURGSRC) -d inssel.h -s inssel.c