Fix install-strip target
authorHannes Domani <ssbssa@yahoo.de>
Mon, 19 Dec 2022 16:29:27 +0000 (17:29 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Tue, 20 Dec 2022 19:38:20 +0000 (20:38 +0100)
The libtool patch broke install-strip of gdb:

/bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/share/gdb/python/gdb
transformed_name=`t='s,y,y,'; \
                  echo gdb | sed -e "$t"` ; \
        if test "x$transformed_name" = x; then \
          transformed_name=gdb ; \
        else \
          true ; \
        fi ; \
        /bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/bin ; \
        /bin/sh ./libtool --mode=install STRIPPROG='strip' /bin/sh /src/gdb/gdb.git/install-sh -c -s \
                gdb \
                /src/gdb/inst/bin/$transformed_name ; \
        /bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/include/gdb ; \
        /usr/bin/install -c -m 644 jit-reader.h /src/gdb/inst/include/gdb/jit-reader.h
libtool: install: `/src/gdb/inst/bin/gdb' is not a directory
libtool: install: Try `libtool --help --mode=install' for more information.

Since INSTALL_PROGRAM_ENV is no longer at the beginning of the command, the
gdb executable is not installed with install-strip.

gdb/Makefile.in

index fb4d42c7baadd7d9dd9893876176d53063bf031a..192f8086aec5a4640ccd2a14ad0c15958412d757 100644 (file)
@@ -2020,7 +2020,7 @@ install-only: $(CONFIG_INSTALL)
                  true ; \
                fi ; \
                $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
-               $(LIBTOOL) --mode=install $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \
+               $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) \
                        gdb$(EXEEXT) \
                        $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
                $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
@@ -2533,7 +2533,7 @@ install-gdbtk:
          true ; \
        fi ; \
        $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
-       $(LIBTOOL) --mode=install $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) \
+       $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) \
                insight$(EXEEXT) \
                $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
        $(SHELL) $(srcdir)/../mkinstalldirs \