MAKEOBJDIRPREFIX is set to blank and exported from MAKELEVEL0 along
with OBJROOT exported. In sub-makes OBJROOT is recalculated with
an empty MAKEOBJDIRPREFIX though.
Sponsored by: EMC / Isilon Storage Division
This overrides the cross-compiler's default sysroot to use the WORLD32's
sysroot for building the lib32 libraries. Previously the cross-compiler
would default the sysroot to the 64bit WORLDTMP and -B/-L/-isystem flags
were used to build using the lib32 files. This leads to multiple issues
discussed later. Some extra headers are now needed to be staged since the
64bit WORLDTMP is not referenced at all for headers. The 64bit WORLDTMP
is still used via PATH for build tools. Overriding the default
target/arch is retained in the CC/CXX overrides.
This allows reverting the LDSCRIPT rewriting in installworld from r296921 and
r235122, thus allowing read-only objdirs to work for installing again.
This removes the need for _LDSCRIPTROOT.
This allows progressing the change to always use --sysroot for the build
rather than only relying on the cross-compiler's default sysroot. The
work for that is in D3970 and needed to resolve WITHOUT_CROSS_COMPILER
not using a --sysroot [1].
PR: 196193 [1]
Sponsored by: EMC / Isilon Storage Division
Archive member handling works again
meta mode, treat missing reads as for writes.
Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.
Specifically this fixes /usr/lib/libc.so stripping the paths to the
libraries. The reason for this in r266227 was both likely because ld(1) did
not fully respect --sysroot until r291226 and because of the lib32
build. The lib32 build does not use --sysroot into the /usr/lib32 path,
rather it only uses -L and -B into the /usr/lib32 path and --sysroot
into the normal (64bit) /usr/lib. The _LDSCRIPTROOT was added with
the ldscript support in bsd.lib.mk so that it builds a 32-bit-sysrooted pathed
ldscript in the object directory and then installs a normal unprefixed
version in installworld. This commit also fixes the rebuild during
install which was broken in r266227. This commit would break DIRDEPS_BUILD
build of lib32 but it does not currently have a way to build it anyhow.
For example, before this change we had in /usr/lib/libc.so:
GROUP ( libc.so.7 libc_nonshared.a libssp_nonshared.a )
Now it is restored to pre-r266227:
GROUP ( /lib/libc.so.7 /usr/lib/libc_nonshared.a /usr/lib/libssp_nonshared.a )
The motivation for this is in testing of lld.
From emaste:
lld does not have built-in search paths (e.g. /lib, /usr/lib) and relies on
-L arguments passed by the caller. As the linker is nearly always invoked
from the clang driver this is fine other than the fact that /usr/lib/libc.so
is an ldscript that refers to libc.so.7 which is in /lib, not /usr/lib.
PR: 207980
Reported by: emaste
Submitted by: emaste (based on)
Differential Revision: https://reviews.freebsd.org/D5637
No functional change.
This prevents adding empty targets to the main called target which is
confusing for debugging.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Extend it to other cases of meta mode cookies so they get the proper rm
cookie behavior when a .meta file detects it needs to rebuild and fails.
Sponsored by: EMC / Isilon Storage Division
This obsoletes the _SKIP_BUILD check but keeps it for now until it
proves to be enough.
In the dirdeps build the first 'make all' or 'make' ran would invoke
'make dirdeps' which builds dependencies and then builds the current
directory in a sub-make (when BUILD_AT_LEVEL0 is no, which for us it
is). This behavior causes things attached to 'all:' to build in the
dirdeps phase AND the sub-make phase which creates all kinds of problems
for staging, meta file tracking, and races.
Sponsored by: EMC / Isilon Storage Division
This is a follow-up to r291561 which reworked the bootstrap tool PATH
handling.
An example of this is when building lib/clang/libclangedit. At first
clang-tblgen will not be staged in the host tree so it will have
CLANG_TBLGEN=clang-tblgen set and exported. During the build though it
will stage clang-tblgen and then find it via the PATH. On the next
build it finds clang-tblgen in the stage directory and would set
CLANG_TBLGEN=<stagedir/usr/bin>/clang-tblgen thus causing the build
command to change. In both cases the same exact tool was used though so
there is no need to rebuild. If the tool did change the normal
meta/filemon handling would pick that up via timestamp comparisons and
rebuild.
Sponsored by: EMC / Isilon Storage Division
An example of where this is needed is in share/examples which for
'etc-examples' runs 'make -C SRCTOP/etc etc-examples' which installs
to the default DESTDIR otherwise.
Sponsored by: EMC / Isilon Storage Division
This came in r239572 for META_MODE handling but it doesn't make sense
since the staging is always done in make(all); make(buildincludes)
is never actually ran in the META_MODE build.
Reported by: bapt
Sponsored by: EMC / Isilon Storage Division
The meta file may decide the target is out of date but nothing
ensures that the *next* build will build this target if it
fails this time for some reason; it is still out-of-date
until it succeeds.
Convert the include/ cookie usage to the global versions.
Sponsored by: EMC / Isilon Storage Division
The inclusion of .MAKE.DEPENDFILE (.depend) has special logic in make
to ignore stale/missing dependencies. bmake 20160220 added a '.dinclude'
directive that uses the special logic for .depend when including the file.
This fixes a build error when a file is moved or deleted that exists in a
.depend.OBJ file. This happened in r292782 when sha512c.c "moved" and an
incremental build of lib/libmd would fail with:
make: don't know how to make /usr/src/lib/libcrypt/../libmd/sha512c.c. Stop
Now this will just be seen as a stale dependency and cause a rebuild:
make: /usr/obj/usr/src/lib/libmd/.depend.sha512c.o, 13: ignoring stale .depend for /usr/src/lib/libcrypt/../libmd/sha512c.c
--- sha512c.o ---
...
This rebuild will only be done once since the .depend.sha512c.o will
be updated on the build with the -MF flags.
This also removes -MP being passed for the .depend.OBJ generation (which
would create fake targets for system headers) since the logic is no
longer needed to protect from missing files.
Sponsored by: EMC / Isilon Storage Division
One example is in cddl/usr.sbin/dtrace/tests/common/aggs. It could be
fixed but other uses of this would break, especially in the
DIRDEPS_BUILD which uses the group names for stage cookies.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
This will allow Makefile.depend to properly capture all dependencies.
It is not 100% optimal but works. Other options would be to use *.meta
here which would include too much or to keep a Makefile.depend per PROG
and include it from the main Makefile.depend which would not be
straight forward.
Sponsored by: EMC / Isilon Storage Division
There is no good way to guess if any of these will be needed but
they commonly are and add no extra overhead so just stage them.
Sponsored by: EMC / Isilon Storage Division
Currently the base.txz distribution does not get the BSD.debug.dist mtree
extracted into it. So if you start from that and then try to build a 3rd-party
application outside of buildworld it will by-default try installing the
debug files into a missing directory if they are being installed into /usr/lib.
Check for the existence before forcing the directory to be created rather than
the older way of running a shell command with test -d || mkdir -p always.
Reported by: HardenedBSD (https://github.com/HardenedBSD/secadm/issues/23)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5411
This was a regression in r295985.
bsd.dep.mk adds to SRCS for dtrace probes, yacc grammars and some
others.
The code that is moving is planned to be removed once FAST_DEPEND is
default (and the only option) though since FAST_DEPEND doesn't use this.
Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division
This is done to prevent not having CCACHE_DIR causing meta mode with filemon to
see stat changes in the ccache dir and cause rebuilds.
Sponsored by: EMC / Isilon Storage Division
This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the
Clang static analyzer and present results on stdout.
Obtained from: NetBSD (CVS Rev. 1.3)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5449
- bsd.progs.mk is safe to include regardless of PROGS/PROGS_CXX/SCRIPTS
being set.
- bsd.progs.mk includes bsd.prog.mk always and will bring in
bsd.files.mk and bsd.obj.mk.
- DIRDEPS_BUILD: There's no need for _SKIP_BUILD or _SKIP_STAGING as the
PROGS were implicitly being built by the staging dependency anyway. This
was also preventing other objects from building if they were not part of
the staging sets.
- DIRDEPS_BUILD: This fixes PROGS without bsd.test.mk not staging.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
For PROGS this was recursing twice since MAKELEVEL0 is for 'dirdeps'
which then really builds in a sub-make.
Sponsored by: EMC / Isilon Storage Division
r96164 added them to avoid recursing twice with _SUBDIR. That issue was
fixed in bsd.subdir.mk in r291635 for all targets.
Sponsored by: EMC / Isilon Storage Division
As of r295661 elfcopy supports PE format for EFI boot binaries and is a
viable objcopy implementation for the base system and ports.
The (temporary) src.conf knob WITHOUT_ELFCOPY_AS_OBJCOPY knob may be set
to obtain the GNU version if necessary.
PR: 207091 [exp-run]
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
The OBJS_DEPEND_GUESS mechanism required moving the bsd.dep.mk inclusion
to after the checks, but left DEPENDFILE not-yet-set. Move it to
bsd.own.mk to resolve this.
Pointyhat to: bdrewery
Reported by: antoine (ports failures)
Sponsored by: EMC / Isilon Storage Division
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.
Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by: drysdale@google.com, bdrewery
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D4277
Given PROG1 PROG2, 'make PROG1' would work but 'make PROG1 PROG2' would not.
Just build them as normal in a sub-make to avoid any issues.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
For example when building, from buildworld, lib/atf/libatf-c++/tests/detail:
--- all_subdir_atf ---
is now:
--- all_subdir_lib/atf/libatf-c++/tests/detail ---
Sponsored by: EMC / Isilon Storage Division
This will generate dependencies rather than depending on the previous behavior
of depending on the guessed OBJS: *.h dependecies or a user running
'make depend'.
Experimentation showed that depending only on headers was not enough and
prone to .ORDER errors. Downstream users may also have added
dependencies into beforedepend or afterdepend targets. The safest way to
ensure dependencies are generated before build is to run 'make depend'
beforehand rather than just depending on DPSRCS+SRCS.
Note that the OBJS_DEPEND_GUESS mechanism (a.k.a .if !exists(.depend) then
foo.o: *.h) is still useful as it improves incremental builds with missing
.depend.* files and allows 'make foo.o' to usually work, while this
'beforebuild: depend' ensures that the build will always find all dependencies.
The 'make foo.o' case has no means of a 'beforebuild' hook.
This also removes several hacks in the DIRDEPS_BUILD:
- NO_INSTALL_INCLUDES is no longer needed as it mostly was to work around
.ORDER problems with building the needed headers early.
- DIRDEPS_BUILD: It is no longer necesarry to track "local dependencies" in
Makefile.depend.
These were only in Makefile.depend for 'clean builds' since nothing would
generate the files due to skipping 'make depend' and early dependency
bugs that have been fixed, such as adding headers into SRCS for the
OBJS_DEPEND_GUESS mechanism. Normally if a .depend file does not exist then
a dependency is added by bsd.lib.mk/bsd.prog.mk from OBJS: *.h. However,
meta.autodep.mk creates a .depend file from created meta files and inserts
that into Makefile.depend. It also only tracks *.[ch] files though which can
miss some dependencies that are hooked into 'make depend'. This .depend
that is created then breaks incremental builds due to the !exists(.depend)
checks for OBJS_DEPEND_GUESS. The goal was to skip 'make depend' yet it only
really works the first time. After that files are not generated as expected,
which r288966 tried to address but was using buildfiles: rather than
beforebuild: and was reverted in r291725. As noted previously,
depending only on headers in beforebuild: would create .ORDER errors
in some cases.
meta.autodep.mk is still used to generate Makefile.depend though via:
gendirdeps: Makefile.depend
.END: gendirdeps
This commit allows removing all of the "local dependencies" in
Makefile.depend which cuts down on churn and removes some of the
arch-dependent Makefile.depend files.
The "local dependencies" were also problematic for bootstrapping.
Sponsored by: EMC / Isilon Storage Division
FAST_DEPEND is intended to be the "skip 'make depend' and mkdep"
feature. Since DIRDEPS_BUILD does this already with some of its own
hacks, and filemon doesn't need this, and nofilemon does, teach it how
to handle each of these cases.
In meta+filemon mode filemon will handle dependencies itself via the
meta mode logic in bmake. We still want to set MK_FAST_DEPEND=yes to
enable some logic that indicates that 'make depend' is skipped in the
traditional sense. The actual .depend.* files will be skipped.
When nofilemon is set though we still need to track and generate dependencies.
Sponsored by: EMC / Isilon Storage Division
The .depend file will still be generated if _EXTRADEPEND is used. The target
is kept with a dependency on DPSRCS though so that 'make depend' will generate
all files.
Sponsored by: EMC / Isilon Storage Division
Rather than depend on .depend not existing, check the actual
.depend.OBJ file that will be used for that object. If it doesn't
exist then use the guessed dependencies.
FAST_DEPEND may never have a .depend file. Not having one means all of the
previous logic would over-depend all object files on all headers which is not
what we wanted. It also means that if a .depend is generated before a build
is done for _EXTRADEPEND (such as for PROG or LIB) then all of these
dependencies would not be used since the .depend wasn't generated from mkdep
and the real .depend.* files are not generated until the build.
Sponsored by: EMC / Isilon Storage Division
cleandepend should always remove CLEANDEPEND* if they are not empty,
but bsd.dep.mk should not add the tags entries unless SRCS is defined
as it did before. The .depend file itself it still always removed
to avoid accidentally keeping a stale one around as done in r295666.
Sponsored by: EMC / Isilon Storage Division
This will speed up some tree-walks with FAST_DEPEND which otherwise
would include length(SRCS) .depend files.
This also uses a trick suggested by sjg@ to still read them in when
specifying _V_READ_DEPEND=1 in the env/make args.
Sponsored by: EMC / Isilon Storage Division
Replace `make regress` (legacy test make target) and `make test` (incomplete
test make target added with the FreeBSD test suite) with make check as it's
consistent with other open source projects.
`make check` defaults to running tests from `.OBJDIR`, but can be overridden
with the `CHECKDIR` variable.
Add `make checkworld` target to simplify running the FreeBSD test suite from
`TESTSBASE` (i.e. the top-level tests directory), similar to buildworld.
Document `make check` and `make checkworld` in build(7).
Other minor changes:
- Rename intermediate file (`Kyuafile.auto`) to `Kyuafile` to simplify
`make check`.
- Remove terse warnings attached to `beforetest`/`aftertest`.
- Add kyua binary check to check target in suite.test.mk; error out if it's
not found
The MFC is [partly] contingent on other build related changes being MFCed.
Differential Revision: https://reviews.freebsd.org/D4406
MFC after: 2 months
X-MFC to: stable/10
Relnotes: yes
Reviewed by: bdrewery, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division
This hack will be removed in a few weeks. It is here to fix incremental
builds of SSH between r291941 and r294370.
Reported by: jmallett
MFC after: 1 day
Sponsored by: EMC / Isilon Storage Division
Several attempts to fix this logic was done after r241298, which were
all reverted, yet this change was not.
The .h file does not depend on the .c file, so do not impose such a
dependency on it. They are generated by the same command but do not
depend on each other. Restore the .ORDER which should handle parallel build
issues. This fixes an actual bug where the .h file is not recreated
when missing [1]. For example:
cd lib/libc
make cleanobj
make nsparser.h
rm nsparser.h
make nsparser.h # will not rebuild nsparser.h
I have been trying to track down a build problem where nsparser.h is
missing when nslexer.o is built. It is possible this is related.
Reported by: bde [1]
https://lists.freebsd.org/pipermail/svn-src-all/2012-October/059481.htmlhttps://lists.freebsd.org/pipermail/svn-src-all/2012-October/060038.html
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
DIRDEPS_BUILD does not yet support PROGS having their own dependency
file.
Overriding .MAKE.DEPENDFILE here causes major problems with the meta
mode logic since it creates the Makefile.depend as '.depend' resulting
in infinite loops in make due to dirdeps.mk including .depend endlessly.
X-MFC-With: r294752
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
We have had this user-modifable DEPENDFILE variable forever that does nothing
relevant for the user since fmake always used '.depend'. Bmake
introduced the .MAKE.DEPENDFILE variable that can be modified to change
the name of '.depend'.
Prior to r284288, bsd.progs.mk was setting .MAKE.DEPENDFILE to allow
working incremental builds. This was modified most likely to not
conflict with the META MODE handling of .MAKE.DEPENDFILE as it has a lot
more special logic for that variable.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Currently dtrace(1) -Go does not properly rebuild the target if it
exists. It results in missing symbols.
dtrace -C -x nolibs -G -o usdt.o -s /root/git/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d tst.usdt.o
dtrace: target object (usdt.o) already exists. Please remove the target
dtrace: object and rebuild all the source objects if you wish to run the DTrace
dtrace: linking process again
cc -O2 -pipe -O0 -g -I/root/git/freebsd/cddl/usr.sbin/dtrace/tests/common/json -std=gnu99 -fstack-protector-strong -Qunused-arguments -o tst.usdt.exe.full tst.usdt.o usdt.o
tst.usdt.o: In function `main':
/root/git/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c:56: undefined reference to `__dtrace_bunyan_fake___log__debug'
/root/git/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c:60: undefined reference to `__dtrace_bunyan_fake___log__debug'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [tst.usdt.exe.full] Error code 1
This is a consequence of r212358.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
This fixes incremental build of OpenSSH after the recent upgrade.
For example, in secure/lib/libssh, -include ssh_namespace.h is used on
all files. This is not tracked in the .depend file though due to
MKDEP_CFLAGS not including it. The ssh example was broken in r291941
when not using FAST_DEPEND due to the .depend bug. FAST_DEPEND was not
affected by this because it generates dependencies at compile time and
thus sees the -include.
This ugly make syntax could be simpler for bmake by using :tW but
fmake-compatible syntax is used since this needs to be MFC'd all the way
to stable/9.
Also add a temporary hack to workaround existing checkouts building
incrementally with a .depend file not having these headers.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
This was a regression in r290629, which was revealed partly in r294360.
Once 'make depend' has ran it will generate all headers already. Thus
even with FAST_DEPEND lacking proper dependencies before building, it
will not have any missing headers. Once objects are compiled the depend
files will be generated with proper dependencies.
Sponsored by: EMC / Isilon Storage Division
This reworks r289254 and removes ALL_SUBDIR_TARGETS.
Because there is an include guard in this file there is no need for
LOCAL_ or ?= on SUBDIR_TARGETS or STANDALONE_SUBDIR_TARGETS. These can
just be set via src.conf. By the time bsd.subdir.mk is included it will
just append the values to the existing value and work fine. This allows
a consistent way to append to these variables without introducing a
LOCAL_ var for STANDALONE_SUBDIR_TARGETS or renaming the historical
SUBDIR_TARGETS.
Sponsored by: EMC / Isilon Storage Division
If filemon is used then there is no need to generate dependency files during
compilation as the .meta files will achieve the same result.
This is a temporary solution until FAST_DEPEND is default. Once that is
default there will be an option to disable dependency generation entirely
as it is only useful if an incremental build is planned, thus META_MODE+filemon
can enable that option to short-circuit all FAST_DEPEND-related logic.
Sponsored by: EMC / Isilon Storage Division
The .MAKEFLAGS check inside of the .for loop is extremely slow for some
reason. Just moving it out of the loop trimmed -V lookup time from 11
seconds to 1 second in the kernel obj directory.
Sponsored by: EMC / Isilon Storage Division
Allow user-specified warning flag overrides for specific files under
bsd.sys.mk, in the same way kern.mk does.
This will to be used by future commits.
MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay
It is built in libgcc_s.so and libgcc_eh.a to simplify transition.
It is enabled by default on arm64 (where we previously had no other
unwinder) and may be enabled for testing on other platforms by setting
WITH_LLVM_LIBUNWIND in src.conf(5).
Also add compiler-rt's __gcc_personality_v0 implementation for use with
the LLVM unwinder.
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4787
This will ensure that the variable was not set as a make override, in
make.conf, src.conf or src-env.conf. It allows setting the value in
src-env.conf when using WITH_AUTO_OBJ since that case properly handles
changing .OBJDIR (except if MAKEOBJDIRPREFIX does not yet exist which is
being discussed to be changed).
This change allows setting a default MAKEOBJDIRPREFIX via local.sys.env.mk.
Sponsored by: EMC / Isilon Storage Division
for libraries that follow the soft float ABI. It's only supported on
armv6 as a transition to the new hard float ABI, so mark as broken
everywhere else.
For determining the compiler version, quote the string to be echo'd,
otherwise the command might fail. This is because clang -v now results
in the following:
FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)
The second "3.8.8svn)" string tripped up the shell command.
MFC after: 3 days
otherwise the command might fail. This is because clang -v now results
in the following:
FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)
The second "3.8.8svn)" string tripped up the shell command.
POSIX requires for the c99 compiler.
(In fact, our c99(1) already ignores -lxnet; but our make(1) doesn't set
${CC} correctly, and our cc(1) treats xnet like any other library.)
Reviewed by: kib
LLDB is usable for userland core file and live debugging on amd64, and
for userland core file debugging on arm64. In general it works at least
as well on FreeBSD as our in-tree gdb version, so enable it by default
to allow for broader use and testing.
An LLDB tutorial is available at http://lldb.llvm.org/tutorial.html, and
a table mapping GDB commands to LLDB commands can be found at
http://lldb.llvm.org/lldb-gdb.html .
LLDB also has some level of support for FreeBSD on arm, mips, i386,
and powerpc, but is not yet ready to have them enabled by default.
Reviewed by: gnn
Relnotes: Yes
This is not wrong, but was unexpected. Using <empty>:H results in '.' which
then using the rest of the conversion was added in RELDIR. This was also
causing an empty _DP_DIRDEPS to resolve to SRCTOP for DIRDEPS.
Sponsored by: EMC / Isilon Storage Division
This logic is potentially included multiple times, so overwrite the temporary
variable rather than append to it.
Sponsored by: EMC / Isilon Storage Division
This is because LDADD+=-lFOO is not the same as LDADD+=-lprivateFOO which is
what the private libs in LIBADD are.
Sponsored by: EMC / Isilon Storage Division
system call information such as system call arguments. Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.
This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it. One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events. This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events. Instead, this function only generates a string
description for known malloc() and RTLD records.
Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D4537
These use ld(1), effectively -nostdlib, and don't need any of these
normal dependencies.
kmod builds also define PROG so just checking for KMOD here seems to be
the easiest to handle it.
Sponsored by: EMC / Isilon Storage Division
RISC-V is a new ISA designed to support computer research and education, and
is now become a standard open architecture for industry implementations.
This is a minimal set of changes required to run 'make kernel-toolchain'
using external (GNU) toolchain.
The FreeBSD/RISC-V project home: https://wiki.freebsd.org/riscv.
Reviewed by: andrew, bdrewery, emaste, imp
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4445
Older ccache don't work with an empty CCACHE_PATH value. They will error with:
ccache: FATAL: Could not find compiler "cc" in PATH
make: "/mnt/bdrewery/git/onefs/src/share/mk/bsd.compiler.mk" line 134: Unable to determine compiler type for /usr/local/bin/ccache cc. Consider setting COMPILER_TYPE.
Sponsored by: EMC / Isilon Storage Division
STAGE_OBJTOP and STAGE_HOST_OBJTOP.
These will always be overridden in sub-makes when building in-tree, but
are exported for the benefit of hooking in external builds, such as
ports.
Sponsored by: EMC / Isilon Storage Division
- Don't bother looking up REVISION/BRANCH/etc from release/, or the
CPUTYPE check, as these are not used for makeman and wastes time. The also
invokes auto.obj.mk after I reverted auto.obj.mk ignoring -V in r291312.
- Don't modify CC or PATH when WITH_CCACHE_BUILD or WITH_META_MODE is enabled
as it leads to bsd.compiler.mk errors.
Sponsored by: EMC / Isilon Storage Division
Debug data files are now built by default with 'make buildworld' and
installed with 'make installworld'. This facilitates debugging but
requires more disk space both during the build and for the installed
world. Debug files may be disabled by setting WITHOUT_DEBUG_FILES=yes
in src.conf(5).
Reviewed by: bdrewery, eadler, vangyzen
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4018
This will save time generating dependency files that we didn't expect
due to cases where SRCS!=OBJS or for building custom targetted objects
in Makefiles that do not end up in the DEPENDOBJS list.
This uses a bmake trick to modify CFLAGS based on ${.TARGET}. A
.PARSEDIR check is done for the sake of MFC safety.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Rather than try to guess at all of the OBJS variables just use SRCS
using the same patterns that mkdep does. This also fixes a mistake
where dependencies were being generated with FAST_DEPEND when they were
not for mkdep. This happens when OBJS!=SRCS as is the case in
gnu/lib/csu where SRCS has 1 file and OBJS has several other files that
does not even contain the 1 SRCS file. Generally in these cases the
OBJS have custom dependencies defined in their Makefile. If we generate
dependencies for those and then load a .depend file, then .IMPSRC may
contain duplicate sources and lead to errors such as:
cc: error: cannot specify -o when generating multiple output files
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
My changes in r291635 broke 'make install*' for DIRDEPS_BUILD but also
revealed that some other targets were not guaranteed to be created if
there was a SUBDIR defined. One example is 'installfiles' was never
defined if SUBDIR was not empty.
Sponsored by: EMC / Isilon Storage Division
The problem was that 'afterinstall' was not coming after SUBDIRs were
installed which was the expectation at least in sys/modules for kldxref.
Reported by: np
Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division
the real build file.
This lessens the need to define DPADD_<lib> and LDADD_<lib> to just very
special cases.
Sponsored by: EMC / Isilon Storage Division
This would cause it to be included everywhere in the build since it is
the MAKESYSPATH. This leads to including dirdeps.mk more times than
desired.
Sponsored by: EMC / Isilon Storage Division
bsd.prog.mk and bsd.lib.mk already make OBJS depend on headers when there is
not .OBJDIR/.depend file, which is still true for the initial meta mode builds.
If there was something to benefit the meta mode build here then it should be
extended to the non-meta mode build as well.
Some of the problems here were just DPSRCS being hooked up wrongly, fixed in
r291330.
The logic itself is flawed as 'buildfiles' is in a different part of the
dependency tree than the objects and headers are, so the objects will still be
built independent from 'buildfiles'. 'buildfiles' is not ordered in the build
before objects.
Sponsored by: EMC / Isilon Storage Division
This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig'
due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of
'all'.
This now adds all of the '*includes', '*files' targets as subdir targets,
allowing them to recurse.
This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since
it no longer recurses; only 'install' will recurse and call the proper
'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory.
This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE}
sub-shell but to rather just recurse on 'inclues' and 'files'. This avoids
various issues such as the one fixed in r289462. As such revert Makefile.inc1
back to using 'includes' which avoids an extra tree walk and parallelizes
the includes phases better.
Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL,
added in r289438. This is so users do not get a probably broken build if they
run 'make all' from the top-level. Before the change in this commit, the
workaround for 'make everything' was 'par-all' which would depend on 'all' and
cause a proper parallel recursion. Now that will not work so a new
_PARALLEL_SUBUDIR_OK is used to allow it.
This is still part of an effort to combine bsd.(files|incs|confs).mk and move
some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in
r289331. This commit fixes the problems found there which was mostly double
recursing during 'includes' which would recurse on itself and 'buildincludes'
and 'installincludes', all in parallel. The logic is still in bsd.subdir.mk
for now.
I've been cautious about this commit but have experienced no breakage on the
tree except for the 'par-all' case which was already a hack. If something foo
is depending on something bar that should recurse, it is very likely that the
foo target is being recursed on already meaning that bar will still effectively
recurse once sub-directories call foo.
Discussed on: arch@
MFC after: never
Sponsored by: EMC / Isilon Storage Division
This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig'
due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of
'all'.
This now adds all of the '*includes', '*files' targets as subdir targets,
allowing them to recurse.
This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since
it no longer recurses; only 'install' will recurse and call the proper
'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory.
This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE}
sub-shell but to rather just recurse on 'inclues' and 'files'. This avoids
various issues such as the one fixed in r289462. As such revert Makefile.inc1
back to using 'includes' which avoids an extra tree walk and parallelizes
the includes phases better.
Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL,
added in r289438. This is so users do not get a probably broken build if they
run 'make all' from the top-level. Before the change in this commit, the
workaround for 'make everything' was 'par-all' which would depend on 'all' and
cause a proper parallel recursion. Now that will not work so a new
_PARALLEL_SUBUDIR_OK is used to allow it.
This is still part of an effort to combine bsd.(files|incs|confs).mk and move
some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in
r289331. This commit fixes the problems found there which was mostly double
recursing during 'includes' which would recurse on itself and 'buildincludes'
and 'installincludes', all in parallel. The logic is still in bsd.subdir.mk
for now.
I've been cautious about this commit but have experienced no breakage on the
tree except for the 'par-all' case which was already a hack. If something foo
is depending on something bar that should recurse, it is very likely that the
foo target is being recursed on already meaning that bar will still effectively
recurse once sub-directories call foo.
Discussed on: arch@
MFC after: never
Sponsored by: EMC / Isilon Storage Division
Fix current findings, which should fix cases of NO_SHARED not building
properly.
Given libfoo:
- Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in
src.libnames.mk, otherwise bsd.libnames.mk.
- Ensure that a LIBFOODIR is properly set.
- Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own
Makefile
Sponsored by: EMC / Isilon Storage Division
I'm not sure why this was here, none of these use pthread themselves and
none of the consumers are broken with removing this.
Sponsored by: EMC / Isilon Storage Division
The proper place for this list is _DP_dtrace.
Due to removing the LDADD_dtrace, more LIBADD are needed in
cddl/usr.sbin/dtrace to prevent underlinking.
This fixes overlinking in cddl/usr.sbin/lockstat and
cddl/usr.sbin/plockstat.
Sponsored by: EMC / Isilon Storage Division
This change came in r281332 which was reducing overlinking in mt(1) but
currently mt(1) is linked with sbuf when it does not need it due to the
LDADD_mt+=${LDADD_sbuf}. Only libmt needs sbuf.
Add sbuf to _DP_mt so static linkage of libmt picks it up.
Sponsored by: EMC / Isilon Storage Division