freebsd-skq/share/mk
John Birrell 770ac3b21f Add support for the Compact C Type (CTF) conversions throughout FreeBSD's
system makefiles.

Note that the CTF conversion defaults to off. We may choose to change this
default later if DTrace proves popular and people are prepared to wear
the compilation performance impact of compiling with debug symbols all the
time.

Setting NO_CTF in the make args or user environment turns off CTF conversion.
Even if we choose to default CTF generation to on later, we still need
NO_CTF so that the buildworld process can bootstrap the tools without
needlessly generating CTF data for temporary tools.

Setting WITH_CTF in the make args or user environment (and _NOT_ in
/etc/make.conf) is the only way to enable CTF data conversion. Nore that
this can't be implemented the same way that the WITH_ and WITHOUT_ stuff
is implemented throughout the buildworld because the CTF conversion needs
to work when building a simple object without a Makefile, using the
default rules in sys.mk.

Typing 'make test.o' with no makefile and just a source file test.c
should work. Also, typing 'make WITH_CTF=1 test.o without a makefile and
just a source file test.c should work and produce an object with a CTF
elf section. Typing 'make WITH_CTF=1 CFLAGS=-g test.o' without a makefile
and just a source file test.c should produce an object with both a CTF
elf section and the debug elf sections.

In the FreeBSD build where more .mk files are used than just sys.mk
which is included my make by default, the use of DEBUG_FLAGS is the
correct way to enable a debug build. The important thing to note here
is that it is the DEBUG_FLAGS setting that prevents libraries and
programs from being stripped on installation. So, for the addition of
CTF data conversion, setting DEBUG_FLAGS to contain -g, without NO_CTF,
will cause the ctfconvert and ctfmerge build programs to be executed
also with the -g arg so that debug symbols are retained rather than
being removed after the CTF data elf section has been added.

Add DTrace libraries to the list of libnames.
2008-05-22 01:14:43 +00:00
..
bsd.compat.mk Align the warning message with the one in bsd.own.mk. 2007-10-20 18:46:15 +00:00
bsd.cpu.mk Add support for MACHINE_ARCH == mips, plus a few generic CPU types that 2008-03-19 12:20:44 +00:00
bsd.dep.mk Revert CLEANDEPFILES commit per ru@'s request; it does not really solve 2008-02-05 08:52:36 +00:00
bsd.doc.mk NODOCCOMPRESS -> NO_DOCCOMPRESS 2004-12-21 09:33:47 +00:00
bsd.endian.mk Handle endianness for mips 2008-04-28 14:54:17 +00:00
bsd.files.mk Make sure the only thing that follows .endif or .else is a comment. 2005-04-11 07:13:29 +00:00
bsd.incs.mk Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00
bsd.info.mk Don't run install-info under lockf if not installing in parallel. 2006-09-29 15:36:19 +00:00
bsd.init.mk Make sure the only thing that follows .endif or .else is a comment. 2005-04-11 07:13:29 +00:00
bsd.kmod.mk Fixed style bugs in previous commit (151 characters of trailing whitespace). 2004-06-21 16:12:02 +00:00
bsd.lib.mk Add support for the Compact C Type (CTF) conversions throughout FreeBSD's 2008-05-22 01:14:43 +00:00
bsd.libnames.mk Add support for the Compact C Type (CTF) conversions throughout FreeBSD's 2008-05-22 01:14:43 +00:00
bsd.links.mk
bsd.man.mk Stop clobberring the application namespace with local 2007-03-12 13:54:52 +00:00
bsd.nls.mk Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00
bsd.obj.mk Make sure the only thing that follows .endif or .else is a comment. 2005-04-11 07:13:29 +00:00
bsd.own.mk Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer 2008-03-29 17:44:40 +00:00
bsd.pkg.mk If PORTNAME is set in a system Makefile then hook into the ports 2004-12-20 15:46:56 +00:00
bsd.port.mk Try harder to not leak src/ build stuff into ports/ environment 2006-11-19 16:28:52 +00:00
bsd.port.options.mk Add bsd.port.options.mk, a stub to include parts of bsd.port.mk that handle 2007-06-01 15:17:51 +00:00
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk Enable testing of customized variants of bsd.port.mk and 2004-07-02 20:47:18 +00:00
bsd.prog.mk Add support for the Compact C Type (CTF) conversions throughout FreeBSD's 2008-05-22 01:14:43 +00:00
bsd.README "clean" of <bsd.prog.mk> no longer removes a.out, Errs, 2006-06-18 11:26:17 +00:00
bsd.snmpmod.mk Add an additional make variable EXTRAMIBSYMS which allows to specify 2008-01-08 12:55:56 +00:00
bsd.subdir.mk Make "manlint" recursive. 2007-12-07 15:02:06 +00:00
bsd.symver.mk Explicitly verify if we have found the VERSION_GEN script 2007-10-18 15:21:35 +00:00
bsd.sys.mk Re-enable -Werror again. 2007-11-22 23:21:12 +00:00
Makefile Break long line 2007-06-01 15:32:23 +00:00
sys.mk Add support for the Compact C Type (CTF) conversions throughout FreeBSD's 2008-05-22 01:14:43 +00:00
version_gen.awk Distinguish the cases when a dup symbol is in different versions 2007-10-18 10:32:28 +00:00