Blame sofort/ccenv/ccenv.usage

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