This is as far as I've got on my FC3 system (please bear with me, this
is my first attempt at cross-compiling an application):
First, I downloaded and installed binutils-cross-arm-2.11.2-0.i386.rpm,
linux-headers-arm-sa1100-2.4.6-3.i386.rpm,
gcc-cross-sa1100-2.95.2-0.i386.rpm, glibc-arm-2.2.2-0.i386.rpm
# Extract sources and configure them
tar -zxf emacs21.3.tar.gz
mkdir emacs-arm-build
cd emacs-arm-build
export PATH=/opt/Embedix/tools/bin/:$PATH
CC=arm-linux-gcc ../emacs-21.3/configure --build=i386-linux \
--host=arm-linux --without-x
# Fix library paths
cd src
mv Makefile Makefile.orig
sed -e"s:/usr/lib/crt1.o:/opt/Embedix/tools/arm-linux/lib/crt1.o:" \
-e"s:/usr/lib/crti.o:/opt/Embedix/tools/arm-linux/lib/crti.o:" \
-e"s:/usr/lib/crtn.o:/opt/Embedix/tools/arm-linux/lib/crtn.o:" \
< Makefile.orig > Makefile
# Make binary needed during compilation
make CC=gcc prefix-args
cd -
# Gather everything needed to build final emacs binary on the Zaurus
make; make
export SDIR=../emacs-21.3
export DDIR=../emacs-arm
mkdir -p $(DDIR)/{lisp,info,bin,etc}
cp src/temacs $(DDIR)/bin
cp $(SDIR)/lisp/*.elc $(DDIR)/lisp
cp $(SDIR)/lisp/{paths,loadup,loaddefs,version}.el $(DDIR)/lisp
cp -r /usr/share/emacs/21.3/etc/* $(DDIR)/etc
So, I happily copy the emacs-arm directory over to my Zaurus and run:
temacs -batch -l loadup dump
... and realize that there are paths from my desktop system hardcoded
into the temacs binary:
Warning: arch-independent data dir (/usr/local/share/emacs/21.3/etc/) does not exist
Warning: Lisp directory `/home/peter/src/emacs-21.3/lisp' does not exist.
Cannot open load file: loadup
Where do I go from here? Suggestions gratefully received. And better ways of cross-compiling Emacs would be even better!
(Also posted to comp.emacs).