From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by sourceware.org (Postfix) with ESMTPS id 3C8103858D28 for ; Fri, 12 Aug 2022 15:11:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3C8103858D28 Received: by mail-qk1-x732.google.com with SMTP id j6so963581qkl.10 for ; Fri, 12 Aug 2022 08:11:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=kArWnZAoroixKLCJGNiNUqDqbtARRQpGula+TtNs4k0=; b=q28uW4EzWEFJxIZnGhKgviRgv2UAA380/h9v0YbU9DkQ/nZu1U+KllhDQf11SJZTB9 y9d7DFfLxCb0TeNkCWzb7mLg4N8plwzP5V932umpBif0oekWtRJoOkQ1qj1pkWfTYTc+ jo4l9ic+5eQnsftd4nSULta5rmMjJknmBOJsOL5Pu7Nz3HaNh8bIf6jWx/kxuydKzxoZ 5ciZ0goomadLXFDGHAWA2dJ9cAAFlNocnkvsQ7SNZr8Dr+qLhSz4gyGYEtzj0FllSRsP rIrf052E5SxaAw/1WU/SbL3gcaG1VQZliCpQAE4e33zlDggIQEVBKTCtT62z5AV0ra1+ d8Pg== X-Gm-Message-State: ACgBeo1nKRd7spt0qjftespWUSe/kE0oLYmFbh3yup/T2wq9+We0+3hI APWnRs6nrhgitkUlP4RqeJhGuia8oEnxftCAF2ZrCAZHscTEWP4S X-Google-Smtp-Source: AA6agR6i17rn4zta2cAMCmKPngCcG4zD8xMxDys9QflOdR1xEU/3WoFE6sumhoki5fKOD3gObEYy0fxsF7QUy4BZXuQ= X-Received: by 2002:a05:620a:c43:b0:6a9:77ef:e000 with SMTP id u3-20020a05620a0c4300b006a977efe000mr3330158qki.396.1660317082538; Fri, 12 Aug 2022 08:11:22 -0700 (PDT) MIME-Version: 1.0 References: <2fe3fe60-4039-b9e8-4212-4d9f62e270cc@arm.com> In-Reply-To: <2fe3fe60-4039-b9e8-4212-4d9f62e270cc@arm.com> From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Fri, 12 Aug 2022 17:11:12 +0200 Message-ID: Subject: Re: [PATCH] bfd: handle codepage when opening files on MinGW To: Luis Machado Cc: Nick Clifton , binutils@sourceware.org, Torbjorn SVENSSON Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2022 15:11:25 -0000 Hi Luis, > It's been reported to me that this is causing some issues building binuti= ls with mingw. > > In fact, trying to build master binutils-gdb with Ubuntu 22.04's mingw-w6= 4 8.0 or Ubuntu 20.04's mingw-w64 7.0.0 runs > into the following: > > bfd/bfdio.c: In function =E2=80=98_bfd_real_fopen=E2=80=99: > bfd/bfdio.c:125:28: error: implicit declaration of function =E2=80=98___l= c_codepage_func=E2=80=99 [-Werror=3Dimplicit-function-declaration] > 125 | const unsigned int cp =3D ___lc_codepage_func(); Looking at the commit exposing this ___lc_codepage_func, it seems to have been integrated only after 8.0.1 (cf https://github.com/mirror/mingw-w64/commit/64cb5e8582d9004cfa4d90b189c80c6e= 1a35d7af) I don't know if there is any define providing the version of MinGW (I didn't find it). Otherwise, I guess it'll have to be checked by the configure. I won't have time to create a patch for that before next week (probably on wednesday/thursday). Meanwhile, you should be able to recompile binutils without this patch. As long as you don't have non-ASCII characters in your filename, you should be fine. But thanks for bringing that up ! Cl=C3=A9ment