[ecl-android v0.0.1]

Attila Lendvai attila at lendvai.name
Mon Nov 9 17:38:24 UTC 2015

these are my notes on cross compiling ECL from x64 linux to mipsel linux.

first compile a compatible ecl on the host (some config, like word
size, must match the target):
apt-get install gcc-multilib
CFLAGS=-m32 LDFLAGS=-m32 ABI=32 ./configure --prefix=/opt/ecl-host

then for the target:
export STAGING_DIR=/home/alendvai/workspace/lambdanative/OpenWrt-SDK-ar71xx-generic_gcc-4.8-linaro_uClibc-
export TOOLCHAIN=${STAGING_DIR}/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-
export TARGETROOT=${STAGING_DIR}/target-mips_34kc_uClibc-

PATH=/opt/ecl-host/bin/:${TOOLCHAIN}/bin:${PATH} \
 CFLAGS="-I${TOOLCHAIN}/include -I${TARGETROOT}/usr/include" \
 LDFLAGS="--sysroot=${TARGETROOT}" ./configure \
 --prefix=/opt/ecl-mips --disable-longdouble \
 --with-libffi-prefix=${TARGETROOT} \
 --host=mips-openwrt-linux --with-system-gmp

PATH=/opt/ecl-host/bin/:${TOOLCHAIN}/bin:${PATH} make

at first it will fail. create a file build/cross_config, edit it, and
invoke the above ./configure again.


• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
“The great enemy of clear language is insincerity. When there is a gap
between one’s real and one’s declared aims, one turns as it were
instinctively to long words and exhausted idioms, like a cuttlefish
spurting out ink.”
	— George Orwell (1903–1950)

More information about the ecl-devel mailing list