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.
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.
Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.
Reviewed by christos.
generates too many false positives that require gross amounts of
workaround, and the other WARNS=2 stuff is quite useful. Per discussion
with simonb & christos.
using `uname -s`-`uname -r`-`uname -p || uname -m`. This can be overridden
in mk.conf or the environment, and is used by host tools to ensure that
build hosts do not clobber each other.
* Now that there's an objdir in src/tools, make a default TOOLDIR by creating
"tools.${HOST_OSTYPE}" in the objdir (if it exists) of src/tools. This
means that TOOLDIR is no longer required to be set in a build, though it
still may be set manually if desired.
* Set MKTOOLS to "yes" by default, since the default TOOLDIR is now located
in a known mutable location. This may still be set manually if desired.
running from inside of $BSDSRCDIR (recurse back and look for file/dir
signatures or reach /, whichever comes first).
Do it once and then pass the results to sub-makes.
Finally, if using the new toolchain and USETOOLS=yes check $TOOLDIR
before using it. Print an error message out if it's not set when expected
here.
generic architecture case; this permits the later ELF clause to set
them properly for ELF platforms.
This will cause crtbeginS.o and crtendS.o to be included in shared
libraries built on all ELF platforms, not just alpha, mips, vax, and
sparc.
(and dependall) targets to work properly.
XXX THIS IS BROKEN. It's highly questionalble that we should be applying
our .depend-generating rules to a host system -- the mkdep we currently
use assumes GCC.
at the moment) are pulled out into tc.mi and tc.old files.
tc.mi has any files which are in the new toolchain only and tc.old contains
the reverse (files which only existed in the old toolchain). The remainder
of the toolchain that is common between both old and new is still contained
in the various mi/md files.
Check for USE_NEW_TOOLCHAIN=yes in makeflist to determine which tc files to
pull in if they exist.
XXX - All the toolchain bits should eventually be pulled out into separate
lists as tc.mi and tc.<arch>. Leaving it for now until the new toolchain is
fully integrated on all ports.
Rather than special-case a bunch of stuff, make this always parallel-safe,
and have make call upon the .l.c/.y.c followed by .c.o/.c.lo transforms,
rather than try to go right from .l/.y to .o/.lo.
target; needed for MIPS and probably arm ports.
.include the full path name of machine/Makefile.inc so that this works
if the machine-links target hasn't been run yet.
.include ${MACHINE_CPU}/include/Makefile.inc too.
shlib_version file. (Part of a larger change which will also update
checkver to deal with this, and migrate old makefiles to include
SHLIB_MAJOR/SHLIB_MINOR. For now, just add the hooks so that the old
gnu/lib toolchain libraries can use this as a workaround.)
that variable only for including make(1) variables. Much more consistent
and less prone to ambiguity this way (and now, ${MAKECONF} can be used in
messages indicating a missing option needed for a build).
LDSTATIC Control program linking; if set blank, link everything
dynamically. If set to "-static", link everything statically.
If not set, programs link according to their makefile.
+ sync with reality, and document "MKMAN= no" in preference to "NOMAN= noman"
+ get in quick before the 80-column police notice what we were doing
+ spell "existence" correctly