infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
Instead of:
install -m 600 [...]
ranlib -t [...]
chmod 444 [...]
use the newly added "-a" flag to install(1) to invoke ranlib ifndef UPDATE.
Should prevent unnecessary ranlib-ing of installed libraries with UPDATE
defined.
Per discussion with simonb.
round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
compiles. Based loosely on mkdep.old.compiler (so CSRG license copied),
but now uses just one rewrite (awk) process per cpp invocation and
determines the proper way to run cpp and awk via a "configure" script.
Use HOST_MKDEP in bsd.hostlib/hostprog.mk (defaulting to the old override
value of MKDEP), and give it a TOOLDIR equivalent in bsd.own.mk.
old one either. The "new toolchain" environment is closer to what we
want, however, for using the external toolchain currently required for
x86_64, so set USE_NEW_TOOLCHAIN for x86_64.
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".
- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.
- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs
* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz
* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.
* Always install /sbin/init statically (for now)
The net effect of these changes depends on how the variables are set:
1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so
2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so
3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed
it (kernel and libc).
The current version of the gas assembler in the tree (2.11.2) already
defaults to generating object files for "-Av9 -64", supporting V9
instructions in ELF64 object format. "-Av9a" is only needed for specific
parts of the NetBSD base sources, and not for all third-party code.
Wrap assignments of various tools within USETOOLS_BINUTILS and
USETOOLS_GCC (names reflect the FSF packages the tools are provided
by), which default to "yes", for easy testing of different versions
of these packages.
can be specified in mk.conf: AR, AS, LD, NM, OBJCOPY, OBJDUMP,
RANLIB, SIZE, and STRIP.
This, along with some symlinks in TOOLDIR, makes it much easier to
test different versions of the GNU toolchain (e.g. binutils-current).
as it calls troff/etc without any leading pathnames. Otherwise the tools
version is fairly useless as the installed system version will be used to
build all manpages
The dependency should be against the TOOLDIR files (is USETOOLS=yes) but
installs will always use ${DESTDIR}/usr/share/tmac.
Without this if people do not have /usr/share/tmac/tmac.andoc on their
systems while building the build will break in the groff areas due to
the dependency rules.
i.e. if the root of the object tree doesn't exist then complain and exit.
This makes both sections consistant to each other (MAKEOBJDIR specifies an
exact directory so there's no root per se to check so nothing can really be
done there).
Use the old setup for MAKEOBJDIRPREFIX but also add a new check for
_SRC_TOP_OBJ_ and use that if it's set. This allows a make release using
build.sh (which uses MAKEOBJDIR patterns) to function correctly on r/o
source tree's.
INSTALL_FILE does.
2) Patch around a bug that has been biting people in which bsd.own.mk
attempts to cd into space when building outside of the tree. I may
have a better solution for the whole thing later.
make bsd.lib.mk use INSTALL_SYMLINK instead of mv and ln -s.
Note: There is still one weird case I left alone, in which symlinks
get built in the objdir. I didn't want to log metadata for those links
so I left the old machinery in for them.
XXX do we even need that elaborate dance for the ln's in the objdir?
0) rename UNPRIVILEGED UNPRIVED. It was too long. We'll argue about if
we should replace it with yet something else later. It currently
logs metadata by default. We'll argue more about that later too.
1) create a _SRC_TOP_OBJ_ variable pointing at the /usr/src objdir so
we know where to dump metadata.
2) Add a METALOG variable pointing at the default location for the
metadata log. (This may be moved or renamed -- the location is just
for testing.)
3) Add a HOST_INSTALL_FILE used in host tools Makefiles instead of
INSTALL_FILE, which doesn't include ${INSTPRIV} (i.e -U -M ${METALOG})
4) Add INSTALL_LINK, INSTALL_SYMLINK for use in other .mk files so we
can get rid of explicit uses of ln. Slightly clean up INSTALL_FILE.
It is infeasible for some ARM ports to use anything but ELF/new-toolchain,
and this allows for the ARM ports that aren't ready for ELF to stay at
MACHINE_ARCH == arm32 until they're ready. The rest of the ARM ports
have a userbase such that if a flag day happens with the compiler (there
are a couple of ABI issues still being discussed), that it won't matter
so much.
Discussed with Ben Harris, Matt Thomas, and Chris Gilbert.
* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.
* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.
* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.
* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).
* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.
* Add src/tools/groff and set up paths to work with this cross groff.
is set (and MAKEOBJDIR[PREFIX] is not in use). This permits multiple hosts
to compile hostprogs (not just src/tools) for a given target without
colliding with each other.
Currently restricted only to new toolchain builds, as this requires a new
make(1) in order to function properly.
source directory. This will use BSDOBJDIR of OBJMACHINE is unset, and will
create a directory '.MACHINE' inside BSDOBJDIR if OBJMACHINE is set.
MAKEOBJDIR and MAKEOBJDIRPREFIX based objdirs already cope with the top
level directory just fine.
creation, to exclude conflicting make targets from botching pkgsrc), to
avoid defining INSTALL_FILE. pkgsrc is self-contained except for
<bsd.own.mk>, so this doesn't have an adverse effect on real <bsd.*.mk>
build trees.