From patchwork Tue Dec 6 11:01:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 129631 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 28AA21007D4 for ; Tue, 6 Dec 2011 22:35:19 +1100 (EST) Received: from localhost ([::1]:59311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXspf-0000ne-Rr for incoming@patchwork.ozlabs.org; Tue, 06 Dec 2011 06:05:07 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXspW-0000lF-VN for qemu-devel@nongnu.org; Tue, 06 Dec 2011 06:05:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXspR-00064m-8L for qemu-devel@nongnu.org; Tue, 06 Dec 2011 06:04:58 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:53972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXspQ-00064b-VJ for qemu-devel@nongnu.org; Tue, 06 Dec 2011 06:04:53 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Dec 2011 11:04:52 -0000 Received: from d06nrmr1806.portsmouth.uk.ibm.com ([9.149.39.193]) by e06smtp15.uk.ibm.com ([192.168.101.145]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 6 Dec 2011 11:04:35 -0000 Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pB6B4Z4o2682970 for ; Tue, 6 Dec 2011 11:04:35 GMT Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pB6B4Yd1028955 for ; Tue, 6 Dec 2011 04:04:35 -0700 Received: from localhost (stefanha-thinkpad.manchester-maybrook.uk.ibm.com [9.174.219.31]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pB6B4WDe028833; Tue, 6 Dec 2011 04:04:34 -0700 From: Stefan Hajnoczi To: Date: Tue, 6 Dec 2011 11:01:06 +0000 Message-Id: <1323169274-31657-12-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1323169274-31657-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1323169274-31657-1-git-send-email-stefanha@linux.vnet.ibm.com> x-cbid: 11120611-0342-0000-0000-0000004418A3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.111 Cc: Peter Maydell , Anthony Liguori , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 11/19] configure: Pull linux-headers/asm symlink creation out of loop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Maydell Pull the creation of the linux-headers/asm symlink out of the loop so we don't pointlessly delete and recreate it once for each target. Also move the setting of the includes variable up so that it is in the same place as the other code which sets this variable. Signed-off-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- configure | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 452b8cf..4bcb8ef 100755 --- a/configure +++ b/configure @@ -3286,6 +3286,22 @@ for d in libdis libdis-user; do echo > $d/config.mak done +# use included Linux headers +if test "$linux" = "yes" ; then + mkdir -p linux-headers + case "$cpu" in + i386|x86_64) + symlink $source_path/linux-headers/asm-x86 linux-headers/asm + ;; + ppcemb|ppc|ppc64) + symlink $source_path/linux-headers/asm-powerpc linux-headers/asm + ;; + s390x) + symlink $source_path/linux-headers/asm-s390 linux-headers/asm + ;; + esac +fi + for target in $target_list; do target_dir="$target" config_target_mak=$target_dir/config-target.mak @@ -3611,6 +3627,10 @@ else fi includes="-I\$(SRC_PATH)/tcg $includes" +if test "$linux" = "yes" ; then + includes="-I\$(SRC_PATH)/linux-headers $includes" +fi + if test "$target_user_only" = "yes" ; then libdis_config_mak=libdis-user/config.mak else @@ -3742,23 +3762,6 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then esac fi -# use included Linux headers -if test "$linux" = "yes" ; then - includes="-I\$(SRC_PATH)/linux-headers $includes" - mkdir -p linux-headers - case "$cpu" in - i386|x86_64) - symlink $source_path/linux-headers/asm-x86 linux-headers/asm - ;; - ppcemb|ppc|ppc64) - symlink $source_path/linux-headers/asm-powerpc linux-headers/asm - ;; - s390x) - symlink $source_path/linux-headers/asm-s390 linux-headers/asm - ;; - esac -fi - echo "LDFLAGS+=$ldflags" >> $config_target_mak echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak echo "QEMU_INCLUDES+=$includes" >> $config_target_mak