public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "peter0x44 at disroot dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108866] Allow to pass Windows resource file (.rc) as input to gcc Date: Fri, 15 Mar 2024 15:55:21 +0000 [thread overview] Message-ID: <bug-108866-4-wjv8AMaFkt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108866-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108866 peter0x44 at disroot dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |peter0x44 at disroot dot org --- Comment #7 from peter0x44 at disroot dot org --- I'm interested in this feature, and would use it if it worked. I do have a few questions about how this needs to be implemented, though. 1) should gcc pass through any arguments to windres? -I --include-dir=<dir> Include directory when preprocessing rc file -D --define <sym>[=<val>] Define SYM when preprocessing rc file -U --undefine <sym> Undefine SYM when preprocessing rc file 2) does -m32 or -m64 need handling in any specific ways? 3) the linker has -Wl, for passing arguments to it, does windres need an equivalent? 4) windres --help says: FORMAT is one of rc, res, or coff, and is deduced from the file name should ".res" be handled too? 5) windres --help has this list of "supported targets": x86_64-w64-mingw32-windres: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 pe-i386 pei-i386 elf32-i386 elf32-iamcu elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin Do they matter? I did not expect to see any "elf" on this list, because windows obviously doesn't use it. I suspect some of these are not used/broken/handled by anyone, for windres anyway. I tried the following: $ x86_64-w64-mingw32-windres --target="elf64-x86-64" -i test.rc -o test.o x86_64-w64-mingw32-windres: can't get BFD_RELOC_RVA relocation type: cause of error unknown $ x86_64-w64-mingw32-windres --target="elf32-i386" -i test.rc -o test.o x86_64-w64-mingw32-windres: bruh.o: unsupported relocation type: 0x3f $ x86_64-w64-mingw32-windres --target="elf32-iamcu" -i test.rc -o test.o x86_64-w64-mingw32-windres: bfd_set_arch_mach(i386): cause of error unknown 6) does llvm-windres need to be considered at all? should there be a way to select it? an -fuse-rc= command option or so?
next prev parent reply other threads:[~2024-03-15 15:55 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-20 21:17 [Bug c/108866] New: " pali at kernel dot org 2023-02-20 21:24 ` [Bug target/108866] " pinskia at gcc dot gnu.org 2023-02-20 21:24 ` pinskia at gcc dot gnu.org 2024-03-13 21:46 ` pali at kernel dot org 2024-03-13 22:06 ` pinskia at gcc dot gnu.org 2024-03-14 13:55 ` amonakov at gcc dot gnu.org 2024-03-14 20:19 ` pali at kernel dot org 2024-03-14 20:23 ` pinskia at gcc dot gnu.org 2024-03-15 15:55 ` peter0x44 at disroot dot org [this message] 2024-03-15 17:27 ` pali at kernel dot org 2024-03-24 16:07 ` pali at kernel dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108866-4-wjv8AMaFkt@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).