minaco2 / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

Parsing of -Wp arguments. #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is an issue report about distcc 3.0 (compiled by myself).

gcc (GCC) 4.3.2
Linux 2.6.26.x (I think.)
But that doesn't matter I think.

When building some common packages there is a problem in parsing the -Wp 
arguments.

For example: iptables 1.4.1.1

[chroot-i686(i686)] root:/usr/src/iptables-1.4.1.1$ make
make  all-recursive
make[1]: Entering directory `/usr/src/iptables-1.4.1.1'
Making all in extensions
make[2]: Entering directory `/usr/src/iptables-1.4.1.1/extensions'
  GEN      initext4.c
  CC       initext4.o
distcc[22065] (copy_extra_args) Warning: '-Wp,-MD' or '-Wp,-MMD' option is 
missing filename argument
distcc[22065] ERROR: compile (null) on localhost failed
distcc[22064] (copy_extra_args) Warning: '-Wp,-MD' or '-Wp,-MMD' option is 
missing filename argument
gcc: ./.initext4.o.d: No such file or directory
gcc: initext4.o: No such file or directory
distcc[22064] ERROR: compile (null) on localhost failed
make[2]: *** [initext4.o] Error 1
make[2]: Leaving directory `/usr/src/iptables-1.4.1.1/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/iptables-1.4.1.1'
make: *** [all] Error 2

Syslinux 3.62:

make[2]: Entering directory `/usr/src/syslinux-3.62/mtools'
gcc -Wp,-MT,syslinux.o,-MMD,.syslinux.o.d -W -Wall -fno-stack-protector -
D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libfat -I../libinstaller -c -o 
syslinux.o syslinux.c
distcc[15587] (copy_extra_args) Warning: '-Wp,-MD' or '-Wp,-MMD' option is 
missing filename argument

I tried to modify that lines but still get the same error, or an assertion 
error (http://code.google.com/p/distcc/source/browse/trunk/src/arg.c#474) 
or gcc didn't accept the flags :(.

I searched some code repositories of some big distributions but no one has 
a patch or anything else.

Hope that is enough information for you.

Michael

Original issue reported on code.google.com by m.s.tremer@gmail.com on 5 Oct 2008 at 4:06

GoogleCodeExporter commented 9 years ago
Thanks for the bug report!  Here's the fix.

Index: src/arg.c
===================================================================
--- src/arg.c   (revision 616)
+++ src/arg.c   (working copy)
@@ -453,7 +453,7 @@
         dest_argv[i] = strdup(opt);
         if (!dest_argv[i]) return EXIT_OUT_OF_MEMORY;
         i++;
-        if (strcmp(opt, "-MD") == 0 || strcmp(opt, "-MMD")) {
+        if (strcmp(opt, "-MD") == 0 || strcmp(opt, "-MMD") == 0) {
             char *filename;
             if (!comma) {
                 rs_log_warning("'-Wp,-MD' or '-Wp,-MMD' option is missing "

Original comment by fergus.h...@gmail.com on 5 Oct 2008 at 4:37

GoogleCodeExporter commented 9 years ago
Fixed in the svn repository at revision 617.

Original comment by fergus.h...@gmail.com on 5 Oct 2008 at 4:44

GoogleCodeExporter commented 9 years ago
Hey, this works!

Thank you very much.

(I'm sorry that I didn't find that mistake by myself...)

Michael

Original comment by m.s.tremer@gmail.com on 5 Oct 2008 at 6:57