Note: You are viewing an old version of this page. View the current version.

Differences between version 2 and previous revision of CyberLeo/Scraps/klcc.patch.

Other diffs: Previous Major Revision, Previous Author

Newer page: version 2 Last edited on Friday, 22 June 2012 7:02:16 by CyberLeo Revert
Older page: version 1 Last edited on Friday, 22 June 2012 7:01:53 by CyberLeo Revert
@@ -1,4 +1,6 @@
+klcc cannot handle --params flags in CFLAGS; this helps.  
+  
 <code brush="patch"> 
 --- /usr/bin/klcc.orig 2012-06-09 16:38:41.000000000 -0500 
 +++ /usr/bin/klcc 2012-06-10 00:38:53.102707079 -0500 
 @@ -211,6 +211,17 @@ 

version 2

klcc cannot handle --params flags in CFLAGS; this helps.

--- /usr/bin/klcc.orig  2012-06-09 16:38:41.000000000 -0500
+++ /usr/bin/klcc       2012-06-10 00:38:53.102707079 -0500
@@ -211,6 +211,17 @@
        # gcc options, that force preprocessing mode
        push(@ccopt, $a);
        $operation = 'E';
+    } elsif ( $a =~ /^--param/ ) {
+        # support --param name=value and --param=name=value
+       my @values=split('=', $a);
+       if ( @values == 1 ) {
+           push(@ccopt, $a);
+           push(@ccopt, shift(@ARGV));
+       }
+       elsif ( @values == 3 ) {
+           push(@ccopt, $values[0]);
+           push(@ccopt, join('=', $values[1],$values[2]));
+       }
     } elsif ( $a =~ /^-[gp]/ || $a eq '-p' ) {
        # Debugging options to gcc
        push(@ccopt, $a);