From patchwork Thu Aug 26 16:29:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 62790 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B408BB70DB for ; Fri, 27 Aug 2010 02:43:31 +1000 (EST) Received: from localhost ([127.0.0.1]:52396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OofY0-00045E-Tj for incoming@patchwork.ozlabs.org; Thu, 26 Aug 2010 12:43:29 -0400 Received: from [140.186.70.92] (port=55651 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OofKU-0003i5-06 for qemu-devel@nongnu.org; Thu, 26 Aug 2010 12:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OofKQ-00062S-NK for qemu-devel@nongnu.org; Thu, 26 Aug 2010 12:29:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33579 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OofKQ-00061k-FG for qemu-devel@nongnu.org; Thu, 26 Aug 2010 12:29:26 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 09EAC87104; Thu, 26 Aug 2010 18:29:24 +0200 (CEST) From: Alexander Graf To: qemu-devel List Date: Thu, 26 Aug 2010 18:29:20 +0200 Message-Id: <1282840163-2223-4-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1282840163-2223-1-git-send-email-agraf@suse.de> References: <1282840163-2223-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Hollis Blanchard Subject: [Qemu-devel] [PATCH 3/6] Fix "make install" with a cross toolchain X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Hollis Blanchard We must be able to use a non-native strip executable, but not all versions of 'install' support the --strip-program option (e.g. OpenBSD). Accordingly, we can't use 'install -s', and we must run strip separately. Signed-off-by: Hollis Blanchard Cc: blauwirbel@gmail.com --- Makefile.target | 5 ++++- configure | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Makefile.target index c8281e9..18826bb 100644 --- a/Makefile.target +++ b/Makefile.target @@ -329,7 +329,10 @@ clean: install: all ifneq ($(PROGS),) - $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" +ifneq ($(STRIP),) + $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS)) +endif endif # Include automatically generated dependency files diff --git a/configure b/configure index a20371c..146dac0 100755 --- a/configure +++ b/configure @@ -80,6 +80,7 @@ make="make" install="install" objcopy="objcopy" ld="ld" +strip="strip" helper_cflags="" libs_softmmu="" libs_tools="" @@ -125,6 +126,7 @@ cc="${cross_prefix}${cc}" ar="${cross_prefix}${ar}" objcopy="${cross_prefix}${objcopy}" ld="${cross_prefix}${ld}" +strip="${cross_prefix}${strip}" # default flags for all hosts QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" @@ -2227,7 +2229,7 @@ if test "$debug" = "yes" ; then echo "CONFIG_DEBUG_EXEC=y" >> $config_host_mak fi if test "$strip_opt" = "yes" ; then - echo "STRIP_OPT=-s" >> $config_host_mak + echo "STRIP=${strip}" >> $config_host_mak fi if test "$bigendian" = "yes" ; then echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak