Date: Mon, 22 Mar 2010 12:34:08 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: John Baldwin <jhb@freebsd.org> Cc: "Robert N. M. Watson" <rwatson@freebsd.org>, freebsd-arch@freebsd.org Subject: CTF patch for testing/review (was: Re: is dtrace usable?) Message-ID: <20100322123408.16671ijbvmcyux80@webmail.leidinger.net> In-Reply-To: <201003100812.29749.jhb@freebsd.org> References: <E1Nnv0H-00020A-9M@kabab.cs.huji.ac.il> <B83FA8F6-F29A-4C6F-8FCF-CBF48B27A18B@freebsd.org> <20100310113422.95932h10tv1qh2o0@webmail.leidinger.net> <201003100812.29749.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Redirecting from stable@ to arch@... Quoting John Baldwin <jhb@freebsd.org> (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" <rwatson@freebsd.org> (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 have not tested what this patch is doing to bootblocks or the loader (= stuff within /sys/ which is not the kernel or kernel modules). In case it hurts, we can add NO_CTF to the corresponding Makefiles. I do not have a scratch system around ATM, so any report from installing a bootblock (gpt/zfs/normal/whatever) after a buildworld/installworld is welcome. In case there are people which want to moan that I moved a conditional from make to shell: - the shell stuff is using build-ins - feel free to provide patches which makes it work with make-conditionals (I failed, and I tried several things before switching to shell stuff) In case people moan about the inverse logic I use in the shell conditional: - the current way is working for all cases and does not require to ignore an error in make ("make CTFCONVERT=false" correctly errors out) - test your proposal before you moan (worst case: all parmutations of WITH_CTF, NO_CTF, CTFCONVERT=false) - if the majority wants to have the '-' in front of a similar positive-logic command, I do not object, but this will ignore real errors from ctf{convert|merge} (whatever those could be) Bye, Alexander. -- The real problem with hunting elephants carrying the decoys. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100322123408.16671ijbvmcyux80>