Wednesday, 24 December 2014

Core buildsystem changes

The recent developer weekend gave John-Mark and myself opportunity to
improve the core buildsystem (used for all the libraries) to use
standard "triplet" type identifiers for the ABI being compiled. This
means we now query the compiler [1] about the binary it will build to
setup cross compiling.

We use the environment values for HOST, HOST_CC, BUILD and CC in a
similar manner to how the gnu tooling uses them. Simply:

BUILD - The compiler triplet of the system running the compiler, this
can almost always be omitted and will be detected automatically.

CC - The build systems compiler, allows overriding of the default
compiler (cc) searched for on the PATH

HOST - This is the compiler triplet of the system we are building for,
it it differs from BUILD then we are performing a cross compile.
The compiler name is constructed using this unless HOST_CC is
specified.

HOST_CC - override the constructed compiler name for cross
compilation, the path and details for all the tools are
derived from this.

The core buildsystem has been updated along with the environment
script [2] so in general this has a low impact on developers but a
great gain for more complex build setups such as the CI system.


[1] This uses "cc -dumpmachine"
[2] http://git.netsurf-browser.org/netsurf.git/plain/Docs/env.sh

--
Regards Vincent
http://www.kyllikki.org/

No comments:

Post a Comment