diff --git a/cil-1.7.3-gcc-7.patch b/cil-1.7.3-gcc-7.patch new file mode 100644 index 0000000..59cc4a1 --- /dev/null +++ b/cil-1.7.3-gcc-7.patch @@ -0,0 +1,11 @@ +--- cil-1.7.3/lib/App/Cilly.pm.in 2013-07-24 16:07:11.000000000 +0100 ++++ cil-1.7.3.new/lib/App/Cilly.pm.in 2017-02-14 13:02:52.517194526 +0000 +@@ -2220,7 +2220,7 @@ + . join(' ', @{$self->{PPARGS}}) ." |") + || die "Cannot start GNUCC"; + while() { +- if($_ =~ m|^(\d+\S+)| || $_ =~ m|^(egcs-\d+\S+)|) { ++ if($_ =~ m|^(\d+\S+)| || $_ =~ m|^(\d+)$| || $_ =~ m|^(egcs-\d+\S+)|) { + $cversion = "gcc_$1"; + close(VER) || die "Cannot start GNUCC\n"; + $self->{CVERSION} = $cversion; diff --git a/ocaml-cil.spec b/ocaml-cil.spec index 99e3ad3..61fa4fd 100644 --- a/ocaml-cil.spec +++ b/ocaml-cil.spec @@ -5,7 +5,7 @@ Name: ocaml-cil Version: 1.7.3 -Release: 28%{?dist} +Release: 29%{?dist} Summary: CIL - Infrastructure for C Program Analysis and Transformation License: BSD @@ -34,6 +34,10 @@ Patch4: ocaml-4.02.0.patch # Fix for bytecode compilation (only apply this when !opt). Patch5: cil-1.7.3-bytecode-compilation.patch +# Fix compilation with GCC 7. +# gcc -dumpversion prints just "7", adjust the regex accordingly. +Patch6: cil-1.7.3-gcc-7.patch + %description CIL (C Intermediate Language) is a high-level representation along with a set of tools that permit easy analysis and source-to-source @@ -120,6 +124,7 @@ for gcc. %if !%opt %patch5 -p1 %endif +%patch6 -p1 %build @@ -195,6 +200,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 14 2017 Richard W.M. Jones - 1.7.3-29 +- Fix compilation with GCC 7. + * Sat Feb 11 2017 Fedora Release Engineering - 1.7.3-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild