Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen
@ 2018-04-10 19:37 Jonas Zaddach
  2018-04-18 22:40 ` Arnout Vandecappelle
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jonas Zaddach @ 2018-04-10 19:37 UTC (permalink / raw)
  To: buildroot

If one wants to use GDB with python support on the target, you need the support
files installed by GDB. These get usually deleted to save some space, so I just
wrapped the Makefile code deleting them in a conditional block depending on if
python support is active or not.

Signed-off-by: Jonas Zaddach <jzaddach@cisco.com>
---
 package/gdb/gdb.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 7e86ba0..5c915da 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -164,11 +164,13 @@ endif
 
 # This removes some unneeded Python scripts and XML target description
 # files that are not useful for a normal usage of the debugger.
+ifneq ($(BR2_PACKAGE_GDB_PYTHON),y)
 define GDB_REMOVE_UNNEEDED_FILES
 	$(RM) -rf $(TARGET_DIR)/usr/share/gdb
 endef
 
 GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES
+endif
 
 # This installs the gdbserver somewhere into the $(HOST_DIR) so that
 # it becomes an integral part of the SDK, if the toolchain generated
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen
  2018-04-10 19:37 [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen Jonas Zaddach
@ 2018-04-18 22:40 ` Arnout Vandecappelle
  2018-04-27 21:11 ` Thomas Petazzoni
  2018-05-01  7:30 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2018-04-18 22:40 UTC (permalink / raw)
  To: buildroot



On 10-04-18 21:37, Jonas Zaddach wrote:
> If one wants to use GDB with python support on the target, you need the support
> files installed by GDB. These get usually deleted to save some space, so I just
> wrapped the Makefile code deleting them in a conditional block depending on if
> python support is active or not.
> 
> Signed-off-by: Jonas Zaddach <jzaddach@cisco.com>
> ---
>  package/gdb/gdb.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
> index 7e86ba0..5c915da 100644
> --- a/package/gdb/gdb.mk
> +++ b/package/gdb/gdb.mk
> @@ -164,11 +164,13 @@ endif
>  
>  # This removes some unneeded Python scripts and XML target description
>  # files that are not useful for a normal usage of the debugger.

 Are the XML files also needed, or only the .py files?

 It's especially surprising that you'd need those syscalls files for different
architectures than the target...

 But anyway, it's just about 200K.

 One small nit: I'd leave the comment within the condition. Otherwise:

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> +ifneq ($(BR2_PACKAGE_GDB_PYTHON),y)
>  define GDB_REMOVE_UNNEEDED_FILES
>  	$(RM) -rf $(TARGET_DIR)/usr/share/gdb
>  endef
>  
>  GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES
> +endif
>  
>  # This installs the gdbserver somewhere into the $(HOST_DIR) so that
>  # it becomes an integral part of the SDK, if the toolchain generated
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen
  2018-04-10 19:37 [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen Jonas Zaddach
  2018-04-18 22:40 ` Arnout Vandecappelle
@ 2018-04-27 21:11 ` Thomas Petazzoni
  2018-05-01  7:30 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-04-27 21:11 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 10 Apr 2018 12:37:22 -0700, Jonas Zaddach wrote:
> If one wants to use GDB with python support on the target, you need the support
> files installed by GDB. These get usually deleted to save some space, so I just
> wrapped the Makefile code deleting them in a conditional block depending on if
> python support is active or not.
> 
> Signed-off-by: Jonas Zaddach <jzaddach@cisco.com>
> ---
>  package/gdb/gdb.mk | 2 ++
>  1 file changed, 2 insertions(+)

Applied to master after doing the following changes:

    [Thomas:
     - use positive logic "if python is disabled"
     - put the comment inside the condition, as suggested by Arnout]

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen
  2018-04-10 19:37 [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen Jonas Zaddach
  2018-04-18 22:40 ` Arnout Vandecappelle
  2018-04-27 21:11 ` Thomas Petazzoni
@ 2018-05-01  7:30 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-05-01  7:30 UTC (permalink / raw)
  To: buildroot

>>>>> "Jonas" == Jonas Zaddach <jzaddach@sourcefire.com> writes:

 > If one wants to use GDB with python support on the target, you need the support
 > files installed by GDB. These get usually deleted to save some space, so I just
 > wrapped the Makefile code deleting them in a conditional block depending on if
 > python support is active or not.

 > Signed-off-by: Jonas Zaddach <jzaddach@cisco.com>

Committed to 2018.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-01  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10 19:37 [Buildroot] [PATCH 1/1] package/gdb: don't remove support files if python chosen Jonas Zaddach
2018-04-18 22:40 ` Arnout Vandecappelle
2018-04-27 21:11 ` Thomas Petazzoni
2018-05-01  7:30 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox