diff options
author | Peter Maydell | 2011-11-30 12:59:04 +0100 |
---|---|---|
committer | Stefan Hajnoczi | 2011-12-06 10:56:41 +0100 |
commit | 6efd751789896dd6ac05c12f5149bba29c12ccae (patch) | |
tree | 8bf0322e3bf92f52b5be33f75c5c5a37b84b0dac /configure | |
parent | pcie_aer: adjust do_pcie_aer_inejct_error -> do_pcie_aer_inject_error (diff) | |
download | qemu-6efd751789896dd6ac05c12f5149bba29c12ccae.tar.gz qemu-6efd751789896dd6ac05c12f5149bba29c12ccae.tar.xz qemu-6efd751789896dd6ac05c12f5149bba29c12ccae.zip |
configure: Pull linux-headers/asm symlink creation out of loop
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 <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 37 |
1 files changed, 20 insertions, 17 deletions
@@ -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 |