From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 016803858C56; Fri, 15 Mar 2024 15:55:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 016803858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710518124; bh=3lN/C+dwvAFOQvbdQuK50kf9mdIk8cntMxIqouyka9Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eQ/bVu/pZGK3nUo6EjpEtBs8jGOKldguTxuL7ks89QyCbLBIzVIyKigFKAZUilaHa BwaMWe7Y4d5M/4GrV5HE9ccJKOTFh/qZHHWTwWg0GV1fdVFQqWPkqYffxhRo4hcouP W607xGbzcoxp0ZCZgE4L9cByHBO2dhuLp3W1YCHg= From: "peter0x44 at disroot dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: peter0x44 at disroot dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108866 peter0x44 at disroot dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |peter0x44 at disroot dot o= rg --- 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=3D Include directory when preprocessing rc fi= le -D --define [=3D] Define SYM when preprocessing rc file -U --undefine 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 win= dows 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=3D"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=3D"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=3D"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=3D command option or so?=