From 944e2bdb67e96024a149fbdc07e5ec83bae0abe3 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 26 Jan 2020 16:40:49 -0500 Subject: build system: created skeleton. --- sofort/ccenv/ccenv.usage | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sofort/ccenv/ccenv.usage (limited to 'sofort/ccenv/ccenv.usage') diff --git a/sofort/ccenv/ccenv.usage b/sofort/ccenv/ccenv.usage new file mode 100644 index 0000000..8eab780 --- /dev/null +++ b/sofort/ccenv/ccenv.usage @@ -0,0 +1,78 @@ +A few words on sofort's tool-finding logic +========================================== + +# the goals of sofort's tool-finding logic are: +- follow a clear, transparent, and consistent logic +- allow users to easily specify per-build preferences +- allow distros to easily and cleanly use site-wide settings + + +# three-way terminology: +- native machine: where make(1) will be running. +- host machine: where the package's program or libraries will execute. +- target machine: where code generated by the host package will execute. + +! NOTE, however, that the host/target distinction is only relevant + when building a code-generating utility (e.g. a compiler), and that + the two are otherwise rather synonymous. Moreover, in practice it + is much more common to see configure scripts being invoked with a + --target= argument specifying the host, than with a + --host= argument. + + +# invocation and names of binary tools: +- agnostic names (ar, nm, objdump, ...) +- branded names (llvm-ar, llvm-nm, llvm-objdump, ...) +- machine-prefixed agnostic names (x86_64-nt64-midipix-ar, ...) +- machine-prefixed branded names (x86_64-linux-gnu-gcc-ar, ...) +- machine-specifying branded tools, as in + llvm-ar --target=x86_64-linux. + + +# cross-compilation: default search order: +- machine-prefixed agnostic tools +- machine-prefixed branded tools, starting with the prefix + most commonly associated with the selected compiler (that is, + ``gcc'' when using gcc, and ``llvm'' when using clang) +- (machine-specifying) agnostic tools +- (machine-speficying) branded tools, starting once again with the + prefix most commonly associated with the selected compiler + + +# native builds: default search order: +- agnostic tools +- machine-prefixed agnostic tools +- machine-prefixed branded tools +- branded tools + + +# using an alternate search order: +- --toolchain= (e.g. --toolchain=llvm) --> search for tools + that begin with before searching for agnostic tools + + +# restricting which tools may be searched: +- --zealous --> only search for agnostic tools +- --zealous= --> only search for -branded tools + + +# per-tool overrides, by example of the ``ar'' tool: +- AR=ar --> set AR to $(command -v ar) +- AR=/path/to/ar --> set AR to the specified absolute path + + +# host generated config file and variable names: +- ccenv/host.mk +- AR, NM, OBJDUMP, ... + + +# native generated config file and variable names: +- ccenv/native.mk +- NATIVE_AR, NATIVE_NM, NATIVE_OBJDUMP, ... + + +# distro: site-wide preferences +- --ccenv=/path/to/site-specific/ccenv +- use the above to create ccenv as a symlink to + /path/to/site-specific/ccenv, and to accordingly + skip configure's tool-finding step. -- cgit v1.2.3