Blame sofort/ccenv/ccenv.usage

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