Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Hannes Domani via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v2] Fix install-strip for cross-compilation
Date: Tue, 31 Dec 2019 18:42:00 -0000	[thread overview]
Message-ID: <20191231184222.34267-1-ssbssa@yahoo.de> (raw)
In-Reply-To: <20191231184222.34267-1-ssbssa.ref@yahoo.de>

The variable INSTALL_PROGRAM_ENV sets up STRIPPROG for the cross-compiler.

If this is not done, the host 'strip' is used, and fails:

/bin/sh /c/src/repos/binutils-gdb.git/install-sh -c -s gdb.exe \
  /gdb/gdb64-git/bin/$transformed_name.exe
strip.exe:C:/gdb/gdb64-git/bin/_inst.33599_: file format not recognized

With this change, it's fine:

STRIPPROG='x86_64-w64-mingw32-strip' \
  /bin/sh /c/src/repos/binutils-gdb.git/install-sh -c -s gdb.exe \
  /gdb/gdb64-git/bin/$transformed_name.exe

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

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.
-- 
2.24.1


       reply	other threads:[~2019-12-31 18:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191231184222.34267-1-ssbssa.ref@yahoo.de>
2019-12-31 18:42 ` Hannes Domani via gdb-patches [this message]
2019-12-31 18:50   ` Simon Marchi
2019-12-31 19:05     ` Hannes Domani via gdb-patches
2019-12-31 20:12       ` Simon Marchi
2020-01-01 21:00         ` Hannes Domani via gdb-patches

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=20191231184222.34267-1-ssbssa@yahoo.de \
    --to=gdb-patches@sourceware.org \
    --cc=ssbssa@yahoo.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