Message ID | 20190123172954.24421-2-tom@tromey.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 18009 invoked by alias); 23 Jan 2019 17:30:01 -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 17475 invoked by uid 89); 23 Jan 2019 17:30:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1073, Hx-spam-relays-external:sk:cm13.we, H*RU:sk:cm13.we, Hx-spam-relays-external:100.42.49.6 X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.50.71) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Jan 2019 17:29:58 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 2897026D0 for <gdb-patches@sourceware.org>; Wed, 23 Jan 2019 11:29:57 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id mMLdg8jAFYTGMmMLdgrDjO; Wed, 23 Jan 2019 11:29:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rN6Ew/+rPsWEEEWek6etYEnp1YV0GNJljzAohDAJCXw=; b=Fp8VdW9jbzqIYDbHOJdClEITbz SVx9ITLn3S2QG8JtbhGjvn+zUu0Vf+lfA7l1MD9aH+Gu3p2Fq3CN2hBtcXstHSRbI91DRV9yV7mZt 0nOHMSkV3658+bRynR2c6qhs2; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:37850 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from <tom@tromey.com>) id 1gmMLc-001oW4-Sx; Wed, 23 Jan 2019 11:29:56 -0600 From: Tom Tromey <tom@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey <tom@tromey.com> Subject: [PATCH 1/3] Update create-version.sh to use common/version.h Date: Wed, 23 Jan 2019 10:29:52 -0700 Message-Id: <20190123172954.24421-2-tom@tromey.com> In-Reply-To: <20190123172954.24421-1-tom@tromey.com> References: <20190123172954.24421-1-tom@tromey.com> |
Commit Message
Tom Tromey
Jan. 23, 2019, 5:29 p.m. UTC
This changes create-version.sh to have the generated file use common/version.h as the file name. 2019-01-23 Tom Tromey <tom@tromey.com> * common/create-version.sh: Use common/version.h. --- gdb/ChangeLog | 4 ++++ gdb/common/create-version.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
Comments
On 2019-01-23 12:29, Tom Tromey wrote: > This changes create-version.sh to have the generated file use > common/version.h as the file name. > > 2019-01-23 Tom Tromey <tom@tromey.com> > > * common/create-version.sh: Use common/version.h. > --- > gdb/ChangeLog | 4 ++++ > gdb/common/create-version.sh | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gdb/common/create-version.sh > b/gdb/common/create-version.sh > index 51cffe8db5..6e67a61357 100755 > --- a/gdb/common/create-version.sh > +++ b/gdb/common/create-version.sh > @@ -30,7 +30,7 @@ output="$4" > rm -f version.c-tmp $output version.tmp > date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' > $srcdir/../bfd/version.h` > sed -e "s/DATE/$date/" < $srcdir/version.in > version.tmp > -echo '#include "version.h"' >> version.c-tmp > +echo '#include "common/version.h"' >> version.c-tmp > echo 'const char version[] = "'"`sed q version.tmp`"'";' >> > version.c-tmp > echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp > echo 'const char target_name[] = "'"$target_alias"'";' >> > version.c-tmp Hi Tom, Somebody reported this compilation error when building the simulator with an aarch64 target (sorry about the formatting, I'm on web client): ccache /opt/gcc/8.2/bin/gcc -DHAVE_CONFIG_H -DWITH_DEFAULT_ALIGNMENT=NONSTRICT_ALIGNMENT -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -I. -I../../../binutils-gdb/sim/aarch64 -I../common -I../../../binutils-gdb/sim/aarch64/../common -I../../include -I../../../binutils-gdb/sim/aarch64/../../include -I../../bfd -I../../../binutils-gdb/sim/aarch64/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/aarch64/../../opcodes -g3 -O0 -fsanitize=address -c -o version.o -MT version.o -MMD -MP -MF .deps/version.Tpo version.c version.c:1:10: fatal error: common/version.h: No such file or directory #include "common/version.h" ^~~~~~~~~~~~~~~~~~ You can probably reproduce it with --enable-sim --target=aarch64-linux-gnu. Simon
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Simon> An easy way to fix this would be to add -I$(srcsim) to the include
Simon> paths in sim/common/Make-common.in. We could actually think of giving
Simon> the same treatment of removing -I../common and -I$(srccom) to sim than
Simon> what you did to GDB.
I don't really know much about the sim, so I don't really have an
opinion on whether that makes sense there.
For the immediate problem, I think it's usually not good to have these
hidden cross-directory dependencies. This one seems particularly bad
because it's somewhat uncommon to even build the sim.
How about just copying create-version.sh to sim/common and having it use
the old #include "version.h"? Then the two scripts can evolve in their
own ways as needed, without worrying.
Tom
diff --git a/gdb/common/create-version.sh b/gdb/common/create-version.sh index 51cffe8db5..6e67a61357 100755 --- a/gdb/common/create-version.sh +++ b/gdb/common/create-version.sh @@ -30,7 +30,7 @@ output="$4" rm -f version.c-tmp $output version.tmp date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h` sed -e "s/DATE/$date/" < $srcdir/version.in > version.tmp -echo '#include "version.h"' >> version.c-tmp +echo '#include "common/version.h"' >> version.c-tmp echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp