diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-02-19 22:58:40 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-04-19 17:19:40 +0200 |
commit | f775ab3654357fcaad294b95efb0b1c16de1eda8 (patch) | |
tree | 9255b7244fe2c3b70a9b31aa1a8ca33571608f73 | |
parent | e0933b5636219973bf4c0262b82d604756f7c1bc (diff) | |
download | guile-f775ab3654357fcaad294b95efb0b1c16de1eda8.tar.gz |
guile-snarf: skip -g* arguments to avoid build failure
* libguile/guile-snarf.in: skip -g* arguments to avoid failure on
-ggdb3.
Bug: https://bugs.gentoo.org/608190
Bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25803
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r-- | libguile/guile-snarf.in | 16 |
1 files 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 |