-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBuildingJikesRVM.html
More file actions
1315 lines (1249 loc) · 66.8 KB
/
Copy pathBuildingJikesRVM.html
File metadata and controls
1315 lines (1249 loc) · 66.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
layout: default
---
<?xml version="1.0" encoding="utf8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd-->
<html xmlns="http://www.w3.org/1999/xhtml"
>
<head><title>3 Building Jikes RVM</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)" />
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)" />
<!-- xhtml,charset=utf8,2,html -->
<meta name="src" content="index.tex" />
<link rel="stylesheet" type="text/css" href="index.css" />
</head><body
>
<!--l. 2--><div class="crosslinks"><p class="noindent"></p></div>
<h2 class="chapterHead"><span class="titlemark">Chapter 3</span><br /><a
id="x5-60003"></a>Building Jikes RVM</h2>
<!--l. 5--><p class="noindent" >This guide describes how to build Jikes RVM. The first section is an overview of the
Jikes RVM build process and this is followed by your system requirements and a
detailed description of the steps required to build Jikes RVM.
</p><!--l. 7--><p class="noindent" >Once you have things working, as described below, the <a
href="#x5-340003.8">buildit script</a> will provide a
fast and easy way to build the system. We recommend you get things working as
described below first, so you can be sure you’ve met the requisite dependencies
etc.
</p>
<h3 class="sectionHead"><span class="titlemark">3.1 </span> <a
id="x5-70003.1"></a>Overview</h3>
<!--l. 11--><p class="noindent" >To avoid problems with the build, make sure that the path to the Jikes RVM source
code doesn’t contain any whitespace.
</p><!--l. 13--><p class="noindent" >If you run into trouble when building Jikes RVM, don’t hesitate to ask for help on
the <a
href="http://www.jikesrvm.org/MailingLists/" >researchers mailing list</a>.
</p><!--l. 15--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.1.1 </span> <a
id="x5-80003.1.1"></a>Compiling the source code</h4>
<!--l. 17--><p class="noindent" >The majority of Jikes RVM is written in Java and will be compiled into class files
just as with other Java applications. There is also a small portion of Jikes
RVM that is written in C that must be compiled with a C compiler such
as gcc. Jikes RVM uses <a
href="https://ant.apache.org" >Ant</a> version 1.7.0 or later as the build tool that
orchestrates the build process and executes the steps required in building Jikes
RVM.
</p><!--l. 19--><p class="noindent" >Jikes RVM requires a complete install of ant, including the optional tasks. These are
present if you download and install ant manually. Some Linux distributions have
decided to break ant into multiple packages. So if you are installing on a platform
such as Debian you may need to install another package such as ’ant-optional’.
</p><!--l. 22--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.1.2 </span> <a
id="x5-90003.1.2"></a>Generating source code</h4>
<!--l. 24--><p class="noindent" >The build process also generates Java and C source code based on build time
constants such as the selected instruction architecture, garbage collectors and
compilers. The generation of the source code occurs prior to the compilation
phase.
</p><!--l. 28--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.1.3 </span> <a
id="x5-100003.1.3"></a>Bootstrapping Jikes RVM</h4>
<!--l. 30--><p class="noindent" >Jikes RVM compiles Java class files and produces arrays of code and data. To build
itself Jikes RVM will execute on an existing Java Virtual Machine and compiles a
copy of it’s own class files into a boot image for the code and data using the boot
image writer tool. The set of files compiled is called the <a
href="#x5-330003.7">Primordial Class List</a>. The
boot image runner is a small C program that loads the boot image and transfers
control flow into Jikes RVM.
</p><!--l. 34--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.1.4 </span> <a
id="x5-110003.1.4"></a>Class libraries</h4>
<!--l. 36--><p class="noindent" >The Java class library is the mechanism by which Java programs communicate with
the outside world. Jikes RVM has configurable class library support, the most mature
of which is the the <a
href="http://www.gnu.org/software/classpath/" >GNU Classpath</a> class library.
</p><!--l. 38--><p class="noindent" >For GNU Classpath, the developer can either specify a particular version of GNU
Classpath to use. By default the build process will download and build GNU
Classpath.
</p><!--l. 40--><p class="noindent" >Previous releases of the Jikes RVM had support for the Apache Harmony class
library. Jikes RVM no longer supports Apache Harmony because Apache Harmony
development <a
href="https://harmony.apache.org/" >was stopped</a>. Work on support for OpenJDK has started but is not yet
complete.
</p><!--l. 46--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">3.2 </span> <a
id="x5-120003.2"></a>Target Requirements</h3>
<!--l. 48--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.2.1 </span> <a
id="x5-130003.2.1"></a>Architectures</h4>
<!--l. 49--><p class="noindent" >The PowerPC (or ppc) and ia32 instruction set architectures are supported by Jikes
RVM.
</p><!--l. 51--><p class="noindent" >Intel’s Instruction Set Architectures (ISAs) get known by different names:
</p>
<ul class="itemize1">
<li class="itemize">IA-32 is the name used to describe processors such as 386, 486 and
the Pentium processors. It is popularly called x86 or sometimes in our
documentation as x86-32.
</li>
<li class="itemize">IA-32e is the name used to describe the extension of the IA-32 architecture
to support 8 more registers and a 64-bit address space. It is popularly
called x86_64 or AMD64, as AMD chips were the first to support it. It
is found in processors such AMD’s Opteron and Athlon 64, as well as in
Intel’s own Pentium 4 processors that have EM64T in their name.
</li>
<li class="itemize">IA-64 is the name of Intel’s Itanium processor ISA.</li></ul>
<!--l. 59--><p class="noindent" >Jikes RVM currently supports the IA-32 ISA and work on IA32-e is in progress. As
IA-32e is backward compatible with IA-32, Jikes RVM can be built and run upon
IA-32e processors. The IA-64 architecture supports IA-32 code through a
compatibility mode or through emulation and Jikes RVM should run in this
configuration. Native IA-64 is not supported.
</p><!--l. 61--><p class="noindent" >On PowerPC, only big endian is supported.
</p><!--l. 65--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.2.2 </span> <a
id="x5-140003.2.2"></a>Operating Systems</h4>
<!--l. 66--><p class="noindent" >Jikes RVM is capable of running on any operating system that is supported by the
GNU Classpath library, low level library support is implemented and memory layout
is defined. The low level library support includes interaction with the threading and
signal libraries, memory management facilities and dynamic library loading services.
The memory layout must also be known, as Jikes RVM will attempt to locate the
boot image code and data at specific memory locations. These memory locations
must not conflict with where the native compiler places it’s code and data.
Operating systems that are known to work include Linux and OS X. At one stage
a port to win32 was completed but it was never integrated into the main
Jikes RVM codebase. AIX was supported previously but support has been
removed due to lack of demand. The same applies for support of Mac OS on
PPC.
</p><!--l. 68--><p class="noindent" >Note: Current implementation of Jikes RVM implies that system native libraries (like
GTK+) have been compiled with frame pointers. Most of Linux distribution have
frame pointers enabled in most of the packages, but some explicitly use
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">-fomit-frame-pointer</span></span></span> thus producing the library that can’t be used with Jikes
RVM.
</p><!--l. 71--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.2.3 </span> <a
id="x5-150003.2.3"></a>Support Matrix</h4>
<!--l. 72--><p class="noindent" >The platform support matrix table details the targets that have historically
been supported and the current status of the support. The target.name
column is the identifier that Jikes RVM uses to identify this target. ??? means
that we don’t have regression machines for this platform so the Jikes RVM
team can’t guarantee that the target works at a given point in time. We
rely on the community to provide a Jikes RVM implementation on these
platforms.
</p>
<div class="table">
<!--l. 76--><p class="noindent" ><a
id="x5-15001r1"></a></p><hr class="float" /><div class="float"
>
<div class="tabular"> <table id="TBL-2" class="tabular"
><colgroup id="TBL-2-1g"><col
id="TBL-2-1" /><col
id="TBL-2-2" /><col
id="TBL-2-3" /><col
id="TBL-2-4" /><col
id="TBL-2-5" /></colgroup><tr
style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-1-1"
class="td11">target.name </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-2"
class="td11"> OS </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-3"
class="td11"> ISA </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-4"
class="td11">Address size</td><td style="white-space:nowrap; text-align:center;" id="TBL-2-1-5"
class="td11">Status</td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-2-1"
class="td11">ia32-linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-2"
class="td11"> Linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-3"
class="td11"> IA32 </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-4"
class="td11"> 32 bits </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-2-5"
class="td11"> OK </td></tr><tr
style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-3-1"
class="td11">ia32-osx </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-2"
class="td11"> OS X </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-3"
class="td11"> IA32 </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-4"
class="td11"> 32 bits </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-3-5"
class="td11"> ???</td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-4-1"
class="td11">ia32-solaris </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-2"
class="td11"> Solaris </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-3"
class="td11"> IA32 </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-4"
class="td11"> 32 bits </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-4-5"
class="td11"> ??? </td></tr><tr
style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-5-1"
class="td11">ia32-cygwin </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-2"
class="td11">Windows</td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-3"
class="td11"> IA32 </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-4"
class="td11"> 32 bits </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-5-5"
class="td11"> NYI</td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-6-1"
class="td11">x86_64-linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-2"
class="td11"> Linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-3"
class="td11"> IA32 </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-4"
class="td11"> <span
class="cmbx-10">32 bits </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-6-5"
class="td11"> OK </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-7-1"
class="td11">x86_64-osx </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-2"
class="td11"> OS X </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-3"
class="td11"> IA32 </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-4"
class="td11"> <span
class="cmbx-10">32 bits </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-7-5"
class="td11"> ??? </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-8-1"
class="td11">x86_64_m64-linux</td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-2"
class="td11"> Linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-3"
class="td11"> IA32e </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-4"
class="td11"> <span
class="cmbx-10">64 bits </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-8-5"
class="td11"> <a
href="https://xtenlang.atlassian.net/browse/RVM-977" >WIP</a> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-9-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-9-1"
class="td11">x86_64_m64-osx </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-2"
class="td11"> OS X </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-3"
class="td11"> IA32e </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-4"
class="td11"> <span
class="cmbx-10">64 bits </span></td><td style="white-space:nowrap; text-align:center;" id="TBL-2-9-5"
class="td11"> ??? </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-10-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-10-1"
class="td11">ppc32-linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-2"
class="td11"> Linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-3"
class="td11">ppc32 (big e.)</td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-4"
class="td11"> 32 bits </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-10-5"
class="td11"> ??? </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-11-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-11-1"
class="td11">ppc64-linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-2"
class="td11"> Linux </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-3"
class="td11">ppc64 (big e.)</td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-4"
class="td11"> 64 bits </td><td style="white-space:nowrap; text-align:center;" id="TBL-2-11-5"
class="td11"> OK </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-12-"><td style="white-space:nowrap; text-align:left;" id="TBL-2-12-1"
class="td11"> </td></tr></table></div>
<br /> <div class="caption"
><span class="id">Table 3.1: </span><span
class="content">platform support matrix</span></div><!--tex4ht:label?: x5-15001r1 -->
</div><hr class="endfloat" />
</div>
<!--l. 93--><p class="noindent" >x86_64 is currently only supported using the legacy 32bit addressing mode and
instructions. You need to install the 32-bit versions of the required libraries to build
and use the x86_64 configurations.
</p><!--l. 95--><p class="noindent" >Note that building on Windows is currently not supported. All previous attempts at
building on Windows natively (i.e. without cygwin) used the Apache Harmony
classlibrary whose development has been discontinued. Support for building with
cygwin is not yet implemented.
</p>
<h3 class="sectionHead"><span class="titlemark">3.3 </span> <a
id="x5-160003.3"></a>Tool Requirements</h3>
<!--l. 103--><p class="noindent" ><span class="paragraphHead"><a
id="x5-170003.3"></a><span
class="cmbx-10">Java Virtual Machine</span></span>
Jikes RVM requires an existing Java Virtual Machine that conforms to Java 6.0 such
as Oracle JDK 1.6, OpenJDK/IcedTea 6 or IBM SDK 6.0. We also aim to support
the Java 7.0-conformant ans Java 8.8-conformant versions of these virtual
machines.
</p><!--l. 107--><p class="noindent" >Some Java Virtual Machines are unable to cope with compiling the Java class library
so it is recommended that you install one of the above mentioned JVMs if they are
not already installed on your system. The remaining build instructions assume that a
suitable Java Virtual Machine is on your path. You can run <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">java -version</span></span></span> to check
you are using the correct JVM.
</p>
<!--l. 111--><p class="noindent" ><span class="paragraphHead"><a
id="x5-180003.3"></a><span
class="cmbx-10">Ant</span></span>
Ant version 1.7.0 or later is the tool required to orchestrate the build process. You
can download and install the Ant tool from <a
href="http://ant.apache.org/" >its Apache homepage</a> if it is not already
installed on your system. The remaining build instructions assume that
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">$ANT_HOME/bin</span></span></span> is on your path and points to a full Ant installation (i.e. including
the optional tasks). You can run <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">ant -version</span></span></span> to check you are running the correct
version of ant.
</p>
<!--l. 117--><p class="noindent" ><span class="paragraphHead"><a
id="x5-190003.3"></a><span
class="cmbx-10">C compilers</span></span>
The Jikes RVM build assumes that the GNU Compiler Collection is present on the
system. Most modern *nix environments satisfy this requirement. Clang should also
work but is untested.
</p>
<!--l. 123--><p class="noindent" ><span class="paragraphHead"><a
id="x5-200003.3"></a><span
class="cmbx-10">Bison</span></span>
As part of the build process, Jikes RVM uses the bison tool which should be present
on most modern *nix environments.
</p>
<!--l. 129--><p class="noindent" ><span class="paragraphHead"><a
id="x5-210003.3"></a><span
class="cmbx-10">Perl</span></span>
Perl is trivially used as part of the build process but this requirement may be
removed in future releases of Jikes RVM. Perl is also used as part of the regression
and performance testing framework.
</p>
<!--l. 135--><p class="noindent" ><span class="paragraphHead"><a
id="x5-220003.3"></a><span
class="cmbx-10">Awk</span></span>
GNU Awk is required as part of the regression and performance testing framework
but is not required when building Jikes RVM.
</p>
<!--l. 143--><p class="noindent" ><span class="paragraphHead"><a
id="x5-230003.3"></a><span
class="cmbx-10">Extra tools recommended for Solaris</span></span>
pkg-get will greatly simplify installing GNU packages on Solaris. Our patches require
that GNU patch is picked up in preference to Sun’s. You can create a symbolic link
to <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">/usr/bin/gpatch</span></span></span> from <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">/opt/csw/bin/patch</span></span></span> and make sure <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">/opt/csw/bin</span></span></span> is in
your path before <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">/usr/bin</span></span></span> in order to achieve this.
</p><!--l. 149--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">3.4 </span> <a
id="x5-240003.4"></a>Instructions</h3>
<!--l. 151--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.4.1 </span> <a
id="x5-250003.4.1"></a>Defining Ant properties</h4>
<!--l. 153--><p class="noindent" >There are a number of ant properties that are used to control the build process of
Jikes RVM. These properties may either be specified on the command line by
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">-Dproperty=variable</span></span></span> or they may be specified in a file named <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.ant.properties</span></span></span> in
the base directory of the jikesrvm source tree. The <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.ant.properties</span></span></span> file is a
standard Java property file with each line containing a <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">property=variable</span></span></span> and
comments starting with a <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">#</span></span></span> and finishing at the end of the line.
</p><!--l. 155--><p class="noindent" >The available properties can be grouped into properties that resolve to values and
properties that resolve to directories. For properties that resolve to directories, you
must make sure that the value of the property resolves to an absolute path. Relative
paths aren’t supported by our build system. The path must not contain any
whitespace.
</p><!--l. 157--><p class="noindent" >Suppose you want to have your build directory in your Jikes RVM directory
at <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">mybuilddir</span></span></span> (as opposed to <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">target</span></span></span>). You would then set <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build.dir</span></span></span> to
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${jikesrvm.dir}/mybuilddir</span></span></span>. If you wanted to have your build directory in the
parent directory of the Jikes RVM directory, you would set <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build.dir</span></span></span> to
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${jikesrvm.dir}/../mybuilddir</span></span></span> .
</p>
<div class="table">
<!--l. 160--><p class="noindent" ><a
id="x5-25001r2"></a></p><hr class="float" /><div class="float"
>
<div class="tabular"> <table id="TBL-3" class="tabular"
><colgroup id="TBL-3-1g"><col
id="TBL-3-1" /><col
id="TBL-3-2" /><col
id="TBL-3-3" /></colgroup><tr
style="vertical-align:baseline;" id="TBL-3-1-"><td style="white-space:normal; text-align:left;" id="TBL-3-1-1"
class="td11"><!--l. 162--><p class="noindent" >Property </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-1-2"
class="td11"><!--l. 162--><p class="noindent" >Description </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-1-3"
class="td11"><!--l. 162--><p class="noindent" >Default </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-2-"><td style="white-space:normal; text-align:left;" id="TBL-3-2-1"
class="td11"><!--l. 163--><p class="noindent" >host.name </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-2-2"
class="td11"><!--l. 163--><p class="noindent" >The name of the host environment used for
building Jikes RVM. The host environment
defines the paths to the tools used during the
build, e.g. the path to the C compiler. The name
should match one of the files located in the
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build/hosts/</span></span></span> directory minus the ’.properties’
extension. </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-2-3"
class="td11"><!--l. 163--><p class="noindent" >None </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-3-"><td style="white-space:normal; text-align:left;" id="TBL-3-3-1"
class="td11"><!--l. 164--><p class="noindent" >target.name </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-3-2"
class="td11"><!--l. 164--><p class="noindent" >The name of the target environment for Jikes
RVM. The name should match one of the
files located in the <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build/targets/</span></span></span> directory
minus the ’.properties’ extension. This should
only be specified when cross compiling the
Jikes RVM. See <a
href="#x5-310003.6">Cross-Platform Building</a> for a
detailed description of cross compilation. </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-3-3"
class="td11"><!--l. 164--><p class="noindent" ><span
class="tcrm-1000">$</span><span
class="cmsy-10">{</span>host.name<span
class="cmsy-10">}</span> </p> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-4-"><td style="white-space:normal; text-align:left;" id="TBL-3-4-1"
class="td11"><!--l. 165--><p class="noindent" >config.name </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-4-2"
class="td11"><!--l. 165--><p class="noindent" >The name of the configuration used when
building Jikes RVM. The name should match
one of the files located in the <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build/configs/</span></span></span>
directory minus the ’.properties’ extension. This
setting is further described in the section
<a
href="/UserGuide/ConfiguringJikesRVM/index.html#x6-430004">Configuring Jikes RVM</a>. </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-4-3"
class="td11"><!--l. 165--><p class="noindent" >None </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-5-"><td style="white-space:normal; text-align:left;" id="TBL-3-5-1"
class="td11"><!--l. 166--><p class="noindent" >patch.name </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-5-2"
class="td11"><!--l. 166--><p class="noindent" >An identifier for the current patch applied to the
source tree. See <a
href="#x5-300003.5">Building Patched Versions</a> for
a description of how this fits into the standard
usage patterns of Jikes RVM. </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-5-3"
class="td11"><!--l. 166--><p class="noindent" >“ ” </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-6-"><td style="white-space:normal; text-align:left;" id="TBL-3-6-1"
class="td11"><!--l. 167--><p class="noindent" >require.rvm-unit-tests </p> </td><td style="white-space:normal; text-align:left;" id="TBL-3-6-2"
class="td11"><!--l. 167--><p class="noindent" >If set to <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">true</span></span></span>, run <a
href="/UserGuide/TestingJikesRVM/index.html#x12-11000010">unit tests</a> on the built Jikes
RVM image. Use with care as it will significantly
increase build times for configurations that are
compiled using a non-optimizing compiler (see
below). </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-6-3"
class="td11"><!--l. 167--><p class="noindent" >(Undefined,
tests are
not run) </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-7-"><td style="white-space:normal; text-align:left;" id="TBL-3-7-1"
class="td11"><!--l. 168--><p class="noindent" >require.<br
class="newline" />checkstyle </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-7-2"
class="td11"><!--l. 168--><p class="noindent" >Only useful if you want to <a
href="http://www.jikesrvm.org/Contributions/" >contribute</a> changes
to the Jikes RVM. If set to true, run checkstyle
during the build to check for violations of
the Jikes RVM <a
href="/UserGuide/ModifyingJikesRVM/index.html#x9-900007.4">Coding Style</a> and <a
href="/UserGuide/ModifyingJikesRVM/index.html#x9-850007.3">Coding
Conventions</a> for assertions. </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-7-3"
class="td11"><!--l. 168--><p class="noindent" >(Undefined,
no checks
run) </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-8-"><td style="white-space:normal; text-align:left;" id="TBL-3-8-1"
class="td11"><!--l. 169--><p class="noindent" >rvm.debug-symbols </p> </td><td style="white-space:normal; text-align:left;" id="TBL-3-8-2"
class="td11"><!--l. 169--><p class="noindent" >If set to true, build the Jikes RVM with debug
symbols for the bootloader code and the code
in the bootimage. Note: this is not enabled
by default because it causes build failures for
configurations that build the bootimage with
the optimizing compiler (see <a
href="https://xtenlang.atlassian.net/browse/RVM-1084" >RVM-1084</a>). </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-8-3"
class="td11"><!--l. 169--><p class="noindent" >(Undefined,
no symbols
built) </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-9-"><td style="white-space:normal; text-align:left;" id="TBL-3-9-1"
class="td11"><!--l. 170--><p class="noindent" >protect.config-files </p> </td><td style="white-space:normal; text-align:left;" id="TBL-3-9-2"
class="td11"><!--l. 170--><p class="noindent" >Define this property if you do not want the build
process to update configuration files when auto
downloading components. </p></td><td style="white-space:normal; text-align:left;" id="TBL-3-9-3"
class="td11"><!--l. 170--><p class="noindent" >(Undefined) </p> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-3-10-"><td style="white-space:normal; text-align:left;" id="TBL-3-10-1"
class="td11"> </td></tr></table></div>
<br /> <div class="caption"
><span class="id">Table 3.2: </span><span
class="content">Ant value properties for Jikes RVM</span></div><!--tex4ht:label?: x5-25001r2 -->
</div><hr class="endfloat" />
</div>
<div class="table">
<!--l. 176--><p class="noindent" ><a
id="x5-25002r3"></a></p><hr class="float" /><div class="float"
>
<div class="tabular"> <table id="TBL-4" class="tabular"
><colgroup id="TBL-4-1g"><col
id="TBL-4-1" /><col
id="TBL-4-2" /><col
id="TBL-4-3" /></colgroup><tr
style="vertical-align:baseline;" id="TBL-4-1-"><td style="white-space:normal; text-align:left;" id="TBL-4-1-1"
class="td11"><!--l. 178--><p class="noindent" >Property </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-1-2"
class="td11"><!--l. 178--><p class="noindent" >Description </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-1-3"
class="td11"><!--l. 178--><p class="noindent" >Default </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-4-2-"><td style="white-space:normal; text-align:left;" id="TBL-4-2-1"
class="td11"><!--l. 179--><p class="noindent" >components.dir </p> </td><td style="white-space:normal; text-align:left;" id="TBL-4-2-2"
class="td11"><!--l. 179--><p class="noindent" >The directory where Ant looks for external
components when building Jikes RVM. </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-2-3"
class="td11"><!--l. 179--><p class="noindent" ><span
class="tcrm-1000">$</span><span
class="cmsy-10">{</span>jikesrvm.<br
class="newline" />dir<span
class="cmsy-10">}</span>/components </p> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-4-3-"><td style="white-space:normal; text-align:left;" id="TBL-4-3-1"
class="td11"><!--l. 180--><p class="noindent" >dist.dir </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-3-2"
class="td11"><!--l. 180--><p class="noindent" >The directory where Ant stores the final Jikes
RVM runtime. </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-3-3"
class="td11"><!--l. 180--><p class="noindent" ><span
class="tcrm-1000">$</span><span
class="cmsy-10">{</span>jikesrvm.<br
class="newline" />dir<span
class="cmsy-10">}</span>/dist </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-4-4-"><td style="white-space:normal; text-align:left;" id="TBL-4-4-1"
class="td11"><!--l. 181--><p class="noindent" >build.dir </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-4-2"
class="td11"><!--l. 181--><p class="noindent" >The directory where Ant stores the intermediate
artifacts generated when building the Jikes
RVM. </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-4-3"
class="td11"><!--l. 181--><p class="noindent" ><span
class="tcrm-1000">$</span><span
class="cmsy-10">{</span>jikesrvm.<br
class="newline" />dir<span
class="cmsy-10">}</span>/target </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-4-5-"><td style="white-space:normal; text-align:left;" id="TBL-4-5-1"
class="td11"><!--l. 182--><p class="noindent" >components.cache.dir </p> </td><td style="white-space:normal; text-align:left;" id="TBL-4-5-2"
class="td11"><!--l. 182--><p class="noindent" >The directory where Ant caches downloaded
components. If you explicitly download a
component, place it in this directory. </p></td><td style="white-space:normal; text-align:left;" id="TBL-4-5-3"
class="td11"><!--l. 182--><p class="noindent" >(Undefined,
forcing
download) </p></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-4-6-"><td style="white-space:normal; text-align:left;" id="TBL-4-6-1"
class="td11"> </td></tr></table></div>
<br /> <div class="caption"
><span class="id">Table 3.3: </span><span
class="content">Ant directory properties for Jikes RVM</span></div><!--tex4ht:label?: x5-25002r3 -->
</div><hr class="endfloat" />
</div>
<!--l. 188--><p class="noindent" >At a minimum it is recommended that the user specify the <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">host.name</span></span></span> property in
the <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.ant.properties</span></span></span> file.
</p><!--l. 190--><p class="noindent" >The configuration files in <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build/targets/</span></span></span> and <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">build/hosts/</span></span></span> are designed to work
with a typical install but it may be necessary to overide specific properties. The
easiest way to achieve this is to specify the properties to override in the
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.ant.properties</span></span></span> file.
</p>
<h4 class="subsectionHead"><span class="titlemark">3.4.2 </span> <a
id="x5-260003.4.2"></a>Selecting a Configuration</h4>
<!--l. 196--><p class="noindent" >A configuration in terms of Jikes RVM is the combination of build time parameters
and component selection used for a particular Jikes RVM image. The section
<a
href="/UserGuide/ConfiguringJikesRVM/index.html#x6-430004">Configuring Jikes RVM</a> section describes the details of how to define a configuration.
Typical configuration names include: </p>
<ul class="itemize1">
<li class="itemize"><span
class="cmbx-10">production</span>: This configuration defines a fully optimized version of the
Jikes RVM.
</li>
<li class="itemize"><span
class="cmbx-10">development</span>: This configuration is the same as production but with
debug options enabled. The debug options perform internal verification of
Jikes RVM which means that it builds and executes more slowly.
</li>
<li class="itemize"><span
class="cmbx-10">prototype</span>: This configuration is compiled using an unoptimized compiler
and includes minimal components which means it has the fastest build
time.
</li>
<li class="itemize"><span
class="cmbx-10">prototype-opt</span>: This configuration is compiled using an unoptimized
compiler but it includes the adaptive system and optimizing compiler.
This configuration has a reasonably fast build time.</li></ul>
<!--l. 204--><p class="noindent" >If a user is working on a particular configuration most of the time they may specify
the config.name ant property in <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.ant.properties</span></span></span> otherwise it should be passed in
on the command line <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">-Dconfig.name=...</span></span></span>.
</p><!--l. 208--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.4.3 </span> <a
id="x5-270003.4.3"></a>Fetching Dependencies</h4>
<!--l. 210--><p class="noindent" >The Jikes RVM has a build time dependency on the GNU Classpath class library and
depending on the configuration may have a dependency on <a
href="http://www.cs.kent.ac.uk/projects/gc/gcspy/" >GCSpy</a>. The build system
will attempt to download and build these dependencies if they are not present or are
the wrong version.
</p><!--l. 212--><p class="noindent" >To just download and install the GNU Classpath class library you can run the
command ”ant -f build/components/classpath.xml”. After this command has
completed running it should have downloaded and built the GNU Classpath class
library for the current host. See the <a
href="/UserGuide/MMTk/index.html#x19-23900016.4">Using GCSpy</a> page for directions on building
configurations with GCSpy support.
</p><!--l. 214--><p class="noindent" >If you wish to manually download components (for example you need to define a
proxy, so ant is not correctly downloading), you can do so and identify the directory
containing the downloads using <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">-Dcomponents.cache.dir=<download directory></span></span></span>
when you build with ant.
</p><!--l. 218--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.4.4 </span> <a
id="x5-280003.4.4"></a>Building Jikes RVM</h4>
<!--l. 220--><p class="noindent" >The next step in building Jikes RVM is to run the ant command <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">ant</span></span></span> or
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">ant -Dconfig.name=...</span></span></span>. This should build a complete RVM runtime in
the directory <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${dist.dir}/${config.name}_${target.name}</span></span></span>. A complete
list of documented targets can be listed by executing the command <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">ant</span>
<span
class="cmtt-10">-projecthelp</span></span></span>.
</p><!--l. 224--><p class="noindent" >
</p>
<h4 class="subsectionHead"><span class="titlemark">3.4.5 </span> <a
id="x5-290003.4.5"></a>Running Jikes RVM</h4>
<!--l. 226--><p class="noindent" >Jikes RVM can be executed in a similar way to most Java Virtual Machines. The
difference is that the command is <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">rvm</span></span></span> and resides in the runtime directory (i.e.
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${dist.dir}/${config.name}_${target.name}</span></span></span>). See <a
href="/UserGuide/RunningJikesRVM/index.html#x11-1030009">Running Jikes RVM</a> for a list
of command line options.
</p><!--l. 1--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">3.5 </span> <a
id="x5-300003.5"></a>Building Patched Versions</h3>
<!--l. 4--><p class="noindent" >As part of the research process there will be a need to evaluate a set of changes to
the source tree. To make this process easier the property named patch.name can be
set to a non-empty string. This will cause the output directory to have the
name <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${config.name}_${target.name}_${config.variant}</span></span></span> rather than
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${config.name}_${target.name}</span></span></span>, thus making it easy to differentiate between the
patched and unpatched runtimes.
</p><!--l. 6--><p class="noindent" >The following steps will create a runtime without the patch in <span
class="cmtt-10">dist/prototype</span><span
class="cmtt-10">_ia32-linux</span>
and a runtime with the patch applied in <span
class="cmtt-10">dist/prototype</span><span
class="cmtt-10">_ia32-linux</span><span
class="cmtt-10">_ReadBarriers</span>:
</p>
<!--l. 8-->
<div class="lstlisting" id="listing-9"><span class="label"><a
id="x5-30001r1"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">cd</span><span
class="cmtt-10"> </span><span
class="tctt-1000">$</span><span
class="cmtt-10">RVM_ROOT</span><span
class="cmtt-10"> </span><br /><span class="label"><a
id="x5-30002r2"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">ant</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dconfig</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">prototype</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dhost</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">ia32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10"> </span><br /><span class="label"><a
id="x5-30003r3"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">patch</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">p0</span><span
class="cmtt-10"> </span><span
class="cmtt-10"><</span><span
class="cmtt-10"> </span><span
class="cmtt-10">ReadBarriers</span><span
class="cmtt-10">.</span><span
class="cmtt-10">diff</span><span
class="cmtt-10"> </span><br /><span class="label"><a
id="x5-30004r4"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">ant</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dconfig</span><span
class="cmtt-10">.</span><span
class="cmtt-10">variant</span><span
class="cmtt-10">=</span><span
class="cmtt-10">ReadBarriers</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dconfig</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">prototype</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dhost</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">ia32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10"> </span><br /><span class="label"><a
id="x5-30005r5"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">patch</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">R</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">p0</span><span
class="cmtt-10"> </span><span
class="cmtt-10"><</span><span
class="cmtt-10"> </span><span
class="cmtt-10">ReadBarriers</span><span
class="cmtt-10">.</span><span
class="cmtt-10">diff</span>
</div>
<!--l. 16--><p class="noindent" >The <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">config.variant</span></span></span> property is also supported and reported as part of the test
infrastructure.
</p><!--l. 2--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">3.6 </span> <a
id="x5-310003.6"></a>Cross-Platform Building</h3>
<!--l. 5--><p class="noindent" >The Jikes<sup class="textsuperscript"><span
class="cmr-9">TM</span></sup> RVM build process consists of two major phases: the building of a <span
class="cmti-10">boot</span>
<span
class="cmti-10">image</span>, and the building of a <span
class="cmti-10">bootloader</span>. The boot image is built using a Java<sup class="textsuperscript"><span
class="cmr-9">TM</span></sup>
program executed within a host JVM and is therefore platform-neutral. By
contrast, the boot loader is written in C, and must be compiled on the target
platform.
</p><!--l. 7--><p class="noindent" >Because building the boot image can be time-consuming, you may prefer to build the
boot image on a faster machine than the target platform. You may also be porting
Jikes RVM to a target platform that lacks tools such or whose development
environment is otherwise unpleasant. To cross-build, simply set your host.name and
target.name properties to different values.
</p><!--l. 9--><p class="noindent" >For example, to build the prototype configuration for AIX<sup class="textsuperscript"><span
class="cmr-9">TM</span></sup> on a Linux host:
</p><!--l. 10-->
<div class="lstlisting" id="listing-10"><span class="label"><a
id="x5-31001r1"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">cd</span><span
class="cmtt-10"> </span><span
class="tctt-1000">$</span><span
class="cmtt-10">RVM_ROOT</span><span
class="cmtt-10"> </span><br /><span class="label"><a
id="x5-31002r2"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">ant</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dconfig</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">prototype</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dhost</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">ia32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dtarget</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">ppc32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">aix</span><span
class="cmtt-10"> </span><span
class="cmtt-10">cross</span><span
class="cmtt-10">-</span><span
class="cmtt-10">compile</span><span
class="cmtt-10">-</span><span
class="cmtt-10">host</span>
</div>
<!--l. 15--><p class="noindent" >The build process is then completed by building just the boot loader on an AIX host:
</p><!--l. 16-->
<div class="lstlisting" id="listing-11"><span class="label"><a
id="x5-31003r1"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">cd</span><span
class="cmtt-10"> </span><span
class="tctt-1000">$</span><span
class="cmtt-10">RVM_ROOT</span><span
class="cmtt-10"> </span><br /><span class="label"><a
id="x5-31004r2"></a></span><span
class="cmtt-10">%</span><span
class="cmtt-10"> </span><span
class="cmtt-10">ant</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dconfig</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">prototype</span><span
class="cmtt-10"> </span><span
class="cmtt-10">-</span><span
class="cmtt-10">Dhost</span><span
class="cmtt-10">.</span><span
class="cmtt-10">name</span><span
class="cmtt-10">=</span><span
class="cmtt-10">ppc32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">aix</span><span
class="cmtt-10"> </span><span
class="cmtt-10">cross</span><span
class="cmtt-10">-</span><span
class="cmtt-10">compile</span><span
class="cmtt-10">-</span><span
class="cmtt-10">target</span>
</div>
<!--l. 21--><p class="noindent" >After the script has completed successfully, you should be able to run Jikes
RVM.
</p><!--l. 23--><p class="noindent" >The building of the boot loader must occur in the same directory as the rest of the
build. This can either be done transparently via a network file system, or by copying
the build directory from the first host to the target.
</p><!--l. 26--><p class="noindent" >
</p>
<h4 class="likesubsectionHead"><a
id="x5-320003.6"></a>Dependencies</h4>
<!--l. 28--><p class="noindent" >To compile the boot image on the host system you will also need to have built any
dependencies on the target machine and then copied them to the host machine. You
will also need to add an appropriate line into your <br
class="newline" /><span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${components.dir}components.properties</span></span></span> file such as the following (if the target
system was pppc32-linux):
</p>
<!--l. 30-->
<div class="lstlisting" id="listing-12"><span class="label"><a
id="x5-32001r1"></a></span><span
class="cmtt-10">ppc32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10">.</span><span
class="cmtt-10">classpath</span><span
class="cmtt-10">.</span><span
class="cmtt-10">lib</span><span
class="cmtt-10">.</span><span
class="cmtt-10">dir</span><span
class="cmtt-10">=</span><span
class="cmtt-10">path</span><span
class="cmtt-10">/</span><span
class="cmtt-10">to</span><span
class="cmtt-10">/</span><span
class="cmtt-10">components</span><span
class="cmtt-10">/</span><span
class="cmtt-10">classpath</span><span
class="cmtt-10">/95/</span><span
class="cmtt-10">ppc32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10">/</span><span
class="cmtt-10">lib</span>
</div>
<!--l. 34--><p class="noindent" >It may be possible to simply build the dependencies on the host machine. Modify the
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">${components.dir}/components.properties</span></span></span> so that the dependency property for
target machine maps to the same value as the dependency property on the host
machine. This works at the current time but may fail in the future if classpath
changes the API between platforms. i.e.
</p>
<!--l. 36-->
<div class="lstlisting" id="listing-13"><span class="label"><a
id="x5-32002r1"></a></span><span
class="cmtt-10">ppc32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10">.</span><span
class="cmtt-10">classpath</span><span
class="cmtt-10">.</span><span
class="cmtt-10">lib</span><span
class="cmtt-10">.</span><span
class="cmtt-10">dir</span><span
class="cmtt-10">=</span><span
class="cmtt-10">path</span><span
class="cmtt-10">/</span><span
class="cmtt-10">to</span><span
class="cmtt-10">/</span><span
class="cmtt-10">components</span><span
class="cmtt-10">/</span><span
class="cmtt-10">classpath</span><span
class="cmtt-10">/95/</span><span
class="cmtt-10">ia32</span><span
class="cmtt-10">-</span><span
class="cmtt-10">linux</span><span
class="cmtt-10">/</span><span
class="cmtt-10">lib</span>
</div>
<!--l. 2--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">3.7 </span> <a
id="x5-330003.7"></a>Primordial Class List</h3>
<!--l. 5--><p class="noindent" >The primordial class list indicates which classes should be compiled and baked into
the boot image. The bare minimum set of classes needed in the primordial list
includes:
</p>
<ul class="itemize1">
<li class="itemize">All classes that are needed to load a class from the file system. The class
may need to be loaded as a single class file or out of a jar. Failing this
there will be an infinite regress on the first class load.
</li>
<li class="itemize">All classes that are needed by the baseline compiler to compile any method.
Failing this we regress when attempting to compile a method so we can
execute it.
</li>
<li class="itemize">Enough of the core VM services and data structures, and class
library (java.*) to support the above. This includes threading, memory
management, runtime support for compiled code, etc.</li></ul>
<!--l. 13--><p class="noindent" >For increased performance and decreased startup time it is possible to include extra
classes that are expected to be needed, i.e. the optimizing compiler or the adaptive
system. There are some pieces of these components that would be awkward to load
dynamically (there’s a core subset of the opt compiler, the classes in the
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">org.jikesrvm.compilers.opt.runtimesupport</span></span></span> packages, that must be loaded and
fully compiled before any opt-compiled code can be allowed to executed), but it’s
theoretically possible to do so.