]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR 32359, --dependency-file: wrong error message if fopen fails
authorBarnabás Pőcze <pobrn@protonmail.com>
Fri, 15 Nov 2024 23:34:48 +0000 (10:04 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 15 Nov 2024 23:37:12 +0000 (10:07 +1030)
Use of %E in ld error messages requires bfd_error to be set.

ld/ldmain.c

index 037099b9d37352437744c3507757df096250de24..4fb0d1c864c429b0f79a4ed6ddbcd8f075964cfd 100644 (file)
@@ -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);
     }