[Bug target/123504] [16 Regression] linking with COFF-format .res files does not work any more since r16-6121-ga7852981ce15a1
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 15 14:25:26 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123504
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Yong <jyong@gcc.gnu.org>:
https://gcc.gnu.org/g:da2229db8809d461cd483a22725d53694dcdfa1e
commit r16-6807-gda2229db8809d461cd483a22725d53694dcdfa1e
Author: Peter Damianov <peter0x44@disroot.org>
Date: Sat Jan 10 09:19:54 2026 +0000
Remove .res specs to fix COFF passthrough [PR123504]
Some packages (gnulib) pass COFF object files with .res extension
directly to gcc, expecting them to be passed through to the linker,
instead of windres. However, the current EXTRA_DEFAULT_COMPILERS spec
intercepts all .res files and runs them through windres, which fails for
COFF files that are not Windows resource files (Microsoft Visual C
binary resource file as identified by libmagic/file).
This patch removes the .res file specs, leaving only the .rc
support specs active. At a later date, this can be reviewed.
The driver could inspect the .res file to see if it's a object file or,
but, it's somewhat questionable if handling .res is even useful.
gcc/ChangeLog:
PR driver/123504
* config/i386/cygming.h (EXTRA_DEFAULT_COMPILERS): Comment out
.res spec to allow COFF files with .res extension to pass
through to the linker.
* config/aarch64/cygming.h (EXTRA_DEFAULT_COMPILERS): Likewise.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
More information about the Gcc-bugs
mailing list