Control: retitle -1 gcc-snapshot: incorrect error message with -Wl options and no input files Control: found -1 1:20251111-1
On 2022-07-01 02:34:17 +0200, Vincent Lefevre wrote: > "gcc-snapshot" without any argument fails in a strange way: > > $ gcc-snapshot > /usr/bin/ld: /usr/lib/x86_64-linux-gnu/crt1.o: in function `_start': > (.text+0x20): undefined reference to `main' > collect2: error: ld returned 1 exit status I forgot that this was a script inspired by the one given at /usr/share/doc/gcc-snapshot/README.Debian > Compare with gcc-12: > > $ gcc-12 > gcc-12: fatal error: no input files > compilation terminated. So this is reproducible with any gcc version, I think. For instance: $ gcc-15 -Wl,-rpath -Wl,$HOME/lib /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status The arguments are not input files, so that this error message is unexpected. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

