Blame sofort/ccenv/ccenv.usage

711507
A few words on sofort's tool-finding logic
711507
==========================================
711507
711507
# the goals of sofort's tool-finding logic are:
711507
- follow a clear, transparent, and consistent logic
711507
- allow users to easily specify per-build preferences
711507
- allow distros to easily and cleanly use site-wide settings
711507
711507
711507
# three-way terminology:
711507
- native machine: where make(1) will be running.
711507
- host machine:   where the package's program or libraries will execute.
711507
- target machine: where code generated by the host package will execute.
711507
711507
! NOTE, however, that the host/target distinction is only relevant
711507
  when building a code-generating utility (e.g. a compiler), and that
711507
  the two are otherwise rather synonymous. Moreover, in practice it
711507
  is much more common to see configure scripts being invoked with a
711507
  --target=<machine> argument specifying the host, than with a
711507
  --host=<machine> argument.
711507
711507
711507
# invocation and names of binary tools:
711507
- agnostic names (ar, nm, objdump, ...)
711507
- branded names (llvm-ar, llvm-nm, llvm-objdump, ...)
711507
- machine-prefixed agnostic names (x86_64-nt64-midipix-ar, ...)
711507
- machine-prefixed branded names (x86_64-linux-gnu-gcc-ar, ...)
711507
- machine-specifying branded tools, as in
711507
  llvm-ar --target=x86_64-linux.
711507
711507
711507
# cross-compilation: default search order:
711507
- machine-prefixed agnostic tools
711507
- machine-prefixed branded tools, starting with the prefix
711507
  most commonly associated with the selected compiler (that is,
711507
  ``gcc'' when using gcc, and ``llvm'' when using clang)
711507
- (machine-specifying) agnostic tools
711507
- (machine-speficying) branded tools, starting once again with the
711507
  prefix most commonly associated with the selected compiler
711507
711507
711507
# native builds: default search order:
711507
- agnostic tools
711507
- machine-prefixed agnostic tools
711507
- machine-prefixed branded tools
711507
- branded tools
711507
711507
711507
# using an alternate search order:
711507
- --toolchain=<prefix> (e.g. --toolchain=llvm) --> search for tools
711507
  that begin with <prefix> before searching for agnostic tools
711507
711507
711507
# restricting which tools may be searched:
711507
- --zealous          --> only search for agnostic tools
711507
- --zealous=<prefix> --> only search for <prefix>-branded tools
711507
711507
711507
# per-tool overrides, by example of the ``ar'' tool:
711507
- AR=ar          --> set AR to $(command -v ar)
711507
- AR=/path/to/ar --> set AR to the specified absolute path
711507
711507
711507
# host generated config file and variable names:
711507
- ccenv/host.mk
711507
- AR, NM, OBJDUMP, ...
711507
711507
711507
# native generated config file and variable names:
711507
- ccenv/native.mk
711507
- NATIVE_AR, NATIVE_NM, NATIVE_OBJDUMP, ...
711507
711507
711507
# distro: site-wide preferences
711507
- --ccenv=/path/to/site-specific/ccenv
711507
- use the above to create ccenv as a symlink to
711507
  /path/to/site-specific/ccenv, and to accordingly
711507
  skip configure's tool-finding step.