qemu-traditional: do not strip binaries during make install
PATCH 1/1 qemu-traditional: do not strip binaries during make install
--- Makefile | 2 +- Makefile.target | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
@@ -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)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)"
Makefile.target +1 -1
@@ -755,7 +755,7 @@ clean: install: all install-hook ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" endif # Include automatically generated dependency files
Quoted 14 lines · Olaf Hering
Makefile +1
-1@@ -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)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)"Makefile.target +0
-0
Makefile.target clean: · line 758
Quoted 5 lines
Makefile.target +1
-1@@ -755,7 +755,7 @@ clean: install: all install-hook ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
Perhaps it would be worthwhile to only do this if debug=y is set, like in commit 8e4610e (which is the equivalent of this patch for qemu-xen)?
- Matthew
Quoted 16 lines · Matthew Daley
Quoted 15 lines · Olaf Hering
Makefile +1
-1@@ -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)" endif ifneq ($(BLOBS),) mkdir -p "$(DESTDIR)$(datadir)"Makefile.target +0
-0@@ -755,7 +755,7 @@ clean:
Quoted 8 lines
Makefile.target clean: · line 758
Quoted 4 lines
Makefile.target +1
-1install: all install-hook ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"Perhaps it would be worthwhile to only do this if debug=y is set, like in commit 8e4610e (which is the equivalent of this patch for qemu-xen)?
I dont think any "make install" has to modify the binaries. If debuginfo was requested by passing "-g" via CFLAGS then the generated debuginfo has to be preserved during make install.
Olaf
Olaf Hering writes ("[PATCH] qemu-traditional: do not strip binaries during make install"):
Makefile endif · line 246
Quoted 10 lines
Makefile +1
-1@@ -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) ?
Thanks,
Ian.
Quoted 13 lines · Ian Jackson
Olaf Hering writes ("[PATCH] qemu-traditional: do not strip binaries during make install"):
Quoted 10 lines
Makefile +1
-1@@ -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)"...
Quoted 5 lines
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.
--- Makefile | 2 +- Makefile.target | 2 +- configure | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
Makefile +1 -1
@@ -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)"
Makefile.target +1 -1
@@ -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
configure +1 -0
@@ -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