https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98943
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:6606b852bfa866c19375a7c5e9cb94776a28bd94 commit r11-7124-g6606b852bfa866c19375a7c5e9cb94776a28bd94 Author: Nathan Sidwell <nat...@acm.org> Date: Thu Feb 4 08:16:17 2021 -0800 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.