public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: "Torbjorn SVENSSON" <torbjorn.svensson@foss.st.com>,
	"Nick Clifton" <nickc@redhat.com>,
	"Clément Chigot" <chigot@adacore.com>,
	binutils@sourceware.org
Subject: Re: [PATCH] bfd: handle codepage when opening files on MinGW
Date: Tue, 16 Aug 2022 13:15:17 +0100	[thread overview]
Message-ID: <4e48346a-14ca-b536-403a-3f2b345778dc@arm.com> (raw)
In-Reply-To: <9a97b2fa-2aaa-95b6-b491-70c05cd6aa3a@foss.st.com>

Hi Nick,

On 8/15/22 12:38, Torbjorn SVENSSON wrote:
> Hello Nick,
> 
> On 2022-08-15 13:07, Nick Clifton wrote:
>> Hi Luis,
>>
>>> In fact, trying to build master binutils-gdb with Ubuntu 22.04's mingw-w64 8.0 or Ubuntu 20.04's mingw-w64 7.0.0 runs
>>> into the following:
>>>
>>> bfd/bfdio.c: In function ‘_bfd_real_fopen’:
>>> bfd/bfdio.c:125:28: error: implicit declaration of function ‘___lc_codepage_func’ [-Werror=implicit-function-declaration]
>>>    125 |    const unsigned int cp = ___lc_codepage_func();
>>
>> So that would imply a missing #include of a system header, yes ?
>>
>> Do you know which header provides the required prototype ?
>>
>> The code is currently conditional upon __MINGW32__ being defined.  Perhaps
>> that check needs to be extended/changed to reference a different preprocessor
>> symbol ?
> 
> The problem is that the function is not exposed in the MinGW headers until the 9.0 release.
> I sent a patch that fixes the build error https://sourceware.org/pipermail/binutils/2022-August/122423.html earlier today (with you on CC).
> 
>>
>> Cheers
>>    Nick
>>
>>

What Torbjörn said. We need to restrict things based on the version of MinGW.

His patch looks good to me. I just wasn't sure about the _CRTIMP in his patch.

      reply	other threads:[~2022-08-16 12:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28  7:27 Clément Chigot
2022-06-28  7:47 ` Clément Chigot
2022-06-28 14:52   ` Nick Clifton
2022-08-12 14:45   ` Luis Machado
2022-08-12 15:11     ` Clément Chigot
2022-08-12 15:13       ` Luis Machado
2022-08-15 11:07     ` Nick Clifton
2022-08-15 11:38       ` Torbjorn SVENSSON
2022-08-16 12:15         ` Luis Machado [this message]

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=4e48346a-14ca-b536-403a-3f2b345778dc@arm.com \
    --to=luis.machado@arm.com \
    --cc=binutils@sourceware.org \
    --cc=chigot@adacore.com \
    --cc=nickc@redhat.com \
    --cc=torbjorn.svensson@foss.st.com \
    /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: link
Be 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).