[Ecls-list] ECL now cross compiles???

Juan Jose Garcia-Ripoll worm at arrakis.es
Wed Jul 23 06:14:10 UTC 2003


On Wednesday 23 July 2003 13:05, Eugene Zaikonnikov wrote:
> OK, now I managed to get past configure state, but another problem
> shows up.
> After some amount of compiling, make attempts to perform
> ./dpp /home/viking/work/ecl-0.9/src/c/main.d main.c

To build ECL, two programs are required: ECL (or a minimal version of it 
called ecl_min), and the preprocessor dpp (which converts some lispy notation 
in the sources of ECL to C). I have rewritten part of ECL to avoid building 
these programs when cross-compiling. Now

1) To cross-compile, the user must supply the argument --host= to the 
configuration program. For instance,
	./configure --prefix=/usr/local --build=i586-pc-linux --host=i686-pc-linux
--host denotes the machine for which ECL is being compiled. --build is AFAIK 
optional, and it denotes the machine in which ECL is being built.

2) The configuration process will stop at some point, creating a file with 
information that the user has to fill in. More or less, the file looks as 
described below in the build/cross_config file section.

3) Once the user fills out the information, she can continue the configuration 
process, typing the same commands:
	./configure --prefix=/usr/local --build=i586-pc-linux --host=i686-pc-linux
and build using
	make

The new configuration process does not use src/h/machines.h to figure out 
information about the system, but a minimal set of variables from 
src/aclocal.m4 and many more autoconf tests. There is therefore less to 
maintain, and the number of machine-dependent #if should be now to a minimum.

To cross-compile, a copy of "ecl" with the same features should be installed 
in the system which is used to build the cross-compiled ecl. Beware that you 
use precisely the same version of the program, because now "dpp" is installed 
with the compiler, and because the latest ecl has a different implementation 
of CLOS.

Summing up:

./configure --prefix=/usr/local --build=i586-pc-linux --host=i686-pc-linux
[edit build/cross_config]
./configure --prefix=/usr/local --build=i586-pc-linux --host=i686-pc-linux
make
make install

Since I have no cross compilers in my computer, there might be still things to 
polish. For instance, I am not entirely sure whether the lisp->C translator 
assumes a certain fixnum size or type, etc. This has to be debugged.

I have uploaded the fixes, together with the experimental implementation of 
CLOS to the CVS branch REMOVE_DISPATCH, and to
	http://ecls.sf.net/patch-0.9-current-exp.gz

Best regards,

Juanjo

------ build/cross_config file -----

###
### YOU ARE TRYING TO CROSS COMPILE ECL.
### PLEASE FOLLOW THESE INSTRUCTIONS:
###
### 1) Vital information cannot be determined at configuration time
### because we are not able to run test programs. A file called
###             /home/jlr/src/ecls-new/build/cross_config
### has been created, that you will have to fill out. Please do
### it before invoking "configure" again.

### 1.1) Direction of growth of the stack
ECL_STACK_DIR=up

### 1.2) Choose an integer datatype which is large enough to host a pointer
CL_FIXNUM_TYPE=int
CL_FIXNUM_BITS=32
CL_FIXNUM_MAX=536870911L
CL_FIXNUM_MIN=-536870912L

### 1.3) Order of bytes within a word
ECL_BIGENDIAN=no

### 1.4) What characters signal an end of line. May be LF (Linefeed or \n)
###      CR (Carriage return or \r), and CRLF (CR followed by LF).
ECL_NEWLINE=LF

### 2) To cross-compile ECL so that it runs on the system
###             i586-pc-linux
### you need to first compile ECL on the system in which you are building
### the cross-compiled files, that is
###             i686-pc-linux
### By default we assume that ECL can be accessed from some directory in
### the path.
ECL_TO_RUN=/home/jlr/bin/ecl





More information about the ecl-devel mailing list