diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2022-03-20 12:02:14 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-03-28 22:52:59 +0200 |
commit | f03560a57c1f60db6ac23ffd9714e1c69e2f95c7 (patch) | |
tree | f39538af7642ebd4b7435821e46f6a3b85345367 /tools/virtio | |
parent | tools/virtio: fix after premapped buf support (diff) | |
download | linux-f03560a57c1f60db6ac23ffd9714e1c69e2f95c7.tar.xz linux-f03560a57c1f60db6ac23ffd9714e1c69e2f95c7.zip |
tools/virtio: compile with -pthread
When using pthreads, one has to compile and link with -lpthread,
otherwise e.g. glibc is not guaranteed to be reentrant.
This replaces -lpthread.
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio')
-rw-r--r-- | tools/virtio/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile index 0d7bbe49359d..1b25cc7c64bb 100644 --- a/tools/virtio/Makefile +++ b/tools/virtio/Makefile @@ -5,7 +5,8 @@ virtio_test: virtio_ring.o virtio_test.o vringh_test: vringh_test.o vringh.o virtio_ring.o CFLAGS += -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -LDFLAGS += -lpthread +CFLAGS += -pthread +LDFLAGS += -pthread vpath %.c ../../drivers/virtio ../../drivers/vhost mod: ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test V=${V} |