[Bug driver/57652] New: [4.7/4.8/4.9 Regression] collect2 does not clean up temporary files
dje at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 19 13:47:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57652
Bug ID: 57652
Summary: [4.7/4.8/4.9 Regression] collect2 does not clean up
temporary files
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: dje at gcc dot gnu.org
The 2011-05-19 change to convert collect2 to use the common diagnostics
infrastructure broke collect2's handling of temporary files. The original
error reporting routines reported the error message and, IMPORTANTLY, called
collect_exit(). collect_exit() removes temporary files through multiple
invocations of maybe_unlink().
The change to invoke fatal_error() in GCC's diagnostics.c directly terminates
without cleaning up the temporary files. This leaves at least 5 temporary files
in /tmp for each link step that results in an error message. When using GNU
configure to probe system features, this creates numerous temporary files.
For example,
$ cat foo.c
int main () {}
$ gcc foo.c -lnonexistent
collect2: fatal error: library libnonexistent not found
compilation terminated.
$ ls /tmp/cc*
/tmp/cc0IcxVL.c /tmp/ccKwuh03.x /tmp/ccqMJsFn.le
/tmp/cc2taIMJ.ld /tmp/cceKTq5n.o
More information about the Gcc-bugs
mailing list