[Bug driver/34280] New: using -o with -MM produces truncated output with multiple input files
vapier at gentoo dot org
gcc-bugzilla@gcc.gnu.org
Thu Nov 29 01:46:00 GMT 2007
trying to do something simple like:
$ gcc -MM one.c two.c three.c -o .depend
results in .depend only containing the information from the last file processed
as each file processed causes the output to be opened/closed with O_TRUNC
$ cat .depend
three.o: three.c
$ strace -f -eopen gcc -MM one.c two.c three.c -o .depend 2>&1 | grep
'\.depend'
28900 open(".depend", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
28901 open(".depend", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
28902 open(".depend", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
a quick compare shows 3.3.6 - 4.3.0 all behaving this way
--
Summary: using -o with -MM produces truncated output with
multiple input files
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vapier at gentoo dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34280
More information about the Gcc-bugs
mailing list