Blame sofort/ccenv/ccenv.usage

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