From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126877 invoked by alias); 3 Nov 2015 12:27:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 126861 invoked by uid 89); 3 Nov 2015 12:27:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 03 Nov 2015 12:27:42 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C33D5220; Tue, 3 Nov 2015 12:27:41 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA3CReK2029915; Tue, 3 Nov 2015 07:27:41 -0500 Message-ID: <5638A83C.6040300@redhat.com> Date: Tue, 03 Nov 2015 12:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: fracting@gmail.com CC: gdb-patches@sourceware.org Subject: Re: [PATCH 00/11] C++/MinGW patches References: <1446492970-21432-1-git-send-email-palves@redhat.com> <5637C1FA.2060708@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2015-11/txt/msg00070.txt.bz2 On 11/03/2015 12:24 PM, Qian Hong wrote: > Hi Pedro, > > I found the below error when cross compile with `./configure > --host=i686-w64-mingw32 --enable-build-with-cxx`: Does it trigger without --enable-build-with-cxx as well? > > objcopy.c: In function ‘parse_symflags’: > objcopy.c:792:7: error: implicit declaration of function ‘strndup’ > [-Werror=implicit-function-declaration] > PARSE_OTHER ("before=", *other); > ^ > objcopy.c:774:9: error: incompatible implicit declaration of built-in > function ‘strndup’ [-Werror] > fval = strndup (s + sizeof fname - 1, len - sizeof fname + 1) > ^ > objcopy.c:792:7: note: in expansion of macro ‘PARSE_OTHER’ > PARSE_OTHER ("before=", *other); > ^ > objcopy.c: In function ‘copy_main’: > objcopy.c:4085:23: error: incompatible implicit declaration of > built-in function ‘strndup’ [-Werror] > newsym->symdef = strndup (optarg, s - optarg); > ^ > cc1: all warnings being treated as errors > Makefile:939: recipe for target 'objcopy.o' failed > make[4]: *** [objcopy.o] Error 1 > ... because binutils/objcopy.c is part of binutils, not gdb. Is it trying to build with a C++ compiler? (doesn't look like that's the issue, but ...) Thanks, Pedro Alves