introduces new flag for runtime conflict resolver.
[IRC.git] / Robust / src / buildscript
1 #!/bin/bash
2
3 printhelp() {
4 echo STM Options
5 echo -singleTM single machine committing transactions
6 echo -stmdebug STM debug
7 echo "-stmstats prints single machine commit (stm) statistics for the benchmark"
8 echo -fastmemcpy use fast memcpy
9 echo -sandbox sandbox transactions
10 echo -dcopts conflict optimizations for transactional memory
11 echo -transstats generates transaction stats on commits and aborts
12 echo -inlineatomic depth inline methods inside of transactions to specified depth
13 echo "-stmarray partial array treatment"
14 echo "-dualview dual view of arrays"
15 echo "-hybrid use fission only when it looks like a good choice"
16 echo "-numa numa aware"
17 echo "-eventmonitor turn on transaction event trace recording"
18 echo
19 echo OOOJava options
20 echo -coreprof turn on profiling API
21 echo "-ooojava <numberofcores> <maxseseage>"
22 echo -ooodebug general OOOJava debugging messages
23 echo -rcr turn on runtime conflict resolver
24 echo
25 echo Disjoint Reachability Analysis options
26 echo -disjoint enable analysis
27 echo -disjoint-k set k-limit for heap nodes per allocation site
28 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
29 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
30 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
31 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
32 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
33 echo "  To debug call site, give callee caller symbols (ie foo) the analysis visit to start capturing, num captures to take, and whether to halt analysis after capturing"
34 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
35 echo "  To take snapshots at statements, give method symbol, the analysis visit to start capturing, num captures to take, and whether to halt analsyis after capturing"
36 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
37 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
38 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
39 echo -disjoint-desire-determinism set above interproc for determinism
40 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
41 echo 
42 echo "-mlp <num cores> <max sese age> build mlp code"
43 echo -mlpdebug if mlp, report progress and interim results
44 echo
45 echo DSM options
46 echo -dsm distributed shared memory
47 echo -abortreaders abort readers immediately
48 echo -trueprob double - probabiltiy of true branch
49 echo -dsmcaching -enable caching in dsm runtime
50 echo
51 echo BAMBOO Multicore options
52 echo -scheduling do task scheduling
53 echo -multicore generate multi-core version binary
54 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
55 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
56 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
57 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
58 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
59 echo -printscheduling print out scheduling graphs
60 echo -printschedulesim print out scheduling simulator result graphs
61 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
62 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
63 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
64 echo "-raw generate raw version binary (should be used together with -multicore)"
65 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
66 echo -multicoregc generate multi-core binary with garbage collection
67 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
68 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
69 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
70 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
71 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
72 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
73 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
74 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
75 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
76 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
77 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
78 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
79 echo -gcprofile build with gcprofile options
80 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
81 echo -accurateprofile build with accurate profile information including pre/post task processing info
82 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
83 echo
84 echo Other options
85 echo -abcclose turnoff array boundary checks
86 echo -builddir setup different build directory
87 echo -robustroot set up the ROBUSTROOT to directory other than default one
88 echo -readset turn on readset
89 echo -mac distributed shared memory mac support
90 echo -check generate check code
91 echo -dmalloc link in dmalloc
92 echo -64bit compile for 64 bit machine
93 echo -32bit compile for 32 bit machine
94 echo -joptimize java compiler optimizations
95 echo -noloop turnoff loop optimizations
96 echo -recover compile task code
97 echo -fastcheck fast checkpointing for Bristlecone
98 echo -specdir directory
99 echo -printflat print out flat representation
100 echo -selfloop task - this task cannot self loop forever
101 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
102 echo -taskstate do task state analysis
103 echo -tagstate do tag state analysis
104 echo -optional enable optional
105 echo -debug generate debug symbols
106 echo -prefetch do prefetch analysis
107 echo -garbagestats Print garbage collection statistics
108 echo -webinterface enable web interface
109 echo -runtimedebug printout runtime debug messages
110 echo "-thread use support for multiple threads"
111 echo "-optimize call gcc with -O9 (optimize)"
112 echo "-nooptimize call gcc with -O0 (do not optimize)"
113 echo -curdir directory 
114 echo -mainclass class with main method
115 echo -o binary
116 echo -nojava do not run bristlecone compiler
117 echo -instructionfailures inject code for instructionfailures
118 echo -profile build with profile options
119 echo "-enable-assertions execute assert statements during compilation"
120 echo -justanalyze exit after compiler analyses complete
121 echo "-distributioninfo  execute to collect distribution info for simulated annealing in multi-core version"
122 echo "-disall  execute to collect whole distribution"
123 echo "-disstart specify the start number of distribution information collection"
124 echo -assembly generate assembly
125 echo -recovery compile recovery code
126 echo -dsmtask support work and task class library
127 echo -recoverystats print out recovery record 
128 echo -help help
129 }
130
131 tmpbuilddirectory="tmpbuilddirectory"
132 COREPROF=false;
133 NUMA=false;
134 SANDBOX=false;
135 ABORTREADERS=false;
136 ROBUSTROOT=~/research/Robust/src
137 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
138 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
139 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
140 REPAIRROOT=~/research/Repair/RepairCompiler/
141 CURDIR=`pwd`
142 DSMFLAG=false
143 DSMRECOVERY=false
144 FASTMEMCPY=false
145 STMARRAY=false
146 DUALVIEW=false
147 STM=false
148 EVENTMONITOR=false
149 NOJAVA=false
150 CHECKFLAG=false
151 RECOVERFLAG=false
152 MLP_ON=false
153 MLPDEBUG=false
154 MULTICOREFLAG=false
155 RAWFLAG=false
156 TILERAFLAG=false
157 TILERABMEFLAG=false
158 TILERAZLINUXFLAG=false
159 TILERAMEMPROFFLAG=false
160 TILERACONFIG=''
161 CACHEFLUSHFLAG=false
162 RAWCONFIG=''
163 DEBUGFLAG=false
164 RAWPATHFLAG=false
165 PROFILEFLAG=false
166 GCPROFILEFLAG=false
167 GCPROFILESFLAG=false
168 ACCURATEPROFILEFLAG=false
169 USEIOFLAG=false
170 INTERRUPTFLAG=false
171 THREADSIMULATEFLAG=false;
172 MULTICOREGCFLAG=false;
173 GCMEMLOCALFLAG=false;
174 GCMEMFIXEDFLAG=false;
175 GCMEMMIXEDFLAG=false;
176 GCMEMGLOBALFLAG=false;
177 GCCACHELOCALFLAG=false;
178 GCCACHERANFLAG=false;
179 GCCONTROLLERNEARFLAG=false;
180 GCCONTROLLERREMOTEFLAG=false;
181 GCSMALLPAGESIZEFLAG=false;
182 GCLARGEPAGESIZEFLAG=false;
183 GCLARGESHAREDHEAPFLAG=false;
184 GCSMALLPAGESIZEFLAG2=false;
185 GCLARGESHAREDHEAPFLAG2=false;
186 USEDMALLOC=false
187 THREADFLAG=false
188 FASTCHECK=false
189 SPECDIR=`pwd`
190 SRCFILES=''
191 EXTRAOPTIONS=''
192 MAINFILE='a'
193 JAVAFORWARDOPTS=''
194 JAVAOPTS=''
195 OPTIONALFLAG=false
196 EXITAFTERANALYSIS=false
197 ASSEMBLY=false
198 GCCORES=''
199 GC1COREFLAG=false
200 TILERAN1COREFLAG=false
201
202 if [[ -z $1 ]]
203 then
204 printhelp
205 exit
206 fi
207
208 while [[ -n $1 ]]
209 do
210 if [[ $1 = '-help' ]]
211 then
212 printhelp
213 exit
214 elif [[ $1 = '-justanalyze' ]]
215 then
216 EXITAFTERANALYSIS=true
217 elif [[ $1 = '-assembly' ]]
218 then
219 ASSEMBLY=true
220 elif [[ $1 = '-abortreaders' ]]
221 then
222 ABORTREADERS=true
223 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
224 JAVAOPTS="$JAVAOPTS -abortreaders"
225 elif [[ $1 = '-sandbox' ]]
226 then
227 SANDBOX=true
228 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
229 JAVAOPTS="$JAVAOPTS -sandbox"
230 elif [[ $1 = '-numa' ]]
231 then
232 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
233 NUMA=true
234 elif [[ $1 = '-robustroot' ]]
235 then
236 ROBUSTROOT="$2"
237 shift
238 elif [[ $1 = '-builddir' ]]
239 then
240 tmpbuilddirectory="$2"
241 shift
242 elif [[ $1 = '-nojava' ]]
243 then
244 NOJAVA=true
245 elif [[ $1 = '-eventmonitor' ]]
246 then
247 JAVAOPTS="$JAVAOPTS -eventmonitor"
248 EVENTMONITOR=true
249 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
250 elif [[ $1 = '-garbagestats' ]]
251 then
252 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
253 elif [[ $1 = '-64bit' ]]
254 then
255 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
256 elif [[ $1 = '-32bit' ]]
257 then
258 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
259 elif [[ $1 = '-fastcheck' ]]
260 then
261 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
262 JAVAOPTS="$JAVAOPTS -fastcheck"
263 FASTCHECK=true
264 elif [[ $1 = '-o' ]]
265 then
266 MAINFILE="$2"
267 shift
268 elif [[ $1 = '-mainclass' ]]
269 then
270 JAVAOPTS="$JAVAOPTS -mainclass $2"
271 shift
272 elif [[ $1 = '-selfloop' ]]
273 then
274 JAVAOPTS="$JAVAOPTS -selfloop $2"
275 shift
276 elif [[ $1 = '-excprefetch' ]]
277 then
278 JAVAOPTS="$JAVAOPTS -excprefetch $2"
279 shift
280 elif [[ $1 = '-arraypad' ]]
281 then
282 JAVAOPTS="$JAVAOPTS -arraypad"
283 elif [[ $1 = '-dsm' ]]
284 then
285 JAVAOPTS="$JAVAOPTS -dsm"
286 DSMFLAG=true
287 elif [[ $1 = '-fastmemcpy' ]]
288 then
289 FASTMEMCPY=true
290 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
291 elif [[ $1 = '-singleTM' ]]
292 then
293 JAVAOPTS="$JAVAOPTS -singleTM"
294 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
295 STM=true
296 elif [[ $1 = '-stmarray' ]]
297 then
298 JAVAOPTS="$JAVAOPTS -stmarray"
299 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
300 STMARRAY=true
301 elif [[ $1 = '-dualview' ]]
302 then
303 JAVAOPTS="$JAVAOPTS -dualview"
304 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
305 DUALVIEW=true
306 elif [[ $1 = '-readset' ]]
307 then
308 JAVAOPTS="$JAVAOPTS -readset"
309 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
310 elif [[ $1 = '-stmdebug' ]]
311 then
312 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
313 elif [[ $1 = '-stmstats' ]]
314 then
315 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
316 elif [[ $1 = '-stmlog' ]]
317 then
318 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
319 elif [[ $1 = '-prefetch' ]]
320 then
321 JAVAOPTS="$JAVAOPTS -prefetch"
322 elif [[ $1 = '-transstats' ]]
323 then
324 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
325 elif [[ $1 = '-printflat' ]]
326 then
327 JAVAOPTS="$JAVAOPTS -printflat"
328 elif [[ $1 = '-trueprob' ]]
329 then
330 JAVAOPTS="$JAVAOPTS -trueprob $2"
331 shift
332 elif [[ $1 = '-inlineatomic' ]]
333 then
334 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
335 shift
336 elif [[ $1 = '-mac' ]]
337 then
338 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
339 elif [[ $1 = '-profile' ]]
340 then
341 PROFILEFLAG=true
342 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
343 elif [[ $1 = '-gcprofile' ]]
344 then
345 GCPROFILEFLAG=true
346 elif [[ $1 = '-gcprofile_s' ]]
347 then
348 GCPROFILESFLAG=true
349 elif [[ $1 = '-accurateprofile' ]]
350 then
351 ACCURATEPROFILEFLAG=true
352 elif [[ $1 = '-useio' ]]
353 then
354 USEIOFLAG=true
355 elif [[ $1 = '-taskstate' ]]
356 then
357 JAVAOPTS="$JAVAOPTS -taskstate"
358 elif [[ $1 = '-tagstate' ]]
359 then
360 JAVAOPTS="$JAVAOPTS -tagstate"
361 elif [[ $1 = '-scheduling' ]]
362 then
363 JAVAOPTS="$JAVAOPTS -scheduling"
364 elif [[ $1 = '-multicore' ]]
365 then
366 MULTICOREFLAG=true
367 JAVAOPTS="$JAVAOPTS -multicore"
368 elif [[ $1 = '-numcore' ]]
369 then
370 JAVAOPTS="$JAVAOPTS -numcore $2"
371 if [[ "$2" -gt "1" ]]
372 then
373 TILERAN1COREFLAG=true
374 fi
375 shift
376 elif [[ $1 = '-numcore4gc' ]]
377 then
378 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
379 GCCORES="GC_$2"
380 if [[ "$2" -eq "1" ]]
381 then
382 GC1COREFLAG=true
383 fi
384 shift
385 elif [[ $1 = '-raw' ]]
386 then
387 RAWFLAG=true
388 JAVAOPTS="$JAVAOPTS -raw"
389 elif [[ $1 = '-tilera_bme' ]]
390 then
391 TILERAFLAG=true
392 TILERABMEFLAG=true
393 elif [[ $1 = '-tilera_zlinux' ]]
394 then
395 TILERAFLAG=true
396 TILERAZLINUXFLAG=true
397 elif [[ $1 = '-tilera_memprof' ]]
398 then
399 TILERAMEMPROFFLAG=true
400 elif [[ $1 = '-tileraconfig' ]]
401 then
402 TILERACONFIG="$2"
403 shift
404 elif [[ $1 = '-cacheflush' ]]
405 then
406 CACHEFLUSHFLAG=true
407 elif [[ $1 = '-rawconfig' ]]
408 then
409 RAWCONFIG="$2"
410 shift
411 elif [[ $1 = '-interrupt' ]]
412 then
413 INTERRUPTFLAG=true
414 elif [[ $1 = '-abcclose' ]]
415 then
416 JAVAOPTS="$JAVAOPTS -abcclose"
417 elif [[ $1 = '-optional' ]]
418 then
419 JAVAOPTS="$JAVAOPTS -optional"
420 OPTIONALFLAG=true
421 elif [[ $1 = '-multicoregc' ]]
422 then
423 MULTICOREGCFLAG=true
424 JAVAOPTS="$JAVAOPTS -multicoregc"
425 elif [[ $1 = '-gcmem_local' ]]
426 then
427 GCMEMLOCALFLAG=true
428 elif [[ $1 = '-gcmem_fixed' ]]
429 then
430 GCMEMFIXEDFLAG=true
431 elif [[ $1 = '-gcmem_mixed' ]]
432 then
433 GCMEMMIXEDFLAG=true
434 elif [[ $1 = '-gcmem_global' ]]
435 then
436 GCMEMGLOBALFLAG=true
437 elif [[ $1 = '-gccache_local' ]]
438 then
439 GCCACHELOCALFLAG=true
440 elif [[ $1 = '-gccache_ran' ]]
441 then
442 GCCACHERANFLAG=true
443 elif [[ $1 = '-gccontroller_near' ]]
444 then
445 GCCONTROLLERNEARFLAG=true
446 elif [[ $1 = '-gccontroller_remote' ]]
447 then
448 GCCONTROLLERREMOTEFLAG=true
449 elif [[ $1 = '-gcsmallpagesize' ]]
450 then
451 GCSMALLPAGESIZEFLAG=true
452 elif [[ $1 = '-gcsmallpagesize2' ]]
453 then
454 GCSMALLPAGESIZEFLAG2=true
455 elif [[ $1 = '-gclargepagesize' ]]
456 then
457 GCLARGEPAGESIZEFLAG=true
458 elif [[ $1 = '-gclargesharedheap' ]]
459 then
460 GCLARGESHAREDHEAPFLAG=true
461 elif [[ $1 = '-gclargesharedheap2' ]]
462 then
463 GCLARGESHAREDHEAPFLAG2=true
464 elif [[ $1 = '-dmalloc' ]]
465 then
466 USEDMALLOC=true
467 elif [[ $1 = '-recover' ]]
468 then
469 RECOVERFLAG=true
470 JAVAOPTS="$JAVAOPTS -task"
471 elif [[ $1 = '-useprofile' ]]
472 then
473 JAVAOPTS="$JAVAOPTS -useprofile $2"
474 shift
475 elif [[ $1 = '-webinterface' ]]
476 then
477 JAVAOPTS="$JAVAOPTS -webinterface"
478 elif [[ $1 = '-instructionfailures' ]]
479 then
480 JAVAOPTS="$JAVAOPTS -instructionfailures"
481 elif [[ $1 = '-joptimize' ]]
482 then
483 JAVAOPTS="$JAVAOPTS -optimize"
484 elif [[ $1 = '-noloop' ]]
485 then
486 JAVAOPTS="$JAVAOPTS -noloop"
487 elif [[ $1 = '-dcopts' ]]
488 then
489 JAVAOPTS="$JAVAOPTS -dcopts"
490 elif [[ $1 = '-delaycomp' ]]
491 then
492 JAVAOPTS="$JAVAOPTS -delaycomp"
493 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
494 elif [[ $1 = '-hybrid' ]]
495 then
496 JAVAOPTS="$JAVAOPTS -hybrid"
497 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
498 elif [[ $1 = '-minimize' ]]
499 then
500 JAVAOPTS="$JAVAOPTS -minimize"
501
502 elif [[ $1 = '-ooojava' ]]
503 then
504 MLP_ON=true
505 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
506 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
507 shift
508 shift
509
510 elif [[ $1 = '-rcr' ]]
511 then
512 JAVAOPTS="$JAVAOPTS -rcr"
513
514 elif [[ $1 = '-coreprof' ]]
515 then
516 COREPROF=true
517 JAVAOPTS="$JAVAOPTS -coreprof"
518 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
519
520 elif [[ $1 = '-mlp' ]]
521 then
522 MLP_ON=true
523 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
524 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
525 shift
526 shift
527
528 elif [[ $1 = '-mlpdebug' ]]
529 then
530 JAVAOPTS="$JAVAOPTS -mlpdebug"
531
532 elif [[ $1 = '-check' ]]
533 then
534 CHECKFLAG=true
535 JAVAOPTS="$JAVAOPTS -conscheck"
536 elif [[ $1 = '-enable-assertions' ]]
537 then
538 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
539 elif [[ $1 = '-specdir' ]]
540 then
541 cd $2
542 SPECDIR=`pwd`
543 cd $CURDIR
544 shift
545 elif [[ $1 = '-debug' ]]
546 then
547 DEBUGFLAG=true
548 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
549 elif [[ $1 = '-rawpath' ]]
550 then
551 RAWPATHFLAG=true
552 elif [[ $1 = '-runtimedebug' ]]
553 then
554 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
555 elif [[ $1 = '-dsmcaching' ]]
556 then
557 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
558 elif [[ $1 = '-rangeprefetch' ]]
559 then
560 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
561 elif [[ $1 = '-nooptimize' ]]
562 then
563 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
564 elif [[ $1 = '-optimize' ]]
565 then
566 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
567 elif [[ $1 = '-thread' ]]
568 then
569 JAVAOPTS="$JAVAOPTS -thread"
570 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
571 THREADFLAG=true
572 elif [[ $1 = '-recovery' ]]
573 then
574 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
575 DSMRECOVERY=true
576 elif [[ $1 = '-recoverystats' ]]
577 then
578 JAVAOPTS="$JAVAOPTS -recoverystats"
579 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
580 elif [[ $1 = '-distributioninfo' ]]
581 then
582 JAVAOPTS="$JAVAOPTS -distributioninfo"
583 elif [[ $1 = '-disall' ]]
584 then
585 JAVAOPTS="$JAVAOPTS -disall"
586 elif [[ $1 = '-disstart' ]]
587 then
588 JAVAOPTS="$JAVAOPTS -disstart $2"
589 shift
590 elif [[ $1 = '-noc' ]]
591 then
592 CCOMPILEFLAG=false
593 elif [[ $1 = '-curdir' ]]
594 then
595 CURDIR=$2
596 shift
597 elif [[ $1 = '-outputdir' ]]
598 then
599 JAVAOPTS="$JAVAOPTS -outputdir $2"
600 shift
601 else
602 SRCFILES="$SRCFILES $1"
603 fi
604 shift
605 done
606
607 BUILDDIR="$CURDIR/$tmpbuilddirectory"
608
609 cd $1
610 cd $CURDIR
611 shift
612
613 mkdir $BUILDDIR
614
615 if $CHECKFLAG #Generate structure files for repair tool
616 then
617 JAVAOPTS="$JAVAOPTS -struct structfile"
618 fi
619
620 # Setup class path
621
622 if $RECOVERFLAG
623 then
624 if $FASTCHECK
625 then
626 #fast transactions
627 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
628 else
629 #base bristlecone files
630 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
631 fi
632 else
633 if $DSMFLAG
634 then
635 #dsm stuff
636 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
637 elif $STM
638 then
639 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
640 elif $THREADFLAG
641 then
642 #threading java stuff
643 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
644 fi
645 #base java stuff
646 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
647 fi
648
649 # Build bristlecone/java sources
650
651 if $MULTICOREFLAG
652 then
653 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
654 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
655 -dir $BUILDDIR $JAVAOPTS $SRCFILES
656 then exit $?
657 fi
658 else
659 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
660 if ! $NOJAVA
661 then
662 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
663 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
664 $JAVAOPTS $SRCFILES
665 then exit $?
666 fi
667 fi
668 fi
669
670 if $EXITAFTERANALYSIS
671 then
672 exit
673 fi
674
675 # Build all of the consistency specs
676
677 if $CHECKFLAG # CHECKFLAG
678 then
679 cd $SPECDIR
680 mkdir $BUILDDIR/specdir
681 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
682
683 echo > $BUILDDIR/specs
684
685 # compile specs into C code
686 for i in * # iterate over all directories
687 do
688 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
689 then
690 cd $SPECDIR/$i
691 cat $BUILDDIR/structfile.struct $i.label > $i.struct
692 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
693 cp size.[c,h] $BUILDDIR/specdir
694 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
695 echo $i >> $BUILDDIR/specs
696 fi # CVSDIR CHECK
697 done # iterate over all directories
698
699 #compile C code
700
701 cd $BUILDDIR/specdir
702 ./buildrobust
703 echo > $BUILDDIR/checkers.h
704 for i in `cat $BUILDDIR/specs`
705 do
706 gcc -O0 -g -fbounds-check -c $i\_aux.c
707 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
708 done
709 fi # CHECKFLAG
710
711 #build and link everything
712
713 if $RAWFLAG
714 then # RAWFLAG
715 RAWDIR="$CURDIR/raw"
716 MAKEFILE="Makefile.raw"
717 mkdir $RAWDIR
718 cd $RAWDIR
719 make clean
720 rm ./*
721
722 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
723
724 if $CACHEFLUSHFLAG
725 then # print path
726 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
727 fi
728
729 if $RAWPATHFLAG
730 then # print path
731 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
732 fi
733
734 if $DEBUGFLAG
735 then #debug version
736 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
737 fi
738
739 if $PROFILEFLAG
740 then # profile version
741 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
742 fi
743
744 if $ACCURATEPROFILEFLAG
745 then # accurateprofile version
746 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
747 fi
748
749 if $USEIOFLAG
750 then # useio version
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
752 fi
753
754 if $INTERRUPTFLAG
755 then #INTERRUPT version
756 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
757 fi #INTERRUPT version
758
759 if $USEIOFLAG
760 then # useio version
761 MAKEFILE="$MAKEFILE.io"
762 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
763 else
764 MAKEFILE="$MAKEFILE.$RAWCONFIG"
765 fi #useio version
766
767 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
768 cp ../Runtime/*.c ./
769 cp ../Runtime/*.h ./
770 cp ../Runtime/*.S ./
771 cp ../Runtime/*.s ./
772 cp ../Runtime/RAW/*.c ./
773 cp ../Runtime/RAW/*.h ./
774 cp ../Runtime/RAW/*.S ./
775 cp ../Runtime/RAW/*.s ./
776 cp ../$tmpbuilddirectory/*.c ./
777 cp ../$tmpbuilddirectory/*.h ./
778
779 make
780
781 elif $TILERAFLAG
782 then # TILERAFLAG
783 TILERADIR="$CURDIR/tilera"
784 if $TILERABMEFLAG
785 then # TILERABMEFLAG
786 TILERA_INDIR="BME"
787 MAKEFILE="Makefile.tilera.$TILERACONFIG"
788 SIMHVC="sim.hvc.$TILERACONFIG"
789 PCIHVC="pci.hvc.$TILERACONFIG"
790 if $GC1COREFLAG 
791 then # 1-core gc
792   if $TILERAN1COREFLAG
793   then # not only with 1 core
794         PCIHVC="$PCIHVC.1gc"
795   fi
796 fi
797 elif $TILERAZLINUXFLAG
798 then # TILERAZLINUXFLAG
799 TILERA_INDIR="ZLinux"
800 MAKEFILE="Makefile.tilera.$TILERACONFIG"
801 fi
802
803 mkdir $TILERADIR
804 cd $TILERADIR
805 make clean
806 rm ./*
807
808 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
809
810 if $TILERAMEMPROFFLAG
811 then # not only with 1 core
812   PCIHVC="$PCIHVC.memprof"
813   TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
814 fi
815
816 if $TILERABMEFLAG
817 then # TILERABMEFLAG
818 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
819 elif $TILERAZLINUXFLAG
820 then # TILERAZLINUXFLAG
821 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
822 fi
823
824 if $CACHEFLUSHFLAG
825 then # print path
826 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
827 fi
828
829 if $RAWPATHFLAG
830 then # print path
831 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
832 fi
833
834 if $DEBUGFLAG
835 then #debug version
836 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
837 fi
838
839 if $PROFILEFLAG
840 then # profile version
841 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
842 fi
843
844 if $ACCURATEPROFILEFLAG
845 then # accurateprofile version
846 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
847 fi
848
849 if $USEIOFLAG
850 then # useio version
851 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
852 fi
853
854 if $INTERRUPTFLAG
855 then #INTERRUPT version
856 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
857 fi #INTERRUPT version
858
859 if $MULTICOREGCFLAG
860 then #MULTICOREGC version
861 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
862 fi
863
864 if $GCPROFILEFLAG
865 then # GC_PROFILE version
866 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
867 fi
868
869 if $GCPROFILESFLAG
870 then # GC_PROFILE_S version
871 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
872 fi
873
874 if $GCMEMLOCALFLAG
875 then # SMEMLOCAL version
876 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
877 fi
878
879 if $GCMEMFIXEDFLAG
880 then # SMEMFIXED version
881 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
882 fi
883
884 if $GCMEMMIXEDFLAG
885 then # SMEMMIXED version
886 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
887 fi
888
889 if $GCMEMGLOBALFLAG
890 then # SMEMGLOBAL version
891 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
892 fi
893
894 if $GCCACHELOCALFLAG
895 then # CACHE_LOCAL version
896 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
897 fi
898
899 if $GCCACHERANFLAG
900 then # CACHE_RAN version
901 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
902 fi
903
904 if $GCCONTROLLERNEARFLAG
905 then # CONTROLLER_NEAR version
906 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
907 fi
908
909 if $GCCONTROLLERREMOTEFLAG
910 then # CONTROLLER_REMOTE version
911 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
912 fi
913
914 if $GCSMALLPAGESIZEFLAG
915 then # GC_SMALLPAGESIZE version
916 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
917 fi
918
919 if $GCLARGEPAGESIZEFLAG
920 then # GC_LARGEPAGESIZE version
921 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
922 fi
923
924 if $GCLARGESHAREDHEAPFLAG
925 then # GC_LARGESHAREDHEAP version
926 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
927 fi
928
929 if $GCSMALLPAGESIZEFLAG2
930 then # GC_SMALLPAGESIZE2 version
931 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
932 fi
933
934 if $GCLARGESHAREDHEAPFLAG2
935 then # GC_LARGESHAREDHEAP2 version
936 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
937 fi
938
939
940 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
941 if $TILERABMEFLAG
942 then # TILERABMEFLAG
943 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
944 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
945 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
946 fi
947 cp ../Runtime/multicoretask.c ./
948 cp ../Runtime/multicoreruntime.c ./
949 cp ../Runtime/Queue.c ./
950 cp ../Runtime/file.c ./
951 cp ../Runtime/math.c ./
952 cp ../Runtime/object.c ./
953 cp ../Runtime/GenericHashtable.c ./
954 cp ../Runtime/SimpleHash.c ./
955 cp ../Runtime/GCSharedHash.c ./
956 cp ../Runtime/ObjectHash.c ./
957 cp ../Runtime/socket.c ./
958 cp ../Runtime/mem.c ./
959 cp ../Runtime/multicoregarbage.c ./
960 cp ../Runtime/MGCHash.c ./
961 cp ../Runtime/GenericHashtable.h ./
962 cp ../Runtime/mem.h ./
963 cp ../Runtime/multicoreruntime.h ./
964 cp ../Runtime/object.h ./
965 cp ../Runtime/ObjectHash.h ./
966 cp ../Runtime/Queue.h ./
967 cp ../Runtime/runtime.h ./
968 cp ../Runtime/SimpleHash.h ./
969 cp ../Runtime/GCSharedHash.h ./
970 cp ../Runtime/multicoregc.h ./
971 cp ../Runtime/multicoregarbage.h ./
972 cp ../Runtime/multicorehelper.h ./
973 cp ../Runtime/MGCHash.h ./
974 cp ../Tilera/Runtime/*.c ./
975 cp ../Tilera/Runtime/*.h ./
976 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
977 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
978 if $TILERAZLINUXFLAG
979 then # TILERAZLINUXFLAG
980 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
981 fi
982 #if $TILERAMEMPROFFLAG
983 #then # TILERAMEMPROFFLAG
984 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
985 #fi
986 cp ../Tilera/lib/* ./
987 cp ../$tmpbuilddirectory/*.c ./
988 cp ../$tmpbuilddirectory/*.h ./
989
990 make
991
992 else #!RAWFLAG && !TILERABMEFLAG  && ! TILERAZLINUXFLAG
993 cd $CURDIR 
994
995 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
996 -I$BUILDDIR"
997
998 if $MULTICOREFLAG
999 then
1000 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
1001 else
1002 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1003 fi
1004
1005 FILES="$RUNTIMEFILE \
1006 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1007 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1008 $ROBUSTROOT/Runtime/ObjectHash.c \
1009 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1010 $ROBUSTROOT/Runtime/math.c \
1011 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1012
1013 if $NUMA
1014 then
1015 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1016 fi
1017
1018 if $EVENTMONITOR
1019 then
1020 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1021 fi
1022
1023 if $FASTMEMCPY
1024 then
1025 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1026 fi
1027
1028 if $DSMFLAG
1029 then
1030 if $DSMRECOVERY
1031 then
1032 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1033 FILES="$FILES $DSMRECOVERYRUNTIME/trans.c $DSMRECOVERYRUNTIME/mcpileq.c $DSMRECOVERYRUNTIME/objstr.c $DSMRECOVERYRUNTIME/dstm.c $DSMRECOVERYRUNTIME/altmlookup.c $DSMRECOVERYRUNTIME/clookup.c $DSMRECOVERYRUNTIME/llookup.c $DSMRECOVERYRUNTIME/tlookup.c $DSMRECOVERYRUNTIME/threadnotify.c $DSMRECOVERYRUNTIME/dstmserver.c $DSMRECOVERYRUNTIME/plookup.c $DSMRECOVERYRUNTIME/ip.c $DSMRECOVERYRUNTIME/queue.c $DSMRECOVERYRUNTIME/altprelookup.c $DSMRECOVERYRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRECOVERYRUNTIME/sockpool.c $DSMRECOVERYRUNTIME/addUdpEnhance.c $DSMRECOVERYRUNTIME/signal.c $DSMRECOVERYRUNTIME/gCollect.c $DSMRECOVERYRUNTIME/addPrefetchEnhance.c $DSMRECOVERYRUNTIME/dsmlock.c $DSMRECOVERYRUNTIME/translist.c $DSMRECOVERYRUNTIME/paxos.c"
1034 else
1035 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1036 FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/altprelookup.c $DSMRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c $DSMRUNTIME/addPrefetchEnhance.c $DSMRUNTIME/dsmlock.c $DSMRUNTIME/prefetch.c $DSMRUNTIME/altmlookup.c"
1037 fi
1038 fi
1039
1040 if $STM
1041 then
1042 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1043 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1044 fi
1045
1046 if $SANDBOX
1047 then
1048 if $DSMFLAG
1049 then
1050 FILES="$FILES $DSMRUNTIME/sandbox.c"
1051 else
1052 FILES="$FILES $STMRUNTIME/sandbox.c"
1053 fi
1054 fi
1055
1056 if $ABORTREADERS
1057 then
1058 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1059 fi
1060
1061 if $FASTCHECK
1062 then
1063 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1064 fi
1065
1066 if $COREPROF
1067 then
1068 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1069 fi
1070
1071 if $MLP_ON
1072 then
1073 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1074 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1075 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1076 fi
1077
1078 if $RECOVERFLAG
1079 then
1080 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1081 if $MULTICOREFLAG
1082 then
1083 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1084 fi
1085 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1086 if $RAWFLAG
1087 then
1088 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1089 fi
1090 if $THREADSIMULATEFLAG
1091 then
1092 # -lpthread for pthread functions, -lrt for message queue functions
1093 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1094 fi
1095 fi
1096
1097 if $OPTIONALFLAG
1098 then
1099 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1100 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1101 fi
1102
1103 if $THREADFLAG
1104 then
1105 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1106 fi
1107
1108 if $CHECKFLAG
1109 then
1110 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1111 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1112 fi
1113
1114 if $USEDMALLOC
1115 then
1116 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1117 fi
1118
1119 if $ASSEMBLY
1120 then
1121 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1122 -c $tmpbuilddirectory/methods.c -lm
1123 fi
1124
1125 if $MULTICOREFLAG
1126 then
1127 gcc $INCLUDES $EXTRAOPTIONS \
1128 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1129 else
1130 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1131 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1132 fi
1133
1134 fi #!RAWFLAG
1135
1136
1137 exit
1138