From: Barnabás Pőcze Date: Fri, 15 Nov 2024 23:34:48 +0000 (+1030) Subject: PR 32359, --dependency-file: wrong error message if fopen fails X-Git-Tag: gdb-16-branchpoint~423 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8eba92c9e224444cc893dd0abf2377701c10f884;p=thirdparty%2Fbinutils-gdb.git PR 32359, --dependency-file: wrong error message if fopen fails Use of %E in ld error messages requires bfd_error to be set. --- diff --git a/ld/ldmain.c b/ld/ldmain.c index 037099b9d37..4fb0d1c864c 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -194,6 +194,7 @@ write_dependency_file (void) out = fopen (config.dependency_file, FOPEN_WT); if (out == NULL) { + bfd_set_error (bfd_error_system_call); einfo (_("%F%P: cannot open dependency file %s: %E\n"), config.dependency_file); }