From owner-freebsd-arch@FreeBSD.ORG Mon Mar 22 16:21:14 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0E0B1065672; Mon, 22 Mar 2010 16:21:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7FE068FC26; Mon, 22 Mar 2010 16:21:14 +0000 (UTC) Received: from outgoing.leidinger.net (pD954FF67.dip.t-dialin.net [217.84.255.103]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id C87A68454F4; Mon, 22 Mar 2010 17:21:07 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id E2A7151D3; Mon, 22 Mar 2010 17:21:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1269274865; bh=Lz/hhWC7H46mCvqPG0T5lJNEpPCfSd++IBGssQgt8u0=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=hphPN4gp1CNeS8kD9N+IJASW61wYkD3NQlOkFv1X92lKy+HpnCyQYV6GTG1aUbSYL 4CsWb0GAkoAL9JpISDJExhCAQYmZEp+NeK7wCfo2QOkv6feC6zW7bp16H9PbHXNsfc iugsUkA7glte+dhKD+lAepapr1Cp+DBOmQAQtgl2/xEXZzKSkqrcnJVSgZbtX0fsZD Uwf+Non2M/pqiWbYJEl9ecz85V+QPvkviln6y2aX5ap3frz+/65xHA2Vt6h9iGqWzA GIJc3sRUZp9aXw4iQjA5gxfbi/kqWKcW+enXj6A/VijBCGLQL87/YNytLzQyKGmZSJ 2eInPqy/TakJw== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o2MGL4Sc096535; Mon, 22 Mar 2010 17:21:04 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 22 Mar 2010 17:21:04 +0100 Message-ID: <20100322172104.14234yawbsev0sw8@webmail.leidinger.net> Date: Mon, 22 Mar 2010 17:21:04 +0100 From: Alexander Leidinger To: John Baldwin References: <201003100812.29749.jhb@freebsd.org> <20100322123408.16671ijbvmcyux80@webmail.leidinger.net> <201003220941.10525.jhb@freebsd.org> In-Reply-To: <201003220941.10525.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: C87A68454F4.835AB X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.84, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_65 0.60) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1269879669.19898@U6jF4bV8beRu6z8/rQjXFA X-EBL-Spam-Status: No Cc: "Robert N. M. Watson" , freebsd-arch@freebsd.org Subject: Re: CTF patch for testing/review (was: Re: is dtrace usable?) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 16:21:15 -0000 Quoting John Baldwin (from Mon, 22 Mar 2010 09:41:10 -0400): > On Monday 22 March 2010 7:34:08 am Alexander Leidinger wrote: >> Redirecting from stable@ to arch@... >> >> Quoting John Baldwin (from Wed, 10 Mar 2010 08:12:29 > -0500): >> >> > On Wednesday 10 March 2010 5:34:22 am Alexander Leidinger wrote: >> >> Quoting "Robert N. M. Watson" (from Tue, 9 Mar >> >> 2010 16:39:09 +0000): >> >> >> >> > >> >> > On Mar 9, 2010, at 2:16 PM, Alexander Leidinger wrote: >> >> > >> >> >>> From this you can see that sys.mk is included and parsed before >> > 'Makefile', >> >> >>> so the WITH_CTF=yes is not set until after sys.mk has been parsed. >> >> >> >> >> >> I think we need to find a different solution for this. The need to >> >> >> specify WITH_CTF at the command line is very error prone. :( >> >> > >> >> > You are neither the first person to have made this observation, nor >> >> > the first person to have failed to propose a solution in the form of >> >> > a patch :-). >> >> Ok, here is the proposal in form of a patch. :-) >> http://www.leidinger.net/test/ctf.diff >> >> > Unfortunately the ctf stuff breaks static binaries. I think that if >> > that were >> > fixed we would simply enable it by default and be done. >> >> The patch is: >> - enabling CTF stuff by default for the kernel >> - allows to disable the CTF stuff for the kernel by defining NO_CTF >> - *not* enabling the CTF stuff by default for libs and progs >> (if someone tells me how to distinguish the build for static >> stuff from dynamic stuff, I can have a look to enable it for >> the dynamic case) >> - allows to enable the CTF stuff for the userland by defining >> WITH_CTF as before > > I think this patch looks very interesting. I think in some ways it would be > nice to make CTF "opt-in" though instead of "opt-out". I think the current > patch would enable CTF when building ports, for example. I think instead it If you talk about kernel modules: yes, this should enable CTF there. If you talk about programs which use bsd.prog.mk or bsd.lib.mk: no, this will not enable CTF. The ports which use gmake will not be affected, I'm not sure about ports which use our make but not bsd.prog.mk or bsd.lib.mk. Anyone with an example of such a port which I could test? A quick query of portmgr (miwi) via IM didn't produce an obvious candidate port. > should default to not building CTF, but require an ENABLE_CTF (instead of > NO_CTF) to be set, and set that in bsd.kern.mk if WITH_CTF is defined. What about your previous "enabled by default" for kernel+world (yes, my patch is asymmetric in that it only enables the kernel part as the result of static userland stuff seems to have a problem), what's the reason for the switch to opt-in? Normally we use MK_xxx for things which are opt-in/opt-out. What about using MK_xxx instead of ENABLE_CTF? If people are in favour of MK_xxx, what should the xxx part look like? Is bsd.kern.mk included in module builds too? To make sure I get your and Scott's points right: - all opt-in - enabled for the kernel/mods via "makeoptions WITH_CTF=yes" in the kernel config instead of enabling it by default (maybe in bsd.kern.mk?) Note: the NO_CTF part is existing stuff, I probably would have to fix other places too then. The current patch is a minimal patch to opt-out for kernel builds and opt-in for prog/lib parts. The ports area needs to be investigated (if nothing is affected, nothing needs to be taken into account). I have a look at getting some time this week to rework the patch according to the outcome of the discussion here. Bye, Alexander. -- This fortune would be seven words long if it were six words shorter. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137