driver: error for nonexistent linker inputs [PR 98943]
We used to check all unknown input files, even when passing them to a
compiler. But that caused problems. However, not erroring out on
non-existent would-be-linker inputs confuses configure machinery that
probes the compiler to see if it accepts various inputs. This
restores the access check for things that are thought to be linker
input files, when we're not linking. (If we are linking, we presume
the linker will error out on its own accord.)
PR driver/98943
gcc/
* gcc.c (driver::maybe_run_linker): Check for input file
accessibility if not linking.
gcc/testsuite/
* c-c++-common/pr98943.c: New.