[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#478584: g++-4.3: -MD -include and compiled headers does not work together



Package: g++-4.3
Version: 4.3.0-3
Severity: normal

Here is a bug I discovered with g++-4.3. Other compilers (gcc-4.3, 
g++-4.2) are perhaps also affected. It seems to me (but I do not check 
as well as for g++-4.3).

Here is what can be done to reproduce the problem:

vdanjean@cayuga:/tmp$ mkdir test
vdanjean@cayuga:/tmp$ cd test/
vdanjean@cayuga:/tmp/test$ touch foo.cpp bar.h
vdanjean@cayuga:/tmp/test$ g++-4.3 bar.h
vdanjean@cayuga:/tmp/test$ g++-4.3 -include bar.h -MD -c foo.cpp
vdanjean@cayuga:/tmp/test$ cat foo.d
foo.o: foo.cpp
vdanjean@cayuga:/tmp/test$ g++-4.3 -include bar.h -M foo.cpp
foo.o: foo.cpp bar.h
vdanjean@cayuga:/tmp/test$ rm bar.h.gch
vdanjean@cayuga:/tmp/test$ g++-4.3 -include bar.h -MD -c foo.cpp
vdanjean@cayuga:/tmp/test$ cat foo.d
foo.o: foo.cpp bar.h
vdanjean@cayuga:/tmp/test$ g++-4.3 -fpch-deps bar.h
vdanjean@cayuga:/tmp/test$ g++-4.3 -fpch-deps -include bar.h -MD -c foo.cpp
vdanjean@cayuga:/tmp/test$ cat foo.d
foo.o: foo.cpp
vdanjean@cayuga:/tmp/test$

=> using -fpch-deps does not help.

So it seems that using -include with a compiled header file and the -MD
option does not work.
The file with dependencies generated with -MD should have the bar.h
dependency.

I discover this bug because make (with autotools) did not behave
correctly in one of my project. I hope this bug can be fixed soon.

  Best regards,
    Vincent


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-trunk-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages g++-4.3 depends on:
ii  gcc-4.3                   4.3.0-3        The GNU C compiler
ii  gcc-4.3-base              4.3.0-3        The GNU Compiler Collection (base 
ii  libc6                     2.7-10         GNU C Library: Shared libraries
ii  libgmp3c2                 2:4.2.2+dfsg-3 Multiprecision arithmetic library
ii  libmpfr1ldbl              2.3.1.dfsg.1-2 multiple precision floating-point 
ii  libstdc++6-4.3-dev        4.3.0-3        The GNU Standard C++ Library v3 (d

g++-4.3 recommends no packages.

-- no debconf information



Reply to: