This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/11] C++/MinGW patches
- From: Pedro Alves <palves at redhat dot com>
- To: fracting at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 03 Nov 2015 12:27:40 +0000
- Subject: Re: [PATCH 00/11] C++/MinGW patches
- Authentication-results: sourceware.org; auth=none
- References: <1446492970-21432-1-git-send-email-palves at redhat dot com> <5637C1FA dot 2060708 at redhat dot com> <CALd+sZThHQQFq4DSw9Dd0pXVfYmAq=RFj0GM1OtmSXv8OwL4sg at mail dot gmail dot com> <CALd+sZRJfJ+D=vwK6EcfVa3QViqkNT7PYfkNdAF_X7e-=tDqOg at mail dot gmail dot com>
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