From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sergei Trofimovich Newsgroups: gmane.lisp.guile.bugs Subject: bug#25803: [PATCH] guile-snarf: skip -g* arguments to avoid build failure Date: Sun, 19 Feb 2017 22:58:40 +0000 Message-ID: <20170219225840.5015-1-slyfox@gentoo.org> References: <20170219223639.61a78924@sf> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1487545160 24999 195.159.176.226 (19 Feb 2017 22:59:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Feb 2017 22:59:20 +0000 (UTC) Cc: Sergei Trofimovich To: 25803@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Feb 19 23:59:12 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfaRh-0005WO-Rx for guile-bugs@m.gmane.org; Sun, 19 Feb 2017 23:59:10 +0100 Original-Received: from localhost ([::1]:35319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfaRj-0005Mz-I5 for guile-bugs@m.gmane.org; Sun, 19 Feb 2017 17:59:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfaRd-0005Md-8o for bug-guile@gnu.org; Sun, 19 Feb 2017 17:59:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfaRa-0006FX-4j for bug-guile@gnu.org; Sun, 19 Feb 2017 17:59:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cfaRa-0006FR-0y for bug-guile@gnu.org; Sun, 19 Feb 2017 17:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cfaRZ-0004Kn-Nz for bug-guile@gnu.org; Sun, 19 Feb 2017 17:59:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <20170219223639.61a78924@sf> Resent-From: Sergei Trofimovich Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 19 Feb 2017 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25803 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 25803-submit@debbugs.gnu.org id=B25803.148754514016654 (code B ref 25803); Sun, 19 Feb 2017 22:59:01 +0000 Original-Received: (at 25803) by debbugs.gnu.org; 19 Feb 2017 22:59:00 +0000 Original-Received: from localhost ([127.0.0.1]:46620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfaRY-0004KY-81 for submit@debbugs.gnu.org; Sun, 19 Feb 2017 17:59:00 -0500 Original-Received: from smtp.gentoo.org ([140.211.166.183]:58980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfaRV-0004KK-U5 for 25803@debbugs.gnu.org; Sun, 19 Feb 2017 17:58:58 -0500 Original-Received: from sf.home (host86-186-94-114.range86-186.btcentralplus.com [86.186.94.114]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 9D56F340806; Sun, 19 Feb 2017 22:58:50 +0000 (UTC) Original-Received: by sf.home (Postfix, from userid 1000) id BFA821A93DF0B; Sun, 19 Feb 2017 22:58:45 +0000 (GMT) X-Mailer: git-send-email 2.11.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8555 Archived-At: Steps to reproduce: $ ./configure CFLAGS=-ggdb3 $ make make[1]: Entering directory '/home/slyfox/dev/git/guile/libguile' CC libguile_2.2_la-alist.lo In file included from alist.c:398:0: ../libguile/alist.x: In function 'scm_init_alist': ../libguile/alist.x:2:2537: error: conflicting types for 'scm_i_foreign_call' The problem here is in gcc -ggdb3 which leaves too much of unrelated input. guile-snarf does not understand how to drop it: The fix is to ignore -g* flags. They should only affect debugging output. * libguile/guile-snarf.in: skip -g* arguments to avoid build failure Bug: https://bugs.gentoo.org/608190 Bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25803 Signed-off-by: Sergei Trofimovich --- libguile/guile-snarf.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index 47bbc0422..22dc1d389 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -95,10 +95,22 @@ if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi trap "rm -rf $tempdir" 0 1 2 15 +# filter out -g* flags from commandline +# as some flags like -ggdb3 cause CPP + +cpp_args="" +for arg in "$@" +do + case "$arg" in + -g*) ;; # skip debug flag + *) cpp_args="$cpp_args $arg" ;; + esac +done + if [ ! "$outfile" = "-" ] ; then - modern_snarf "$@" > $outfile + modern_snarf $cpp_args > $outfile else - modern_snarf "$@" + modern_snarf $cpp_args fi # zonk outfile if errors occurred -- 2.11.1