Update of /cvsroot/monetdb/MonetDB5/src/compiler
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8844
Modified Files:
mal_compiler.mx
Added Files:
mcc
Log Message:
The last series of patches to make the first case work.
The mcc script is temporary, it will be moved to tools/mcc.in
in the near future.
The effect of interpreter:compiled is 792 versus 462 ms
Index: mal_compiler.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/compiler/mal_compiler.mx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- mal_compiler.mx 16 Oct 2007 17:05:26 -0000 1.20
+++ mal_compiler.mx 16 Oct 2007 18:03:35 -0000 1.21
@@ -837,11 +837,12 @@
t= findSymbolInModule(s, *fcn);
if(t== 0)
throw(MAL,"compiler.load","Could not find function");
+ loadLibrary(*fname,FALSE);
snprintf(buf,1024,"MCC%s_%s", *mod,*fcn);
sig=getInstrPtr(t->def,0);
sig->fcn = getAddress(*fname,*mod, buf,0);
if(sig->fcn)
- sig->token= CMDcall;
+ sig->token= COMMANDsymbol;
}
(void) ret;
return MAL_SUCCEED;
--- NEW FILE: mcc ---
#!/bin/sh
prg=`basename $1 .c`
# will change to a dynamic lookup using monetdb-config
# should be generalized
top_builddir=$HOME/monet5/build/MonetDB5/
prefix=$HOME/monet5/Linux
libdir=$prefix/lib/MonetDB5
# we need libtool to be installed somewhere!
LIBTOOL=$top_builddir/libtool
# next list is to be filled in using configure
CC=gcc
CCLD=$CC
DEFS=-DHAVE_CONFIG_H
CFLAGS="-Wall -Wextra -std=c99 -g -D_REENTRANT"
LDFLAGS=
INSTALL="/usr/bin/install -c"
# the libs and includes are found via monetdb(5)-config
LIBS="`monetdb-config --libs` `monetdb5-config --libs`"
INCLUDES="`monetdb-config --cflags` `monetdb5-config --cflags`"
$LIBTOOL --tag=CC --mode=compile $CC $DEFS $INCLUDES $CFLAGS -c $prg.c
$LIBTOOL --tag=CC --mode=link $CCLD $CFLAGS $LDFLAGS -o lib_$prg.la -rpath
$libdir $LDFLAGS $prg.lo $LIBS
$LIBTOOL --mode=install $INSTALL lib_$prg.la $DESTDIR/$libdir
$LIBTOOL --mode=finish $DESTDIR/$libdir
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins