HomeFreeBSD

Always pass in -target and --sysroot flags for the build.

Description

Always pass in -target and --sysroot flags for the build.

The internal bootstrap compiler has a default sysroot set by TOOLS_PREFIX
and target set by TARGET/TARGET_ARCH. However, there are several needs to
always pass an explicit --sysroot and -target.

  • External compiler needs sysroot and target flags.
  • External ld needs sysroot.
  • To be clear about the use of a sysroot when using the internal compiler.
  • Easier debugging.
  • Allowing WITH_SYSTEM_COMPILER+WITH_META_MODE to work together due to the flip-flopping build command when sometimes using external and sometimes using internal.
  • Allow using no lld which has support for default paths.

The default sysroot in the bootstrap compiler is not changed. The
buildenv compiler will still work with its default and will also
include -target/--sysroot from CC in the environment.

MFC after: 3 days
Discussed with: emaste, brooks (BSDCam)
Reviewed by: emaste
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
bdreweryAuthored on
Reviewer
emaste
Parents
rS304680: EFI loader: only open/close on the net device with tftpfs
Branches
Unknown
Tags
Unknown