547
554
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
548
555
audio_possible_drivers="$audio_possible_drivers fmod"
550
QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
557
QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
554
561
if [ "$bsd" = "yes" ] ; then
555
562
if [ "$darwin" != "yes" ] ; then
563
if [ "$targetos" != "FreeBSD" ]; then
710
719
--audio-drv-list=*) audio_drv_list="$optarg"
712
--block-drv-whitelist=*) block_drv_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
721
--block-drv-rw-whitelist=*|--block-drv-whitelist=*) block_drv_rw_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
723
--block-drv-ro-whitelist=*) block_drv_ro_whitelist=`echo "$optarg" | sed -e 's/,/ /g'`
714
725
--enable-debug-tcg) debug_tcg="yes"
866
873
--with-coroutine=*) coroutine="$optarg"
875
--disable-coroutine-pool) coroutine_pool="no"
877
--enable-coroutine-pool) coroutine_pool="yes"
868
879
--disable-docs) docs="no"
870
881
--enable-docs) docs="yes"
976
991
default_target_list=""
978
# these targets are portable
979
if [ "$softmmu" = "yes" ] ; then
980
default_target_list="\
989
microblazeel-softmmu \
1009
# the following are Linux specific
1010
if [ "$linux_user" = "yes" ] ; then
1011
default_target_list="${default_target_list}\
1019
microblaze-linux-user \
1020
microblazeel-linux-user \
1024
mips64el-linux-user \
1025
mipsn32-linux-user \
1026
mipsn32el-linux-user \
1030
ppc64abi32-linux-user \
1034
sparc64-linux-user \
1035
sparc32plus-linux-user \
1036
unicore32-linux-user \
1040
# the following are BSD specific
1041
if [ "$bsd_user" = "yes" ] ; then
1042
default_target_list="${default_target_list}\
995
if [ "$softmmu" = "yes" ]; then
996
mak_wilds="${mak_wilds} $source_path/default-configs/*-softmmu.mak"
998
if [ "$linux_user" = "yes" ]; then
999
mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak"
1001
if [ "$bsd_user" = "yes" ]; then
1002
mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak"
1005
for config in $mak_wilds; do
1006
default_target_list="${default_target_list} $(basename "$config" .mak)"
1050
1009
if test x"$show_help" = x"yes" ; then
1083
1042
echo " --bindir=PATH install binaries in PATH"
1084
1043
echo " --libdir=PATH install libraries in PATH"
1085
1044
echo " --sysconfdir=PATH install config in PATH$confsuffix"
1086
echo " --localstatedir=PATH install local state in PATH"
1045
echo " --localstatedir=PATH install local state in PATH (set at runtime on win32)"
1087
1046
echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
1088
1047
echo " --enable-debug-tcg enable TCG debugging"
1089
1048
echo " --disable-debug-tcg disable TCG debugging (default)"
1106
1065
echo " --enable-cocoa enable Cocoa (default on Mac OS X)"
1107
1066
echo " --audio-drv-list=LIST set audio drivers list:"
1108
1067
echo " Available drivers: $audio_possible_drivers"
1109
echo " --block-drv-whitelist=L set block driver whitelist"
1068
echo " --block-drv-whitelist=L Same as --block-drv-rw-whitelist=L"
1069
echo " --block-drv-rw-whitelist=L"
1070
echo " set block driver read-write whitelist"
1071
echo " (affects only QEMU, not qemu-img)"
1072
echo " --block-drv-ro-whitelist=L"
1073
echo " set block driver read-only whitelist"
1110
1074
echo " (affects only QEMU, not qemu-img)"
1111
1075
echo " --enable-mixemu enable mixer emulation"
1112
1076
echo " --disable-xen disable xen backend driver support"
1136
1100
echo " --disable-slirp disable SLIRP userspace network connectivity"
1137
1101
echo " --disable-kvm disable KVM acceleration support"
1138
1102
echo " --enable-kvm enable KVM acceleration support"
1103
echo " --disable-rdma disable RDMA-based migration support"
1104
echo " --enable-rdma enable RDMA-based migration support"
1139
1105
echo " --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)"
1140
echo " --disable-nptl disable usermode NPTL support"
1141
echo " --enable-nptl enable usermode NPTL support"
1142
1106
echo " --enable-system enable all system emulation targets"
1143
1107
echo " --disable-system disable all system emulation targets"
1144
1108
echo " --enable-user enable supported user emulation targets"
1193
1157
echo " --enable-seccomp enables seccomp support"
1194
1158
echo " --with-coroutine=BACKEND coroutine backend. Supported options:"
1195
1159
echo " gthread, ucontext, sigaltstack, windows"
1160
echo " --disable-coroutine-pool disable coroutine freelist (worse performance)"
1161
echo " --enable-coroutine-pool enable coroutine freelist (better performance)"
1196
1162
echo " --enable-glusterfs enable GlusterFS backend"
1197
1163
echo " --disable-glusterfs disable GlusterFS backend"
1198
1164
echo " --enable-gcov enable test coverage analysis with gcov"
1401
1367
target_list=`echo "$target_list" | sed -e 's/,/ /g'`
1370
# Check that we recognised the target name; this allows a more
1371
# friendly error message than if we let it fall through.
1372
for target in $target_list; do
1373
case " $default_target_list " in
1377
error_exit "Unknown target name '$target'"
1403
1382
# see if system emulation was really requested
1404
1383
case " $target_list " in
1405
1384
*"-softmmu "*) softmmu=yes
1503
1476
# libseccomp check
1505
1478
if test "$seccomp" != "no" ; then
1506
if $pkg_config --atleast-version=1.0.0 libseccomp --modversion >/dev/null 2>&1; then
1479
if $pkg_config --atleast-version=2.1.0 libseccomp --modversion >/dev/null 2>&1; then
1507
1480
libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`"
1508
1481
QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`"
1726
1699
vtepackage="vte"
1727
1700
vteversion="0.24.0"
1729
if $pkg_config --exists "$gtkpackage >= $gtkversion" && \
1730
$pkg_config --exists "$vtepackage >= $vteversion"; then
1702
if ! $pkg_config --exists "$gtkpackage >= $gtkversion"; then
1703
if test "$gtk" = "yes" ; then
1704
feature_not_found "gtk"
1707
elif ! $pkg_config --exists "$vtepackage >= $vteversion"; then
1708
if test "$gtk" = "yes" ; then
1709
error_exit "libvte not found (required for gtk support)"
1731
1713
gtk_cflags=`$pkg_config --cflags $gtkpackage 2>/dev/null`
1732
1714
gtk_libs=`$pkg_config --libs $gtkpackage 2>/dev/null`
1733
1715
vte_cflags=`$pkg_config --cflags $vtepackage 2>/dev/null`
1734
1716
vte_libs=`$pkg_config --libs $vtepackage 2>/dev/null`
1735
1717
libs_softmmu="$gtk_libs $vte_libs $libs_softmmu"
1738
if test "$gtk" = "yes" ; then
1739
feature_not_found "gtk"
1828
1805
##########################################
1806
# RDMA needs OpenFabrics libraries
1807
if test "$rdma" != "no" ; then
1809
#include <rdma/rdma_cma.h>
1810
int main(void) { return 0; }
1812
rdma_libs="-lrdmacm -libverbs"
1813
if compile_prog "" "$rdma_libs" ; then
1815
libs_softmmu="$libs_softmmu $rdma_libs"
1817
if test "$rdma" = "yes" ; then
1819
" OpenFabrics librdmacm/libibverbs not present." \
1821
" (1) Fast: Install infiniband packages from your distro." \
1822
" (2) Cleanest: Install libraries from www.openfabrics.org" \
1823
" (3) Also: Install softiwarp if you don't have RDMA hardware"
1829
##########################################
1829
1830
# VNC TLS/WS detection
1830
1831
if test "$vnc" = "yes" -a \( "$vnc_tls" != "no" -o "$vnc_ws" != "no" \) ; then
1831
1832
cat > $TMPC <<EOF
2155
2156
##########################################
2157
if test "$mingw32" = "yes" ; then
2158
if test "$curses" != "no" ; then
2159
if test "$mingw32" = "yes" ; then
2158
2160
curses_list="-lpdcurses"
2160
curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses 2>/dev/null)"
2163
if test "$curses" != "no" ; then
2162
curses_list="$($pkg_config --libs ncurses 2>/dev/null):-lncurses:-lcurses"
2164
2164
curses_found=no
2165
2165
cat > $TMPC << EOF
2166
2166
#include <curses.h>
2193
2193
##########################################
2196
if $pkg_config libcurl --modversion >/dev/null 2>&1; then
2197
curlconfig="$pkg_config libcurl"
2199
curlconfig=curl-config
2202
2195
if test "$curl" != "no" ; then
2196
if $pkg_config libcurl --modversion >/dev/null 2>&1; then
2197
curlconfig="$pkg_config libcurl"
2199
curlconfig=curl-config
2203
2201
cat > $TMPC << EOF
2204
2202
#include <curl/curl.h>
2205
2203
int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; }
2519
2517
##########################################
2519
# fdt support is mandatory for at least some target architectures,
2520
# so insist on it if we're building those system emulators.
2522
for target in $target_list; do
2524
arm*-softmmu|ppc*-softmmu|microblaze*-softmmu)
2530
if test "$fdt_required" = "yes"; then
2531
if test "$fdt" = "no"; then
2532
error_exit "fdt disabled but some requested targets require it." \
2533
"You can turn off fdt only if you also disable all the system emulation" \
2534
"targets which need it (by specifying a cut down --target-list)."
2521
2539
if test "$fdt" != "no" ; then
2522
2540
fdt_libs="-lfdt"
2541
# explicitly check for libfdt_env.h as it is missing in some stable installs
2523
2542
cat > $TMPC << EOF
2543
#include <libfdt_env.h>
2524
2544
int main(void) { return 0; }
2526
2546
if compile_prog "" "$fdt_libs" ; then
2539
2559
fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
2540
2560
elif test "$fdt" = "yes" ; then
2541
2561
# have neither and want - prompt for system/submodule install
2542
error_exit "ERROR: DTC not present. Your options:" \
2562
error_exit "DTC not present. Your options:" \
2543
2563
" (1) Preferred: Install the DTC devel package" \
2544
2564
" (2) Fetch the DTC submodule, using:" \
2545
2565
" git submodule update --init dtc"
2576
2596
##########################################
2577
2597
# glusterfs probe
2578
2598
if test "$glusterfs" != "no" ; then
2580
#include <glusterfs/api/glfs.h>
2582
(void) glfs_new("volume");
2586
glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
2587
if compile_prog "" "$glusterfs_libs" ; then
2599
if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
2601
glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null`
2602
glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null`
2603
CFLAGS="$CFLAGS $glusterfs_cflags"
2589
2604
libs_tools="$glusterfs_libs $libs_tools"
2590
2605
libs_softmmu="$glusterfs_libs $libs_softmmu"
2606
if $pkg_config --atleast-version=5 glusterfs-api >/dev/null 2>&1; then
2607
glusterfs_discard="yes"
2592
2610
if test "$glusterfs" = "yes" ; then
2593
2611
feature_not_found "GlusterFS backend support"
2600
# Check for xxxat() functions when we are building linux-user
2601
# emulator. This is done because older glibc versions don't
2602
# have syscall stubs for these implemented.
2606
#define _ATFILE_SOURCE
2607
#include <sys/types.h>
2614
/* try to unlink nonexisting file */
2615
return (unlinkat(AT_FDCWD, "nonexistent_file", 0));
2618
if compile_prog "" "" ; then
2622
2617
# Check for inotify functions when we are building linux-user
2623
2618
# emulator. This is done because older glibc versions don't
2624
2619
# have syscall stubs for these implemented. In that case we
3250
if test "$coroutine_pool" = ""; then
3251
if test "$coroutine" = "gthread"; then
3257
if test "$coroutine" = "gthread" -a "$coroutine_pool" = "yes"; then
3258
error_exit "'gthread' coroutine backend does not support pool (use --disable-coroutine-pool)"
3255
3261
##########################################
3256
3262
# check if we have open_by_handle_at
3466
if [ "$guest_agent" != "no" ]; then
3458
3467
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
3459
if [ "$guest_agent" = "yes" ]; then
3460
3468
tools="qemu-ga\$(EXESUF) $tools"
3470
elif [ "$guest_agent" != yes ]; then
3473
error_exit "Guest agent is not supported on this platform"
3477
3489
roms="$roms s390-ccw"
3492
# Probe for the need for relocating the user-only binary.
3493
if test "$pie" = "no" ; then
3496
arm | hppa | i386 | m68k | ppc | ppc64 | s390* | sparc | sparc64 | x86_64)
3497
textseg_addr=0x60000000
3500
textseg_addr=0x400000
3503
if [ -n "$textseg_addr" ]; then
3505
int main(void) { return 0; }
3507
textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
3508
if ! compile_prog "" "$textseg_ldflags"; then
3509
# In case ld does not support -Ttext-segment, edit the default linker
3510
# script via sed to set the .text start addr. This is needed on FreeBSD
3512
$ld --verbose | sed \
3513
-e '1,/==================================================/d' \
3514
-e '/==================================================/,$d' \
3515
-e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
3516
-e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
3517
textseg_ldflags="-Wl,-T../config-host.ld"
3480
3522
# add pixman flags after all config tests are done
3481
3523
QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags $fdt_cflags"
3482
3524
libs_softmmu="$libs_softmmu $pixman_libs"
3488
3530
echo "libexec directory `eval echo $libexecdir`"
3489
3531
echo "include directory `eval echo $includedir`"
3490
3532
echo "config directory `eval echo $sysconfdir`"
3533
if test "$mingw32" = "no" ; then
3491
3534
echo "local state directory `eval echo $local_statedir`"
3492
if test "$mingw32" = "no" ; then
3493
3535
echo "Manual directory `eval echo $mandir`"
3494
3536
echo "ELF interp prefix $interp_prefix"
3538
echo "local state directory queried at runtime"
3496
3540
echo "Source path $source_path"
3497
3541
echo "C compiler $cc"
3526
3570
echo "curl support $curl"
3527
3571
echo "mingw32 support $mingw32"
3528
3572
echo "Audio drivers $audio_drv_list"
3529
echo "Block whitelist $block_drv_whitelist"
3573
echo "Block whitelist (rw) $block_drv_rw_whitelist"
3574
echo "Block whitelist (ro) $block_drv_ro_whitelist"
3530
3575
echo "Mixer emulation $mixemu"
3531
3576
echo "VirtFS support $virtfs"
3532
3577
echo "VNC support $vnc"
3546
3591
echo "Documentation $docs"
3547
3592
[ ! -z "$uname_release" ] && \
3548
3593
echo "uname -r $uname_release"
3549
echo "NPTL support $nptl"
3550
3594
echo "GUEST_BASE $guest_base"
3551
3595
echo "PIE $pie"
3552
3596
echo "vde support $vde"
3554
3598
echo "ATTR/XATTR support $attr"
3555
3599
echo "Install blobs $blobs"
3556
3600
echo "KVM support $kvm"
3601
echo "RDMA support $rdma"
3557
3602
echo "TCG interpreter $tcg_interpreter"
3558
3603
echo "fdt support $fdt"
3559
3604
echo "preadv support $preadv"
3578
3623
echo "build guest agent $guest_agent"
3579
3624
echo "seccomp support $seccomp"
3580
3625
echo "coroutine backend $coroutine"
3626
echo "coroutine pool $coroutine_pool"
3581
3627
echo "GlusterFS support $glusterfs"
3582
3628
echo "virtio-blk-data-plane $virtio_blk_data_plane"
3583
3629
echo "gcov $gcov_tool"
3612
3657
echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
3613
3658
echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
3614
3659
echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
3615
echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
3660
if test "$mingw32" = "no" ; then
3661
echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
3616
3663
echo "qemu_helperdir=$libexecdir" >> $config_host_mak
3617
3664
echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak
3618
3665
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
3622
3669
echo "ARCH=$ARCH" >> $config_host_mak
3625
arm|i386|x86_64|ppc)
3672
arm|i386|x86_64|ppc|aarch64)
3626
3673
# The TCG interpreter currently does not support ld/st optimization.
3627
3674
if test "$tcg_interpreter" = "no" ; then
3628
3675
echo "CONFIG_QEMU_LDST_OPTIMIZATION=y" >> $config_host_mak
3705
3752
if test "$audio_win_int" = "yes" ; then
3706
3753
echo "CONFIG_AUDIO_WIN_INT=y" >> $config_host_mak
3708
echo "CONFIG_BDRV_WHITELIST=$block_drv_whitelist" >> $config_host_mak
3755
echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
3756
echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
3709
3757
if test "$mixemu" = "yes" ; then
3710
3758
echo "CONFIG_MIXEMU=y" >> $config_host_mak
3755
3803
if test "$curses" = "yes" ; then
3756
3804
echo "CONFIG_CURSES=y" >> $config_host_mak
3758
if test "$atfile" = "yes" ; then
3759
echo "CONFIG_ATFILE=y" >> $config_host_mak
3761
3806
if test "$utimens" = "yes" ; then
3762
3807
echo "CONFIG_UTIMENSAT=y" >> $config_host_mak
3930
3975
echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
3976
if test "$coroutine_pool" = "yes" ; then
3977
echo "CONFIG_COROUTINE_POOL=1" >> $config_host_mak
3979
echo "CONFIG_COROUTINE_POOL=0" >> $config_host_mak
3932
3982
if test "$open_by_handle_at" = "yes" ; then
3933
3983
echo "CONFIG_OPEN_BY_HANDLE=y" >> $config_host_mak
3965
4015
echo "CONFIG_GLUSTERFS=y" >> $config_host_mak
4018
if test "$glusterfs_discard" = "yes" ; then
4019
echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
3968
4022
if test "$libssh2" = "yes" ; then
3969
4023
echo "CONFIG_LIBSSH2=y" >> $config_host_mak
4039
4093
echo "CONFIG_TRACE_DEFAULT=y" >> $config_host_mak
4096
if test "$rdma" = "yes" ; then
4097
echo "CONFIG_RDMA=y" >> $config_host_mak
4042
4100
if test "$tcg_interpreter" = "yes"; then
4043
4101
QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
4044
4102
elif test "$ARCH" = "sparc64" ; then
4103
4161
echo "GCOV=$gcov_tool" >> $config_host_mak
4106
# generate list of library paths for linker script
4108
$ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld}
4110
if test -f ${config_host_ld}~ ; then
4111
if cmp -s $config_host_ld ${config_host_ld}~ ; then
4112
mv ${config_host_ld}~ $config_host_ld
4114
rm ${config_host_ld}~
4118
4164
# use included Linux headers
4119
4165
if test "$linux" = "yes" ; then
4120
4166
mkdir -p linux-headers
4142
4191
for target in $target_list; do
4143
4192
target_dir="$target"
4144
4193
config_target_mak=$target_dir/config-target.mak
4145
target_arch2=`echo $target | cut -d '-' -f 1`
4194
target_name=`echo $target | cut -d '-' -f 1`
4146
4195
target_bigendian="no"
4148
case "$target_arch2" in
4197
case "$target_name" in
4149
4198
armeb|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or32|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
4150
4199
target_bigendian=yes
4155
4204
target_linux_user="no"
4156
4205
target_bsd_user="no"
4157
4206
case "$target" in
4158
${target_arch2}-softmmu)
4207
${target_name}-softmmu)
4159
4208
target_softmmu="yes"
4161
${target_arch2}-linux-user)
4210
${target_name}-linux-user)
4162
4211
if test "$linux" != "yes" ; then
4163
4212
error_exit "Target '$target' is only available on a Linux host"
4165
4214
target_user_only="yes"
4166
4215
target_linux_user="yes"
4168
${target_arch2}-bsd-user)
4217
${target_name}-bsd-user)
4169
4218
if test "$bsd" != "yes" ; then
4170
4219
error_exit "Target '$target' is only available on a BSD host"
4182
4231
echo "# Automatically generated by configure - do not modify" > $config_target_mak
4186
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
4234
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_name/g"`
4187
4235
gdb_xml_files=""
4189
TARGET_ARCH="$target_arch2"
4237
TARGET_ARCH="$target_name"
4190
4238
TARGET_BASE_ARCH=""
4191
4239
TARGET_ABI_DIR=""
4193
case "$target_arch2" in
4241
case "$target_name" in
4197
4245
TARGET_BASE_ARCH=i386
4203
4250
TARGET_ARCH=arm
4206
4252
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
4302
4341
echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
4305
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
4306
4344
target_arch_name="`upper $TARGET_ARCH`"
4307
4345
echo "TARGET_$target_arch_name=y" >> $config_target_mak
4308
echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak
4309
echo "TARGET_TYPE=TARGET_TYPE_`upper $target_arch2`" >> $config_target_mak
4346
echo "TARGET_NAME=$target_name" >> $config_target_mak
4310
4347
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
4311
4348
if [ "$TARGET_ABI_DIR" = "" ]; then
4312
4349
TARGET_ABI_DIR=$TARGET_ARCH
4314
4351
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
4315
case "$target_arch2" in
4352
case "$target_name" in
4317
4354
if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
4318
4355
echo "CONFIG_XEN=y" >> $config_target_mak
4326
case "$target_arch2" in
4363
case "$target_name" in
4327
4364
arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
4328
4365
# Make sure the target and host cpus are compatible
4329
4366
if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
4330
\( "$target_arch2" = "$cpu" -o \
4331
\( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
4332
\( "$target_arch2" = "ppc64" -a "$cpu" = "ppc" \) -o \
4333
\( "$target_arch2" = "ppc" -a "$cpu" = "ppc64" \) -o \
4334
\( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
4335
\( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
4336
\( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
4367
\( "$target_name" = "$cpu" -o \
4368
\( "$target_name" = "ppcemb" -a "$cpu" = "ppc" \) -o \
4369
\( "$target_name" = "ppc64" -a "$cpu" = "ppc" \) -o \
4370
\( "$target_name" = "ppc" -a "$cpu" = "ppc64" \) -o \
4371
\( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
4372
\( "$target_name" = "x86_64" -a "$cpu" = "i386" \) -o \
4373
\( "$target_name" = "i386" -a "$cpu" = "x86_64" \) \) ; then
4337
4374
echo "CONFIG_KVM=y" >> $config_target_mak
4338
4375
if test "$vhost_net" = "yes" ; then
4339
4376
echo "CONFIG_VHOST_NET=y" >> $config_target_mak
4343
case "$target_arch2" in
4345
echo "CONFIG_HAVE_GET_MEMORY_MAPPING=y" >> $config_target_mak
4347
4380
if test "$target_bigendian" = "yes" ; then
4348
4381
echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
4350
4383
if test "$target_softmmu" = "yes" ; then
4351
4384
echo "CONFIG_SOFTMMU=y" >> $config_target_mak
4352
case "$target_arch2" in
4354
echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
4357
4386
if test "$target_user_only" = "yes" ; then
4358
4387
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
4372
4401
if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
4373
4402
echo "TARGET_HAS_BFLT=y" >> $config_target_mak
4375
if test "$target_user_only" = "yes" \
4376
-a "$nptl" = "yes" -a "$target_nptl" = "yes"; then
4377
echo "CONFIG_USE_NPTL=y" >> $config_target_mak
4379
4404
if test "$target_user_only" = "yes" -a "$guest_base" = "yes"; then
4380
4405
echo "CONFIG_USE_GUEST_BASE=y" >> $config_target_mak
4487
if test "$ARCH" = "tci"; then
4490
linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld"
4493
4512
if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
4496
# The default placement of the application is fine.
4499
ldflags="$linker_script $ldflags"
4513
ldflags="$ldflags $textseg_ldflags"
4504
4516
echo "LDFLAGS+=$ldflags" >> $config_target_mak
4510
4522
echo "config-host.h: subdir-pixman" >> $config_host_mak
4525
if test "$rdma" = "yes" ; then
4526
echo "CONFIG_RDMA=y" >> $config_host_mak
4513
4529
if [ "$dtc_internal" = "yes" ]; then
4514
4530
echo "config-host.h: subdir-dtc" >> $config_host_mak
4517
4533
# build tree in object directory in case the source is not in the current directory
4518
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos"
4534
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa"
4519
4535
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
4520
4536
DIRS="$DIRS roms/seabios roms/vgabios"
4521
4537
DIRS="$DIRS qapi-generated"
4522
4538
FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
4523
4539
FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
4524
FILES="$FILES tests/tcg/lm32/Makefile po/Makefile"
4540
FILES="$FILES tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
4525
4541
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
4526
4542
FILES="$FILES pc-bios/spapr-rtas/Makefile"
4527
4543
FILES="$FILES pc-bios/s390-ccw/Makefile"