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
3258
if test "$coroutine_pool" = ""; then
3259
if test "$coroutine" = "gthread"; then
3265
if test "$coroutine" = "gthread" -a "$coroutine_pool" = "yes"; then
3266
error_exit "'gthread' coroutine backend does not support pool (use --disable-coroutine-pool)"
3263
3269
##########################################
3264
3270
# check if we have open_by_handle_at
3474
if [ "$guest_agent" != "no" ]; then
3466
3475
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
3467
if [ "$guest_agent" = "yes" ]; then
3468
3476
tools="qemu-ga\$(EXESUF) $tools"
3478
elif [ "$guest_agent" != yes ]; then
3481
error_exit "Guest agent is not supported on this platform"
3485
3497
roms="$roms s390-ccw"
3500
# Probe for the need for relocating the user-only binary.
3501
if test "$pie" = "no" ; then
3504
arm | hppa | i386 | m68k | ppc | ppc64 | s390* | sparc | sparc64 | x86_64)
3505
textseg_addr=0x60000000
3508
textseg_addr=0x400000
3511
if [ -n "$textseg_addr" ]; then
3513
int main(void) { return 0; }
3515
textseg_ldflags="-Wl,-Ttext-segment=$textseg_addr"
3516
if ! compile_prog "" "$textseg_ldflags"; then
3517
# In case ld does not support -Ttext-segment, edit the default linker
3518
# script via sed to set the .text start addr. This is needed on FreeBSD
3520
$ld --verbose | sed \
3521
-e '1,/==================================================/d' \
3522
-e '/==================================================/,$d' \
3523
-e "s/[.] = [0-9a-fx]* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/" \
3524
-e "s/__executable_start = [0-9a-fx]*/__executable_start = $textseg_addr/" > config-host.ld
3525
textseg_ldflags="-Wl,-T../config-host.ld"
3488
3530
# add pixman flags after all config tests are done
3489
3531
QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags $fdt_cflags"
3490
3532
libs_softmmu="$libs_softmmu $pixman_libs"
3496
3538
echo "libexec directory `eval echo $libexecdir`"
3497
3539
echo "include directory `eval echo $includedir`"
3498
3540
echo "config directory `eval echo $sysconfdir`"
3541
if test "$mingw32" = "no" ; then
3499
3542
echo "local state directory `eval echo $local_statedir`"
3500
if test "$mingw32" = "no" ; then
3501
3543
echo "Manual directory `eval echo $mandir`"
3502
3544
echo "ELF interp prefix $interp_prefix"
3546
echo "local state directory queried at runtime"
3504
3548
echo "Source path $source_path"
3505
3549
echo "C compiler $cc"
3534
3578
echo "curl support $curl"
3535
3579
echo "mingw32 support $mingw32"
3536
3580
echo "Audio drivers $audio_drv_list"
3537
echo "Block whitelist $block_drv_whitelist"
3581
echo "Block whitelist (rw) $block_drv_rw_whitelist"
3582
echo "Block whitelist (ro) $block_drv_ro_whitelist"
3538
3583
echo "Mixer emulation $mixemu"
3539
3584
echo "VirtFS support $virtfs"
3540
3585
echo "VNC support $vnc"
3554
3599
echo "Documentation $docs"
3555
3600
[ ! -z "$uname_release" ] && \
3556
3601
echo "uname -r $uname_release"
3557
echo "NPTL support $nptl"
3558
3602
echo "GUEST_BASE $guest_base"
3559
3603
echo "PIE $pie"
3560
3604
echo "vde support $vde"
3562
3606
echo "ATTR/XATTR support $attr"
3563
3607
echo "Install blobs $blobs"
3564
3608
echo "KVM support $kvm"
3609
echo "RDMA support $rdma"
3565
3610
echo "TCG interpreter $tcg_interpreter"
3566
3611
echo "fdt support $fdt"
3567
3612
echo "preadv support $preadv"
3586
3631
echo "build guest agent $guest_agent"
3587
3632
echo "seccomp support $seccomp"
3588
3633
echo "coroutine backend $coroutine"
3634
echo "coroutine pool $coroutine_pool"
3589
3635
echo "GlusterFS support $glusterfs"
3590
3636
echo "virtio-blk-data-plane $virtio_blk_data_plane"
3591
3637
echo "gcov $gcov_tool"
3620
3665
echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
3621
3666
echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
3622
3667
echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
3623
echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
3668
if test "$mingw32" = "no" ; then
3669
echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
3624
3671
echo "qemu_helperdir=$libexecdir" >> $config_host_mak
3625
3672
echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak
3626
3673
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
3630
3677
echo "ARCH=$ARCH" >> $config_host_mak
3633
arm|i386|x86_64|ppc)
3680
arm|i386|x86_64|ppc|aarch64)
3634
3681
# The TCG interpreter currently does not support ld/st optimization.
3635
3682
if test "$tcg_interpreter" = "no" ; then
3636
3683
echo "CONFIG_QEMU_LDST_OPTIMIZATION=y" >> $config_host_mak
3713
3760
if test "$audio_win_int" = "yes" ; then
3714
3761
echo "CONFIG_AUDIO_WIN_INT=y" >> $config_host_mak
3716
echo "CONFIG_BDRV_WHITELIST=$block_drv_whitelist" >> $config_host_mak
3763
echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
3764
echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
3717
3765
if test "$mixemu" = "yes" ; then
3718
3766
echo "CONFIG_MIXEMU=y" >> $config_host_mak
3763
3811
if test "$curses" = "yes" ; then
3764
3812
echo "CONFIG_CURSES=y" >> $config_host_mak
3766
if test "$atfile" = "yes" ; then
3767
echo "CONFIG_ATFILE=y" >> $config_host_mak
3769
3814
if test "$utimens" = "yes" ; then
3770
3815
echo "CONFIG_UTIMENSAT=y" >> $config_host_mak
3938
3983
echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
3984
if test "$coroutine_pool" = "yes" ; then
3985
echo "CONFIG_COROUTINE_POOL=1" >> $config_host_mak
3987
echo "CONFIG_COROUTINE_POOL=0" >> $config_host_mak
3940
3990
if test "$open_by_handle_at" = "yes" ; then
3941
3991
echo "CONFIG_OPEN_BY_HANDLE=y" >> $config_host_mak
3973
4023
echo "CONFIG_GLUSTERFS=y" >> $config_host_mak
4026
if test "$glusterfs_discard" = "yes" ; then
4027
echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
3976
4030
if test "$libssh2" = "yes" ; then
3977
4031
echo "CONFIG_LIBSSH2=y" >> $config_host_mak
4047
4101
echo "CONFIG_TRACE_DEFAULT=y" >> $config_host_mak
4104
if test "$rdma" = "yes" ; then
4105
echo "CONFIG_RDMA=y" >> $config_host_mak
4050
4108
if test "$tcg_interpreter" = "yes"; then
4051
4109
QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
4052
4110
elif test "$ARCH" = "sparc64" ; then
4111
4169
echo "GCOV=$gcov_tool" >> $config_host_mak
4114
# generate list of library paths for linker script
4116
$ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld}
4118
if test -f ${config_host_ld}~ ; then
4119
if cmp -s $config_host_ld ${config_host_ld}~ ; then
4120
mv ${config_host_ld}~ $config_host_ld
4122
rm ${config_host_ld}~
4126
4172
# use included Linux headers
4127
4173
if test "$linux" = "yes" ; then
4128
4174
mkdir -p linux-headers
4150
4199
for target in $target_list; do
4151
4200
target_dir="$target"
4152
4201
config_target_mak=$target_dir/config-target.mak
4153
target_arch2=`echo $target | cut -d '-' -f 1`
4202
target_name=`echo $target | cut -d '-' -f 1`
4154
4203
target_bigendian="no"
4156
case "$target_arch2" in
4205
case "$target_name" in
4157
4206
armeb|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or32|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
4158
4207
target_bigendian=yes
4163
4212
target_linux_user="no"
4164
4213
target_bsd_user="no"
4165
4214
case "$target" in
4166
${target_arch2}-softmmu)
4215
${target_name}-softmmu)
4167
4216
target_softmmu="yes"
4169
${target_arch2}-linux-user)
4218
${target_name}-linux-user)
4170
4219
if test "$linux" != "yes" ; then
4171
4220
error_exit "Target '$target' is only available on a Linux host"
4173
4222
target_user_only="yes"
4174
4223
target_linux_user="yes"
4176
${target_arch2}-bsd-user)
4225
${target_name}-bsd-user)
4177
4226
if test "$bsd" != "yes" ; then
4178
4227
error_exit "Target '$target' is only available on a BSD host"
4190
4239
echo "# Automatically generated by configure - do not modify" > $config_target_mak
4194
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
4242
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_name/g"`
4195
4243
gdb_xml_files=""
4197
TARGET_ARCH="$target_arch2"
4245
TARGET_ARCH="$target_name"
4198
4246
TARGET_BASE_ARCH=""
4199
4247
TARGET_ABI_DIR=""
4201
case "$target_arch2" in
4249
case "$target_name" in
4205
4253
TARGET_BASE_ARCH=i386
4211
4258
TARGET_ARCH=arm
4214
4260
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
4310
4349
echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
4313
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
4314
4352
target_arch_name="`upper $TARGET_ARCH`"
4315
4353
echo "TARGET_$target_arch_name=y" >> $config_target_mak
4316
echo "TARGET_ARCH2=$target_arch2" >> $config_target_mak
4317
echo "TARGET_TYPE=TARGET_TYPE_`upper $target_arch2`" >> $config_target_mak
4354
echo "TARGET_NAME=$target_name" >> $config_target_mak
4318
4355
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
4319
4356
if [ "$TARGET_ABI_DIR" = "" ]; then
4320
4357
TARGET_ABI_DIR=$TARGET_ARCH
4322
4359
echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak
4323
case "$target_arch2" in
4360
case "$target_name" in
4325
4362
if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then
4326
4363
echo "CONFIG_XEN=y" >> $config_target_mak
4334
case "$target_arch2" in
4371
case "$target_name" in
4335
4372
arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
4336
4373
# Make sure the target and host cpus are compatible
4337
4374
if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
4338
\( "$target_arch2" = "$cpu" -o \
4339
\( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
4340
\( "$target_arch2" = "ppc64" -a "$cpu" = "ppc" \) -o \
4341
\( "$target_arch2" = "ppc" -a "$cpu" = "ppc64" \) -o \
4342
\( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
4343
\( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
4344
\( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
4375
\( "$target_name" = "$cpu" -o \
4376
\( "$target_name" = "ppcemb" -a "$cpu" = "ppc" \) -o \
4377
\( "$target_name" = "ppc64" -a "$cpu" = "ppc" \) -o \
4378
\( "$target_name" = "ppc" -a "$cpu" = "ppc64" \) -o \
4379
\( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
4380
\( "$target_name" = "x86_64" -a "$cpu" = "i386" \) -o \
4381
\( "$target_name" = "i386" -a "$cpu" = "x86_64" \) \) ; then
4345
4382
echo "CONFIG_KVM=y" >> $config_target_mak
4346
4383
if test "$vhost_net" = "yes" ; then
4347
4384
echo "CONFIG_VHOST_NET=y" >> $config_target_mak
4351
case "$target_arch2" in
4353
echo "CONFIG_HAVE_GET_MEMORY_MAPPING=y" >> $config_target_mak
4355
4388
if test "$target_bigendian" = "yes" ; then
4356
4389
echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
4358
4391
if test "$target_softmmu" = "yes" ; then
4359
4392
echo "CONFIG_SOFTMMU=y" >> $config_target_mak
4360
case "$target_arch2" in
4362
echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
4365
4394
if test "$target_user_only" = "yes" ; then
4366
4395
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
4380
4409
if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
4381
4410
echo "TARGET_HAS_BFLT=y" >> $config_target_mak
4383
if test "$target_user_only" = "yes" \
4384
-a "$nptl" = "yes" -a "$target_nptl" = "yes"; then
4385
echo "CONFIG_USE_NPTL=y" >> $config_target_mak
4387
4412
if test "$target_user_only" = "yes" -a "$guest_base" = "yes"; then
4388
4413
echo "CONFIG_USE_GUEST_BASE=y" >> $config_target_mak
4495
if test "$ARCH" = "tci"; then
4498
linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/ldscripts/\$(ARCH).ld"
4501
4520
if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
4504
# The default placement of the application is fine.
4507
ldflags="$linker_script $ldflags"
4521
ldflags="$ldflags $textseg_ldflags"
4512
4524
echo "LDFLAGS+=$ldflags" >> $config_target_mak
4518
4530
echo "config-host.h: subdir-pixman" >> $config_host_mak
4533
if test "$rdma" = "yes" ; then
4534
echo "CONFIG_RDMA=y" >> $config_host_mak
4521
4537
if [ "$dtc_internal" = "yes" ]; then
4522
4538
echo "config-host.h: subdir-dtc" >> $config_host_mak
4525
4541
# build tree in object directory in case the source is not in the current directory
4526
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos"
4542
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa"
4527
4543
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
4528
4544
DIRS="$DIRS roms/seabios roms/vgabios"
4529
4545
DIRS="$DIRS qapi-generated"
4530
4546
FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
4531
4547
FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
4532
FILES="$FILES tests/tcg/lm32/Makefile po/Makefile"
4548
FILES="$FILES tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
4533
4549
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
4534
4550
FILES="$FILES pc-bios/spapr-rtas/Makefile"
4535
4551
FILES="$FILES pc-bios/s390-ccw/Makefile"