Subject: Toolchain Update (12-Nov-2001)
To: None <>
From: Todd Vierling <>
List: tech-toolchain
Date: 11/12/2001 18:44:38
My cable modem had been flaking from Thursday through this morning, so most
of the work I had done was delayed over the weekend.  As you may have seen,
a huge commit to clean up src/tools went in this evening, and it fixes quite
a few outstanding issues with the new toolchain.  I have tested as
rigorously as I can, so please let me know ASAP if something has now broken
that worked before.

If you have items to add, please let me know so that I may update this list.


 - The "do-make-tools" target at the top level is now called "do-tools".
   This is because it is now built in the same manner as lib/csu, lib, etc.

 - MKTOOLS no longer does anything.  The way src/tools build has been updated
   to work like the rest of the tree, and TOOLDIR now has a writeable default,
   so there's no point to MKTOOLS=no.  (Note that MKTOOLS is not USETOOLS;
   the latter is still available, of course.)

 - A cross groff now exists in src/tools/groff, and the <bsd.*.mk> files have
   been updated to make use of it when appropriate.

 - If you're using standard or BSDOBJDIR objdirs, and you have OBJMACHINE
   or USR_OBJMACHINE set, then host programs (those in src/tools and those
   in the tree which use <>) will get a host-OS-specific
   objdir name, such as "obj.sparc.NetBSD-i386-1.5.2".  The first part is
   the target MACHINE; the second is host info from "uname".


The following items are actively being worked on by me as of this writing,
and will be finished tomorrow (Tuesday, 12 Nov):

 - Fix dependencies in src/gnu/usr.bin/f771 for a UPDATE build (pr 14387).

 - Use timestamp files at the top level to allow for automatic recognition
   of restart points.

 - Move source for BUILDING.* (BUILDING.mdoc) to be installed to
   /usr/share/doc, keeping build structure for top-level readable copies.

 - Check "distrib" Makefiles to ensure that standard null targets are
   included where appropriate

 - Check mipseb additions for FSF style (to assess contributability)

 - Fix lib/checkver to work even if shlib_version does not exist (by
   extracting SHLIB_MAJOR, SHLIB_MINOR, and SHLIB_TEENY from "make -V");
   migrate to using SHLIB_* instead of shlib_version in-tree.


The following items are actively on my agenda for the next few days.

 - Remove ${.OBJDIR} references where possible.
   Also convert all instances of fetching an ${.OBJDIR} from a foreign dir
   to the standard "cd foo && ${PRINTOBJDIR}" syntax.

 - Add -fPIC (and -fpic, where needed) versions of libgcc for compiling
   complex C++ shared objects or runtime loaded program modules

 - Distill distrib kernel/fs build rules into a common modular structure
   (there's already a Lot of duplication in here...!).  Fix default targets,
   so standard recursion into distrib is possible.

 - Fix gcc/bfd/ld on alpha to use our current (historic) PLT format and
   nop/unop sequence properly


The following issues are considered important for the toolchain.  I intend
to address all of these; if you wish to help out or take over a bulleted
item, please let me know in e-mail.

 - Convert host tools using GCCisms to more standard code where possible
   to make them usable on more host OS's

 - Investigate newer, more lenient printf -Wformat checks and see if
   stricter checks can be reenabled easily (pr 14314)


These tasks are lower priority, giving precedence where practical to the
tasks above, because of size or complexity (or because the platform involved
isn't completely working on the new toolchain).  Volunteers to help with
these issues are welcome.

 - Port forward changes to gcc 3.0.x and gcc-current
   (may create CVS tree for collaborative merge work)

 - Submit patches for all active gcc branches to FSF

 - Add ability for mtree to look at custom passwd and group files
   (should probably work with a flat text master.passwd, and pull these
   right from src/etc, to provide the necessary gids)

 - Investigate various MIPS reloc lossage on new toolchain (tech-toolchain,

 - Fix ld.elf_so to work with newer MP-safe PLT format on alpha
   (and change gcc/bfd/ld to use it on systems that are capable)

 - Investigate why the "new" nop/unop sequence on alpha gives us pipeline
   caching issues (this has been an issue since binutils 2.9.x) - will
   coordinate with thorpej for tech assistance

 - Fix 128-bit FP emulation on sparc64 so the "-msoft-quad-float" hack
   is unnecessary


I don't have an accurate list of these issues at the moment; I'll post this
in the next update.  (I have many toolchain-related e-mails to sift from the
past few days.)

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --