Date: Fri, 25 Jul 2003 16:08:39 -0700 From: Gordon Tetlow <gordont@gnf.org> To: arch@FreeBSD.org Subject: Patch to crunchgen to fix errors using make -P Message-ID: <20030725230839.GR12996@roark.gnf.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Bill Fenner reported a problem with crunchgen relating to the use of
make -j # -P when building rescue. By running make -j # -P in
src/rescue/rescue you get the following type of error:
crunchgen: make error: Remaking `crunchgen_objs'
crunchgen: make error: Results of making crunchgen_objs:
crunchgen: make error:
crunchgen: make error: Remaking `loop'
crunchgen: make error: Results of making loop:
crunchgen: make error:
This stems from the problem that crunchgen itself invokes make(1)
to do some work and the extra output generated by the -P flag
confuses crunchgen.
I have a quick patch that I'd like to commit, but I was wondering
if anyone had any objections or reason to keep the MAKEFLAGS
environment variable.
-gordon
--- //depot/vendor/freebsd/src/usr.sbin/crunch/crunchgen/crunchgen.c 2003/04/22 21:37:08
+++ //depot/user/gordon/dynamic/src/usr.sbin/crunch/crunchgen/crunchgen.c2003/07/25 16:02:35
@@ -700,6 +700,12 @@
fclose(f);
+ /*
+ * We need to whack the MAKEFLAGs env variable to protect crunchgen
+ * from dangerous flags like -P that influence the resulting output.
+ */
+ unsetenv("MAKEFLAGS");
+
snprintf(line, MAXLINELEN, "cd %s && make -f %s crunchgen_objs 2>&1",
p->srcdir, tempfname);
if ((f = popen(line, "r")) == NULL) {
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)
iD8DBQE/Ibh3Ru2t9DV9ZfsRAuI1AKC54oiWeKjIzqVRTiTDhTOFaummcQCgi8rg
HrA9IKkKlrwktHvYHm371xY=
=67k0
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030725230839.GR12996>
