Subject: HEADS UP: new toolchain info! (now default on i386)
To: None <>
From: Todd Vierling <>
List: tech-toolchain
Date: 09/22/2001 01:43:29
Just before sending this message, USE_NEW_TOOLCHAIN became default on i386
in -current.  Some changes have happened with this transition, so this mail
will briefly outline what the new toolchain does, and what mk.conf variables
are of concern to new toolchain users (on all platforms, not just i386).

=== general considerations

* sharesrc (or at least, share/mk) is required in order to do "make build",
  whether new toolchain or old.  The top level build now uses "-m" to pull
  the .mk files right out of the source tree -- thus avoiding version skew.

* NOCLEANDIR is deliberately not honored under src/tools.  The reason for
  this is that the update strategy of src/tools is a little different:

    - Tools are rebuilt based on timestamp checking between the installed
      tool and its sources; this means that a tool won't necessarily need
      rebuilding if its build directory has been cleandir'd.

    - Tools that are out-of-date are much more at risk of screwing up the
      build than sources in various main tree directories.  Accordingly, a
      tool rebuild will *always* cleandir before building.

* The system can now cross-build the standard "make build" from a 1.5 host,
  but automated kernel builds ("make release") have not been twiddled yet.
  This is coming next week.  (Also, "lorder" will bitch about the use of
  symbolic names with "trap" in sh(1); this is harmlessly verbose, and I
  will work around it later.)

* I'm currently setting up an environment to do testing on a few foreign
  host platforms (such as Cygwin), where there are other host tools that
  will need to be added to src/tools.  So even if it all builds fine for
  you, you may still see more host tools pop up.  8-)

=== mk.conf variables for USE_NEW_TOOLCHAIN systems

    yes [default]   - use the new host toolchain for all source tree builds
    no              - use system-supplied toolchain

    This is probably going to have odd reactions w.r.t. pkgsrc, and I added
    a conditional for BSD_PKG_MK in <> to take care of this,
    hopefully.  I'll have to double-check it all this weekend.

    The purpose of setting this to "no" is if you want to build a portion of
    the tree without building the toolchain -- i.e. to update dhcpd or

    [default unset] - directory to hold host toolchain

    TOOLDIR defaults to unset, which means that it must be set by any system
    building to use the new host toolchain.  (If USETOOLS=no, TOOLDIR is
    ignored.)  This directory should correspond to a given source tree and
    host platform; it can contain multiple targets -- all target-specific
    binaries are divergently named.

    yes             - rebuild host tools as needed
    no [default]    - fail the build if a host tool needs to be updated
    always          - rebuild all host tools on every build


If you run into any trouble with this, please e-mail me.  This will be
documented more as the new toolchain is refined.

I had to make this notice short because I will be traveling all day tomorrow
(22 September 2001).  However, I will check up in the evening and address
any reported problems then.

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5.2 available on CD-ROM soon!  --