From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63612 invoked by alias); 24 Nov 2016 00:16:56 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 63600 invoked by uid 89); 24 Nov 2016 00:16:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=baldwin, Baldwin, Johns, johns X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Nov 2016 00:16:54 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 77D5710AA56; Wed, 23 Nov 2016 19:16:52 -0500 (EST) From: John Baldwin To: gdb@sourceware.org Cc: Chris Johns Subject: Re: gdb-7.12 powerpc-rtems4.12-gdb does not build on FreeBSD. Date: Thu, 24 Nov 2016 00:16:00 -0000 Message-ID: <1893490.1c09n3VfH9@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <5836233A.7000407@rtems.org> References: <5834D6E0.9060601@rtems.org> <5836233A.7000407@rtems.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00042.txt.bz2 On Thursday, November 24, 2016 10:16:10 AM Chris Johns wrote: > On 23/11/2016 10:38, Chris Johns wrote: > > Hi, > > > > I am getting: > > > > ../sim/ppc/libsim.a(sim_calls.o): In function `sim_io_printf_filtered': > > ../../../gdb-7.12/sim/ppc/sim_calls.c:(.text+0x17c): undefined reference > > to `error' > > ../sim/ppc/libsim.a(sim_calls.o): In function `sim_load': > > ../../../gdb-7.12/sim/ppc/sim_calls.c:(.text+0x291): undefined reference > > to `error' > > ../../../gdb-7.12/sim/ppc/sim_calls.c:(.text+0x31d): undefined reference > > to `error' > > ../../../gdb-7.12/sim/ppc/sim_calls.c:(.text+0x357): undefined reference > > to `error' > > ../sim/ppc/libsim.a(sim_calls.o): In function `sim_create_inferior': > > ../../../gdb-7.12/sim/ppc/sim_calls.c:(.text+0x53e): undefined reference > > to `error' > > > > and errors.o has the following symbols: > > > > nm > > build/powerpc-rtems4.12-gdb-7.12-x86_64-freebsd10.3-1/build/gdb/errors.o > > 0000000000000120 T _Z14internal_errorPKciS0_z > > U _Z15internal_verrorPKciS0_P13__va_list_tag > > 00000000000001a0 T _Z16internal_warningPKciS0_z > > U _Z17internal_vwarningPKciS0_P13__va_list_tag > > 0000000000000090 T _Z5errorPKcz > > U _Z6verrorPKcP13__va_list_tag > > 0000000000000000 T _Z7warningPKcz > > U _Z8vwarningPKcP13__va_list_tag > > > > Is there a C++/C thing happening here between the PCC simulator and GDB? > > > > A follow up. It looks like GDB is being built by cc which is clang on > FreeBSD. I am told by Joel this gdb target builds on Linux. > > I do not know what the extern binding is for gdb, C or C++? clang vs gcc shouldn't really break this. What undefined symbols do you see in the nm of sim_calls.o? Looking at sim/ppc/Makefile.in, it only references CC, not CXX, so I would not be surprised if it compiles as C without mangled symbols giving the error you have. I think 7.12 can still be built as C, though you might need to use a configure flag to do so? If you see non-mangled symbols from sim_calls.o, I would try building 7.12 as plain C to see if that fixes it for now. -- John Baldwin