[Ecls-list] RANLIB, AR, build paths when cross-compiling
Gabriel Dos Reis
gdr at cs.tamu.edu
Mon Oct 4 19:39:25 UTC 2010
Hi Juanjo,
Attached is a patch I had needed (and that has been sitting on my hard-drive
for a while now.) It addresses some pesky issues related to
cross-compiling ECL.
1. ECL hard-codes the name of the program `ranlib'. That should not be.
Rather, like the compiler,the name should be detected at
configuration time. The patch adds a special variable *RANLIB* for
just that. Note that the detection at configuration time is
important because during cross compilation, the name of the program
may be prefixed by the host triplet, e.g. i686-pc-mingw32-ranlib.
This is what the Autoconf AC_PROG_RANLIB macro is for.
2. Similarly, ECL hard-codes the name of the `ar' program. That is no good.
The patch introduces a special variable *AR* for that purpose.
`ar' is looked for at configuration time as a tool, hence AC_CHECK_TOOL.
3. Build path.
When ECL generates C codes, it uses SI::COERCE-TO-FILENAME to
construct an absolute path to the variously generated external files.
That function generates host native paths. That is OK for a native
build. But, it is not OK for a cross build. For example, if you are
using Wine on Unix/Linux to cross compile ECL and use the default
drive mapping, the build system's filesystem / is mapped to the Z:/
drive; so, you will get absolute paths starting with Z:, that is no
good for tools working on the build system. Rather, ECL needs to
generate paths that are grok-able by the build system and its tool.
The proposed patch introduces BRIEF-NAMESTRING which is
ENOUGH-NAMESTRING around SI::COERCE-TO-FILENAME to get rid of the
thr drive letter where unnecessary.
There are other issues related to cross-compiling ECL, but they are
orthogonal to this.
-- Gaby
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecl.diff
Type: text/x-patch
Size: 9111 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20101004/54bccdb8/attachment.bin>
More information about the ecl-devel
mailing list