From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/2] gdb, gdbserver: prefer the source md5sum from the toolchain
Date: Thu, 8 Nov 2018 16:04:04 +0100 [thread overview]
Message-ID: <20181108150404.le6kfet2qrhmsu66@pengutronix.de> (raw)
In-Reply-To: <20181108121342.18511-2-r.hieber@pengutronix.de>
On Thu, Nov 08, 2018 at 01:13:42PM +0100, Roland Hieber wrote:
> If the md5sum can be autodetected from the toolchain, we should use the
> value from the toolchain and ignore the value specified in the menu.
> This eases migration for BSPs that previously specified it in the menu
> and didn't clear it when enabling GDB_TOOLCHAIN_VERSION (which defaults
> to 'y' if GDBSERVER is used).
>
> Some older OSELAS toolchains (and also non-OSELAS toolchains) don't set
> PTXCONF_CROSS_GDB_MD5 in their ptxconfig (or they simply don't have a
> ptxconfig). In those cases, the md5sum must be specified in the menu.
I used the current order deliberately: It allows overwriting the md5sum if
necessary.
Michael
> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
> ---
> rules/gdb-menu.in | 12 ++++++++----
> rules/pre/gdb.make | 5 +++--
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/rules/gdb-menu.in b/rules/gdb-menu.in
> index d8be3fef8..af69aca56 100644
> --- a/rules/gdb-menu.in
> +++ b/rules/gdb-menu.in
> @@ -22,16 +22,20 @@ config GDB_VERSION
> endif
>
> config GDB_MD5
> string "gdb source md5sum"
> default "d42841167fd061d90fddf9a7212a1f9f" if !GDB_TOOLCHAIN_VERSION
> help
> - md5sum for the gdb source archive. If the version is provided by
> - the toolchain and the toolchain is a OSELAS.Toolchain then this
> - can be left empty and the md5sum from the toolchain ptxconfig is
> - used.
> + md5sum for the gdb source archive.
> +
> + If the version is provided by the toolchain and its md5sum can be
> + autodetected (e.g. with newer OSELAS.Toolchains), then the md5sum
> + from the toolchain is used instead and the value specified here is
> + ignored.
> +
> + Otherwise, specify the md5sum of the tar.xz archive.
>
> endif
>
> source "generated/debug_tools_gdb.in"
>
> endmenu
> diff --git a/rules/pre/gdb.make b/rules/pre/gdb.make
> index 31b1975d6..11f48381d 100644
> --- a/rules/pre/gdb.make
> +++ b/rules/pre/gdb.make
> @@ -11,14 +11,15 @@
> SHARED_GDB_MD5 := $(call remove_quotes,$(PTXCONF_GDB_MD5))
>
> ifdef PTXCONF_GDB_TOOLCHAIN_VERSION
> TOOLCHAIN_CONFIG := $(PTXDIST_PLATFORMDIR)/selected_toolchain/ptxconfig
> ifneq ($(wildcard $(TOOLCHAIN_CONFIG)),)
> SHARED_GDB_VERSION := $(call remove_quotes,$(shell ptxd_get_kconfig $(TOOLCHAIN_CONFIG) PTXCONF_CROSS_GDB_VERSION))
> -ifeq ($(SHARED_GDB_MD5),)
> -SHARED_GDB_MD5 := $(call remove_quotes,$(shell ptxd_get_kconfig $(TOOLCHAIN_CONFIG) PTXCONF_CROSS_GDB_MD5))
> +TOOLCHAIN_GDB_MD5 := $(call remove_quotes,$(shell ptxd_get_kconfig $(TOOLCHAIN_CONFIG) PTXCONF_CROSS_GDB_MD5))
> +ifneq ($(TOOLCHAIN_GDB_MD5),)
> +SHARED_GDB_MD5 := $(TOOLCHAIN_GDB_MD5)
> endif
> else
> SHARED_GDB_VERSION := $(shell $(PTXCONF_COMPILER_PREFIX)gdb -v | sed -e 's/.* //;q')
> endif
> else
> SHARED_GDB_VERSION := $(call remove_quotes,$(PTXCONF_GDB_VERSION))
> --
> 2.19.1
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-11-08 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 12:13 [ptxdist] [PATCH 1/2] gdb-menu: fix indentation Roland Hieber
2018-11-08 12:13 ` [ptxdist] [PATCH 2/2] gdb, gdbserver: prefer the source md5sum from the toolchain Roland Hieber
2018-11-08 15:04 ` Michael Olbrich [this message]
2018-11-09 14:05 ` Roland Hieber
2018-11-09 14:09 ` Roland Hieber
2018-11-12 11:47 ` Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181108150404.le6kfet2qrhmsu66@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox