Blame sofort/ccenv/ccenv.usage

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