Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.
Add bsd.sanitizer.mk to share common code used by programs and libraries.
Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.
Fix generation of .a.syms files in LLVM sanitizers. The old rules weren't
functional and sometimes they were fatal in the build.
Add the .a.syms files to distribution sets.
These files are generated only in certain .a files in 64bit version of
sanitizers.
Correct the location of files with LLVM sanitizers. Move the LLVM sanitizer
entries from base to comp files.
Register external/bsd/compiler_rt as a _SUBDIR. This will allow to handle
properly includes specific for compiler_rt.
Centralize build_install target for external/bsd/compiler_rt.
With the above changes MKOBJDIR is now respected properly for me.
Do not install LLVM sanitizers into TOOLDIR for !HAVE_LLVM.
Add i386 support for LLVM sanitizers.
Add new build phases do-sanitizer-* for building LLVM sanitizers after libs
and before other programs. This phase is important as sanitizers need
to link with libs and sanitized programs must link with sanitizer runtimes.
There's a lot of waits inside tools, but nothing that promises that we haven't
started doing the next subdir in the top level.
Shows up as warnings in the cleandir stage on releng builds:
cleandir ===> external/mit/xorg/server/drivers/xf86-video-suncg6
cleandir ===> lib/libpam/modules/pam_deny
sh: /home/builds/ab/HEAD-llvm/sparc64/201811091720Z-tools/bin/nbawk: not found
nbmake[9]: "../../Makefile.xf86-driver" line 23: warning: "/home/builds/ab/HEAD-llvm/sparc64/201811091720Z-tools/bin/nbawk '/^PACKAGE_VERSION=/ { match($1, "[0-9]+\\.[0-9]+\\.[0-9]+"); version = substr($1, RSTART, RLENGTH); } END { print version }' /home/source/ab/HEAD-llvm/xsrc/external/mit/xf86-video-ati/dist/configure" returned non-zero status
sh: /home/builds/ab/HEAD-llvm/sparc64/201811091720Z-tools/bin/nbawk: not found
programs are built during the regular recursive build in extsrc. Edit
its description accordingly and move it before do-build to match their
order in BUILDTARGETS.
While here, drop the "either" clause that has lost its "or" a few
years ago when xfree86 reachover was removed.
the support in the rest of the source tree.
X11 sets could use some cleaning up perhaps (just deletion, as
we've never really marked the old X11R6 as obsolete for native
xorg using platforms so far either.)
as it is needed for the "includes" phase. Make it symlink all necessary
headers in obj to decouple it from "includes" itself, breaking the
dependency cycle. Move the do-x11 target between do-lib and do-build, so
that libraries can get the benefit of build_install (correct .WAIT
behavior) and everything else like "includes" uses the plain SUBDIR
entry in external/mit.
- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.
XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.
RELEASEVARS variable, and commands related to printing the values of
the variables whose names are in RELEASEVARS.
Add an awk script to remove noise printed by "make -j" or high levels
of MAKEVERBOSE, so we get only the variables names and values. The
values are escaped so that variables containing embedded newlines,
quotation marks, and backslashes, are passed through safely.
Adapt src/etc/Makefile and src/Makefile to use the new ${PRINT_PARAMS}
command defined in src/etc/Makefile.params.
Now ${DESTDIR}/etc/release and the params file in the top-level
.OBJDIR should never contain unwanted noise, even after a build with
MAKEVERBOSE=4.
This file will contain the values of all variables that can affect
the build process. Take care not to update the file's timestamp if
the contents do not change.
${_SRC_TOP_OBJ}/params is referenced by ${_NETBSD_VERSION_DEPENDS} in
bsd.own.mk.
Rename the old "params" target to "show-params". This simply
prints the values of the variables that can affect the build.
subdirectories and invokes dependall/install. Do this in groups
delimited by .WAIT to ensure that depending libraries can use the
installed versions and don't need to know the locations in the source
tree.
Use this new target in src/Makefile to replace most of the adhoc library
logic with two special cases, src/lib and src/compat. Adjust
sys/Makefile to include the module directory when building them. Add
some necessary .WAITs in src/lib/Makefile to reflect the dependencies
from src/Makefile and also add the rump libraries here.
shell meta-characters, as the variable contains a list of sets, separated
by spaces.
$ ./build.sh -V INSTALLSETS="base etc" install=idir
should now work as expected.
Reviewed by apb@ on tech-toolchain.