Re: [PATCH] Move gdbserver to top level

Hannes Domani via gdb-patches
2020-01-24T14:22:36Z

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(+)

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

--
2.15.1.windows.2