cvs commit: src/share/mk bsd.lib.mk bsd.libnames.mk bsd.prog.mk
sys.mk
John Birrell
jb at FreeBSD.org
Thu May 22 01:14:44 UTC 2008
jb 2008-05-22 01:14:43 UTC
FreeBSD src repository
Modified files:
share/mk bsd.lib.mk bsd.libnames.mk bsd.prog.mk
sys.mk
Log:
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.
Revision Changes Path
1.185 +40 -0 src/share/mk/bsd.lib.mk
1.108 +4 -0 src/share/mk/bsd.libnames.mk
1.151 +10 -0 src/share/mk/bsd.prog.mk
1.102 +76 -0 src/share/mk/sys.mk
More information about the cvs-src
mailing list