My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 22: Parsing of -Wp arguments.
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Oct 2008
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by m.s.tremer, Oct 05, 2008
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
Comment 1 by fergus.henderson, Oct 05, 2008
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 "


Comment 2 by fergus.henderson, Oct 05, 2008
Fixed in the svn repository at revision 617.
Status: Fixed
Comment 3 by m.s.tremer, Oct 05, 2008
Hey, this works!

Thank you very much.

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

Michael
Sign in to add a comment

Hosted by Google Code