This is the mail archive of the gcc-bugs@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]

Bug in DEPENDENCIES_OUTPUT support (2.7.2, egcs 1.0.2)



On both gcc 2.7.2 and egcs 1.0.2, DEPENDENCIES_OUTPUT does not work
correctly.  One would expect it to write a file with identical
contents to that generated by the -M switch.  Instead, if no target is
specified the file gives only a dependency on the .c file, and if a
target is specified it gives no dependencies at all.

Here's an example:

$ cat tst.c
#include <stddef.h>  /* this header includes no other headers */
$ gcc -M tst.c
tst.o: tst.c \
 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/include/stddef.h
$ DEPENDENCIES_OUTPUT=file gcc -E tst.c >/dev/null; cat file
tst.o: tst.c
$ rm file
$ DEPENDENCIES_OUTPUT='file x' gcc -E tst.c >/dev/null; cat file
x:
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)

2.7.2 behaves identically.

Also, if the file already exists it is appended to.  It would, IMO, be
better if it were replaced.

zw


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