[Bug driver/36312] should refuse to overwrite input file with output file
carlos at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 19 14:40:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
carlos at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |carlos at gcc dot gnu.org
Resolution|FIXED |---
--- Comment #15 from carlos at gcc dot gnu.org ---
This breaks glibc builds.
It is a common configure idiom to use /dev/null in both input and output files.
For example:
configure:72: checking for AVX support
configure:78: /home/triegel/local/gcc/bin/gcc -mavx -xc /dev/null -S -o
/dev/null
gcc: fatal error: input file '/dev/null' is the same as output file
compilation terminated.
configure:81: $? = 1
configure:89: result: no
There is no need for a temporary file and it would slow down configure.
I expect that this change will break many more packages in the distribution
builds because of this common idiom.
It would be sufficient if /dev/null were special cased in some way for Linux
configurations.
More information about the Gcc-bugs
mailing list