[GRASS-dev] current grass 6.3.cvs cross compilation

Glynn Clements glynn at gclements.plus.com
Mon Dec 4 19:44:44 EST 2006


Benjamin Ducke wrote:

> Are there any plans to modify the GRASS configure script to
> allow for MINGW cross compilation?

SC_CONFIG_FLAGS would need to be changed to use $host etc rather than
the output from "uname". The main problem is that the two approaches
use entirely different platform identifiers. E.g on my system:

	# this is what SC_CONFIG_FLAGS uses
	$ echo `uname -s`-`uname -r`
	Linux-2.6.15.1
	# this is what autoconf says
	$ ./configure ...
	...
	GRASS is now configured for:  i686-pc-linux-gnu
	...

IOW, someone would need to change all of the "case" patterns to use
autoconf names instead, which means figuring out the mapping between
the two.

The only viable solution I can see is to essentially scrap the bulk of
the existing SC_CONFIG_FLAGS macro, and replace it with:

    case $host in
	i?86-pc-linux-*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"
	    CFLAGS_OPTIMIZE=-O2
	    SHLIB_LD="${CC} -shared"
	    LDFLAGS="-Wl,--export-dynamic"
	    LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
	    ;;
	*)
	    AC_MSG_ERROR([*** Unsupported platform: $host; please update SC_CONFIG_FLAGS in aclocal.m4])
	    ;;
    esac

Then, we wait for people to contribute the information which we need
to support the other platforms. The downside is that the other
platforms won't be supported until that happens.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list