https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123504

            Bug ID: 123504
           Summary: [16 Regression] linking with binary .res files does
                    not work any more
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bruno at clisp dot org
  Target Milestone: ---

Linking with a COFF-format resource file named 'something.res', on mingw, no
longer works.

Details:

For more than 20 years, building GNU libiconv on mingw includes two commands
(among others):

1) A command that produces a binary .res file:

x86_64-w64-mingw32-windres `/bin/sh ./../windows/windres-options --escape 1.18`
-i ./../windows/iconv.rc -o iconv.res --output-format=coff

2) A command that produces a .exe file, iconv_no_i18n.exe, that includes said
.res file:

x86_64-w64-mingw32-gcc -g -O2 iconv_no_i18n.o iconv.res -o iconv_no_i18n.exe 
-L/usr/local/mingw64/lib ../srclib/libicrt.a ../lib/.libs/libiconv.a

With a GCC 16 snapshot, it is reported that the second command produces an
error:

windres: iconv.res: Not a valid WIN32 resource file

The reporter (at https://savannah.gnu.org/bugs/?67897 ) investigated this and
found that
- gcc calls 'windres -J res -O coff iconv.res',
- This is due to a recent GCC commit
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=commit;h=a7852981ce15a12a083b7bf0071cc5946a6ea671
- This would not happen if the file would have the suffix '.o' rather than
'.res'.

But it has worked for over 20 years. It is a regression.

Reply via email to