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
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
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.
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.
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.
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.
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.
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).
don't use unsigned long where 32bit unsigned variable is asked for.
use u_int32_t. (not sure if uint32_t is better or not, but anyway,
u_int32_t <-> uint32_t should not raise binary compatibility issue)
PR10921.
TODO: have arch-dependent Makefiles where we supply -DFOO for optimization.
(do not change size of variable though)
XXX: we should actually nuke all other #ifdef in /usr/include/openssl/*.h,
however, that needs a lot of work and will make future openssl upgrade harder.
remove RC5 and IDEA by default. build them separately as
libcrypto_{rc5,idea}.a. put dummy function, which is "warning to stderr
and exit(1)". NOCRYPTO_{RC5,IDEA} are obsoleted.
PR10883.
overrideable in mk.conf
Document in bsd.README; this is distinct from "MKOBJ", which controls
whether "make obj" does anything.
In the top-level makefile, if MKOBJDIRS != "no", do a "make obj" at an
appropriate point during a "make build".
in a single directory. This is useful in "make build" because by doing
the build immediately after the depend, all sources will typically
still be in the buffer cache, thus saving significant time over doing
a "make depend" on all the directories and then a "make all".
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed
Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).
stuff duplication by expressing it in terms of <bsd.files.mk>. Allow for
multiple inclusion of <bsd.files.mk> by clearing ${FILES} at the end, and
using FILES+= rather than FILES= in <bsd.info.mk>.
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.