From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 486C8385700E; Thu, 23 Mar 2023 01:13:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 486C8385700E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679534032; bh=ZSlxXVwz6/qsVp72WCvn/XJezLcAPD8hglPmEzU1aAk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EsksozbEzz+WghbGqNnE93vWqpn0hjA/SDVWmwnSmVp5MAQ5KWxYql1eIHVh1SqlR mc8IonYMdijiP69/b3thYzt99wpABXesnHLC97wH+DCZ/IOVbDjSmugiqJbgO1GUsJ NMmfSyx5+kvr7/W1Tn7Ubd6oWRxRDIOf2U77485E= From: "costas.argyris at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/108865] gcc on Windows fails with Unicode path to source file Date: Thu, 23 Mar 2023 01:13:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: costas.argyris at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D108865 --- Comment #25 from Costas Argyris --- Some more specific info: Host x86_64-w64-mingw32 in general didn't fail. What failed was building= it as an MSYS2 package using the PKGBUILD script. For example, cross-compil= ing with standard configure + make didn't fail. On the reason of the MSYS2 package build failure: When building using that approach, the following executables build/genchecksum.exe build/genmodes.exe build/genversion.exe=20=20=20 build/gengenrtl.exe are borrowing the $(COMPILERS) flags, so this included -Wl,--require-defined=3DHOST_EXTRA_OBJS_SYMBOL because of +$(COMPILERS) : override LDFLAGS +=3D -Wl,--require-defined=3DHOST_EXTRA_OBJS_SYMBOL Since '--require-defined' results in an error if the symbol is not found, t= he failure happens. This shouldn't be an error though, because this flag was only meant for the compilers, hence the $(COMPILERS) variable. I don't k= now why these executables use the compiler flags in this build setup. It did= n't happen when cross-compiling using configure + make. The proposed patch simply switches '--require-defined' to '--undefined' and makes the symbol definition optional, so these executables don't fail to bu= ild. The compilers will still pull it in, so we still get the UTF-8 feature. With the proposed patch, the MSYS2 gcc package builds fine. Also confirm= ed for the cross-compilation case with configure + make.=