Description
Hi all,
I have managed to compile
(or I should said κόσμος-compile ) luatex and luahbtex from
https://gitlab.lisn.upsaclay.fr/texlive/luatex
under Linux Ubuntu x86_64, using its build.sh script.
-
building is done in 2 steps, one with CC="x86_64-unknown-cosmo-cc
and one with CC="aarch64-unknown-cosmo-cc because the arm step needs
the "--enable-arm-neon=on option at config time.
Then I build the ape binary following the example in cosmocc --help.
Two steps are ok but I would like to use a single step with CC=cosmocc, any suggestion is welcome. -
llround
is unresolved at linking time: I have replaced it withlround
but I am not sure if it can be solved in another way. -
texk/web2c/luatexdir/tex/maincontrol.h has
extern boolean privileged(void);
that seem to conflicts with a privileged symbol used by cosmocc; I have fixed with
#ifdef __COSMOPOLITAN__
#undef privileged
#endif
extern boolean privileged(void);
There are also a few other patches to some config.ac, but I think that they can go upstream (to TexLive, I mean),
and texk/web2c/luatexdir/luasocket/src/usocket.c
has
#ifdef __COSMOPOLITAN__
#include "libc/sock/struct/pollfd.h"
#endif
that I think I cannot avoid.
The ape format runs on Linux / Windows / FreeBSD x86_64 (I have to check aarch64 with a rpi) but
I haven't done extensive testing yet.
--
luigi