cil-project / cil

C Intermediate Language
Other
348 stars 86 forks source link

CIL does not compile with GCC 7 (patch attached) #30

Open rwmjones opened 7 years ago

rwmjones commented 7 years ago

With gcc 7:

$ gcc -dumpversion
7

The attached patch fixed it for me.

rwmjones commented 7 years ago

Apparently you cannot attach a patch to github ...

rwmjones commented 7 years ago
--- 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(<VER>) {
-        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;
MartinNowack commented 4 years ago

@rwmjones This patch helped me also for gcc 8. Thanks a lot!