Blame sofort/ccenv/ccenv.usage

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