Commit 1625af873aa8c9e4d22ad50a08e877110bf40623
1 parent
2d2431f0
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 <riku.voipio@iki.fi> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6983 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
10 additions
and
3 deletions
Makefile
| @@ -251,7 +251,7 @@ endif | @@ -251,7 +251,7 @@ endif | ||
| 251 | install: all $(if $(BUILD_DOCS),install-doc) | 251 | install: all $(if $(BUILD_DOCS),install-doc) |
| 252 | mkdir -p "$(DESTDIR)$(bindir)" | 252 | mkdir -p "$(DESTDIR)$(bindir)" |
| 253 | ifneq ($(TOOLS),) | 253 | ifneq ($(TOOLS),) |
| 254 | - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" | 254 | + $(INSTALL) -m 755 $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" |
| 255 | endif | 255 | endif |
| 256 | ifneq ($(BLOBS),) | 256 | ifneq ($(BLOBS),) |
| 257 | mkdir -p "$(DESTDIR)$(datadir)" | 257 | mkdir -p "$(DESTDIR)$(datadir)" |
Makefile.target
| @@ -749,7 +749,7 @@ clean: | @@ -749,7 +749,7 @@ clean: | ||
| 749 | 749 | ||
| 750 | install: all | 750 | install: all |
| 751 | ifneq ($(PROGS),) | 751 | ifneq ($(PROGS),) |
| 752 | - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" | 752 | + $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)" |
| 753 | endif | 753 | endif |
| 754 | 754 | ||
| 755 | # Include automatically generated dependency files | 755 | # Include automatically generated dependency files |
configure
| @@ -154,6 +154,7 @@ case "$cpu" in | @@ -154,6 +154,7 @@ case "$cpu" in | ||
| 154 | esac | 154 | esac |
| 155 | gprof="no" | 155 | gprof="no" |
| 156 | sparse="no" | 156 | sparse="no" |
| 157 | +strip_opt="yes" | ||
| 157 | bigendian="no" | 158 | bigendian="no" |
| 158 | mingw32="no" | 159 | mingw32="no" |
| 159 | EXESUF="" | 160 | EXESUF="" |
| @@ -396,6 +397,8 @@ for opt do | @@ -396,6 +397,8 @@ for opt do | ||
| 396 | ;; | 397 | ;; |
| 397 | --disable-sparse) sparse="no" | 398 | --disable-sparse) sparse="no" |
| 398 | ;; | 399 | ;; |
| 400 | + --disable-strip) strip_opt="no" | ||
| 401 | + ;; | ||
| 399 | --disable-vnc-tls) vnc_tls="no" | 402 | --disable-vnc-tls) vnc_tls="no" |
| 400 | ;; | 403 | ;; |
| 401 | --disable-vnc-sasl) vnc_sasl="no" | 404 | --disable-vnc-sasl) vnc_sasl="no" |
| @@ -556,6 +559,7 @@ echo " --install=INSTALL use specified install [$install]" | @@ -556,6 +559,7 @@ echo " --install=INSTALL use specified install [$install]" | ||
| 556 | echo " --static enable static build [$static]" | 559 | echo " --static enable static build [$static]" |
| 557 | echo " --enable-sparse enable sparse checker" | 560 | echo " --enable-sparse enable sparse checker" |
| 558 | echo " --disable-sparse disable sparse checker (default)" | 561 | echo " --disable-sparse disable sparse checker (default)" |
| 562 | +echo " --disable-strip disable stripping binaries" | ||
| 559 | echo " --disable-werror disable compilation abort on warning" | 563 | echo " --disable-werror disable compilation abort on warning" |
| 560 | echo " --disable-sdl disable SDL" | 564 | echo " --disable-sdl disable SDL" |
| 561 | echo " --enable-cocoa enable COCOA (Mac OS X only)" | 565 | echo " --enable-cocoa enable COCOA (Mac OS X only)" |
| @@ -1177,6 +1181,7 @@ echo "host big endian $bigendian" | @@ -1177,6 +1181,7 @@ echo "host big endian $bigendian" | ||
| 1177 | echo "target list $target_list" | 1181 | echo "target list $target_list" |
| 1178 | echo "gprof enabled $gprof" | 1182 | echo "gprof enabled $gprof" |
| 1179 | echo "sparse enabled $sparse" | 1183 | echo "sparse enabled $sparse" |
| 1184 | +echo "strip binaries $strip_opt" | ||
| 1180 | echo "profiler $profiler" | 1185 | echo "profiler $profiler" |
| 1181 | echo "static build $static" | 1186 | echo "static build $static" |
| 1182 | echo "-Werror enabled $werror" | 1187 | echo "-Werror enabled $werror" |
| @@ -1251,7 +1256,6 @@ echo "INSTALL=$install" >> $config_mak | @@ -1251,7 +1256,6 @@ echo "INSTALL=$install" >> $config_mak | ||
| 1251 | echo "CC=$cc" >> $config_mak | 1256 | echo "CC=$cc" >> $config_mak |
| 1252 | echo "HOST_CC=$host_cc" >> $config_mak | 1257 | echo "HOST_CC=$host_cc" >> $config_mak |
| 1253 | echo "AR=$ar" >> $config_mak | 1258 | echo "AR=$ar" >> $config_mak |
| 1254 | -echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak | ||
| 1255 | # XXX: only use CFLAGS and LDFLAGS ? | 1259 | # XXX: only use CFLAGS and LDFLAGS ? |
| 1256 | # XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross | 1260 | # XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross |
| 1257 | # compilation of dyngen tool (useful for win32 build on Linux host) | 1261 | # compilation of dyngen tool (useful for win32 build on Linux host) |
| @@ -1338,6 +1342,9 @@ if test "$sparse" = "yes" ; then | @@ -1338,6 +1342,9 @@ if test "$sparse" = "yes" ; then | ||
| 1338 | echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_mak | 1342 | echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_mak |
| 1339 | echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_mak | 1343 | echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_mak |
| 1340 | fi | 1344 | fi |
| 1345 | +if test "$strip_opt" = "yes" ; then | ||
| 1346 | + echo "STRIP_OPT=-s" >> $config_mak | ||
| 1347 | +fi | ||
| 1341 | if test "$bigendian" = "yes" ; then | 1348 | if test "$bigendian" = "yes" ; then |
| 1342 | echo "WORDS_BIGENDIAN=yes" >> $config_mak | 1349 | echo "WORDS_BIGENDIAN=yes" >> $config_mak |
| 1343 | echo "#define WORDS_BIGENDIAN 1" >> $config_h | 1350 | echo "#define WORDS_BIGENDIAN 1" >> $config_h |