diff mbox

Move gdbserver to top level

Message ID 334218650.28135138.1579875742146@mail.yahoo.com
State New
Headers show

Commit Message

Doug Evans via gdb-patches Jan. 24, 2020, 2:22 p.m. UTC
Am Donnerstag, 23. Januar 2020, 22:55:20 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:

> I think I will wait a little while longer before pushing.

make install-strip doesn't work in gdbserver (it worked before indirectly
when called from within gdb).

I made it work again with these changes:

From a3cc5583ca738daa3fdb5805d0c7ab0734d28f41 Mon Sep 17 00:00:00 2001
From: Hannes Domani <ssbssa@yahoo.de>
Date: Fri, 24 Jan 2020 15:03:14 +0100
Subject: [PATCH] gdbserver install-strip

---
 gdbserver/Makefile.in  | 10 ++++++++++
 gdbserver/configure.ac |  1 +
 2 files changed, 11 insertions(+)

--
2.15.1.windows.2

Comments

Tom Tromey Jan. 24, 2020, 3:06 p.m. UTC | #1
>>>>> "Hannes" == Hannes Domani via gdb-patches <gdb-patches@sourceware.org> writes:

Hannes> Am Donnerstag, 23. Januar 2020, 22:55:20 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
>> I think I will wait a little while longer before pushing.

Hannes> make install-strip doesn't work in gdbserver (it worked before indirectly
Hannes> when called from within gdb).

Thanks.  I'll pull this in.

Maybe when the move is complete, and when gdbserver is not building its
own copies of the libraries, I'll switch gdbserver to use Automake.
This would provide a lot of these things for free.

Tom
Tom Tromey Jan. 24, 2020, 3:49 p.m. UTC | #2
Hannes> make install-strip doesn't work in gdbserver (it worked before indirectly
Hannes> when called from within gdb).

Tom> Thanks.  I'll pull this in.

Actually, it seems like this could go in now.
Would you mind arranging that?

Tom
Doug Evans via gdb-patches Jan. 24, 2020, 3:57 p.m. UTC | #3
Am Freitag, 24. Januar 2020, 16:49:26 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:

> Hannes> make install-strip doesn't work in gdbserver (it worked before indirectly
> Hannes> when called from within gdb).
>
> Tom> Thanks.  I'll pull this in.
>
> Actually, it seems like this could go in now.
> Would you mind arranging that?

I'm not sure what you mean.

Pushing your patch?
Tom Tromey Jan. 24, 2020, 4:24 p.m. UTC | #4
>>>>> "Hannes" == Hannes Domani via gdb-patches <gdb-patches@sourceware.org> writes:

Hannes> Am Freitag, 24. Januar 2020, 16:49:26 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
Hannes> make install-strip doesn't work in gdbserver (it worked before indirectly
Hannes> when called from within gdb).
>> 
Tom> Thanks.  I'll pull this in.
>> 
>> Actually, it seems like this could go in now.
>> Would you mind arranging that?

Hannes> I'm not sure what you mean.

Hannes> Pushing your patch?

Applying your "make install-strip" gdbserver to trunk.

Tom
Doug Evans via gdb-patches Jan. 24, 2020, 4:28 p.m. UTC | #5
Am Freitag, 24. Januar 2020, 17:24:34 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:

> >>>>> "Hannes" == Hannes Domani via gdb-patches <gdb-patches@sourceware.org> writes:
>
> Hannes> Am Freitag, 24. Januar 2020, 16:49:26 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
> Hannes> make install-strip doesn't work in gdbserver (it worked before indirectly
> Hannes> when called from within gdb).
> >>
> Tom> Thanks.  I'll pull this in.
> >>
> >> Actually, it seems like this could go in now.
> >> Would you mind arranging that?
>
> Hannes> I'm not sure what you mean.
>
> Hannes> Pushing your patch?
>
> Applying your "make install-strip" gdbserver to trunk.

Oooh, yes, that makes a lot more sense.

Ok, I will do that.


Regards
Hannes Domani
Doug Evans via gdb-patches Jan. 24, 2020, 6:25 p.m. UTC | #6
Am Freitag, 24. Januar 2020, 17:28:57 MEZ hat Hannes Domani via gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:

> Am Freitag, 24. Januar 2020, 17:24:34 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
>
> > >>>>> "Hannes" == Hannes Domani via gdb-patches <gdb-patches@sourceware.org> writes:
> >
> > Hannes> Am Freitag, 24. Januar 2020, 16:49:26 MEZ hat Tom Tromey <tom@tromey.com> Folgendes geschrieben:
> > Hannes> make install-strip doesn't work in gdbserver (it worked before indirectly
> > Hannes> when called from within gdb).
> > >>
> > Tom> Thanks.  I'll pull this in.
> > >>
> > >> Actually, it seems like this could go in now.
> > >> Would you mind arranging that?
> >
> > Hannes> I'm not sure what you mean.
> >
> > Hannes> Pushing your patch?
> >
> > Applying your "make install-strip" gdbserver to trunk.
>
> Oooh, yes, that makes a lot more sense.
>
> Ok, I will do that.

I've pushed this now.


Regards
Hannes Domani
diff mbox

Patch

diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index 902d54cfe5..4f9196227c 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -45,11 +45,14 @@  htmldir = $(prefix)/html
 includedir = @includedir@
 CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
 
+install_sh = @install_sh@
+
 SHELL = @SHELL@
 EXEEXT = @EXEEXT@
 
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 RANLIB = @RANLIB@
 
@@ -58,6 +61,7 @@  CXX = @CXX@
 CXX_DIALECT = @CXX_DIALECT@
 AR = @AR@
 AR_FLAGS = rc
+STRIP = @STRIP@
 
 # Dependency tracking information.
 DEPMODE = @CCDEPMODE@
@@ -394,6 +398,12 @@  install-only:
     # in libiberty.
     @$(MAKE) $(FLAGS_TO_PASS) DO=install "DODIRS=$(SUBDIRS)" subdir_do
 
+install-strip:
+    $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+      install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+      `test -z '$(STRIP)' || \
+        echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
+
 uninstall: force
     n=`echo gdbserver | sed '$(program_transform_name)'`; \
     if [ x$$n = x ]; then n=gdbserver; else true; fi; \
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 24b832b90e..b7ed8050fc 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -27,6 +27,7 @@  AC_PROG_CC
 AC_PROG_CXX
 AC_GNU_SOURCE
 AC_SYS_LARGEFILE
+AM_PROG_INSTALL_STRIP
 
 AC_CANONICAL_SYSTEM