Blame sofort/ccenv/ccenv.usage

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