Quoting jhell <[email protected]> (from Mon, 19 Apr 2010 08:46:33 -0400):
[testing CTF]
This sounds like a case of too many knobs to control whether ctfconvert
will be used on any resulting object code.
Couldn't this be better handled by defaulting WITH_CTF:=NO instead of
having it act Boolean and set NO_CTF to 0 or 1 but rather check if we
are building world or kernel by other means if the user has WITH_CTF
defined somewhere else?.
Or just check whether WITH_CTF is defined and enable the proper sections
of the build for kernel.
Sorry, but no. A lot of people tried for doing it by checking if it is
defined, but as there is stuff in sys.mk (which is read before
everything else), this fails.
As I see in sys.mk: stable/7 example and not touched on HEAD.
[code in HEAD]
Could be simplified:
.if defined(WITH_CTF)
CTFFLAGS ?= -L VERSION
CTFCONVERT ?= ctfconvert
CTFMERGE ?= ctfmerge
CTFCONVERT ?= ctfconvert
CTFMERGE ?= ctfmerge
.if defined(CFLAGS) && (${CFLAGS:M-g} != "")
CTFFLAGS += -g
.else
CFLAGS += -g
.endif
And this would leave little confusion about what is actually happening
and ensure that adding something like (makeoptions -DWITH_CTF) actually
work.
Try it. The CTF stuff is more complex than it initially looks. I was
doing several unsuccesful tries until I arrived at something which
works.
I do not see a real need for NO_CTF if we can check to see if WITH_CTF
is being defined.
There is need for it. We have stuff which does not work when compiled
with CTF. The current way allows to put some NO_CTF in Makefiles (if
we want to), to disable specific problem cases even when the rest is
compiled with CTF. I also doubt we want to use the bootblocks or the
loader with CTF, so those are items which should get a NO_CTF in any
case.
For the relevant sections of the tree that should never have WITH_CTF
just dont add the ability to check and enable it. Or undefine it.
Undefining it would be an option if the default stays off, but there
are people which prefer to have the default being on. When the default
switches, or the opinion switches to keep the default off, everything
needs to be or should be reviewed.
Bye,
Alexander.
--
http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[email protected]"