From: Sergei Trofimovich <slyfox@gentoo.org>
To: 25803@debbugs.gnu.org
Cc: Sergei Trofimovich <slyfox@gentoo.org>
Subject: bug#25803: [PATCH] guile-snarf: skip -g* arguments to avoid build failure
Date: Sun, 19 Feb 2017 22:58:40 +0000 [thread overview]
Message-ID: <20170219225840.5015-1-slyfox@gentoo.org> (raw)
In-Reply-To: <20170219223639.61a78924@sf>
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 <slyfox@gentoo.org>
---
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
next prev parent reply other threads:[~2017-02-19 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-19 22:36 bug#25803: ./configure CFLAGS=-ggdb3 fails 'guile-snarf' Sergei Trofimovich
2017-02-19 22:58 ` Sergei Trofimovich [this message]
2017-04-19 15:20 ` bug#25803: [PATCH] guile-snarf: skip -g* arguments to avoid build failure Andy Wingo
2017-04-21 15:00 ` bug#25803: guile-snarf now fails when passed arguments contains whitespace Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170219225840.5015-1-slyfox@gentoo.org \
--to=slyfox@gentoo.org \
--cc=25803@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).