From patchwork Wed Jun 7 19:25:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 772677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wjdnZ4vHjz9s2G for ; Thu, 8 Jun 2017 05:25:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b="q/SK9Ao8"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5DF4489476; Wed, 7 Jun 2017 19:25:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qQNuOMrmDrXu; Wed, 7 Jun 2017 19:25:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 91BEA89493; Wed, 7 Jun 2017 19:25:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 853531C3EBA for ; Wed, 7 Jun 2017 19:25:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7D6FF8471E for ; Wed, 7 Jun 2017 19:25:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z0RMnZfZ14Bv for ; Wed, 7 Jun 2017 19:25:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2D1EA8470D for ; Wed, 7 Jun 2017 19:25:49 +0000 (UTC) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3wjdnP1jh0z104B for ; Wed, 7 Jun 2017 21:25:44 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1496863543; x=1497468344; bh=3KQwZmhKY5BWFnaT9J0DAZsjwXYOdXRdcDX1Zc6s3WE=; b=q/SK9Ao80mSn pXHbcLsLXNVBv+ASNpYS3DlmmpgckqZFwYjpGTLfmd9xpn9GLVhz4LCS+XUWCcg/ 7Y+aLIps4c3jEmJSuPWU702C/62CWQj/lGQvewmV7HmOFMzsMwyys6PU8ZN4FKG+ tENzmYn4VeA1cg8lALScnqHzbo1LbMC+JOOGZmg908Xjf8SFZrK0ygJi3EfPpNfn 2v2s7+O4KXSkjOvV6cEKxXMKDAB1gHKbzuvuuC9RUGeP3MjwwM9rOAsAdP0+xdWT RPiPjNrgRLYNR9OnFr1xH+EEGUpZnrm+7OGZQREeBUudc+qFpNBORFSzL5/osf7w 1GhXk+G+LA== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id KW6K6kNaH4Ms; Wed, 7 Jun 2017 21:25:43 +0200 (CEST) Received: from nzxt.fritz.box (port-92-195-53-184.dynamic.qsc.de [92.195.53.184]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Wed, 7 Jun 2017 21:25:43 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Wed, 7 Jun 2017 21:25:39 +0200 Message-Id: <20170607192539.14429-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.13.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] libupnpp: needs gcc >= 4.9 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" After bumping libupnpp from version 0.15.1 to 0.15.2 compilation fails for toolchains using GCC 4.7: ``` libupnpp/control/discovery.cxx: In constructor 'UPnPClient::UPnPDeviceDirectory::UPnPDeviceDirectory(time_t)': libupnpp/control/discovery.cxx:338:5: error: 'yield' is not a member of 'std::this_thread' ``` Before version 0.15.2, libupnpp used sched_yield() which was replaced by `std::this_thread::yield()` in the new version. Looking at the `` header file of the PowerPC toolchain [1] from the autobuilder shows that `yield()` is only enabled if `_GLIBCXX_USE_SCHED_YIELD` is defined: ``` /// yield inline void yield() noexcept { __gthread_yield(); } ``` Note, that `__gthread_yield()` inlines to a call to `sched_yield()`: ``` static inline int __gthread_yield (void) { return __gthrw_(sched_yield) (); } ``` This macro is only defined if GCC was built with `--enable-libstdcxx-time`, which is obviously not the case for the affected toolchains. For GCC 4.7 and below this option defaults to no, which means `sched_yield()` is not enabled though it is be available. The issue was discussed on stackoverflow [2]. In GCC 4.9.0 the issue has been fixed, by automatically enabling `sched_yield()` on platforms that are known to support them. Therefore, we update the dependency to GCC 4.9. Fixes: http://autobuild.buildroot.net/results/506/50670d8119b4fbd26585d3d9bd646adb1d904dbe/ http://autobuild.buildroot.net/results/8b0/8b021648a073bde25dd6936ed1ea1e39977bf89b/ http://autobuild.buildroot.net/results/b6d/b6d7437e1cf8cf0b3726395401ac4ebd9af2833b/ http://autobuild.buildroot.net/results/0bf/0bf84f61a72a65a75c5fd0a787680f483cfead26/ .. and more. [1] http://autobuild.buildroot.org/toolchains/tarballs/powerpc-ctng_e500v2-linux-gnuspe.tar.xz [2] https://stackoverflow.com/a/12961816 Signed-off-by: Jörg Krause --- package/libupnpp/Config.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libupnpp/Config.in b/package/libupnpp/Config.in index 46abd65f02..84393f602b 100644 --- a/package/libupnpp/Config.in +++ b/package/libupnpp/Config.in @@ -2,7 +2,7 @@ config BR2_PACKAGE_LIBUPNPP bool "libupnpp" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 select BR2_PACKAGE_EXPAT select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBUPNP @@ -12,5 +12,5 @@ config BR2_PACKAGE_LIBUPNPP http://www.lesbonscomptes.com/upmpdcli/ -comment "libupnpp needs a toolchain w/ C++, threads, gcc >= 4.6" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 +comment "libupnpp needs a toolchain w/ C++, threads, gcc >= 4.9" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9