Blame sofort/ccenv/ccenv.usage

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