This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ggdb3 information lost using temporary preprocessed file


Hello,

I recently started to test 'distcc' to speedup some compilations.
Then I noticed the sizes of generated objects were not the same
compiled locally (using gcc only) and remotely (using gcc through
distcc). After some investigations I found the issue was related to
the '-ggdb3' flag and the fact distcc splits the compilation in two
steps.

The issue can be reproduced without distcc; for the following 'main.c'
code the local command used is: 'gcc -ggdb3 -c main.c' and the distcc
one is equivalent to a local: 'gcc -ggdb3 -c main.c -E > main.i; gcc
-ggdb3 -c main.i'.

The resulting sizes are respectively 15400 and 3992 bytes. Using
'-ggdb2' the generated objects are the same. I guess some debugging
information is lost when the compilation is split into two steps but
it could prevent the use of 'distcc' in some cases.
Does anybody know if this is the expected behavior or if it is a bug?
Does a workaround exist?

Thanks in advance and best regards,
sb

PS: we use gcc 3.4.5 on a Linux/Suse Linux Enterprise Server 9 but the
behavior is the same on Solaris 10 (same gcc version).

The main.c code:
#include <stdio.h>
int main(int argc, char **argv)
{
 printf("Hello\n");
 return 0;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]