Patch to crunchgen to fix errors using make -P
Gordon Tetlow
gordont at gnf.org
Fri Jul 25 16:08:42 PDT 2003
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20030725/ab2c23d4/attachment.bin
More information about the freebsd-arch
mailing list