From patchwork Wed Nov 30 11:59:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 5398 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AAF1E23E0C for ; Wed, 30 Nov 2011 11:59:08 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 867EDA1820A for ; Wed, 30 Nov 2011 11:59:08 +0000 (UTC) Received: by laah2 with SMTP id h2so234815laa.11 for ; Wed, 30 Nov 2011 03:59:08 -0800 (PST) Received: by 10.152.104.1 with SMTP id ga1mr1039733lab.40.1322654348212; Wed, 30 Nov 2011 03:59:08 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs9726lal; Wed, 30 Nov 2011 03:59:07 -0800 (PST) Received: by 10.180.19.9 with SMTP id a9mr1491154wie.32.1322654346474; Wed, 30 Nov 2011 03:59:06 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id n82si579978weq.79.2011.11.30.03.59.06 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Nov 2011 03:59:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RVioa-0003a4-Js; Wed, 30 Nov 2011 11:59:04 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, qemu-trivial@nongnu.org Subject: [PATCH] configure: Pull linux-headers/asm symlink creation out of loop Date: Wed, 30 Nov 2011 11:59:04 +0000 Message-Id: <1322654344-13741-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 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 --- configure | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 5fbd812..cc6c6d9 100755 --- a/configure +++ b/configure @@ -3281,6 +3281,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 @@ -3606,6 +3622,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 @@ -3737,23 +3757,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