aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-03-28 13:46:28 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-03-28 13:46:29 +0000
commit3b6144bdbb42705c95e3ed0e8c7bbe277352c0b8 (patch)
tree0935c432e4e47e4f98f77453fb04a4816182559c /configure
parent9c5793c5036c7608ff2c87846c6d11f904c08b58 (diff)
parentb89834f4d79070a26536cb73fe5216a2364551eb (diff)
downloadqemu-3b6144bdbb42705c95e3ed0e8c7bbe277352c0b8.zip
qemu-3b6144bdbb42705c95e3ed0e8c7bbe277352c0b8.tar.gz
qemu-3b6144bdbb42705c95e3ed0e8c7bbe277352c0b8.tar.bz2
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi,pc,build bug fixes Here are some bugfixes for 2.0. A bugfix for acpi for pci bridges, and a build fix for old systems without pthread_setname_np: both fix regressions so we definitely want to include them. HPET fix is not for a regression but looks very safe, fixes a nasty bug and has been on list for a while. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 28 Mar 2014 12:00:12 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: acpi: fix ACPI generation for pci bridges Don't enable a HPET timer if HPET is disabled Detect pthread_setname_np at configure time Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure b/configure
index 5eaa802..fb3bd05 100755
--- a/configure
+++ b/configure
@@ -2712,6 +2712,24 @@ 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
+
##########################################
# rbd probe
if test "$rbd" != "no" ; then
@@ -4648,6 +4666,16 @@ if test "$rdma" = "yes" ; then
echo "CONFIG_RDMA=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