qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Make binary stripping conditional
@ 2009-03-26 22:44 Riku Voipio
  2009-03-28 15:09 ` Glauber Costa
  2009-04-05 17:42 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Riku Voipio @ 2009-03-26 22:44 UTC (permalink / raw)
  To: qemu-devel

Currently qemu unconditionally strips binaries on install. This
is a problem for packagers who may want to store/ship debug symbols
of compiled packages for debugging purposes.

Keep stripping as default for the oldtimers and add a
--disable-strip flag to override.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 Makefile        |    2 +-
 Makefile.target |    2 +-
 configure       |    9 ++++++++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 82fec80..8389b95 100644
--- a/Makefile
+++ b/Makefile
@@ -251,7 +251,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 $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
 endif
 ifneq ($(BLOBS),)
 	mkdir -p "$(DESTDIR)$(datadir)"
diff --git a/Makefile.target b/Makefile.target
index 41366ee..b82de5f 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -750,7 +750,7 @@ clean:
 
 install: all
 ifneq ($(PROGS),)
-	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
+	$(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
 endif
 
 # Include automatically generated dependency files
diff --git a/configure b/configure
index 5c62c59..d2730d6 100755
--- a/configure
+++ b/configure
@@ -154,6 +154,7 @@ case "$cpu" in
 esac
 gprof="no"
 sparse="no"
+strip_opt="yes"
 bigendian="no"
 mingw32="no"
 EXESUF=""
@@ -396,6 +397,8 @@ for opt do
   ;;
   --disable-sparse) sparse="no"
   ;;
+  --disable-strip) strip_opt="no"
+  ;;
   --disable-vnc-tls) vnc_tls="no"
   ;;
   --disable-vnc-sasl) vnc_sasl="no"
@@ -547,6 +550,7 @@ echo "  --install=INSTALL        use specified install [$install]"
 echo "  --static                 enable static build [$static]"
 echo "  --enable-sparse          enable sparse checker"
 echo "  --disable-sparse         disable sparse checker (default)"
+echo "  --disable-strip          disable stripping binaries"
 echo "  --disable-werror         disable compilation abort on warning"
 echo "  --disable-sdl            disable SDL"
 echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
@@ -1168,6 +1172,7 @@ echo "host big endian   $bigendian"
 echo "target list       $target_list"
 echo "gprof enabled     $gprof"
 echo "sparse enabled    $sparse"
+echo "strip binaries    $strip_opt"
 echo "profiler          $profiler"
 echo "static build      $static"
 echo "-Werror enabled   $werror"
@@ -1242,7 +1247,6 @@ echo "INSTALL=$install" >> $config_mak
 echo "CC=$cc" >> $config_mak
 echo "HOST_CC=$host_cc" >> $config_mak
 echo "AR=$ar" >> $config_mak
-echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
 # XXX: only use CFLAGS and LDFLAGS ?  
 # XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross
 # compilation of dyngen tool (useful for win32 build on Linux host)
@@ -1329,6 +1333,9 @@ if test "$sparse" = "yes" ; then
   echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc"  >> $config_mak
   echo "CFLAGS  += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_mak
 fi
+if test "$strip_opt" = "yes" ; then
+  echo "STRIP_OPT=-s" >> $config_mak
+fi
 if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> $config_mak
   echo "#define WORDS_BIGENDIAN 1" >> $config_h
-- 
1.6.1.3


-- 
"rm -rf" only sounds scary if you don't have backups

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Make binary stripping conditional
  2009-03-26 22:44 [Qemu-devel] [PATCH] Make binary stripping conditional Riku Voipio
@ 2009-03-28 15:09 ` Glauber Costa
  2009-04-05 17:42 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Glauber Costa @ 2009-03-28 15:09 UTC (permalink / raw)
  To: qemu-devel

On Thu, Mar 26, 2009 at 7:44 PM, Riku Voipio <riku.voipio@iki.fi> wrote:
> Currently qemu unconditionally strips binaries on install. This
> is a problem for packagers who may want to store/ship debug symbols
> of compiled packages for debugging purposes.
>
> Keep stripping as default for the oldtimers and add a
> --disable-strip flag to override.
I'm fine with this approach too, wfm.

Are we planning to apply this one?


-- 
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Make binary stripping conditional
  2009-03-26 22:44 [Qemu-devel] [PATCH] Make binary stripping conditional Riku Voipio
  2009-03-28 15:09 ` Glauber Costa
@ 2009-04-05 17:42 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2009-04-05 17:42 UTC (permalink / raw)
  To: qemu-devel

Riku Voipio wrote:
> Currently qemu unconditionally strips binaries on install. This
> is a problem for packagers who may want to store/ship debug symbols
> of compiled packages for debugging purposes.
>
> Keep stripping as default for the oldtimers and add a
> --disable-strip flag to override.
>
> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
>   

Applied.  Thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-05 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 22:44 [Qemu-devel] [PATCH] Make binary stripping conditional Riku Voipio
2009-03-28 15:09 ` Glauber Costa
2009-04-05 17:42 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).