From owner-cvs-src@FreeBSD.ORG Thu May 22 01:14:44 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C5651065679; Thu, 22 May 2008 01:14:44 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0EF6D8FC1E; Thu, 22 May 2008 01:14:44 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4M1Eh1L058764; Thu, 22 May 2008 01:14:43 GMT (envelope-from jb@repoman.freebsd.org) Received: (from jb@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4M1Ehsu058763; Thu, 22 May 2008 01:14:43 GMT (envelope-from jb) Message-Id: <200805220114.m4M1Ehsu058763@repoman.freebsd.org> From: John Birrell Date: Thu, 22 May 2008 01:14:43 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/share/mk bsd.lib.mk bsd.libnames.mk bsd.prog.mk sys.mk X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2008 01:14:44 -0000 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