Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Announcing CIL: Infrastructure and tools for C program analysis a nd transformations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Nyberg <rnyberg@i...>
Subject: Re: [Caml-list] Announcing CIL: Infrastructure and tools for C program analysis a nd transformations
On Tue, Aug 20, 2002 at 12:43:55PM -0700, George Necula wrote:
>  
>  We have released a stable version of CIL. It consists of a complete C
> parser (both for ANSI C and also the GCC and Microsoft Visual C extensions),
> pretty-printer and an intermediate language that hides most of the dark
> corners of the C language. This allows you for example to implement a
> Stackguard instrumentation for your programs in about 80 lines of code and
> apply it to ugly code such as the Linux kernel modules. CIL can impersonate
> both the GCC and MSVC compilers allowing you to use your existing Makefiles
> and can also merge your entire program into one source file for a quick
> whole-program analysis.
> 
>  CIL has been tested on many millions of lines of code, including the Linux
> kernel and GIMP.
> 
>  More information, a manual, ocamldoc API documentation and the distribution
> can be found at http://www.cs.berkeley.edu/~necula/cil.
> 
>  George.

Nice :)

For those like me who'd like to try it on FreeBSD I've made some
patches. The configure script could really be better on supporting
different platforms.

Don't forget to use GNU make!

	-Richard

--- Makefile    Tue Aug 20 20:49:39 2002
+++ rny-Makefile        Thu Aug 22 16:45:56 2002
@@ -2,4 +2,4 @@
 setup: setup
 %: 
        if ! test -f Makefile.cil ;then echo Run configure first ;fi
-       make -f Makefile.cil $*
+       $(MAKE) -f Makefile.cil $*

--- configure.in        Tue Aug 20 20:49:39 2002
+++ rny-configure.in    Thu Aug 22 16:46:11 2002
@@ -105,7 +105,7 @@
   diagnostic "major is $major"
   # minor: numbers after the .
   # (the outer level of bracket-quotation protects the inner brackets)
-  [minor=`echo $ver | sed 's/^.*\.\([0-9]\+\).*$/\1/'`]
+  [minor=`echo $ver | sed 's/[^.]*\.//'`]
   diagnostic "minor is $minor"
 
   # I would think autoconf would already have a facility for doing
@@ -156,6 +156,8 @@
         ;;
     linux)
         ;;
+    freebsd)
+       ;;
     *)
       AC_MSG_ERROR([
         Unsupported Perl port $perlport -- sorry.
@@ -267,7 +269,7 @@
 # $target is typically processor-vendor-os
 case "$target" in
   # linux
-  *86*linux*)
+  *86*linux*|*86*freebsd*)
     AC_MSG_RESULT(configuring for linux/x86)
 
     ARCHOS=x86_LINUX

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners