Blame sofort/ccenv/ccenv.usage

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