Fix install-strip for cross-compilation
authorHannes Domani <ssbssa@yahoo.de>
Mon, 30 Dec 2019 16:01:02 +0000 (17:01 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Wed, 1 Jan 2020 20:51:33 +0000 (21:51 +0100)
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:

2020-01-01  Hannes Domani  <ssbssa@yahoo.de>

* Makefile.in: Use INSTALL_PROGRAM_ENV.

gdb/gdbserver/ChangeLog:

2020-01-01  Hannes Domani  <ssbssa@yahoo.de>

* Makefile.in: Use INSTALL_PROGRAM_ENV.

gdb/ChangeLog
gdb/Makefile.in
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in

index 11e828a4ac831ad3939bb420f81433cde61f4d12..5edb1c4dc38d57b43b4ffa9ad6dfceb6eb67993f 100644 (file)
@@ -1,3 +1,7 @@
+2020-01-01  Hannes Domani  <ssbssa@yahoo.de>
+
+       * Makefile.in: Use INSTALL_PROGRAM_ENV.
+
 2020-01-01  Hannes Domani  <ssbssa@yahoo.de>
 
        * MAINTAINERS (Write After Approval): Add myself.
index e9a747875431f494f2164bdb73ed2391842d6efe..448a495bb3b898168ae2c6520b70bdb101e163a2 100644 (file)
@@ -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) ; \
index 12a7f0068fcfc145a4e17961f61490e77f82526a..4d16083c380bc1759477062ba22879c3ccab2685 100644 (file)
@@ -1,3 +1,7 @@
+2020-01-01  Hannes Domani  <ssbssa@yahoo.de>
+
+       * Makefile.in: Use INSTALL_PROGRAM_ENV.
+
 2020-01-01  Joel Brobecker  <brobecker@adacore.com>
 
        * server.c (gdbserver_version): Change copyright year to 2020.
index 7d7d38ad9594a4b25476aae67303e31e69d20f9e..d39c065f6d00b40866504516fa46dd35c76a25a1 100644 (file)
@@ -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.