[Ecls-list] ECL cross-compilation

Eugene Zaikonnikov viking at funcall.org
Tue Jul 22 08:14:42 UTC 2003


* "Juan" == Juan Jose Garcia Ripoll <worm at arrakis.es> writes:

Juan>  On Tuesday 22 July 2003 13:25, Eugene Zaikonnikov wrote:
>> Hello,
>> 
>> I am trying to port ECL to Agenda VR3. It runs Linux 2.4.0, XFree86
>> 4.0 and has 8M RAM + 16M flash storage. The issue is complicated by
>> the fact that I am a total newbie in ECL and cross-compilation :)

Juan>  I was toying with the idea of porting ECL to a Palm myself --
Juan>  lack of time and compilation tools, and a palm prevented it
Juan>  though.

Well, in this case it should be easier: Agenda was designed to run
Linux, so POSIX environment and some of the libs are already there.

Juan>  However, I had to write a couple of tests that need information
Juan>  about the run-time environment: they check the size of fixnums
Juan>  and the direction of growth of the stack. It should be very
Juan>  easy to modify configure.in adding the options
Juan>  --with-stack-growth=(up|down)
Juan>  --with-fixnum-type=(int|long)
Juan>  --with-fixnum-bits=# of bits in C fixnum type 

Juan>  Then, in aclocal.m4 one needs to add a third argument to each

Shouldn't it be a fourth argument?

Juan>  AC_TRY_RUN, providing a default value for the cross-compilation
Juan>  environment, which would be taken from the configuration
Juan>  options at the command line.

OK, how should it look in practice? I define e.g.

AC_ARG_WITH(stack-grows-down,
	[--with-stack-grows-down    Stack grows down.],
	stack_down="yes")

then later in configure.in

if test ${stack_down} = "yes"; then
  AC_DEFINE(CROSS_STACK_DOWN)
fi

and in aclocal.m4 append to ECL_STACK_DIRECTION check the following:

AC_MSG_RESULT(no), dnl alternative
AC_MSG_RESULT(yes) dnl cross-compilation default
AC_DEFINE(DOWN_STACK, CROSS_STACK_DOWN))])

Right? (I've never done any autoconf stuff before.)

Juan>  Funny, my current benchmark gives 800k stripped, 3Mb resident
Juan>  size on a P6, which is a very inefficient architecture. Does
Juan>  the Palm provide a dynamically linked C library?

I've looked into its /lib; seems that at least libc and libm are
there. ECL on x86, however, also links to libdl.so and ld-linux.so;
not sure if I can get around these :/

[useful hints snipped - thanks!]

Juan>  I would like to help you on this. However, I have very strict
Juan>  time constraints at the moment: I'll be away from the 24th to
Juan>  the 28th, and then after the 9th of August I'll be hacking on
Juan>  the spanish beach without internet connection :-)

No problem: since the 28th I'll be away from the net for three weeks
anyway :)


Thank you for your help,

--
  Eugene




More information about the ecl-devel mailing list