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