Message ID | 20190328134900.GC10887@embecosm.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 123060 invoked by alias); 28 Mar 2019 13:49:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 123050 invoked by uid 89); 28 Mar 2019 13:49:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, UNSUBSCRIBE_BODY autolearn=ham version=3.3.1 spammy= X-HELO: mail-wr1-f65.google.com Received: from mail-wr1-f65.google.com (HELO mail-wr1-f65.google.com) (209.85.221.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Mar 2019 13:49:06 +0000 Received: by mail-wr1-f65.google.com with SMTP id t17so2247203wrw.13 for <gdb-patches@sourceware.org>; Thu, 28 Mar 2019 06:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XyoG4EgVEZC/Eup1zg/+a1Ye//8/MMvrS3QlutcMiKY=; b=bdu5rTMwswj5rHkNeK5zQscD5dq6KhlHDYMUpSKQ01LFdJTHuKS05GCUtmHyQA63l+ YPYDaISqnhDrA6y8iEWb9TYvNXuA8MGg+Akhvc3ou7T5fK76pG7yh5EyZgo2IYYmPL9k Qw5oMZ0LJ/WKPEYU+SAM1ZZwQvBf0X7o4mPuuaG17fpbSDe3M7LNF45TNVrHZm4xx0Cz OPYUlWs5cqe8Ktpo6ON7lFGDPsfzRY+d3wEav4rM8vByADAdwU/gb1oi0uLk5GHUF/Xy fhRMev0NqH6K9PmG9SyR1ocKJfX5InitNT6D6YwW149ECBcCkHT21t7j6revsoQ9EfAh Zy2w== Return-Path: <andrew.burgess@embecosm.com> Received: from localhost (host81-151-161-58.range81-151.btcentralplus.com. [81.151.161.58]) by smtp.gmail.com with ESMTPSA id c18sm2130588wmk.47.2019.03.28.06.49.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Mar 2019 06:49:02 -0700 (PDT) Date: Thu, 28 Mar 2019 13:49:01 +0000 From: Andrew Burgess <andrew.burgess@embecosm.com> To: Alan Hayward <Alan.Hayward@arm.com> Cc: Stafford Horne <shorne@gmail.com>, GDB patches <gdb-patches@sourceware.org>, Simon Marchi <simon.marchi@polymtl.ca>, nd <nd@arm.com> Subject: Re: [PATCH v2 2/2] sim/common: Fix warnings: "warning: implicit declaration of function..." Message-ID: <20190328134900.GC10887@embecosm.com> References: <20190316214018.9398-1-shorne@gmail.com> <20190316214018.9398-3-shorne@gmail.com> <20190321221424.GK10887@embecosm.com> <E54A9370-FD82-405B-AC9C-4C856EB31B85@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <E54A9370-FD82-405B-AC9C-4C856EB31B85@arm.com> X-Fortune: Will the third world war keep "Bosom Buddies" off the air? X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes |
Commit Message
Andrew Burgess
March 28, 2019, 1:49 p.m. UTC
* Alan Hayward <Alan.Hayward@arm.com> [2019-03-28 11:56:59 +0000]: > > > > On 21 Mar 2019, at 22:14, Andrew Burgess <andrew.burgess@embecosm.com> wrote: > > > > * Stafford Horne <shorne@gmail.com> [2019-03-17 06:40:18 +0900]: > > > >> During building of several cgen simulator's I notices the below > >> warnings. Adding includes fixes these. > >> > >> Including config.h allows stdio.h to properly configure itself to expose > >> asprintf(). > > Stafford, it looks like this breaks AArch64 on both Ubuntu 16.04 and 18.04: > > > libsim.a(interp.o): In function `sim_open': > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/interp.c:328: undefined reference to `SIM_ASSERT' > libsim.a(cpustate.o): In function `aarch64_get_vec_u64': > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:438: undefined reference to `ARRAY_SIZE' > libsim.a(cpustate.o): In function `aarch64_get_vec_u32': > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:444: undefined reference to `ARRAY_SIZE' > libsim.a(cpustate.o): In function `aarch64_get_vec_u16': > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:450: undefined reference to `ARRAY_SIZE' > libsim.a(cpustate.o): In function `aarch64_get_vec_u8': > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:456: undefined reference to `ARRAY_SIZE' > libsim.a(cpustate.o): In function `aarch64_get_vec_s64': > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/Makefile:271: recipe for target 'run' failed > make[3]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64' > Makefile:129: recipe for target 'all' failed > make[2]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim' > Makefile:8878: recipe for target 'all-sim' failed > binutils-gdb/sim/aarch64/cpustate.c:462: undefined reference to `ARRAY_SIZE' > libsim.a(cpustate.o):/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:468: more undefined references to `ARRAY_SIZE' follow > collect2: error: ld returned 1 exit status > > > I suspect the AArch64 buildbot will be failing once it catches up > https://gdb-build.sergiodj.net/waterfall?tag=aarch64 I pushed the patch below to fix this issue. Thanks, Andrew -- [PATCH] sim: fix aarch64 sim build This commit: commit ef9866970ce6683d40465fb7c3168f87a1dcd1b7 Date: Thu Mar 28 06:40:30 2019 +0900 sim/common: convert sim-arange to use sim-inline Broke the simulator build for aarch64 - some required macros are no longer included where needed, fixed in this commit. sim/aarch64/ChangeLog: * cpustate.c: Add 'libiberty.h' include. * interp.c: Add 'sim-assert.h' include. --- sim/aarch64/ChangeLog | 5 +++++ sim/aarch64/cpustate.c | 1 + sim/aarch64/interp.c | 1 + 3 files changed, 7 insertions(+)
Comments
> On 28 Mar 2019, at 13:49, Andrew Burgess <andrew.burgess@embecosm.com> wrote: > > * Alan Hayward <Alan.Hayward@arm.com> [2019-03-28 11:56:59 +0000]: > >> >> >>> On 21 Mar 2019, at 22:14, Andrew Burgess <andrew.burgess@embecosm.com> wrote: >>> >>> * Stafford Horne <shorne@gmail.com> [2019-03-17 06:40:18 +0900]: >>> >>>> During building of several cgen simulator's I notices the below >>>> warnings. Adding includes fixes these. >>>> >>>> Including config.h allows stdio.h to properly configure itself to expose >>>> asprintf(). >> >> Stafford, it looks like this breaks AArch64 on both Ubuntu 16.04 and 18.04: >> >> >> libsim.a(interp.o): In function `sim_open': >> /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/interp.c:328: undefined reference to `SIM_ASSERT' >> libsim.a(cpustate.o): In function `aarch64_get_vec_u64': >> /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:438: undefined reference to `ARRAY_SIZE' >> libsim.a(cpustate.o): In function `aarch64_get_vec_u32': >> /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:444: undefined reference to `ARRAY_SIZE' >> libsim.a(cpustate.o): In function `aarch64_get_vec_u16': >> /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:450: undefined reference to `ARRAY_SIZE' >> libsim.a(cpustate.o): In function `aarch64_get_vec_u8': >> /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:456: undefined reference to `ARRAY_SIZE' >> libsim.a(cpustate.o): In function `aarch64_get_vec_s64': >> /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/Makefile:271: recipe for target 'run' failed >> make[3]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64' >> Makefile:129: recipe for target 'all' failed >> make[2]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim' >> Makefile:8878: recipe for target 'all-sim' failed >> binutils-gdb/sim/aarch64/cpustate.c:462: undefined reference to `ARRAY_SIZE' >> libsim.a(cpustate.o):/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:468: more undefined references to `ARRAY_SIZE' follow >> collect2: error: ld returned 1 exit status >> >> >> I suspect the AArch64 buildbot will be failing once it catches up >> https://gdb-build.sergiodj.net/waterfall?tag=aarch64 > > I pushed the patch below to fix this issue. Works again for me now. Thanks for fixing! Alan. > > Thanks, > Andrew > > -- > > [PATCH] sim: fix aarch64 sim build > > This commit: > > commit ef9866970ce6683d40465fb7c3168f87a1dcd1b7 > Date: Thu Mar 28 06:40:30 2019 +0900 > > sim/common: convert sim-arange to use sim-inline > > Broke the simulator build for aarch64 - some required macros are no > longer included where needed, fixed in this commit. > > sim/aarch64/ChangeLog: > > * cpustate.c: Add 'libiberty.h' include. > * interp.c: Add 'sim-assert.h' include. > --- > sim/aarch64/ChangeLog | 5 +++++ > sim/aarch64/cpustate.c | 1 + > sim/aarch64/interp.c | 1 + > 3 files changed, 7 insertions(+) > > diff --git a/sim/aarch64/cpustate.c b/sim/aarch64/cpustate.c > index 6f5121a76fa..f90b7ad321a 100644 > --- a/sim/aarch64/cpustate.c > +++ b/sim/aarch64/cpustate.c > @@ -25,6 +25,7 @@ > #include "sim-main.h" > #include "cpustate.h" > #include "simulator.h" > +#include "libiberty.h" > > /* Some operands are allowed to access the stack pointer (reg 31). > For others a read from r31 always returns 0, and a write to r31 is ignored. */ > diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c > index c8a3c28c494..c5cfc4a88e4 100644 > --- a/sim/aarch64/interp.c > +++ b/sim/aarch64/interp.c > @@ -38,6 +38,7 @@ > #include "sim-options.h" > #include "memory.h" > #include "simulator.h" > +#include "sim-assert.h" > > /* Filter out (in place) symbols that are useless for disassembly. > COUNT is the number of elements in SYMBOLS. > -- > 2.14.5
On Thu, Mar 28, 2019 at 01:49:01PM +0000, Andrew Burgess wrote: > * Alan Hayward <Alan.Hayward@arm.com> [2019-03-28 11:56:59 +0000]: > > > > > > > > On 21 Mar 2019, at 22:14, Andrew Burgess <andrew.burgess@embecosm.com> wrote: > > > > > > * Stafford Horne <shorne@gmail.com> [2019-03-17 06:40:18 +0900]: > > > > > >> During building of several cgen simulator's I notices the below > > >> warnings. Adding includes fixes these. > > >> > > >> Including config.h allows stdio.h to properly configure itself to expose > > >> asprintf(). > > > > Stafford, it looks like this breaks AArch64 on both Ubuntu 16.04 and 18.04: > > > > > > libsim.a(interp.o): In function `sim_open': > > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/interp.c:328: undefined reference to `SIM_ASSERT' > > libsim.a(cpustate.o): In function `aarch64_get_vec_u64': > > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:438: undefined reference to `ARRAY_SIZE' > > libsim.a(cpustate.o): In function `aarch64_get_vec_u32': > > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:444: undefined reference to `ARRAY_SIZE' > > libsim.a(cpustate.o): In function `aarch64_get_vec_u16': > > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:450: undefined reference to `ARRAY_SIZE' > > libsim.a(cpustate.o): In function `aarch64_get_vec_u8': > > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:456: undefined reference to `ARRAY_SIZE' > > libsim.a(cpustate.o): In function `aarch64_get_vec_s64': > > /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/Makefile:271: recipe for target 'run' failed > > make[3]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64' > > Makefile:129: recipe for target 'all' failed > > make[2]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim' > > Makefile:8878: recipe for target 'all-sim' failed > > binutils-gdb/sim/aarch64/cpustate.c:462: undefined reference to `ARRAY_SIZE' > > libsim.a(cpustate.o):/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:468: more undefined references to `ARRAY_SIZE' follow > > collect2: error: ld returned 1 exit status > > > > > > I suspect the AArch64 buildbot will be failing once it catches up > > https://gdb-build.sergiodj.net/waterfall?tag=aarch64 > > I pushed the patch below to fix this issue. Thanks for covering on this. I did test on several target but not all. The breaking change was removing (unused) sim-assert.h from sim-arange.h in the previous patch; that also brings in libiberty.h. Sorry for the trouble. -Stafford > Thanks, > Andrew > > -- > > [PATCH] sim: fix aarch64 sim build > > This commit: > > commit ef9866970ce6683d40465fb7c3168f87a1dcd1b7 > Date: Thu Mar 28 06:40:30 2019 +0900 > > sim/common: convert sim-arange to use sim-inline > > Broke the simulator build for aarch64 - some required macros are no > longer included where needed, fixed in this commit. > > sim/aarch64/ChangeLog: > > * cpustate.c: Add 'libiberty.h' include. > * interp.c: Add 'sim-assert.h' include. > --- > sim/aarch64/ChangeLog | 5 +++++ > sim/aarch64/cpustate.c | 1 + > sim/aarch64/interp.c | 1 + > 3 files changed, 7 insertions(+) > > diff --git a/sim/aarch64/cpustate.c b/sim/aarch64/cpustate.c > index 6f5121a76fa..f90b7ad321a 100644 > --- a/sim/aarch64/cpustate.c > +++ b/sim/aarch64/cpustate.c > @@ -25,6 +25,7 @@ > #include "sim-main.h" > #include "cpustate.h" > #include "simulator.h" > +#include "libiberty.h" > > /* Some operands are allowed to access the stack pointer (reg 31). > For others a read from r31 always returns 0, and a write to r31 is ignored. */ > diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c > index c8a3c28c494..c5cfc4a88e4 100644 > --- a/sim/aarch64/interp.c > +++ b/sim/aarch64/interp.c > @@ -38,6 +38,7 @@ > #include "sim-options.h" > #include "memory.h" > #include "simulator.h" > +#include "sim-assert.h" > > /* Filter out (in place) symbols that are useless for disassembly. > COUNT is the number of elements in SYMBOLS. > -- > 2.14.5 > > >
diff --git a/sim/aarch64/cpustate.c b/sim/aarch64/cpustate.c index 6f5121a76fa..f90b7ad321a 100644 --- a/sim/aarch64/cpustate.c +++ b/sim/aarch64/cpustate.c @@ -25,6 +25,7 @@ #include "sim-main.h" #include "cpustate.h" #include "simulator.h" +#include "libiberty.h" /* Some operands are allowed to access the stack pointer (reg 31). For others a read from r31 always returns 0, and a write to r31 is ignored. */ diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c index c8a3c28c494..c5cfc4a88e4 100644 --- a/sim/aarch64/interp.c +++ b/sim/aarch64/interp.c @@ -38,6 +38,7 @@ #include "sim-options.h" #include "memory.h" #include "simulator.h" +#include "sim-assert.h" /* Filter out (in place) symbols that are useless for disassembly. COUNT is the number of elements in SYMBOLS.