From patchwork Sun Dec 18 23:31:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Bobroff X-Patchwork-Id: 706869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3thgKy6Lysz9t1d for ; Mon, 19 Dec 2016 10:31:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D50FE86801; Sun, 18 Dec 2016 23:31:31 +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 EHDxWW3RKXPU; Sun, 18 Dec 2016 23:31:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 30D6186811; Sun, 18 Dec 2016 23:31:31 +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 9BD561BFCC3 for ; Sun, 18 Dec 2016 23:31:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 97F5C842DC for ; Sun, 18 Dec 2016 23:31:29 +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 0SskOdHAi7cN for ; Sun, 18 Dec 2016 23:31:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6B69C83A71 for ; Sun, 18 Dec 2016 23:31:27 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uBINSfOH101039 for ; Sun, 18 Dec 2016 18:31:26 -0500 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0b-001b2d01.pphosted.com with ESMTP id 27dkfg2h8m-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 18 Dec 2016 18:31:25 -0500 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Dec 2016 09:31:23 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Dec 2016 09:31:22 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id D8D9D2CE8054 for ; Mon, 19 Dec 2016 10:31:21 +1100 (EST) Received: from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uBINVLUJ5046706 for ; Mon, 19 Dec 2016 10:31:21 +1100 Received: from d23av05.au.ibm.com (localhost [127.0.0.1]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uBINVLh4024479 for ; Mon, 19 Dec 2016 10:31:21 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uBINVIZ1024440 for ; Mon, 19 Dec 2016 10:31:20 +1100 Received: from tungsten.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id CA1C2A0237 for ; Mon, 19 Dec 2016 10:31:17 +1100 (AEDT) From: Sam Bobroff To: buildroot@busybox.net Date: Mon, 19 Dec 2016 10:31:17 +1100 X-Mailer: git-send-email 2.1.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16121823-0040-0000-0000-000002D946CE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16121823-0041-0000-0000-00000BE9BAB3 Message-Id: <51f5a34879535401d9769f0aa92fe5b3959784c2.1482103876.git.sam.bobroff@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-12-18_22:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1612180396 Subject: [Buildroot] [PATCH 1/1] package/mpv: fixup fix build on powerpc64 w/ altivec 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" The initial fix for this issue, re-including stdbool.h, is not working. Instead, fix using the method used for other packages with a similar problem: add -std=gnu99, which prevents bool from being redefined and removes the need for any source code change. Fixes: 64904f0f6d691cfea5ae1c8f58e2d61aac0684c2 Signed-off-by: Sam Bobroff Tested-by: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" --- .../mpv/0002-Fix-build-on-powerpc64-altivec.patch | 28 ------------------- package/mpv/0002-fix-powerpc64-altivec.patch | 32 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 28 deletions(-) delete mode 100644 package/mpv/0002-Fix-build-on-powerpc64-altivec.patch create mode 100644 package/mpv/0002-fix-powerpc64-altivec.patch diff --git a/package/mpv/0002-Fix-build-on-powerpc64-altivec.patch b/package/mpv/0002-Fix-build-on-powerpc64-altivec.patch deleted file mode 100644 index 6db911d7c..000000000 --- a/package/mpv/0002-Fix-build-on-powerpc64-altivec.patch +++ /dev/null @@ -1,28 +0,0 @@ -Subject: [PATCH] Work around bool type redefinition by altivec - -On powerpc64le, the SDL header from SDL2 may include altivec.h and this -(combined with -std=c99) will cause a compile failure due to bool being -redefined as a vector type. - -Re-include stdbool.h after SDL.h to restore the normal bool type. - -Signed-off-by: Sam Bobroff ---- - audio/out/ao_sdl.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/audio/out/ao_sdl.c b/audio/out/ao_sdl.c -index d9d0062..0cb80d6 100644 ---- a/audio/out/ao_sdl.c -+++ b/audio/out/ao_sdl.c -@@ -29,6 +29,7 @@ - #include "osdep/timer.h" - - #include -+#include - - struct priv - { --- -2.10.0.297.gf6727b0 - diff --git a/package/mpv/0002-fix-powerpc64-altivec.patch b/package/mpv/0002-fix-powerpc64-altivec.patch new file mode 100644 index 000000000..45983fec8 --- /dev/null +++ b/package/mpv/0002-fix-powerpc64-altivec.patch @@ -0,0 +1,32 @@ +Subject: [PATCH] Work around bool type redefinition by altivec + +On powerpc64le, the SDL header may include altivec.h and this +(combined with -std=c99) will cause a compile failure due to bool +being redefined as a vector type. + +Adjust the compiler flags to add -std=gnu99 (which is compatible with +altivec) when using gcc. The generic flag '-std=c99' is left in place for other +compilers (in the gcc case it is overridden by the (later) gnu flag). + +Signed-off-by: Sam Bobroff +--- + waftools/detections/compiler.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py +index 5bbba87..50836a2 100644 +--- a/waftools/detections/compiler.py ++++ b/waftools/detections/compiler.py +@@ -43,7 +43,8 @@ def __add_gcc_flags__(ctx): + "-Wno-switch", "-Wparentheses", "-Wpointer-arith", + "-Wno-pointer-sign", + # GCC bug 66425 +- "-Wno-unused-result"] ++ "-Wno-unused-result", ++ "-std=gnu99"] + + def __add_clang_flags__(ctx): + ctx.env.CFLAGS += ["-Wno-logical-op-parentheses", "-fcolor-diagnostics", +-- +2.10.0.297.gf6727b0 +