On Fri, 9 Dec 2011 at 20:02:40 +0100, ben gras <[email protected]> wrote: > Dear all, > > Attached is a patch I would like to submit for committing. They are changes > motivated by compiling and running klee under Minix, w.r.t. the latest SVN > HEAD (r146265), which builds and works again thanks to the latest API > adjustment, thanks to arrowdodger. > > They are pretty minor fixes so I hope it's OK to submit them all in one > patch. Explanation: > > . ntohs: takes a uint16_t, and compiler knows about the general prototype; > otherwise compiling breaks with the inconsistent declaration. > . <unistd.h> added in 2 files fixes missing prototypes > . added a KLEE_LIB_DIR and USE_KLEE_LIB_DIR facility to distinguish > searching for klee generated library files in the klee source directory vs. > in the installed location; this lets me make a binary-only klee package > (together with our compiler, clang/llvm) that can be used standalone by > Minix users, without the build directories installed. I have a pkgsrc > package for it at > http://git.minix3.org/?p=pkgsrc.git;a=tree;f=minix/clangnew;h=f7a88a0c62f8c325c46e3860991bff731ad9c169;hb=refs/heads/minix-masterif > you're interested. This will install klee along with the compiler out > of the box under Minix.
Ben, In my work-in-progress Debianization of klee [1], I encountered the same need you did and adopted a very similar KLEE_LIB_DIR configuration point. However, as you can see in the relevant patch [2], I also found it convenient to use the resulting KLEE_LIB_DIR definition as a default value for a new "--klee-lib-dir" interpreter command-line option. The advantage that I see in adding a runtime configuration-point like a command-line option is that it lets me write tests directly against the klee binaries and libraries in their build-tree locations while still permitting the same binaries and libraries to function in their installed locations without modification. Might a strategy like this one work for you too? Regards, Michael [1]: https://github.com/mstone/klee/ [2]: https://github.com/mstone/klee/commit/a817cbb5e96917813cfbdfbd6c31d17a5b52162b > . no stat64 under Minix > . ignore resource limits if RUSAGE_SELF isn't defined, i.e. getrusage() not > available > . Minix doesn't support mmap()ed files currently, but theMMap seemed to be > unused, so I hope it's okay to remove it (cleanest solution if possible). > > I am looking forward to exploring the possibilities of improving Minix code > and test coverage using klee, and this package is a first step. Committing > the above would reduce our patch load significantly and will hopefully also > facilitate compiling and packaging for other platforms. Thanks for Klee, > I'm excited about it! > > -- > Regards, > Ben _______________________________________________ klee-dev mailing list [email protected] http://keeda.Stanford.EDU/mailman/listinfo/klee-dev
