From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LqWLA-0002lb-SB for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:41:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LqWLA-0002kr-4N for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:41:04 -0400 Received: from [199.232.76.173] (port=34528 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqWLA-0002kh-07 for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:41:04 -0400 Received: from savannah.gnu.org ([199.232.41.3]:40641 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LqWL9-00049N-LI for qemu-devel@nongnu.org; Sun, 05 Apr 2009 13:41:03 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LqWL9-0006Bj-6X for qemu-devel@nongnu.org; Sun, 05 Apr 2009 17:41:03 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LqWL9-0006Bd-0G for qemu-devel@nongnu.org; Sun, 05 Apr 2009 17:41:03 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Sun, 05 Apr 2009 17:41:03 +0000 Subject: [Qemu-devel] [6983] Make binary stripping conditional (Riku Voipio) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6983 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6983 Author: aliguori Date: 2009-04-05 17:41:02 +0000 (Sun, 05 Apr 2009) Log Message: ----------- Make binary stripping conditional (Riku Voipio) 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/Makefile trunk/Makefile.target trunk/configure Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2009-04-05 17:40:58 UTC (rev 6982) +++ trunk/Makefile 2009-04-05 17:41:02 UTC (rev 6983) @@ -251,7 +251,7 @@ 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)" Modified: trunk/Makefile.target =================================================================== --- trunk/Makefile.target 2009-04-05 17:40:58 UTC (rev 6982) +++ trunk/Makefile.target 2009-04-05 17:41:02 UTC (rev 6983) @@ -749,7 +749,7 @@ 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 Modified: trunk/configure =================================================================== --- trunk/configure 2009-04-05 17:40:58 UTC (rev 6982) +++ trunk/configure 2009-04-05 17:41:02 UTC (rev 6983) @@ -154,6 +154,7 @@ esac gprof="no" sparse="no" +strip_opt="yes" bigendian="no" mingw32="no" EXESUF="" @@ -396,6 +397,8 @@ ;; --disable-sparse) sparse="no" ;; + --disable-strip) strip_opt="no" + ;; --disable-vnc-tls) vnc_tls="no" ;; --disable-vnc-sasl) vnc_sasl="no" @@ -556,6 +559,7 @@ 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)" @@ -1177,6 +1181,7 @@ 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" @@ -1251,7 +1256,6 @@ 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) @@ -1338,6 +1342,9 @@ 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