From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by sourceware.org (Postfix) with ESMTPS id 007FD3858D37 for ; Mon, 15 Aug 2022 11:38:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 007FD3858D37 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27F79PAb004997; Mon, 15 Aug 2022 13:38:24 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3hx13ahmsj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Aug 2022 13:38:24 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0CF77100034; Mon, 15 Aug 2022 13:38:22 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1D57F228A33; Mon, 15 Aug 2022 13:38:22 +0200 (CEST) Received: from [10.252.10.170] (10.75.127.47) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Mon, 15 Aug 2022 13:38:21 +0200 Message-ID: <9a97b2fa-2aaa-95b6-b491-70c05cd6aa3a@foss.st.com> Date: Mon, 15 Aug 2022 13:38:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH] bfd: handle codepage when opening files on MinGW Content-Language: en-US To: Nick Clifton , Luis Machado , =?UTF-8?Q?Cl=c3=a9ment_Chigot?= , References: <2fe3fe60-4039-b9e8-4212-4d9f62e270cc@arm.com> From: Torbjorn SVENSSON In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-15_06,2022-08-15_01,2022-06-22_01 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, 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: Mon, 15 Aug 2022 11:38:33 -0000 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 > >