From patchwork Tue Feb 28 17:10:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zakharov Vlad X-Patchwork-Id: 733660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vXlTm4FJQz9s8C for ; Wed, 1 Mar 2017 04:11:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E463684418; Tue, 28 Feb 2017 17:11:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H4ZDWZXWr2WA; Tue, 28 Feb 2017 17:11:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id EB873843F1; Tue, 28 Feb 2017 17:11:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1025E1C2B87 for ; Tue, 28 Feb 2017 17:11:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0B71484374 for ; Tue, 28 Feb 2017 17:11:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fxhEUpGPBst3 for ; Tue, 28 Feb 2017 17:10:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.47.9]) by whitealder.osuosl.org (Postfix) with ESMTPS id 377BF8434B for ; Tue, 28 Feb 2017 17:10:59 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 7C8D024E16F3; Tue, 28 Feb 2017 09:10:58 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 5EB6E701; Tue, 28 Feb 2017 09:10:58 -0800 (PST) Received: from vzakhar-8460.internal.synopsys.com (vzakhar-8460.internal.synopsys.com [10.121.8.100]) by mailhost.synopsys.com (Postfix) with ESMTP id A61CD6CA; Tue, 28 Feb 2017 09:10:56 -0800 (PST) From: Vlad Zakharov To: buildroot@busybox.net Date: Tue, 28 Feb 2017 20:10:53 +0300 Message-Id: <1488301853-24154-1-git-send-email-vzakhar@synopsys.com> X-Mailer: git-send-email 2.7.4 Cc: Thomas Petazzoni , Vlad Zakharov , Alexey Brodkin Subject: [Buildroot] [PATCH] mpd: fix build for ARC X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" mpd package fails for both internal and external ARC toolchain as check for pthread support fails. Such checks fails because _REENTRANT flag is not defined in gcc even when -pthread is passed. So we add patch to gcc that defines _REENTRANT on ARC when -pthread is passed. Also it disables mpd package for external ARC toolchain as it fails due to the same issue. This patch should be reverted as soon as the patch for GCC becomes a part of ARC toolchain. Fixes: http://autobuild.buildroot.net/results/7d7/7d70b62ad996830fbeca46dffcc7a1dc030e575d// Signed-off-by: Vlad Zakharov --- ...-define-_REENTRANT-when-pthread-is-passed.patch | 33 ++++++++++++++++++++++ package/mpd/Config.in | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch diff --git a/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch b/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch new file mode 100644 index 0000000..28e6a2d --- /dev/null +++ b/package/gcc/arc-2016.09-release/895-arc-define-_REENTRANT-when-pthread-is-passed.patch @@ -0,0 +1,33 @@ +From 4c6367c99461fdd7bd5613483f2582d7f08fba87 Mon Sep 17 00:00:00 2001 +From: Vlad Zakharov +Date: Tue, 28 Feb 2017 17:41:11 +0300 +Subject: [PATCH] arc: define _REENTRANT when -pthread is passed + +The compiler is supposed to have the builtin defined _REENTRANT defined +when -pthread is passed, which wasn't done on the ARC architecture. + +When _REENTRANT is not passed, the C library will not use reentrant +functions, and the latest version of ax_pthread.m4 from the +autoconf-archive will no longer detect that thread support is +available (see https://savannah.gnu.org/patch/?8186). + +Signed-off-by: Thomas Petazzoni +--- + gcc/config/arc/arc.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h +index 611ef54..fdd4b5d 100644 +--- a/gcc/config/arc/arc.h ++++ b/gcc/config/arc/arc.h +@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see + %{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \ + %{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \ + %{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \ ++%{pthread:-D_REENTRANT} \ + %{mcpu=nps400:-D__NPS400__}" + + #define CC1_SPEC "\ +-- +2.7.4 + diff --git a/package/mpd/Config.in b/package/mpd/Config.in index 8eabbbc..0c73548 100644 --- a/package/mpd/Config.in +++ b/package/mpd/Config.in @@ -8,6 +8,8 @@ menuconfig BR2_PACKAGE_MPD # 0.19.x could be built with GCC 4.6, but for simplicity we require # the same toolchain dependencies for all versions. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14 + # ARC toolchain issue + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC select BR2_PACKAGE_BOOST select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_MPD_TREMOR if !(BR2_PACKAGE_MPD_MAD || BR2_PACKAGE_MPD_MPG123 || BR2_PACKAGE_MPD_VORBIS || BR2_PACKAGE_MPD_WAVPACK || BR2_PACKAGE_MPD_FLAC || BR2_PACKAGE_MPD_MUSEPACK || BR2_PACKAGE_MPD_FFMPEG) @@ -339,3 +341,4 @@ comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.9" depends on BR2_TOOLCHAIN_HAS_ATOMIC depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC