diff mbox

Fix install-strip for cross-compilation

Message ID 20191230160741.11666-1-ssbssa@yahoo.de
State New
Headers show

Commit Message

Doug Evans via gdb-patches Dec. 30, 2019, 4:07 p.m. UTC
The variable INSTALL_PROGRAM_ENV sets up STRIPPROG for the cross-compiler.

gdb/ChangeLog:

2019-12-30  Hannes Domani  <ssbssa@yahoo.de>

	* Makefile.in: Use INSTALL_PROGRAM_ENV.

gdb/gdbserver/ChangeLog:

2019-12-30  Hannes Domani  <ssbssa@yahoo.de>

	* Makefile.in: Use INSTALL_PROGRAM_ENV.
---
 gdb/Makefile.in           | 4 ++--
 gdb/gdbserver/Makefile.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Simon Marchi Dec. 31, 2019, 6:09 p.m. UTC | #1
On 2019-12-30 11:07 a.m., Hannes Domani via gdb-patches wrote:
> The variable INSTALL_PROGRAM_ENV sets up STRIPPROG for the cross-compiler.

Hi Hannes,

Thanks for the patch.  Could you please add a bit more context to the commit
message, in particular what is the wrong behavior that you observe and needs
fixing?  What difference does it do with the patch applied?

I'm guessing that the problem is that the host `strip` is used instead of the
target-specific `strip`, but it would be good if that was spelled out in the
commit message.

Simon
diff mbox

Patch

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index fa5c820b91..4a7ff6a454 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1779,7 +1779,7 @@  install-only: $(CONFIG_INSTALL)
 		  true ; \
 		fi ; \
 		$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
-		$(INSTALL_PROGRAM) gdb$(EXEEXT) \
+		$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdb$(EXEEXT) \
 			$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
 		$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
 		$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
@@ -2517,7 +2517,7 @@  install-gdbtk:
 	  true ; \
 	fi ; \
 	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
-	$(INSTALL_PROGRAM) insight$(EXEEXT) \
+	$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) insight$(EXEEXT) \
 		$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
 	$(SHELL) $(srcdir)/../mkinstalldirs \
 		$(DESTDIR)$(GDBTK_LIBRARY) ; \
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 9e8c213472..bcbcf94c51 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -381,10 +381,10 @@  install-only:
 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
 	if [ x"$(IPA_DEPFILES)" != x ]; then \
 		$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir); \
-		$(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
+		$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \
 	fi; \
 	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
-	$(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+	$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
 	# Note that we run install and not install-only, as the latter
 	# is not part of GNU standards and in particular not provided
 	# in libiberty.