[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
--enable-longdouble=no

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

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.

HTH,

-- 
• 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