From patchwork Fri Jan 27 07:21:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 9540641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD71A60415 for ; Fri, 27 Jan 2017 07:21:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEF2A2582C for ; Fri, 27 Jan 2017 07:21:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3ABB27F8F; Fri, 27 Jan 2017 07:21:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 335512582C for ; Fri, 27 Jan 2017 07:21:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EE2C6E30D; Fri, 27 Jan 2017 07:21:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 42F886E30D for ; Fri, 27 Jan 2017 07:21:26 +0000 (UTC) Received: by mail-pg0-x235.google.com with SMTP id 14so79251305pgg.1 for ; Thu, 26 Jan 2017 23:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=W6eQltnP1nrqbyPRrwPTpqLvJ4JWCwLNn8ro7sw+Ndc=; b=cVC7MRB0s/z6mIWWHK97nb8e2HxbLd2Sc3ab0PBiiyBd8sE3hvFKRaHbXGEKRCjGEF 6PzDGKB7wMbffGqcpjuk0srwC381krg/dGMOHZPw+7fL7DVlSNFYDMOrri3X0MTVV4jb POtec6tJExaPo+avPSPFoibwgvilKqhkNKidE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W6eQltnP1nrqbyPRrwPTpqLvJ4JWCwLNn8ro7sw+Ndc=; b=iH7frO2X37iGF6KyBZaDiHx2/LeSyFc0uci8nDW+Rv3AKT8u08sQGNYMW7dD+icVux YYD/aBDzxy658YykMxrSyvgWQJCIR76KrAJBCfIUgxBFbUZIUPIR6z/TQxhvx0gdGhMd rjpqvK2ZQ3D/iZp92kxI+wZiuSlE7FP0cMo4OU0w0SrzcFG2MAsvjl05aGnSq/8oVy45 ue/T8RLKSyZaBrpGfLyGZL2URp49wWvn/niJQe17SreoT+Wt6TYQ5wZSdCV4JDZmScIy cvlnzweef7UCFDrv8OtXYQvpdnTDweYu+dwKU7RqdgyQkm0+jCv7hxEwB+Eeow8BWwZy EVJA== X-Gm-Message-State: AIkVDXJskiRsiyolcarJ1ySZ18dw0AcaNFIMXHOH+d5Y0ifoGg0jxzilSj8QXqPOBc70EXTc X-Received: by 10.99.185.74 with SMTP id v10mr7844238pgo.98.1485501685609; Thu, 26 Jan 2017 23:21:25 -0800 (PST) Received: from basement.tok.corp.google.com ([100.103.3.207]) by smtp.gmail.com with ESMTPSA id d128sm8332447pfg.56.2017.01.26.23.21.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Jan 2017 23:21:25 -0800 (PST) From: Tomasz Figa To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] tests: Use -pthread in CFLAGS instead of -lpthread Date: Fri, 27 Jan 2017 16:21:19 +0900 Message-Id: <20170127072119.23629-1-tfiga@chromium.org> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Cc: Emil Velikov , Hyungwon Hwang , Tomasz Figa X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP -lpthread is not always a valid flag to pull pthread support, especially on Android it will fail to link due to a missing libpthread.so. The more generic way to build-in pthread support is to use the -pthread CFLAG, so let's use it instead. Signed-off-by: Tomasz Figa --- tests/exynos/Makefile.am | 4 ++-- tests/modetest/Makefile.am | 4 ++-- tests/nouveau/Makefile.am | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/exynos/Makefile.am b/tests/exynos/Makefile.am index 357d6b8c..b6361727 100644 --- a/tests/exynos/Makefile.am +++ b/tests/exynos/Makefile.am @@ -1,4 +1,5 @@ AM_CFLAGS = \ + -pthread \ $(WARN_CFLAGS)\ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/libkms/ \ @@ -34,8 +35,7 @@ exynos_fimg2d_perf_LDADD = \ exynos_fimg2d_event_LDADD = \ $(top_builddir)/libdrm.la \ - $(top_builddir)/exynos/libdrm_exynos.la \ - -lpthread + $(top_builddir)/exynos/libdrm_exynos.la exynos_fimg2d_test_LDADD = \ $(top_builddir)/libdrm.la \ diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am index 9686ccb9..4b296c83 100644 --- a/tests/modetest/Makefile.am +++ b/tests/modetest/Makefile.am @@ -3,6 +3,7 @@ include Makefile.sources AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS)) AM_CFLAGS += \ + -pthread \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir) @@ -20,5 +21,4 @@ modetest_SOURCES = $(MODETEST_FILES) modetest_LDADD = \ $(top_builddir)/libdrm.la \ $(top_builddir)/tests/util/libutil.la \ - $(CAIRO_LIBS) \ - -lpthread + $(CAIRO_LIBS) diff --git a/tests/nouveau/Makefile.am b/tests/nouveau/Makefile.am index c4f6e299..593acef0 100644 --- a/tests/nouveau/Makefile.am +++ b/tests/nouveau/Makefile.am @@ -1,4 +1,5 @@ AM_CPPFLAGS = \ + -pthread \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/nouveau \ -I$(top_srcdir) @@ -8,7 +9,7 @@ AM_CFLAGS = $(WARN_CFLAGS) LDADD = \ ../../nouveau/libdrm_nouveau.la \ ../../libdrm.la \ - -ldl -lpthread + -ldl TESTS = threaded