This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug in DEPENDENCIES_OUTPUT support (2.7.2, egcs 1.0.2)
- To: egcs-bugs at cygnus dot com, bug-gcc at gnu dot org
- Subject: Bug in DEPENDENCIES_OUTPUT support (2.7.2, egcs 1.0.2)
- From: Zack Weinberg <zack at rabi dot phys dot columbia dot edu>
- Date: Sun, 12 Apr 1998 20:22:01 -0400
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