From patchwork Fri Jul 24 13:00:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kyak X-Patchwork-Id: 499727 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]) by ozlabs.org (Postfix) with ESMTP id 8D1FF14029D for ; Fri, 24 Jul 2015 23:01:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C76A8A449C; Fri, 24 Jul 2015 13:01:28 +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 2C16D5lB7uEp; Fri, 24 Jul 2015 13:01:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7F3CEA44A7; Fri, 24 Jul 2015 13:01:27 +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 DE4D91C1085 for ; Fri, 24 Jul 2015 13:01:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DB040A44AB for ; Fri, 24 Jul 2015 13:01:26 +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 ET1uCfiNK1A0 for ; Fri, 24 Jul 2015 13:01:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sovam.com (mail.bmail.ru [194.67.1.203]) by fraxinus.osuosl.org (Postfix) with ESMTP id 606CBA44A5 for ; Fri, 24 Jul 2015 13:01:23 +0000 (UTC) X-SPIN-Class: auth_users X-DSPAM-Result: Innocent X-DSPAM-Processed: Fri Jul 24 16:01:21 2015 X-DSPAM-Confidence: 0.9899 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 55b2372152681716718573 X-Rspam-Metric: default; False; (-3.00/15.00) X-Rspam-Action: no action X-Rspam-Status: No X-Rspam-Score: -3.00 [] Received: from [89.169.53.112] (account bas@bmail.ru HELO localhost.localdomain) by mail-fe03.sovam.com (CommuniGate Pro SMTP 5.2.20) with ESMTPSA id 211699021; Fri, 24 Jul 2015 16:01:21 +0300 From: kyak To: buildroot@buildroot.org Date: Fri, 24 Jul 2015 16:00:43 +0300 Message-Id: <1437742843-26270-1-git-send-email-bas@bmail.ru> X-Mailer: git-send-email 2.4.6 Cc: "Thomas E. Dickey" , kyak Subject: [Buildroot] [PATCH 1/1] ncurses: fix gcc 5 compile issue for real 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 previous patch didn't work in all cases. The new patch is taken from upstream: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commit;h=97bb4678dc03e753290b39bbff30ba2825df9517 Fetch from: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff;f=ncurses/base/MKlib_gen.sh;h=b91398c740a266f10edbbce19f19c52b9709556f;hp=d8cc3c9751faa157d0c8cb8e16fbe4217703966b;hb=97bb4678dc03e753290b39bbff30ba2825df9517;hpb=762520a7930d7f698d542628d3c04bc201f7dac2 Signed-off-by: Thomas E. Dickey Signed-off-by: Mikhail Peselnik Acked-by: Jaap Crezee Tested-by: Jaap Crezee Reviewed-by: "Yann E. MORIN" --- package/ncurses/0002-gcc-5.x-MKlib_gen.patch | 60 +++++++++++++--------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/package/ncurses/0002-gcc-5.x-MKlib_gen.patch b/package/ncurses/0002-gcc-5.x-MKlib_gen.patch index 0771208..fca7624 100644 --- a/package/ncurses/0002-gcc-5.x-MKlib_gen.patch +++ b/package/ncurses/0002-gcc-5.x-MKlib_gen.patch @@ -1,33 +1,29 @@ -Fix GCC 5.x preprocessor failure - -Building ncurses 5.9 with GCC 5.x fails with a syntax error, caused by -earlier preprocessing. This failure is more likely when building for -host (e.g. host-ncurses) that recently updated to GCC 5.x. - -This patch is taken from the following link (more information is also -available here): -https://groups.google.com/forum/#!topic/sage-trac/U31shviuqzk - -Signed-off-by: Doug Kehn - -Index: b/ncurses/base/MKlib_gen.sh -=================================================================== ---- a/ncurses/base/MKlib_gen.sh -+++ b/ncurses/base/MKlib_gen.sh -@@ -62,7 +62,15 @@ if test "${LC_MESSAGES+set}" = set; then - if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi - --preprocessor="$1 -DNCURSES_INTERNALS -I../include" -+# Work around "unexpected" output of GCC 5.1.0's cpp w.r.t. #line directives -+# by simply suppressing them: -+case `$1 -dumpversion 2>/dev/null` in -+ 5.[01].*) # assume a "broken" one -+ preprocessor="$1 -P -DNCURSES_INTERNALS -I../include" -+ ;; -+ *) -+ preprocessor="$1 -DNCURSES_INTERNALS -I../include" -+esac - AWK="$2" - USE="$3" +--- a/ncurses/base/MKlib_gen.sh.orig 2015-07-23 21:52:32.239481505 +0300 ++++ b/ncurses/base/MKlib_gen.sh 2015-07-23 21:53:20.772966587 +0300 +@@ -437,11 +437,22 @@ + -e 's/gen_$//' \ + -e 's/ / /g' >>$TMP ++cat >$ED1 < $ED2 ++cat $ED2 >$TMP ++ + $preprocessor $TMP 2>/dev/null \ +-| sed \ +- -e 's/ / /g' \ +- -e 's/^ //' \ +- -e 's/_Bool/NCURSES_BOOL/g' \ ++| sed -f $ED1 \ + | $AWK -f $AW2 \ + | sed -f $ED3 \ + | sed \