From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] qemu-traditional: do not strip binaries during make install Date: Mon, 14 Oct 2013 17:29:47 +0200 Message-ID: <20131014152947.GA11061@aepfle.de> References: <1379527888-5651-1-git-send-email-olaf@aepfle.de> <21078.57752.766658.107153@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <21078.57752.766658.107153@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Oct 10, Ian Jackson wrote: > Olaf Hering writes ("[PATCH] qemu-traditional: do not strip binaries during make install"): > > diff --git a/Makefile b/Makefile > > index 37c7066..594f0ef 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -243,7 +243,7 @@ endif > > install: all $(if $(BUILD_DOCS),install-doc) > > mkdir -p "$(DESTDIR)$(bindir)" > > ifneq ($(TOOLS),) > > - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" > > + $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" > ... > > I agree that the existing code is wrong but I worry that we are > replacing "cannot get it not to strip" with "cannot get it to strip". > > Can you also replace the relevant $(INSTALL) with $(INSTALL_PROGRAM) > (defined appropriately if necessary) ? I will test this patch: It is wrong to strip code during make install, unless explicit requested. Introduce a new variable INSTALL_PROG and use it along with an optional STRIP_OPT where currently install -s -m 755 is used. This is what upstream qemu offers in version 1.6. Signed-off-by: Olaf Hering --- Makefile | 2 +- Makefile.target | 2 +- configure | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 37c7066..ed9b28a 100644 --- a/Makefile +++ b/Makefile @@ -243,7 +243,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" + $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)" diff --git a/Makefile.target b/Makefile.target index 19bb0fd..3c3db2b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -755,7 +755,7 @@ clean: install: all install-hook ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" + $(INSTALL_PROG) $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)" endif # Include automatically generated dependency files diff --git a/configure b/configure index ace3c3e..4547359 100755 --- a/configure +++ b/configure @@ -1215,6 +1215,7 @@ echo "docdir=\${prefix}$docsuffix" >> $config_mak echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h echo "MAKE=$make" >> $config_mak echo "INSTALL=$install" >> $config_mak +echo "INSTALL_PROG=$install -m 0755" >> $config_mak echo "CC=$cc" >> $config_mak echo "HOST_CC=$host_cc" >> $config_mak echo "AR=$ar" >> $config_mak