bin/156817: WITHOUT_CDDL and NO_CTF ignored if WITH_CTF defined
Alexander Leidinger
netchild at FreeBSD.org
Tue May 10 14:20:10 UTC 2011
The following reply was made to PR bin/156817; it has been noted by GNATS.
From: Alexander Leidinger <netchild at FreeBSD.org>
To: obrien at FreeBSD.org
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/156817: WITHOUT_CDDL and NO_CTF ignored if WITH_CTF
defined
Date: Tue, 10 May 2011 16:00:05 +0200
This message is in MIME format.
--=_vexzd7bwxq8
Content-Type: text/plain;
charset=UTF-8;
DelSp="Yes";
format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Quoting David O'Brien <obrien at FreeBSD.org> (from Wed, 4 May 2011
09:57:50 -0700):
> 1. I believe (but not positive) you've given WITH_CTF higher
> precidence than WITHOUT_CDDL.
> If so, I feel this is wrong as if someone has set WITHOUT_CDDL
> they have strong licensing needs (restrictions). And so not running
> the CTF tools is of lesser importance than [accidently?] falling into
> a legal problem.
IMHO it is in the same boat as the result of a compilation with gcc
regarding the licensing issue (attention: IANAL), the ctf tools take
stuff from our (BSD licensensed) source and write this info in a
specific format into our binaries.
Putting the licensing (or not) issue aside, I see another reason to
not allow WITH_CTF together with WITHOUT_CDDL: The ctf tools are used
during building the userland, so it looks to me like we should do the
same with the ctf tools as we do with the compiler, we should build
them before using them, this way we are sure we have them (in case a
world was compiled without them before), or we can issue a warning and
continue without the ctf stuff (smooth fallback).
Do you have a way to test the attached patch? I lack the time to do it ATM.
Instead of the warning and automatic fallback we could also isse an
error. Feel free to paint the bikeshed. If it works, feel also free to
commit it.
> 2. In the "stage 1.1: legacy release compatibility shims",
> "stage 1.2: bootstrap tools", "stage 2.3: build tools", and
> "stage 3: cross tools" -DNO_CTF is put into the environment
> but ctfconvert is still run.
This needs more investigation for a fix...
Bye,
Alexander.
--
http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
You can't go home again, unless you set $HOME.
--=_vexzd7bwxq8
Content-Type: text/x-patch;
charset=UTF-8;
name="cddl_ctf.diff"
Content-Disposition: attachment;
filename="cddl_ctf.diff"
Content-Transfer-Encoding: 7bit
Index: Makefile.inc1
===================================================================
--- Makefile.inc1 (Revision 221420)
+++ Makefile.inc1 (Arbeitskopie)
@@ -1080,6 +1080,10 @@
_rescue= rescue/rescue
.endif
+.if (${MK_CDDL} != "no") && defined(WITH_CTF)
+_ctf_tools= cddl/usr.bin/ctfconvert cddl/usr.bin/ctfdump cddl/usr.bin/ctfmerge
+.endif
+
build-tools:
.for _tool in \
bin/csh \
@@ -1101,6 +1105,7 @@
.endfor
.for _tool in \
gnu/usr.bin/cc/cc_tools \
+ ${_ctf_tools} \
${_kerberos5_tools}
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
cd ${.CURDIR}/${_tool}; \
Index: share/mk/bsd.lib.mk
===================================================================
--- share/mk/bsd.lib.mk (Revision 221420)
+++ share/mk/bsd.lib.mk (Arbeitskopie)
@@ -33,6 +33,12 @@
NO_WERROR=
.endif
+# The CTF conversation depends upon tools within the CDDL code
+.if defined (WITH_CTF) && defined(WITHOUT_CDDL)
+.warning "WITH_CTF and WITHOUT_CDDL are set at the same time, removing WITH_CTF"
+.undef WITH_CTF
+.endif
+
# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
Index: share/mk/bsd.prog.mk
===================================================================
--- share/mk/bsd.prog.mk (Revision 221420)
+++ share/mk/bsd.prog.mk (Arbeitskopie)
@@ -15,6 +15,12 @@
NO_WERROR=
.endif
+# The CTF conversation depends upon tools within the CDDL code
+.if defined (WITH_CTF) && defined(WITHOUT_CDDL)
+.warning "WITH_CTF and WITHOUT_CDDL are set at the same time, removing WITH_CTF"
+.undef WITH_CTF
+.endif
+
# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
--=_vexzd7bwxq8--
More information about the freebsd-bugs
mailing list