tlbuild: Cross problems

 
 4.7.2 Cross problems
 --------------------
 
 The fact that binaries for the host system cannot be executed on the
 build system causes some problems.
 
    One problem is that configure tests using 'AC_RUN_IFELSE' can compile
 and link the test program but cannot execute it.  Such tests should be
 avoided if possible and otherwise must supply a pessimistic test result.
 
    Another problem arises if the build process must execute some
 (auxiliary or installable) programs.  Auxiliary programs can be placed
 into a subdirectory that is configured natively as is done for
 'texk/web2c/web2c', 'texk/dvipsk/squeeze', and 'texk/xdvik/squeeze'.
 The module 'libs/freetype2' uses the value of 'CC_BUILD', 'BUILD-gcc',
 'gcc', or 'cc' as the compiler for the auxiliary program.
 
    The situation for installable programs needed by the build process is
 somewhat different.  A rather expensive possibility, chosen for the ICU
 libraries in module 'libs/icu', is to first compile natively for the
 build system and in a second step to use these (uninstalled) programs
 during the cross compilation.
 
    This approach would also be possible for the tools such as 'tangle'
 used in the module 'texk/web2c' to build the WEB programs, but that
 would require first building a native 'kpathsea' library.  To avoid this
 complication, cross compilation of programs written in (C)WEB requires
 sufficiently recent installed versions of 'tangle', 'ctangle',
 'otangle', and 'tie'.
 
    Building 'xindy' requires running the host system 'clisp' binary,
 thus cross compilation is painful, but possible.