|
Glauber Costa |
0b5d26 |
From: Riku Voipio <riku.voipio@iki.fi>
|
|
Glauber Costa |
0b5d26 |
Subject: [Qemu-devel] [PATCH] Make binary stripping conditional
|
|
Glauber Costa |
0b5d26 |
|
|
Glauber Costa |
0b5d26 |
Currently qemu unconditionally strips binaries on install. This
|
|
Glauber Costa |
0b5d26 |
is a problem for packagers who may want to store/ship debug symbols
|
|
Glauber Costa |
0b5d26 |
of compiled packages for debugging purposes.
|
|
Glauber Costa |
0b5d26 |
|
|
Glauber Costa |
0b5d26 |
Keep stripping as default for the oldtimers and add a
|
|
Glauber Costa |
0b5d26 |
--disable-strip flag to override.
|
|
Glauber Costa |
0b5d26 |
|
|
Glauber Costa |
0b5d26 |
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
|
|
Glauber Costa |
0b5d26 |
---
|
|
Glauber Costa |
0b5d26 |
Makefile | 2 +-
|
|
Glauber Costa |
0b5d26 |
Makefile.target | 2 +-
|
|
Glauber Costa |
0b5d26 |
configure | 9 ++++++++-
|
|
Glauber Costa |
0b5d26 |
3 files changed, 10 insertions(+), 3 deletions(-)
|
|
Glauber Costa |
0b5d26 |
|
|
Glauber Costa |
0b5d26 |
Index: qemu-kvm-0.10/qemu/Makefile
|
|
Glauber Costa |
0b5d26 |
===================================================================
|
|
Glauber Costa |
0b5d26 |
--- qemu-kvm-0.10.orig/qemu/Makefile
|
|
Glauber Costa |
0b5d26 |
+++ qemu-kvm-0.10/qemu/Makefile
|
|
Glauber Costa |
0b5d26 |
@@ -256,7 +256,7 @@ endif
|
|
Glauber Costa |
0b5d26 |
install: all $(if $(BUILD_DOCS),install-doc)
|
|
Glauber Costa |
0b5d26 |
mkdir -p "$(DESTDIR)$(bindir)"
|
|
Glauber Costa |
0b5d26 |
ifneq ($(TOOLS),)
|
|
Glauber Costa |
0b5d26 |
- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
|
|
Glauber Costa |
0b5d26 |
+ $(INSTALL) -m 755 $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
|
|
Glauber Costa |
0b5d26 |
endif
|
|
Glauber Costa |
0b5d26 |
ifneq ($(BLOBS),)
|
|
Glauber Costa |
0b5d26 |
mkdir -p "$(DESTDIR)$(datadir)"
|
|
Glauber Costa |
0b5d26 |
Index: qemu-kvm-0.10/qemu/configure
|
|
Glauber Costa |
0b5d26 |
===================================================================
|
|
Glauber Costa |
0b5d26 |
--- qemu-kvm-0.10.orig/qemu/configure
|
|
Glauber Costa |
0b5d26 |
+++ qemu-kvm-0.10/qemu/configure
|
|
Glauber Costa |
0b5d26 |
@@ -154,6 +154,7 @@ case "$cpu" in
|
|
Glauber Costa |
0b5d26 |
esac
|
|
Glauber Costa |
0b5d26 |
gprof="no"
|
|
Glauber Costa |
0b5d26 |
sparse="no"
|
|
Glauber Costa |
0b5d26 |
+strip_opt="yes"
|
|
Glauber Costa |
0b5d26 |
bigendian="no"
|
|
Glauber Costa |
0b5d26 |
mingw32="no"
|
|
Glauber Costa |
0b5d26 |
EXESUF=""
|
|
Glauber Costa |
0b5d26 |
@@ -403,6 +404,8 @@ for opt do
|
|
Glauber Costa |
0b5d26 |
;;
|
|
Glauber Costa |
0b5d26 |
--disable-sparse) sparse="no"
|
|
Glauber Costa |
0b5d26 |
;;
|
|
Glauber Costa |
0b5d26 |
+ --disable-strip) strip_opt="no"
|
|
Glauber Costa |
0b5d26 |
+ ;;
|
|
Glauber Costa |
0b5d26 |
--disable-vnc-tls) vnc_tls="no"
|
|
Glauber Costa |
0b5d26 |
;;
|
|
Glauber Costa |
0b5d26 |
--disable-vnc-sasl) vnc_sasl="no"
|
|
Glauber Costa |
0b5d26 |
@@ -556,6 +559,7 @@ echo " --install=INSTALL use spe
|
|
Glauber Costa |
0b5d26 |
echo " --static enable static build [$static]"
|
|
Glauber Costa |
0b5d26 |
echo " --enable-sparse enable sparse checker"
|
|
Glauber Costa |
0b5d26 |
echo " --disable-sparse disable sparse checker (default)"
|
|
Glauber Costa |
0b5d26 |
+echo " --disable-strip disable stripping binaries"
|
|
Glauber Costa |
0b5d26 |
echo " --disable-werror disable compilation abort on warning"
|
|
Glauber Costa |
0b5d26 |
echo " --disable-sdl disable SDL"
|
|
Glauber Costa |
0b5d26 |
echo " --enable-cocoa enable COCOA (Mac OS X only)"
|
|
Glauber Costa |
0b5d26 |
@@ -1242,6 +1246,7 @@ echo "host big endian $bigendian"
|
|
Glauber Costa |
0b5d26 |
echo "target list $target_list"
|
|
Glauber Costa |
0b5d26 |
echo "gprof enabled $gprof"
|
|
Glauber Costa |
0b5d26 |
echo "sparse enabled $sparse"
|
|
Glauber Costa |
0b5d26 |
+echo "strip binaries $strip_opt"
|
|
Glauber Costa |
0b5d26 |
echo "profiler $profiler"
|
|
Glauber Costa |
0b5d26 |
echo "static build $static"
|
|
Glauber Costa |
0b5d26 |
echo "-Werror enabled $werror"
|
|
Glauber Costa |
0b5d26 |
@@ -1318,7 +1323,6 @@ echo "INSTALL=$install" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
echo "CC=$cc" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
echo "HOST_CC=$host_cc" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
echo "AR=$ar" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
-echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
# XXX: only use CFLAGS and LDFLAGS ?
|
|
Glauber Costa |
0b5d26 |
# XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross
|
|
Glauber Costa |
0b5d26 |
# compilation of dyngen tool (useful for win32 build on Linux host)
|
|
Glauber Costa |
0b5d26 |
@@ -1405,6 +1409,9 @@ if test "$sparse" = "yes" ; then
|
|
Glauber Costa |
0b5d26 |
echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
fi
|
|
Glauber Costa |
0b5d26 |
+if test "$strip_opt" = "yes" ; then
|
|
Glauber Costa |
0b5d26 |
+ echo "STRIP_OPT=-s" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
+fi
|
|
Glauber Costa |
0b5d26 |
if test "$bigendian" = "yes" ; then
|
|
Glauber Costa |
0b5d26 |
echo "WORDS_BIGENDIAN=yes" >> $config_mak
|
|
Glauber Costa |
0b5d26 |
echo "#define WORDS_BIGENDIAN 1" >> $config_h
|