From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A73DC433EF for ; Thu, 7 Apr 2022 01:13:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id ADBBB60F41; Thu, 7 Apr 2022 01:13:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RzHNc6He5UAJ; Thu, 7 Apr 2022 01:13:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 634BA60C03; Thu, 7 Apr 2022 01:13:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 39F37C001D; Thu, 7 Apr 2022 01:13:44 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1E52CC0012 for ; Thu, 7 Apr 2022 01:13:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0CF4D80D47 for ; Thu, 7 Apr 2022 01:13:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BVpdAz2_J2tT for ; Thu, 7 Apr 2022 01:13:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8A67480C63 for ; Thu, 7 Apr 2022 01:13:42 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CCA3161DAB; Thu, 7 Apr 2022 01:13:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E1B7C385A3; Thu, 7 Apr 2022 01:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649294021; bh=ssJYHvkpscxFMbUpBVyB4ceTVTGzImrTC1CGpjG5HWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jH5hi8qd6TU6B/t2r2BuTuLE9LQrfe7cJaNHyXfLco0ly50kVoLqmbM6xiU7KLGnv 2sync81WJVzMRtsPz8nELaudbi81tMeltzAOzmjoj+6SZEg3qZ5wVo7ucJULbMMdGk gzcfM3GN5ko3SpLnqa0avTDfxyjzzR7DZQioX7E3j6UrnMGPi9Om3iwEtSzF9YuMRj XCdGiZB4q5PRyw3Eyjb79KFzLxrZbFOIBgApEUtcpLhrz6Lo4puT0fU00Ravq65O22 8bdGwhBbhZne/UhVw2GryMoP7Pv8LSOxEvDh05zBFLM99hT0iEylIoy8IQ9Z8wqGT4 7/Vk2Fap9YFxw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 17/27] tools/virtio: compile with -pthread Date: Wed, 6 Apr 2022 21:12:47 -0400 Message-Id: <20220407011257.114287-17-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407011257.114287-1-sashal@kernel.org> References: <20220407011257.114287-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Cc: Sasha Levin , virtualization@lists.linux-foundation.org, Matthew Wilcox , "Michael S. Tsirkin" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" From: "Michael S. Tsirkin" [ Upstream commit f03560a57c1f60db6ac23ffd9714e1c69e2f95c7 ] 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 Signed-off-by: Michael S. Tsirkin Signed-off-by: Sasha Levin --- tools/virtio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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} -- 2.35.1 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BD11C433EF for ; Thu, 7 Apr 2022 01:22:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238822AbiDGBX6 (ORCPT ); Wed, 6 Apr 2022 21:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238843AbiDGBSi (ORCPT ); Wed, 6 Apr 2022 21:18:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4691A1A1281; Wed, 6 Apr 2022 18:13:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CFECF61DB0; Thu, 7 Apr 2022 01:13:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E1B7C385A3; Thu, 7 Apr 2022 01:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649294021; bh=ssJYHvkpscxFMbUpBVyB4ceTVTGzImrTC1CGpjG5HWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jH5hi8qd6TU6B/t2r2BuTuLE9LQrfe7cJaNHyXfLco0ly50kVoLqmbM6xiU7KLGnv 2sync81WJVzMRtsPz8nELaudbi81tMeltzAOzmjoj+6SZEg3qZ5wVo7ucJULbMMdGk gzcfM3GN5ko3SpLnqa0avTDfxyjzzR7DZQioX7E3j6UrnMGPi9Om3iwEtSzF9YuMRj XCdGiZB4q5PRyw3Eyjb79KFzLxrZbFOIBgApEUtcpLhrz6Lo4puT0fU00Ravq65O22 8bdGwhBbhZne/UhVw2GryMoP7Pv8LSOxEvDh05zBFLM99hT0iEylIoy8IQ9Z8wqGT4 7/Vk2Fap9YFxw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Michael S. Tsirkin" , Matthew Wilcox , Sasha Levin , jasowang@redhat.com, virtualization@lists.linux-foundation.org Subject: [PATCH AUTOSEL 5.15 17/27] tools/virtio: compile with -pthread Date: Wed, 6 Apr 2022 21:12:47 -0400 Message-Id: <20220407011257.114287-17-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407011257.114287-1-sashal@kernel.org> References: <20220407011257.114287-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Michael S. Tsirkin" [ Upstream commit f03560a57c1f60db6ac23ffd9714e1c69e2f95c7 ] 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 Signed-off-by: Michael S. Tsirkin Signed-off-by: Sasha Levin --- tools/virtio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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} -- 2.35.1