Subject: bug#13479: Cross Compiling for ARM

From: Stefan Monnier <[email-masked]>
Date: Fri, 18 Jan 2013 09:26:49 -0500

> Obviously, I also had to CANNOT_DUMP=yes as well.

That's a problem that would need to be solved, of course, because there
are invariably more bugs in this mode of operation.

> 1) It doesn't look like emacs has a concept of a BUILDCC.  I like to set CC
> to the cross compiler since that seems to be what most things need.
> However make-docfile and test-distrib need to be built with the local
> compiler.  Usually the path to the local compiler is stored in BUILDCC.
> I just changed the $(CC) to $(BUILDCC) in the makefile for those two file and
> everything compiled ok.

We could incorporate this part of your changes, I think.

> 2) The lisp and leim directories really want a local copy of Emacs to
> compile.

Actually, any random local copy probably won't cut it, it needs to be
sufficiently uptodate.  In the worst case, it needs to be exactly the
version you're compiling.

What would need to happen is to more clearly separate the
src/bootstrap-emacs (which should be built with BUILDCC) from the
src/emacs (built with CC), so that you can run the src/bootstrap-emacs
to compile the lisp and leim subdirectories.

An alternative is of course to use an emulator to run src/emacs and/or
src/bootstrap-emacs.

> 3) Now, a real bug.  With an undumpped emacs,
> window__resize_root_window_vertically is called before it's defined.  Even
> putting if (initialzed) before the call didn't help.  I had to put  if (!EQ
> (XSYMBOL (Qwindow_resize_root_window_vertically)->function, Qunbound))
> before the two calls to  call2 (Qwindow_resize_root_window_vertically,  in
> window.c.

Most/all calls to Elisp from C should protect themselves with calls to
Ffboundp or similar, indeed.  Martin, could you take care of that?

        Stefan