Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2125034ioo; Mon, 23 May 2022 10:36:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX5fKYLP2yaGJaNOhTTo8F7UYLpoqtjFe4x5pycaPuRG8im9am64hgnA6gxo8+03S0XDVN X-Received: by 2002:a17:90b:1c12:b0:1df:d7e9:2edd with SMTP id oc18-20020a17090b1c1200b001dfd7e92eddmr110895pjb.35.1653327372918; Mon, 23 May 2022 10:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653327372; cv=none; d=google.com; s=arc-20160816; b=tV8ZoHWwOolzdm0XhghukBc7BA20p6QUizIRcTZof2raZXhkhF1IzolGLjhrdy5Sdn v0/CYt4ROFFtGNdPVOBRgLIBkSvsoUTLLx3v4y3K6/JKNm+9aIlmZHQSyrLrp0vmGt/Y wY0oquxhS8f8q4ZeAB4Y18YqxRG/qswZ/t8DywuXw221x1fYFOK0IMng36b4LixmJEh8 EOX4qX9z++X4ESPwRNZfQ7bbb5hls9NtwmSntqzAYvwuHWxojBvXFW6e7GAdSiQx0xVY qGfnazhZN1ArGQnLTGyvB/JsYofY4iYqQ93g8cShimTqKAtzqcy76ztiz2Ei975YNPNt QaHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o5+YIhm+GN3pedF9Oznztj8W5FrUYyRnAODRxoBlc28=; b=EjT5K8tXLh1qKkDflACXB+Mt6TTfkBh2dYne+/GuaXg6TnOx+BiDV19kh6vVQwVAME xP6v6fOedZKV+/MXvu75sDDyzWpcANjQ8uZliXu/232l8ZCQ5STd/YChwMgcCmgn/dlc wYVV3g4uBjMV6pZh9GoHrPbMWoKz1qyKwHhsiZET0x3vfU4RAkMVF8cpYugA7v4y5pDW x3g3IBRPZW7SIZxiqG6iZmZjSNm57K9whTQ7mgzKXW/OzzO6eDLj8/wfJuRKtBRjZ5lH V52MhvWTCHpAeLCYa9uktm6+FcdLlnD9Uz+MWKDkwMAsAjPSqfJOXJHQzsatwi5VPclc JpXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IAoVESHf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bt23-20020a056a00439700b00505ad6b7610si12015536pfb.63.2022.05.23.10.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:36:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IAoVESHf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ACD849D4EC; Mon, 23 May 2022 10:35:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241151AbiEWRcp (ORCPT + 99 others); Mon, 23 May 2022 13:32:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241551AbiEWRW2 (ORCPT ); Mon, 23 May 2022 13:22:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAF4978929; Mon, 23 May 2022 10:19:07 -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 ams.source.kernel.org (Postfix) with ESMTPS id 7A853B8121F; Mon, 23 May 2022 17:19:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB1B6C34115; Mon, 23 May 2022 17:19:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326346; bh=KRlYvPWMEKkubzqIFj6i84D49RI0Jy5hTL0Q+gTJ6io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IAoVESHfdOZFGTH0L6M5+Zvu7x9i2mEZqMUSXQRprykbUnK/ZPv8M8Irf2lQDOaHx sGeTyACcV0mC1XutfnCKA+59S5F+OsTqeYRRyFLo2TekcuuYwzvzMbhz2D06uV8w3A U+WNh8n2mCFqfXML8gi9xURwuOcgn+NdLS+Z25YE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthew Wilcox , "Michael S. Tsirkin" , Sasha Levin Subject: [PATCH 5.15 033/132] tools/virtio: compile with -pthread Date: Mon, 23 May 2022 19:04:02 +0200 Message-Id: <20220523165828.982726057@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165823.492309987@linuxfoundation.org> References: <20220523165823.492309987@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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