cleanup qemu/configure
This commit is contained in:
parent
9735c6e28e
commit
37410d02f1
205
qemu/configure
vendored
205
qemu/configure
vendored
@ -174,9 +174,7 @@ linux="no"
|
||||
solaris="no"
|
||||
softmmu="yes"
|
||||
aix="no"
|
||||
pkgversion=""
|
||||
pie=""
|
||||
zero_malloc=""
|
||||
|
||||
# parse CC options first
|
||||
for opt do
|
||||
@ -552,8 +550,6 @@ for opt do
|
||||
;;
|
||||
--disable-stack-protector) stack_protector="no"
|
||||
;;
|
||||
--with-pkgversion=*) pkgversion=" ($optarg)"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: unknown option $opt"
|
||||
echo "Try '$0 --help' for more information"
|
||||
@ -953,99 +949,6 @@ if test "$mingw32" != yes -a "$pthread" = no; then
|
||||
"Make sure to have the pthread libs and headers installed."
|
||||
fi
|
||||
|
||||
# check for pthread_setname_np
|
||||
pthread_setname_np=no
|
||||
cat > $TMPC << EOF
|
||||
#include <pthread.h>
|
||||
|
||||
static void *f(void *p) { return NULL; }
|
||||
int main(void)
|
||||
{
|
||||
pthread_t thread;
|
||||
pthread_create(&thread, 0, f, 0);
|
||||
pthread_setname_np(thread, "QEMU");
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "$pthread_lib" ; then
|
||||
pthread_setname_np=yes
|
||||
fi
|
||||
|
||||
# check if pipe2 is there
|
||||
pipe2=no
|
||||
cat > $TMPC << EOF
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int pipefd[2];
|
||||
return pipe2(pipefd, O_CLOEXEC);
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
pipe2=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# signalfd probe
|
||||
signalfd="no"
|
||||
cat > $TMPC << EOF
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <signal.h>
|
||||
int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }
|
||||
EOF
|
||||
|
||||
if compile_prog "" "" ; then
|
||||
signalfd=yes
|
||||
fi
|
||||
|
||||
# check if eventfd is supported
|
||||
eventfd=no
|
||||
cat > $TMPC << EOF
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
eventfd=yes
|
||||
fi
|
||||
|
||||
# check for ppoll support
|
||||
ppoll=no
|
||||
cat > $TMPC << EOF
|
||||
#include <poll.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct pollfd pfd = { .fd = 0, .events = 0, .revents = 0 };
|
||||
ppoll(&pfd, 1, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
ppoll=yes
|
||||
fi
|
||||
|
||||
# check for prctl(PR_SET_TIMERSLACK , ... ) support
|
||||
prctl_pr_set_timerslack=no
|
||||
cat > $TMPC << EOF
|
||||
#include <sys/prctl.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
prctl_pr_set_timerslack=yes
|
||||
fi
|
||||
|
||||
# Search for bswap_32 function
|
||||
byteswap_h=no
|
||||
cat > $TMPC << EOF
|
||||
@ -1109,46 +1012,6 @@ if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
|
||||
libs_softmmu="-lutil $libs_softmmu"
|
||||
fi
|
||||
|
||||
########################################
|
||||
# check if we have linux/magic.h
|
||||
|
||||
linux_magic_h=no
|
||||
cat > $TMPC << EOF
|
||||
#include <linux/magic.h>
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
linux_magic_h=yes
|
||||
fi
|
||||
|
||||
########################################
|
||||
# check whether we can disable warning option with a pragma (this is needed
|
||||
# to silence warnings in the headers of some versions of external libraries).
|
||||
# This test has to be compiled with -Werror as otherwise an unknown pragma is
|
||||
# only a warning.
|
||||
#
|
||||
# If we can't selectively disable warning in the code, disable -Werror so that
|
||||
# the build doesn't fail anyway.
|
||||
|
||||
pragma_disable_unused_but_set=no
|
||||
cat > $TMPC << EOF
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "-Werror" "" ; then
|
||||
pragma_diagnostic_available=yes
|
||||
else
|
||||
werror=no
|
||||
fi
|
||||
|
||||
########################################
|
||||
# check if we have valgrind/valgrind.h
|
||||
|
||||
@ -1163,21 +1026,6 @@ if compile_prog "" "" ; then
|
||||
valgrind_h=yes
|
||||
fi
|
||||
|
||||
########################################
|
||||
# check if environ is declared
|
||||
|
||||
has_environ=no
|
||||
cat > $TMPC << EOF
|
||||
#include <unistd.h>
|
||||
int main(void) {
|
||||
environ = 0;
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
has_environ=yes
|
||||
fi
|
||||
|
||||
########################################
|
||||
# check if cpuid.h is usable.
|
||||
|
||||
@ -1226,17 +1074,6 @@ if compile_prog "" "" ; then
|
||||
int128=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# Disable zero malloc errors for official releases unless explicitly told to
|
||||
# enable/disable
|
||||
if test -z "$zero_malloc" ; then
|
||||
if test "$z_version" = "50" ; then
|
||||
zero_malloc="no"
|
||||
else
|
||||
zero_malloc="yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now we've finished running tests it's OK to add -Werror to the compiler flags
|
||||
if test "$werror" = "yes"; then
|
||||
QEMU_CFLAGS="-Werror $QEMU_CFLAGS"
|
||||
@ -1342,30 +1179,14 @@ if test "$static" = "yes" ; then
|
||||
fi
|
||||
qemu_version=`head $source_path/VERSION`
|
||||
echo "VERSION=$qemu_version" >>$config_host_mak
|
||||
echo "PKGVERSION=$pkgversion" >>$config_host_mak
|
||||
echo "SRC_PATH=$source_path" >> $config_host_mak
|
||||
echo "TARGET_DIRS=$target_list" >> $config_host_mak
|
||||
if test "$pipe2" = "yes" ; then
|
||||
echo "CONFIG_PIPE2=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$eventfd" = "yes" ; then
|
||||
echo "CONFIG_EVENTFD=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$ppoll" = "yes" ; then
|
||||
echo "CONFIG_PPOLL=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$prctl_pr_set_timerslack" = "yes" ; then
|
||||
echo "CONFIG_PRCTL_PR_SET_TIMERSLACK=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$byteswap_h" = "yes" ; then
|
||||
echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$bswap_h" = "yes" ; then
|
||||
echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$signalfd" = "yes" ; then
|
||||
echo "CONFIG_SIGNALFD=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$tcg_interpreter" = "yes" ; then
|
||||
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
|
||||
fi
|
||||
@ -1375,26 +1196,10 @@ if [ "$bsd" = "yes" ] ; then
|
||||
echo "CONFIG_BSD=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$zero_malloc" = "yes" ; then
|
||||
echo "CONFIG_ZERO_MALLOC=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$linux_magic_h" = "yes" ; then
|
||||
echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$pragma_diagnostic_available" = "yes" ; then
|
||||
echo "CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$valgrind_h" = "yes" ; then
|
||||
echo "CONFIG_VALGRIND_H=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$has_environ" = "yes" ; then
|
||||
echo "CONFIG_HAS_ENVIRON=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$cpuid_h" = "yes" ; then
|
||||
echo "CONFIG_CPUID_H=y" >> $config_host_mak
|
||||
fi
|
||||
@ -1403,16 +1208,6 @@ if test "$int128" = "yes" ; then
|
||||
echo "CONFIG_INT128=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
# Hold two types of flag:
|
||||
# CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on
|
||||
# a thread we have a handle to
|
||||
# CONFIG_PTHREAD_SETNAME_NP - A way of doing it on a particular
|
||||
# platform
|
||||
if test "$pthread_setname_np" = "yes" ; then
|
||||
echo "CONFIG_THREAD_SETNAME_BYTHREAD=y" >> $config_host_mak
|
||||
echo "CONFIG_PTHREAD_SETNAME_NP=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$tcg_interpreter" = "yes"; then
|
||||
QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
|
||||
elif test "$ARCH" = "sparc64" ; then
|
||||
|
Loading…
Reference in New Issue
Block a user