mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 17:39:40 +01:00
Compare commits
1911 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd04d75035 | ||
|
|
29b4cab674 | ||
|
|
bb1e6e94f7 | ||
|
|
b0d90ba03c | ||
|
|
8fafbaec66 | ||
|
|
aa172a43cf | ||
|
|
5a1b0c29e6 | ||
|
|
b4175c09a4 | ||
|
|
6384444219 | ||
|
|
e7bedea0fb | ||
|
|
488435977c | ||
|
|
b54747af16 | ||
|
|
1757e1398f | ||
|
|
6c8f65f715 | ||
|
|
55ea968da0 | ||
|
|
41cc1f7428 | ||
|
|
5d98b14bef | ||
|
|
6b99d4e1b2 | ||
|
|
90bc153da6 | ||
|
|
72cb3a3a42 | ||
|
|
d320bd5872 | ||
|
|
f33da9356b | ||
|
|
28535b90cc | ||
|
|
c56fac967b | ||
|
|
5d039154de | ||
|
|
01abeb6720 | ||
|
|
56411ee3f3 | ||
|
|
8d00b30bd7 | ||
|
|
60632a1c47 | ||
|
|
37f680fdfa | ||
|
|
7346f2e781 | ||
|
|
caf3a22551 | ||
|
|
b56b984193 | ||
|
|
9055893408 | ||
|
|
0b33751341 | ||
|
|
f9fbfd172d | ||
|
|
1a9597f153 | ||
|
|
c636304410 | ||
|
|
2ec5a1e349 | ||
|
|
930a037c8a | ||
|
|
16a39a42d1 | ||
|
|
fd9aaf2832 | ||
|
|
82829db29d | ||
|
|
e825f6b139 | ||
|
|
813c99e156 | ||
|
|
588fa37f8b | ||
|
|
4f669774b0 | ||
|
|
416f5cdc55 | ||
|
|
7517b9d193 | ||
|
|
85e0e11843 | ||
|
|
377e8bc2a1 | ||
|
|
35207fabd8 | ||
|
|
f8e41b7214 | ||
|
|
5c74f9ccd8 | ||
|
|
47888130b0 | ||
|
|
cf287c5bdc | ||
|
|
2e1841432e | ||
|
|
0da7ffe975 | ||
|
|
d9bdcf768d | ||
|
|
7ff7a479d3 | ||
|
|
60ac15be03 | ||
|
|
c0ff698735 | ||
|
|
f47a3adeb5 | ||
|
|
387fa43d58 | ||
|
|
c0ed0fe433 | ||
|
|
9f54520b2a | ||
|
|
f220e4ba74 | ||
|
|
2ce58a51ef | ||
|
|
437865ac86 | ||
|
|
4c1c105949 | ||
|
|
3b465d09e0 | ||
|
|
3f51f1559c | ||
|
|
6687eed677 | ||
|
|
b68547cfb0 | ||
|
|
8b11df5877 | ||
|
|
5402ebecbe | ||
|
|
1e71336c0e | ||
|
|
8d3083be98 | ||
|
|
94b5097d21 | ||
|
|
4ab6f2a73e | ||
|
|
ffd7528dd6 | ||
|
|
48f12f491b | ||
|
|
254e28b7cf | ||
|
|
f7572e0628 | ||
|
|
191ae560a0 | ||
|
|
be8dbb0877 | ||
|
|
98a2eb05ee | ||
|
|
76281117bf | ||
|
|
880e094125 | ||
|
|
1ea6601fc6 | ||
|
|
82de8ca546 | ||
|
|
1816508a22 | ||
|
|
d2389af324 | ||
|
|
ff8542fff0 | ||
|
|
5d0ace24f4 | ||
|
|
7dabba40ee | ||
|
|
2de299b086 | ||
|
|
2b9085a585 | ||
|
|
4dfe47f624 | ||
|
|
b7e6e0d9a7 | ||
|
|
7276daddd4 | ||
|
|
1e6dfd83d2 | ||
|
|
f184d1b548 | ||
|
|
614cc9b497 | ||
|
|
3de2a40e44 | ||
|
|
e928258f9b | ||
|
|
a49d72bf01 | ||
|
|
8c03b67bb2 | ||
|
|
05c777aa20 | ||
|
|
b3e44182da | ||
|
|
c9ae237ecb | ||
|
|
e97f581052 | ||
|
|
e3f1a15d93 | ||
|
|
c3d9838efd | ||
|
|
b25a3c46ea | ||
|
|
077bda2dc8 | ||
|
|
e4e1dd33ec | ||
|
|
56b6c34c1f | ||
|
|
c5babb5315 | ||
|
|
914f8091eb | ||
|
|
4840199698 | ||
|
|
41d3464396 | ||
|
|
ac6583b7b7 | ||
|
|
3b87c73fa1 | ||
|
|
6b3281d3e6 | ||
|
|
7e7b1dc28b | ||
|
|
2fe5f25d88 | ||
|
|
cdc63696c6 | ||
|
|
2e7611228e | ||
|
|
7ca2d79ebc | ||
|
|
182acce83c | ||
|
|
e9d867ac0a | ||
|
|
d83efbefba | ||
|
|
b78cbd84ff | ||
|
|
44bf487aad | ||
|
|
d0b48aded1 | ||
|
|
d2f0792c39 | ||
|
|
7e3678dc36 | ||
|
|
1e2378a69c | ||
|
|
de809c8933 | ||
|
|
a8f017ad48 | ||
|
|
932712ecff | ||
|
|
858d241255 | ||
|
|
e4dc96218e | ||
|
|
a1f493478a | ||
|
|
10dbe83b2a | ||
|
|
9ae7921b89 | ||
|
|
dfee1f885f | ||
|
|
a9334fd7af | ||
|
|
459942acca | ||
|
|
0d31106b56 | ||
|
|
7cd98c80f5 | ||
|
|
94ed22086f | ||
|
|
0635a89ca5 | ||
|
|
b5107ed1b5 | ||
|
|
21f7fabe1f | ||
|
|
39803c9fe7 | ||
|
|
9e33e4f110 | ||
|
|
8838e7396e | ||
|
|
8a3342a6f0 | ||
|
|
ed6697aa20 | ||
|
|
bababbe74b | ||
|
|
c24c4b5f71 | ||
|
|
fd3d95e5f5 | ||
|
|
99b0a598c8 | ||
|
|
578b7d9671 | ||
|
|
c6204fddc8 | ||
|
|
c032e73d2d | ||
|
|
61bc4ca404 | ||
|
|
8e64d3b166 | ||
|
|
3559695d9d | ||
|
|
07c15d0cad | ||
|
|
1933fdced6 | ||
|
|
75eddf94d1 | ||
|
|
bc6de0086a | ||
|
|
e989f7c362 | ||
|
|
651770b5df | ||
|
|
cb0a4b76f5 | ||
|
|
e7ceea1e53 | ||
|
|
2a504c4c16 | ||
|
|
e1d1a88f95 | ||
|
|
60349d25cd | ||
|
|
dfc4b7f412 | ||
|
|
8e4345a87e | ||
|
|
abf322bf84 | ||
|
|
0c48f0d65b | ||
|
|
3e199d591f | ||
|
|
02991139fb | ||
|
|
f3b8781442 | ||
|
|
8feafa20cf | ||
|
|
abc61ba12d | ||
|
|
111563dc52 | ||
|
|
2b7ba88d55 | ||
|
|
7460f5d8f2 | ||
|
|
2fd7bebdb7 | ||
|
|
4f54772a87 | ||
|
|
f6211bc171 | ||
|
|
2bfd92234d | ||
|
|
c38cb52efd | ||
|
|
96b24787fb | ||
|
|
6f539c5cf9 | ||
|
|
f81d1132c9 | ||
|
|
beb9aa52b3 | ||
|
|
e6a321c094 | ||
|
|
4ebc538931 | ||
|
|
3d033b4e18 | ||
|
|
5a5a67d337 | ||
|
|
59653c4b36 | ||
|
|
69efabad3d | ||
|
|
01f717df41 | ||
|
|
5803a72162 | ||
|
|
6b57ff42fd | ||
|
|
448b1098db | ||
|
|
0b3b3b9ed6 | ||
|
|
c98aa66173 | ||
|
|
afcf500d46 | ||
|
|
6e913f4649 | ||
|
|
190aa531e4 | ||
|
|
9b31b837e2 | ||
|
|
199810bcd9 | ||
|
|
df63d80a19 | ||
|
|
59a52a797c | ||
|
|
1ef600adbd | ||
|
|
1cbd6b266b | ||
|
|
f48f666a63 | ||
|
|
a6957aa760 | ||
|
|
20fa9b2cc4 | ||
|
|
f973f48305 | ||
|
|
42525fd863 | ||
|
|
f48b1f2e8f | ||
|
|
aa612222bd | ||
|
|
44e95b7411 | ||
|
|
902382c4dd | ||
|
|
8651eaa785 | ||
|
|
55c459b8fb | ||
|
|
80335ce280 | ||
|
|
1086269167 | ||
|
|
d461ecc60d | ||
|
|
1b9d38a123 | ||
|
|
04cd1ed8a0 | ||
|
|
4fcfbee121 | ||
|
|
7db4eb4efd | ||
|
|
fe4e448bfa | ||
|
|
7f344540be | ||
|
|
7c357b0628 | ||
|
|
4e5c88a7fe | ||
|
|
318ce174a4 | ||
|
|
5515df5c31 | ||
|
|
26f36a5cd0 | ||
|
|
3851c96f71 | ||
|
|
f4ac5f7956 | ||
|
|
565c89629e | ||
|
|
44ce09ba1f | ||
|
|
b69d120923 | ||
|
|
1625e2019e | ||
|
|
dafee02d32 | ||
|
|
3f2effb856 | ||
|
|
dc88d0a088 | ||
|
|
4852f8a995 | ||
|
|
a4ee9cab5a | ||
|
|
d75f8a04c8 | ||
|
|
3cf0eca766 | ||
|
|
707c3b054a | ||
|
|
fb21a08d02 | ||
|
|
2197a8fbd0 | ||
|
|
4ea3138612 | ||
|
|
5a3b41290f | ||
|
|
9e1309ade2 | ||
|
|
338bf6e0b1 | ||
|
|
37f0895031 | ||
|
|
cac7fc8e12 | ||
|
|
e55dd14a45 | ||
|
|
79228b75d4 | ||
|
|
30ec391b79 | ||
|
|
3d41dfe891 | ||
|
|
9b4da3fa50 | ||
|
|
b9fa2e4fb9 | ||
|
|
bcc24c4b1f | ||
|
|
8f80a15abb | ||
|
|
10bd761f06 | ||
|
|
0ec487a01e | ||
|
|
67f97ee6eb | ||
|
|
8007dfcd9b | ||
|
|
58aa6e97a4 | ||
|
|
3caaf6a13d | ||
|
|
5a456b0991 | ||
|
|
893817c28d | ||
|
|
5ca5cc7488 | ||
|
|
b7b568e088 | ||
|
|
ca56ab97be | ||
|
|
d6470ba9cb | ||
|
|
d31d68b07c | ||
|
|
6140c462db | ||
|
|
7c2cc82bb5 | ||
|
|
6e4646ad87 | ||
|
|
98cf9a3c0b | ||
|
|
cd7e4aab71 | ||
|
|
dad0499822 | ||
|
|
3db0a0443c | ||
|
|
53170d594f | ||
|
|
f2ebc850fd | ||
|
|
067447f6c6 | ||
|
|
c4a4b178ef | ||
|
|
a6580a7e63 | ||
|
|
d74533b1eb | ||
|
|
9134e38287 | ||
|
|
5f81b7f30d | ||
|
|
b5b29845bd | ||
|
|
5e38ba06cb | ||
|
|
a0930ac7cd | ||
|
|
f9083712dd | ||
|
|
6a79c2b179 | ||
|
|
a4f6148fb5 | ||
|
|
f30c450012 | ||
|
|
c542e8e7b7 | ||
|
|
3ab617634c | ||
|
|
94f61c976b | ||
|
|
811a20ee54 | ||
|
|
14e75d338b | ||
|
|
bba3260a52 | ||
|
|
50e0a37ed9 | ||
|
|
062fbe8cad | ||
|
|
08ea4ea9b8 | ||
|
|
7ac8896f1d | ||
|
|
6fdfe86bbd | ||
|
|
7e2522f283 | ||
|
|
4b6b0ec3c4 | ||
|
|
c25dd16233 | ||
|
|
8f066485db | ||
|
|
e99cc14fc5 | ||
|
|
894d7c75d6 | ||
|
|
d7f3ef3fb7 | ||
|
|
8c0bafddc3 | ||
|
|
310ad38a4b | ||
|
|
15f4203b0f | ||
|
|
187f3fcc36 | ||
|
|
d515cd505a | ||
|
|
052400a120 | ||
|
|
9232364ddb | ||
|
|
7222ea9529 | ||
|
|
50bf3b7bdc | ||
|
|
80c6175a2a | ||
|
|
317421f6e6 | ||
|
|
b530224aad | ||
|
|
00502cdd51 | ||
|
|
62ce00b4ca | ||
|
|
889ba61369 | ||
|
|
19ea8f720f | ||
|
|
196abe2523 | ||
|
|
1bb1a8008c | ||
|
|
c0a96ff2a4 | ||
|
|
6261447205 | ||
|
|
5ef289c76b | ||
|
|
3c9f53969a | ||
|
|
27e9d6f36d | ||
|
|
7b82f72ba9 | ||
|
|
29739d16ee | ||
|
|
b5cfc76c1e | ||
|
|
8aaf8673f1 | ||
|
|
4b959a29ea | ||
|
|
340f4947e5 | ||
|
|
fec1de491b | ||
|
|
e351ad6287 | ||
|
|
9805e67718 | ||
|
|
f4018d1d35 | ||
|
|
ebbf572261 | ||
|
|
32a0fe5fa4 | ||
|
|
079b7a5e8a | ||
|
|
9564f9eeb1 | ||
|
|
53cbbbb036 | ||
|
|
59bb4ea7cc | ||
|
|
5579942e7a | ||
|
|
d0b5b673e8 | ||
|
|
e0cf9c652d | ||
|
|
56135386ad | ||
|
|
36152f4a93 | ||
|
|
e2fc7f742c | ||
|
|
3571ee23dc | ||
|
|
3e4ca7604b | ||
|
|
c30e401ac7 | ||
|
|
9d1c32d9fa | ||
|
|
bd545a5aca | ||
|
|
95af7bf142 | ||
|
|
13c689d9c3 | ||
|
|
5724b6d8ac | ||
|
|
d91b2b6f6e | ||
|
|
e83a16fa42 | ||
|
|
e6c547e026 | ||
|
|
c7a1cb0da0 | ||
|
|
b769ce017f | ||
|
|
cb0f1fed69 | ||
|
|
21a3abc4d4 | ||
|
|
a18ea33408 | ||
|
|
0bf6babbb7 | ||
|
|
34570ba690 | ||
|
|
494465e698 | ||
|
|
e13a29b3f2 | ||
|
|
b28493b31b | ||
|
|
48d5be1b33 | ||
|
|
d5982ae350 | ||
|
|
559278381b | ||
|
|
e3a1dad2c0 | ||
|
|
a433c60a8a | ||
|
|
eb5be70df0 | ||
|
|
a94b4fa40d | ||
|
|
aa516b42ef | ||
|
|
046f2c92e2 | ||
|
|
ebd4ae2fd2 | ||
|
|
4bdc9c4528 | ||
|
|
8344f160ae | ||
|
|
af253d110d | ||
|
|
f7b99ca7f6 | ||
|
|
4e7263a44a | ||
|
|
d85c0b6f6f | ||
|
|
0c7c3bb2c5 | ||
|
|
f51d607e9f | ||
|
|
d1080de4ee | ||
|
|
9a2ec820dc | ||
|
|
761e0b221d | ||
|
|
2a72b6a15f | ||
|
|
135f315eaa | ||
|
|
4d512adc5e | ||
|
|
37d969c6ab | ||
|
|
3511594d3c | ||
|
|
e9301228b4 | ||
|
|
71eeebb595 | ||
|
|
fad2bafa7b | ||
|
|
826591b516 | ||
|
|
29e09dc7d4 | ||
|
|
9f400835df | ||
|
|
ddf7a57a61 | ||
|
|
57b8661095 | ||
|
|
4c0c58e59d | ||
|
|
a39b17624a | ||
|
|
3a84f5407b | ||
|
|
efdeeb14af | ||
|
|
0a806c8aa7 | ||
|
|
f69560f821 | ||
|
|
6af718bb7f | ||
|
|
405208abe7 | ||
|
|
c6fbe129bf | ||
|
|
4f081bf0d0 | ||
|
|
86e45f8339 | ||
|
|
39dfe6d047 | ||
|
|
cf61f29f61 | ||
|
|
221b8ec4fa | ||
|
|
fed8efa873 | ||
|
|
55c71e9317 | ||
|
|
db40815a4c | ||
|
|
8e42425c92 | ||
|
|
b04008c963 | ||
|
|
771d931915 | ||
|
|
73e8d2923d | ||
|
|
45e1021238 | ||
|
|
56df3bd48d | ||
|
|
6b5a5ca0e2 | ||
|
|
e51eadc837 | ||
|
|
6b961cfac1 | ||
|
|
b126348850 | ||
|
|
21cc129aea | ||
|
|
79d14ef96a | ||
|
|
514f24864d | ||
|
|
c7ff53f5c1 | ||
|
|
8c4cefaa96 | ||
|
|
98dba02e88 | ||
|
|
9931c2f2b8 | ||
|
|
54ddaf5ab7 | ||
|
|
9e9ac093ae | ||
|
|
c4cbd8f70c | ||
|
|
6e058633f4 | ||
|
|
7281232239 | ||
|
|
32d3fb4668 | ||
|
|
91f53c5d57 | ||
|
|
0a5cba6501 | ||
|
|
e53644ef78 | ||
|
|
dc5fe663cb | ||
|
|
79ee0ab0c2 | ||
|
|
97cc5e6c44 | ||
|
|
09dd368c9b | ||
|
|
d558c37a5b | ||
|
|
4ea5b30610 | ||
|
|
e742ae2157 | ||
|
|
f4fdc03167 | ||
|
|
3005c7daac | ||
|
|
1a35ed23d9 | ||
|
|
6bc673930f | ||
|
|
7572cbd5aa | ||
|
|
8e267289d5 | ||
|
|
8e301e97d2 | ||
|
|
e37f1e9435 | ||
|
|
df2b1220d4 | ||
|
|
769bc4a420 | ||
|
|
bae02fa6d9 | ||
|
|
04f6e27361 | ||
|
|
8731495395 | ||
|
|
470db77b36 | ||
|
|
3675d9eacb | ||
|
|
5555fb3341 | ||
|
|
93e9a184a3 | ||
|
|
4189d0802f | ||
|
|
f2cefcbfad | ||
|
|
8b20e7af53 | ||
|
|
563f4546ff | ||
|
|
b5b10846c2 | ||
|
|
dfe111a085 | ||
|
|
0930b183d6 | ||
|
|
cc6e343055 | ||
|
|
288480e312 | ||
|
|
c0679a0902 | ||
|
|
94a6496726 | ||
|
|
ed2051c861 | ||
|
|
3927b8d331 | ||
|
|
4406545ed5 | ||
|
|
83f975cf42 | ||
|
|
cafacdf6dc | ||
|
|
118f552a6e | ||
|
|
3429bf2b41 | ||
|
|
17081c700e | ||
|
|
dcfcb3cfc6 | ||
|
|
d27529f4ab | ||
|
|
89add82f07 | ||
|
|
02ad771443 | ||
|
|
48cefbd960 | ||
|
|
18fce99e63 | ||
|
|
9c6ac94d37 | ||
|
|
50bd95aadf | ||
|
|
36dbbfde4b | ||
|
|
4c73c02d6d | ||
|
|
8f4a77bfef | ||
|
|
781dee7531 | ||
|
|
d40606665a | ||
|
|
caae78ba73 | ||
|
|
6ad27831e0 | ||
|
|
90c19a9907 | ||
|
|
d1191bb4f4 | ||
|
|
76eedab612 | ||
|
|
0527d01622 | ||
|
|
7dd9d23eb1 | ||
|
|
ab54b675f7 | ||
|
|
967b63e659 | ||
|
|
7f14740790 | ||
|
|
9842dda872 | ||
|
|
835b46c1f1 | ||
|
|
cfd10db990 | ||
|
|
1627c865c3 | ||
|
|
4bb6dcf36b | ||
|
|
670a74b75b | ||
|
|
4254270688 | ||
|
|
9d94d32594 | ||
|
|
26ef6340dd | ||
|
|
b39d1e981b | ||
|
|
6111325204 | ||
|
|
3401d40d52 | ||
|
|
837abfdb0d | ||
|
|
46e8a79fcb | ||
|
|
55b09e7016 | ||
|
|
4824bf600d | ||
|
|
c580cfee80 | ||
|
|
a8072dc2a0 | ||
|
|
301e9f9548 | ||
|
|
e3224a276b | ||
|
|
4529bcedea | ||
|
|
bf4e37de48 | ||
|
|
911aeb6828 | ||
|
|
dd85e2f356 | ||
|
|
60caa18980 | ||
|
|
0b0b610a21 | ||
|
|
529b370174 | ||
|
|
a4bc0fa013 | ||
|
|
94d67fa6a5 | ||
|
|
e67db1b150 | ||
|
|
bd09c5ac38 | ||
|
|
4ed033f56f | ||
|
|
02eef114a1 | ||
|
|
e881068530 | ||
|
|
4525667c73 | ||
|
|
ae6d0d30f5 | ||
|
|
9b27913542 | ||
|
|
7c17e9e75b | ||
|
|
be964b9263 | ||
|
|
a23aa66098 | ||
|
|
c419fa6171 | ||
|
|
dd6200f31a | ||
|
|
a928a2df96 | ||
|
|
f6020a8e34 | ||
|
|
881d64f005 | ||
|
|
663f9df53e | ||
|
|
0494bcb19c | ||
|
|
0b637798e3 | ||
|
|
5a3b13508d | ||
|
|
2e9434a07a | ||
|
|
272f5e3896 | ||
|
|
58f22a5049 | ||
|
|
ae0b1487fa | ||
|
|
83d6ffcacb | ||
|
|
08390fb7f9 | ||
|
|
478e52def4 | ||
|
|
aaafa0557d | ||
|
|
042cc29680 | ||
|
|
b549e586b0 | ||
|
|
240b19f9f2 | ||
|
|
ffd4aa2de3 | ||
|
|
92246eda42 | ||
|
|
2c5c12219c | ||
|
|
27c2e51e67 | ||
|
|
f558e39f7e | ||
|
|
cd4795be6b | ||
|
|
1ff2fcfeed | ||
|
|
7a04d58771 | ||
|
|
55e52f1b6d | ||
|
|
bdbf490174 | ||
|
|
36674b96fd | ||
|
|
623934b5e1 | ||
|
|
260708fa26 | ||
|
|
3efc9785b3 | ||
|
|
aca1037e9f | ||
|
|
b74ef2f6b6 | ||
|
|
65214699fa | ||
|
|
aacc740523 | ||
|
|
af2cc6b16d | ||
|
|
4a65e326b9 | ||
|
|
0605d17f02 | ||
|
|
e38ad5476b | ||
|
|
7bd0bb92de | ||
|
|
8205e664c8 | ||
|
|
4418d860e8 | ||
|
|
d17664eb58 | ||
|
|
25fedaf936 | ||
|
|
efc7d9cbc2 | ||
|
|
4eb87c577e | ||
|
|
2b73b29421 | ||
|
|
a253545487 | ||
|
|
18644676e5 | ||
|
|
f3159c31b0 | ||
|
|
519dc0c3f9 | ||
|
|
e830ff8c8f | ||
|
|
980d62fd25 | ||
|
|
36093c2bf6 | ||
|
|
2b4b058265 | ||
|
|
d71b6b6ffb | ||
|
|
bd06ea72a9 | ||
|
|
3b9e02fd77 | ||
|
|
477d1d8e7d | ||
|
|
d558b176b1 | ||
|
|
a658a623a8 | ||
|
|
911dcf0f08 | ||
|
|
cbe6d65df3 | ||
|
|
dd23946ec9 | ||
|
|
ad1642cdd9 | ||
|
|
570a3d8a03 | ||
|
|
775655b44a | ||
|
|
c549cc814d | ||
|
|
43eb7b646e | ||
|
|
8cccc8f99a | ||
|
|
08c4f120c9 | ||
|
|
dfccae97eb | ||
|
|
7062434474 | ||
|
|
543792f154 | ||
|
|
76b4500c33 | ||
|
|
429a57b49d | ||
|
|
cef72cc08e | ||
|
|
6d29429c4e | ||
|
|
46d6e76274 | ||
|
|
440b57e0b5 | ||
|
|
1ac7879229 | ||
|
|
ee7ac30420 | ||
|
|
e294a9f5ec | ||
|
|
cb35692923 | ||
|
|
d9bb3177f8 | ||
|
|
ad2bdf4faa | ||
|
|
1ae0edb1f1 | ||
|
|
e3d25bce34 | ||
|
|
528d6f3d54 | ||
|
|
48140aa4e1 | ||
|
|
e44885a4e1 | ||
|
|
65eb5b19cf | ||
|
|
d08ae1fefe | ||
|
|
cc7c813d9b | ||
|
|
2349d985f7 | ||
|
|
90d6f85d39 | ||
|
|
27d4c7ead0 | ||
|
|
e6f8d1b836 | ||
|
|
33799389d4 | ||
|
|
0e816e0b83 | ||
|
|
ec1fb16e34 | ||
|
|
a036af76db | ||
|
|
59ccdc0fbc | ||
|
|
65293fee1f | ||
|
|
7dfc5df74e | ||
|
|
63e39d6ee7 | ||
|
|
212ab5c73a | ||
|
|
3f99d2eda5 | ||
|
|
7e32f8e585 | ||
|
|
6f838e09d7 | ||
|
|
458f3269dd | ||
|
|
705c53b045 | ||
|
|
3d1dbef32c | ||
|
|
9eb03933dc | ||
|
|
14c586557e | ||
|
|
20b16ea7aa | ||
|
|
057a1b7128 | ||
|
|
5be51d39ec | ||
|
|
1b6a45d291 | ||
|
|
da6cfab105 | ||
|
|
f904017c74 | ||
|
|
884f00e27e | ||
|
|
3a6a1bd322 | ||
|
|
a9ea9bd20a | ||
|
|
4747e218b3 | ||
|
|
7ae64e60c1 | ||
|
|
5bcaf4e157 | ||
|
|
e8dff8cfab | ||
|
|
b6db24abd6 | ||
|
|
a6653a2f7c | ||
|
|
7da56bf735 | ||
|
|
ff9a1cfde6 | ||
|
|
cc0d0b06ff | ||
|
|
a5780148fd | ||
|
|
963943745e | ||
|
|
eb3ed764ca | ||
|
|
785470d1e3 | ||
|
|
b76f6e07ab | ||
|
|
3f38785a0a | ||
|
|
687fab1763 | ||
|
|
ecba4fb037 | ||
|
|
594b196afc | ||
|
|
a9ea68bd3f | ||
|
|
aea990be82 | ||
|
|
ea1b65ad8a | ||
|
|
d6d1826ad3 | ||
|
|
6a6296d61b | ||
|
|
1c9465c6df | ||
|
|
66750be14c | ||
|
|
0f097de573 | ||
|
|
a0c3e086d9 | ||
|
|
42a2cab56e | ||
|
|
9432db3c2c | ||
|
|
b0d8fccba7 | ||
|
|
2003ef208a | ||
|
|
cad78d6f04 | ||
|
|
7fdf0dfa52 | ||
|
|
09b1403483 | ||
|
|
a982d867cb | ||
|
|
9a28860b9d | ||
|
|
ee1d40055a | ||
|
|
e301754c0d | ||
|
|
07204964e0 | ||
|
|
42a22c1dc8 | ||
|
|
0ccc41fc10 | ||
|
|
058f95b388 | ||
|
|
e1774fc7a1 | ||
|
|
11b6c98db4 | ||
|
|
529f652312 | ||
|
|
380c23f06b | ||
|
|
f785c8a7a4 | ||
|
|
12556eaf75 | ||
|
|
4118514eaa | ||
|
|
e054554a36 | ||
|
|
be3945d9ff | ||
|
|
3d77d813ce | ||
|
|
5d202b67cc | ||
|
|
1c1f4add53 | ||
|
|
1b16739a2d | ||
|
|
313f4a591e | ||
|
|
33648efb4c | ||
|
|
08da945e68 | ||
|
|
016976afd1 | ||
|
|
8b00bb1651 | ||
|
|
cb4100b820 | ||
|
|
31e63d5a3a | ||
|
|
f88f95d575 | ||
|
|
ae57b6a361 | ||
|
|
1d1ed3ddb3 | ||
|
|
818597ae4f | ||
|
|
ecf06b3459 | ||
|
|
9ea4ab4133 | ||
|
|
66b51d0b9f | ||
|
|
e975779565 | ||
|
|
d11c407c11 | ||
|
|
6b14cf6b82 | ||
|
|
57692966b7 | ||
|
|
f1828f22b9 | ||
|
|
dec70be8bf | ||
|
|
2321d8e2b6 | ||
|
|
100eb2036d | ||
|
|
2c4e9e718c | ||
|
|
5ea3d5b1ea | ||
|
|
7f4d14efbe | ||
|
|
285f7e0640 | ||
|
|
955e0697ba | ||
|
|
890b6d7ba8 | ||
|
|
6e3096a0fa | ||
|
|
4a46c4fa60 | ||
|
|
09df642ee8 | ||
|
|
781549f47d | ||
|
|
50220cd3d1 | ||
|
|
e49b6e7624 | ||
|
|
f55750d05a | ||
|
|
72c30e6568 | ||
|
|
eb7d35d85e | ||
|
|
4b002876d3 | ||
|
|
df34620afa | ||
|
|
66e90b1610 | ||
|
|
b57dfbffa8 | ||
|
|
6412273c94 | ||
|
|
c285bb9bd6 | ||
|
|
00a5b03f1b | ||
|
|
c0f2f2b464 | ||
|
|
6e3d96dc67 | ||
|
|
d06f47f95c | ||
|
|
ae3977cd76 | ||
|
|
74e0cc2fe5 | ||
|
|
04d132c069 | ||
|
|
df5c45b99f | ||
|
|
f7483afe41 | ||
|
|
5b3babf9c4 | ||
|
|
2a928a555d | ||
|
|
c4b4c6a9a5 | ||
|
|
a4ab9d7050 | ||
|
|
5f43f7c289 | ||
|
|
9b0ee815d4 | ||
|
|
aaf2d69944 | ||
|
|
ce388a548a | ||
|
|
6d2f5978f7 | ||
|
|
eba9965d54 | ||
|
|
b2d4591455 | ||
|
|
73636f80f0 | ||
|
|
b305cf722e | ||
|
|
4935ae09b8 | ||
|
|
c23595da74 | ||
|
|
eb4a860bc3 | ||
|
|
b68794be17 | ||
|
|
9190ab1d6b | ||
|
|
da0a144213 | ||
|
|
3cdc5fa537 | ||
|
|
65a285cb99 | ||
|
|
fd8e6eca55 | ||
|
|
17b26a6a0c | ||
|
|
757948e54b | ||
|
|
1484d4c12c | ||
|
|
024a3d8370 | ||
|
|
ee274abff1 | ||
|
|
a472974402 | ||
|
|
3b77eb7680 | ||
|
|
bfa3402f16 | ||
|
|
9d4ac4c188 | ||
|
|
101d88a655 | ||
|
|
817ad87a28 | ||
|
|
8fe245a2ba | ||
|
|
50d1683efd | ||
|
|
6e335b3720 | ||
|
|
abd7e74713 | ||
|
|
9feb7f3e15 | ||
|
|
49252e4667 | ||
|
|
4dfbf0acd1 | ||
|
|
f36f12f54e | ||
|
|
2e89926eab | ||
|
|
f592cd9eb6 | ||
|
|
74f10135f5 | ||
|
|
d75e89764e | ||
|
|
5784582da1 | ||
|
|
927c948fb5 | ||
|
|
9668994591 | ||
|
|
5c5ce877e8 | ||
|
|
7d82c13142 | ||
|
|
a160adcf6c | ||
|
|
2d24f2ea0f | ||
|
|
eefa9c27a1 | ||
|
|
8b44324ec4 | ||
|
|
fe52024032 | ||
|
|
831d61ffee | ||
|
|
c3e4ab9209 | ||
|
|
efb4e7d77d | ||
|
|
2c13671808 | ||
|
|
34aa937e99 | ||
|
|
6bba162380 | ||
|
|
687cb2678f | ||
|
|
2a2e7bffdc | ||
|
|
b2658ced45 | ||
|
|
5c2efc04be | ||
|
|
688375fd87 | ||
|
|
0ae04de4ef | ||
|
|
c1e2bb79f8 | ||
|
|
e53314cbb7 | ||
|
|
b0296ea6c4 | ||
|
|
1beaa06ed7 | ||
|
|
769059e3a3 | ||
|
|
65e294a51d | ||
|
|
35e44803db | ||
|
|
018f4098e8 | ||
|
|
26eeb59d8d | ||
|
|
97d244d75a | ||
|
|
7befd87c21 | ||
|
|
00cdcad12f | ||
|
|
081be38b26 | ||
|
|
879e30901e | ||
|
|
f44a8ebe07 | ||
|
|
7ecd34e368 | ||
|
|
d30eeff9a1 | ||
|
|
8a9a73c5fd | ||
|
|
833a064cfe | ||
|
|
30fb5c8146 | ||
|
|
c8da8f2595 | ||
|
|
9c3e5a2081 | ||
|
|
a84e7fc733 | ||
|
|
e2a63403d0 | ||
|
|
97520950f0 | ||
|
|
828158fb8d | ||
|
|
904f53db88 | ||
|
|
fd928bc1ef | ||
|
|
703f08dfe8 | ||
|
|
e897b69d19 | ||
|
|
7ae15519b1 | ||
|
|
ffd4d39144 | ||
|
|
d1c83acabb | ||
|
|
2889d16425 | ||
|
|
2f8d099c20 | ||
|
|
05bee5dc82 | ||
|
|
bf549e93b9 | ||
|
|
324e987e82 | ||
|
|
b963b0bcc4 | ||
|
|
045ba7db6b | ||
|
|
ff66fcc442 | ||
|
|
e3ab8ba856 | ||
|
|
e6869edf38 | ||
|
|
0705c62050 | ||
|
|
1f736c82a9 | ||
|
|
6f383ae89d | ||
|
|
5e4fc9cf1e | ||
|
|
b4c2c567d6 | ||
|
|
0e89e92d04 | ||
|
|
05ffd97b08 | ||
|
|
2fa131f8db | ||
|
|
26faf043d2 | ||
|
|
60af5c24ef | ||
|
|
61fb6f377c | ||
|
|
4d0e923a60 | ||
|
|
43ef89d4a6 | ||
|
|
3f596509e1 | ||
|
|
728600d4e3 | ||
|
|
521fd9e111 | ||
|
|
f0bfafa2e2 | ||
|
|
4a3f30b744 | ||
|
|
6fed495d1f | ||
|
|
e0e7eb6c44 | ||
|
|
d85f615c03 | ||
|
|
aa3de76bc8 | ||
|
|
03b36bd454 | ||
|
|
06bc452803 | ||
|
|
5b2008805b | ||
|
|
6c68dd5523 | ||
|
|
5701c33c6f | ||
|
|
3118f65376 | ||
|
|
cd1a43e9b2 | ||
|
|
2867dc7446 | ||
|
|
4149bc3c4a | ||
|
|
a4aab05579 | ||
|
|
530ce70e39 | ||
|
|
66a72d7411 | ||
|
|
ea89242447 | ||
|
|
64c6dc258c | ||
|
|
c53c258233 | ||
|
|
8c3f861909 | ||
|
|
21e63eca82 | ||
|
|
39c1b4be34 | ||
|
|
5b91fbd2b5 | ||
|
|
6d834825de | ||
|
|
9dac65e6e5 | ||
|
|
653ffb1218 | ||
|
|
7f8dfa7abb | ||
|
|
93bfefecfe | ||
|
|
9d991480e9 | ||
|
|
377a04fe57 | ||
|
|
b63f7f3a18 | ||
|
|
4ab089ddba | ||
|
|
21d0c9ef0d | ||
|
|
59a75697e3 | ||
|
|
83ff79ed01 | ||
|
|
cb9507190e | ||
|
|
14842a2b97 | ||
|
|
2942df6c93 | ||
|
|
56a050e73a | ||
|
|
8c029909a4 | ||
|
|
c57073d6ee | ||
|
|
d331cf663e | ||
|
|
e4e2e9efec | ||
|
|
1feb712387 | ||
|
|
bf5a3b90fb | ||
|
|
ca57fd5c97 | ||
|
|
35a0ff69b0 | ||
|
|
154cd32776 | ||
|
|
091f0781b8 | ||
|
|
b0c273a9b8 | ||
|
|
6de80de07f | ||
|
|
240c3c4839 | ||
|
|
f4ce595352 | ||
|
|
b2ab93cc7b | ||
|
|
beaeba8862 | ||
|
|
7e36bafdcd | ||
|
|
c354b234a4 | ||
|
|
91ae75b087 | ||
|
|
2f21d39ae5 | ||
|
|
0590a1ea49 | ||
|
|
4f6ca7513e | ||
|
|
d43b7a3a07 | ||
|
|
26c6d93e07 | ||
|
|
c103c7f049 | ||
|
|
8e5fedeb45 | ||
|
|
17f06f1623 | ||
|
|
dadb671a17 | ||
|
|
d7ad862058 | ||
|
|
a7c8728704 | ||
|
|
e776b337e8 | ||
|
|
5befb6f577 | ||
|
|
e0ccdb1d31 | ||
|
|
a02fad04b2 | ||
|
|
0afaaf8d36 | ||
|
|
c7e591cc26 | ||
|
|
b0654071b7 | ||
|
|
9e2a9c561e | ||
|
|
b85926e45f | ||
|
|
cc3d72b55f | ||
|
|
846b62bbd6 | ||
|
|
e49c821349 | ||
|
|
899181bf7c | ||
|
|
01ea4199c7 | ||
|
|
3f50074142 | ||
|
|
00ef83a6ab | ||
|
|
4869b7a5a7 | ||
|
|
87e24367ff | ||
|
|
db4db38876 | ||
|
|
2ded12cdfd | ||
|
|
b86618edf9 | ||
|
|
ea4cd6ca39 | ||
|
|
2231891a18 | ||
|
|
9e2790c8ae | ||
|
|
a133263681 | ||
|
|
350730be55 | ||
|
|
c5681473cb | ||
|
|
5df1b2e7f4 | ||
|
|
56c8257743 | ||
|
|
311ea4a969 | ||
|
|
d090606f36 | ||
|
|
5b1baa3d10 | ||
|
|
b29ee10938 | ||
|
|
975313d5cc | ||
|
|
253976ad79 | ||
|
|
a51733d81d | ||
|
|
afa494b2a5 | ||
|
|
34af18cd40 | ||
|
|
8263a06f21 | ||
|
|
9fd5ef2141 | ||
|
|
ac620e811d | ||
|
|
9de05ceb7a | ||
|
|
1f4653910f | ||
|
|
24500364ed | ||
|
|
d4817a1e4f | ||
|
|
17d3cafd5b | ||
|
|
275576b218 | ||
|
|
b127787553 | ||
|
|
a19cce278c | ||
|
|
a1a5bd99c1 | ||
|
|
5ed629de9f | ||
|
|
5099649ff0 | ||
|
|
0ad7c6fe6d | ||
|
|
60663487f6 | ||
|
|
5ad937a85f | ||
|
|
1095f90a26 | ||
|
|
93c317d8e6 | ||
|
|
00b38ee051 | ||
|
|
d16ab3b53e | ||
|
|
d4fc10af1d | ||
|
|
5e9ea38531 | ||
|
|
c3a386ef6d | ||
|
|
8716e4744b | ||
|
|
c60e89e144 | ||
|
|
06ec3d779f | ||
|
|
c7586330ba | ||
|
|
f7eeff71a4 | ||
|
|
cfca7cda82 | ||
|
|
8a290b8e6a | ||
|
|
9cbde0b81e | ||
|
|
5017ee9fdb | ||
|
|
99802ac63d | ||
|
|
f695b75d78 | ||
|
|
bb59715dae | ||
|
|
d951098c65 | ||
|
|
86d20bcabe | ||
|
|
25e2d2bf5c | ||
|
|
dcfcdd72ce | ||
|
|
2e12d45877 | ||
|
|
d7dd0a253b | ||
|
|
20a3f240cd | ||
|
|
4bac80d151 | ||
|
|
4fd64312c8 | ||
|
|
910846ed2c | ||
|
|
e630f8d216 | ||
|
|
e32ab98b32 | ||
|
|
c41339543f | ||
|
|
9b450f0606 | ||
|
|
36523aa64e | ||
|
|
78c5623842 | ||
|
|
2c8ab7122b | ||
|
|
8a66dbf077 | ||
|
|
2c28d27dcf | ||
|
|
7dbe9f0b6d | ||
|
|
69983c74a6 | ||
|
|
aaf6aae111 | ||
|
|
9c8af427e8 | ||
|
|
79f8fba3f9 | ||
|
|
2bf65cc749 | ||
|
|
0f0e273e0d | ||
|
|
023ad06e46 | ||
|
|
5186970421 | ||
|
|
cd091372af | ||
|
|
9eb83db3dd | ||
|
|
18cb0746b3 | ||
|
|
8de79a6398 | ||
|
|
654920cc5b | ||
|
|
1862aaa218 | ||
|
|
0d9cb5e775 | ||
|
|
42a2707f1b | ||
|
|
04f50526d3 | ||
|
|
29761601c5 | ||
|
|
9b1c60970b | ||
|
|
6becffdec6 | ||
|
|
380bf4c7a9 | ||
|
|
f234bdec5b | ||
|
|
6dba3d3fc1 | ||
|
|
c815af765f | ||
|
|
29afa9bf4b | ||
|
|
4acd4d97f3 | ||
|
|
da37ef4781 | ||
|
|
6412600e72 | ||
|
|
09db79364b | ||
|
|
90430b3f49 | ||
|
|
f3e1a941c5 | ||
|
|
3e6d198cf7 | ||
|
|
0881e4a989 | ||
|
|
d636893400 | ||
|
|
6b12eddc42 | ||
|
|
f3a8763e5c | ||
|
|
38e189dcc0 | ||
|
|
60b713fd8d | ||
|
|
ea3e5e2a84 | ||
|
|
f2364fbf5c | ||
|
|
62756e9f1c | ||
|
|
6f5472dfe9 | ||
|
|
e352bc83f0 | ||
|
|
e35eef1257 | ||
|
|
8fc6b2ef2a | ||
|
|
69a42aedf9 | ||
|
|
1bbe27a179 | ||
|
|
045668b454 | ||
|
|
f13a39a361 | ||
|
|
df0d844ee4 | ||
|
|
1ae8995f36 | ||
|
|
e6f9fc68d1 | ||
|
|
7775fea771 | ||
|
|
cdd9c702ac | ||
|
|
d791ecac01 | ||
|
|
4b3efa84fa | ||
|
|
410c51d5f4 | ||
|
|
2283a8eff1 | ||
|
|
ecc9a141a1 | ||
|
|
6dd51e0e8e | ||
|
|
dc0184185c | ||
|
|
0d4e0d1ed0 | ||
|
|
7f78d7e54c | ||
|
|
3798179e83 | ||
|
|
f5558edf7b | ||
|
|
9d2cd27e59 | ||
|
|
0d9edfbb5c | ||
|
|
fbcf78297f | ||
|
|
96603fcc12 | ||
|
|
01c768e4ca | ||
|
|
a550556929 | ||
|
|
1a6c31bc2b | ||
|
|
5e1d3eebdf | ||
|
|
9fb46dcea4 | ||
|
|
d251572201 | ||
|
|
044b12b8c1 | ||
|
|
5bb1350803 | ||
|
|
e127bc8acf | ||
|
|
9b2d299d84 | ||
|
|
4b95e50bf7 | ||
|
|
c07e47b401 | ||
|
|
7709928453 | ||
|
|
193b4ea20e | ||
|
|
1e4dfcfbf0 | ||
|
|
b0fc983013 | ||
|
|
6f79a87444 | ||
|
|
5c6579f46b | ||
|
|
b6cab6070f | ||
|
|
f1484f0cd4 | ||
|
|
a6d84bc811 | ||
|
|
1b87d19c87 | ||
|
|
f931c18437 | ||
|
|
51235439c2 | ||
|
|
9b1e54dae3 | ||
|
|
9693d60c23 | ||
|
|
502876ad9a | ||
|
|
5e34672a6d | ||
|
|
6c25e1cdce | ||
|
|
50a2f8c16d | ||
|
|
2ecd2048d4 | ||
|
|
f4e105e841 | ||
|
|
258bd8a2ba | ||
|
|
86dac44dac | ||
|
|
bf4827166b | ||
|
|
1431a5efd1 | ||
|
|
efa036748b | ||
|
|
450d6e8d9a | ||
|
|
921ffcf9ef | ||
|
|
4d9e420aa7 | ||
|
|
ce4e70b60b | ||
|
|
c0c3fb980d | ||
|
|
a2edf55463 | ||
|
|
a9afb48611 | ||
|
|
cff05c3432 | ||
|
|
ad08800a5d | ||
|
|
dfaa0d4cdf | ||
|
|
6b0b5941da | ||
|
|
2372340c55 | ||
|
|
edbf46c2da | ||
|
|
98a06dbf63 | ||
|
|
74eed1eb66 | ||
|
|
e92197ac27 | ||
|
|
e7fc59fe99 | ||
|
|
650337cafa | ||
|
|
550028f6a1 | ||
|
|
733b1d638e | ||
|
|
be34a18712 | ||
|
|
a3f1271a63 | ||
|
|
9fb30a7cc0 | ||
|
|
3332c6a1b6 | ||
|
|
d3a8c491bf | ||
|
|
f3883b4d54 | ||
|
|
b33626e87a | ||
|
|
ba42773298 | ||
|
|
40e8f0fb2a | ||
|
|
4fc6443589 | ||
|
|
3a8e9e6104 | ||
|
|
3693f0fe43 | ||
|
|
08973326c4 | ||
|
|
0041a04fb2 | ||
|
|
7b947b7a42 | ||
|
|
17888bc3c0 | ||
|
|
310990d4dc | ||
|
|
e0a4e74f80 | ||
|
|
cfc6c74d02 | ||
|
|
a3c4486681 | ||
|
|
41d6c584cd | ||
|
|
c06123ae0c | ||
|
|
587e9b4f49 | ||
|
|
09dcdbe0ff | ||
|
|
7e1dbd7a03 | ||
|
|
0192f2b6c8 | ||
|
|
c3183e79ed | ||
|
|
9940e879d4 | ||
|
|
a6b92a1d83 | ||
|
|
a99b0c08d4 | ||
|
|
cd47d982d9 | ||
|
|
b29242fed4 | ||
|
|
ba57c8f33a | ||
|
|
d87a192fe6 | ||
|
|
ed057d7f67 | ||
|
|
400aa66520 | ||
|
|
7a0d223ed6 | ||
|
|
a77ac5eb39 | ||
|
|
518ec0c168 | ||
|
|
2c07f4154e | ||
|
|
b3e79c6c6c | ||
|
|
97292b3883 | ||
|
|
7d0f6b051c | ||
|
|
f6faa640b7 | ||
|
|
69aa6d19c3 | ||
|
|
42fca8fd3a | ||
|
|
cffc4ccb30 | ||
|
|
8a283686f2 | ||
|
|
2c9482428f | ||
|
|
b943c9c83d | ||
|
|
005f647e13 | ||
|
|
c6974571dd | ||
|
|
3e2f8ef7eb | ||
|
|
56132c0447 | ||
|
|
baec1b577c | ||
|
|
7138ff4750 | ||
|
|
b497391969 | ||
|
|
85d4c76d59 | ||
|
|
f2ca2f4835 | ||
|
|
ea28f47062 | ||
|
|
508c6f404d | ||
|
|
fa178171b6 | ||
|
|
d25dbaffeb | ||
|
|
5fc1a2e66e | ||
|
|
9f1ffb53dc | ||
|
|
c0d6562b8b | ||
|
|
4a2a6ebe99 | ||
|
|
79c90a15fa | ||
|
|
b9e6895d3a | ||
|
|
3683f82865 | ||
|
|
01465edf46 | ||
|
|
089eea6bef | ||
|
|
0ec2d0eca1 | ||
|
|
015d7657e7 | ||
|
|
2d308ccc78 | ||
|
|
d92843c4dd | ||
|
|
de7785d2e8 | ||
|
|
7b7d3507db | ||
|
|
006def0451 | ||
|
|
8950ee8d8e | ||
|
|
07299b0a1e | ||
|
|
46a6f9366d | ||
|
|
12b4b456cb | ||
|
|
e5f92a2396 | ||
|
|
bfbf85b7a7 | ||
|
|
3ecf3e0fa1 | ||
|
|
0e1c5e521a | ||
|
|
db0efee3d4 | ||
|
|
b8f2831c68 | ||
|
|
323e3ce5ab | ||
|
|
d5a7ac9412 | ||
|
|
ae6769c77d | ||
|
|
37600f669c | ||
|
|
b819164293 | ||
|
|
32109cb7cf | ||
|
|
8a90e1d979 | ||
|
|
72218042af | ||
|
|
f6ee974ac7 | ||
|
|
b255b0eccc | ||
|
|
a0e6b7797c | ||
|
|
7c2e062ccb | ||
|
|
dd9799aaa2 | ||
|
|
805065faa4 | ||
|
|
545c4a7aa7 | ||
|
|
9dfe7b710e | ||
|
|
924af8d1c0 | ||
|
|
99d808ac37 | ||
|
|
9dad666a66 | ||
|
|
76177f7a48 | ||
|
|
bbd20b347d | ||
|
|
b5a0dffd57 | ||
|
|
086d1992b6 | ||
|
|
ac3052168c | ||
|
|
cf99e1e9f8 | ||
|
|
57a9560def | ||
|
|
c8ff3bb0cc | ||
|
|
1ee1acb94f | ||
|
|
69ee813add | ||
|
|
247874eb43 | ||
|
|
1a29d97330 | ||
|
|
7352937e75 | ||
|
|
ec59e22ec0 | ||
|
|
ebc31d93d9 | ||
|
|
1741706a00 | ||
|
|
15459fceae | ||
|
|
1ca90839e4 | ||
|
|
304f1400f9 | ||
|
|
5f01fd2c54 | ||
|
|
d74cd0bff8 | ||
|
|
0bc11358bb | ||
|
|
9a93f60e34 | ||
|
|
bc113af571 | ||
|
|
3269d85838 | ||
|
|
041b97af42 | ||
|
|
597f277dca | ||
|
|
4b62ceec81 | ||
|
|
ec8aa63648 | ||
|
|
271ed603e1 | ||
|
|
6acf436edc | ||
|
|
954444af1c | ||
|
|
d5036d16cd | ||
|
|
21312c5617 | ||
|
|
cf406f37e3 | ||
|
|
70685b85af | ||
|
|
b1550c24b9 | ||
|
|
7359b90813 | ||
|
|
0e7ca534eb | ||
|
|
2ea955a642 | ||
|
|
4d6f8e3d34 | ||
|
|
83806487dc | ||
|
|
df294d5f28 | ||
|
|
beaeca558b | ||
|
|
7b8c6b4353 | ||
|
|
4a02eb3afe | ||
|
|
bba69953cd | ||
|
|
36efb40d10 | ||
|
|
4264d66e09 | ||
|
|
1e46927bba | ||
|
|
d3d427483f | ||
|
|
33b2586062 | ||
|
|
a77a5ac2a0 | ||
|
|
98f297ba23 | ||
|
|
3f9a51509a | ||
|
|
92e8e7960b | ||
|
|
594e178180 | ||
|
|
0f708d90df | ||
|
|
a70c2d02ad | ||
|
|
13c4ad8e20 | ||
|
|
2d9226ff60 | ||
|
|
2d0d3e1f63 | ||
|
|
20beadbcb1 | ||
|
|
95bc08f56b | ||
|
|
ec659dc825 | ||
|
|
aae19fd69c | ||
|
|
dc71b40a5f | ||
|
|
0006ef0cc8 | ||
|
|
2e8a110092 | ||
|
|
0aeb9d9a62 | ||
|
|
4bcab49b68 | ||
|
|
a6a7ed5f8c | ||
|
|
1e3b108ef9 | ||
|
|
dac856d4f2 | ||
|
|
607f822b20 | ||
|
|
2ba2192f6f | ||
|
|
b10e766b73 | ||
|
|
f01bc46dfe | ||
|
|
e44e04a5f5 | ||
|
|
7c2b3c6ab5 | ||
|
|
2c85ca538e | ||
|
|
0c33720da2 | ||
|
|
05b0b4f2ae | ||
|
|
0ca13f7ff6 | ||
|
|
d144cbfe09 | ||
|
|
ef3de8e1f7 | ||
|
|
3669ad06b0 | ||
|
|
9c64402c80 | ||
|
|
f4e81d2e19 | ||
|
|
3385cfe8cf | ||
|
|
00d35d412b | ||
|
|
4a304171a6 | ||
|
|
1acef3bef8 | ||
|
|
9cd12c0bcd | ||
|
|
8f5b808cfe | ||
|
|
cbf5f3e4de | ||
|
|
7902f129f5 | ||
|
|
45f7bb6a9f | ||
|
|
45a7449ceb | ||
|
|
b697d670cb | ||
|
|
ee1b80e8e5 | ||
|
|
30c157894d | ||
|
|
81b0f3f5c0 | ||
|
|
959e0b9dfb | ||
|
|
9c503c5689 | ||
|
|
5707f715aa | ||
|
|
555b593770 | ||
|
|
54c7a42949 | ||
|
|
14732a0d27 | ||
|
|
ff47163220 | ||
|
|
825a304b38 | ||
|
|
39cf6b2fdc | ||
|
|
0193199d57 | ||
|
|
2f6d883fcb | ||
|
|
fd805805a8 | ||
|
|
48ca85ec46 | ||
|
|
fe4588a87e | ||
|
|
c815908774 | ||
|
|
4012f6cd34 | ||
|
|
6d519d366e | ||
|
|
5ced594638 | ||
|
|
84470be578 | ||
|
|
9791a38e93 | ||
|
|
1443b70f4d | ||
|
|
ac825d35af | ||
|
|
a3cd82292c | ||
|
|
c8bd932ff3 | ||
|
|
8f952922ba | ||
|
|
fafe66921e | ||
|
|
7f5093d00d | ||
|
|
a8f637446d | ||
|
|
f46ebab88c | ||
|
|
c3da3a5048 | ||
|
|
9c6ab6372f | ||
|
|
17f17157b9 | ||
|
|
399194bb7a | ||
|
|
a46962c4c1 | ||
|
|
8694cd7c62 | ||
|
|
d76f84108f | ||
|
|
cecb628970 | ||
|
|
27720df27a | ||
|
|
ee795ec927 | ||
|
|
9d978102bc | ||
|
|
7835898d92 | ||
|
|
5e6beee12c | ||
|
|
076a67b1bf | ||
|
|
158427237e | ||
|
|
663327f408 | ||
|
|
aebf95f6f2 | ||
|
|
de52238d06 | ||
|
|
9c6aee1cdf | ||
|
|
668e9414d8 | ||
|
|
27c0786c3b | ||
|
|
cd51c0ed25 | ||
|
|
b9d5b5cf10 | ||
|
|
bf8b18f80e | ||
|
|
ab549924e8 | ||
|
|
e3ce03230a | ||
|
|
b745ee2833 | ||
|
|
79a5197d1d | ||
|
|
942b3e2aae | ||
|
|
97612e5913 | ||
|
|
12a9f18dcc | ||
|
|
e1675f98d4 | ||
|
|
22db6951dc | ||
|
|
3e904497b1 | ||
|
|
a94cb97f4a | ||
|
|
df18cb7401 | ||
|
|
e969599750 | ||
|
|
58de6a8294 | ||
|
|
7bea3e0303 | ||
|
|
8326ba3235 | ||
|
|
ace6464105 | ||
|
|
378bc323c2 | ||
|
|
41f7f6302b | ||
|
|
d21a6ce41f | ||
|
|
5f68d9921d | ||
|
|
b4cbe82e26 | ||
|
|
697f151896 | ||
|
|
162d75c68c | ||
|
|
86410b610b | ||
|
|
2995eff3e3 | ||
|
|
d2449123be | ||
|
|
d856a7745c | ||
|
|
e76be10b70 | ||
|
|
9406a69dc0 | ||
|
|
acce88acb5 | ||
|
|
b0b5725863 | ||
|
|
ed13841255 | ||
|
|
a908ea8cb5 | ||
|
|
be21bbbc25 | ||
|
|
c96c4e3fa4 | ||
|
|
136be0dd92 | ||
|
|
f83ca6dc04 | ||
|
|
fa4cc616ff | ||
|
|
1fcb6f273a | ||
|
|
fc6c57d330 | ||
|
|
7a1487a726 | ||
|
|
0d25b8c4d5 | ||
|
|
1f8b7c2711 | ||
|
|
7ded1f054b | ||
|
|
7daca4fc60 | ||
|
|
1b32c44aa3 | ||
|
|
867f3ba889 | ||
|
|
c82d4105ec | ||
|
|
5f0143a774 | ||
|
|
6827f384c9 | ||
|
|
30b3953b45 | ||
|
|
d3539e79ca | ||
|
|
7551efdd70 | ||
|
|
6a8b78d6db | ||
|
|
5fa0678ef1 | ||
|
|
36725334b1 | ||
|
|
10397e5d0e | ||
|
|
ac2ed39761 | ||
|
|
ac69a5f84a | ||
|
|
9e339b8ded | ||
|
|
f33961a1df | ||
|
|
40d87232e6 | ||
|
|
cb7dbaebc9 | ||
|
|
4c5ba0d841 | ||
|
|
539616f85a | ||
|
|
a1d2da174b | ||
|
|
24b07e7ae6 | ||
|
|
7ca7e599a5 | ||
|
|
72ce1c5159 | ||
|
|
f9788f6987 | ||
|
|
b972e52710 | ||
|
|
510522ff57 | ||
|
|
a1429e482e | ||
|
|
520f6fcc87 | ||
|
|
be06406cb8 | ||
|
|
5f9a26a009 | ||
|
|
ddaeb8933c | ||
|
|
191116a62e | ||
|
|
5977a2d6a7 | ||
|
|
e6f3ba89ec | ||
|
|
db677a6f75 | ||
|
|
479baa64e5 | ||
|
|
1f8105e44c | ||
|
|
3869025575 | ||
|
|
c25eebd321 | ||
|
|
ccebd55230 | ||
|
|
f9b7a3e692 | ||
|
|
3887a6d012 | ||
|
|
4bd7be25df | ||
|
|
1d56fdab49 | ||
|
|
5afc57be8e | ||
|
|
8a9ec2c624 | ||
|
|
f22e2721dc | ||
|
|
5da827856c | ||
|
|
6000901868 | ||
|
|
7bd91cdd6e | ||
|
|
299454e654 | ||
|
|
52739303db | ||
|
|
476ee44449 | ||
|
|
7c6f3c6cb2 | ||
|
|
abfc726cc4 | ||
|
|
e7ece2a742 | ||
|
|
df7b871807 | ||
|
|
95cfa1c3a7 | ||
|
|
cfdca5342c | ||
|
|
5f84978261 | ||
|
|
7c7523d968 | ||
|
|
3008f1f46e | ||
|
|
2ac69799ec | ||
|
|
df753a2942 | ||
|
|
425b53e062 | ||
|
|
7abee00e97 | ||
|
|
e565fbba32 | ||
|
|
0073cdd512 | ||
|
|
6e1303417c | ||
|
|
cfe8581b9b | ||
|
|
7ddcb409b6 | ||
|
|
533795bb75 | ||
|
|
b33087c6d3 | ||
|
|
2d533fa2a9 | ||
|
|
4659df3c49 | ||
|
|
46f9604fd6 | ||
|
|
9d5cdc4b03 | ||
|
|
9fbc16e840 | ||
|
|
39f063f94d | ||
|
|
f67d19788e | ||
|
|
1cfc57d91b | ||
|
|
9ea42aad43 | ||
|
|
fffeb599f8 | ||
|
|
13686b8d12 | ||
|
|
1ac29856e1 | ||
|
|
38d86a4aa3 | ||
|
|
9b65dbabc1 | ||
|
|
610e13c424 | ||
|
|
9f0f739be9 | ||
|
|
4ccb224ca8 | ||
|
|
9b26ab91a5 | ||
|
|
ead2757410 | ||
|
|
3cc3ab97ed | ||
|
|
5d17e0d33e | ||
|
|
76f9c11768 | ||
|
|
cbebb2687a | ||
|
|
3961e49115 | ||
|
|
9ace5d5b19 | ||
|
|
b0725ec91a | ||
|
|
e0ec1c804e | ||
|
|
36a08afe2a | ||
|
|
d228d3127c | ||
|
|
ffc91880e1 | ||
|
|
3a09f847bb | ||
|
|
0a228eec58 | ||
|
|
59fae43a26 | ||
|
|
ff7281a866 | ||
|
|
0b4df63ee2 | ||
|
|
d53f00fb69 | ||
|
|
ba9ddb94fa | ||
|
|
5070eb57b6 | ||
|
|
0f2f8f179e | ||
|
|
18a83d872b | ||
|
|
d8c00fda7b | ||
|
|
e6015c7c26 | ||
|
|
b70c4be0d9 | ||
|
|
2856b9535e | ||
|
|
62610f975f | ||
|
|
6bf7f5b84f | ||
|
|
c96654e8eb | ||
|
|
b37db2a9db | ||
|
|
adc42f10ab | ||
|
|
4ea71cf959 | ||
|
|
01ee621b40 | ||
|
|
ce62364df5 | ||
|
|
8bd7cfc472 | ||
|
|
50daea0824 | ||
|
|
8e09c4566e | ||
|
|
a1b4a3f698 | ||
|
|
f30ca2fd58 | ||
|
|
6667bfa0a9 | ||
|
|
33859eda7a | ||
|
|
487391eab6 | ||
|
|
d0bf1b11b1 | ||
|
|
511e7438d7 | ||
|
|
5071c6aa0a | ||
|
|
119aa701d0 | ||
|
|
d639db1a9d | ||
|
|
abcd88ab09 | ||
|
|
140e8ff0d9 | ||
|
|
7b1a6d8811 | ||
|
|
80e0df803f | ||
|
|
a1486e0c08 | ||
|
|
314ecdc15a | ||
|
|
39ab213a0a | ||
|
|
c750a3e42c | ||
|
|
fc851bfb71 | ||
|
|
89ba3aae12 | ||
|
|
cf9dd9cf3b | ||
|
|
1f03218e56 | ||
|
|
9cbc2661e1 | ||
|
|
1e4aa8a7d4 | ||
|
|
1540e46180 | ||
|
|
b9fbc2faab | ||
|
|
7313a31b92 | ||
|
|
9599296d97 | ||
|
|
8ac9bc5858 | ||
|
|
73785e645b | ||
|
|
5a41427b37 | ||
|
|
ec9b7d57ac | ||
|
|
a59952f4c9 | ||
|
|
9ad29a120a | ||
|
|
bc231c8c92 | ||
|
|
2fd128fe15 | ||
|
|
1b91bcb342 | ||
|
|
bd71369ca5 | ||
|
|
d548c65214 | ||
|
|
301215b860 | ||
|
|
76dfe7f707 | ||
|
|
46accc5829 | ||
|
|
bb9be9ed00 | ||
|
|
c3ee1cf7f9 | ||
|
|
ce074f86c3 | ||
|
|
082b8cb318 | ||
|
|
85e4d13987 | ||
|
|
d5546e27cf | ||
|
|
45569b3a65 | ||
|
|
ce79f12b7b | ||
|
|
c0b462dd42 | ||
|
|
5721fa222a | ||
|
|
d1e88d085e | ||
|
|
afe805a586 | ||
|
|
da83df8bb7 | ||
|
|
0f98d16ad1 | ||
|
|
1bf74156a2 | ||
|
|
25f79b38d8 | ||
|
|
0603a70b79 | ||
|
|
9b4334593c | ||
|
|
99b8ef66fd | ||
|
|
b67bc26c4d | ||
|
|
82da0a1808 | ||
|
|
1e318cc920 | ||
|
|
036e845b65 | ||
|
|
9a010b5d73 | ||
|
|
4ad03aebbb | ||
|
|
a70eddca0d | ||
|
|
b7d5d72f78 | ||
|
|
153bd2fc0d | ||
|
|
172ebc873c | ||
|
|
33a5a447a8 | ||
|
|
e27deedf24 | ||
|
|
3d631d7389 | ||
|
|
1b98d6343f | ||
|
|
34ff11cc2f | ||
|
|
c4b15b06e6 | ||
|
|
5e494c370a | ||
|
|
fbc7f2bbaf | ||
|
|
47bf575dfa | ||
|
|
08fe131e34 | ||
|
|
09e21afaaa | ||
|
|
fa918cde67 | ||
|
|
179d6df8c0 | ||
|
|
84dda879d0 | ||
|
|
070f9108ff | ||
|
|
4ae1928609 | ||
|
|
804ef2d9ee | ||
|
|
de3ed511b1 | ||
|
|
844d8fc641 | ||
|
|
963cefb1bb | ||
|
|
3eb017ee50 | ||
|
|
7ece654913 | ||
|
|
1b6556acac | ||
|
|
ff8aa96e68 | ||
|
|
a403696909 | ||
|
|
cd85c690df | ||
|
|
3afc06730d | ||
|
|
89a6bc1ca9 | ||
|
|
e1fa8cca42 | ||
|
|
6fd2cebd85 | ||
|
|
802519ea53 | ||
|
|
fdf8f817d3 | ||
|
|
51e16a559d | ||
|
|
7168e2bfeb | ||
|
|
a9d159b065 | ||
|
|
f3ce53be67 | ||
|
|
e5562a8fda | ||
|
|
3770ecec6f | ||
|
|
7f44e35134 | ||
|
|
ccf7d491f7 | ||
|
|
8f129be7fb | ||
|
|
139ce2d98a | ||
|
|
7f5b035542 | ||
|
|
501bad4fd6 | ||
|
|
9ffd90edcf | ||
|
|
a863f02fc0 | ||
|
|
abf04e0d1c | ||
|
|
cba74d6208 | ||
|
|
d0df777779 | ||
|
|
d353146b32 | ||
|
|
e59111ddf3 | ||
|
|
40dbde3a86 | ||
|
|
3f08a21500 | ||
|
|
ec891da5a7 | ||
|
|
c72c2bee4b | ||
|
|
d0b33ef971 | ||
|
|
77ad1e47c1 | ||
|
|
9bf6ef1857 | ||
|
|
830a24d326 | ||
|
|
ea9ee98dd7 | ||
|
|
2909ee7529 | ||
|
|
52979e6206 | ||
|
|
af9f073374 | ||
|
|
cc5049f41e | ||
|
|
63b889aba6 | ||
|
|
f0908fd16b | ||
|
|
6a27f2c096 | ||
|
|
55c9a74046 | ||
|
|
370735f2e4 | ||
|
|
8d4b04a365 | ||
|
|
6f9ada3843 | ||
|
|
ae6fa39b20 | ||
|
|
1599f28a1f | ||
|
|
106518995c | ||
|
|
10e49d5a1e | ||
|
|
a95f19a9f3 | ||
|
|
5b3f2efc2e | ||
|
|
4e648d883d | ||
|
|
02ada73e46 | ||
|
|
e323998c19 | ||
|
|
b25a3c3f11 | ||
|
|
f105bf6f5b | ||
|
|
c21cf7cf4b | ||
|
|
d0dfef0321 | ||
|
|
9ccc60ae83 | ||
|
|
8b5dadd520 | ||
|
|
323665eec5 | ||
|
|
cec41c4c9d | ||
|
|
1c49ad8a03 | ||
|
|
ef856f2fe0 | ||
|
|
c569749a21 | ||
|
|
328abbe8d8 | ||
|
|
5fa3c57f37 | ||
|
|
92c14834f4 | ||
|
|
bb8ab4aa4f | ||
|
|
fa9d6d7682 | ||
|
|
6a31970946 | ||
|
|
47d1b9ee33 | ||
|
|
dce4a696bf | ||
|
|
b78021fcd1 | ||
|
|
b11b6e4dda | ||
|
|
d5d6252e5b | ||
|
|
14c0efd947 | ||
|
|
3d0da40b0d | ||
|
|
75e511ab32 | ||
|
|
43bb0877fc | ||
|
|
4953b8bfa5 | ||
|
|
a2cb0c3029 | ||
|
|
032af13e8b | ||
|
|
20acbf2a93 | ||
|
|
ced9a44bc8 | ||
|
|
c3f4b6ec1b | ||
|
|
36b3d034d2 | ||
|
|
8d3dc3ed37 | ||
|
|
c77eb16a79 | ||
|
|
3fc15f302b | ||
|
|
e20614ed03 | ||
|
|
e6ade0739d | ||
|
|
5cbd245bad | ||
|
|
b4dae5f577 | ||
|
|
3b8a1fee1d | ||
|
|
5c8b083c66 | ||
|
|
30f7f59109 | ||
|
|
8b0a1174bd | ||
|
|
c4f77e41b6 | ||
|
|
eafb7ad68c | ||
|
|
1b000de186 | ||
|
|
8b5551f1eb | ||
|
|
0fa6fc2279 | ||
|
|
8861552c07 | ||
|
|
4e395f3ddd | ||
|
|
7946306583 | ||
|
|
c90c187756 | ||
|
|
43a30ad483 | ||
|
|
c9eb103b7f | ||
|
|
c11ba93098 | ||
|
|
af0211c200 | ||
|
|
dac656c955 | ||
|
|
8efd785f67 | ||
|
|
007126d010 | ||
|
|
2c453c5844 | ||
|
|
86fa49b707 | ||
|
|
69a71c999c | ||
|
|
1f16d123b1 | ||
|
|
cd63594f4a | ||
|
|
d3428db5c5 | ||
|
|
a6f9704a91 | ||
|
|
a5c9da18fb | ||
|
|
59c8f5f79f | ||
|
|
f44b5b5812 | ||
|
|
74fcfe6c7e | ||
|
|
a821772a15 | ||
|
|
d51673ed91 | ||
|
|
f8400651e0 | ||
|
|
6eb76c4598 | ||
|
|
57096116d9 | ||
|
|
12558e2ef9 | ||
|
|
c83fa3fdfc | ||
|
|
5fa281c0ee | ||
|
|
1081efba4f | ||
|
|
152a77b4f6 | ||
|
|
8514873d3d | ||
|
|
53ea54c90f | ||
|
|
666bd54f80 | ||
|
|
348fa7b88e | ||
|
|
2142a46875 | ||
|
|
d6e13af09c | ||
|
|
159d2cd692 | ||
|
|
e088fb2b1a |
29
.hgtags
29
.hgtags
@@ -143,3 +143,32 @@ f0eccb2946986fb9626efde7d8ed9c8192623f5c jdk8-b17
|
||||
0ff7113a0882ec82d642cb9f0297b4e497807ced jdk8-b19
|
||||
6561530ea757c3f3a6fb171c9cc7b3885cdeca85 jdk8-b20
|
||||
b3a426170188f52981cf4573a2f14d487fddab0d jdk8-b21
|
||||
e8f03541af27e38aafb619b96863e17f65ffe53b jdk8-b22
|
||||
498124337041ad53cbaa7eb110f3d7acd6d4eac4 jdk8-b23
|
||||
7d3720d8c595d1519c31e9ff7366203fc2c61350 jdk8-b24
|
||||
0071a6d64113a35ba345bb1580c256de5ce17d3e jdk8-b25
|
||||
6c805d8ed4e5449ea5e4d158c7bdbd7b0b70efd1 jdk8-b26
|
||||
c51754cddc037b9609e202b9ed38363d8683e7a8 jdk8-b27
|
||||
16ba58282d117247f480aae7a79b88141ade52a3 jdk8-b28
|
||||
e070119aa56ee4dc5506c19d2c4d2eecab8ad429 jdk8-b29
|
||||
23da7804aca0c9c4e6e86532a1453125a76d95ee jdk8-b30
|
||||
bac81e9f7d57b75fba5ab31b571f3fe0dc08af69 jdk8-b31
|
||||
2c5208ccb863db936eab523f49450b3fcd230348 jdk8-b32
|
||||
a6e6d42203e6d35f9e8b31eac25b0021b4dd58ad jdk8-b33
|
||||
0ae89825c75c9492e44efb3aca3d9ee3d8a209df jdk8-b34
|
||||
f151d5833912a82cd4f203944da0305c3be83ecc jdk8-b35
|
||||
98ce9816ae089c959ba1e70fba98423a31c4e9fa jdk8-b36
|
||||
b3a91113026c99b0da010d41055719ab0d8938f0 jdk8-b37
|
||||
4cc5610a6dd6227da766ebf9742eb11ff5ded6c0 jdk8-b38
|
||||
35a5397278779a2f8f3013f81586dc8f30cb149d jdk8-b39
|
||||
6e4e654931b976304bf6e7b4d0d6db8f75bac5d9 jdk8-b40
|
||||
c029c972396cea042a0dc67c0f7ccf2fe68007d4 jdk8-b41
|
||||
5c5a64ec0839df5affe9394b99ff338c363acbca jdk8-b42
|
||||
69d8a827cdf9236be9694a46d75c710d71dac7d7 jdk8-b43
|
||||
7e981cb0ad6a194f1fa859f9ad47586db461f269 jdk8-b44
|
||||
9b19b2302c28f4da6d4078f66234abecfed5688a jdk8-b45
|
||||
600c9a1feb01633cbcf2341a43d1d21e6497ecd0 jdk8-b46
|
||||
b820143a6f1ce993c6e6f31db4d64de990f42654 jdk8-b47
|
||||
086271e35b0a419b38e8bda9bebd70693811df0a jdk8-b48
|
||||
cecd7026f30cbd83b0601925a7a5e059aec98138 jdk8-b49
|
||||
38fe5ab028908cf64dd73a43336ba3211577bfc3 jdk8-b50
|
||||
|
||||
@@ -143,3 +143,32 @@ a4f28069d44a379cda99dd1d921d19f819726d22 jdk8-b15
|
||||
237bc29afbfc6f56a4fe4a6008e2befb59c44bac jdk8-b19
|
||||
5a5eaf6374bcbe23530899579fed17a05b7705f3 jdk8-b20
|
||||
cc771d92284f71765eca14d6d08703c4af254c04 jdk8-b21
|
||||
7ad075c809952e355d25030605da6af30456ed74 jdk8-b22
|
||||
60d6f64a86b1e511169d264727f6d51415978df0 jdk8-b23
|
||||
1a5f1d6b98d6827cdb529a4abe6e52a886d944f4 jdk8-b24
|
||||
221a378e06a326f45e5d89e2123cd6323e0181d1 jdk8-b25
|
||||
2accafff224ae39caf5f532c305251ba624bf2c0 jdk8-b26
|
||||
1533dfab9903e4edcfead3b0192643f38c418b9b jdk8-b27
|
||||
6e2541d60f4e342b5b67140271d7611643929dc3 jdk8-b28
|
||||
41460de042580bc4a4ce3f863779c66f39cb8578 jdk8-b29
|
||||
6cea54809b51db92979c22fd8aa8fcb1cb13d12e jdk8-b30
|
||||
0b66f43b89a6c0ac1c15d7ec51992c541cdc9089 jdk8-b31
|
||||
88176171e940f02916a312c265a34c32552a8376 jdk8-b32
|
||||
42f275168fa5d9e7c70b246614dca8cf81f52c2e jdk8-b33
|
||||
894a478d2c4819a1a0f230bd7bdd09f3b2de9a8c jdk8-b34
|
||||
5285317ebb4e8e4f6d8d52b5616fa801e2ea844d jdk8-b35
|
||||
6a6ba0a07f33d37a2f97b1107e60c6a9a69ec84d jdk8-b36
|
||||
b2972095a4b1e2a97409b7c3df61f3b263a5ce14 jdk8-b37
|
||||
d939bd0ab13c16647ffa38cc4b64fb31b7d44e10 jdk8-b38
|
||||
8927dd68aee3fa54a1a698e2980e1b2f6c7c12c1 jdk8-b39
|
||||
a2b2d435f1d275fa8010774c653197c64e326d3a jdk8-b40
|
||||
1a8c7c530f8a9b7f5bdb9b0693b2f5435ca5205e jdk8-b41
|
||||
1ce5dc16416611c58b7480ca67a2eee5153498a6 jdk8-b42
|
||||
661c9aae602bbd9766d12590800c90f1edd1d8dd jdk8-b43
|
||||
e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
|
||||
633f2378c904c92bb922a6e19e9f62fe8eac14af jdk8-b45
|
||||
27fa766a2298ba8347dc198f0cf85ba6618e17db jdk8-b46
|
||||
1dcb4b7b9373e64e135c12fe1f8699f1f80e51e8 jdk8-b47
|
||||
3f6c72d1c2a6e5c9e7d81c3dc984886678a128ad jdk8-b48
|
||||
c97b99424815c43818e3cc3ffcdd1a60f3198b52 jdk8-b49
|
||||
2fd67618b9a3c847780ed7b9d228e862b6e2824c jdk8-b50
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
<li><a href="#linux">Basic Linux System Setup</a> </li>
|
||||
<li><a href="#solaris">Basic Solaris System Setup</a> </li>
|
||||
<li><a href="#windows">Basic Windows System Setup</a> </li>
|
||||
<li><a href="#macosx">Basic Mac OS X System Setup</a></li>
|
||||
<li><a href="#dependencies">Build Dependencies</a>
|
||||
<ul>
|
||||
<li><a href="#bootjdk">Bootstrap JDK</a> </li>
|
||||
@@ -107,6 +108,7 @@
|
||||
<li><a href="#testing">Testing the Build</a> </li>
|
||||
<li><a href="#variables">Environment/Make Variables</a></li>
|
||||
<li><a href="#troubleshooting">Troubleshooting</a></li>
|
||||
<li><a href="#newbuild">The New Build</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
@@ -230,6 +232,12 @@
|
||||
<td>Microsoft Visual Studio C++ 2010 Professional Edition</td>
|
||||
<td>JDK 6u18</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mac OS X X64 (64-bit)</td>
|
||||
<td>Mac OS X 10.7.3 "Lion"</td>
|
||||
<td>XCode 4.1 or later</td>
|
||||
<td>Java for OS X Lion Update 1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
@@ -951,6 +959,36 @@
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<hr>
|
||||
<h3><a name="macosx">Basic Mac OS X System Setup</a></h3>
|
||||
<blockquote>
|
||||
<strong>X64 only:</strong>
|
||||
The minimum recommended hardware for building
|
||||
the Mac OS X version is any 64-bit capable Intel processor, at least 2
|
||||
GB of RAM, and approximately 3 GB of free disk space. You should also
|
||||
have OS X Lion 10.7.3 installed.
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
|
||||
<h4><a name="macosx_checklist">Basic Mac OS X Check List</a></h4>
|
||||
<blockquote>
|
||||
<ol>
|
||||
<li>
|
||||
Install <a href="https://developer.apple.com/xcode/">XCode 4.1</a> or newer.
|
||||
If you install XCode 4.3 or newer, make sure you also install
|
||||
"Command line tools" found under the preferences pane "Downloads".
|
||||
</li>
|
||||
<li>
|
||||
Install <a href="http://support.apple.com/kb/dl1421" target="_blank">"Java for OS X Lion Update 1"</a>,
|
||||
set <tt><a href="#ALT_BOOTDIR">ALT_BOOTDIR</a> to <code>`/usr/libexec/java_home -v 1.6`</code></tt>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#importjdk">Optional Import JDK</a>, set
|
||||
<tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>.
|
||||
</li>
|
||||
</ol>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<hr>
|
||||
<h3><a name="dependencies">Build Dependencies</a></h3>
|
||||
<blockquote>
|
||||
Depending on the platform, the OpenJDK build process has some basic
|
||||
@@ -1194,6 +1232,10 @@
|
||||
set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
|
||||
set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
|
||||
</pre>
|
||||
<strong><a name="llvmgcc">OS X Lion 10.7.3: LLVM GCC</a></strong>
|
||||
<blockquote>
|
||||
LLVM GCC is bundled with XCode. The version should be at least 4.2.1.
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="zip">Zip and Unzip</a></h4>
|
||||
@@ -2079,6 +2121,16 @@
|
||||
</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<hr>
|
||||
<h2><a name="newbuild">The New Build</a></h2>
|
||||
<blockquote>
|
||||
The <a href="http://openjdk.java.net/projects/build-infra/">
|
||||
Build Infrastructure project</a> is working on a new
|
||||
build. For information on how to try it out, please see the
|
||||
<a href="http://openjdk.java.net/projects/build-infra/guide.html">
|
||||
Build Infra User Guide</a>
|
||||
</blockquote>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3383,3 +3383,397 @@ included with JRE 7, JDK 7, and OpenJDK 7, except where noted:
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
%% This notice is provided with respect to Mozilla Network Security
|
||||
Services (NSS), which is supplied with the JDK test suite in the OpenJDK
|
||||
source code repository. It is licensed under Mozilla Public License (MPL),
|
||||
version 2.0.
|
||||
|
||||
The NSS libraries are supplied in executable form, built from unmodified
|
||||
NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
|
||||
|
||||
The NSS source code is available in the OpenJDK source code repository at:
|
||||
jdk/test/sun/security/pkcs11/nss/src
|
||||
|
||||
The NSS libraries are available in the OpenJDK source code repository at:
|
||||
jdk/test/sun/security/pkcs11/nss/lib
|
||||
|
||||
--- begin of LICENSE ---
|
||||
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
|
||||
--- end of LICENSE ---
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
26
common/autoconf/Makefile.in
Normal file
26
common/autoconf/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Generated Makefile @DATE_WHEN_CONFIGURED@
|
||||
SPEC:=@OUTPUT_ROOT@/spec.gmk
|
||||
include @SRC_ROOT@/common/makefiles/Makefile
|
||||
40
common/autoconf/autogen.sh
Normal file
40
common/autoconf/autogen.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
script_dir=`dirname $0`
|
||||
closed_script_dir="$script_dir/../../jdk/make/closed/autoconf"
|
||||
|
||||
# Create a timestamp as seconds since epoch
|
||||
TIMESTAMP=`date +%s`
|
||||
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
|
||||
rm -rf autom4te.cache
|
||||
|
||||
if test -e $closed_script_dir/closed-hook.m4; then
|
||||
# We have closed sources available; also generate configure script
|
||||
# with closed hooks compiled in.
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
||||
sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|" | autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh
|
||||
rm -rf autom4te.cache
|
||||
fi
|
||||
485
common/autoconf/basics.m4
Normal file
485
common/autoconf/basics.m4
Normal file
@@ -0,0 +1,485 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([ADD_JVM_ARG_IF_OK],
|
||||
[
|
||||
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
|
||||
# If so, then append $1 to $2
|
||||
FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn`
|
||||
FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
$2="[$]$2 $1"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([WHICHCMD],
|
||||
[
|
||||
# Translate "gcc -E" into "`which gcc` -E" ie
|
||||
# extract the full path to the binary and at the
|
||||
# same time maintain any arguments passed to it.
|
||||
# The command MUST exist in the path, or else!
|
||||
tmp="[$]$1"
|
||||
car="${tmp%% *}"
|
||||
tmp="[$]$1 EOL"
|
||||
cdr="${tmp#* }"
|
||||
# On windows we want paths without spaces.
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
WHICHCMD_SPACESAFE(car)
|
||||
else
|
||||
# "which" is not portable, but is used here
|
||||
# because we know that the command exists!
|
||||
car=`which $car`
|
||||
fi
|
||||
if test "x$cdr" != xEOL; then
|
||||
$1="$car ${cdr% *}"
|
||||
else
|
||||
$1="$car"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([SPACESAFE],
|
||||
[
|
||||
# Fail with message $2 if var $1 contains a path with no spaces in it.
|
||||
# Unless on Windows, where we can rewrite the path.
|
||||
HAS_SPACE=`echo "[$]$1" | grep " "`
|
||||
if test "x$HAS_SPACE" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
$1=`$CYGPATH -s -m -a "[$]$1"`
|
||||
$1=`$CYGPATH -u "[$]$1"`
|
||||
else
|
||||
AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([WHICHCMD_SPACESAFE],
|
||||
[
|
||||
# Translate long cygdrive or C:\sdfsf path
|
||||
# into a short mixed mode path that has no
|
||||
# spaces in it.
|
||||
tmp="[$]$1"
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
tmp=`$CYGPATH -u "[$]$1"`
|
||||
tmp=`which "$tmp"`
|
||||
# If file exists with .exe appended, that's the real filename
|
||||
# and cygpath needs that to convert to short style path.
|
||||
if test -f "${tmp}.exe"; then
|
||||
tmp="${tmp}.exe"
|
||||
elif test -f "${tmp}.cmd"; then
|
||||
tmp="${tmp}.cmd"
|
||||
fi
|
||||
# Convert to C:/ mixed style path without spaces.
|
||||
tmp=`$CYGPATH -s -m "$tmp"`
|
||||
fi
|
||||
$1="$tmp"
|
||||
])
|
||||
|
||||
AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --help 2>&1 | grep GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
READLINK_TESTED=yes
|
||||
READLINK=
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$READLINK" != x; then
|
||||
$1=`$READLINK -f [$]$1`
|
||||
else
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
DIR=`dirname [$]$1`
|
||||
FIL=`basename [$]$1`
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# The link might be relative! We have to use cd to travel safely.
|
||||
cd $DIR
|
||||
cd `dirname $ISLINK`
|
||||
DIR=`pwd`
|
||||
FIL=`basename $ISLINK`
|
||||
let COUNTER=COUNTER+1
|
||||
done
|
||||
cd $STARTDIR
|
||||
$1=$DIR/$FIL
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
REMOVE_SYMBOLIC_LINKS(SCRIPT)
|
||||
AUTOCONF_DIR=`dirname [$]0`
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`pwd`"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
SRC_ROOT_LENGTH=`pwd|wc -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SRC_ROOT)
|
||||
cd "$CURDIR"
|
||||
|
||||
SPACESAFE(SRC_ROOT,[the path to the source root])
|
||||
SPACESAFE(CURDIR,[the path to the current directory])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_SEARCHPATH],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
# Add extra search paths on solaris for utilities like ar and as etc...
|
||||
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATH_SEP],
|
||||
[
|
||||
# For cygwin we need cygpath first, since it is used everywhere.
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
PATH_SEP=":"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
PATH_SEP=";"
|
||||
fi
|
||||
AC_SUBST(PATH_SEP)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration, overriding the generated default])],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
mkdir -p "$OUTPUT_ROOT"
|
||||
if test ! -d "$OUTPUT_ROOT"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
|
||||
fi
|
||||
else
|
||||
# We are running configure from outside of the src dir.
|
||||
# Then use the current directory as output dir!
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
|
||||
fi
|
||||
OUTPUT_ROOT="$CURDIR"
|
||||
fi
|
||||
|
||||
SPACESAFE(OUTPUT_ROOT,[the path to the output root])
|
||||
|
||||
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
|
||||
AC_SUBST(CONF_NAME, $CONF_NAME)
|
||||
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
|
||||
|
||||
# Most of the probed defines are put into config.h
|
||||
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
|
||||
# The spec.sh file contains variables for compare{images|-objects}.sh scrips.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
|
||||
# The generated Makefile knows where the spec.gmk is and where the source is.
|
||||
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
|
||||
# Save the arguments given to us
|
||||
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
|
||||
[
|
||||
# Setup default logging of stdout and stderr to build.log in the output root.
|
||||
BUILD_LOG='$(OUTPUT_ROOT)/build.log'
|
||||
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
|
||||
BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
AC_SUBST(BUILD_LOG)
|
||||
AC_SUBST(BUILD_LOG_PREVIOUS)
|
||||
AC_SUBST(BUILD_LOG_WRAPPER)
|
||||
])
|
||||
|
||||
|
||||
#%%% Simple tools %%%
|
||||
|
||||
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
[
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
|
||||
DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
|
||||
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
|
||||
|
||||
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
rm $DELETEDIR/TestIfFindSupportsDelete
|
||||
FIND_DELETE="-exec rm \{\} \+"
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rmdir $DELETEDIR
|
||||
])
|
||||
|
||||
AC_DEFUN([CHECK_NONEMPTY],
|
||||
[
|
||||
# Test that variable $1 is not empty.
|
||||
if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
[
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
AC_PROG_AWK
|
||||
CHECK_NONEMPTY(AWK)
|
||||
AC_PATH_PROG(CAT, cat)
|
||||
CHECK_NONEMPTY(CAT)
|
||||
AC_PATH_PROG(CHMOD, chmod)
|
||||
CHECK_NONEMPTY(CHMOD)
|
||||
AC_PATH_PROG(CP, cp)
|
||||
CHECK_NONEMPTY(CP)
|
||||
AC_PATH_PROG(CPIO, cpio)
|
||||
CHECK_NONEMPTY(CPIO)
|
||||
AC_PATH_PROG(CUT, cut)
|
||||
CHECK_NONEMPTY(CUT)
|
||||
AC_PATH_PROG(DATE, date)
|
||||
CHECK_NONEMPTY(DATE)
|
||||
AC_PATH_PROG(DF, df)
|
||||
CHECK_NONEMPTY(DF)
|
||||
AC_PATH_PROG(DIFF, diff)
|
||||
CHECK_NONEMPTY(DIFF)
|
||||
# Warning echo is really, really unportable!!!!! Different
|
||||
# behaviour in bash and dash and in a lot of other shells!
|
||||
# Use printf for serious work!
|
||||
AC_PATH_PROG(ECHO, echo)
|
||||
CHECK_NONEMPTY(ECHO)
|
||||
AC_PROG_EGREP
|
||||
CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
CHECK_NONEMPTY(FGREP)
|
||||
|
||||
AC_PATH_PROG(FIND, find)
|
||||
CHECK_NONEMPTY(FIND)
|
||||
BASIC_CHECK_FIND_DELETE
|
||||
AC_SUBST(FIND_DELETE)
|
||||
|
||||
AC_PROG_GREP
|
||||
CHECK_NONEMPTY(GREP)
|
||||
AC_PATH_PROG(HEAD, head)
|
||||
CHECK_NONEMPTY(HEAD)
|
||||
AC_PATH_PROG(LN, ln)
|
||||
CHECK_NONEMPTY(LN)
|
||||
AC_PATH_PROG(LS, ls)
|
||||
CHECK_NONEMPTY(LS)
|
||||
AC_PATH_PROGS(MAKE, [gmake make])
|
||||
CHECK_NONEMPTY(MAKE)
|
||||
MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
|
||||
if test "x$MAKE_VERSION" = x; then
|
||||
AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
AC_PATH_PROG(MKDIR, mkdir)
|
||||
CHECK_NONEMPTY(MKDIR)
|
||||
AC_PATH_PROG(MV, mv)
|
||||
CHECK_NONEMPTY(MV)
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
CHECK_NONEMPTY(NAWK)
|
||||
AC_PATH_PROG(PRINTF, printf)
|
||||
CHECK_NONEMPTY(PRINTF)
|
||||
AC_PATH_PROG(THEPWDCMD, pwd)
|
||||
AC_PATH_PROG(RM, rm)
|
||||
CHECK_NONEMPTY(RM)
|
||||
RM="$RM -f"
|
||||
AC_PROG_SED
|
||||
CHECK_NONEMPTY(SED)
|
||||
AC_PATH_PROG(SH, sh)
|
||||
CHECK_NONEMPTY(SH)
|
||||
AC_PATH_PROG(SORT, sort)
|
||||
CHECK_NONEMPTY(SORT)
|
||||
AC_PATH_PROG(TAR, tar)
|
||||
CHECK_NONEMPTY(TAR)
|
||||
AC_PATH_PROG(TAIL, tail)
|
||||
CHECK_NONEMPTY(TAIL)
|
||||
AC_PATH_PROG(TEE, tee)
|
||||
CHECK_NONEMPTY(TEE)
|
||||
AC_PATH_PROG(TR, tr)
|
||||
CHECK_NONEMPTY(TR)
|
||||
AC_PATH_PROG(TOUCH, touch)
|
||||
CHECK_NONEMPTY(TOUCH)
|
||||
AC_PATH_PROG(WC, wc)
|
||||
CHECK_NONEMPTY(WC)
|
||||
AC_PATH_PROG(XARGS, xargs)
|
||||
CHECK_NONEMPTY(XARGS)
|
||||
AC_PATH_PROG(ZIP, zip)
|
||||
CHECK_NONEMPTY(ZIP)
|
||||
AC_PATH_PROG(UNZIP, unzip)
|
||||
CHECK_NONEMPTY(UNZIP)
|
||||
AC_PATH_PROG(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
# List shared lib dependencies is used for
|
||||
# debug output and checking for forbidden dependencies.
|
||||
# We can build without it.
|
||||
LDD="true"
|
||||
fi
|
||||
AC_PATH_PROG(OTOOL, otool)
|
||||
if test "x$OTOOL" = "x"; then
|
||||
OTOOL="true"
|
||||
fi
|
||||
AC_PATH_PROG(READELF, readelf)
|
||||
AC_PATH_PROG(EXPR, expr)
|
||||
CHECK_NONEMPTY(EXPR)
|
||||
AC_PATH_PROG(FILE, file)
|
||||
CHECK_NONEMPTY(FILE)
|
||||
AC_PATH_PROG(HG, hg)
|
||||
])
|
||||
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE],
|
||||
[
|
||||
# When using cygwin, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called uncygdrive.exe.
|
||||
UNCYGDRIVE=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if uncygdrive can be created])
|
||||
UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
|
||||
rm -f $OUTPUT_ROOT/uncygdrive*
|
||||
UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
|
||||
cd $OUTPUT_ROOT
|
||||
$CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
|
||||
cd $CURDIR
|
||||
|
||||
if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/uncygdrive1.log
|
||||
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
|
||||
fi
|
||||
AC_MSG_RESULT([$UNCYGDRIVE])
|
||||
AC_MSG_CHECKING([if uncygdrive.exe works])
|
||||
cd $OUTPUT_ROOT
|
||||
$UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
|
||||
cd $CURDIR
|
||||
if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/uncygdrive2.log
|
||||
AC_MSG_ERROR([Uncygdrive did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
|
||||
fi
|
||||
|
||||
AC_SUBST(UNCYGDRIVE)
|
||||
])
|
||||
|
||||
|
||||
# Check if build directory is on local disk.
|
||||
# Argument 1: directory to test
|
||||
# Argument 2: what to do if it is on local disk
|
||||
# Argument 3: what to do otherwise (remote disk or failure)
|
||||
AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if $DF -l $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
[
|
||||
|
||||
AC_MSG_CHECKING([if build directory is on local disk])
|
||||
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
|
||||
[OUTPUT_DIR_IS_LOCAL="yes"],
|
||||
[OUTPUT_DIR_IS_LOCAL="no"])
|
||||
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
|
||||
|
||||
# Check if the user has any old-style ALT_ variables set.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUT_ROOT/spec.gmk; then
|
||||
IS_RECONFIGURE=yes
|
||||
else
|
||||
IS_RECONFIGURE=no
|
||||
fi
|
||||
|
||||
if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
|
||||
HIDE_PERFORMANCE_HINTS=yes
|
||||
else
|
||||
HIDE_PERFORMANCE_HINTS=no
|
||||
# Hide it the next time around...
|
||||
$TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
])
|
||||
295
common/autoconf/boot-jdk.m4
Normal file
295
common/autoconf/boot-jdk.m4
Normal file
@@ -0,0 +1,295 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Fixes paths on windows to be mixed mode short.
|
||||
AC_DEFUN([BOOTJDK_WIN_FIX_PATH],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
tmp="[$]$1"
|
||||
# Convert to C:/ mixed style path without spaces.
|
||||
tmp=`$CYGPATH -s -m "$tmp"`
|
||||
$1="$tmp"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BOOTJDK_MISSING_ERROR],
|
||||
[
|
||||
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# We need a Boot JDK to bootstrap the build.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
[
|
||||
BOOT_JDK_FOUND=no
|
||||
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
|
||||
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_boot_jdk" != x; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no])
|
||||
fi
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
if test ! -d "$JAVA_HOME"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
# Aha, the user has set a JAVA_HOME
|
||||
# let us use that as the Boot JDK.
|
||||
BOOT_JDK="$JAVA_HOME"
|
||||
BOOT_JDK_FOUND=yes
|
||||
# To be on the safe side, lets check that it is a JDK.
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
JAVAC="$BOOT_JDK/bin/javac"
|
||||
JAVA="$BOOT_JDK/bin/java"
|
||||
BOOT_JDK_FOUND=yes
|
||||
else
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
AC_PATH_PROG(JAVAC_CHECK, javac)
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
WHICHCMD_SPACESAFE(BINARY,[path to javac])
|
||||
REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname $BINARY`
|
||||
BOOT_JDK=`cd $BOOT_JDK/..; pwd`
|
||||
if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
|
||||
JAVAC=$BOOT_JDK/bin/javac
|
||||
JAVA=$BOOT_JDK/bin/java
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
# Try the MacOSX way.
|
||||
if test -x /usr/libexec/java_home; then
|
||||
BOOT_JDK=`/usr/libexec/java_home`
|
||||
if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
|
||||
JAVAC=$BOOT_JDK/bin/javac
|
||||
JAVA=$BOOT_JDK/bin/java
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
if test "x$JAVA_CHECK" != x; then
|
||||
# There is a java in the path. But apparently we have not found a javac
|
||||
# in the path, since that would have been tested earlier.
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# Now if this is a windows platform. The default installation of a JDK
|
||||
# actually puts the JRE in the path and keeps the JDK out of the path!
|
||||
# Go look in the default installation location.
|
||||
BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
|
||||
if test -d "$BOOT_JDK"; then
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
AC_MSG_NOTICE([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
else
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
AC_MSG_NOTICE([Could not find a JDK. $HELP_MSG])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
fi
|
||||
|
||||
BOOTJDK_WIN_FIX_PATH(BOOT_JDK)
|
||||
|
||||
# Now see if we can find the rt.jar, or its nearest equivalent.
|
||||
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
|
||||
SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)])
|
||||
|
||||
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
|
||||
SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
|
||||
|
||||
if test ! -f $BOOT_RTJAR; then
|
||||
# On MacOSX it is called classes.jar
|
||||
BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
|
||||
if test ! -f $BOOT_RTJAR; then
|
||||
AC_MSG_NOTICE([Cannot find the rt.jar or its equivalent!])
|
||||
AC_MSG_NOTICE([This typically means that configure failed to automatically find a suitable Boot JDK])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
# Remove the ..
|
||||
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
|
||||
# The tools.jar is part of classes.jar
|
||||
BOOT_TOOLSJAR="$BOOT_RTJAR"
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOT_JDK)
|
||||
AC_SUBST(BOOT_RTJAR)
|
||||
AC_SUBST(BOOT_TOOLSJAR)
|
||||
AC_MSG_CHECKING([for Boot JDK])
|
||||
AC_MSG_RESULT([$BOOT_JDK])
|
||||
AC_MSG_CHECKING([for Boot rt.jar])
|
||||
AC_MSG_RESULT([$BOOT_RTJAR])
|
||||
AC_MSG_CHECKING([for Boot tools.jar])
|
||||
AC_MSG_RESULT([$BOOT_TOOLSJAR])
|
||||
|
||||
# Use the java tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for java in Boot JDK])
|
||||
JAVA=$BOOT_JDK/bin/java
|
||||
if test ! -x $JAVA; then
|
||||
AC_MSG_NOTICE([Could not find a working java])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
|
||||
AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
|
||||
AC_SUBST(JAVA)
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
|
||||
if test "x$FOUND_VERSION_78" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
AC_MSG_NOTICE([Your boot-jdk must be version 7 or 8. $HELP_MSG])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
|
||||
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
|
||||
BOOT_JDK_SOURCETARGET="-source 7 -target 7"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
|
||||
# Use the javac tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for javac in Boot JDK])
|
||||
JAVAC=$BOOT_JDK/bin/javac
|
||||
if test ! -x $JAVAC; then
|
||||
AC_MSG_ERROR([Could not find a working javac])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(JAVAC)
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
|
||||
# Use the javah tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for javah in Boot JDK])
|
||||
JAVAH=$BOOT_JDK/bin/javah
|
||||
if test ! -x $JAVAH; then
|
||||
AC_MSG_NOTICE([Could not find a working javah])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(JAVAH)
|
||||
|
||||
# Use the jar tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for jar in Boot JDK])
|
||||
JAR=$BOOT_JDK/bin/jar
|
||||
if test ! -x $JAR; then
|
||||
AC_MSG_NOTICE([Could not find a working jar])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_SUBST(JAR)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
# Use the rmic tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for rmic in Boot JDK])
|
||||
RMIC=$BOOT_JDK/bin/rmic
|
||||
if test ! -x $RMIC; then
|
||||
AC_MSG_NOTICE([Could not find a working rmic])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_SUBST(RMIC)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
# Use the native2ascii tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for native2ascii in Boot JDK])
|
||||
NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
|
||||
if test ! -x $NATIVE2ASCII; then
|
||||
AC_MSG_NOTICE([Could not find a working native2ascii])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(NATIVE2ASCII)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
[
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
#
|
||||
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
|
||||
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
|
||||
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
|
||||
|
||||
if test "x$with_boot_jdk_jvmargs" = x; then
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
# OpenJDK specific increase in thread stack for JDK build,
|
||||
# well more specifically, when running javac.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
|
||||
# since 64-bit pointers are pushed on the stach. Apparently, we need
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
||||
])
|
||||
1531
common/autoconf/build-aux/autoconf-config.guess
Normal file
1531
common/autoconf/build-aux/autoconf-config.guess
Normal file
File diff suppressed because it is too large
Load Diff
38
common/autoconf/build-aux/config.guess
vendored
Normal file
38
common/autoconf/build-aux/config.guess
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This is a wrapper for the config.guess from autoconf. The latter does not properly
|
||||
# detect amd64 systems, since that require isainfo instead of uname. Instead of patching
|
||||
# the autoconf system (which might easily get lost in a future update), we wrap it and
|
||||
# fix the broken property, if needed.
|
||||
|
||||
DIR=`dirname $0`
|
||||
OUT=`. $DIR/autoconf-config.guess`
|
||||
echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
# isainfo -n returns either i386 or amd64 on Intel systems
|
||||
REAL_CPU=`isainfo -n`
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
echo $OUT
|
||||
1658
common/autoconf/build-aux/config.sub
vendored
Normal file
1658
common/autoconf/build-aux/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
common/autoconf/build-aux/install.sh
Normal file
5
common/autoconf/build-aux/install.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
echo >&2 "No suitable 'install' command found.'"
|
||||
echo >&2 "If automake is installed, running 'automake -fa'"
|
||||
echo >&2 "(and ignoring the errors) might produce one."
|
||||
exit 1
|
||||
155
common/autoconf/build-aux/pkg.m4
Normal file
155
common/autoconf/build-aux/pkg.m4
Normal file
@@ -0,0 +1,155 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
#
|
||||
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
# this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
# PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
# -----------------------------
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
#
|
||||
# Note that if there is a possibility the first call to
|
||||
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
#
|
||||
#
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
378
common/autoconf/build-performance.m4
Normal file
378
common/autoconf/build-performance.m4
Normal file
@@ -0,0 +1,378 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([BPERF_CHECK_CORES],
|
||||
[
|
||||
AC_MSG_CHECKING([for number of cores])
|
||||
NUM_CORES=1
|
||||
FOUND_CORES=no
|
||||
|
||||
if test -f /proc/cpuinfo; then
|
||||
# Looks like a Linux system
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/psrinfo; then
|
||||
# Looks like a Solaris system
|
||||
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/system_profiler; then
|
||||
# Looks like a MacOSX system
|
||||
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test "x$build_os" = xwindows; then
|
||||
NUM_CORES=4
|
||||
fi
|
||||
|
||||
# For c/c++ code we run twice as many concurrent build
|
||||
# jobs than we have cores, otherwise we will stall on io.
|
||||
CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
|
||||
|
||||
if test "x$FOUND_CORES" = xyes; then
|
||||
AC_MSG_RESULT([$NUM_CORES])
|
||||
else
|
||||
AC_MSG_RESULT([could not detect number of cores, defaulting to 1!])
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
[
|
||||
AC_MSG_CHECKING([for memory size])
|
||||
# Default to 1024MB
|
||||
MEMORY_SIZE=1024
|
||||
FOUND_MEM=no
|
||||
|
||||
if test -f /proc/cpuinfo; then
|
||||
# Looks like a Linux system
|
||||
MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/prtconf; then
|
||||
# Looks like a Solaris system
|
||||
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/system_profiler; then
|
||||
# Looks like a MacOSX system
|
||||
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test "x$build_os" = xwindows; then
|
||||
MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MEM" = xyes; then
|
||||
AC_MSG_RESULT([$MEMORY_SIZE MB])
|
||||
else
|
||||
AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
|
||||
[
|
||||
# How many cores do we have on this build system?
|
||||
AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
|
||||
[number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
|
||||
if test "x$with_num_cores" = x; then
|
||||
# The number of cores were not specified, try to probe them.
|
||||
BPERF_CHECK_CORES
|
||||
else
|
||||
NUM_CORES=$with_num_cores
|
||||
CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
|
||||
fi
|
||||
AC_SUBST(NUM_CORES)
|
||||
AC_SUBST(CONCURRENT_BUILD_JOBS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
|
||||
[
|
||||
# How much memory do we have on this build system?
|
||||
AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
|
||||
[memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
|
||||
if test "x$with_memory_size" = x; then
|
||||
# The memory size was not specified, try to probe it.
|
||||
BPERF_CHECK_MEMORY_SIZE
|
||||
else
|
||||
MEMORY_SIZE=$with_memory_size
|
||||
fi
|
||||
AC_SUBST(MEMORY_SIZE)
|
||||
])
|
||||
|
||||
AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
[
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--disable-ccache],
|
||||
[use ccache to speed up recompilations @<:@enabled@:>@])],
|
||||
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
|
||||
if test "x$ENABLE_CCACHE" = xyes; then
|
||||
AC_PATH_PROG(CCACHE, ccache)
|
||||
else
|
||||
AC_MSG_CHECKING([for ccache])
|
||||
AC_MSG_RESULT([explicitly disabled])
|
||||
CCACHE=
|
||||
fi
|
||||
AC_SUBST(CCACHE)
|
||||
|
||||
AC_ARG_WITH([ccache-dir],
|
||||
[AS_HELP_STRING([--with-ccache-dir],
|
||||
[where to store ccache files @<:@~/.ccache@:>@])])
|
||||
|
||||
if test "x$with_ccache_dir" != x; then
|
||||
# When using a non home ccache directory, assume the use is to share ccache files
|
||||
# with other users. Thus change the umask.
|
||||
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
|
||||
fi
|
||||
CCACHE_FOUND=""
|
||||
if test "x$CCACHE" != x; then
|
||||
BPERF_SETUP_CCACHE_USAGE
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
|
||||
[
|
||||
if test "x$CCACHE" != x; then
|
||||
CCACHE_FOUND="true"
|
||||
# Only use ccache if it is 3.1.4 or later, which supports
|
||||
# precompiled headers.
|
||||
AC_MSG_CHECKING([if ccache supports precompiled headers])
|
||||
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
|
||||
if test "x$HAS_GOOD_CCACHE" = x; then
|
||||
AC_MSG_RESULT([no, disabling ccache])
|
||||
CCACHE=
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
|
||||
PUSHED_FLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
|
||||
CXXFLAGS="$PUSHED_FLAGS"
|
||||
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
|
||||
CCACHE=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$CCACHE" != x; then
|
||||
CCACHE_SLOPPINESS=time_macros
|
||||
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
|
||||
CCACHE_FLAGS=-fpch-preprocess
|
||||
|
||||
if test "x$SET_CCACHE_DIR" != x; then
|
||||
mkdir -p $CCACHE_DIR > /dev/null 2>&1
|
||||
chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Can the C/C++ compiler use precompiled headers?
|
||||
#
|
||||
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
|
||||
[use precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
|
||||
|
||||
USE_PRECOMPILED_HEADER=1
|
||||
if test "x$ENABLE_PRECOMPH" = xno; then
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$GCC" = xyes; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch
|
||||
if test ! -f conftest.hpp.gch; then
|
||||
echo Precompiled header is not working!
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rm -f conftest.h
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_PRECOMPILED_HEADER)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
[
|
||||
AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java],
|
||||
[use this java binary for running the javac background server and other long running java tasks in the build process,
|
||||
e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
|
||||
|
||||
if test "x$with_server_java" != x; then
|
||||
SERVER_JAVA="$with_server_java"
|
||||
FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
|
||||
if test "x$FOUND_VERSION" = x; then
|
||||
AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA])
|
||||
fi
|
||||
else
|
||||
SERVER_JAVA=""
|
||||
# Hotspot specific options.
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
|
||||
# JRockit specific options.
|
||||
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA])
|
||||
SERVER_JAVA="$JAVA $SERVER_JAVA"
|
||||
fi
|
||||
AC_SUBST(SERVER_JAVA)
|
||||
|
||||
AC_MSG_CHECKING([whether to use shared server for javac])
|
||||
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
|
||||
[enable the shared javac server during the build process @<:@disabled@:>@])],
|
||||
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no'])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
|
||||
if test "x$ENABLE_JAVAC_SERVER" = xyes; then
|
||||
JAVAC_USE_REMOTE=true
|
||||
JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
|
||||
else
|
||||
JAVAC_USE_REMOTE=false
|
||||
JAVAC_SERVERS=
|
||||
fi
|
||||
AC_SUBST(JAVAC_USE_REMOTE)
|
||||
AC_SUBST(JAVAC_SERVERS)
|
||||
|
||||
AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
|
||||
[use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
|
||||
if test "x$with_javac_server_cores" != x; then
|
||||
JAVAC_SERVER_CORES="$with_javac_server_cores"
|
||||
else
|
||||
if test "$NUM_CORES" -gt 16; then
|
||||
# We set this arbitrary limit because we want to limit the heap
|
||||
# size of the javac server.
|
||||
# In the future we will make the javac compilers in the server
|
||||
# share more and more state, thus enabling us to use more and
|
||||
# more concurrent threads in the server.
|
||||
JAVAC_SERVER_CORES="16"
|
||||
else
|
||||
JAVAC_SERVER_CORES="$NUM_CORES"
|
||||
fi
|
||||
|
||||
if test "$MEMORY_SIZE" -gt "17000"; then
|
||||
MAX_HEAP_MEM=10000
|
||||
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "10000"; then
|
||||
MAX_HEAP_MEM=6000
|
||||
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "5000"; then
|
||||
MAX_HEAP_MEM=3000
|
||||
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "3800"; then
|
||||
MAX_HEAP_MEM=2500
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "1900"; then
|
||||
MAX_HEAP_MEM=1200
|
||||
ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "1000"; then
|
||||
MAX_HEAP_MEM=900
|
||||
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
else
|
||||
MAX_HEAP_MEM=512
|
||||
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
fi
|
||||
|
||||
MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
|
||||
if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
|
||||
AC_MSG_CHECKING([if number of server cores must be reduced])
|
||||
JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
|
||||
AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(JAVAC_SERVER_CORES)
|
||||
|
||||
AC_MSG_CHECKING([whether to track dependencies between Java packages])
|
||||
AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
|
||||
[enable the dependency tracking between Java packages @<:@disabled@:>@])],
|
||||
[ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
|
||||
if test "x$ENABLE_JAVAC_DEPS" = xyes; then
|
||||
JAVAC_USE_DEPS=true
|
||||
else
|
||||
JAVAC_USE_DEPS=false
|
||||
fi
|
||||
AC_SUBST(JAVAC_USE_DEPS)
|
||||
|
||||
AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
|
||||
AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
|
||||
[compile Java packages concurrently @<:@disabled@:>@])],
|
||||
[ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
|
||||
if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
|
||||
JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
|
||||
else
|
||||
JAVAC_USE_MODE=SINGLE_THREADED_BATCH
|
||||
if test "x$ENABLE_JAVAC_DEPS" = xyes; then
|
||||
AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
|
||||
AC_MSG_WARN([Disabling dependency tracking for you now.])
|
||||
JAVAC_USE_DEPS=false
|
||||
fi
|
||||
if test "x$ENABLE_JAVAC_SERVER" = xyes; then
|
||||
AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
|
||||
AC_MSG_WARN([Disabling javac server for you now.])
|
||||
JAVAC_USE_REMOTE=false
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(JAVAC_USE_MODE)
|
||||
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
|
||||
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
|
||||
AC_MSG_RESULT([$ENABLE_SJAVAC])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
|
||||
])
|
||||
66
common/autoconf/builddeps.conf.example
Normal file
66
common/autoconf/builddeps.conf.example
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This is a configuration example using builddeps
|
||||
# that are downloaded from an ftp server.
|
||||
# This is how you use it:
|
||||
|
||||
#configure --with-builddeps-server=ftp://builddeps.server/adir \
|
||||
# --with-builddeps-conf=..../builddeps.conf.example
|
||||
# --with-builddeps-dir=/localdisk/mybuilddeps
|
||||
|
||||
# Translate a configuration triplet/quadruplet into something
|
||||
# known by this configuration file.
|
||||
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_SYSTEM}
|
||||
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
|
||||
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
|
||||
|
||||
# The needed cups builddeps are platform independent header files.
|
||||
# I.e. they need not be part of the devkit.
|
||||
builddep_cups=lib/cups_1_3_9.zip
|
||||
builddep_cups_CFLAGS=-I${depdir}
|
||||
|
||||
# The devkit is the cross compiler tools and sys-roots
|
||||
# for the build platform.
|
||||
builddep_devkit=sdk/sdk-${rewritten_build}-20110921.tar.gz
|
||||
|
||||
# The freetype dependency is partly platform dependent.
|
||||
# It is stored inside the sys-root.
|
||||
builddep_freetype2=sdk/sdk-${rewritten_build}-20110921.tar.gz
|
||||
builddep_freetype2_CFLAGS=-I${depdir}/${rewritten_target}/sys-root/usr/include/freetype2
|
||||
builddep_freetype2_LIBS=-lfreetype
|
||||
|
||||
# There are many other build dependencies, but they are implicitly
|
||||
# found inside the devkit sys-root.
|
||||
|
||||
# The boot jdk runs on the build system and is used to compile and run
|
||||
# Java build tools and of course, the bootstrap javac.
|
||||
builddep_bootjdk_BUILD_i386_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-i586-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_x86_64_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-x64-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_i686_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-i586-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-x64-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_sparc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparc-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_sparcv9_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparcv9-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_i386_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-i586-17_nov_2011.zip
|
||||
builddep_bootjdk_BUILD_x86_64_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-x64-17_nov_2011.zip
|
||||
builddep_bootjdk_ROOT=${depdir}/jdk7_02/jdk1.7.0_02
|
||||
43
common/autoconf/builddeps.conf.nfs.example
Normal file
43
common/autoconf/builddeps.conf.nfs.example
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This is a configuration example using an nfs-mount /java
|
||||
# it will use the builddeps directly from the nfs mounted directory.
|
||||
# This is how you use it:
|
||||
|
||||
#configure --with-builddeps-conf=..../builddeps.conf.nfs.example
|
||||
|
||||
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
|
||||
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
|
||||
|
||||
DEVTOOLS=/java/devtools
|
||||
|
||||
builddep_cups=${DEVTOOLS}/linux/cups/include
|
||||
builddep_cups_CFLAGS=-I${depdir}
|
||||
|
||||
JDK_ROOT=/java/re/jdk/7u4/latest/binaries
|
||||
builddep_bootjdk_BUILD_i386_pc_solaris2=${JDK_ROOT}/solaris-i586
|
||||
builddep_bootjdk_BUILD_x86_64_pc_solaris2=${JDK_ROOT}/solaris-amd64
|
||||
builddep_bootjdk_BUILD_i686_unknown_linux_gnu=${JDK_ROOT}/linux-i586
|
||||
builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=${JDK_ROOT}/linux-amd64
|
||||
builddep_bootjdk_ROOT=
|
||||
260
common/autoconf/builddeps.m4
Normal file
260
common/autoconf/builddeps.m4
Normal file
@@ -0,0 +1,260 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
|
||||
[
|
||||
define(LIST_OF_BUILD_DEPENDENCIES,)
|
||||
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
|
||||
if test "x$with_builddeps_conf" != x; then
|
||||
AC_MSG_CHECKING([for supplied builddeps configuration file])
|
||||
builddepsfile=$with_builddeps_conf
|
||||
if test -s $builddepsfile; then
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([loaded!])
|
||||
else
|
||||
AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING([for builddeps.conf files in sources...])
|
||||
builddepsfile=`mktemp`
|
||||
touch $builddepsfile
|
||||
# Put all found confs into a single file.
|
||||
find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
|
||||
# Source the file to acquire the variables
|
||||
if test -s $builddepsfile; then
|
||||
. $builddepsfile
|
||||
AC_MSG_RESULT([found at least one!])
|
||||
else
|
||||
AC_MSG_ERROR([Could not find any builddeps.conf at all!])
|
||||
fi
|
||||
fi
|
||||
# Create build and target names that use _ instead of "-" and ".".
|
||||
# This is necessary to use them in variable names.
|
||||
build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'`
|
||||
target_var=`echo ${OPENJDK_TARGET_SYSTEM} | tr '-' '_' | tr '.' '_'`
|
||||
# Extract rewrite information for build and target
|
||||
eval rewritten_build=\${REWRITE_${build_var}}
|
||||
if test "x$rewritten_build" = x; then
|
||||
rewritten_build=${OPENJDK_BUILD_SYSTEM}
|
||||
echo Build stays the same $rewritten_build
|
||||
else
|
||||
echo Rewriting build for builddeps into $rewritten_build
|
||||
fi
|
||||
eval rewritten_target=\${REWRITE_${target_var}}
|
||||
if test "x$rewritten_target" = x; then
|
||||
rewritten_target=${OPENJDK_TARGET_SYSTEM}
|
||||
echo Target stays the same $rewritten_target
|
||||
else
|
||||
echo Rewriting target for builddeps into $rewritten_target
|
||||
fi
|
||||
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
|
||||
rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
|
||||
fi
|
||||
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
|
||||
if test "x$BDEPS_UNZIP" = x7z; then
|
||||
BDEPS_UNZIP="7z x"
|
||||
fi
|
||||
|
||||
AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
|
||||
])
|
||||
|
||||
AC_DEFUN([BDEPS_FTPGET],
|
||||
[
|
||||
# $1 is the ftp://abuilddeps.server.com/libs/cups.zip
|
||||
# $2 is the local file name for the downloaded file.
|
||||
VALID_TOOL=no
|
||||
if test "x$BDEPS_FTP" = xwget; then
|
||||
VALID_TOOL=yes
|
||||
wget -O $2 $1
|
||||
fi
|
||||
if test "x$BDEPS_FTP" = xlftp; then
|
||||
VALID_TOOL=yes
|
||||
lftp -c "get $1 -o $2"
|
||||
fi
|
||||
if test "x$BDEPS_FTP" = xftp; then
|
||||
VALID_TOOL=yes
|
||||
FTPSERVER=`echo $1 | cut -f 3 -d '/'`
|
||||
FTPPATH=`echo $1 | cut -f 4- -d '/'`
|
||||
FTPUSERPWD=${FTPSERVER%%@*}
|
||||
if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
|
||||
FTPUSER=${userpwd%%:*}
|
||||
FTPPWD=${userpwd#*@}
|
||||
FTPSERVER=${FTPSERVER#*@}
|
||||
else
|
||||
FTPUSER=ftp
|
||||
FTPPWD=ftp
|
||||
fi
|
||||
# the "pass" command does not work on some
|
||||
# ftp clients (read ftp.exe) but if it works,
|
||||
# passive mode is better!
|
||||
(\
|
||||
echo "user $FTPUSER $FTPPWD" ;\
|
||||
echo "pass" ;\
|
||||
echo "bin" ;\
|
||||
echo "get $FTPPATH $2" ;\
|
||||
) | ftp -in $FTPSERVER
|
||||
fi
|
||||
if test "x$VALID_TOOL" != xyes; then
|
||||
AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BDEPS_CHECK_MODULE],
|
||||
[
|
||||
define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
|
||||
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
|
||||
# Source the builddeps file again, to make sure it uses the latest variables!
|
||||
. $builddepsfile
|
||||
# Look for a target and build machine specific resource!
|
||||
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
|
||||
if test "x$resource" = x; then
|
||||
# Ok, lets instead look for a target specific resource
|
||||
eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
|
||||
fi
|
||||
if test "x$resource" = x; then
|
||||
# Ok, lets instead look for a build specific resource
|
||||
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
|
||||
fi
|
||||
if test "x$resource" = x; then
|
||||
# Ok, lets instead look for a generic resource
|
||||
# (The $2 comes from M4 and not the shell, thus no need for eval here.)
|
||||
resource=${builddep_$2}
|
||||
fi
|
||||
if test "x$resource" != x; then
|
||||
AC_MSG_NOTICE([Using builddeps $resource for $2])
|
||||
# If the resource in the builddeps.conf file is an existing directory,
|
||||
# for example /java/linux/cups
|
||||
if test -d ${resource}; then
|
||||
depdir=${resource}
|
||||
else
|
||||
BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
|
||||
fi
|
||||
# Source the builddeps file again, because in the previous command, the depdir
|
||||
# was updated to point at the current build dependency install directory.
|
||||
. $builddepsfile
|
||||
# Now extract variables from the builddeps.conf files.
|
||||
theroot=${builddep_$2_ROOT}
|
||||
thecflags=${builddep_$2_CFLAGS}
|
||||
thelibs=${builddep_$2_LIBS}
|
||||
if test "x$depdir" = x; then
|
||||
AC_MSG_ERROR([Could not download build dependency $2])
|
||||
fi
|
||||
$1=$depdir
|
||||
if test "x$theroot" != x; then
|
||||
$1="$theroot"
|
||||
fi
|
||||
if test "x$thecflags" != x; then
|
||||
$1_CFLAGS="$thecflags"
|
||||
fi
|
||||
if test "x$thelibs" != x; then
|
||||
$1_LIBS="$thelibs"
|
||||
fi
|
||||
m4_default([$4], [:])
|
||||
m4_ifvaln([$5], [else $5])
|
||||
fi
|
||||
m4_ifvaln([$5], [else $5])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BDEPS_FETCH],
|
||||
[
|
||||
# $1 is for example mymodule
|
||||
# $2 is for example libs/general/libmymod_1_2_3.zip
|
||||
# $3 is for example ftp://mybuilddeps.myserver.com/builddeps
|
||||
# $4 is for example /localhome/builddeps
|
||||
# $5 is the name of the variable into which we store the depdir, eg MYMOD
|
||||
# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
|
||||
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
|
||||
filename=`basename $2`
|
||||
filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
|
||||
filebase=${filename%%.*}
|
||||
extension=${filename#*.}
|
||||
installdir=$4/$filebase
|
||||
if test ! -f $installdir/$filename.unpacked; then
|
||||
AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
|
||||
if test ! -d $installdir; then
|
||||
mkdir -p $installdir
|
||||
fi
|
||||
if test ! -d $installdir; then
|
||||
AC_MSG_ERROR([Could not create directory $installdir])
|
||||
fi
|
||||
tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
|
||||
touch $tmpfile
|
||||
if test ! -f $tmpfile; then
|
||||
AC_MSG_ERROR([Could not create files in directory $installdir])
|
||||
fi
|
||||
BDEPS_FTPGET([$3/$2] , [$tmpfile])
|
||||
mv $tmpfile $installdir/$filename
|
||||
if test ! -s $installdir/$filename; then
|
||||
AC_MSG_ERROR([Could not download $3/$2])
|
||||
fi
|
||||
case "$extension" in
|
||||
zip) echo "Unzipping $installdir/$filename..."
|
||||
(cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
|
||||
;;
|
||||
tar.gz) echo "Untaring $installdir/$filename..."
|
||||
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
|
||||
;;
|
||||
tgz) echo "Untaring $installdir/$filename..."
|
||||
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
|
||||
;;
|
||||
*) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test -f $installdir/$filename.unpacked; then
|
||||
$5=$installdir
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
|
||||
[
|
||||
AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
|
||||
[use this configuration file for the builddeps])])
|
||||
|
||||
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
|
||||
[download and use build dependencies from this server url, e.g. --with-builddeps-server=ftp://example.com/dir])])
|
||||
|
||||
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
|
||||
[store downloaded build dependencies here @<:@d/localhome/builddeps@:>@])],
|
||||
[],
|
||||
[with_builddeps_dir=/localhome/builddeps])
|
||||
|
||||
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
|
||||
[chgrp the downloaded build dependencies to this group])])
|
||||
|
||||
AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
|
||||
[list all build dependencies known to the configure script])],
|
||||
[LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
|
||||
|
||||
if test "x$LIST_BUILDDEPS" = xyes; then
|
||||
echo
|
||||
echo List of build dependencies known to the configure script,
|
||||
echo that can be used in builddeps.conf files:
|
||||
cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODUL[E]\( | cut -f 2 -d ',' | tr -d ' ' | sort
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
])
|
||||
28
common/autoconf/closed.version.numbers
Normal file
28
common/autoconf/closed.version.numbers
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
LAUNCHER_NAME=java
|
||||
PRODUCT_NAME="Java(TM)"
|
||||
PRODUCT_SUFFIX="SE Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME="Platform SE"
|
||||
COMPANY_NAME="Oracle Corporation"
|
||||
49
common/autoconf/config.h.in
Normal file
49
common/autoconf/config.h.in
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#define PACKAGE_NAME "openjdk"
|
||||
#define PACKAGE_TARNAME "openjdk"
|
||||
#define PACKAGE_VERSION "version-0.1"
|
||||
#define PACKAGE_STRING "openjdk version-0.1"
|
||||
#define PACKAGE_BUGREPORT "build-infra-dev@openjdk.java.net"
|
||||
#define PACKAGE_URL ""
|
||||
#define STDC_HEADERS
|
||||
#define HAVE_SYS_TYPES_H
|
||||
#define HAVE_SYS_STAT_H
|
||||
#define HAVE_STDLIB_H
|
||||
#define HAVE_STRING_H
|
||||
#define HAVE_MEMORY_H
|
||||
#define HAVE_STRINGS_H
|
||||
#define HAVE_INTTYPES_H
|
||||
#define HAVE_STDINT_H
|
||||
#define HAVE_UNISTD_H
|
||||
#define SIZEOF_INT_P 8
|
||||
#define HAVE_CUPS_CUPS_H
|
||||
#define HAVE_CUPS_PPD_H
|
||||
#define HAVE_LIBJPEG
|
||||
#define HAVE_LIBGIF
|
||||
#define HAVE_LIBZ
|
||||
#define HAVE_LIBM
|
||||
#define HAVE_ALTZONE
|
||||
121
common/autoconf/configure
vendored
Normal file
121
common/autoconf/configure
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/bin/sh
|
||||
|
||||
CONFIGURE_COMMAND_LINE="$@"
|
||||
conf_script_dir=`dirname $0`
|
||||
conf_closed_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
|
||||
|
||||
###
|
||||
### Test that the generated configure is up-to-date
|
||||
###
|
||||
|
||||
# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does.
|
||||
TEST=`which test`
|
||||
|
||||
print_error_not_up_to_date() {
|
||||
echo "Error: The configure source files is newer than the generated files."
|
||||
echo "Please run 'sh autogen.sh' to update the generated files."
|
||||
}
|
||||
|
||||
for file in configure.ac *.m4 ; do
|
||||
if $TEST $file -nt generated-configure.sh; then
|
||||
print_error_not_up_to_date
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
|
||||
# If closed source configure is available, make sure it is up-to-date as well.
|
||||
for file in configure.ac *.m4 $conf_closed_script_dir/*.m4; do
|
||||
if $TEST $file -nt $conf_closed_script_dir/generated-configure.sh; then
|
||||
print_error_not_up_to_date
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Test if open configure is newer than closed configure, if so, closed needs to
|
||||
# be regenerated.
|
||||
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh | cut -d" " -f 3`
|
||||
conf_closed_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_closed_script_dir/generated-configure.sh | cut -d" " -f 3`
|
||||
if $TEST $conf_open_configure_timestamp -gt $conf_closed_configure_timestamp; then
|
||||
print_error_not_up_to_date
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
###
|
||||
### Process command-line arguments
|
||||
###
|
||||
conf_processed_arguments=
|
||||
conf_openjdk_target=
|
||||
conf_extra_cflags=
|
||||
conf_extra_cxxflags=
|
||||
|
||||
for conf_option
|
||||
do
|
||||
case $conf_option in
|
||||
--openjdk-target=*)
|
||||
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
--with-extra-cflags=*)
|
||||
conf_extra_cflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
--with-extra-cxxflags=*)
|
||||
conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
*)
|
||||
conf_processed_arguments="$conf_processed_arguments $conf_option" ;;
|
||||
esac
|
||||
|
||||
case $conf_option in
|
||||
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if $TEST "x$conf_legacy_crosscompile" != "x"; then
|
||||
if $TEST "x$conf_openjdk_target" != "x"; then
|
||||
echo "Error: Specifying --openjdk-target together with autoconf"
|
||||
echo "legacy cross-compilation flags is not supported."
|
||||
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
|
||||
echo "The recommended use is just --openjdk-target."
|
||||
exit 1
|
||||
else
|
||||
echo "Warning: You are using legacy autoconf cross-compilation flags."
|
||||
echo "It is recommended that you use --openjdk-target instead."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
|
||||
if $TEST "x$conf_openjdk_target" != "x"; then
|
||||
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
|
||||
conf_processed_arguments="--build=$conf_build_platform --host=$conf_openjdk_target --target=$conf_openjdk_target $conf_processed_arguments"
|
||||
fi
|
||||
|
||||
# Make configure exit with error on invalid options as default.
|
||||
# Can be overridden by --disable-option-checking, since we prepend our argument
|
||||
# and later options override earlier.
|
||||
conf_processed_arguments="--enable-option-checking=fatal $conf_processed_arguments"
|
||||
|
||||
###
|
||||
### Call the configure script
|
||||
###
|
||||
if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
|
||||
# Closed source configure available; run that instead
|
||||
. $conf_closed_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
|
||||
else
|
||||
. $conf_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
|
||||
fi
|
||||
|
||||
###
|
||||
### Post-processing
|
||||
###
|
||||
|
||||
# Move the log file to the output root, if this was successfully created
|
||||
if $TEST -d "$OUTPUT_ROOT"; then
|
||||
mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
|
||||
fi
|
||||
226
common/autoconf/configure.ac
Normal file
226
common/autoconf/configure.ac
Normal file
@@ -0,0 +1,226 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Includes and boilerplate
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
AC_PREREQ([2.61])
|
||||
AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net)
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
||||
# Include these first...
|
||||
m4_include([basics.m4])
|
||||
m4_include([builddeps.m4])
|
||||
# ... then the rest
|
||||
m4_include([boot-jdk.m4])
|
||||
m4_include([build-performance.m4])
|
||||
m4_include([help.m4])
|
||||
m4_include([jdk-options.m4])
|
||||
m4_include([libraries.m4])
|
||||
m4_include([platform.m4])
|
||||
m4_include([source-dirs.m4])
|
||||
m4_include([toolchain.m4])
|
||||
|
||||
# This line needs to be here, verbatim, after all includes.
|
||||
# It is replaced with closed functionality when building
|
||||
# closed sources.
|
||||
AC_DEFUN_ONCE([CLOSED_HOOK])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Initialization
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Basic initialization that must happen first of all
|
||||
BASIC_INIT
|
||||
BASIC_SETUP_PATHS
|
||||
BASIC_SETUP_LOGGING
|
||||
|
||||
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
|
||||
HELP_SETUP_DEPENDENCY_HELP
|
||||
|
||||
# Setup simple tools, that do not need have cross compilation support.
|
||||
# Without these, we can't properly run the rest of the configure script.
|
||||
BASIC_SETUP_TOOLS
|
||||
|
||||
# Setup builddeps, for automatic downloading of tools we need.
|
||||
# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
|
||||
# boot-jdk setup, but we need to have basic tools setup first.
|
||||
BDEPS_CONFIGURE_BUILDDEPS
|
||||
BDEPS_SCAN_FOR_BUILDDEPS
|
||||
|
||||
# Check if pkg-config is available.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Determine OpenJDK build and target platforms.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
|
||||
|
||||
# With knowledge of the build platform, setup more basic things.
|
||||
BASIC_SETUP_PATH_SEP
|
||||
BASIC_SETUP_SEARCHPATH
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Determine OpenJDK variants, options and version numbers.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JDK_VARIANT
|
||||
JDKOPT_SETUP_JVM_VARIANTS
|
||||
JDKOPT_SETUP_DEBUG_LEVEL
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
JDKOPT_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
# To properly create a configuration name, we need to have the OpenJDK target
|
||||
# and options (variants and debug level) parsed.
|
||||
BASIC_SETUP_OUTPUT_DIR
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup BootJDK, used to bootstrap the build.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
BOOTJDK_SETUP_BOOT_JDK
|
||||
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Configure the sources to use. We can add or override individual directories.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
SRCDIRS_SETUP_TOPDIRS
|
||||
SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS
|
||||
SRCDIRS_SETUP_OUTPUT_DIRS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the toolchain (compilers etc), i.e. the tools that need to be
|
||||
# cross-compilation aware.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
# Locate the actual tools
|
||||
TOOLCHAIN_SETUP_PATHS
|
||||
|
||||
# FIXME: Currently we must test this after paths but before flags. Fix!
|
||||
|
||||
# And we can test some aspects on the target using configure macros.
|
||||
PLATFORM_TEST_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
|
||||
# After we have toolchain, we can compile the uncygdrive helper
|
||||
BASIC_COMPILE_UNCYGDRIVE
|
||||
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check dependencies for external and internal libraries.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
LIB_SETUP_INIT
|
||||
LIB_SETUP_X11
|
||||
LIB_SETUP_CUPS
|
||||
LIB_SETUP_FREETYPE
|
||||
LIB_SETUP_ALSA
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_STATIC_LINK_LIBSTDCPP
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# We need to do some final tweaking, when everything else is done.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
JDKOPT_SETUP_BUILD_TWEAKS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Configure parts of the build that only affect the build performance,
|
||||
# not the result.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
BPERF_SETUP_BUILD_CORES
|
||||
BPERF_SETUP_BUILD_MEMORY
|
||||
|
||||
# Setup smart javac (after cores and memory have been setup)
|
||||
BPERF_SETUP_SMART_JAVAC
|
||||
|
||||
# Can the C/C++ compiler use precompiled headers?
|
||||
BPERF_SETUP_PRECOMPILED_HEADERS
|
||||
|
||||
# Setup use of ccache, if available
|
||||
BPERF_SETUP_CCACHE
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# And now the finish...
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Check for some common pitfalls
|
||||
BASIC_TEST_USABILITY_ISSUES
|
||||
|
||||
# At the end, call the closed hook. (Dummy macro if no closed sources available)
|
||||
CLOSED_HOOK
|
||||
|
||||
# We're messing a bit with internal autoconf variables to put the config.status
|
||||
# in the output directory instead of the current directory.
|
||||
CONFIG_STATUS="$OUTPUT_ROOT/config.status"
|
||||
# Create the actual output files. Now the main work of configure is done.
|
||||
AC_OUTPUT
|
||||
|
||||
# Finally output some useful information to the user
|
||||
HELP_PRINT_SUMMARY_AND_WARNINGS
|
||||
18054
common/autoconf/generated-configure.sh
Normal file
18054
common/autoconf/generated-configure.sh
Normal file
File diff suppressed because it is too large
Load Diff
197
common/autoconf/help.m4
Normal file
197
common/autoconf/help.m4
Normal file
@@ -0,0 +1,197 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
|
||||
[
|
||||
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
|
||||
])
|
||||
|
||||
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
[
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
# $1 is the help tag: freetyp2, cups, pulse, alsa etc
|
||||
MISSING_DEPENDENCY=$1
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
case $PKGHANDLER in
|
||||
apt-get)
|
||||
apt_help $MISSING_DEPENDENCY ;;
|
||||
yum)
|
||||
yum_help $MISSING_DEPENDENCY ;;
|
||||
port)
|
||||
port_help $MISSING_DEPENDENCY ;;
|
||||
pkgutil)
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
])
|
||||
|
||||
apt_help() {
|
||||
case $1 in
|
||||
devkit)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
|
||||
openjdk)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
|
||||
alsa)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
|
||||
freetype2)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
|
||||
x11)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
yum_help() {
|
||||
case $1 in
|
||||
devkit)
|
||||
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
|
||||
openjdk)
|
||||
PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
|
||||
alsa)
|
||||
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
|
||||
freetype2)
|
||||
PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
|
||||
pulse)
|
||||
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
|
||||
x11)
|
||||
PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
port_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
pkgutil_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
pkgadd_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
[
|
||||
# Finally output some useful information to the user
|
||||
|
||||
if test "x$CCACHE_FOUND" != x; then
|
||||
if test "x$HAS_GOOD_CCACHE" = x; then
|
||||
CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
|
||||
CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
|
||||
else
|
||||
CCACHE_STATUS="installed and in use"
|
||||
fi
|
||||
else
|
||||
if test "x$GCC" = xyes; then
|
||||
CCACHE_STATUS="not installed (consider installing)"
|
||||
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
|
||||
else
|
||||
CCACHE_STATUS="not available for your system"
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
printf "A new configuration has been successfully created in\n"
|
||||
printf "$OUTPUT_ROOT\n"
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
else
|
||||
printf "using default settings.\n"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "Configuration summary:\n"
|
||||
printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* JDK variant: $JDK_VARIANT\n"
|
||||
printf "* JVM variants: $with_jvm_variants\n"
|
||||
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
|
||||
printf "* Boot JDK: $BOOT_JDK\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Cores to use: $NUM_CORES\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
printf "\n"
|
||||
|
||||
if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
|
||||
printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
|
||||
printf "$CCACHE_HELP_MSG\n"
|
||||
HELP_MSG_MISSING_DEPENDENCY([ccache])
|
||||
printf "$HELP_MSG\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
|
||||
printf "NOTE: You have requested to build more than one version of the JVM, which\n"
|
||||
printf "will result in longer build times.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$FOUND_ALT_VARIABLES" != "x"; then
|
||||
printf "WARNING: You have old-style ALT_ environment variables set.\n"
|
||||
printf "These are not respected, and will be ignored. It is recommended\n"
|
||||
printf "that you clean your environment. The following variables are set:\n"
|
||||
printf "$FOUND_ALT_VARIABLES\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
|
||||
printf "WARNING: Your build output directory is not on a local disk.\n"
|
||||
printf "This will severely degrade build performance!\n"
|
||||
printf "It is recommended that you create an output directory on a local disk,\n"
|
||||
printf "and run the configure script again from that directory.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" = "xyes"; then
|
||||
printf "WARNING: The result of this configuration has overridden an older\n"
|
||||
printf "configuration. You *should* run 'make clean' to make sure you get a\n"
|
||||
printf "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
])
|
||||
551
common/autoconf/jdk-options.m4
Normal file
551
common/autoconf/jdk-options.m4
Normal file
@@ -0,0 +1,551 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Check which variant of the JDK that we want to build.
|
||||
# Currently we have:
|
||||
# normal: standard edition
|
||||
# embedded: cut down to a smaller footprint
|
||||
#
|
||||
# Effectively the JDK variant gives a name to a specific set of
|
||||
# modules to compile into the JDK. In the future, these modules
|
||||
# might even be Jigsaw modules.
|
||||
#
|
||||
AC_MSG_CHECKING([which variant of the JDK to build])
|
||||
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
|
||||
[JDK variant to build (normal, embedded) @<:@normal@:>@])])
|
||||
|
||||
if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
|
||||
JAVASE_EMBEDDED=""
|
||||
MINIMIZE_RAM_USAGE=""
|
||||
JDK_VARIANT="normal"
|
||||
elif test "x$with_jdk_variant" = xembedded; then
|
||||
JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
|
||||
MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
|
||||
JDK_VARIANT="embedded"
|
||||
else
|
||||
AC_MSG_ERROR([The available JDK variants are: normal, embedded])
|
||||
fi
|
||||
|
||||
AC_SUBST(JAVASE_EMBEDDED)
|
||||
AC_SUBST(MINIMIZE_RAM_USAGE)
|
||||
AC_SUBST(JDK_VARIANT)
|
||||
|
||||
AC_MSG_RESULT([$JDK_VARIANT])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check which variants of the JVM that we want to build.
|
||||
# Currently we have:
|
||||
# server: normal interpreter and a tiered C1/C2 compiler
|
||||
# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
|
||||
# kernel: kernel footprint JVM that passes the TCK without major performance problems,
|
||||
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
|
||||
# zero: no machine code interpreter, no compiler
|
||||
# zeroshark: zero interpreter and shark/llvm compiler backend
|
||||
AC_MSG_CHECKING([which variants of the JVM that should be built])
|
||||
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
|
||||
[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
|
||||
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
if test "x$JDK_VARIANT" = xembedded; then
|
||||
with_jvm_variants="client"
|
||||
else
|
||||
with_jvm_variants="server"
|
||||
fi
|
||||
fi
|
||||
|
||||
JVM_VARIANTS=",$with_jvm_variants,"
|
||||
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
|
||||
|
||||
if test "x$TEST_VARIANTS" != "x,"; then
|
||||
AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
|
||||
fi
|
||||
AC_MSG_RESULT([$with_jvm_variants])
|
||||
|
||||
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
|
||||
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
|
||||
JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
|
||||
|
||||
if test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
if test "x$JVM_VARIANT_KERNEL" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Replace the commas with AND for use in the build directory name.
|
||||
ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
|
||||
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
|
||||
if test "x$COUNT_VARIANTS" != "x,1"; then
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=yes
|
||||
else
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=no
|
||||
fi
|
||||
|
||||
AC_SUBST(JVM_VARIANTS)
|
||||
AC_SUBST(JVM_VARIANT_SERVER)
|
||||
AC_SUBST(JVM_VARIANT_CLIENT)
|
||||
AC_SUBST(JVM_VARIANT_KERNEL)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Set the debug level
|
||||
# release: no debug information, all optimizations, no asserts.
|
||||
# fastdebug: debug information (-g), all optimizations, all asserts
|
||||
# slowdebug: debug information (-g), no optimizations, all asserts
|
||||
#
|
||||
DEBUG_LEVEL="release"
|
||||
AC_MSG_CHECKING([which debug level to use])
|
||||
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
|
||||
[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
|
||||
[
|
||||
ENABLE_DEBUG="${enableval}"
|
||||
DEBUG_LEVEL="fastdebug"
|
||||
], [ENABLE_DEBUG="no"])
|
||||
|
||||
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
|
||||
[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
|
||||
[
|
||||
DEBUG_LEVEL="${withval}"
|
||||
if test "x$ENABLE_DEBUG" = xyes; then
|
||||
AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT([$DEBUG_LEVEL])
|
||||
|
||||
if test "x$DEBUG_LEVEL" != xrelease && \
|
||||
test "x$DEBUG_LEVEL" != xfastdebug && \
|
||||
test "x$DEBUG_LEVEL" != xslowdebug; then
|
||||
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
|
||||
fi
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup legacy vars/targets and new vars to deal with different debug levels.
|
||||
#
|
||||
|
||||
case $DEBUG_LEVEL in
|
||||
release )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
BUILD_VARIANT_RELEASE=""
|
||||
HOTSPOT_DEBUG_LEVEL="product"
|
||||
HOTSPOT_EXPORT="product"
|
||||
;;
|
||||
fastdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="true"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-fastdebug"
|
||||
HOTSPOT_DEBUG_LEVEL="fastdebug"
|
||||
HOTSPOT_EXPORT="fastdebug"
|
||||
;;
|
||||
slowdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-debug"
|
||||
HOTSPOT_DEBUG_LEVEL="jvmg"
|
||||
HOTSPOT_EXPORT="debug"
|
||||
;;
|
||||
esac
|
||||
|
||||
#####
|
||||
# Generate the legacy makefile targets for hotspot.
|
||||
# The hotspot api for selecting the build artifacts, really, needs to be improved.
|
||||
#
|
||||
HOTSPOT_TARGET=""
|
||||
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_KERNEL" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
|
||||
fi
|
||||
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
|
||||
|
||||
#####
|
||||
|
||||
AC_SUBST(DEBUG_LEVEL)
|
||||
AC_SUBST(VARIANT)
|
||||
AC_SUBST(FASTDEBUG)
|
||||
AC_SUBST(DEBUG_CLASSFILES)
|
||||
AC_SUBST(BUILD_VARIANT_RELEASE)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we build only OpenJDK even if closed sources are present?
|
||||
#
|
||||
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
|
||||
[build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
|
||||
|
||||
if test "x$enable_openjdk_only" = "xyes"; then
|
||||
OPENJDK=true
|
||||
elif test "x$enable_openjdk_only" = "xno"; then
|
||||
OPENJDK=false
|
||||
elif test -d "$SRC_ROOT/jdk/src/closed"; then
|
||||
OPENJDK=false
|
||||
else
|
||||
OPENJDK=true
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK" = "xtrue"; then
|
||||
SET_OPENJDK=OPENJDK=true
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_OPENJDK)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# JIGSAW or not. The JIGSAW variable is used during the intermediate
|
||||
# stage when we are building both the old style JDK and the new style modularized JDK.
|
||||
# When the modularized JDK is finalized, this option will go away.
|
||||
#
|
||||
AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
|
||||
[build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
|
||||
|
||||
if test "x$enable_jigsaw" = "xyes"; then
|
||||
JIGSAW=true
|
||||
else
|
||||
JIGSAW=false
|
||||
fi
|
||||
AC_SUBST(JIGSAW)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we build a JDK/JVM with headful support (ie a graphical ui)?
|
||||
# We always build headless support.
|
||||
#
|
||||
AC_MSG_CHECKING([headful support])
|
||||
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
|
||||
[build headful support (graphical UI support) @<:@enabled@:>@])],
|
||||
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
|
||||
|
||||
SUPPORT_HEADLESS=yes
|
||||
BUILD_HEADLESS="BUILD_HEADLESS:=true"
|
||||
|
||||
if test "x$SUPPORT_HEADFUL" = xyes; then
|
||||
# We are building both headful and headless.
|
||||
BUILD_HEADLESS_ONLY=""
|
||||
headful_msg="inlude support for both headful and headless"
|
||||
fi
|
||||
|
||||
if test "x$SUPPORT_HEADFUL" = xno; then
|
||||
# Thus we are building headless only.
|
||||
BUILD_HEADLESS="BUILD_HEADLESS:=true"
|
||||
BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
|
||||
headful_msg="headless only"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$headful_msg])
|
||||
|
||||
AC_SUBST(SUPPORT_HEADLESS)
|
||||
AC_SUBST(SUPPORT_HEADFUL)
|
||||
AC_SUBST(BUILD_HEADLESS)
|
||||
AC_SUBST(BUILD_HEADLESS_ONLY)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we run the painfully slow javadoc tool?
|
||||
#
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
|
||||
[enable generation of Javadoc documentation @<:@disabled@:>@])],
|
||||
[ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
|
||||
AC_MSG_RESULT([$ENABLE_DOCS])
|
||||
AC_SUBST(ENABLE_DOCS)
|
||||
GENERATE_DOCS=false
|
||||
if test "x$ENABLE_DOCS" = xyes; then
|
||||
GENERATE_DOCS=true
|
||||
fi
|
||||
AC_SUBST(GENERATE_DOCS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we compile nimbus swing L&F? We can probably remove this option
|
||||
# since nimbus is officially part of javax now.
|
||||
#
|
||||
AC_MSG_CHECKING([whether to build nimbus L&F])
|
||||
AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
|
||||
[disable Nimbus L&F @<:@enabled@:>@])],
|
||||
[ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
|
||||
AC_MSG_RESULT([$ENABLE_NIMBUS])
|
||||
DISABLE_NIMBUS=
|
||||
if test "x$ENABLE_NIMBUS" = xno; then
|
||||
DISABLE_NIMBUS=true
|
||||
fi
|
||||
AC_SUBST(DISABLE_NIMBUS)
|
||||
|
||||
# Control wether Hotspot runs Queens test after build.
|
||||
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
|
||||
[enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
|
||||
[enable_hotspot_test_in_build=no])
|
||||
if test "x$enable_hotspot_test_in_build" = "xyes"; then
|
||||
TEST_IN_BUILD=true
|
||||
else
|
||||
TEST_IN_BUILD=false
|
||||
fi
|
||||
AC_SUBST(TEST_IN_BUILD)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Choose cacerts source file
|
||||
#
|
||||
AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
|
||||
[specify alternative cacerts file])])
|
||||
if test "x$with_cacerts_file" != x; then
|
||||
CACERTS_FILE=$with_cacerts_file
|
||||
else
|
||||
if test "x$OPENJDK" = "xtrue"; then
|
||||
CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
|
||||
else
|
||||
CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CACERTS_FILE)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
#
|
||||
COMPRESS_JARS=false
|
||||
|
||||
# default for embedded is yes...
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
COMPRESS_JARS=true
|
||||
fi
|
||||
AC_SUBST(COMPRESS_JARS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we compile JFR
|
||||
# default no, except for on closed-jdk and !embedded
|
||||
#
|
||||
ENABLE_JFR=no
|
||||
|
||||
# Is the JFR source present
|
||||
|
||||
#
|
||||
# For closed && !embedded default is yes if the source is present
|
||||
#
|
||||
if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
|
||||
ENABLE_JFR=yes
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to build jfr])
|
||||
AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
|
||||
[enable jfr (default is no)])]
|
||||
[ENABLE_JFR="${enableval}"])
|
||||
AC_MSG_RESULT([${ENABLE_JFR}])
|
||||
|
||||
if test "x$ENABLE_JFR" = "xyes"; then
|
||||
ENABLE_JFR=true
|
||||
elif test "x$ENABLE_JFR" = "xno"; then
|
||||
ENABLE_JFR=false
|
||||
else
|
||||
AC_MSG_ERROR([Invalid argument to --enable-jfr])
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_JFR)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
|
||||
[
|
||||
# Source the version numbers
|
||||
. $AUTOCONF_DIR/version.numbers
|
||||
if test "x$OPENJDK" = "xfalse"; then
|
||||
. $AUTOCONF_DIR/closed.version.numbers
|
||||
fi
|
||||
# Now set the JDK version, milestone, build number etc.
|
||||
AC_SUBST(JDK_MAJOR_VERSION)
|
||||
AC_SUBST(JDK_MINOR_VERSION)
|
||||
AC_SUBST(JDK_MICRO_VERSION)
|
||||
AC_SUBST(JDK_UPDATE_VERSION)
|
||||
AC_SUBST(JDK_BUILD_NUMBER)
|
||||
AC_SUBST(MILESTONE)
|
||||
AC_SUBST(LAUNCHER_NAME)
|
||||
AC_SUBST(PRODUCT_NAME)
|
||||
AC_SUBST(PRODUCT_SUFFIX)
|
||||
AC_SUBST(JDK_RC_PLATFORM_NAME)
|
||||
AC_SUBST(COMPANY_NAME)
|
||||
|
||||
COPYRIGHT_YEAR=`date +'%Y'`
|
||||
AC_SUBST(COPYRIGHT_YEAR)
|
||||
|
||||
RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
|
||||
AC_SUBST(RUNTIME_NAME)
|
||||
|
||||
if test "x$JDK_UPDATE_VERSION" != x; then
|
||||
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
|
||||
else
|
||||
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
|
||||
fi
|
||||
AC_SUBST(JDK_VERSION)
|
||||
|
||||
if test "x$MILESTONE" != x; then
|
||||
RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
|
||||
else
|
||||
RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
|
||||
fi
|
||||
AC_SUBST(RELEASE)
|
||||
|
||||
if test "x$JDK_BUILD_NUMBER" != x; then
|
||||
FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
|
||||
else
|
||||
JDK_BUILD_NUMBER=b00
|
||||
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
|
||||
# Avoid [:alnum:] since it depends on the locale.
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
|
||||
FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
|
||||
fi
|
||||
AC_SUBST(FULL_VERSION)
|
||||
COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
|
||||
AC_SUBST(COOKED_BUILD_NUMBER)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
|
||||
[
|
||||
HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
|
||||
AC_SUBST(HOTSPOT_MAKE_ARGS)
|
||||
|
||||
# The name of the Service Agent jar.
|
||||
SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
|
||||
fi
|
||||
AC_SUBST(SALIB_NAME)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
[
|
||||
#
|
||||
# ENABLE_DEBUG_SYMBOLS
|
||||
# This must be done after the toolchain is setup, since we're looking at objcopy.
|
||||
#
|
||||
ENABLE_DEBUG_SYMBOLS=default
|
||||
|
||||
# default on macosx is no...
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
|
||||
# default for embedded is no...
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([debug-symbols],
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])],
|
||||
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([if we should generate debug symbols])
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
|
||||
# explicit enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
|
||||
# Default is on if objcopy is found, otherwise off
|
||||
if test "x$OBJCOPY" != x; then
|
||||
ENABLE_DEBUG_SYMBOLS=yes
|
||||
else
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
|
||||
|
||||
#
|
||||
# ZIP_DEBUGINFO_FILES
|
||||
#
|
||||
ZIP_DEBUGINFO_FILES=yes
|
||||
|
||||
AC_ARG_ENABLE([zip-debug-info],
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])],
|
||||
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([if we should zip debug-info files])
|
||||
AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
|
||||
|
||||
# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
|
||||
# use that...
|
||||
if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
|
||||
ZIP_DEBUGINFO_FILES=1
|
||||
else
|
||||
ZIP_DEBUGINFO_FILES=0
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
|
||||
AC_SUBST(ZIP_DEBUGINFO_FILES)
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
642
common/autoconf/libraries.m4
Normal file
642
common/autoconf/libraries.m4
Normal file
@@ -0,0 +1,642 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_INIT],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# OS specific settings that we never will need to probe.
|
||||
#
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
AC_MSG_CHECKING([what is not needed on Linux?])
|
||||
PULSE_NOT_NEEDED=yes
|
||||
AC_MSG_RESULT([pulse])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
AC_MSG_CHECKING([what is not needed on Solaris?])
|
||||
ALSA_NOT_NEEDED=yes
|
||||
PULSE_NOT_NEEDED=yes
|
||||
AC_MSG_RESULT([alsa pulse])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([what is not needed on Windows?])
|
||||
CUPS_NOT_NEEDED=yes
|
||||
ALSA_NOT_NEEDED=yes
|
||||
PULSE_NOT_NEEDED=yes
|
||||
X11_NOT_NEEDED=yes
|
||||
AC_MSG_RESULT([alsa cups pulse x11])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
AC_MSG_CHECKING([what is not needed on MacOSX?])
|
||||
ALSA_NOT_NEEDED=yes
|
||||
PULSE_NOT_NEEDED=yes
|
||||
X11_NOT_NEEDED=yes
|
||||
FREETYPE2_NOT_NEEDED=yes
|
||||
# If the java runtime framework is disabled, then we need X11.
|
||||
# This will be adjusted below.
|
||||
AC_MSG_RESULT([alsa pulse x11])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
AC_MSG_CHECKING([what is not needed on bsd?])
|
||||
ALSA_NOT_NEEDED=yes
|
||||
AC_MSG_RESULT([alsa])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK" = "xfalse"; then
|
||||
FREETYPE2_NOT_NEEDED=yes
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
|
||||
# that uses this API.
|
||||
#
|
||||
AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
|
||||
[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
|
||||
[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
|
||||
|
||||
USE_MACOSX_RUNTIME_SUPPORT=no
|
||||
AC_MSG_CHECKING([for explicit Java runtime support in the OS])
|
||||
if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
|
||||
if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
|
||||
MACOSX_RUNTIME_SUPPORT=yes
|
||||
USE_MACOSX_RUNTIME_SUPPORT=yes
|
||||
AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
|
||||
else
|
||||
AC_MSG_RESULT([yes, but explicitly disabled.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
|
||||
AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
|
||||
X11_NOT_NEEDED=
|
||||
FREETYPE2_NOT_NEEDED=
|
||||
AC_MSG_RESULT([alsa pulse])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for X Windows
|
||||
#
|
||||
|
||||
# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
|
||||
# Make a simple check for the libraries at the sysroot, and setup --x-includes and
|
||||
# --x-libraries for the sysroot, if that seems to be correct.
|
||||
if test "x$SYS_ROOT" != "x/"; then
|
||||
if test "x$x_includes" = xNONE; then
|
||||
if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
|
||||
x_includes="$SYS_ROOT/usr/X11R6/include"
|
||||
fi
|
||||
fi
|
||||
if test "x$x_libraries" = xNONE; then
|
||||
if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
|
||||
x_libraries="$SYS_ROOT/usr/X11R6/lib"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now let autoconf do it's magic
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([x11])
|
||||
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
|
||||
fi
|
||||
|
||||
# Some of the old makefiles require a setting of OPENWIN_HOME
|
||||
# Since the X11R6 directory has disappeared on later Linuxes,
|
||||
# we need to probe for it.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test -d "$SYS_ROOT/usr/X11R6"; then
|
||||
OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
|
||||
fi
|
||||
if test -d "$SYS_ROOT/usr/include/X11"; then
|
||||
OPENWIN_HOME="$SYS_ROOT/usr"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
OPENWIN_HOME="/usr/openwin"
|
||||
fi
|
||||
AC_SUBST(OPENWIN_HOME)
|
||||
|
||||
|
||||
#
|
||||
# Weird Sol10 something check...TODO change to try compile
|
||||
#
|
||||
if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
|
||||
if test "`uname -r`" = "5.10"; then
|
||||
if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
|
||||
X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_LANG_PUSH(C)
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
|
||||
[X11_A_OK=yes],
|
||||
[X11_A_OK=no])
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
|
||||
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([x11])
|
||||
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG])
|
||||
fi
|
||||
|
||||
AC_SUBST(X_CFLAGS)
|
||||
AC_SUBST(X_LIBS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_CUPS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# The common unix printing system cups is used to print from java.
|
||||
#
|
||||
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
|
||||
[specify prefix directory for the cups package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
|
||||
[specify directory for the cups include files])])
|
||||
AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
|
||||
[specify directory for the cups library])])
|
||||
|
||||
if test "x$CUPS_NOT_NEEDED" = xyes; then
|
||||
if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
|
||||
AC_MSG_WARN([cups not used, so --with-cups is ignored])
|
||||
fi
|
||||
CUPS_CFLAGS=
|
||||
CUPS_LIBS=
|
||||
else
|
||||
CUPS_FOUND=no
|
||||
|
||||
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
|
||||
fi
|
||||
|
||||
if test "x${with_cups}" != x; then
|
||||
CUPS_LIBS="-L${with_cups}/lib -lcups"
|
||||
CUPS_CFLAGS="-I${with_cups}/include"
|
||||
CUPS_FOUND=yes
|
||||
fi
|
||||
if test "x${with_cups_include}" != x; then
|
||||
CUPS_CFLAGS="-I${with_cups_include}"
|
||||
CUPS_FOUND=yes
|
||||
fi
|
||||
if test "x${with_cups_lib}" != x; then
|
||||
CUPS_LIBS="-L${with_cups_lib} -lcups"
|
||||
CUPS_FOUND=yes
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
# Are the cups headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
|
||||
[CUPS_FOUND=yes
|
||||
CUPS_CFLAGS=
|
||||
CUPS_LIBS="-lcups"
|
||||
DEFAULT_CUPS=yes])
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
# Getting nervous now? Lets poke around for standard Solaris third-party
|
||||
# package installation locations.
|
||||
AC_MSG_CHECKING([for cups headers and libs])
|
||||
if test -s /opt/sfw/cups/include/cups/cups.h; then
|
||||
# An SFW package seems to be installed!
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS="-I/opt/sfw/cups/include"
|
||||
CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
|
||||
elif test -s /opt/csw/include/cups/cups.h; then
|
||||
# A CSW package seems to be installed!
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS="-I/opt/csw/include"
|
||||
CUPS_LIBS="-L/opt/csw/lib -lcups"
|
||||
fi
|
||||
AC_MSG_RESULT([$CUPS_FOUND])
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([cups])
|
||||
AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_CFLAGS)
|
||||
AC_SUBST(CUPS_LIBS)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# The ubiquitous freetype2 library is used to render fonts.
|
||||
#
|
||||
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
|
||||
[specify prefix directory for the freetype2 package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
|
||||
# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
|
||||
USING_SYSTEM_FT_LIB=false
|
||||
|
||||
if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
|
||||
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
|
||||
AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
|
||||
fi
|
||||
FREETYPE2_CFLAGS=
|
||||
FREETYPE2_LIBS=
|
||||
FREETYPE2_LIB_PATH=
|
||||
else
|
||||
FREETYPE2_FOUND=no
|
||||
|
||||
if test "x$with_freetype" != x; then
|
||||
SPACESAFE(with_freetype,[the path to freetype])
|
||||
FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
|
||||
fi
|
||||
FREETYPE2_LIB_PATH="$with_freetype/lib"
|
||||
FREETYPE2_CFLAGS="-I$with_freetype/include"
|
||||
if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
|
||||
FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
|
||||
fi
|
||||
FREETYPE2_FOUND=yes
|
||||
if test "x$FREETYPE2_FOUND" = xyes; then
|
||||
# Verify that the directories exist
|
||||
if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
|
||||
AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
|
||||
fi
|
||||
# List the contents of the lib.
|
||||
FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
|
||||
if test "x$FREETYPELIB" = x; then
|
||||
AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
|
||||
fi
|
||||
# Check one h-file
|
||||
if ! test -s "$with_freetype/include/ft2build.h"; then
|
||||
AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
AC_MSG_CHECKING([for freetype in some standard locations])
|
||||
|
||||
if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
|
||||
DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
|
||||
DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
|
||||
fi
|
||||
if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
|
||||
DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
|
||||
DEFAULT_FREETYPE_LIBS="-lfreetype"
|
||||
fi
|
||||
|
||||
PREV_CXXCFLAGS="$CXXFLAGS"
|
||||
PREV_LDFLAGS="$LDFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
int main() { return 0; }
|
||||
]])],
|
||||
[
|
||||
# Yes, the default cflags and libs did the trick.
|
||||
FREETYPE2_FOUND=yes
|
||||
FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
|
||||
FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
|
||||
],
|
||||
[
|
||||
FREETYPE2_FOUND=no
|
||||
])
|
||||
CXXCFLAGS="$PREV_CXXFLAGS"
|
||||
LDFLAGS="$PREV_LDFLAGS"
|
||||
AC_MSG_RESULT([$FREETYPE2_FOUND])
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype2])
|
||||
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(USING_SYSTEM_FT_LIB)
|
||||
AC_SUBST(FREETYPE2_LIB_PATH)
|
||||
AC_SUBST(FREETYPE2_CFLAGS)
|
||||
AC_SUBST(FREETYPE2_LIBS)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for alsa headers and libraries. Used on Linux/GNU systems.
|
||||
#
|
||||
AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
|
||||
[specify prefix directory for the alsa package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
|
||||
[specify directory for the alsa include files])])
|
||||
AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
|
||||
[specify directory for the alsa library])])
|
||||
|
||||
if test "x$ALSA_NOT_NEEDED" = xyes; then
|
||||
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
|
||||
AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
|
||||
fi
|
||||
ALSA_CFLAGS=
|
||||
ALSA_LIBS=
|
||||
else
|
||||
ALSA_FOUND=no
|
||||
|
||||
if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
|
||||
fi
|
||||
|
||||
if test "x${with_alsa}" != x; then
|
||||
ALSA_LIBS="-L${with_alsa}/lib -lalsa"
|
||||
ALSA_CFLAGS="-I${with_alsa}/include"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x${with_alsa_include}" != x; then
|
||||
ALSA_CFLAGS="-I${with_alsa_include}"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x${with_alsa_lib}" != x; then
|
||||
ALSA_LIBS="-L${with_alsa_lib} -lalsa"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
AC_CHECK_HEADERS([alsa/asoundlib.h],
|
||||
[ALSA_FOUND=yes
|
||||
ALSA_CFLAGS=-Iignoreme
|
||||
ALSA_LIBS=-lasound
|
||||
DEFAULT_ALSA=yes],
|
||||
[ALSA_FOUND=no])
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([alsa])
|
||||
AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ALSA_CFLAGS)
|
||||
AC_SUBST(ALSA_LIBS)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the jpeg library
|
||||
#
|
||||
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
AC_CHECK_LIB(jpeg, main, [],
|
||||
[ USE_EXTERNAL_LIBJPEG=false
|
||||
AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
|
||||
])
|
||||
AC_SUBST(USE_EXTERNAL_LIBJPEG)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the gif library
|
||||
#
|
||||
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
AC_CHECK_LIB(gif, main, [],
|
||||
[ USE_EXTERNAL_LIBGIF=false
|
||||
AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
|
||||
])
|
||||
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for the zlib library
|
||||
#
|
||||
|
||||
AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
|
||||
[use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||
|
||||
AC_CHECK_LIB(z, compress,
|
||||
[ ZLIB_FOUND=yes ],
|
||||
[ ZLIB_FOUND=no ])
|
||||
|
||||
AC_MSG_CHECKING([for which zlib to use])
|
||||
|
||||
DEFAULT_ZLIB=bundled
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
#
|
||||
# On macosx default is system...on others default is
|
||||
#
|
||||
DEFAULT_ZLIB=system
|
||||
fi
|
||||
|
||||
if test "x${ZLIB_FOUND}" != "xyes"; then
|
||||
#
|
||||
# If we don't find any system...set default to bundled
|
||||
#
|
||||
DEFAULT_ZLIB=bundled
|
||||
fi
|
||||
|
||||
#
|
||||
# If user didn't specify, use DEFAULT_ZLIB
|
||||
#
|
||||
if test "x${with_zlib}" = "x"; then
|
||||
with_zlib=${DEFAULT_ZLIB}
|
||||
fi
|
||||
|
||||
if test "x${with_zlib}" = "xbundled"; then
|
||||
USE_EXTERNAL_LIBZ=false
|
||||
AC_MSG_RESULT([bundled])
|
||||
elif test "x${with_zlib}" = "xsystem"; then
|
||||
if test "x${ZLIB_FOUND}" = "xyes"; then
|
||||
USE_EXTERNAL_LIBZ=true
|
||||
AC_MSG_RESULT([system])
|
||||
else
|
||||
AC_MSG_RESULT([system not found])
|
||||
AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LIBZ)
|
||||
|
||||
###############################################################################
|
||||
LIBZIP_CAN_USE_MMAP=true
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
LIBZIP_CAN_USE_MMAP=false
|
||||
fi
|
||||
AC_SUBST(LIBZIP_CAN_USE_MMAP)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check if altzone exists in time.h
|
||||
#
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
|
||||
[has_altzone=yes],
|
||||
[has_altzone=no])
|
||||
if test "x$has_altzone" = xyes; then
|
||||
AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check the maths library
|
||||
#
|
||||
|
||||
AC_CHECK_LIB(m, cos, [],
|
||||
[
|
||||
AC_MSG_NOTICE([Maths library was not found])
|
||||
])
|
||||
AC_SUBST(LIBM)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for libdl.so
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_CHECK_LIB(dl,dlopen)
|
||||
LIBDL="$LIBS"
|
||||
AC_SUBST(LIBDL)
|
||||
LIBS="$save_LIBS"
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# statically link libstdc++ before C++ ABI is stablized on Linux unless
|
||||
# dynamic build is configured on command line.
|
||||
#
|
||||
AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
|
||||
[disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
|
||||
[
|
||||
enable_static_link_stdc__=yes
|
||||
])
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# Test if -lstdc++ works.
|
||||
AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
|
||||
AC_LANG_PUSH(C++)
|
||||
OLD_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -lstdc++"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
|
||||
[has_dynamic_libstdcxx=yes],
|
||||
[has_dynamic_libstdcxx=no])
|
||||
CXXFLAGS="$OLD_CXXFLAGS"
|
||||
AC_LANG_POP(C++)
|
||||
AC_MSG_RESULT([$has_dynamic_libstdcxx])
|
||||
|
||||
# Test if stdc++ can be linked statically.
|
||||
AC_MSG_CHECKING([if static link of stdc++ is possible])
|
||||
STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
|
||||
AC_LANG_PUSH(C++)
|
||||
OLD_LIBS="$LIBS"
|
||||
OLD_CXX="$CXX"
|
||||
LIBS="$STATIC_STDCXX_FLAGS"
|
||||
CXX="$CC"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
|
||||
[has_static_libstdcxx=yes],
|
||||
[has_static_libstdcxx=no])
|
||||
LIBS="$OLD_LIBS"
|
||||
CXX="$OLD_CXX"
|
||||
AC_LANG_POP(C++)
|
||||
AC_MSG_RESULT([$has_static_libstdcxx])
|
||||
|
||||
if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
|
||||
AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
|
||||
fi
|
||||
|
||||
if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
|
||||
AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
|
||||
enable_static_link_stdc__=no
|
||||
fi
|
||||
|
||||
if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
|
||||
enable_static_link_stdc__=yes
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([how to link with libstdc++])
|
||||
if test "x$enable_static_link_stdc__" = xyes; then
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
LDCXX="$CC"
|
||||
AC_MSG_RESULT([static])
|
||||
else
|
||||
LIBCXX="$LIBCXX -lstdc++"
|
||||
LDCXX="$CXX"
|
||||
AC_MSG_RESULT([dynamic])
|
||||
fi
|
||||
fi
|
||||
|
||||
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
|
||||
LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1"
|
||||
fi
|
||||
|
||||
# TODO better (platform agnostic) test
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
|
||||
LIBCXX="-lstdc++"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBCXX)
|
||||
|
||||
])
|
||||
498
common/autoconf/platform.m4
Normal file
498
common/autoconf/platform.m4
Normal file
@@ -0,0 +1,498 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS],
|
||||
[
|
||||
# Expects $host_os $host_cpu $build_os and $build_cpu
|
||||
# and $with_target_bits to have been setup!
|
||||
#
|
||||
# Translate the standard triplet(quadruplet) definition
|
||||
# of the target/build system into
|
||||
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
|
||||
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
|
||||
# OPENJDK_TARGET_OS_API=posix,winapi
|
||||
#
|
||||
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
|
||||
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
|
||||
# OPENJDK_TARGET_CPU_BITS=32,64
|
||||
# OPENJDK_TARGET_CPU_ENDIAN=big,little
|
||||
#
|
||||
# The same values are setup for BUILD_...
|
||||
#
|
||||
# And the legacy variables, for controlling the old makefiles.
|
||||
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
|
||||
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
|
||||
#
|
||||
# We also copy the autoconf trip/quadruplet
|
||||
# verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
|
||||
OPENJDK_TARGET_SYSTEM="$host"
|
||||
OPENJDK_BUILD_SYSTEM="$build"
|
||||
AC_SUBST(OPENJDK_TARGET_SYSTEM)
|
||||
AC_SUBST(OPENJDK_BUILD_SYSTEM)
|
||||
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_TARGET,$host_cpu)
|
||||
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_BUILD,$build_cpu)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xsolaris; then
|
||||
LEGACY_OPENJDK_TARGET_CPU3=""
|
||||
LEGACY_OPENJDK_BUILD_CPU3=""
|
||||
fi
|
||||
|
||||
# On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
|
||||
LEGACY_OPENJDK_TARGET_CPU1="x86_64"
|
||||
fi
|
||||
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO],
|
||||
[
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS($2)
|
||||
$1_OS="$VAR_OS"
|
||||
$1_OS_FAMILY="$VAR_OS_FAMILY"
|
||||
$1_OS_API="$VAR_OS_API"
|
||||
|
||||
AC_SUBST($1_OS)
|
||||
AC_SUBST($1_OS_FAMILY)
|
||||
AC_SUBST($1_OS_API)
|
||||
|
||||
if test "x$$1_OS_API" = xposix; then
|
||||
LEGACY_$1_OS_API="solaris"
|
||||
fi
|
||||
if test "x$$1_OS_API" = xwinapi; then
|
||||
LEGACY_$1_OS_API="windows"
|
||||
fi
|
||||
AC_SUBST(LEGACY_$1_OS_API)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO],
|
||||
[
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU($2)
|
||||
$1_CPU="$VAR_CPU"
|
||||
$1_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
$1_CPU_BITS="$VAR_CPU_BITS"
|
||||
$1_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
|
||||
AC_SUBST($1_CPU)
|
||||
AC_SUBST($1_CPU_ARCH)
|
||||
AC_SUBST($1_CPU_BITS)
|
||||
AC_SUBST($1_CPU_ENDIAN)
|
||||
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of ia32 and x64
|
||||
LEGACY_$1_CPU1="$VAR_LEGACY_CPU"
|
||||
AC_SUBST(LEGACY_$1_CPU1)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of ia32 and x64.
|
||||
LEGACY_$1_CPU2="$LEGACY_$1_CPU1"
|
||||
if test "x$LEGACY_$1_CPU1" = xi586; then
|
||||
LEGACY_$1_CPU2=i386
|
||||
fi
|
||||
AC_SUBST(LEGACY_$1_CPU2)
|
||||
|
||||
# And the third legacy naming of the cpu.
|
||||
# Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
|
||||
LEGACY_$1_CPU3=""
|
||||
if test "x$$1_CPU" = xx64; then
|
||||
LEGACY_$1_CPU3=amd64
|
||||
fi
|
||||
if test "x$$1_CPU" = xsparcv9; then
|
||||
LEGACY_$1_CPU3=sparcv9
|
||||
fi
|
||||
AC_SUBST(LEGACY_$1_CPU3)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
[
|
||||
# First argument is the cpu name from the trip/quad
|
||||
case "$1" in
|
||||
x86_64)
|
||||
VAR_CPU=x64
|
||||
VAR_CPU_ARCH=x86
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
VAR_LEGACY_CPU=amd64
|
||||
;;
|
||||
i?86)
|
||||
VAR_CPU=ia32
|
||||
VAR_CPU_ARCH=x86
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=little
|
||||
VAR_LEGACY_CPU=i586
|
||||
;;
|
||||
alpha*)
|
||||
VAR_CPU=alpha
|
||||
VAR_CPU_ARCH=alpha
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=alpha
|
||||
;;
|
||||
arm*)
|
||||
VAR_CPU=arm
|
||||
VAR_CPU_ARCH=arm
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=little
|
||||
VAR_LEGACY_CPU=arm
|
||||
;;
|
||||
mips)
|
||||
VAR_CPU=mips
|
||||
VAR_CPU_ARCH=mips
|
||||
VAR_CPU_BITS=woot
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=mips
|
||||
;;
|
||||
mipsel)
|
||||
VAR_CPU=mipsel
|
||||
VAR_CPU_ARCH=mips
|
||||
VAR_CPU_BITS=woot
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=mipsel
|
||||
;;
|
||||
powerpc)
|
||||
VAR_CPU=ppc
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=ppc
|
||||
;;
|
||||
powerpc64)
|
||||
VAR_CPU=ppc64
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=ppc64
|
||||
;;
|
||||
sparc)
|
||||
VAR_CPU=sparc
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=sparc
|
||||
;;
|
||||
sparc64)
|
||||
VAR_CPU=sparcv9
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=sparcv9
|
||||
;;
|
||||
s390)
|
||||
VAR_CPU=s390
|
||||
VAR_CPU_ARCH=s390
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=s390
|
||||
VAR_LEGACY_CPU=s390
|
||||
;;
|
||||
s390x)
|
||||
VAR_CPU=s390x
|
||||
VAR_CPU_ARCH=s390
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=s390x
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported cpu $1])
|
||||
;;
|
||||
esac
|
||||
|
||||
# Workaround cygwin not knowing about 64 bit.
|
||||
if test "x$VAR_OS" = "xwindows"; then
|
||||
if test "x$PROCESSOR_IDENTIFIER" != "x"; then
|
||||
PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
|
||||
case "$PROC_ARCH" in
|
||||
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
|
||||
VAR_CPU=x64
|
||||
VAR_CPU_BITS=64
|
||||
VAR_LEGACY_CPU=amd64
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# on solaris x86...default seems to be 32-bit
|
||||
if test "x$VAR_OS" = "xsolaris" && \
|
||||
test "x$with_target_bits" = "x" && \
|
||||
test "x$VAR_CPU_ARCH" = "xx86"
|
||||
then
|
||||
with_target_bits=32
|
||||
fi
|
||||
|
||||
if test "x$VAR_CPU_ARCH" = "xx86"; then
|
||||
if test "x$with_target_bits" = "x64"; then
|
||||
VAR_CPU=x64
|
||||
VAR_CPU_BITS=64
|
||||
VAR_LEGACY_CPU=amd64
|
||||
fi
|
||||
if test "x$with_target_bits" = "x32"; then
|
||||
VAR_CPU=ia32
|
||||
VAR_CPU_BITS=32
|
||||
VAR_LEGACY_CPU=i586
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$VAR_CPU_ARCH" = "xsparc"; then
|
||||
if test "x$with_target_bits" = "x64"; then
|
||||
VAR_CPU=sparcv9
|
||||
VAR_CPU_BITS=64
|
||||
VAR_LEGACY_CPU=sparcv9
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
[
|
||||
case "$1" in
|
||||
*linux*)
|
||||
VAR_OS=linux
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=gnu
|
||||
;;
|
||||
*solaris*)
|
||||
VAR_OS=solaris
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=sysv
|
||||
;;
|
||||
*darwin*)
|
||||
VAR_OS=macosx
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=bsd
|
||||
;;
|
||||
*bsd*)
|
||||
VAR_OS=bsd
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=bsd
|
||||
;;
|
||||
*cygwin*|*windows*)
|
||||
VAR_OS=windows
|
||||
VAR_OS_API=winapi
|
||||
VAR_OS_FAMILY=windows
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported operating system $1])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
REQUIRED_OS_NAME=SunOS
|
||||
REQUIRED_OS_VERSION=5.10
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
REQUIRED_OS_NAME=Linux
|
||||
REQUIRED_OS_VERSION=2.6
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME=Darwin
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
fi
|
||||
|
||||
AC_SUBST(REQUIRED_OS_NAME)
|
||||
AC_SUBST(REQUIRED_OS_VERSION)
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
[
|
||||
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
|
||||
# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
|
||||
# product you're building. The target of this build is called "host". Since this is confusing to most people, we
|
||||
# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
|
||||
# to use the configure naming style.
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
|
||||
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
|
||||
|
||||
if test "x$with_target_bits" != x && \
|
||||
test "x$with_target_bits" != x32 && \
|
||||
test "x$with_target_bits" != x64 ; then
|
||||
AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
|
||||
fi
|
||||
# Translate the standard cpu-vendor-kernel-os quadruplets into
|
||||
# the new TARGET_.... and BUILD_... and the legacy names used by
|
||||
# the openjdk build.
|
||||
# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS
|
||||
|
||||
# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
|
||||
if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
|
||||
LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
|
||||
fi
|
||||
|
||||
# Now the following vars are defined.
|
||||
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
|
||||
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
|
||||
# OPENJDK_TARGET_OS_API=posix,winapi
|
||||
#
|
||||
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
|
||||
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
|
||||
# OPENJDK_TARGET_CPU_BITS=32,64
|
||||
# OPENJDK_TARGET_CPU_ENDIAN=big,little
|
||||
#
|
||||
# There is also a:
|
||||
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,.... # used to set the old var ARCH
|
||||
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
|
||||
# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
|
||||
# There was also a BUILDARCH that had i486,amd64,... but we do not use that
|
||||
# in the new build.
|
||||
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
[
|
||||
###############################################################################
|
||||
|
||||
# Note that this is the build platform OS version!
|
||||
|
||||
OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
|
||||
OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
|
||||
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
|
||||
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
|
||||
AC_SUBST(OS_VERSION_MAJOR)
|
||||
AC_SUBST(OS_VERSION_MINOR)
|
||||
AC_SUBST(OS_VERSION_MICRO)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
|
||||
# (The JVM can use 32 or 64 bit Java pointers but that decision
|
||||
# is made at runtime.)
|
||||
#
|
||||
AC_LANG_PUSH(C++)
|
||||
OLD_CXXFLAGS="$CXXFLAGS"
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
|
||||
CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
|
||||
fi
|
||||
AC_CHECK_SIZEOF([int *], [1111])
|
||||
CXXFLAGS="$OLD_CXXFLAGS"
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
# keep track of c/cxx flags that we added outselves...
|
||||
# to prevent emitting warning...
|
||||
ADDED_CFLAGS=
|
||||
ADDED_CXXFLAGS=
|
||||
ADDED_LDFLAGS=
|
||||
|
||||
if test "x$ac_cv_sizeof_int_p" = x0; then
|
||||
# The test failed, lets pick the assumed value.
|
||||
ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
|
||||
else
|
||||
ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
|
||||
ADDED_CFLAGS=" -m${with_target_bits}"
|
||||
ADDED_CXXFLAGS=" -m${with_target_bits}"
|
||||
ADDED_LDFLAGS=" -m${with_target_bits}"
|
||||
|
||||
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ARCH_DATA_MODEL" = x64; then
|
||||
A_LP64="LP64:="
|
||||
ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
AC_MSG_CHECKING([for target address size])
|
||||
AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
AC_SUBST(ARCH_DATA_MODEL)
|
||||
|
||||
if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
|
||||
AC_MSG_ERROR([The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
|
||||
fi
|
||||
|
||||
#
|
||||
# NOTE: check for -mstackrealign needs to be below potential addition of -m32
|
||||
#
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
|
||||
# While waiting for a better solution, the current workaround is to use -mstackrealign.
|
||||
CFLAGS="$CFLAGS -mstackrealign"
|
||||
AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Is the target little of big endian?
|
||||
#
|
||||
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
|
||||
|
||||
if test "x$ENDIAN" = xuniversal_endianness; then
|
||||
AC_MSG_ERROR([Building with both big and little endianness is not supported])
|
||||
fi
|
||||
if test "x$ENDIAN" = xunknown; then
|
||||
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
|
||||
fi
|
||||
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
|
||||
AC_MSG_WARN([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
|
||||
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
|
||||
fi
|
||||
AC_SUBST(ENDIAN)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Could someone enlighten this configure script with a comment about libCrun?
|
||||
#
|
||||
#
|
||||
])
|
||||
280
common/autoconf/source-dirs.m4
Normal file
280
common/autoconf/source-dirs.m4
Normal file
@@ -0,0 +1,280 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
|
||||
[
|
||||
|
||||
# Where are the sources. Any of these can be overridden
|
||||
# using --with-override-corba and the likes.
|
||||
LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
|
||||
CORBA_TOPDIR="$SRC_ROOT/corba"
|
||||
JAXP_TOPDIR="$SRC_ROOT/jaxp"
|
||||
JAXWS_TOPDIR="$SRC_ROOT/jaxws"
|
||||
HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
|
||||
JDK_TOPDIR="$SRC_ROOT/jdk"
|
||||
AC_SUBST(LANGTOOLS_TOPDIR)
|
||||
AC_SUBST(CORBA_TOPDIR)
|
||||
AC_SUBST(JAXP_TOPDIR)
|
||||
AC_SUBST(JAXWS_TOPDIR)
|
||||
AC_SUBST(HOTSPOT_TOPDIR)
|
||||
AC_SUBST(JDK_TOPDIR)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Pickup additional source for a component from outside of the source root
|
||||
# or override source for a component.
|
||||
#
|
||||
AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
|
||||
[for each and every source directory, look in this additional source root for
|
||||
the same directory; if it exists and have files in it, include it in the build])])
|
||||
|
||||
AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
|
||||
[for each and every source directory, look in this override source root for
|
||||
the same directory; if it exists, use that directory instead and
|
||||
ignore the directory in the original source root])])
|
||||
|
||||
AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
|
||||
[use the subdirs 'adds' and 'overrides' in the specified directory as
|
||||
add-source-root and override-source-root])])
|
||||
|
||||
if test "x$with_adds_and_overrides" != x; then
|
||||
with_add_source_root="$with_adds_and_overrides/adds"
|
||||
with_override_source_root="$with_adds_and_overrides/overrides"
|
||||
fi
|
||||
|
||||
if test "x$with_add_source_root" != x; then
|
||||
if ! test -d $with_add_source_root; then
|
||||
AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
|
||||
fi
|
||||
CURDIR="$PWD"
|
||||
cd "$with_add_source_root"
|
||||
ADD_SRC_ROOT="`pwd`"
|
||||
cd "$CURDIR"
|
||||
# Verify that the addon source root does not have any root makefiles.
|
||||
# If it does, then it is usually an error, prevent this.
|
||||
if test -f $with_add_source_root/langtools/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/langtools/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/corba/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/corba/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/jaxp/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/jaxws/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/hotspot/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jdk/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/jdk/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ADD_SRC_ROOT)
|
||||
|
||||
if test "x$with_override_source_root" != x; then
|
||||
if ! test -d $with_override_source_root; then
|
||||
AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
|
||||
fi
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_source_root"
|
||||
OVERRIDE_SRC_ROOT="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if test -f $with_override_source_root/langtools/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/langtools/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/corba/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/corba/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/jaxp/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/jaxws/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/hotspot/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jdk/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/jdk/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OVERRIDE_SRC_ROOT)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Override a repo completely, this is used for example when you have 3 small
|
||||
# development sandboxes of the langtools sources and want to avoid having 3 full
|
||||
# OpenJDK sources checked out on disk.
|
||||
#
|
||||
# Assuming that the 3 langtools sandboxes are located here:
|
||||
# /home/fredrik/sandbox1/langtools
|
||||
# /home/fredrik/sandbox2/langtools
|
||||
# /home/fredrik/sandbox3/langtools
|
||||
#
|
||||
# From the source root you create build subdirs manually:
|
||||
# mkdir -p build1 build2 build3
|
||||
# in each build directory run:
|
||||
# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
|
||||
# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
|
||||
# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
|
||||
#
|
||||
|
||||
AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
|
||||
[use this langtools dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
|
||||
[use this corba dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
|
||||
[use this jaxp dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
|
||||
[use this jaxws dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
|
||||
[use this hotspot dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
|
||||
[use this jdk dir for the build])])
|
||||
|
||||
if test "x$with_override_langtools" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_langtools"
|
||||
LANGTOOLS_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if langtools should be overridden])
|
||||
AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_corba" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_corba"
|
||||
CORBA_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override corba with a full corba repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if corba should be overridden])
|
||||
AC_MSG_RESULT([yes with $CORBA_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_jaxp" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_jaxp"
|
||||
JAXP_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if jaxp should be overridden])
|
||||
AC_MSG_RESULT([yes with $JAXP_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_jaxws" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_jaxws"
|
||||
JAXWS_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if jaxws should be overridden])
|
||||
AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_hotspot" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_hotspot"
|
||||
HOTSPOT_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
|
||||
! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if hotspot should be overridden])
|
||||
AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
|
||||
fi
|
||||
if test "x$with_override_jdk" != x; then
|
||||
CURDIR="$PWD"
|
||||
cd "$with_override_jdk"
|
||||
JDK_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if JDK should be overridden])
|
||||
AC_MSG_RESULT([yes with $JDK_TOPDIR])
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
|
||||
[
|
||||
LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
|
||||
CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
|
||||
JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
|
||||
JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
|
||||
HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
|
||||
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
|
||||
IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
|
||||
|
||||
AC_SUBST(LANGTOOLS_OUTPUTDIR)
|
||||
AC_SUBST(CORBA_OUTPUTDIR)
|
||||
AC_SUBST(JAXP_OUTPUTDIR)
|
||||
AC_SUBST(JAXWS_OUTPUTDIR)
|
||||
AC_SUBST(HOTSPOT_OUTPUTDIR)
|
||||
AC_SUBST(JDK_OUTPUTDIR)
|
||||
AC_SUBST(IMAGES_OUTPUTDIR)
|
||||
|
||||
LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
|
||||
CORBA_DIST="$OUTPUT_ROOT/corba/dist"
|
||||
JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
|
||||
JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
|
||||
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
|
||||
|
||||
AC_SUBST(LANGTOOLS_DIST)
|
||||
AC_SUBST(CORBA_DIST)
|
||||
AC_SUBST(JAXP_DIST)
|
||||
AC_SUBST(JAXWS_DIST)
|
||||
AC_SUBST(HOTSPOT_DIST)
|
||||
])
|
||||
638
common/autoconf/spec.gmk.in
Normal file
638
common/autoconf/spec.gmk.in
Normal file
@@ -0,0 +1,638 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Configured @DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
|
||||
# using 'configure @CONFIGURE_COMMAND_LINE@'
|
||||
|
||||
# When calling macros, the spaces between arguments are
|
||||
# often semantically important! Sometimes we need to subst
|
||||
# spaces and commas, therefore we need the following macros.
|
||||
X:=
|
||||
SPACE:=$(X) $(X)
|
||||
COMMA:=,
|
||||
HASH:=\#
|
||||
SQUOTE:='
|
||||
#'
|
||||
DQUOTE:="
|
||||
#"
|
||||
define NEWLINE:=
|
||||
endef
|
||||
|
||||
|
||||
# Pass along the verbosity setting.
|
||||
ifeq (,$(findstring VERBOSE=,$(MAKE)))
|
||||
MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)"
|
||||
endif
|
||||
|
||||
# No implicit variables or rules!
|
||||
ifeq (,$(findstring -R,$(MAKE)))
|
||||
MAKE:=$(MAKE) -R
|
||||
endif
|
||||
|
||||
# Specify where the spec file is.
|
||||
ifeq (,$(findstring SPEC=,$(MAKE)))
|
||||
MAKE:=$(MAKE) SPEC=@SPEC@
|
||||
endif
|
||||
|
||||
# Specify where the common include directory for makefiles is.
|
||||
ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
|
||||
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
|
||||
endif
|
||||
|
||||
# A self-referential reference to this file.
|
||||
SPEC:=@SPEC@
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
CONF_NAME:=@CONF_NAME@
|
||||
|
||||
# The built jdk will run in this target system.
|
||||
OPENJDK_TARGET_SYSTEM:=@OPENJDK_TARGET_SYSTEM@
|
||||
|
||||
OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
|
||||
OPENJDK_TARGET_OS_FAMILY:=@OPENJDK_TARGET_OS_FAMILY@
|
||||
OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
|
||||
|
||||
OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
|
||||
OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
|
||||
OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
|
||||
OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
|
||||
|
||||
# We are building on this build system.
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_SYSTEM:=@OPENJDK_BUILD_SYSTEM@
|
||||
|
||||
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
|
||||
OPENJDK_BUILD_OS_FAMILY:=@OPENJDK_BUILD_OS_FAMILY@
|
||||
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
|
||||
|
||||
OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
|
||||
OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
|
||||
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
|
||||
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
|
||||
|
||||
# Legacy OS values for use in release file.
|
||||
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
|
||||
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
|
||||
|
||||
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM:=@OPENJDK_TARGET_OS@
|
||||
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
|
||||
ARCH:=@LEGACY_OPENJDK_TARGET_CPU1@
|
||||
# Yet another name for arch used for an extra subdir below the jvm lib.
|
||||
# Uses i386 and amd64, instead of ia32 and x64.
|
||||
LIBARCH:=@LEGACY_OPENJDK_TARGET_CPU2@
|
||||
# Use to switch between solaris and windows subdirs in the jdk.
|
||||
LEGACY_OPENJDK_TARGET_OS_API:=@LEGACY_OPENJDK_TARGET_OS_API@
|
||||
# 32 or 64 bit
|
||||
ARCH_DATA_MODEL:=@OPENJDK_TARGET_CPU_BITS@
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64:=1
|
||||
@LP64@
|
||||
ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
|
||||
@SET_OPENJDK@
|
||||
JIGSAW:=@JIGSAW@
|
||||
LIBM:=-lm
|
||||
LIBDL:=@LIBDL@
|
||||
|
||||
# colon or semicolon
|
||||
PATH_SEP:=@PATH_SEP@
|
||||
|
||||
# Set special env variables, to be passed to external tools.
|
||||
# Used for cygwin setups.
|
||||
@SETUPDEVENV@
|
||||
|
||||
# The sys root where standard headers and libraries are found.
|
||||
# Usually not needed since the configure script should have
|
||||
# taken it into account already when setting CFLAGS et al.
|
||||
SYS_ROOT:=@SYS_ROOT@
|
||||
|
||||
# Paths to the source code
|
||||
SRC_ROOT:=@SRC_ROOT@
|
||||
ADD_SRC_ROOT:=@ADD_SRC_ROOT@
|
||||
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
|
||||
TOPDIR:=@SRC_ROOT@
|
||||
OUTPUT_ROOT:=@OUTPUT_ROOT@
|
||||
JDK_MAKE_SHARED_DIR:=@JDK_TOPDIR@/makefiles/common/shared
|
||||
JDK_TOPDIR:=@JDK_TOPDIR@
|
||||
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
|
||||
CORBA_TOPDIR:=@CORBA_TOPDIR@
|
||||
JAXP_TOPDIR:=@JAXP_TOPDIR@
|
||||
JAXWS_TOPDIR:=@JAXWS_TOPDIR@
|
||||
HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
|
||||
# Information gathered from the version.numbers file.
|
||||
JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
|
||||
JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
|
||||
JDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
|
||||
JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
|
||||
JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
|
||||
MILESTONE:=@MILESTONE@
|
||||
LAUNCHER_NAME:=@LAUNCHER_NAME@
|
||||
PRODUCT_NAME:=@PRODUCT_NAME@
|
||||
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
|
||||
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
|
||||
COMPANY_NAME:=@COMPANY_NAME@
|
||||
|
||||
# Different version strings generated from the above information.
|
||||
JDK_VERSION:=@JDK_VERSION@
|
||||
RUNTIME_NAME:=@RUNTIME_NAME@
|
||||
FULL_VERSION:=@FULL_VERSION@
|
||||
JRE_RELEASE_VERSION:=@FULL_VERSION@
|
||||
RELEASE:=@RELEASE@
|
||||
COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
|
||||
|
||||
# How to compile the code: release, fastdebug or slowdebug
|
||||
DEBUG_LEVEL:=@DEBUG_LEVEL@
|
||||
|
||||
# This is the JDK variant to build.
|
||||
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
|
||||
JDK_VARIANT:=@JDK_VARIANT@
|
||||
|
||||
# Legacy defines controlling the JDK variant embedded.
|
||||
@JAVASE_EMBEDDED@
|
||||
@MINIMIZE_RAM_USAGE@
|
||||
|
||||
# Should we compile support for running with a graphical UI? (ie headful)
|
||||
# Should we compile support for running without? (ie headless)
|
||||
SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
|
||||
SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
|
||||
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
|
||||
@BUILD_HEADLESS@
|
||||
@BUILD_HEADLESS_ONLY@
|
||||
|
||||
# These are the libjvms that we want to build.
|
||||
# The java launcher uses the default.
|
||||
# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
|
||||
# on the java launcher command line.
|
||||
JVM_VARIANTS:=@JVM_VARIANTS@
|
||||
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
|
||||
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
|
||||
JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
|
||||
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
|
||||
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT:=@VARIANT@
|
||||
# Legacy setting: true or false
|
||||
FASTDEBUG:=@FASTDEBUG@
|
||||
# Legacy setting: debugging the class files?
|
||||
DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
|
||||
# Legacy setting: -debug or -fastdebug
|
||||
BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
|
||||
|
||||
LANGTOOLS_OUTPUTDIR:=@LANGTOOLS_OUTPUTDIR@
|
||||
CORBA_OUTPUTDIR:=@CORBA_OUTPUTDIR@
|
||||
JAXP_OUTPUTDIR:=@JAXP_OUTPUTDIR@
|
||||
JAXWS_OUTPUTDIR:=@JAXWS_OUTPUTDIR@
|
||||
HOTSPOT_OUTPUTDIR:=@HOTSPOT_OUTPUTDIR@
|
||||
|
||||
# This where a working jvm is built.
|
||||
# You can run $(JDK_OUTPUTDIR)/bin/java
|
||||
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
|
||||
# yet the same as a default installation.
|
||||
JDK_OUTPUTDIR:=@OUTPUT_ROOT@/jdk
|
||||
|
||||
# When you run "make install" it will create the standardized
|
||||
# layout for the jdk and the jre inside the images subdir.
|
||||
# Then it will copy the contents of the jdk into the installation
|
||||
# directory.
|
||||
IMAGES_OUTPUTDIR:=@OUTPUT_ROOT@/images
|
||||
|
||||
LANGTOOLS_DIST:=@LANGTOOLS_DIST@
|
||||
CORBA_DIST:=@CORBA_DIST@
|
||||
JAXP_DIST:=@JAXP_DIST@
|
||||
JAXWS_DIST:=@JAXWS_DIST@
|
||||
HOTSPOT_DIST:=@HOTSPOT_DIST@
|
||||
|
||||
# Legacy variables used by Release.gmk
|
||||
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
|
||||
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
|
||||
|
||||
# Can be /sparcv9 or /amd64 on Solaris
|
||||
ISA_DIR:=@LEGACY_OPENJDK_TARGET_CPU3@
|
||||
BINDIR:=$(JDK_OUTPUTDIR)/bin$(ISA_DIR)
|
||||
|
||||
# The boot jdk to use
|
||||
ALT_BOOTDIR:=@BOOT_JDK@
|
||||
BOOT_JDK:=@BOOT_JDK@
|
||||
BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
|
||||
BOOT_RTJAR:=@BOOT_RTJAR@
|
||||
BOOT_TOOLSJAR:=@BOOT_TOOLSJAR@
|
||||
|
||||
# When compiling Java source to be run by the boot jdk
|
||||
# use these extra flags, eg -source 6 -target 6
|
||||
BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
|
||||
|
||||
# Information about the build system
|
||||
NUM_CORES:=@NUM_CORES@
|
||||
# This is used from the jdk build for C/C++ code.
|
||||
PARALLEL_COMPILE_JOBS:=@CONCURRENT_BUILD_JOBS@
|
||||
# Store javac server synchronization files here, and
|
||||
# the javac server log files.
|
||||
JAVAC_SERVERS:=@JAVAC_SERVERS@
|
||||
# Should we use a javac server or not? The javac server gives
|
||||
# an enormous performance improvement since it reduces the
|
||||
# startup costs of javac and reuses as much as possible of intermediate
|
||||
# compilation work. But if we want to compile with a non-Java
|
||||
# javac compiler, like gcj. Then we cannot use javac server and
|
||||
# this variable is set to false.
|
||||
JAVAC_USE_REMOTE:=@JAVAC_USE_REMOTE@
|
||||
# We can block the Javac server to never use more cores than this.
|
||||
# This is not for performance reasons, but for memory usage, since each
|
||||
# core requires its own JavaCompiler. We might have 64 cores and 4GB
|
||||
# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
|
||||
# Since there is no sharing of data between the JavaCompilers.
|
||||
JAVAC_SERVER_CORES:=@JAVAC_SERVER_CORES@
|
||||
# Should we use dependency tracking between Java packages? true or false.
|
||||
JAVAC_USE_DEPS:=@JAVAC_USE_DEPS@
|
||||
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
|
||||
JAVAC_USE_MODE:=@JAVAC_USE_MODE@
|
||||
# Enable not yet complete sjavac support.
|
||||
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
||||
|
||||
# The OpenJDK makefiles should be changed to using the standard
|
||||
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
|
||||
# extract the information here.
|
||||
FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
|
||||
FREETYPE2_LIBS:=@FREETYPE2_LIBS@
|
||||
FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
|
||||
USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
|
||||
ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
|
||||
CUPS_CFLAGS:=@CUPS_CFLAGS@
|
||||
|
||||
PACKAGE_PATH=@PACKAGE_PATH@
|
||||
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE=@CACERTS_FILE@
|
||||
|
||||
#MOZILLA_HEADERS_PATH:=
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
OPENWIN_HOME:=@OPENWIN_HOME@
|
||||
|
||||
# There are two types: CC or CL
|
||||
# CC is gcc and others behaving reasonably similar.
|
||||
# CL is cl.exe only.
|
||||
COMPILER_TYPE:=@COMPILER_TYPE@
|
||||
|
||||
CC_OUT_OPTION:=@CC_OUT_OPTION@
|
||||
EXE_OUT_OPTION:=@EXE_OUT_OPTION@
|
||||
LD_OUT_OPTION:=@LD_OUT_OPTION@
|
||||
AR_OUT_OPTION:=@AR_OUT_OPTION@
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
|
||||
C_O_FLAG_HI:=@C_O_FLAG_HI@
|
||||
C_O_FLAG_NORM:=@C_O_FLAG_NORM@
|
||||
C_O_FLAG_NONE:=@C_O_FLAG_NONE@
|
||||
CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
|
||||
CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
|
||||
CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
|
||||
CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
|
||||
|
||||
C_FLAG_DEPS:=@C_FLAG_DEPS@
|
||||
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC:=@UNCYGDRIVE@ @CCACHE@ @CC@
|
||||
|
||||
# CFLAGS used to compile the jdk native libraries (C-code)
|
||||
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
|
||||
CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
|
||||
|
||||
# CFLAGS used to compile the jdk native launchers (C-code)
|
||||
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
|
||||
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
|
||||
|
||||
CXX:=@UNCYGDRIVE@ @CCACHE@ @CXX@
|
||||
#CXXFLAGS:=@CXXFLAGS@
|
||||
|
||||
OBJC:=@CCACHE@ @OBJC@
|
||||
#OBJCFLAGS:=@OBJCFLAGS@
|
||||
|
||||
CPP:=@UNCYGDRIVE@ @CPP@
|
||||
#CPPFLAGS:=@CPPFLAGS@
|
||||
|
||||
# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
|
||||
LD:=@UNCYGDRIVE@ @LD@
|
||||
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
|
||||
LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
|
||||
|
||||
# On some platforms the linker cannot be used to create executables, thus
|
||||
# the need for a separate LDEXE command.
|
||||
LDEXE:=@UNCYGDRIVE@ @LDEXE@
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
|
||||
LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
|
||||
|
||||
# Sometimes a different linker is needed for c++ libs
|
||||
LDCXX:=@UNCYGDRIVE@ @LDCXX@
|
||||
# The flags for linking libstdc++ linker.
|
||||
LIBCXX:=@LIBCXX@
|
||||
|
||||
# Sometimes a different linker is needed for c++ executables
|
||||
LDEXECXX:=@UNCYGDRIVE@ @LDEXECXX@
|
||||
|
||||
# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here.
|
||||
@DEFINE_CROSS_COMPILE_ARCH@
|
||||
# The HOSTCC should really be named BUILDCC, ie build executable for
|
||||
# the build platform. Same as CC when not cross compiling.
|
||||
HOSTCC:=@UNCYGDRIVE@ @HOSTCC@
|
||||
HOSTCXX:=@UNCYGDRIVE@ @HOSTCXX@
|
||||
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
|
||||
HOST_CC:=@UNCYGDRIVE@ @HOSTCC@
|
||||
NIO_CC:=@UNCYGDRIVE@ @HOSTCC@
|
||||
|
||||
HOST_LD:=@UNCYGDRIVE@ @HOSTLD@
|
||||
|
||||
AS:=@UNCYGDRIVE@ @AS@
|
||||
ASFLAGS:=@ASFLAGS@
|
||||
|
||||
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
|
||||
AR:=@UNCYGDRIVE@ @AR@
|
||||
ARFLAGS:=@ARFLAGS@
|
||||
|
||||
NM:=@UNCYGDRIVE@ @NM@
|
||||
STRIP:=@UNCYGDRIVE@ @STRIP@
|
||||
MCS:=@UNCYGDRIVE@ @MCS@
|
||||
|
||||
# Command to create a shared library
|
||||
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
|
||||
|
||||
# Options to linker to specify a mapfile.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
|
||||
|
||||
# Options for C/CXX compiler to be used if linking is performed
|
||||
# using reorder file
|
||||
C_FLAG_REORDER:=@C_FLAG_REORDER@
|
||||
CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
|
||||
|
||||
#
|
||||
# Options for generating debug symbols
|
||||
ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
|
||||
CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
|
||||
CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
|
||||
ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
|
||||
|
||||
#
|
||||
# Compress (or not) jars
|
||||
COMPRESS_JARS=@COMPRESS_JARS@
|
||||
|
||||
# Options to linker to specify the library name.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
|
||||
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
|
||||
|
||||
# Different OS:es have different ways of naming shared libraries.
|
||||
# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
|
||||
# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SHARED_LIBRARY=@SHARED_LIBRARY@
|
||||
STATIC_LIBRARY=@STATIC_LIBRARY@
|
||||
LIBRARY_PREFIX:=@LIBRARY_PREFIX@
|
||||
SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
|
||||
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
|
||||
EXE_SUFFIX:=@EXE_SUFFIX@
|
||||
OBJ_SUFFIX:=@OBJ_SUFFIX@
|
||||
|
||||
POST_STRIP_CMD:=@POST_STRIP_CMD@
|
||||
POST_MCS_CMD:=@POST_MCS_CMD@
|
||||
|
||||
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
|
||||
|
||||
JAVA=@UNCYGDRIVE@ @JAVA@ $(JAVA_FLAGS)
|
||||
|
||||
JAVAC:=@UNCYGDRIVE@ @JAVAC@
|
||||
JAVAC_FLAGS:=@JAVAC_FLAGS@
|
||||
|
||||
JAVAH:=@UNCYGDRIVE@ @JAVAH@
|
||||
|
||||
JAR:=@UNCYGDRIVE@ @JAR@
|
||||
|
||||
RMIC:=@UNCYGDRIVE@ @RMIC@
|
||||
|
||||
NATIVE2ASCII:=@UNCYGDRIVE@ @NATIVE2ASCII@
|
||||
|
||||
BOOT_JAR_CMD:=@UNCYGDRIVE@ @JAR@
|
||||
BOOT_JAR_JFLAGS:=
|
||||
|
||||
# Base flags for RC
|
||||
# Guarding this against resetting value. Legacy make files include spec multiple
|
||||
# times.
|
||||
ifndef RC_FLAGS
|
||||
RC_FLAGS:=@RC_FLAGS@
|
||||
endif
|
||||
|
||||
# A specific java binary with specific options can be used to run
|
||||
# the long running background javac server and other long running tasks.
|
||||
SERVER_JAVA:=@UNCYGDRIVE@ @SERVER_JAVA@
|
||||
|
||||
# Tools adhering to a minimal and common standard of posix compliance.
|
||||
AWK:=@AWK@
|
||||
CAT:=@CAT@
|
||||
CCACHE:=@CCACHE@
|
||||
# CD is going away, but remains to cater for legacy makefiles.
|
||||
CD:=cd
|
||||
CHMOD:=@CHMOD@
|
||||
CP:=@CP@
|
||||
CPIO:=@CPIO@
|
||||
CUT:=@CUT@
|
||||
DATE:=@DATE@
|
||||
DF:=@DF@
|
||||
DIFF:=@DIFF@
|
||||
FIND:=@FIND@
|
||||
FIND_DELETE:=@FIND_DELETE@
|
||||
ECHO:=@ECHO@
|
||||
EGREP:=@EGREP@
|
||||
FGREP:=@FGREP@
|
||||
GREP:=@GREP@
|
||||
HEAD:=@HEAD@
|
||||
LS:=@LS@
|
||||
LN:=@LN@
|
||||
MKDIR:=@MKDIR@
|
||||
MV:=@MV@
|
||||
NAWK:=@NAWK@
|
||||
PRINTF:=@PRINTF@
|
||||
PWD:=@THEPWDCMD@
|
||||
RM:=@RM@
|
||||
SED:=@SED@
|
||||
SH:=@SH@
|
||||
SORT:=@SORT@
|
||||
TAR:=@TAR@
|
||||
TAIL:=@TAIL@
|
||||
TEE:=@TEE@
|
||||
TR:=@TR@
|
||||
TOUCH:=@TOUCH@
|
||||
WC:=@WC@
|
||||
XARGS:=@XARGS@
|
||||
ZIPEXE:=@ZIP@
|
||||
ZIP:=@ZIP@
|
||||
UNZIP:=@UNZIP@
|
||||
MT:=@UNCYGDRIVE@ @MT@
|
||||
RC:=@UNCYGDRIVE@ @RC@
|
||||
DUMPBIN:=@UNCYGDRIVE@ @DUMPBIN@
|
||||
CYGPATH:=@CYGPATH@
|
||||
LDD:=@LDD@
|
||||
OTOOL:=@OTOOL@
|
||||
READELF:=@READELF@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
HG:=@HG@
|
||||
OBJCOPY:=@OBJCOPY@
|
||||
|
||||
UNCYGDRIVE:=@UNCYGDRIVE@
|
||||
|
||||
# Where the build output is stored for your convenience.
|
||||
BUILD_LOG:=@BUILD_LOG@
|
||||
BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
|
||||
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
|
||||
|
||||
# Build setup
|
||||
ENABLE_DOCS:=@ENABLE_DOCS@
|
||||
GENERATE_DOCS:=@ENABLE_DOCS@
|
||||
DISABLE_NIMBUS:=@DISABLE_NIMBUS@
|
||||
ENABLE_JFR=@ENABLE_JFR@
|
||||
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
|
||||
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
|
||||
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||
CHECK_FOR_VCINSTALLDIR=@CHECK_FOR_VCINSTALLDIR@
|
||||
MSVCRNN_DLL:=@MSVCR100DLL@
|
||||
|
||||
|
||||
# ADD_SRCS takes a single argument with source roots
|
||||
# and appends any corresponding source roots found
|
||||
# below --with-add-source-root and below
|
||||
# --with-override-source-root. It is the responsibility
|
||||
# of the next macro to get rid of superfluous files.
|
||||
ADD_SRCS=$1
|
||||
ifneq (,$(ADD_SRC_ROOT))
|
||||
# Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
|
||||
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
|
||||
endif
|
||||
ifneq (,$(OVERRIDE_SRC_ROOT))
|
||||
# Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
|
||||
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
|
||||
endif
|
||||
|
||||
# OVR_SRCS creates a filter expression to filter out sources in
|
||||
# the original source directory that lie inside directories below
|
||||
# --with-override-source-root.
|
||||
# Use := here since we want to scan for these files here. To avoid recomputation later.
|
||||
# We cannot do the scan in configure, since that would force us to rerun configure when
|
||||
# we add overridden sources.
|
||||
ifneq (,$(OVERRIDE_SRC_ROOT))
|
||||
OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
|
||||
else
|
||||
OVR_SRCS:=
|
||||
endif
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Legacy Hotspot support
|
||||
|
||||
HOTSPOT_DIST:=@HOTSPOT_DIST@
|
||||
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
|
||||
# This is used from the libjvm build for C/C++ code.
|
||||
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD=@TEST_IN_BUILD@
|
||||
|
||||
####################################################
|
||||
#
|
||||
# INSTALLATION
|
||||
#
|
||||
|
||||
# Common prefix for all installed files. Defaults to /usr/local,
|
||||
# but /opt/myjdk is another common version.
|
||||
INSTALL_PREFIX=@prefix@
|
||||
|
||||
# Directories containing architecture-dependent files should be relative to exec_prefix
|
||||
INSTALL_EXECPREFIX=@exec_prefix@
|
||||
|
||||
# java,javac,javah,javap etc are installed here.
|
||||
INSTALL_BINDIR=@bindir@
|
||||
|
||||
# Read only architecture-independent data
|
||||
INSTALL_DATADIR=@datadir@
|
||||
|
||||
# Root of above.
|
||||
INSTALL_DATAROOTDIR=@datarootdir@
|
||||
|
||||
# Doc files, other than info and man.
|
||||
INSTALL_DOCDIR=@docdir@
|
||||
|
||||
# Html documentation
|
||||
INSTALL_HTMLDIR=@htmldir@
|
||||
|
||||
# Installing C header files, JNI headers for example.
|
||||
INSTALL_INCLUDEDIR=@includedir@
|
||||
|
||||
# Installing library files....
|
||||
INSTALL_INCLUDEDIR=@libdir@
|
||||
|
||||
# Executables that other programs run.
|
||||
INSTALL_LIBEXECDIR=@libexecdir@
|
||||
|
||||
# Locale-dependent but architecture-independent data, such as message catalogs.
|
||||
INSTALL_LOCALEDIR=@localedir@
|
||||
|
||||
# Modifiable single-machine data
|
||||
INSTALL_LOCALSTATEDIR=@localstatedir@
|
||||
|
||||
# Man pages
|
||||
INSTALL_MANDIR=@mandir@
|
||||
|
||||
# Modifiable architecture-independent data.
|
||||
INSTALL_SHAREDSTATEDIR=@sharedstatedir@
|
||||
|
||||
# Read-only single-machine data
|
||||
INSTALL_SYSCONFDIR=@sysconfdir@
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Misc
|
||||
#
|
||||
|
||||
# Name of Service Agent library
|
||||
SALIB_NAME=@SALIB_NAME@
|
||||
|
||||
OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
|
||||
OS_VERSION_MINOR:=@OS_VERSION_MINOR@
|
||||
OS_VERSION_MICRO:=@OS_VERSION_MICRO@
|
||||
|
||||
# Include the closed-spec.gmk file if it exists
|
||||
-include $(dir @SPEC@)/closed-spec.gmk
|
||||
527
common/autoconf/spec.sh.in
Normal file
527
common/autoconf/spec.sh.in
Normal file
@@ -0,0 +1,527 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Configured"@DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
|
||||
# using 'configure @CONFIGURE_COMMAND_LINE@'
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
CONF_NAME="@CONF_NAME@"
|
||||
|
||||
# The built jdk will run in this target system.
|
||||
OPENJDK_TARGET_SYSTEM="@OPENJDK_TARGET_SYSTEM@"
|
||||
|
||||
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
|
||||
OPENJDK_TARGET_OS_FAMILY="@OPENJDK_TARGET_OS_FAMILY@"
|
||||
OPENJDK_TARGET_OS_API="@OPENJDK_TARGET_OS_API@"
|
||||
|
||||
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
|
||||
OPENJDK_TARGET_CPU_ARCH="@OPENJDK_TARGET_CPU_ARCH@"
|
||||
OPENJDK_TARGET_CPU_BITS="@OPENJDK_TARGET_CPU_BITS@"
|
||||
OPENJDK_TARGET_CPU_ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
|
||||
|
||||
# We are building on this build system.
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_SYSTEM="@OPENJDK_BUILD_SYSTEM@"
|
||||
|
||||
OPENJDK_BUILD_OS="@OPENJDK_BUILD_OS@"
|
||||
OPENJDK_BUILD_OS_FAMILY="@OPENJDK_BUILD_OS_FAMILY@"
|
||||
OPENJDK_BUILD_OS_API="@OPENJDK_BUILD_OS_API@"
|
||||
|
||||
OPENJDK_BUILD_CPU="@OPENJDK_BUILD_CPU@"
|
||||
OPENJDK_BUILD_CPU_ARCH="@OPENJDK_BUILD_CPU_ARCH@"
|
||||
OPENJDK_BUILD_CPU_BITS="@OPENJDK_BUILD_CPU_BITS@"
|
||||
OPENJDK_BUILD_CPU_ENDIAN="@OPENJDK_BUILD_CPU_ENDIAN@"
|
||||
|
||||
# Legacy OS values for use in release file.
|
||||
REQUIRED_OS_NAME="@REQUIRED_OS_NAME@"
|
||||
REQUIRED_OS_VERSION="@REQUIRED_OS_VERSION@"
|
||||
|
||||
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM="@OPENJDK_TARGET_OS@"
|
||||
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
|
||||
ARCH="@LEGACY_OPENJDK_TARGET_CPU1@"
|
||||
# Yet another name for arch used for an extra subdir below the jvm lib.
|
||||
# Uses i386 and amd64, instead of ia32 and x64.
|
||||
LIBARCH="@LEGACY_OPENJDK_TARGET_CPU2@"
|
||||
# Use to switch between solaris and windows subdirs in the jdk.
|
||||
LEGACY_OPENJDK_TARGET_OS_API="@LEGACY_OPENJDK_TARGET_OS_API@"
|
||||
# 32 or 64 bit
|
||||
ARCH_DATA_MODEL="@OPENJDK_TARGET_CPU_BITS@"
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64=1
|
||||
ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
|
||||
JIGSAW="@JIGSAW@"
|
||||
LIBM=-lm
|
||||
LIBDL="@LIBDL@"
|
||||
|
||||
# colon or semicolon
|
||||
PATH_SEP="@PATH_SEP@"
|
||||
|
||||
# The sys root where standard headers and libraries are found.
|
||||
# Usually not needed since the configure script should have
|
||||
# taken it into account already when setting CFLAGS et al.
|
||||
SYS_ROOT="@SYS_ROOT@"
|
||||
|
||||
# Paths to the source code
|
||||
SRC_ROOT="@SRC_ROOT@"
|
||||
ADD_SRC_ROOT="@ADD_SRC_ROOT@"
|
||||
OVERRIDE_SRC_ROOT="@OVERRIDE_SRC_ROOT@"
|
||||
TOPDIR="@SRC_ROOT@"
|
||||
OUTPUT_ROOT="@OUTPUT_ROOT@"
|
||||
JDK_MAKE_SHARED_DIR="@JDK_TOPDIR@"/makefiles/common/shared
|
||||
JDK_TOPDIR="@JDK_TOPDIR@"
|
||||
LANGTOOLS_TOPDIR="@LANGTOOLS_TOPDIR@"
|
||||
CORBA_TOPDIR="@CORBA_TOPDIR@"
|
||||
JAXP_TOPDIR="@JAXP_TOPDIR@"
|
||||
JAXWS_TOPDIR="@JAXWS_TOPDIR@"
|
||||
HOTSPOT_TOPDIR="@HOTSPOT_TOPDIR@"
|
||||
COPYRIGHT_YEAR="@COPYRIGHT_YEAR@"
|
||||
|
||||
# Information gathered from the version.numbers file.
|
||||
JDK_MAJOR_VERSION="@JDK_MAJOR_VERSION@"
|
||||
JDK_MINOR_VERSION="@JDK_MINOR_VERSION@"
|
||||
JDK_MICRO_VERSION="@JDK_MICRO_VERSION@"
|
||||
JDK_UPDATE_VERSION="@JDK_UPDATE_VERSION@"
|
||||
JDK_BUILD_NUMBER="@JDK_BUILD_NUMBER@"
|
||||
MILESTONE="@MILESTONE@"
|
||||
LAUNCHER_NAME="@LAUNCHER_NAME@"
|
||||
PRODUCT_NAME="@PRODUCT_NAME@"
|
||||
PRODUCT_SUFFIX="@PRODUCT_SUFFIX@"
|
||||
JDK_RC_PLATFORM_NAME="@JDK_RC_PLATFORM_NAME@"
|
||||
COMPANY_NAME="@COMPANY_NAME@"
|
||||
|
||||
# Different version strings generated from the above information.
|
||||
JDK_VERSION="@JDK_VERSION@"
|
||||
RUNTIME_NAME="@RUNTIME_NAME@"
|
||||
FULL_VERSION="@FULL_VERSION@"
|
||||
JRE_RELEASE_VERSION="@FULL_VERSION@"
|
||||
RELEASE="@RELEASE@"
|
||||
COOKED_BUILD_NUMBER="@COOKED_BUILD_NUMBER@"
|
||||
|
||||
# How to compile the code: release, fastdebug or slowdebug
|
||||
DEBUG_LEVEL="@DEBUG_LEVEL@"
|
||||
|
||||
# This is the JDK variant to build.
|
||||
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
|
||||
JDK_VARIANT="@JDK_VARIANT@"
|
||||
|
||||
# Should we compile support for running with a graphical UI? (ie headful)
|
||||
# Should we compile support for running without? (ie headless)
|
||||
SUPPORT_HEADFUL="@SUPPORT_HEADFUL@"
|
||||
SUPPORT_HEADLESS="@SUPPORT_HEADLESS@"
|
||||
|
||||
# These are the libjvms that we want to build.
|
||||
# The java launcher uses the default.
|
||||
# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
|
||||
# on the java launcher command line.
|
||||
JVM_VARIANTS="@JVM_VARIANTS@"
|
||||
JVM_VARIANT_SERVER="@JVM_VARIANT_SERVER@"
|
||||
JVM_VARIANT_CLIENT="@JVM_VARIANT_CLIENT@"
|
||||
JVM_VARIANT_KERNEL="@JVM_VARIANT_KERNEL@"
|
||||
JVM_VARIANT_ZERO="@JVM_VARIANT_ZERO@"
|
||||
JVM_VARIANT_ZEROSHARK="@JVM_VARIANT_ZEROSHARK@"
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT="@VARIANT@"
|
||||
# Legacy setting: true or false
|
||||
FASTDEBUG="@FASTDEBUG@"
|
||||
# Legacy setting: debugging the class files?
|
||||
DEBUG_CLASSFILES="@DEBUG_CLASSFILES@"
|
||||
# Legacy setting: -debug or -fastdebug
|
||||
BUILD_VARIANT_RELEASE="@BUILD_VARIANT_RELEASE@"
|
||||
|
||||
LANGTOOLS_OUTPUTDIR="@LANGTOOLS_OUTPUTDIR@"
|
||||
CORBA_OUTPUTDIR="@CORBA_OUTPUTDIR@"
|
||||
JAXP_OUTPUTDIR="@JAXP_OUTPUTDIR@"
|
||||
JAXWS_OUTPUTDIR="@JAXWS_OUTPUTDIR@"
|
||||
HOTSPOT_OUTPUTDIR="@HOTSPOT_OUTPUTDIR@"
|
||||
|
||||
# This where a working jvm is built.
|
||||
# You can run ${JDK_OUTPUTDIR}/bin/java
|
||||
# Though the layout of the contents of ${JDK_OUTPUTDIR} is not
|
||||
# yet the same as a default installation.
|
||||
JDK_OUTPUTDIR="@OUTPUT_ROOT@"/jdk
|
||||
|
||||
# When you run "make install" it will create the standardized
|
||||
# layout for the jdk and the jre inside the images subdir.
|
||||
# Then it will copy the contents of the jdk into the installation
|
||||
# directory.
|
||||
IMAGES_OUTPUTDIR="@OUTPUT_ROOT@"/images
|
||||
|
||||
LANGTOOLS_DIST="@LANGTOOLS_DIST@"
|
||||
CORBA_DIST="@CORBA_DIST@"
|
||||
JAXP_DIST="@JAXP_DIST@"
|
||||
JAXWS_DIST="@JAXWS_DIST@"
|
||||
HOTSPOT_DIST="@HOTSPOT_DIST@"
|
||||
|
||||
# Legacy variables used by Release.gmk
|
||||
JDK_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2sdk-image
|
||||
JRE_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2re-image
|
||||
|
||||
# Can be /sparcv9 or /amd64 on Solaris
|
||||
ISA_DIR="@LEGACY_OPENJDK_TARGET_CPU3@"
|
||||
BINDIR="${JDK_OUTPUTDIR}/bin${ISA_DIR}"
|
||||
|
||||
# The boot jdk to use
|
||||
ALT_BOOTDIR="@BOOT_JDK@"
|
||||
BOOT_JDK="@BOOT_JDK@"
|
||||
BOOT_JDK_JVMARGS="@BOOT_JDK_JVMARGS@"
|
||||
BOOT_RTJAR="@BOOT_RTJAR@"
|
||||
BOOT_TOOLSJAR="@BOOT_TOOLSJAR@"
|
||||
|
||||
# When compiling Java source to be run by the boot jdk
|
||||
# use these extra flags, eg -source 6 -target 6
|
||||
BOOT_JDK_SOURCETARGET="@BOOT_JDK_SOURCETARGET@"
|
||||
|
||||
# Information about the build system
|
||||
NUM_CORES="@NUM_CORES@"
|
||||
# This is used from the jdk build for C/C++ code.
|
||||
PARALLEL_COMPILE_JOBS="@CONCURRENT_BUILD_JOBS@"
|
||||
# Store javac server synchronization files here, and
|
||||
# the javac server log files.
|
||||
JAVAC_SERVERS="@JAVAC_SERVERS@"
|
||||
# Should we use a javac server or not? The javac server gives
|
||||
# an enormous performance improvement since it reduces the
|
||||
# startup costs of javac and reuses as much as possible of intermediate
|
||||
# compilation work. But if we want to compile with a non-Java
|
||||
# javac compiler, like gcj. Then we cannot use javac server and
|
||||
# this variable is set to false.
|
||||
JAVAC_USE_REMOTE="@JAVAC_USE_REMOTE@"
|
||||
# We can block the Javac server to never use more cores than this.
|
||||
# This is not for performance reasons, but for memory usage, since each
|
||||
# core requires its own JavaCompiler. We might have 64 cores and 4GB
|
||||
# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
|
||||
# Since there is no sharing of data between the JavaCompilers.
|
||||
JAVAC_SERVER_CORES="@JAVAC_SERVER_CORES@"
|
||||
# Should we use dependency tracking between Java packages? true or false.
|
||||
JAVAC_USE_DEPS="@JAVAC_USE_DEPS@"
|
||||
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
|
||||
JAVAC_USE_MODE="@JAVAC_USE_MODE@"
|
||||
# Enable not yet complete sjavac support.
|
||||
ENABLE_SJAVAC="@ENABLE_SJAVAC@"
|
||||
|
||||
# The OpenJDK makefiles should be changed to using the standard
|
||||
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
|
||||
# extract the information here.
|
||||
FREETYPE2_LIB_PATH="@FREETYPE2_LIB_PATH@"
|
||||
FREETYPE2_LIBS="@FREETYPE2_LIBS@"
|
||||
FREETYPE2_CFLAGS="@FREETYPE2_CFLAGS@"
|
||||
USING_SYSTEM_FT_LIB="@USING_SYSTEM_FT_LIB@"
|
||||
CUPS_CFLAGS="@CUPS_CFLAGS@"
|
||||
|
||||
PACKAGE_PATH="@PACKAGE_PATH@"
|
||||
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE="@CACERTS_FILE@"
|
||||
|
||||
#MOZILLA_HEADERS_PATH=
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS="@X_CFLAGS@"
|
||||
X_LIBS="@X_LIBS@"
|
||||
OPENWIN_HOME="@OPENWIN_HOME@"
|
||||
|
||||
# There are two types: CC or CL
|
||||
# CC is gcc and others behaving reasonably similar.
|
||||
# CL is cl.exe only.
|
||||
COMPILER_TYPE="@COMPILER_TYPE@"
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST="@C_O_FLAG_HIGHEST@"
|
||||
C_O_FLAG_HI="@C_O_FLAG_HI@"
|
||||
C_O_FLAG_NORM="@C_O_FLAG_NORM@"
|
||||
C_O_FLAG_NONE="@C_O_FLAG_NONE@"
|
||||
CXX_O_FLAG_HIGHEST="@CXX_O_FLAG_HIGHEST@"
|
||||
CXX_O_FLAG_HI="@CXX_O_FLAG_HI@"
|
||||
CXX_O_FLAG_NORM="@CXX_O_FLAG_NORM@"
|
||||
CXX_O_FLAG_NONE="@CXX_O_FLAG_NONE@"
|
||||
|
||||
C_FLAG_DEPS="@C_FLAG_DEPS@"
|
||||
CXX_FLAG_DEPS="@CXX_FLAG_DEPS@"
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC="@UNCYGDRIVE@ @CCACHE@ @CC@"
|
||||
|
||||
# CFLAGS used to compile the jdk native libraries (C-code)
|
||||
CFLAGS_JDKLIB="@CFLAGS_JDKLIB@"
|
||||
CXXFLAGS_JDKLIB="@CXXFLAGS_JDKLIB@"
|
||||
|
||||
# CFLAGS used to compile the jdk native launchers (C-code)
|
||||
CFLAGS_JDKEXE="@CFLAGS_JDKEXE@"
|
||||
CXXFLAGS_JDKEXE="@CXXFLAGS_JDKEXE@"
|
||||
|
||||
CXX="@UNCYGDRIVE@ @CCACHE@ @CXX@"
|
||||
#CXXFLAGS="@CXXFLAGS@"
|
||||
|
||||
OBJC="@CCACHE@ @OBJC@"
|
||||
#OBJCFLAGS="@OBJCFLAGS@"
|
||||
|
||||
CPP="@UNCYGDRIVE@ @CPP@"
|
||||
#CPPFLAGS="@CPPFLAGS@"
|
||||
|
||||
# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
|
||||
LD="@UNCYGDRIVE@ @LD@"
|
||||
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB="@LDFLAGS_JDKLIB@"
|
||||
LDFLAGS_JDKLIB_SUFFIX="@LDFLAGS_JDKLIB_SUFFIX@"
|
||||
|
||||
# On some platforms the linker cannot be used to create executables, thus
|
||||
# the need for a separate LDEXE command.
|
||||
LDEXE="@UNCYGDRIVE@ @LDEXE@"
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE="@LDFLAGS_JDKEXE@"
|
||||
LDFLAGS_JDKEXE_SUFFIX="@LDFLAGS_JDKEXE_SUFFIX@"
|
||||
|
||||
# Sometimes a different linker is needed for c++ libs
|
||||
LDCXX="@UNCYGDRIVE@ @LDCXX@"
|
||||
# The flags for linking libstdc++ linker.
|
||||
LIBCXX="@LIBCXX@"
|
||||
|
||||
# Sometimes a different linker is needed for c++ executables
|
||||
LDEXECXX="@UNCYGDRIVE@ @LDEXECXX@"
|
||||
|
||||
# If cross compiling, then define CROSS_COMPILE_ARCH=cpu_name here.
|
||||
# The HOSTCC should really be named BUILDCC, ie build executable for
|
||||
# the build platform. Same as CC when not cross compiling.
|
||||
HOSTCC="@HOSTCC@"
|
||||
HOSTCXX="@HOSTCXX@"
|
||||
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
|
||||
HOST_CC="@HOSTCC@"
|
||||
NIO_CC="@HOSTCC@"
|
||||
|
||||
AS="@AS@"
|
||||
ASFLAGS="@ASFLAGS@"
|
||||
|
||||
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
|
||||
AR="@UNCYGDRIVE@ @AR@"
|
||||
ARFLAGS="@ARFLAGS@"
|
||||
|
||||
NM="@NM@"
|
||||
STRIP="@STRIP@"
|
||||
MCS="@MCS@"
|
||||
|
||||
# Command to create a shared library
|
||||
SHARED_LIBRARY_FLAGS="@SHARED_LIBRARY_FLAGS@"
|
||||
|
||||
# Options to linker to specify a mapfile.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_MAPFILE="@SET_SHARED_LIBRARY_MAPFILE@"
|
||||
|
||||
# Options for C/CXX compiler to be used if linking is performed
|
||||
# using reorder file
|
||||
C_FLAG_REORDER="@C_FLAG_REORDER@"
|
||||
CXX_FLAG_REORDER="@CXX_FLAG_REORDER@"
|
||||
|
||||
#
|
||||
# Options for generating debug symbols
|
||||
ENABLE_DEBUG_SYMBOLS="@ENABLE_DEBUG_SYMBOLS@"
|
||||
CFLAGS_DEBUG_SYMBOLS="@CFLAGS_DEBUG_SYMBOLS@"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="@CXXFLAGS_DEBUG_SYMBOLS@"
|
||||
ZIP_DEBUGINFO_FILES="@ZIP_DEBUGINFO_FILES@"
|
||||
|
||||
# Options to linker to specify the library name.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_NAME="@SET_SHARED_LIBRARY_NAME@"
|
||||
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_ORIGIN="@SET_SHARED_LIBRARY_ORIGIN@"
|
||||
|
||||
# Different OS:es have different ways of naming shared libraries.
|
||||
# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
|
||||
# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SHARED_LIBRARY="@SHARED_LIBRARY@"
|
||||
STATIC_LIBRARY="@STATIC_LIBRARY@"
|
||||
LIBRARY_PREFIX="@LIBRARY_PREFIX@"
|
||||
SHARED_LIBRARY_SUFFIX="@SHARED_LIBRARY_SUFFIX@"
|
||||
STATIC_LIBRARY_SUFFIX="@STATIC_LIBRARY_SUFFIX@"
|
||||
EXE_SUFFIX="@EXE_SUFFIX@"
|
||||
OBJ_SUFFIX="@OBJ_SUFFIX@"
|
||||
|
||||
POST_STRIP_CMD="@POST_STRIP_CMD@"
|
||||
POST_MCS_CMD='@POST_MCS_CMD@'
|
||||
|
||||
JAVA_FLAGS="@BOOT_JDK_JVMARGS@"
|
||||
|
||||
JAVA="@UNCYGDRIVE@ @JAVA@ ${JAVA_FLAGS}"
|
||||
|
||||
JAVAC="@UNCYGDRIVE@ @JAVAC@"
|
||||
JAVAC_FLAGS="@JAVAC_FLAGS@"
|
||||
|
||||
JAVAH="@UNCYGDRIVE@ @JAVAH@"
|
||||
|
||||
JAR="@UNCYGDRIVE@ @JAR@"
|
||||
|
||||
RMIC="@UNCYGDRIVE@ @RMIC@"
|
||||
|
||||
NATIVE2ASCII="@UNCYGDRIVE@ @NATIVE2ASCII@"
|
||||
|
||||
BOOT_JAR_CMD="@UNCYGDRIVE@ @JAR@"
|
||||
BOOT_JAR_JFLAGS=
|
||||
|
||||
# Tools adhering to a minimal and common standard of posix compliance.
|
||||
AWK="@AWK@"
|
||||
CAT="@CAT@"
|
||||
CCACHE="@CCACHE@"
|
||||
# CD is going away, but remains to cater for legacy makefiles.
|
||||
CD=cd
|
||||
CHMOD="@CHMOD@"
|
||||
CP="@CP@"
|
||||
CPIO="@CPIO@"
|
||||
CUT="@CUT@"
|
||||
DATE="@DATE@"
|
||||
DF="@DF@"
|
||||
DIFF="@DIFF@"
|
||||
FIND="@FIND@"
|
||||
FIND_DELETE="@FIND_DELETE@"
|
||||
ECHO="@ECHO@"
|
||||
EGREP="@EGREP@"
|
||||
FGREP="@FGREP@"
|
||||
GREP="@GREP@"
|
||||
HEAD="@HEAD@"
|
||||
LS="@LS@"
|
||||
LN="@LN@"
|
||||
MKDIR="@MKDIR@"
|
||||
MV="@MV@"
|
||||
NAWK="@NAWK@"
|
||||
PRINTF="@PRINTF@"
|
||||
PWD="@THEPWDCMD@"
|
||||
RM="@RM@"
|
||||
SED="@SED@"
|
||||
SH="@SH@"
|
||||
SORT="@SORT@"
|
||||
TAR="@TAR@"
|
||||
TAIL="@TAIL@"
|
||||
TEE="@TEE@"
|
||||
TR="@TR@"
|
||||
TOUCH="@TOUCH@"
|
||||
WC="@WC@"
|
||||
XARGS="@XARGS@"
|
||||
ZIPEXE="@ZIP@"
|
||||
ZIP="@ZIP@"
|
||||
UNZIP="@UNZIP@"
|
||||
MT="@UNCYGDRIVE@ @MT@"
|
||||
RC="@UNCYGDRIVE@ @RC@"
|
||||
DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
|
||||
CYGPATH="@CYGPATH@"
|
||||
LDD="@LDD@"
|
||||
OTOOL="@OTOOL@"
|
||||
READELF="@READELF@"
|
||||
EXPR="@EXPR@"
|
||||
FILE="@FILE@"
|
||||
HG="@HG@"
|
||||
OBJCOPY="@OBJCOPY@"
|
||||
|
||||
UNCYGDRIVE="@UNCYGDRIVE@"
|
||||
|
||||
# Build setup
|
||||
ENABLE_DOCS="@ENABLE_DOCS@"
|
||||
GENERATE_DOCS="@ENABLE_DOCS@"
|
||||
DISABLE_NIMBUS="@DISABLE_NIMBUS@"
|
||||
USE_EXTERNAL_LIBJPEG="@USE_EXTERNAL_LIBJPEG@"
|
||||
USE_EXTERNAL_LIBGIF="@USE_EXTERNAL_LIBGIF@"
|
||||
USE_EXTERNAL_LIBZ="@USE_EXTERNAL_LIBZ@"
|
||||
LIBZIP_CAN_USE_MMAP="@LIBZIP_CAN_USE_MMAP@"
|
||||
CHECK_FOR_VCINSTALLDIR="@CHECK_FOR_VCINSTALLDIR@"
|
||||
MSVCRNN_DLL="@MSVCR100DLL@"
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Legacy Hotspot support
|
||||
|
||||
HOTSPOT_DIST="@HOTSPOT_DIST@"
|
||||
HOTSPOT_MAKE_ARGS="@HOTSPOT_MAKE_ARGS@"
|
||||
# This is used from the libjvm build for C/C++ code.
|
||||
HOTSPOT_BUILD_JOBS="@CONCURRENT_BUILD_JOBS@"
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD="@TEST_IN_BUILD@"
|
||||
|
||||
####################################################
|
||||
#
|
||||
# INSTALLATION
|
||||
#
|
||||
|
||||
# Common prefix for all installed files. Defaults to /usr/local,
|
||||
# but /opt/myjdk is another common version.
|
||||
INSTALL_PREFIX="@prefix@"
|
||||
|
||||
# Directories containing architecture-dependent files should be relative to exec_prefix
|
||||
INSTALL_EXECPREFIX="@exec_prefix@"
|
||||
|
||||
# java,javac,javah,javap etc are installed here.
|
||||
INSTALL_BINDIR="@bindir@"
|
||||
|
||||
# Read only architecture-independent data
|
||||
INSTALL_DATADIR="@datadir@"
|
||||
|
||||
# Root of above.
|
||||
INSTALL_DATAROOTDIR="@datarootdir@"
|
||||
|
||||
# Doc files, other than info and man.
|
||||
INSTALL_DOCDIR="@docdir@"
|
||||
|
||||
# Html documentation
|
||||
INSTALL_HTMLDIR="@htmldir@"
|
||||
|
||||
# Installing C header files, JNI headers for example.
|
||||
INSTALL_INCLUDEDIR="@includedir@"
|
||||
|
||||
# Installing library files....
|
||||
INSTALL_INCLUDEDIR="@libdir@"
|
||||
|
||||
# Executables that other programs run.
|
||||
INSTALL_LIBEXECDIR="@libexecdir@"
|
||||
|
||||
# Locale-dependent but architecture-independent data, such as message catalogs.
|
||||
INSTALL_LOCALEDIR="@localedir@"
|
||||
|
||||
# Modifiable single-machine data
|
||||
INSTALL_LOCALSTATEDIR="@localstatedir@"
|
||||
|
||||
# Man pages
|
||||
INSTALL_MANDIR="@mandir@"
|
||||
|
||||
# Modifiable architecture-independent data.
|
||||
INSTALL_SHAREDSTATEDIR="@sharedstatedir@"
|
||||
|
||||
# Read-only single-machine data
|
||||
INSTALL_SYSCONFDIR="@sysconfdir@"
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Misc
|
||||
#
|
||||
|
||||
# Name of Service Agent library
|
||||
SALIB_NAME="@SALIB_NAME@"
|
||||
|
||||
OS_VERSION_MAJOR="@OS_VERSION_MAJOR@"
|
||||
OS_VERSION_MINOR="@OS_VERSION_MINOR@"
|
||||
OS_VERSION_MICRO="@OS_VERSION_MICRO@"
|
||||
908
common/autoconf/toolchain.m4
Normal file
908
common/autoconf/toolchain.m4
Normal file
@@ -0,0 +1,908 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
[
|
||||
|
||||
# Check if the VS env variables were setup prior to running configure.
|
||||
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
||||
# the set env variables into the spec file.
|
||||
SETUPDEVENV="# No special vars"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# If vcvarsall.bat has been run, then VCINSTALLDIR is set.
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
# No further setup is needed. The build will happen from this kind
|
||||
# of shell.
|
||||
SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
|
||||
# Make sure to remind you, if you forget to run make from a cygwin bash shell
|
||||
# that is spawned "bash -l" from a VS command prompt.
|
||||
CHECK_FOR_VCINSTALLDIR=yes
|
||||
AC_MSG_CHECKING([if you are running from within a VS command prompt])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
# Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
|
||||
SEARCH_ROOT="$VS100COMNTOOLS"
|
||||
else
|
||||
VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
|
||||
SEARCH_ROOT="$PROGRAMFILES"
|
||||
fi
|
||||
VCPATH=`dirname "$VARSBAT"`
|
||||
VCPATH=`cygpath -w "$VCPATH"`
|
||||
if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
|
||||
AC_MSG_CHECKING([if we can find the VS installation])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
|
||||
fi
|
||||
case "$LEGACY_OPENJDK_TARGET_CPU1" in
|
||||
i?86)
|
||||
VARSBAT_ARCH=x86
|
||||
;;
|
||||
*)
|
||||
VARSBAT_ARCH=$LEGACY_OPENJDK_TARGET_CPU1
|
||||
;;
|
||||
esac
|
||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||
cd $OUTPUT_ROOT
|
||||
bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
|
||||
cd $CURDIR
|
||||
if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
|
||||
AC_MSG_CHECKING([if we can extract the needed env variables])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
|
||||
fi
|
||||
# Now set all paths and other env variables. This will allow the rest of
|
||||
# the configure script to find and run the compiler in the proper way.
|
||||
. $OUTPUT_ROOT/localdevenv.sh
|
||||
AC_MSG_CHECKING([if we can find the VS installation])
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
AC_MSG_RESULT([$VCINSTALLDIR])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
|
||||
fi
|
||||
CHECK_FOR_VCINSTALLDIR=no
|
||||
SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
|
||||
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll],
|
||||
[copy this msvcr100.dll into the built JDK])])
|
||||
if test "x$with_msvcr100dll" != x; then
|
||||
MSVCR100DLL="$with_msvcr100dll"
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
|
||||
else
|
||||
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
|
||||
if test "x$MSVCR100DLL" = x; then
|
||||
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR100DLL" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find msvcr100.dll !])
|
||||
fi
|
||||
AC_MSG_RESULT([$MSVCR100DLL])
|
||||
SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SETUPDEVENV)
|
||||
AC_SUBST(CHECK_FOR_VCINSTALLDIR)
|
||||
AC_SUBST(MSVCR100DLL)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Configure the development tool paths and potential sysroot.
|
||||
#
|
||||
AC_LANG(C++)
|
||||
DEVKIT=
|
||||
SYS_ROOT=/
|
||||
AC_SUBST(SYS_ROOT)
|
||||
|
||||
# The option used to specify the target .o,.a or .so file.
|
||||
# When compiling, how to specify the to be created object file.
|
||||
CC_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the to be created executable.
|
||||
EXE_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the to be created dynamically linkable library.
|
||||
LD_OUT_OPTION='-o$(SPACE)'
|
||||
# When archiving, how to specify the to be create static archive for object files.
|
||||
AR_OUT_OPTION='rcs$(SPACE)'
|
||||
AC_SUBST(CC_OUT_OPTION)
|
||||
AC_SUBST(EXE_OUT_OPTION)
|
||||
AC_SUBST(LD_OUT_OPTION)
|
||||
AC_SUBST(AR_OUT_OPTION)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_PATHS],
|
||||
[
|
||||
# If --build AND --host is set, then the configure script will find any
|
||||
# cross compilation tools in the PATH. Cross compilation tools
|
||||
# follows the cross compilation standard where they are prefixed with ${host}.
|
||||
# For example the binary i686-sun-solaris2.10-gcc
|
||||
# will cross compile for i686-sun-solaris2.10
|
||||
# If neither of build and host is not set, then build=host and the
|
||||
# default compiler found in the path will be used.
|
||||
# Setting only --host, does not seem to be really supported.
|
||||
# Please set both --build and --host if you want to cross compile.
|
||||
|
||||
DEFINE_CROSS_COMPILE_ARCH=""
|
||||
HOSTCC=""
|
||||
HOSTCXX=""
|
||||
HOSTLD=""
|
||||
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
|
||||
AC_MSG_CHECKING([if this is a cross compile])
|
||||
if test "x$OPENJDK_BUILD_SYSTEM" != "x$OPENJDK_TARGET_SYSTEM"; then
|
||||
AC_MSG_RESULT([yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM])
|
||||
# We have detected a cross compile!
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_OPENJDK_TARGET_CPU1"
|
||||
# Now we to find a C/C++ compiler that can build executables for the build
|
||||
# platform. We can't use the AC_PROG_CC macro, since it can only be used
|
||||
# once.
|
||||
AC_PATH_PROGS(HOSTCC, [cl cc gcc])
|
||||
WHICHCMD(HOSTCC)
|
||||
AC_PATH_PROGS(HOSTCXX, [cl CC g++])
|
||||
WHICHCMD(HOSTCXX)
|
||||
AC_PATH_PROG(HOSTLD, ld)
|
||||
WHICHCMD(HOSTLD)
|
||||
# Building for the build platform should be easy. Therefore
|
||||
# we do not need any linkers or assemblers etc.
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
# You can force the sys-root if the sys-root encoded into the cross compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[pass this sys-root to the compilers and linker (useful if the sys-root encoded in
|
||||
the cross compiler tools is incorrect)])])
|
||||
|
||||
if test "x$with_sys_root" != x; then
|
||||
SYS_ROOT=$with_sys_root
|
||||
fi
|
||||
|
||||
# If a devkit is found on the builddeps server, then prepend its path to the
|
||||
# PATH variable. If there are cross compilers available in the devkit, these
|
||||
# will be found by AC_PROG_CC et al.
|
||||
BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
|
||||
[# Found devkit
|
||||
PATH="$DEVKIT/bin:$PATH"
|
||||
SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
|
||||
if test "x$x_includes" = "xNONE"; then
|
||||
x_includes="$SYS_ROOT/usr/include/X11"
|
||||
fi
|
||||
if test "x$x_libraries" = "xNONE"; then
|
||||
x_libraries="$SYS_ROOT/usr/lib"
|
||||
fi
|
||||
],
|
||||
[])
|
||||
|
||||
if test "x$SYS_ROOT" != "x/" ; then
|
||||
CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
|
||||
CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
|
||||
OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
|
||||
OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
|
||||
CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
|
||||
LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
|
||||
fi
|
||||
|
||||
# Store the CFLAGS etal passed to the configure script.
|
||||
ORG_CFLAGS="$CFLAGS"
|
||||
ORG_CXXFLAGS="$CXXFLAGS"
|
||||
ORG_OBJCFLAGS="$OBJCFLAGS"
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[search this directory for compilers and tools])], [TOOLS_DIR=$with_tools_dir])
|
||||
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this directory as base for tools-dir and sys-root])], [
|
||||
if test "x$with_sys_root" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
|
||||
fi
|
||||
if test "x$with_tools_dir" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
|
||||
fi
|
||||
TOOLS_DIR=$with_devkit/bin
|
||||
SYS_ROOT=$with_devkit/$host_alias/libc
|
||||
])
|
||||
|
||||
# autoconf magic only relies on PATH, so update it if tools dir is specified
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLS_DIR" != x; then
|
||||
PATH=$TOOLS_DIR:$PATH
|
||||
fi
|
||||
|
||||
# gcc is almost always present, but on Windows we
|
||||
# prefer cl.exe and on Solaris we prefer CC.
|
||||
# Thus test for them in this order.
|
||||
AC_PROG_CC([cl cc gcc])
|
||||
if test "x$CC" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find a compiler. $HELP_MSG])
|
||||
fi
|
||||
if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
# Do not use cc on MacOSX use gcc instead.
|
||||
CC="gcc"
|
||||
fi
|
||||
WHICHCMD(CC)
|
||||
|
||||
AC_PROG_CXX([cl CC g++])
|
||||
if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
# The found CC, even though it seems to be a g++ derivate, cannot compile
|
||||
# c++ code. Override.
|
||||
CXX="g++"
|
||||
fi
|
||||
WHICHCMD(CXX)
|
||||
|
||||
if test "x$CXX" = x || test "x$CC" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
AC_PROG_OBJC
|
||||
WHICHCMD(OBJC)
|
||||
else
|
||||
OBJC=
|
||||
fi
|
||||
|
||||
# Restore the flags to the user specified values.
|
||||
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
|
||||
CFLAGS="$ORG_CFLAGS"
|
||||
CXXFLAGS="$ORG_CXXFLAGS"
|
||||
OBJCFLAGS="$ORG_OBJCFLAGS"
|
||||
|
||||
# If we are not cross compiling, use the same compilers for
|
||||
# building the build platform executables.
|
||||
if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
|
||||
HOSTCC="$CC"
|
||||
HOSTCXX="$CXX"
|
||||
fi
|
||||
|
||||
AC_CHECK_TOOL(LD, ld)
|
||||
WHICHCMD(LD)
|
||||
LD="$CC"
|
||||
LDEXE="$CC"
|
||||
LDCXX="$CXX"
|
||||
LDEXECXX="$CXX"
|
||||
# LDEXE is the linker to use, when creating executables.
|
||||
AC_SUBST(LDEXE)
|
||||
# Linking C++ libraries.
|
||||
AC_SUBST(LDCXX)
|
||||
# Linking C++ executables.
|
||||
AC_SUBST(LDEXECXX)
|
||||
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
WHICHCMD(AR)
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
ARFLAGS="-r"
|
||||
else
|
||||
ARFLAGS=""
|
||||
fi
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
COMPILER_NAME=gcc
|
||||
COMPILER_TYPE=CC
|
||||
AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
|
||||
# For now, assume that we are always compiling using cl.exe.
|
||||
CC_OUT_OPTION=-Fo
|
||||
EXE_OUT_OPTION=-out:
|
||||
LD_OUT_OPTION=-out:
|
||||
AR_OUT_OPTION=-out:
|
||||
# On Windows, reject /usr/bin/link, which is a cygwin
|
||||
# program for something completely different.
|
||||
AC_CHECK_PROG([WINLD], [link],[link],,, [/usr/bin/link])
|
||||
# Since we must ignore the first found link, WINLD will contain
|
||||
# the full path to the link.exe program.
|
||||
WHICHCMD_SPACESAFE([WINLD])
|
||||
LD="$WINLD"
|
||||
LDEXE="$WINLD"
|
||||
LDCXX="$WINLD"
|
||||
LDEXECXX="$WINLD"
|
||||
# Set HOSTLD to same as LD until we fully support cross compilation
|
||||
# on windows.
|
||||
HOSTLD="$WINLD"
|
||||
|
||||
AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
|
||||
WHICHCMD_SPACESAFE([MT])
|
||||
# The resource compiler
|
||||
AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
|
||||
WHICHCMD_SPACESAFE([RC])
|
||||
|
||||
RC_FLAGS="-nologo /l 0x409 /r"
|
||||
AS_IF([test "x$VARIANT" = xOPT], [
|
||||
RC_FLAGS="$RC_FLAGS -d NDEBUG"
|
||||
])
|
||||
JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
|
||||
AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
|
||||
JDK_UPDATE_VERSION_NOTNULL=0
|
||||
])
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
|
||||
RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
|
||||
|
||||
# lib.exe is used to create static libraries.
|
||||
AC_CHECK_PROG([WINAR], [lib],[lib],,,)
|
||||
WHICHCMD_SPACESAFE([WINAR])
|
||||
AR="$WINAR"
|
||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
||||
|
||||
AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
|
||||
WHICHCMD_SPACESAFE([DUMPBIN])
|
||||
|
||||
COMPILER_TYPE=CL
|
||||
CCXXFLAGS="$CCXXFLAGS -nologo"
|
||||
])
|
||||
AC_SUBST(RC_FLAGS)
|
||||
AC_SUBST(COMPILER_TYPE)
|
||||
|
||||
AC_PROG_CPP
|
||||
WHICHCMD(CPP)
|
||||
|
||||
AC_PROG_CXXCPP
|
||||
WHICHCMD(CXXCPP)
|
||||
|
||||
# for solaris we really need solaris tools, and not gnu equivalent
|
||||
# these seems to normally reside in /usr/ccs/bin so add that to path before
|
||||
# starting to probe
|
||||
#
|
||||
# NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
|
||||
# so that it can be overriden --with-tools-dir
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
|
||||
fi
|
||||
|
||||
# Find the right assembler.
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
AC_PATH_PROG(AS, as)
|
||||
WHICHCMD(AS)
|
||||
ASFLAGS=" "
|
||||
else
|
||||
AS="$CC -c"
|
||||
ASFLAGS=" "
|
||||
fi
|
||||
AC_SUBST(AS)
|
||||
AC_SUBST(ASFLAGS)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
AC_PATH_PROG(NM, nm)
|
||||
WHICHCMD(NM)
|
||||
AC_PATH_PROG(STRIP, strip)
|
||||
WHICHCMD(STRIP)
|
||||
AC_PATH_PROG(MCS, mcs)
|
||||
WHICHCMD(MCS)
|
||||
else
|
||||
AC_CHECK_TOOL(NM, nm)
|
||||
WHICHCMD(NM)
|
||||
AC_CHECK_TOOL(STRIP, strip)
|
||||
WHICHCMD(STRIP)
|
||||
fi
|
||||
|
||||
###
|
||||
#
|
||||
# Check for objcopy
|
||||
#
|
||||
# but search for gobjcopy first...
|
||||
# since I on solaris found a broken objcopy...buhh
|
||||
#
|
||||
AC_PATH_TOOL(OBJCOPY, gobjcopy)
|
||||
if test "x$OBJCOPY" = x; then
|
||||
AC_PATH_TOOL(OBJCOPY, objcopy)
|
||||
fi
|
||||
|
||||
# Restore old path without tools dir
|
||||
PATH="$OLD_PATH"
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# How to compile shared libraries.
|
||||
#
|
||||
|
||||
if test "x$GCC" = xyes; then
|
||||
COMPILER_NAME=gcc
|
||||
PICFLAG="-fPIC"
|
||||
LIBRARY_PREFIX=lib
|
||||
SHARED_LIBRARY='lib[$]1.so'
|
||||
STATIC_LIBRARY='lib[$]1.a'
|
||||
SHARED_LIBRARY_FLAGS="-shared"
|
||||
SHARED_LIBRARY_SUFFIX='.so'
|
||||
STATIC_LIBRARY_SUFFIX='.a'
|
||||
OBJ_SUFFIX='.o'
|
||||
EXE_SUFFIX=''
|
||||
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/[$]1'
|
||||
LD="$CC"
|
||||
LDEXE="$CC"
|
||||
LDCXX="$CXX"
|
||||
LDEXECXX="$CXX"
|
||||
POST_STRIP_CMD="$STRIP -g"
|
||||
if test "x$JDK_VARIANT" = xembedded; then
|
||||
POST_STRIP_CMD="$STRIP --strip-unneeded"
|
||||
fi
|
||||
|
||||
# Linking is different on MacOSX
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
# Might change in the future to clang.
|
||||
COMPILER_NAME=gcc
|
||||
SHARED_LIBRARY='lib[$]1.dylib'
|
||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||
SHARED_LIBRARY_SUFFIX='.dylib'
|
||||
EXE_SUFFIX=''
|
||||
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
|
||||
POST_STRIP_CMD="$STRIP -S"
|
||||
fi
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
# If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
|
||||
COMPILER_NAME=ossc
|
||||
PICFLAG="-KPIC"
|
||||
LIBRARY_PREFIX=lib
|
||||
SHARED_LIBRARY='lib[$]1.so'
|
||||
STATIC_LIBRARY='lib[$]1.a'
|
||||
SHARED_LIBRARY_FLAGS="-z defs -xildoff -ztext -G"
|
||||
SHARED_LIBRARY_SUFFIX='.so'
|
||||
STATIC_LIBRARY_SUFFIX='.a'
|
||||
OBJ_SUFFIX='.o'
|
||||
EXE_SUFFIX=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
|
||||
C_FLAG_REORDER='-xF'
|
||||
CXX_FLAG_REORDER='-xF'
|
||||
SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/[$]1'
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
|
||||
CFLAGS_JDKLIB_EXTRA='-xstrconst'
|
||||
POST_STRIP_CMD="$STRIP -x"
|
||||
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
|
||||
fi
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
# If it is not gcc, then assume it is the MS Visual Studio compiler
|
||||
COMPILER_NAME=cl
|
||||
PICFLAG=""
|
||||
LIBRARY_PREFIX=
|
||||
SHARED_LIBRARY='[$]1.dll'
|
||||
STATIC_LIBRARY='[$]1.lib'
|
||||
SHARED_LIBRARY_FLAGS="-LD"
|
||||
SHARED_LIBRARY_SUFFIX='.dll'
|
||||
STATIC_LIBRARY_SUFFIX='.lib'
|
||||
OBJ_SUFFIX='.obj'
|
||||
EXE_SUFFIX='.exe'
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(OBJ_SUFFIX)
|
||||
AC_SUBST(SHARED_LIBRARY)
|
||||
AC_SUBST(STATIC_LIBRARY)
|
||||
AC_SUBST(LIBRARY_PREFIX)
|
||||
AC_SUBST(SHARED_LIBRARY_SUFFIX)
|
||||
AC_SUBST(STATIC_LIBRARY_SUFFIX)
|
||||
AC_SUBST(EXE_SUFFIX)
|
||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
|
||||
AC_SUBST(C_FLAG_REORDER)
|
||||
AC_SUBST(CXX_FLAG_REORDER)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(POST_STRIP_CMD)
|
||||
AC_SUBST(POST_MCS_CMD)
|
||||
|
||||
# The (cross) compiler is now configured, we can now test capabilities
|
||||
# of the target platform.
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the opt flags for different compilers
|
||||
# and different operating systems.
|
||||
#
|
||||
C_FLAG_DEPS="-MMD -MF"
|
||||
CXX_FLAG_DEPS="-MMD -MF"
|
||||
|
||||
case $COMPILER_TYPE in
|
||||
CC )
|
||||
D_FLAG="-g"
|
||||
case $COMPILER_NAME in
|
||||
gcc )
|
||||
case $OPENJDK_TARGET_OS in
|
||||
macosx )
|
||||
# On MacOSX we optimize for size, something
|
||||
# we should do for all platforms?
|
||||
C_O_FLAG_HI="-Os"
|
||||
C_O_FLAG_NORM="-Os"
|
||||
C_O_FLAG_NONE=""
|
||||
;;
|
||||
*)
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_NONE="-O0"
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
CXXFLAGS_DEBUG_SYMBOLSG="-g1"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
CXX_O_FLAG_HI="$C_O_FLAG_HI"
|
||||
CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
|
||||
;;
|
||||
ossc )
|
||||
#
|
||||
# Forte has different names for this with their C++ compiler...
|
||||
#
|
||||
C_FLAG_DEPS="-xMMD -xMF"
|
||||
CXX_FLAG_DEPS="-xMMD -xMF"
|
||||
|
||||
# Extra options used with HIGHEST
|
||||
#
|
||||
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
|
||||
# done with care, there are some assumptions below that need to
|
||||
# be understood about the use of pointers, and IEEE behavior.
|
||||
#
|
||||
# Use non-standard floating point mode (not IEEE 754)
|
||||
CC_HIGHEST="$CC_HIGHEST -fns"
|
||||
# Do some simplification of floating point arithmetic (not IEEE 754)
|
||||
CC_HIGHEST="$CC_HIGHEST -fsimple"
|
||||
# Use single precision floating point with 'float'
|
||||
CC_HIGHEST="$CC_HIGHEST -fsingle"
|
||||
# Assume memory references via basic pointer types do not alias
|
||||
# (Source with excessing pointer casting and data access with mixed
|
||||
# pointer types are not recommended)
|
||||
CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
|
||||
# Use intrinsic or inline versions for math/std functions
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
|
||||
# Loop data dependency optimizations (need -xO3 or higher)
|
||||
CC_HIGHEST="$CC_HIGHEST -xdepend"
|
||||
# Pointer parameters to functions do not overlap
|
||||
# (Similar to -xalias_level=basic usage, but less obvious sometimes.
|
||||
# If you pass in multiple pointers to the same data, do not use this)
|
||||
CC_HIGHEST="$CC_HIGHEST -xrestrict"
|
||||
# Inline some library routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
CC_HIGHEST="$CC_HIGHEST -xlibmil"
|
||||
# Use optimized math routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
|
||||
|
||||
case $LEGACY_OPENJDK_TARGET_CPU1 in
|
||||
i586)
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
|
||||
C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
|
||||
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
|
||||
C_O_FLAG_NONE=""
|
||||
CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
|
||||
CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
|
||||
CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
|
||||
CXX_O_FLAG_NONE=""
|
||||
;;
|
||||
sparc)
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
|
||||
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
|
||||
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NONE=""
|
||||
CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
|
||||
CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
|
||||
CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
|
||||
CXX_O_FLAG_NONE=""
|
||||
;;
|
||||
esac
|
||||
|
||||
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||
esac
|
||||
;;
|
||||
CL )
|
||||
D_FLAG=
|
||||
C_O_FLAG_HI="-O2"
|
||||
C_O_FLAG_NORM="-O1"
|
||||
C_O_FLAG_NONE="-Od"
|
||||
CXX_O_FLAG_HI="$C_O_FLAG_HI"
|
||||
CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$C_O_FLAG_HIGHEST"; then
|
||||
C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
|
||||
fi
|
||||
|
||||
if test -z "$CXX_O_FLAG_HIGHEST"; then
|
||||
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
|
||||
fi
|
||||
|
||||
AC_SUBST(C_O_FLAG_HIGHEST)
|
||||
AC_SUBST(C_O_FLAG_HI)
|
||||
AC_SUBST(C_O_FLAG_NORM)
|
||||
AC_SUBST(C_O_FLAG_NONE)
|
||||
AC_SUBST(CXX_O_FLAG_HIGHEST)
|
||||
AC_SUBST(CXX_O_FLAG_HI)
|
||||
AC_SUBST(CXX_O_FLAG_NORM)
|
||||
AC_SUBST(CXX_O_FLAG_NONE)
|
||||
AC_SUBST(C_FLAG_DEPS)
|
||||
AC_SUBST(CXX_FLAG_DEPS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
[
|
||||
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags"])
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags"])
|
||||
fi
|
||||
|
||||
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags"])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
|
||||
[extra flags to be used when compiling jdk c-files])])
|
||||
|
||||
AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
|
||||
[extra flags to be used when compiling jdk c++-files])])
|
||||
|
||||
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
|
||||
[extra flags to be used when linking jdk])])
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Now setup the CFLAGS and LDFLAGS for the JDK build.
|
||||
# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
|
||||
#
|
||||
case $COMPILER_NAME in
|
||||
gcc )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
|
||||
-pipe \
|
||||
-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
case $OPENJDK_TARGET_CPU_ARCH in
|
||||
arm )
|
||||
# on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
ppc )
|
||||
# on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
|
||||
;;
|
||||
* )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ossc )
|
||||
CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
|
||||
;;
|
||||
cl )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
|
||||
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
|
||||
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||
-DWIN32 -DIAL"
|
||||
case $LEGACY_OPENJDK_TARGET_CPU1 in
|
||||
i?86 )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
|
||||
;;
|
||||
amd64 )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Cross-compile arch specific flags
|
||||
|
||||
#
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DJAVASE_EMBEDDED"
|
||||
fi
|
||||
|
||||
case $OPENJDK_TARGET_CPU_ARCH in
|
||||
arm )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
|
||||
;;
|
||||
ppc )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
|
||||
;;
|
||||
esac
|
||||
|
||||
###############################################################################
|
||||
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
|
||||
|
||||
# The package path is used only on macosx?
|
||||
PACKAGE_PATH=/opt/local
|
||||
AC_SUBST(PACKAGE_PATH)
|
||||
|
||||
# Sometimes we use a cpu dir (.../lib/amd64/server)
|
||||
# Sometimes not (.../lib/server)
|
||||
LIBARCHDIR="$LEGACY_OPENJDK_TARGET_CPU2/"
|
||||
if test "x$ENDIAN" = xlittle; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
|
||||
LIBARCHDIR=""
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
|
||||
fi
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
|
||||
fi
|
||||
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_OPENJDK_TARGET_CPU1\"' -D$LEGACY_OPENJDK_TARGET_CPU1"
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
|
||||
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
|
||||
-I${JDK_OUTPUTDIR}/include \
|
||||
-I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
|
||||
-I${JDK_TOPDIR}/src/share/javavm/export \
|
||||
-I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/javavm/export \
|
||||
-I${JDK_TOPDIR}/src/share/native/common \
|
||||
-I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/native/common"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
|
||||
|
||||
# Executable flags
|
||||
CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
|
||||
CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
|
||||
|
||||
# Now this is odd. The JDK native libraries have to link against libjvm.so
|
||||
# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
|
||||
# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
|
||||
# is identical for client and server? Yes. Which is picked at runtime (client or server)?
|
||||
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
|
||||
# libraries will link to whatever is in memory. Yuck.
|
||||
#
|
||||
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
|
||||
if test "x$COMPILER_TYPE" = xCL; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
|
||||
if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
|
||||
fi
|
||||
# TODO: make -debug optional "--disable-full-debug-symbols"
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -debug"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
|
||||
LDFLAGS_JDKLIB_SUFFIX=""
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
LDFLAGS_STACK_SIZE=1048576
|
||||
else
|
||||
LDFLAGS_STACK_SIZE=327680
|
||||
fi
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
|
||||
else
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both, why?
|
||||
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
|
||||
if test -n "$HAS_GNU_HASH"; then
|
||||
# And since we now know that the linker is gnu, then add -z defs, to forbid
|
||||
# undefined symbols in object files.
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
|
||||
if test "x$DEBUG_LEVEL" == "xrelease"; then
|
||||
# When building release libraries, tell the linker optimize them.
|
||||
# Should this be supplied to the OSS linker as well?
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
|
||||
fi
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
|
||||
-L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
|
||||
-L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
|
||||
-L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
|
||||
LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
|
||||
if test "x$COMPILER_NAME" = xossc; then
|
||||
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
|
||||
fi
|
||||
|
||||
# Only the jli library is explicitly linked when the launchers are built.
|
||||
# The libjvm is then dynamically loaded/linked by the launcher.
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
|
||||
if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
|
||||
LDFLAGS_JDKEXE_SUFFIX="-ljli"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Adjust flags according to debug level.
|
||||
case $DEBUG_LEVEL in
|
||||
fastdebug )
|
||||
CFLAGS="$CFLAGS $D_FLAG"
|
||||
JAVAC_FLAGS="$JAVAC_FLAGS -g"
|
||||
;;
|
||||
slowdebug )
|
||||
CFLAGS="$CFLAGS $D_FLAG"
|
||||
C_O_FLAG_HI="$C_O_FLAG_NONE"
|
||||
C_O_FLAG_NORM="$C_O_FLAG_NONE"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
|
||||
CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
|
||||
JAVAC_FLAGS="$JAVAC_FLAGS -g"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_SUBST(CFLAGS_JDKLIB)
|
||||
AC_SUBST(CFLAGS_JDKEXE)
|
||||
|
||||
AC_SUBST(CXXFLAGS_JDKLIB)
|
||||
AC_SUBST(CXXFLAGS_JDKEXE)
|
||||
|
||||
AC_SUBST(LDFLAGS_JDKLIB)
|
||||
AC_SUBST(LDFLAGS_JDKEXE)
|
||||
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
|
||||
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
|
||||
])
|
||||
36
common/autoconf/version.numbers
Normal file
36
common/autoconf/version.numbers
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
JDK_MAJOR_VERSION=1
|
||||
JDK_MINOR_VERSION=8
|
||||
JDK_MICRO_VERSION=0
|
||||
JDK_UPDATE_VERSION=
|
||||
JDK_BUILD_NUMBER=
|
||||
MILESTONE=internal
|
||||
LAUNCHER_NAME=openjdk
|
||||
PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
235
common/bin/compare-objects.sh
Normal file
235
common/bin/compare-objects.sh
Normal file
@@ -0,0 +1,235 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# MANUAL
|
||||
#
|
||||
# ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir
|
||||
#
|
||||
# Compares object files
|
||||
#
|
||||
|
||||
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "bash ./common/bin/compare-build.sh old_jdk_build_dir new_jdk_build_dir"
|
||||
echo ""
|
||||
echo "Compare object files"
|
||||
echo ""
|
||||
exit 10
|
||||
fi
|
||||
|
||||
#######
|
||||
#
|
||||
# List of files (grep patterns) that are ignored
|
||||
#
|
||||
# 1) hotspot object files
|
||||
IGNORE="-e hotspot"
|
||||
|
||||
# 2) various build artifacts: sizer.32.o sizer.64.o dummyodbc.o
|
||||
# these are produced during build and then e.g run to produce other data
|
||||
# i.e not directly put into build => safe to ignore
|
||||
IGNORE="${IGNORE} -e sizer.32.o -e sizer.64.o"
|
||||
IGNORE="${IGNORE} -e dummyodbc.o"
|
||||
IGNORE="${IGNORE} -e genSolarisConstants.o"
|
||||
IGNORE="${IGNORE} -e genUnixConstants.o"
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
shift; shift
|
||||
PATTERN="$*"
|
||||
|
||||
if [ -f $NEW/spec.sh ]; then
|
||||
. $NEW/spec.sh
|
||||
elif [ -f $NEW/../../spec.sh ]; then
|
||||
. $NEW/../../spec.sh
|
||||
elif [ -f $OLD/spec.sh ]; then
|
||||
. $OLD/spec.sh
|
||||
elif [ -f $OLD/../../spec.sh ]; then
|
||||
. $OLD/../../spec.sh
|
||||
else
|
||||
echo "Unable to find spec.sh"
|
||||
echo "Giving up"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export COMPARE_ROOT=/tmp/cimages.$USER/objects
|
||||
mkdir -p $COMPARE_ROOT
|
||||
|
||||
(${CD} $OLD && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.old
|
||||
(${CD} $NEW && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.new
|
||||
|
||||
# On macosx JobjC is build in both i386 and x86_64 variant (universial binary)
|
||||
# but new build only builds the x86_64
|
||||
# Remove the 386 variants from comparison...to avoid "false" positives
|
||||
${GREP} -v 'JObjC.dst/Objects-normal/i386' $COMPARE_ROOT/list.old > $COMPARE_ROOT/list.old.new
|
||||
${CP} $COMPARE_ROOT/list.old $COMPARE_ROOT/list.old.full
|
||||
${CP} $COMPARE_ROOT/list.old.new $COMPARE_ROOT/list.old
|
||||
|
||||
findnew() {
|
||||
arg_1=$1
|
||||
arg_2=$2
|
||||
|
||||
# special case 1 unpack-cmd => unpackexe
|
||||
arg_1=`${ECHO} $arg_1 | ${SED} 's!unpack-cmd!unpackexe!g'`
|
||||
arg_2=`${ECHO} $arg_2 | ${SED} 's!unpack-cmd!unpackexe!g'`
|
||||
|
||||
# special case 2 /JObjC.dst/ => /libjobjc/
|
||||
arg_1=`${ECHO} $arg_1 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
|
||||
arg_2=`${ECHO} $arg_2 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
|
||||
|
||||
full=`${ECHO} $arg_1 | ${SED} 's!\.!\\\.!g'`
|
||||
medium=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*/[^/]*\)!\1!'`
|
||||
short=`${ECHO} $arg_2 | ${SED} 's!\.!\\\.!g'`
|
||||
if [ "`${GREP} -c "/$full" $COMPARE_ROOT/list.new`" -eq 1 ]
|
||||
then
|
||||
${ECHO} $NEW/$arg_1
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "`${GREP} -c "$medium" $COMPARE_ROOT/list.new`" -eq 1 ]
|
||||
then
|
||||
${GREP} "$medium" $COMPARE_ROOT/list.new
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "`${GREP} -c "/$short" $COMPARE_ROOT/list.new`" -eq 1 ]
|
||||
then
|
||||
${GREP} "/$short" $COMPARE_ROOT/list.new
|
||||
return
|
||||
fi
|
||||
|
||||
# old style has "dir" before obj{64}
|
||||
dir=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*\)/obj[64]*.*!\1!g'`
|
||||
if [ -n "$dir" -a "$dir" != "$arg_1" ]
|
||||
then
|
||||
if [ "`${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
|
||||
then
|
||||
${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} "/$short"
|
||||
return
|
||||
fi
|
||||
|
||||
# Try with lib$dir/
|
||||
if [ "`${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
|
||||
then
|
||||
${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} "/$short"
|
||||
return
|
||||
fi
|
||||
|
||||
# Try with $dir_objs
|
||||
if [ "`${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
|
||||
then
|
||||
${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} "/$short"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
# check for some specifics...
|
||||
for i in demo hotspot jobjc
|
||||
do
|
||||
if [ "`${ECHO} $full | ${GREP} -c $i`" -gt 0 ]
|
||||
then
|
||||
if [ "`${GREP} $i $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
|
||||
then
|
||||
${GREP} $i $COMPARE_ROOT/list.new | ${GREP} "/$short"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# check for specific demo
|
||||
demo=`${ECHO} $arg_1 | ${SED} 's!.*/demo/jvmti/\([^/]*\)/.*!\1!g'`
|
||||
if [ -n "$demo" -a "$dir" != "$demo" ]
|
||||
then
|
||||
if [ "`${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
|
||||
then
|
||||
${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} "/$short"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
compare() {
|
||||
old=$1
|
||||
new=$2
|
||||
${DIFF} $old $new > /dev/null
|
||||
res=$?
|
||||
if [ $res -eq 0 ]
|
||||
then
|
||||
${ECHO} 0
|
||||
return
|
||||
fi
|
||||
|
||||
# check if stripped objects gives equality
|
||||
${CP} $old $COMPARE_ROOT/`basename $old`.old
|
||||
${CP} $new $COMPARE_ROOT/`basename $old`.new
|
||||
${POST_STRIP_CMD} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null 2>&1
|
||||
${DIFF} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null
|
||||
res=$?
|
||||
${RM} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new
|
||||
if [ $res -eq 0 ]
|
||||
then
|
||||
${ECHO} S
|
||||
return
|
||||
fi
|
||||
|
||||
name=`basename $1 | ${SED} 's!\.o!!'`
|
||||
cntold=`strings $old | ${GREP} -c $name`
|
||||
cntnew=`strings $new | ${GREP} -c $name`
|
||||
|
||||
if [ $cntold -gt 0 -a $cntnew -gt 0 ]
|
||||
then
|
||||
${ECHO} F
|
||||
return
|
||||
fi
|
||||
|
||||
${ECHO} 1
|
||||
}
|
||||
|
||||
for F in `${CAT} $COMPARE_ROOT/list.old`
|
||||
do
|
||||
if [ "${IGNORE}" ] && [ "`${ECHO} $F | ${GREP} ${IGNORE}`" ]
|
||||
then
|
||||
#
|
||||
# skip ignored files
|
||||
#
|
||||
continue;
|
||||
fi
|
||||
|
||||
if [ "$PATTERN" ] && [ `${ECHO} $F | ${GREP} -c $PATTERN` -eq 0 ]
|
||||
then
|
||||
continue;
|
||||
fi
|
||||
|
||||
f=`basename $F`
|
||||
o=$OLD/$F
|
||||
n=`findnew $F $f`
|
||||
|
||||
if [ "$n" ]
|
||||
then
|
||||
n="$NEW/$n"
|
||||
${ECHO} `compare $o $n` : $f : $o : $n
|
||||
else
|
||||
${ECHO} "- : $f : $o "
|
||||
fi
|
||||
done
|
||||
335
common/bin/compareimage.sh
Normal file
335
common/bin/compareimage.sh
Normal file
@@ -0,0 +1,335 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# MANUAL
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image
|
||||
#
|
||||
# Compare the directory structure.
|
||||
# Compare the filenames in the directories.
|
||||
# Compare the contents of the zip archives
|
||||
# Compare the contents of the jar archives
|
||||
# Compare the native libraries
|
||||
# Compare the native executables
|
||||
# Compare the remaining files
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]
|
||||
#
|
||||
# Compare only the selected subset of the images.
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar
|
||||
#
|
||||
# Compare only the CodePointIM.jar file
|
||||
# Can be used to compare zips, libraries and executables.
|
||||
#
|
||||
|
||||
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image"
|
||||
echo ""
|
||||
echo "Compare the directory structure."
|
||||
echo "Compare the filenames in the directories."
|
||||
echo "Compare the contents of the zip archives"
|
||||
echo "Compare the contents of the jar archives"
|
||||
echo "Compare the native libraries"
|
||||
echo "Compare the native executables"
|
||||
echo "Compare the remaining files"
|
||||
echo ""
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
|
||||
echo ""
|
||||
echo "Compare only the selected subset of the images."
|
||||
echo ""
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
|
||||
echo ""
|
||||
echo "Compare only the CodePointIM.jar file"
|
||||
echo "Can be used to compare zips, libraries and executables."
|
||||
exit 10
|
||||
fi
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
CMD="$3"
|
||||
|
||||
DIFF_RESULT=0
|
||||
|
||||
CMP_ZIPS=false
|
||||
CMP_JARS=false
|
||||
CMP_LIBS=false
|
||||
CMP_EXECS=false
|
||||
CMP_OTHER=false
|
||||
|
||||
FILTER="cat"
|
||||
|
||||
if [ -n "$CMD" ]; then
|
||||
case "$CMD" in
|
||||
zips)
|
||||
CMP_ZIPS=true
|
||||
;;
|
||||
jars)
|
||||
CMP_JARS=true
|
||||
;;
|
||||
libs)
|
||||
CMP_LIBS=true
|
||||
;;
|
||||
execs)
|
||||
CMP_EXECS=true
|
||||
;;
|
||||
other)
|
||||
CMP_OTHER=true
|
||||
;;
|
||||
*)
|
||||
CMP_ZIPS=true
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
CMP_OTHER=true
|
||||
FILTER="grep $3"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
CMP_ZIPS=true
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
CMP_OTHER=true
|
||||
fi
|
||||
|
||||
DIFFJARZIP="/bin/bash `dirname $0`/diffjarzip.sh"
|
||||
DIFFLIB="/bin/bash `dirname $0`/difflib.sh"
|
||||
DIFFEXEC="/bin/bash `dirname $0`/diffexec.sh"
|
||||
export COMPARE_ROOT=/tmp/cimages.$USER
|
||||
mkdir -p $COMPARE_ROOT
|
||||
|
||||
# Load the correct exception list.
|
||||
case "`uname -s`" in
|
||||
Linux)
|
||||
. `dirname $0`/exception_list_linux
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo Comparing $OLD to $NEW
|
||||
echo
|
||||
|
||||
(cd $OLD && find . -type d | sort > $COMPARE_ROOT/from_dirs)
|
||||
(cd $NEW && find . -type d | sort > $COMPARE_ROOT/to_dirs)
|
||||
|
||||
echo -n Directory structure...
|
||||
if diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs > /dev/null; then
|
||||
echo Identical!
|
||||
else
|
||||
echo Differences found.
|
||||
DIFF_RESULT=1
|
||||
# Differences in directories found.
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
|
||||
fi
|
||||
fi
|
||||
|
||||
(cd $OLD && find . -type f | sort > $COMPARE_ROOT/from_files)
|
||||
(cd $NEW && find . -type f | sort > $COMPARE_ROOT/to_files)
|
||||
|
||||
echo -n File names...
|
||||
if diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files > /dev/null; then
|
||||
echo Identical!
|
||||
else
|
||||
echo Differences found.
|
||||
DIFF_RESULT=1
|
||||
# Differences in directories found.
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo "$ONLY_OLD" | sed 's|< ./| |g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo "$ONLY_NEW" | sed 's|> ./| |g'
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n Permissions...
|
||||
found=""
|
||||
for f in `cd $OLD && find . -type f`
|
||||
do
|
||||
if [ ! -f ${OLD}/$f ]; then continue; fi
|
||||
if [ ! -f ${NEW}/$f ]; then continue; fi
|
||||
OP=`ls -l ${OLD}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
NP=`ls -l ${NEW}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
if [ "$OP" != "$NP" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\told: ${OP} new: ${NP}\t$f\n"
|
||||
fi
|
||||
|
||||
OF=`cd ${OLD} && file $f`
|
||||
NF=`cd ${NEW} && file $f`
|
||||
if [ "$f" = "./src.zip" ]
|
||||
then
|
||||
if [ "`echo $OF | grep -ic zip`" -gt 0 -a "`echo $NF | grep -ic zip`" -gt 0 ]
|
||||
then
|
||||
# the way we produces zip-files make it so that directories are stored in old file
|
||||
# but not in new (only files with full-path)
|
||||
# this makes file-5.09 report them as different
|
||||
continue;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OF" != "$NF" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\tFILE: old: ${OF} new: ${NF}\t$f\n"
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
|
||||
GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" ! -name "*.diz" \
|
||||
| grep -v "./bin/" | sort | $FILTER)
|
||||
echo General files...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
if [ -e $NEW/$f ]; then
|
||||
DIFF_OUT=$(diff $OLD/$f $NEW/$f 2>&1)
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ "x$CMP_ZIPS" == "xtrue" ]; then
|
||||
ZIPS=$(cd $OLD && find . -type f -name "*.zip" | sort | $FILTER)
|
||||
|
||||
if [ -n "$ZIPS" ]; then
|
||||
echo Zip files...
|
||||
|
||||
for f in $ZIPS
|
||||
do
|
||||
$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW
|
||||
if [ "$?" != "0" ]; then
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$CMP_JARS" == "xtrue" ]; then
|
||||
JARS=$(cd $OLD && find . -type f -name "*.jar" -o -name "ct.sym" | sort | $FILTER)
|
||||
|
||||
if [ -n "$JARS" ]; then
|
||||
echo Jar files...
|
||||
|
||||
for f in $JARS
|
||||
do
|
||||
DIFFJAR_OUTPUT=`$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW`
|
||||
DIFFJAR_RESULT=$?
|
||||
if [ "$DIFFJAR_RESULT" != "0" ]; then
|
||||
for diff in $LIST_DIFF_JAR; do
|
||||
DIFFJAR_OUTPUT=`echo "$DIFFJAR_OUTPUT" | grep -v "$diff"`
|
||||
done
|
||||
if [ "`echo "$DIFFJAR_OUTPUT" | grep -v "Differing files in"`" != "" ]; then
|
||||
DIFF_RESULT=1
|
||||
echo "$DIFFJAR_OUTPUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$FILTER" != "xcat" ]; then
|
||||
VIEW=view
|
||||
else
|
||||
VIEW=
|
||||
fi
|
||||
|
||||
if [ "x$CMP_LIBS" == "xtrue" ]; then
|
||||
LIBS=$(cd $OLD && find . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | sort | $FILTER)
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
echo Libraries...
|
||||
for f in $LIBS
|
||||
do
|
||||
DIFFLIB_OUTPUT=`$DIFFLIB $OLD/$f $NEW/$f $OLD $NEW $VIEW`
|
||||
DIFFLIB_RESULT=$?
|
||||
if [ "$DIFFLIB_RESULT" = "0" ]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
elif [ "$DIFFLIB_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
elif [ "$DIFFLIB_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
else
|
||||
echo "$DIFFLIB_OUTPUT"
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$CMP_EXECS" == "xtrue" ]; then
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
EXECS=$(cd $OLD && find . -type f -name '*.exe' | sort | $FILTER)
|
||||
else
|
||||
EXECS=$(cd $OLD && find . -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' \) | sort | $FILTER)
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$EXECS" ]; then
|
||||
echo Executables...
|
||||
|
||||
for f in $EXECS
|
||||
do
|
||||
DIFFEXEC_OUTPUT=`$DIFFEXEC $OLD/$f $NEW/$f $OLD $NEW $VIEW`
|
||||
DIFFEXEC_RESULT=$?
|
||||
if [ "$DIFFEXEC_RESULT" = "0" ]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
elif [ "$DIFFEXEC_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
elif [ "$DIFFEXEC_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
else
|
||||
echo "$DIFFEXEC_OUTPUT"
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $DIFF_RESULT
|
||||
186
common/bin/diffexec.sh
Normal file
186
common/bin/diffexec.sh
Normal file
@@ -0,0 +1,186 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two executables. Return codes:"
|
||||
echo "0 - no diff"
|
||||
echo "1 - Identical symbols AND size, BUT not bytewise identical"
|
||||
echo "2 - Identical symbols BUT NEW size"
|
||||
echo "3 - Differences, content BUT SAME size"
|
||||
echo "4 - Differences, content AND size"
|
||||
echo "10 - Could not perform diff"
|
||||
echo "Use 'quiet' to disable any output."
|
||||
echo "Syntax: $0 file1 file2 [quiet]"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which nm`" ]; then
|
||||
NM=nm
|
||||
elif [ -f "`which gnm`" ]; then
|
||||
NM=gnm
|
||||
else
|
||||
echo "No nm command found"
|
||||
exit 10
|
||||
fi
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
VIEW=
|
||||
# You can do export DIFF=meld to view
|
||||
# any differences using meld instead.
|
||||
if [ -n "$DIFF" ]; then
|
||||
DIFF="$DIFF"
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
|
||||
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ "x$5" == "xview" ]; then VIEW=view; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ "x$3" == "xview" ]; then VIEW=view; fi
|
||||
fi
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
echo Identical: $OLD_NAME
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old
|
||||
NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new
|
||||
|
||||
mkdir -p $(dirname $OLD_SYMBOLS)
|
||||
mkdir -p $(dirname $NEW_SYMBOLS)
|
||||
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
|
||||
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
|
||||
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
|
||||
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
|
||||
else
|
||||
# Strip the addresses, just compare the ordering of the symbols.
|
||||
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
|
||||
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
|
||||
# But store the full information for easy diff access.
|
||||
$NM $OLD > $OLD_SYMBOLS.full
|
||||
$NM $NEW > $NEW_SYMBOLS.full
|
||||
fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
|
||||
fi
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
||||
|
||||
155
common/bin/diffjarzip.sh
Normal file
155
common/bin/diffjarzip.sh
Normal file
@@ -0,0 +1,155 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Simple tool to diff two jar or zip files. It unpacks the jar/zip files and
|
||||
# reports if files differs and if files are new or missing.
|
||||
# Assumes gnu diff.
|
||||
|
||||
# There are a few source files that have DOS line endings in the
|
||||
# jaxp/jaxws source drops, when the sources were added to the repository
|
||||
# the source files were converted to UNIX line endings.
|
||||
# For now we ignore these differences.
|
||||
DIFF_FLAGS="--strip-trailing-cr"
|
||||
#set -x
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two jar/zip files. Return codes: 0 - no diff, 1 - diff, 2 - couldn't perform diff"
|
||||
echo "Syntax: $0 old_archive new_archive [old_root new_root]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 2
|
||||
fi
|
||||
|
||||
IGNORES="cat"
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ $# == 5 ]; then IGNORES="$5"; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ $# == 3 ]; then IGNORES="$3"; fi
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which gdiff`" ]; then
|
||||
DIFF=gdiff
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
|
||||
OLD_SUFFIX="${OLD##*.}"
|
||||
NEW_SUFFIX="${NEW##*.}"
|
||||
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "zip" ] && [ "$OLD_SUFFIX" != "jar" ] && [ "$OLD_SUFFIX" != "sym" ]; then
|
||||
echo The files have to be zip, jar or sym! They are $OLD_SUFFIX
|
||||
exit 2
|
||||
fi
|
||||
|
||||
UNARCHIVE="unzip -q"
|
||||
|
||||
TYPE="$OLD_SUFFIX"
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Not quite identical, the might still contain the same data.
|
||||
# Unpack the jar/zip files in temp dirs
|
||||
if test "x$COMPARE_ROOT" == "x"; then
|
||||
COMPARE_ROOT=/tmp/compare_root.$$
|
||||
REMOVE_COMPARE_ROOT=true
|
||||
fi
|
||||
OLD_TEMPDIR=$COMPARE_ROOT/$OLD_NAME.old
|
||||
NEW_TEMPDIR=$COMPARE_ROOT/$NEW_NAME.new
|
||||
mkdir -p $OLD_TEMPDIR
|
||||
mkdir -p $NEW_TEMPDIR
|
||||
(cd $OLD_TEMPDIR && rm -rf * ; $UNARCHIVE $OLD)
|
||||
(cd $NEW_TEMPDIR && rm -rf * ; $UNARCHIVE $NEW)
|
||||
|
||||
ONLY1=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR")
|
||||
|
||||
if [ -n "$ONLY1" ]; then
|
||||
echo " Only the OLD $OLD_NAME contains:"
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR" \
|
||||
| sed "s|Only in $OLD_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
ONLY2=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR")
|
||||
|
||||
if [ -n "$ONLY2" ]; then
|
||||
echo " Only the NEW $NEW_NAME contains:"
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR" \
|
||||
| sed "s|Only in $NEW_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
DIFFTEXT="/bin/bash `dirname $0`/difftext.sh"
|
||||
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep differ | cut -f 2,4 -d ' ' | \
|
||||
awk "{ print \"$DIFFTEXT \"\$1\" \"\$2 }" > $COMPARE_ROOT/diffing
|
||||
|
||||
/bin/bash $COMPARE_ROOT/diffing > $COMPARE_ROOT/diffs
|
||||
|
||||
if [ -s "$COMPARE_ROOT/diffs" ]; then
|
||||
echo " Differing files in $OLD_NAME"
|
||||
cat $COMPARE_ROOT/diffs | grep differ | $IGNORES | cut -f 2 -d ' ' | \
|
||||
sed "s|$OLD_TEMPDIR| |g"
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
|
||||
if [ "x$REMOVE_COMPARE_ROOT" == xtrue ]; then
|
||||
rm -rf $REMOVE_COMPARE_ROOT
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
207
common/bin/difflib.sh
Normal file
207
common/bin/difflib.sh
Normal file
@@ -0,0 +1,207 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Simple tool to diff two shared libraries.
|
||||
# Criterias: two shared libraries are considered equal if:
|
||||
# the file sizes are the same AND the symbols outputs from the nm command are equal
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two shared libs. Return codes:"
|
||||
echo "0 - no diff"
|
||||
echo "1 - Identical symbols AND size, BUT not bytewise identical"
|
||||
echo "2 - Identical symbols BUT NEW size"
|
||||
echo "3 - Differences, content BUT SAME size"
|
||||
echo "4 - Differences, content AND size"
|
||||
echo "10 - Could not perform diff"
|
||||
echo "Use 'quiet' to disable any output."
|
||||
echo "Syntax: $0 file1 file2 [quiet]"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which gnm`" ]; then
|
||||
NM=gnm
|
||||
# Jonas 2012-05-29: solaris native nm produces radically different output than gnm
|
||||
# so if using that...we need different filter than "cut -f 2-"
|
||||
#
|
||||
elif [ -f "`which nm`" ]; then
|
||||
NM=nm
|
||||
else
|
||||
echo "No nm command found"
|
||||
exit 10
|
||||
fi
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
VIEW=
|
||||
# You can do export DIFF=meld to view
|
||||
# any differences using meld instead.
|
||||
if [ -n "$DIFF" ]; then
|
||||
DIFF="$DIFF"
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
|
||||
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ "x$5" == "xview" ]; then VIEW=view; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ "x$3" == "xview" ]; then VIEW=view; fi
|
||||
fi
|
||||
|
||||
OLD_SUFFIX="${OLD##*.}"
|
||||
NEW_SUFFIX="${NEW##*.}"
|
||||
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "so" ] && [ "$OLD_SUFFIX" != "dylib" ] && [ "$OLD_SUFFIX" != "dll" ]; then
|
||||
echo The files have to be .so, .dylib or .dll! They are $OLD_SUFFIX
|
||||
exit 10
|
||||
fi
|
||||
|
||||
TYPE="$OLD_SUFFIX"
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
echo Identical: $OLD_NAME
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SYMBOLS=$COMPARE_ROOT/nm.$OLD_NAME.old
|
||||
NEW_SYMBOLS=$COMPARE_ROOT/nm.$NEW_NAME.new
|
||||
|
||||
mkdir -p $(dirname $OLD_SYMBOLS)
|
||||
mkdir -p $(dirname $NEW_SYMBOLS)
|
||||
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
|
||||
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
|
||||
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
|
||||
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
|
||||
else
|
||||
# Strip the addresses, just compare the ordering of the symbols.
|
||||
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
|
||||
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
|
||||
# But store the full information for easy diff access.
|
||||
$NM $OLD > $OLD_SYMBOLS.full
|
||||
$NM $NEW > $NEW_SYMBOLS.full
|
||||
fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
|
||||
fi
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
||||
|
||||
157
common/bin/difftext.sh
Normal file
157
common/bin/difftext.sh
Normal file
@@ -0,0 +1,157 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# The difftext.sh knows how to compare text files and
|
||||
# ignore some specific differences.
|
||||
# When difftext.sh is called, we already know that the
|
||||
# files differ. But if the tests below trigger, then
|
||||
# we ignore differences caused by:
|
||||
#
|
||||
# Timestamps in Java sources generated by idl2java
|
||||
# Sorting order and cleanup style in .properties files.
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
SUF="${OLD##*.}"
|
||||
TMP=1
|
||||
if test "x$SUF" == "xjava"; then
|
||||
TMP=$(LANG=C diff $OLD $NEW | \
|
||||
grep '^[<>]' | \
|
||||
sed '/[<>] \* from.*\.idl/d' | \
|
||||
sed '/[<>] \*.*201[12].*/d' | \
|
||||
sed '/\/\/ Generated from input file.*/d' | \
|
||||
sed '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' | \
|
||||
sed '/\/\/ java GenerateCharacter.*/d')
|
||||
fi
|
||||
if test "x$SUF" == "xproperties"; then
|
||||
cat $OLD | sed -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003A/\x3A/g' \
|
||||
-e 's/\\u006B/\x6B/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00A0/\xA0/g' \
|
||||
-e 's/\\u00A3/\xA3/g' \
|
||||
-e 's/\\u00B0/\xB0/g' \
|
||||
-e 's/\\u00B7/\xB7/g' \
|
||||
-e 's/\\u00BA/\xBA/g' \
|
||||
-e 's/\\u00BF/\xBF/g' \
|
||||
-e 's/\\u00C0/\xC0/g' \
|
||||
-e 's/\\u00C1/\xC1/g' \
|
||||
-e 's/\\u00C2/\xC2/g' \
|
||||
-e 's/\\u00C4/\xC4/g' \
|
||||
-e 's/\\u00C5/\xC5/g' \
|
||||
-e 's/\\u00C8/\xC8/g' \
|
||||
-e 's/\\u00C9/\xC9/g' \
|
||||
-e 's/\\u00CA/\xCA/g' \
|
||||
-e 's/\\u00CD/\xCD/g' \
|
||||
-e 's/\\u00CE/\xCE/g' \
|
||||
-e 's/\\u00D3/\xD3/g' \
|
||||
-e 's/\\u00D4/\xD4/g' \
|
||||
-e 's/\\u00D6/\xD6/g' \
|
||||
-e 's/\\u00DA/\xDA/g' \
|
||||
-e 's/\\u00DC/\xDC/g' \
|
||||
-e 's/\\u00DD/\xDD/g' \
|
||||
-e 's/\\u00DF/\xDF/g' \
|
||||
-e 's/\\u00E0/\xE0/g' \
|
||||
-e 's/\\u00E1/\xE1/g' \
|
||||
-e 's/\\u00E2/\xE2/g' \
|
||||
-e 's/\\u00E3/\xE3/g' \
|
||||
-e 's/\\u00E4/\xE4/g' \
|
||||
-e 's/\\u00E5/\xE5/g' \
|
||||
-e 's/\\u00E6/\xE6/g' \
|
||||
-e 's/\\u00E7/\xE7/g' \
|
||||
-e 's/\\u00E8/\xE8/g' \
|
||||
-e 's/\\u00E9/\xE9/g' \
|
||||
-e 's/\\u00EA/\xEA/g' \
|
||||
-e 's/\\u00EB/\xEB/g' \
|
||||
-e 's/\\u00EC/\xEC/g' \
|
||||
-e 's/\\u00ED/\xED/g' \
|
||||
-e 's/\\u00EE/\xEE/g' \
|
||||
-e 's/\\u00EF/\xEF/g' \
|
||||
-e 's/\\u00F1/\xF1/g' \
|
||||
-e 's/\\u00F2/\xF2/g' \
|
||||
-e 's/\\u00F3/\xF3/g' \
|
||||
-e 's/\\u00F4/\xF4/g' \
|
||||
-e 's/\\u00F5/\xF5/g' \
|
||||
-e 's/\\u00F6/\xF6/g' \
|
||||
-e 's/\\u00F9/\xF9/g' \
|
||||
-e 's/\\u00FA/\xFA/g' \
|
||||
-e 's/\\u00FC/\xFC/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003f/\x3f/g' \
|
||||
-e 's/\\u006f/\x6f/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00a0/\xa0/g' \
|
||||
-e 's/\\u00a3/\xa3/g' \
|
||||
-e 's/\\u00b0/\xb0/g' \
|
||||
-e 's/\\u00ba/\xba/g' \
|
||||
-e 's/\\u00bf/\xbf/g' \
|
||||
-e 's/\\u00c1/\xc1/g' \
|
||||
-e 's/\\u00c4/\xc4/g' \
|
||||
-e 's/\\u00c5/\xc5/g' \
|
||||
-e 's/\\u00c8/\xc8/g' \
|
||||
-e 's/\\u00c9/\xc9/g' \
|
||||
-e 's/\\u00ca/\xca/g' \
|
||||
-e 's/\\u00cd/\xcd/g' \
|
||||
-e 's/\\u00d6/\xd6/g' \
|
||||
-e 's/\\u00dc/\xdc/g' \
|
||||
-e 's/\\u00dd/\xdd/g' \
|
||||
-e 's/\\u00df/\xdf/g' \
|
||||
-e 's/\\u00e0/\xe0/g' \
|
||||
-e 's/\\u00e1/\xe1/g' \
|
||||
-e 's/\\u00e2/\xe2/g' \
|
||||
-e 's/\\u00e3/\xe3/g' \
|
||||
-e 's/\\u00e4/\xe4/g' \
|
||||
-e 's/\\u00e5/\xe5/g' \
|
||||
-e 's/\\u00e7/\xe7/g' \
|
||||
-e 's/\\u00e8/\xe8/g' \
|
||||
-e 's/\\u00e9/\xe9/g' \
|
||||
-e 's/\\u00ea/\xea/g' \
|
||||
-e 's/\\u00eb/\xeb/g' \
|
||||
-e 's/\\u00ec/\xec/g' \
|
||||
-e 's/\\u00ed/\xed/g' \
|
||||
-e 's/\\u00ee/\xee/g' \
|
||||
-e 's/\\u00ef/\xef/g' \
|
||||
-e 's/\\u00f0/\xf0/g' \
|
||||
-e 's/\\u00f1/\xf1/g' \
|
||||
-e 's/\\u00f2/\xf2/g' \
|
||||
-e 's/\\u00f3/\xf3/g' \
|
||||
-e 's/\\u00f4/\xf4/g' \
|
||||
-e 's/\\u00f5/\xf5/g' \
|
||||
-e 's/\\u00f6/\xf6/g' \
|
||||
-e 's/\\u00f7/\xf7/g' \
|
||||
-e 's/\\u00f8/\xf8/g' \
|
||||
-e 's/\\u00f9/\xf9/g' \
|
||||
-e 's/\\u00fa/\xfa/g' \
|
||||
-e 's/\\u00fc/\xfc/g' \
|
||||
-e 's/\\u00ff/\xff/g' \
|
||||
| sed -e '/^#/d' -e '/^$/d' \
|
||||
-e :a -e '/\\$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
-e 's/\\=/=/' | LANG=C sort > $OLD.cleaned
|
||||
TMP=$(LANG=C diff $OLD.cleaned $NEW)
|
||||
fi
|
||||
if test -n "$TMP"; then
|
||||
echo Files $OLD and $NEW differ
|
||||
fi
|
||||
114
common/bin/exception_list_linux
Normal file
114
common/bin/exception_list_linux
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# List of files inside jar archives that are ok if they differ.
|
||||
LIST_DIFF_JAR="
|
||||
/sun/misc/Version.class
|
||||
/sun/tools/jconsole/Version.class
|
||||
/com/sun/tools/javac/resources/version.class
|
||||
/com/sun/tools/javah/resources/version.class
|
||||
/com/sun/tools/javap/resources/version.class
|
||||
"
|
||||
|
||||
# List of binaries that only need to match symbols
|
||||
LIST_DIFF_SIZE="
|
||||
jre/lib/amd64/libfontmanager.so
|
||||
jre/lib/amd64/libjdwp.so
|
||||
jre/lib/amd64/libt2k.so
|
||||
bin/unpack200
|
||||
jre/bin/unpack200
|
||||
jre/lib/amd64/libjsig.debuginfo
|
||||
jre/lib/amd64/libsaproc.debuginfo
|
||||
jre/lib/amd64/server/libjvm.debuginfo
|
||||
"
|
||||
|
||||
# List of binares that need to match both symbols and size
|
||||
LIST_DIFF_BYTE="
|
||||
jre/lib/amd64/libdt_socket.so
|
||||
jre/lib/amd64/libattach.so
|
||||
jre/lib/amd64/libjaas_unix.so
|
||||
jre/lib/amd64/libjawt.so
|
||||
jre/lib/amd64/libjpeg.so
|
||||
jre/lib/amd64/libjsdt.so
|
||||
jre/lib/amd64/libjsig.so
|
||||
jre/lib/amd64/libsaproc.so
|
||||
jre/lib/amd64/libsctp.so
|
||||
jre/lib/amd64/libsunec.so
|
||||
jre/lib/amd64/libunpack.so
|
||||
jre/lib/amd64/libverify.so
|
||||
jre/lib/amd64/libzip.so
|
||||
jre/lib/amd64/server/libjsig.so
|
||||
jre/lib/amd64/server/libjvm.so
|
||||
jre/lib/amd64/liblcms.so
|
||||
demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
demo/jvmti/hprof/lib/libhprof.so
|
||||
demo/jvmti/minst/lib/libminst.so
|
||||
demo/jvmti/mtrace/lib/libmtrace.so
|
||||
demo/jvmti/waiters/lib/libwaiters.so
|
||||
bin/appletviewer
|
||||
bin/extcheck
|
||||
bin/idlj
|
||||
bin/jar
|
||||
bin/jarsigner
|
||||
bin/java
|
||||
bin/javac
|
||||
bin/javadoc
|
||||
bin/javah
|
||||
bin/javap
|
||||
bin/jcmd
|
||||
bin/jconsole
|
||||
bin/jdb
|
||||
bin/jhat
|
||||
bin/jinfo
|
||||
bin/jmap
|
||||
bin/jps
|
||||
bin/jrunscript
|
||||
bin/jsadebugd
|
||||
bin/jstack
|
||||
bin/jstat
|
||||
bin/jstatd
|
||||
bin/keytool
|
||||
bin/native2ascii
|
||||
bin/orbd
|
||||
bin/pack200
|
||||
bin/policytool
|
||||
bin/rmic
|
||||
bin/rmid
|
||||
bin/rmiregistry
|
||||
bin/schemagen
|
||||
bin/serialver
|
||||
bin/servertool
|
||||
bin/tnameserv
|
||||
bin/wsgen
|
||||
bin/wsimport
|
||||
bin/xjc
|
||||
jre/bin/java
|
||||
jre/bin/keytool
|
||||
jre/bin/orbd
|
||||
jre/bin/pack200
|
||||
jre/bin/policytool
|
||||
jre/bin/rmid
|
||||
jre/bin/rmiregistry
|
||||
jre/bin/servertool
|
||||
jre/bin/tnameserv
|
||||
"
|
||||
53
common/bin/extractvcvars.sh
Normal file
53
common/bin/extractvcvars.sh
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Must be bash, but that is ok since we are running from cygwin.
|
||||
# The first argument is the vcvarsall.bat file to run.
|
||||
# The second argument is the arch arg to give to vcvars.
|
||||
VCVARSALL="$1"
|
||||
ARCH_ARG="$2"
|
||||
|
||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
|
||||
# but calculate the difference in Cygwin environment before/after running it and then
|
||||
# apply the diff.
|
||||
_vs10varsall=`cygpath -a -m -s "$VCVARSALL"`
|
||||
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
|
||||
_dosbash=`cygpath -a -w -s \`which bash\`.*`
|
||||
|
||||
# generate the set of exported vars before/after the vs10 setup
|
||||
echo "@echo off" > localdevenvtmp.bat
|
||||
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
|
||||
echo "call $_dosvs10varsall $ARCH_ARG" >> localdevenvtmp.bat
|
||||
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
|
||||
cmd /c localdevenvtmp.bat
|
||||
|
||||
# apply the diff (less some non-vs10 vars named by "!")
|
||||
sort localdevenvtmp.export0 |grep -v "!" > localdevenvtmp.export0.sort
|
||||
sort localdevenvtmp.export1 |grep -v "!" > localdevenvtmp.export1.sort
|
||||
comm -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
|
||||
cat localdevenv.sh | sed 's/declare -x /export /g' | sed 's/="/:="/g' | sed 's/\\\\/\\/g' | sed 's/"//g' | \
|
||||
sed 's/#/\$\(HASH\)/g' > localdevenv.gmk
|
||||
|
||||
# cleanup
|
||||
rm -f localdevenvtmp*
|
||||
41
common/bin/hide_important_warnings_from_javac.sh
Normal file
41
common/bin/hide_important_warnings_from_javac.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
if [ -x /usr/bin/ggrep ] ; then
|
||||
# Gnu grep on Solaris
|
||||
# (reference configure and build/solaris-i586-clientANDserver-release/spec.gmk
|
||||
GREP=/usr/bin/ggrep
|
||||
else
|
||||
GREP=grep
|
||||
fi
|
||||
#
|
||||
EXP="Note: Some input files use or override a deprecated API."
|
||||
EXP="${EXP}|Note: Recompile with -Xlint:deprecation for details."
|
||||
EXP="${EXP}|Note: Some input files use unchecked or unsafe operations."
|
||||
EXP="${EXP}|Note: Recompile with -Xlint:unchecked for details."
|
||||
EXP="${EXP}| warning"
|
||||
EXP="${EXP}|uses or overrides a deprecated API."
|
||||
EXP="${EXP}|uses unchecked or unsafe operations."
|
||||
#
|
||||
${GREP} --line-buffered -v -E "${EXP}"
|
||||
45
common/bin/logger.sh
Normal file
45
common/bin/logger.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Usage: ./logger.sh theloggfile acommand arg1 arg2
|
||||
#
|
||||
# Execute acommand with args, in such a way that
|
||||
# both stdout and stderr from acommand are appended to
|
||||
# theloggfile.
|
||||
#
|
||||
# Preserve stdout and stderr, so that the stdout
|
||||
# from logger.sh is the same from acommand and equally
|
||||
# for stderr.
|
||||
#
|
||||
# Propagate the result code from acommand so that
|
||||
# ./logger.sh exits with the same result code.
|
||||
|
||||
# Create a temporary directory to store the result code from
|
||||
# the wrapped command.
|
||||
RCDIR=`mktemp -dt jdk-build-logger.tmp.XXXXXX` || exit $?
|
||||
trap "rm -rf \"$RCDIR\"" EXIT
|
||||
LOGFILE=$1
|
||||
shift
|
||||
(exec 3>&1 ; ("$@" 2>&1 1>&3; echo $? > "$RCDIR/rc") | tee -a $LOGFILE 1>&2 ; exec 3>&-) | tee -a $LOGFILE
|
||||
exit `cat "$RCDIR/rc"`
|
||||
115
common/makefiles/IdlCompilation.gmk
Normal file
115
common/makefiles/IdlCompilation.gmk
Normal file
@@ -0,0 +1,115 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
PREFIXES=-pkgPrefix CORBA org.omg \
|
||||
-pkgPrefix CosNaming org.omg \
|
||||
-pkgPrefix CosTransactions org.omg \
|
||||
-pkgPrefix CosTSInteroperation org.omg \
|
||||
-pkgPrefix DynamicAny org.omg \
|
||||
-pkgPrefix Dynamic org.omg \
|
||||
-pkgPrefix IOP org.omg \
|
||||
-pkgPrefix Messaging org.omg \
|
||||
-pkgPrefix PortableInterceptor org.omg \
|
||||
-pkgPrefix PortableServer org.omg \
|
||||
-pkgPrefix activation com.sun.corba.se.spi \
|
||||
-pkgPrefix GIOP com.sun.corba.se \
|
||||
-pkgPrefix PortableActivationIDL com.sun.corba.se \
|
||||
-pkgPrefix messages com.sun.corba.se
|
||||
|
||||
define add_idl_package
|
||||
# param 1 = MYPACKAGE
|
||||
# param 2 = src root
|
||||
# param 3 = gensrc root
|
||||
# param 4 = source idl to compile
|
||||
# param 5 = target idl package
|
||||
# param 6 = delete these files that were output from the idlj
|
||||
# param 7 = idls that match these patterns should be compiled with -oldImplBase
|
||||
# param 8 = the idlj command
|
||||
# Save the generated java files to a temporary directory so
|
||||
# that we can find them and create proper dependencies.
|
||||
# After that, we move them to the real gensrc target dir.
|
||||
$4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
|
||||
ifneq ($$(filter $7,$4),)
|
||||
$4_OLDIMPLBASE:=-oldImplBase
|
||||
$4_OLDIMPLBASE_MSG:=with -oldImplBase
|
||||
endif
|
||||
$5 : $4
|
||||
$(MKDIR) -p $3/$$($4_TMPDIR)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
$(MKDIR) -p $(dir $5)
|
||||
$(ECHO) Compiling IDL $(patsubst $2/%,%,$4)
|
||||
$8 -td $3/$$($4_TMPDIR) \
|
||||
-i $2/org/omg/CORBA \
|
||||
-i $2/org/omg/PortableInterceptor \
|
||||
-i $2/org/omg/PortableServer \
|
||||
-D CORBA3 -corba 3.0 \
|
||||
-fall \
|
||||
$$($4_OLDIMPLBASE) \
|
||||
$(PREFIXES) \
|
||||
$4
|
||||
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
|
||||
$(CP) -rp $3/$$($4_TMPDIR)/* $3
|
||||
($(CD) $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
endef
|
||||
|
||||
define SetupIdlCompilation
|
||||
# param 1 is for example BUILD_IDLS
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
|
||||
|
||||
# Remove any relative addressing in the paths.
|
||||
$1_SRC := $$(abspath $$($1_SRC))
|
||||
$1_BIN := $$(abspath $$($1_BIN))
|
||||
# Find all existing java files and existing class files.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
|
||||
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
|
||||
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
|
||||
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
|
||||
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
|
||||
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
|
||||
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
|
||||
# Now remove unwanted java/class files.
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
|
||||
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
|
||||
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
|
||||
# Now create the dependencies for each idl target.
|
||||
$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
|
||||
endef
|
||||
|
||||
.SUFFIXES: .java .class .package
|
||||
919
common/makefiles/JavaCompilation.gmk
Normal file
919
common/makefiles/JavaCompilation.gmk
Normal file
@@ -0,0 +1,919 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# The complexity of this makefile is not the fault of make, but the fault
|
||||
# of javac and javah. The basic problems are:
|
||||
#
|
||||
# 1) Compiling a single Java source file unpredictably generates anything
|
||||
# between zero (0!) and an infinite number of .class files!
|
||||
# 2) There is no hint, for which classes javah needs to be run,
|
||||
# and it happily generates .h files for classes with no native methods.
|
||||
# 3) javac and javah do not cleanup anything, for example if an internal
|
||||
# class (potentially with native methods) is removed from a Java source file.
|
||||
#
|
||||
# This makefile is a tribute to GNU make. And yes, it was harder to write than it is
|
||||
# to read. The include/excludes of directories and files are only a temporary measure
|
||||
# to work around the messy jdk sources that put platform specific code in src/share/classes.
|
||||
#
|
||||
# We should move most of the functionality of this makefile into a
|
||||
# smart javac/javah/javadoc/jar combo tool. sjavac ?
|
||||
#
|
||||
# I.e. 1) It always generates a single output, a zip-file from a number of source roots.
|
||||
# The zip file contains information that enable incremental builds with full
|
||||
# dependency tracking between packages.
|
||||
# 2) It automatically generates the right .h files.
|
||||
# 3) It keeps its house clean.
|
||||
# *) Generates intermediate files to be used for javadoc generation later.
|
||||
# and does all the other useful things that this makefile does, such as:
|
||||
# use all cores for compilation, reuse the running JVM for all compilations,
|
||||
# and has pubapi dependency tracking to minimize the number of files
|
||||
# that need to be recompiled during an incremental build.
|
||||
#
|
||||
# A zip file, or several zip files combined, can then be converted to a .jar file, or to a .jmod file.
|
||||
#
|
||||
# This would make this makefile much much simpler. I.e. make can be used
|
||||
# for its real purpose, track dependencies and trigger a recompile if a
|
||||
# dependency has changed.
|
||||
#
|
||||
# When you read this source. Remember that $(sort ...) has the side effect
|
||||
# of removing duplicates. It is actually this side effect that is
|
||||
# desired whenever sort is used below!
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
|
||||
endif
|
||||
|
||||
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
|
||||
|
||||
# If compilation of java package fails, then the public api file for that
|
||||
# package will not be genereated. We add this fallback rule to generate
|
||||
# an empty pubapi file.
|
||||
%.api:
|
||||
if test ! -f $@; then $(MKDIR) -p $(@D); $(TOUCH) $@; fi
|
||||
|
||||
define SetupJavaCompiler
|
||||
# param 1 is for example BOOT_JAVAC or NEW_JAVAC
|
||||
# This is the name later used to decide which java compiler to use.
|
||||
# param 2-9 are named args.
|
||||
# JVM:=The jvm used to run the javac/javah command
|
||||
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
|
||||
# JAVAH:=The javah jar and bootstrap classpath changes, or just bin/javah if JVM is left out
|
||||
# FLAGS:=Flags to be supplied to javac
|
||||
# MODE:=SINGLE_THREADED_BATCH (primarily for old javac) or MULTI_CORE_CONCURRENT
|
||||
# only for MULTI_CORE_CONCURRENT are the options below relevant:
|
||||
# SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
|
||||
# SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
|
||||
# USE_DEPS:=true means use -XDdeps,-XDpubapi and -XDnativeapi to track java dependencies
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
|
||||
|
||||
ifeq ($$($1_MODE),MULTI_CORE_CONCURRENT)
|
||||
ifneq (,$$($1_SERVER_DIR))
|
||||
# A javac server has been requested.
|
||||
# The port file contains the tcp/ip on which the server listens
|
||||
# and the cookie necessary to talk to the server.
|
||||
$1_JAVAC_PORTFILE:=$$($1_SERVER_DIR)/$1.port
|
||||
ifeq ($$($1_SERVER_JVM),)
|
||||
# You can use a different JVM to run the background javac server.
|
||||
# But if not set, it defaults to the same JVM that is used to start
|
||||
# the javac command.
|
||||
$1_SERVER_JVM:=$$($1_JVM)
|
||||
endif
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=-XDserver:portfile=$$($1_JAVAC_PORTFILE),poolsize=$(JAVAC_SERVER_CORES),javac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_JAVAC))))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define SetupArchive
|
||||
# param 1 is for example ARCHIVE_MYPACKAGE
|
||||
# param 2 are the dependecies
|
||||
# param 3,4,5,6,7,8,9 are named args.
|
||||
# SRCS:=List of directories in where to find files to add to archive
|
||||
# SUFFIXES:=File suffixes to include in jar
|
||||
# INCLUDES:=List of directories/packages in SRCS that should be included
|
||||
# EXCLUDES:=List of directories/packages in SRCS that should be excluded
|
||||
# EXCLUDE_FILES:=List of files in SRCS that should be excluded
|
||||
# EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
|
||||
# JAR:=Jar file to create
|
||||
# MANIFEST:=Optional manifest file template.
|
||||
# JARMAIN:=Optional main class to add to manifest
|
||||
# JARINDEX :=
|
||||
# SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
|
||||
# added to the archive.
|
||||
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
|
||||
# CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
|
||||
|
||||
$1_JARMAIN:=$(strip $$($1_JARMAIN))
|
||||
$1_JARNAME:=$$(notdir $$($1_JAR))
|
||||
$1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
|
||||
$1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
|
||||
$1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
|
||||
$1_PUBAPI_NOTIFICATIONS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_pubapi_notifications
|
||||
$1_NATIVEAPI_NOTIFICATIONS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_native_notifications
|
||||
$1_NATIVEAPI_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_native
|
||||
$1_BIN:=$$(dir $$($1_JAR))
|
||||
|
||||
ifeq (,$$($1_SUFFIXES))
|
||||
# No suffix was set, default to classes.
|
||||
$1_SUFFIXES:=.class
|
||||
endif
|
||||
# Convert suffixes to a find expression
|
||||
$1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
# On windows, a lot of includes/excludes risk making the command line too long, so
|
||||
# writing the grep patterns to files.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),\
|
||||
$$(addprefix $$(src)/,$$($1_INCLUDES)))
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
|
||||
$1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,\
|
||||
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_JARINDEX))
|
||||
$1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
|
||||
else
|
||||
$1_JARINDEX = true
|
||||
endif
|
||||
# When this macro is run in the same makefile as the java compilation, dependencies are transfered
|
||||
# in make variables. When the macro is run in a different makefile than the java compilation, the
|
||||
# dependencies need to be found in the filesystem.
|
||||
$1_ALL_SRCS:=$$(foreach src,$$($1_SRCS),$$(shell ($(FIND) $$(src) -type f \
|
||||
-a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_ALL_SRCS+=$$(foreach src,$$($1_SRCS),$$(shell $(FIND) $$(src)/META-INF -type f 2> /dev/null))
|
||||
endif
|
||||
|
||||
|
||||
# Utility macros, to make the shell script receipt somewhat easier to dechipher.
|
||||
|
||||
# The capture contents macro finds all files (matching the patterns, typically
|
||||
# .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
|
||||
$1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > $$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) && )
|
||||
endif
|
||||
# The capture deletes macro finds all deleted files and concatenates them. The resulting file
|
||||
# tells us what to remove from the jar-file.
|
||||
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) &&)
|
||||
# The capture pubapi notifications scans for pubapi change notifications. If such notifications are
|
||||
# found, then we will build the classes leading up to the jar again, to take into account the new timestamps
|
||||
# on the changed pubapi files.
|
||||
$1_CAPTURE_PUBAPI_NOTIFICATIONS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
$(FIND) . -name _the.package.api.notify -exec dirname \{\} \; >> $$($1_PUBAPI_NOTIFICATIONS_FILE) ; \
|
||||
true) &&)
|
||||
# The update contents macro updates the jar file with the previously capture contents.
|
||||
$1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
if [ -s _the.$$($1_JARNAME)_contents ]; then \
|
||||
$(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
|
||||
$(JAR) uf $$@ @_the.$$($1_JARNAME)_contents; \
|
||||
fi) &&)
|
||||
# The s-variants of the above macros are used when the jar is created from scratch.
|
||||
$1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS),\
|
||||
($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
endif
|
||||
$1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && $(JAR) uf $$@ @$$(src)/_the.$$($1_JARNAME)_contents) &&)
|
||||
|
||||
# The TOUCH macro is used to make sure all timestamps are identical for package files and the pubapi files.
|
||||
# If we do not do this, we get random recompilations, the next time we run make, since the order of package building is random,
|
||||
# ie independent of package --dependes on-> public api of another package. This is of course
|
||||
# due to the fact that Java source often (always?) has circular dependencies. (Thus there is no correct order
|
||||
# to compile packages, and we can just as well do them in a random order. Which we do.)
|
||||
$1_TOUCH_API_FILES=$$(foreach src,$$($1_SRCS),\
|
||||
($(FIND) $$(src) -name _the.package.api -exec $(TOUCH) -r $$($1_JAR) \{\} \; ; true) && \
|
||||
($(FIND) $$(src) -name _the.package -exec $(TOUCH) -r $$($1_JAR) \{\} \; ; true) &&)
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this jar.
|
||||
$1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
|
||||
|
||||
ifneq (,$$($1_CHECK_COMPRESS_JAR))
|
||||
$1_JAR_CREATE_OPTIONS := c0fm
|
||||
ifeq ($(COMPRESS_JARS), true)
|
||||
$1_JAR_CREATE_OPTIONS := cfm
|
||||
endif
|
||||
else
|
||||
$1_JAR_CREATE_OPTIONS := cfm
|
||||
endif
|
||||
|
||||
# Here is the rule that creates/updates the jar file.
|
||||
$$($1_JAR) : $2 $$($1_ALL_SRC)
|
||||
$(MKDIR) -p $$($1_BIN)
|
||||
if [ -n "$$($1_MANIFEST)" ]; then \
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE); \
|
||||
else \
|
||||
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$(strip $$($1_JARMAIN))" ]; then \
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$($1_EXTRA_MANIFEST_ATTR)" ]; then \
|
||||
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
+if [ -s $$@ ]; then \
|
||||
$(RM) -r $$($1_PUBAPI_NOTIFICATIONS_FILE) && \
|
||||
$$($1_CAPTURE_PUBAPI_NOTIFICATIONS) \
|
||||
if [ -s $$($1_PUBAPI_NOTIFICATIONS_FILE) ]; then \
|
||||
$(ECHO) Public api change detected in: && \
|
||||
$(CAT) $$($1_PUBAPI_NOTIFICATIONS_FILE) | $(TR) '/' '.' | $(SED) 's|^..||g' | $(SED) 's|\.$$$$||g' | $(AWK) '{print " "$$$$1}' && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) \
|
||||
$(MAKE) -f $(word 1,$(MAKEFILE_LIST)) $$($1_JAR) ; \
|
||||
else \
|
||||
$(ECHO) Modifying $$($1_NAME) && \
|
||||
$$($1_CAPTURE_CONTENTS) \
|
||||
$$($1_CAPTURE_METAINF) \
|
||||
$(RM) $$($1_DELETES_FILE) && \
|
||||
$$($1_CAPTURE_DELETES) \
|
||||
$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) && \
|
||||
if [ -s $$($1_DELETESS_FILE) ]; then \
|
||||
$(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
|
||||
$(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
|
||||
fi && \
|
||||
$$($1_UPDATE_CONTENTS) true && \
|
||||
$$($1_JARINDEX) && \
|
||||
$$($1_TOUCH_API_FILES) true && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) true ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) && \
|
||||
$$($1_SCAPTURE_CONTENTS) \
|
||||
$$($1_SCAPTURE_METAINF) \
|
||||
$$($1_SUPDATE_CONTENTS) \
|
||||
$$($1_JARINDEX) && \
|
||||
$$($1_TOUCH_API_FILES) true && \
|
||||
$(RM) -r $$($1_NATIVEAPI_NOTIFICATIONS_FILE) $$($1_NATIVEAPI_FILE) && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name "*.notify" $(FIND_DELETE); true) &&) true ; \
|
||||
fi;
|
||||
|
||||
endef
|
||||
|
||||
define append_to
|
||||
$(ECHO) "$1" >> $2
|
||||
endef
|
||||
|
||||
define SetupZipArchive
|
||||
# param 1 is for example ZIP_MYSOURCE
|
||||
# param 2,3,4,5,6,7,8,9 are named args.
|
||||
# SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
$1_ALL_SRCS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f -a ! -name "_the.*" \( -name FALSE_DUMMY $$($1_SUFFIX_FILTER) \) ))
|
||||
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
ifneq ($$($1_SUFFIXES),)
|
||||
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\
|
||||
$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
|
||||
else
|
||||
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
|
||||
endif
|
||||
$1_ALL_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
|
||||
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
endif
|
||||
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this zip.
|
||||
$1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
|
||||
|
||||
# Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
|
||||
# I.e. the zip -i and -x options should match the filtering done in the makefile.
|
||||
# Explicitly excluded files can be given with absolute path. The patsubst solution
|
||||
# isn't perfect but the likelyhood of an absolute path to match something in a src
|
||||
# dir is very small.
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Updating $$($1_NAME)
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES)))) ;) true
|
||||
$(TOUCH) $$@
|
||||
endef
|
||||
|
||||
define add_file_to_copy
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# parma 2 = The source file to copy.
|
||||
$2_TARGET:=$2
|
||||
# Remove the source prefix.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
|
||||
# Now we can setup the depency that will trigger the copying.
|
||||
$$($1_BIN)$$($2_TARGET) : $2
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(CP) $$< $$@
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
# And do not forget this target
|
||||
$1_ALL_COPY_TARGETS += $$($1_BIN)$$($2_TARGET)
|
||||
endef
|
||||
|
||||
|
||||
# This macro is used only for properties files that are to be
|
||||
# copied over to the classes directory in cleaned form:
|
||||
# Previously this was inconsistently done in different repositories.
|
||||
# This is the new clean standard.
|
||||
define add_file_to_copy_and_clean
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# parma 2 = The source file to copy and clean.
|
||||
$2_TARGET:=$2
|
||||
# Remove the source prefix.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
|
||||
# Now we can setup the depency that will trigger the copying.
|
||||
$$($1_BIN)$$($2_TARGET) : $2
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Cleaning $$($2_TARGET)
|
||||
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
| $(SED) \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003A/\x3A/g' \
|
||||
-e 's/\\u006B/\x6B/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00A0/\xA0/g' \
|
||||
-e 's/\\u00A3/\xA3/g' \
|
||||
-e 's/\\u00B0/\xB0/g' \
|
||||
-e 's/\\u00B7/\xB7/g' \
|
||||
-e 's/\\u00BA/\xBA/g' \
|
||||
-e 's/\\u00BF/\xBF/g' \
|
||||
-e 's/\\u00C0/\xC0/g' \
|
||||
-e 's/\\u00C1/\xC1/g' \
|
||||
-e 's/\\u00C2/\xC2/g' \
|
||||
-e 's/\\u00C4/\xC4/g' \
|
||||
-e 's/\\u00C5/\xC5/g' \
|
||||
-e 's/\\u00C8/\xC8/g' \
|
||||
-e 's/\\u00C9/\xC9/g' \
|
||||
-e 's/\\u00CA/\xCA/g' \
|
||||
-e 's/\\u00CD/\xCD/g' \
|
||||
-e 's/\\u00CE/\xCE/g' \
|
||||
-e 's/\\u00D3/\xD3/g' \
|
||||
-e 's/\\u00D4/\xD4/g' \
|
||||
-e 's/\\u00D6/\xD6/g' \
|
||||
-e 's/\\u00DA/\xDA/g' \
|
||||
-e 's/\\u00DC/\xDC/g' \
|
||||
-e 's/\\u00DD/\xDD/g' \
|
||||
-e 's/\\u00DF/\xDF/g' \
|
||||
-e 's/\\u00E0/\xE0/g' \
|
||||
-e 's/\\u00E1/\xE1/g' \
|
||||
-e 's/\\u00E2/\xE2/g' \
|
||||
-e 's/\\u00E3/\xE3/g' \
|
||||
-e 's/\\u00E4/\xE4/g' \
|
||||
-e 's/\\u00E5/\xE5/g' \
|
||||
-e 's/\\u00E6/\xE6/g' \
|
||||
-e 's/\\u00E7/\xE7/g' \
|
||||
-e 's/\\u00E8/\xE8/g' \
|
||||
-e 's/\\u00E9/\xE9/g' \
|
||||
-e 's/\\u00EA/\xEA/g' \
|
||||
-e 's/\\u00EB/\xEB/g' \
|
||||
-e 's/\\u00EC/\xEC/g' \
|
||||
-e 's/\\u00ED/\xED/g' \
|
||||
-e 's/\\u00EE/\xEE/g' \
|
||||
-e 's/\\u00EF/\xEF/g' \
|
||||
-e 's/\\u00F1/\xF1/g' \
|
||||
-e 's/\\u00F2/\xF2/g' \
|
||||
-e 's/\\u00F3/\xF3/g' \
|
||||
-e 's/\\u00F4/\xF4/g' \
|
||||
-e 's/\\u00F5/\xF5/g' \
|
||||
-e 's/\\u00F6/\xF6/g' \
|
||||
-e 's/\\u00F9/\xF9/g' \
|
||||
-e 's/\\u00FA/\xFA/g' \
|
||||
-e 's/\\u00FC/\xFC/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003f/\x3f/g' \
|
||||
-e 's/\\u006f/\x6f/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00a0/\xa0/g' \
|
||||
-e 's/\\u00a3/\xa3/g' \
|
||||
-e 's/\\u00b0/\xb0/g' \
|
||||
-e 's/\\u00ba/\xba/g' \
|
||||
-e 's/\\u00bf/\xbf/g' \
|
||||
-e 's/\\u00c1/\xc1/g' \
|
||||
-e 's/\\u00c4/\xc4/g' \
|
||||
-e 's/\\u00c5/\xc5/g' \
|
||||
-e 's/\\u00c8/\xc8/g' \
|
||||
-e 's/\\u00c9/\xc9/g' \
|
||||
-e 's/\\u00ca/\xca/g' \
|
||||
-e 's/\\u00cd/\xcd/g' \
|
||||
-e 's/\\u00d6/\xd6/g' \
|
||||
-e 's/\\u00dc/\xdc/g' \
|
||||
-e 's/\\u00dd/\xdd/g' \
|
||||
-e 's/\\u00df/\xdf/g' \
|
||||
-e 's/\\u00e0/\xe0/g' \
|
||||
-e 's/\\u00e1/\xe1/g' \
|
||||
-e 's/\\u00e2/\xe2/g' \
|
||||
-e 's/\\u00e3/\xe3/g' \
|
||||
-e 's/\\u00e4/\xe4/g' \
|
||||
-e 's/\\u00e5/\xe5/g' \
|
||||
-e 's/\\u00e7/\xe7/g' \
|
||||
-e 's/\\u00e8/\xe8/g' \
|
||||
-e 's/\\u00e9/\xe9/g' \
|
||||
-e 's/\\u00ea/\xea/g' \
|
||||
-e 's/\\u00eb/\xeb/g' \
|
||||
-e 's/\\u00ec/\xec/g' \
|
||||
-e 's/\\u00ed/\xed/g' \
|
||||
-e 's/\\u00ee/\xee/g' \
|
||||
-e 's/\\u00ef/\xef/g' \
|
||||
-e 's/\\u00f0/\xf0/g' \
|
||||
-e 's/\\u00f1/\xf1/g' \
|
||||
-e 's/\\u00f2/\xf2/g' \
|
||||
-e 's/\\u00f3/\xf3/g' \
|
||||
-e 's/\\u00f4/\xf4/g' \
|
||||
-e 's/\\u00f5/\xf5/g' \
|
||||
-e 's/\\u00f6/\xf6/g' \
|
||||
-e 's/\\u00f7/\xf7/g' \
|
||||
-e 's/\\u00f8/\xf8/g' \
|
||||
-e 's/\\u00f9/\xf9/g' \
|
||||
-e 's/\\u00fa/\xfa/g' \
|
||||
-e 's/\\u00fc/\xfc/g' \
|
||||
-e 's/\\u00ff/\xff/g' \
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$$$$//' \
|
||||
-e 's/\\=/=/' | LANG=C $(SORT) > $$@
|
||||
$(CHMOD) -f ug+w $$@
|
||||
|
||||
# And do not forget this target
|
||||
$1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
|
||||
endef
|
||||
|
||||
define add_java_package
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# param 2 = the package target file (_the.package)
|
||||
# param 3 = src roots, all of them, separated with space
|
||||
# param 4 = bin root
|
||||
# param 5 = include these dependecies
|
||||
# param 6 = not used
|
||||
# param 7 = if non-empty, then use -Xdeps and -Xpubapi
|
||||
# param 8 = xremote configuration, or empty.
|
||||
# param 9 = javac command
|
||||
# param 10 = javac flags
|
||||
# param 11 = exclude these files!
|
||||
# param 12 = only include these files!
|
||||
# param 13 = javah command
|
||||
# param 14 = override src roots to be passed into -sourcepath, ugly ugly ugly, do not use this!
|
||||
# it is only here to workaround ugly things in the source code in the jdk that ought
|
||||
# to be fixed instead!
|
||||
ifdef $2_USED_BY
|
||||
$$(error Attempting to add the package $2 from $3 which is already added with sources from $$($2_USED_BY))
|
||||
endif
|
||||
$2_USED_BY:=$3
|
||||
# Remove the _the.package file to get the target bin dir for the classes in this package.
|
||||
$2_PACKAGE_BDIR:=$(dir $2)
|
||||
# The source roots separated with a path separator (: or ; depending on os)
|
||||
# (The patsubst is necessary to trim away unnecessary spaces.)
|
||||
ifneq ($(14),)
|
||||
$2_SRCROOTSC:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$(14))))
|
||||
else
|
||||
$2_SRCROOTSC:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$3)))
|
||||
endif
|
||||
# Suffix the package path to the src roots, to get a list of all possible source locations
|
||||
# for this package.
|
||||
$2_PACKAGE_SDIRS:=$$(foreach i,$3,$$(subst $4,$$i,$$($2_PACKAGE_BDIR)))
|
||||
# Use wildcard in all potential source locations to find the actual sources.
|
||||
$2_PACKAGE_SRCS:=$$(filter-out $(11),$$(wildcard $$(addsuffix *.java,$$($2_PACKAGE_SDIRS))))
|
||||
ifneq ($(12),)
|
||||
# Filter on include file filter if set.
|
||||
$2_PACKAGE_SRCS:=$$(filter $(12),$$($2_PACKAGE_SRCS))
|
||||
endif
|
||||
# Generate a proper package name from the file name.
|
||||
$2_PACKAGE:=$(patsubst .%.,%,$(subst /,.,$(subst $4,,$(dir $2))))
|
||||
# Use a javac server for this package?
|
||||
$2_REMOTE:=$8
|
||||
|
||||
# Include previously generated information about what classes are output by this package
|
||||
# and what sources were used for the compile.
|
||||
-include $$($2_PACKAGE_BDIR)_the.package.d
|
||||
|
||||
# Include the notify, file, that exists if the package has been compiled during a previous make round.
|
||||
# I.e. we are now dealing with a compile triggered by a pubapi change.
|
||||
-include $$($2_PACKAGE_BDIR)_the.package.notify
|
||||
|
||||
# If the notify file existed, then $$($2_NOTIFIED) will be equal to true.
|
||||
# Use this information to block dependency tracking for this package.
|
||||
# This is necessary to cut the circular dependency chains that are so common in Java sources.
|
||||
|
||||
ifneq ($$($2_NOTIFIED),true)
|
||||
# No need to block, since this package has not yet been recompiled.
|
||||
# Thus include previously generated dependency information. (if it exists)
|
||||
-include $$($2_PACKAGE_BDIR)_the.package.dddd
|
||||
# else
|
||||
# $$(info WAS NOTIFIED $2)
|
||||
endif
|
||||
|
||||
# Should we create proper dependencies between packages?
|
||||
ifneq ($7,)
|
||||
# The flag: -XDpubapi:file=foo,package=mypack,notify writes a file foo that contains a
|
||||
# database of the public api of the classes supplied on the command line and are
|
||||
# inside the package mypack. If foo already exists, javac will only write to foo,
|
||||
# if there is a change in the pubapi. I.e. we can use the timestamp of this file
|
||||
# for triggering dependencies. "notify" means create a "file" suffixed with notify
|
||||
# if the pubapi really changed.
|
||||
$2_PUBAPI=-XDpubapi=file=$$($2_PACKAGE_BDIR)_the.package.api,notify,package=$$($2_PACKAGE)
|
||||
# The flag: -XDnativeapi:file=foo,package=mypack,notify works similar to pubabi, but
|
||||
# instead tracks native methods. This file can be used to trigger dependencies for
|
||||
# native compilations.
|
||||
$2_NATIVEAPI=-XDnativeapi=file=$$($2_PACKAGE_BDIR)_the.package.native,notify,package=$$($2_PACKAGE)
|
||||
# The flag -XDdeps:file=foo.deps,groupon=package writes a foo.deps file containing packages dependencies:
|
||||
# java.net : java.io java.lang
|
||||
# I.e. the classes in .net depend on the public apis of java.io and java.lang
|
||||
# The dependencies can be grouped on classes instead (groupon=class)
|
||||
# java.net.Bar : java.io.Socket java.lang.String
|
||||
$2_DEPS:=-XDdeps=file=$$($2_PACKAGE_BDIR)_the.package.deps,groupon=package
|
||||
# The next command rewrites the deps output from javac into a proper makefile dependency.
|
||||
# The dependencies are always to an .api file generated by the pubapi option above.
|
||||
# This is necessary since java package dependencies are almost always circular.
|
||||
$2_APPEND_DEPS:=($(CAT) $$($2_PACKAGE_BDIR)_the.package.deps | $(TR) '.' '/' | $(AWK) '{ print "$4/" $$$$3 }' | sort > $$($2_PACKAGE_BDIR)_the.package.ddd && $(GREP) -f $$($2_PACKAGE_BDIR)_the.package.ddd $5 | $(AWK) '{ print "$(dir $2)_the.package : " $$$$1 "_the.package.api" }' > $$($2_PACKAGE_BDIR)_the.package.dddd ; true)
|
||||
else
|
||||
# If not using dependencies, use $2 as fallback to trigger regeneration of javah header files.
|
||||
# This will generate a surplus of header files, but this does not hurt compilation.
|
||||
$2_NATIVEAPICHANGE_TRIGGER:=$2
|
||||
$2_FETCH_NATIVEAPICHANGE_CLASSES:=$(CAT) $$($2_PACKAGE_BDIR)_the.package.now|$(GREP) -v '\$$$$'|$(SED) -e 's|$4/||g'|$(SED) 's|.class||g'| $(TR) '/' '.'
|
||||
endif
|
||||
|
||||
# The _the.package file is dependent on the java files inside the package.
|
||||
# Fill the _the.package file with a list of the java files and compile them
|
||||
# to class files.
|
||||
$2 : $$($2_PACKAGE_SRCS)
|
||||
$(MKDIR) -p $$($2_PACKAGE_BDIR)
|
||||
$(RM) $2.tmp
|
||||
$$(call ListPathsSafely,$2_PACKAGE_SRCS,\n, >> $2.tmp)
|
||||
$(ECHO) $$($2_PACKAGE_BDIR)*.class | $(GREP) -v \*.class | $(TR) ' ' '\n' > $$($2_PACKAGE_BDIR)_the.package.prev
|
||||
$(RM) $$($2_PACKAGE_BDIR)*.class $$($2_PACKAGE_BDIR)*.notify $$($2_PACKAGE_BDIR)*.deleted
|
||||
$(ECHO) Compiling `$(WC) $2.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in package $(patsubst $4/%/,%,$(dir $2.tmp))
|
||||
$9 $$($2_REMOTE) $$($2_DEPS) $$($2_PUBAPI) $$($2_NATIVEAPI) $(10) -implicit:none -sourcepath "$$($2_SRCROOTSC)" -d $4 @$2.tmp
|
||||
$(ECHO) $$($2_PACKAGE_BDIR)*.class | $(GREP) -v \*.class | $(TR) ' ' '\n' > $$($2_PACKAGE_BDIR)_the.package.now
|
||||
($(GREP) -xvf $$($2_PACKAGE_BDIR)_the.package.now $$($2_PACKAGE_BDIR)_the.package.prev > $$($2_PACKAGE_BDIR)_the.package.deleted;true)
|
||||
$(ECHO) $1_CLASSES += `$(CAT) $$($2_PACKAGE_BDIR)_the.package.now` | \
|
||||
$(SED) 's/\$$$$/\$$$$\$$$$/g' > $$($2_PACKAGE_BDIR)_the.package.d
|
||||
$(ECHO) $1_JAVAS += $$($2_PACKAGE_SRCS) >> $$($2_PACKAGE_BDIR)_the.package.d
|
||||
$(ECHO) $2_NOTIFIED:=true > $$($2_PACKAGE_BDIR)_the.package.notify
|
||||
$$($2_APPEND_DEPS)
|
||||
$$($2_COPY_FILES)
|
||||
$(MV) -f $2.tmp $2
|
||||
endef
|
||||
|
||||
define remove_string
|
||||
$2 := $$(subst $1,,$$($2))
|
||||
endef
|
||||
|
||||
define replace_space_with_pathsep
|
||||
$1:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$2)))
|
||||
endef
|
||||
|
||||
define SetupJavaCompilation
|
||||
# param 1 is for example BUILD_MYPACKAGE
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
|
||||
# JVM:=path to ..bin/java
|
||||
# ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
|
||||
# SRC:=one or more directories to search for sources
|
||||
# BIN:=store classes here
|
||||
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
|
||||
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
|
||||
# COPY:=.prp means copy all prp files to the corresponding package in BIN.
|
||||
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
|
||||
# COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
|
||||
# SRCZIP:=Create a src.zip based on the found sources and copied files.
|
||||
# INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
|
||||
# EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
|
||||
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
|
||||
# JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=Don't use this. This forces an explicit -sourcepath to javac.
|
||||
# Its only here until we cleanup some nasty source code pasta in the jdk.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependecy
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
|
||||
|
||||
# Extract the info from the java compiler setup.
|
||||
$1_MODE := $$($$($1_SETUP)_MODE)
|
||||
ifneq (SINGLE_THREADED_BATCH,$$($1_MODE))
|
||||
ifneq (MULTI_CORE_CONCURRENT,$$($1_MODE))
|
||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
||||
endif
|
||||
endif
|
||||
$1_USE_DEPS := $$($$($1_SETUP)_USE_DEPS)
|
||||
$1_REMOTE := $$($$($1_SETUP)_REMOTE)
|
||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
||||
$1_JAVAH := $$($$($1_SETUP)_JAVAH)
|
||||
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
|
||||
|
||||
# Handle addons and overrides.
|
||||
$1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
|
||||
# Make sure the dirs exist.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
|
||||
# Find all files in the source trees.
|
||||
$1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(foreach i,$$($1_SRC),$$(shell $(FIND) $$i -type f)))
|
||||
# Extract the java files.
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
$1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
|
||||
endif
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
|
||||
ifneq ($$($1_INCLUDE_FILES),)
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES), $$($1_SRCS))
|
||||
endif
|
||||
$1_PKGS := $$(sort $$(dir $$($1_SRCS)))
|
||||
# Remove the source root from each found path.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$1_PKGS)))
|
||||
$1_PKGS := $$(sort $$($1_PKGS))
|
||||
# There can be only a single bin dir root, no need to foreach over the roots.
|
||||
$1_BINS := $$(shell $(FIND) $$($1_BIN) -name "*.class")
|
||||
|
||||
# Now we have a list of all java files to compile: $$($1_SRCS)
|
||||
# and we have a list of all existing class files: $$($1_BINS)
|
||||
|
||||
# Create the corresponding smart javac wrapper command line.
|
||||
$1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
|
||||
$$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
|
||||
$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
|
||||
$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) -src $$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))
|
||||
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
$1_PKG_INCLUDES := $$(addprefix /,$$(addsuffix /%,$$($1_INCLUDES)))
|
||||
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$(addsuffix /%,$$($1_INCLUDES)))
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
|
||||
$1_PKGS := $$(filter $$($1_PKG_INCLUDES),$$($1_PKGS))
|
||||
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_PKG_EXCLUDES := $$(addprefix /,$$(addsuffix /%,$$($1_EXCLUDES)))
|
||||
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$(addsuffix /%,$$($1_EXCLUDES)))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
$1_PKGS := $$(filter-out $$($1_PKG_EXCLUDES),$$($1_PKGS))
|
||||
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
|
||||
endif
|
||||
|
||||
# Find all files to be copied from source to bin.
|
||||
ifneq (,$$($1_COPY))
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_COPY_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_COPY))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_COPIES := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i \( $$($1_COPY_PATTERN) \) -a -type f))
|
||||
# Copy these explicitly
|
||||
$1_ALL_COPIES += $$($1_COPY_FILES)
|
||||
# Copy must also respect filters.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_ALL_COPIES := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_COPIES))
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES))
|
||||
$1_ALL_COPIES := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_COPIES))
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDE_FILES))
|
||||
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
|
||||
endif
|
||||
# All files below META-INF are always copied.
|
||||
$1_ALL_COPIES += $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i/META-INF -type f 2> /dev/null))
|
||||
ifneq (,$$($1_ALL_COPIES))
|
||||
# Yep, there are files to be copied!
|
||||
$1_ALL_COPY_TARGETS:=
|
||||
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
|
||||
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all property files to be copied and cleaned from source to bin.
|
||||
ifneq (,$$($1_CLEAN))
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_CLEAN_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_CLEAN))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_CLEANS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i \( $$($1_CLEAN_PATTERN) \) -a -type f))
|
||||
# Copy and clean must also respect filters.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES))
|
||||
$1_ALL_CLEANS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_CLEANS))
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDE_FILES))
|
||||
$1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_CLEANS))
|
||||
endif
|
||||
ifneq (,$$($1_ALL_CLEANS))
|
||||
# Yep, there are files to be copied and cleaned!
|
||||
$1_ALL_COPY_CLEAN_TARGETS:=
|
||||
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
|
||||
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all the directories that contain java sources, each directory
|
||||
# corresponds to a package because we expect the source
|
||||
# code to be organized in this standardized way!
|
||||
$1_SDIRS := $$(sort $$(dir $$($1_SRCS)))
|
||||
# Now prefix each package with the bin root.
|
||||
$1_BDIRS := $$(foreach i,$$($1_PKGS),$$(addprefix $$($1_BIN),$$i))
|
||||
# Now create a list of the packages that are about to compile. This list is
|
||||
# later used to filter out dependencies that point outside of this set.
|
||||
$$(shell $(RM) $$($1_BIN)/_the.list_of_packages)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_BDIRS,\n, >> $$($1_BIN)/_the.list_of_packages))
|
||||
|
||||
ifeq ($$($1_MODE),SINGLE_THREADED_BATCH)
|
||||
# Ok, we will feed all the found java files into a single javac invocation.
|
||||
# There can be no dependency checking, nor incremental builds. It is
|
||||
# the best we can do with the old javac. If the javac supports a javac server
|
||||
# then we can use the javac server.
|
||||
|
||||
# We can depend on this target file to trigger a regeneration of all the sources
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
|
||||
|
||||
# Prep the source paths.
|
||||
ifneq ($$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE),)
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE)))
|
||||
else
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Create a sed expression to remove the source roots and to replace / with .
|
||||
# and remove .java at the end.
|
||||
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
||||
|
||||
# Here is the batch rules that depends on all the sources.
|
||||
$$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
|
||||
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
|
||||
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in batch $1
|
||||
ifeq ($$($1_NOSJAVAC),)
|
||||
ifeq ($$(ENABLE_SJAVAC),yes)
|
||||
mkdir -p $$($1_BIN)_sjavac
|
||||
$$($1_JVM) $$(word 1,$$($1_JAVAC)) com.sun.tools.javac.smart.Main $$($1_SJAVAC_ARGS) -mfl $$($1_BIN)/_the.batch.tmp -d $$($1_BIN)_sjavac
|
||||
endif
|
||||
endif
|
||||
($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) -implicit:none -sourcepath "$$($1_SRCROOTSC)" -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
|
||||
$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
|
||||
else
|
||||
# Ok, we have a modern javac server running!
|
||||
# Since a single Java file can generate zero to an infinity number of .class files
|
||||
# the exact number and names of the .class files will only be known after the compile.
|
||||
# Thus after the compile, a list of the generated classes will be stored in _the.package.d
|
||||
# which is included by the makefile during the next compile. These .d files will
|
||||
# add the generated class names to the BUILD_MYPACKAGE_CLASSES variable and used java file names
|
||||
# to the BUILD_MYPACKAGE_JAVAS variable.
|
||||
$1_CLASSES :=
|
||||
$1_JAVAS :=
|
||||
# Create a file in each package that represents the package dependency.
|
||||
# This file (_the.package) will also contain a list of the source files
|
||||
# to be compiled for this package.
|
||||
$1 := $$(sort $$(patsubst %,%_the.package,$$($1_BDIRS)))
|
||||
# Now call add_java_package for each package to create the dependencies.
|
||||
$$(foreach p,$$($1),$$(eval $$(call add_java_package,$1,$$p,$$($1_SRC),$$($1_BIN),$$($1_BIN)/_the.list_of_packages,NOTUSED,$$($1_USE_DEPS),$$($1_REMOTE),$$($1_JVM) $$($1_JAVAC),$$($1_FLAGS),$$($1_EXCLUDE_FILES_PATTERN) $(OVR_SRCS),$$($1_INCLUDE_FILES),$$($1_JVM) $$($1_JAVAH),$$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE))))
|
||||
# All dependencies are setup, now we only need to depend on $1 (aka $(BUILD_MYPACKAGE))
|
||||
# and they will automatically be built!
|
||||
|
||||
# Now add on any files to copy targets
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1)
|
||||
# Remove the set of found classes from the set of all previously known classes
|
||||
# and the remainder is the set of missing classes.
|
||||
$1_MISSING_CLASSES:=$$(filter-out $$($1_BINS),$$($1_CLASSES))
|
||||
$1_PKGS_MISSING_CLASSES:=$$(sort $$(dir $$($1_MISSING_CLASSES)))
|
||||
# Remove the set of found java files from the set of all previously known java files
|
||||
# the remainder is Java files that have gone missing.
|
||||
$1_MISSING_JAVAS:=$$(filter-out $$($1_SRCS),$$($1_JAVAS))
|
||||
$1_PKGS_MISSING_JAVAS:=$$(sort $$(dir $$($1_MISSING_JAVAS)))
|
||||
# Remove each source root from the found paths.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$1_PKGS_MISSING_JAVAS)))
|
||||
# Finally remove duplicates and prefix with the binary path instead.
|
||||
$1_PKGS_MISSING_JAVAS:= $$(addprefix $$($1_BIN),$$(sort $$($1_PKGS_MISSING_JAVAS)))
|
||||
|
||||
# Remove the set of all theoretical classes from the set of found classes.
|
||||
# the remainder is the set of superfluous classes.
|
||||
$1_SUPERFLUOUS_CLASSES:=$$(sort $$(filter-out $$($1_CLASSES),$$($1_BINS)))
|
||||
$1_PKGS_SUPERFLUOUS_CLASSES:=$$(sort $$(dir $$($1_SUPERFLUOUS_CLASSES)))
|
||||
|
||||
# Now delete the _the.package files inside the problematic dirs.
|
||||
# This will force a rebuild of these packages!
|
||||
$1_FOO:=$$(sort $$($1_PKGS_MISSING_CLASSES) \
|
||||
$$($1_PKGS_SUPERFLUOUS_CLASSES) \
|
||||
$$($1_PKGS_MISSING_JAVAS))
|
||||
# ifneq (,$$($1_FOO))
|
||||
# $$(info MESSED UP PACKAGES $$($1_FOO))
|
||||
# endif
|
||||
|
||||
$$(shell $(RM) $$(addsuffix _the.package,$$(sort $$($1_PKGS_MISSING_CLASSES) \
|
||||
$$($1_PKGS_SUPERFLUOUS_CLASSES) \
|
||||
$$($1_PKGS_MISSING_JAVAS))))
|
||||
|
||||
# Normal makefile dependencies based on timestamps will detect the normal use case
|
||||
# when Java files are simply added or modified.
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_JAR))
|
||||
|
||||
ifeq (,$$($1_SUFFIXES))
|
||||
$1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
|
||||
endif
|
||||
|
||||
# A jar file was specified. Set it up.
|
||||
$$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1),\
|
||||
SRCS:=$$($1_BIN),\
|
||||
SUFFIXES:=$$($1_SUFFIXES),\
|
||||
EXCLUDE:=$$($1_EXCLUDES),\
|
||||
INCLUDES:=$$($1_INCLUDES),\
|
||||
EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS),\
|
||||
JAR:=$$($1_JAR),\
|
||||
JARMAIN:=$$($1_JARMAIN),\
|
||||
MANIFEST:=$$($1_MANIFEST),\
|
||||
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR),\
|
||||
JARINDEX:=$$($1_JARINDEX),\
|
||||
HEADERS:=$$($1_HEADERS),\
|
||||
SETUP:=$$($1_SETUP)))
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_SRCZIP))
|
||||
# A srczip file was specified. Set it up.
|
||||
$$(eval $$(call SetupZipArchive,ARCHIVE_$1,\
|
||||
SRC:=$$($1_SRC),\
|
||||
ZIP:=$$($1_SRCZIP),\
|
||||
INCLUDES:=$$($1_INCLUDES),\
|
||||
EXCLUDES:=$$($1_EXCLUDES),\
|
||||
EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
|
||||
endif
|
||||
|
||||
endef
|
||||
397
common/makefiles/MakeBase.gmk
Normal file
397
common/makefiles/MakeBase.gmk
Normal file
@@ -0,0 +1,397 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################
|
||||
#
|
||||
# Check that GNU make and cygwin are recent enough.
|
||||
# Setup common utility functions.
|
||||
#
|
||||
################################################################
|
||||
|
||||
ifndef _MAKEBASE_GMK
|
||||
_MAKEBASE_GMK := 1
|
||||
|
||||
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
|
||||
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Please upgrade to 3.81 or newer.)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(CYGPATH))
|
||||
# Cygwin styff, if needed but most is going to be
|
||||
# done in configure!
|
||||
ifeq (yes,$(CHECK_FOR_VCINSTALLDIR))
|
||||
ifeq (,$(VCINSTALLDIR))
|
||||
$(info Could not find compiler paths!)
|
||||
$(info You probably configured the build from within a)
|
||||
$(info VS command prompt, but you are not using such a)
|
||||
$(info prompt right now.)
|
||||
$(info If you instead run configure from a plain cygwin shell, it)
|
||||
$(info will attempt to setup VS for you! Please try that.)
|
||||
$(error Giving up for now.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# The build times report is turned off by setting REPORT_BUILD_TIMES to nothing.
|
||||
# This is necessary for the target clean which will erase the
|
||||
# directories where the buildtimes are stored.
|
||||
REPORT_BUILD_TIMES=1
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(MKDIR) -p $(BUILDTIMESDIR)
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
endef
|
||||
|
||||
# Indicate that we started to build a sub repository and record starting time.
|
||||
define MakeStart
|
||||
$(call RecordStartTime,$1)
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n\n" \
|
||||
"########################################################################" \
|
||||
"########################################################################" \
|
||||
"Entering $1 for target(s) $2" \
|
||||
"########################################################################"
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
|
||||
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
|
||||
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
|
||||
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$1
|
||||
endef
|
||||
|
||||
# Check if the current target is the final target, as specified by
|
||||
# the user on the command line. If so, call PrintEndMessage.
|
||||
define CheckIfFinished
|
||||
$(if $(filter $@,$(MAKECMDGOALS)),$(call PrintEndMessage))
|
||||
# If no taget is given, "all" is default. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(MAKECMDGOALS),,$(if $(filter $@,all),$(call PrintEndMessage)))
|
||||
endef
|
||||
|
||||
# Indicate that we are done.
|
||||
# Record ending time and print out the total time it took to build.
|
||||
define MakeFinish
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,$1),)
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "%s\n##### %-60.60s #####\n%s\n##### %-60.60s #####\n%s\n\n" \
|
||||
"########################################################################" \
|
||||
"Leaving $1 for target(s) $2" \
|
||||
"########################################################################" \
|
||||
$(if $(REPORT_BUILD_TIMES),"Build time `$(CAT) $(BUILDTIMESDIR)/build_time_diff_$1` for target(s) $2","") \
|
||||
"########################################################################"
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
"$1" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
endef
|
||||
|
||||
define ResetTimers
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
endef
|
||||
|
||||
define StartTimer
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
|
||||
define StopTimer
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtRootMakeStart
|
||||
$(if $(findstring -j,$(MAKEFLAGS)), $(error make -j is not supported, use make JOBS=n))
|
||||
$(call PrintStartMessage)
|
||||
$(call StartTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtRootMakeEnd
|
||||
$(call StopTimer)
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# If the variable that you want to send to stdout for piping into a file or otherwise,
|
||||
# is potentially long, for example the a list of file paths, eg a list of all package directories.
|
||||
# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
|
||||
# calls as well as use compression on recurrent file paths segments, to get around the potential
|
||||
# command line length problem that exists in cygwin and other shells.
|
||||
compress_pre:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.pre))
|
||||
compress_post:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.post))
|
||||
compress_paths=$(compress_pre)\
|
||||
$(subst $(SRC_ROOT),X97,\
|
||||
$(subst $(OUTPUT_ROOT),X98,\
|
||||
$(subst X,X00,\
|
||||
$(subst $(SPACE),\n,$(strip $1)))))\
|
||||
$(compress_post)
|
||||
|
||||
decompress_paths=sed -f $(SRC_ROOT)/common/makefiles/uncompress.sed -e 's|X99|\\n|g' \
|
||||
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
|
||||
-e 's|X00|X|g' | tr '\n' '$2'
|
||||
|
||||
define ListPathsSafely_If
|
||||
$(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
|
||||
endef
|
||||
|
||||
define ListPathsSafely_Printf
|
||||
$(if $(strip $($1_LPS$4)),printf -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3)
|
||||
endef
|
||||
|
||||
# Receipt example:
|
||||
# rm -f thepaths
|
||||
# $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
|
||||
# The \n argument means translate spaces into \n
|
||||
# if instead , , (a space) is supplied, then spaces remain spaces.
|
||||
define ListPathsSafely
|
||||
$(if $(word 10001,$($1)),$(error Cannot list safely more than 10000 paths. $1 has $(words $($1)) paths!))
|
||||
$(call ListPathsSafely_If,$1,$2,1,250)
|
||||
$(call ListPathsSafely_If,$1,$2,251,500)
|
||||
$(call ListPathsSafely_If,$1,$2,501,750)
|
||||
$(call ListPathsSafely_If,$1,$2,751,1000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,1001,1250)
|
||||
$(call ListPathsSafely_If,$1,$2,1251,1500)
|
||||
$(call ListPathsSafely_If,$1,$2,1501,1750)
|
||||
$(call ListPathsSafely_If,$1,$2,1751,2000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,2001,2250)
|
||||
$(call ListPathsSafely_If,$1,$2,2251,2500)
|
||||
$(call ListPathsSafely_If,$1,$2,2501,2750)
|
||||
$(call ListPathsSafely_If,$1,$2,2751,3000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,3001,3250)
|
||||
$(call ListPathsSafely_If,$1,$2,3251,3500)
|
||||
$(call ListPathsSafely_If,$1,$2,3501,3750)
|
||||
$(call ListPathsSafely_If,$1,$2,3751,4000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,4001,4250)
|
||||
$(call ListPathsSafely_If,$1,$2,4251,4500)
|
||||
$(call ListPathsSafely_If,$1,$2,4501,4750)
|
||||
$(call ListPathsSafely_If,$1,$2,4751,5000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,5001,5250)
|
||||
$(call ListPathsSafely_If,$1,$2,5251,5500)
|
||||
$(call ListPathsSafely_If,$1,$2,5501,5750)
|
||||
$(call ListPathsSafely_If,$1,$2,5751,6000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,6001,6250)
|
||||
$(call ListPathsSafely_If,$1,$2,6251,6500)
|
||||
$(call ListPathsSafely_If,$1,$2,6501,6750)
|
||||
$(call ListPathsSafely_If,$1,$2,6751,7000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,7001,7250)
|
||||
$(call ListPathsSafely_If,$1,$2,7251,7500)
|
||||
$(call ListPathsSafely_If,$1,$2,7501,7750)
|
||||
$(call ListPathsSafely_If,$1,$2,7751,8000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,8001,8250)
|
||||
$(call ListPathsSafely_If,$1,$2,8251,8500)
|
||||
$(call ListPathsSafely_If,$1,$2,8501,8750)
|
||||
$(call ListPathsSafely_If,$1,$2,8751,9000)
|
||||
|
||||
$(call ListPathsSafely_If,$1,$2,9001,9250)
|
||||
$(call ListPathsSafely_If,$1,$2,9251,9500)
|
||||
$(call ListPathsSafely_If,$1,$2,9501,9750)
|
||||
$(call ListPathsSafely_If,$1,$2,9751,10000)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,1751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,2751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,3751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,4751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,5751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,6751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,7751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,8751)
|
||||
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9001)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9251)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9501)
|
||||
$(call ListPathsSafely_Printf,$1,$2,$3,9751)
|
||||
endef
|
||||
|
||||
define ListPathsSafelyNow_IfPrintf
|
||||
ifneq (,$$(word $4,$$($1)))
|
||||
$$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
|
||||
$$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
|
||||
endif
|
||||
endef
|
||||
|
||||
# And an non-receipt version:
|
||||
define ListPathsSafelyNow
|
||||
ifneq (,$$(word 10001,$$($1)))
|
||||
$$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
|
||||
endif
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
|
||||
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
|
||||
$(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
|
||||
|
||||
endef
|
||||
|
||||
# The source tips can come from the Mercurial repository, or in the files
|
||||
# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
|
||||
# directory as the original $(HGDIR) directory.
|
||||
# These should not be := assignments, only used from the root Makefile.
|
||||
HG_VERSION = $(shell $(HG) version 2> /dev/null)
|
||||
HG_DIRECTORY=.hg
|
||||
HGTIP_FILENAME=.hgtip
|
||||
HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
|
||||
REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
|
||||
$(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
|
||||
$(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
|
||||
2> /dev/null)))))
|
||||
|
||||
# Emit the repo:tip pairs to $@
|
||||
define GetSourceTips
|
||||
$(CD) $(SRC_ROOT) ; \
|
||||
for i in $(REPO_LIST) IGNORE ; do \
|
||||
if [ "$${i}" = "IGNORE" ] ; then \
|
||||
continue; \
|
||||
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(HG) tip --repository $${i} --template '{node|short}\n'` ; \
|
||||
elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
|
||||
$(PRINTF) " %s:%s" \
|
||||
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
|
||||
fi; \
|
||||
done >> $@
|
||||
$(PRINTF) "\n" >> $@
|
||||
endef
|
||||
|
||||
# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
|
||||
define CreateHgTip
|
||||
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\
|
||||
$(ECHO) $1/$(HGTIP_FILENAME)
|
||||
endef
|
||||
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
endif
|
||||
endef
|
||||
|
||||
# Make sure logging is setup for everyone that includes MakeBase.gmk.
|
||||
$(eval $(call SetupLogging))
|
||||
|
||||
endif # _MAKEBASE_GMK
|
||||
185
common/makefiles/MakeHelpers.gmk
Normal file
185
common/makefiles/MakeHelpers.gmk
Normal file
@@ -0,0 +1,185 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################
|
||||
#
|
||||
# This file contains helper functions for the top-level Makefile that does
|
||||
# not depend on the spec.gmk file having been read. (The purpose of this
|
||||
# file is ju to avoid cluttering the top-level Makefile.)
|
||||
#
|
||||
################################################################
|
||||
|
||||
ifndef _MAKEHELPERS_GMK
|
||||
_MAKEHELPERS_GMK := 1
|
||||
|
||||
##############################
|
||||
# Stuff to run at include time
|
||||
##############################
|
||||
|
||||
# Find out which variables were passed explicitely on the make command line. These
|
||||
# will be passed on to sub-makes, overriding spec.gmk settings.
|
||||
MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
|
||||
|
||||
list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
|
||||
list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
|
||||
|
||||
##############################
|
||||
# Functions
|
||||
##############################
|
||||
|
||||
define fatal-error
|
||||
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
|
||||
$$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
|
||||
endef
|
||||
|
||||
define ParseLogLevel
|
||||
ifeq ($$(origin VERBOSE),undefined)
|
||||
# Setup logging according to LOG (but only if VERBOSE is not given)
|
||||
ifeq ($$(LOG),)
|
||||
# Set LOG to "warn" as default if not set (and no VERBOSE given)
|
||||
LOG=warn
|
||||
endif
|
||||
ifeq ($$(LOG),warn)
|
||||
VERBOSE=-s
|
||||
else ifeq ($$(LOG),info)
|
||||
VERBOSE=
|
||||
else ifeq ($$(LOG),debug)
|
||||
VERBOSE=
|
||||
else ifeq ($$(LOG),trace)
|
||||
VERBOSE=-d -p
|
||||
else
|
||||
$$(info Error: LOG must be one of: warn, info, debug or trace.)
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
else
|
||||
ifneq ($$(LOG),)
|
||||
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
# TODO: Fix duplication in MakeBase.gmk
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
endif
|
||||
endef
|
||||
|
||||
define ParseConfAndSpec
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
endif
|
||||
# ... OK, we're satisfied, we'll use this SPEC later on
|
||||
else
|
||||
# Find all spec.gmk files in the build output directory
|
||||
output_dir=$$(root_dir)/build
|
||||
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
|
||||
ifeq ($$(all_spec_files),)
|
||||
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
# Extract the configuration names from the path
|
||||
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
|
||||
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# User have given a CONF= argument.
|
||||
ifeq ($$(CONF),)
|
||||
# If given CONF=, match all configurations
|
||||
matching_confs=$$(strip $$(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
|
||||
endif
|
||||
ifeq ($$(matching_confs),)
|
||||
$$(info No configurations found matching CONF=$$(CONF))
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(eval $$(call fatal-error))
|
||||
else
|
||||
ifeq ($$(words $$(matching_confs)),1)
|
||||
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
else
|
||||
$$(info Building the following configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
|
||||
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)),1)
|
||||
$$(info No CONF or SPEC given, but more than one spec.gmk found in $$(output_dir).)
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config> or SPEC=<specfile>)
|
||||
$$(eval $$(call fatal-error))
|
||||
endif
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPEC=$$(strip $$(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define CheckEnvironment
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
|
||||
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
|
||||
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
|
||||
)
|
||||
endef
|
||||
|
||||
define PrintStartMessage
|
||||
$(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
|
||||
$(call CheckEnvironment)
|
||||
@$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
|
||||
endef
|
||||
|
||||
define PrintEndMessage
|
||||
@$(ECHO) "Finished building OpenJDK for target '$@'"
|
||||
$(call CheckEnvironment)
|
||||
endef
|
||||
|
||||
endif # _MAKEHELPERS_GMK
|
||||
218
common/makefiles/Makefile
Normal file
218
common/makefiles/Makefile
Normal file
@@ -0,0 +1,218 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
else
|
||||
makefile_path:=$(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
|
||||
|
||||
# ... and then we can include our helper functions
|
||||
include $(dir $(makefile_path))/MakeHelpers.gmk
|
||||
|
||||
$(eval $(call ParseLogLevel))
|
||||
$(eval $(call SetupLogging))
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
|
||||
# hence this workaround.
|
||||
ifeq ($(JOBS),)
|
||||
JOBS=$(NUM_CORES)
|
||||
endif
|
||||
|
||||
ifneq ($(words $(SPEC)),1)
|
||||
### We have multiple configurations to build, call make repeatedly
|
||||
all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean:
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@ $(MAKE_ARGS)) &&) true
|
||||
|
||||
.PHONY: all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean
|
||||
|
||||
else
|
||||
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
|
||||
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
||||
### Clean up from previous run
|
||||
|
||||
# Remove any build.log from a previous run, if they exist
|
||||
ifneq (,$(BUILD_LOG))
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
endif
|
||||
endif
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
ifneq (,$(JAVAC_SERVERS))
|
||||
$(shell mkdir -p $(JAVAC_SERVERS) && rm -rf $(JAVAC_SERVERS)/*)
|
||||
endif
|
||||
# Clean out any notifications from the previous build.
|
||||
$(shell find $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
|
||||
|
||||
# Reset the build timers.
|
||||
$(eval $(call ResetTimers))
|
||||
|
||||
### Main targets
|
||||
|
||||
all: jdk
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
langtools: start-make langtools-only
|
||||
langtools-only:
|
||||
@$(call MakeStart,langtools,all)
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,langtools,all)
|
||||
|
||||
corba: langtools corba-only
|
||||
corba-only:
|
||||
@$(call MakeStart,corba,all)
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,corba,all)
|
||||
|
||||
jaxp: langtools jaxp-only
|
||||
jaxp-only:
|
||||
@$(call MakeStart,jaxp,all)
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxp,all)
|
||||
|
||||
jaxws: langtools jaxp jaxws-only
|
||||
jaxws-only:
|
||||
@$(call MakeStart,jaxws,all)
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxws,all)
|
||||
|
||||
hotspot: langtools hotspot-only
|
||||
hotspot-only:
|
||||
@$(call MakeStart,hotspot,all)
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,hotspot,all)
|
||||
|
||||
jdk: langtools corba jaxp jaxws hotspot jdk-only
|
||||
jdk-only:
|
||||
@$(call MakeStart,jdk,all)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jdk,all)
|
||||
|
||||
images: source-tips start-make jdk langtools corba jaxp jaxws hotspot images-only
|
||||
images-only:
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) images)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
install: source-tips start-make jdk langtools corba jaxp jaxws hotspot install-only
|
||||
install-only:
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) install)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
start-make:
|
||||
@$(call AtRootMakeStart)
|
||||
|
||||
.PHONY: jdk hotspot jaxws jaxp corba langtools install images start-make
|
||||
|
||||
test: start-make
|
||||
@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call MakeFinish,test,$(if $(TEST),$(TEST),all))
|
||||
@$(call AtRootMakeEnd)
|
||||
.PHONY: test
|
||||
|
||||
|
||||
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
||||
# used to track the exact sources used to build that image.
|
||||
source-tips: $(OUTPUT_ROOT)/source_tips
|
||||
$(OUTPUT_ROOT)/source_tips: FRC
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(RM) $@
|
||||
@$(call GetSourceTips)
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean:
|
||||
@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
|
||||
@$(ECHO) Cleaned everything except the build configuration.
|
||||
.PHONY: clean
|
||||
|
||||
# Remove everything, you have to rerun configure.
|
||||
dist-clean:
|
||||
@$(RM) -r $(OUTPUT_ROOT)
|
||||
@$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
.PHONY: dist-clean
|
||||
|
||||
clean-jdk:
|
||||
@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | \
|
||||
grep -v langtools | grep -v corba | grep -v jaxp | grep -v jaxws | grep -v hotspot`)
|
||||
@$(ECHO) "Cleaned jdk build artifacts (but not langtools,corba,jaxp,jaxws,hotspot nor the build configuration)"
|
||||
.PHONY: clean
|
||||
|
||||
endif
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||
# If you addd more global targets, please update the fatal-error macro.
|
||||
|
||||
help:
|
||||
$(info )
|
||||
$(info OpenJDK Makefile help)
|
||||
$(info =====================)
|
||||
$(info )
|
||||
$(info Common make targets)
|
||||
$(info . make [all] # Compile all code but do not create images)
|
||||
$(info . make images # Create complete j2sdk and j2re images)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make clean # Remove all files generated by make, but not those generated by configure)
|
||||
$(info . make dist-clean # Remove all files generated by both make and configure)
|
||||
$(info . make help # Give some help on using make)
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
$(info )
|
||||
$(info Useful make variables)
|
||||
$(info . make CONF= # Build all configurations (note, assignment is empty))
|
||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching the given substring)
|
||||
$(info )
|
||||
$(info . make LOG=<loglevel> # Change loglevel from warn (default) to the given loglevel)
|
||||
$(info . # Available loglevels are: warn, info, debug and trace)
|
||||
$(info . # To see executed command lines, use LOG=info)
|
||||
$(info )
|
||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||
$(info . # make test TEST="jdk_lang jdk_net")
|
||||
$(info )
|
||||
.PHONY: help
|
||||
FRC: # Force target
|
||||
573
common/makefiles/NativeCompilation.gmk
Normal file
573
common/makefiles/NativeCompilation.gmk
Normal file
@@ -0,0 +1,573 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# When you read this source. Remember that $(sort ...) has the side effect
|
||||
# of removing duplicates. It is actually this side effect that is
|
||||
# desired whenever sort is used below!
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
COMPILING_MSG=echo Compiling $1
|
||||
LINKING_MSG=echo Linking $1
|
||||
LINKING_EXE_MSG=echo Linking executable $1
|
||||
ARCHIVING_MSG=echo Archiving $1
|
||||
else
|
||||
COMPILING_MSG=
|
||||
LINKING_MSG=
|
||||
LINKING_EXE_MSG=
|
||||
ARCHIVING_MSG=
|
||||
endif
|
||||
|
||||
define add_native_source
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# parma 2 = the source file name (..../alfa.c or .../beta.cpp)
|
||||
# param 3 = the bin dir that stores all .o (.obj) and .d files.
|
||||
# param 4 = the c flags to the compiler
|
||||
# param 5 = the c compiler
|
||||
# param 6 = the c++ flags to the compiler
|
||||
# param 7 = the c++ compiler
|
||||
# param 8 = the flags to the assembler
|
||||
|
||||
ifneq (,$$(filter %.c,$2))
|
||||
# Compile as a C file
|
||||
$1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -c
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.m,$2))
|
||||
# Compile as a objective-c file
|
||||
$1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -c
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.s,$2))
|
||||
# Compile as assembler file
|
||||
$1_$2_FLAGS=$8
|
||||
$1_$2_COMP=$(AS)
|
||||
$1_$2_DEP_FLAG:=
|
||||
else
|
||||
# Compile as a C++ file
|
||||
$1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -c
|
||||
$1_$2_COMP=$7
|
||||
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
|
||||
endif
|
||||
# Generate the .o (.obj) file name and place it in the bin dir.
|
||||
$1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
|
||||
# Only continue if this object file hasn't been processed already. This lets the first found
|
||||
# source file override any other with the same name.
|
||||
ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
|
||||
$1_OBJS_SO_FAR+=$$($1_$2_OBJ)
|
||||
ifeq (,$$(filter %.s,$2))
|
||||
# And this is the dependency file for this obj file.
|
||||
$1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
|
||||
# Include previously generated dependency information. (if it exists)
|
||||
-include $$($1_$2_DEP)
|
||||
|
||||
ifeq ($(COMPILER_TYPE),CL)
|
||||
$1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
|
||||
-Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
|
||||
endif
|
||||
endif
|
||||
|
||||
$$($1_$2_OBJ) : $2
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
endif
|
||||
ifeq ($(COMPILER_TYPE),CL)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define SetupNativeCompilation
|
||||
# param 1 is for example BUILD_MYPACKAGE
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# SRC one or more directory roots to scan for C/C++ files.
|
||||
# LANG C or C++
|
||||
# CFLAGS the compiler flags to be used, used both for C and C++.
|
||||
# CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
|
||||
# LDFLAGS the linker flags to be used, used both for C and C++.
|
||||
# LDFLAGS_SUFFIX the linker flags to be added last on the commandline
|
||||
# typically the libraries linked to.
|
||||
# ARFLAGS the archiver flags to be used
|
||||
# OBJECT_DIR the directory where we store the object files
|
||||
# LIBRARY the resulting library file
|
||||
# PROGRAM the resulting exec file
|
||||
# INCLUDES only pick source from these directories
|
||||
# EXCLUDES do not pick source from these directories
|
||||
# INCLUDE_FILES only compile exactly these files!
|
||||
# EXCLUDE_FILES with these names
|
||||
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
|
||||
# RC_FLAGS flags for RC.
|
||||
# MAPFILE mapfile
|
||||
# REORDER reorder file
|
||||
# DEBUG_SYMBOLS add debug symbols (if configured on)
|
||||
# CC the compiler to use, default is $(CC)
|
||||
# LDEXE the linker to use for linking executables, default is $(LDEXE)
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
$(if $(16),$1_$(strip $(16)))
|
||||
$(if $(17),$1_$(strip $(17)))
|
||||
$(if $(18),$1_$(strip $(18)))
|
||||
$(if $(19),$1_$(strip $(19)))
|
||||
$(if $(20),$1_$(strip $(20)))
|
||||
$(if $(21),$1_$(strip $(21)))
|
||||
$(if $(22),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
|
||||
|
||||
ifneq (,$$($1_BIN))
|
||||
$$(error BIN has been replaced with OBJECT_DIR)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_LIB))
|
||||
$$(error LIB has been replaced with LIBRARY)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_EXE))
|
||||
$$(error EXE has been replaced with PROGRAM)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_LIBRARY))
|
||||
ifeq (,$$($1_OUTPUT_DIR))
|
||||
$$(error LIBRARY requires OUTPUT_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
|
||||
$$(error directory of LIBRARY should be specified using OUTPUT_DIR)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
|
||||
$$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
|
||||
$$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
|
||||
endif
|
||||
|
||||
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
|
||||
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_STATIC_LIBRARY))
|
||||
ifeq (,$$($1_OUTPUT_DIR))
|
||||
$$(error STATIC_LIBRARY requires OUTPUT_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
|
||||
$$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
|
||||
$$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
|
||||
$$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
|
||||
endif
|
||||
|
||||
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
|
||||
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_PROGRAM))
|
||||
ifeq (,$$($1_OUTPUT_DIR))
|
||||
$$(error PROGRAM requires OUTPUT_DIR)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
|
||||
$$(error directory of PROGRAM should be specified using OUTPUT_DIR)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
|
||||
$$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
|
||||
endif
|
||||
|
||||
$1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
|
||||
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
|
||||
endif
|
||||
|
||||
ifeq (,$$($1_TARGET))
|
||||
$$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
|
||||
endif
|
||||
|
||||
ifeq (,$$($1_LANG))
|
||||
$$(error You have to specify LANG for native compilation $1)
|
||||
endif
|
||||
ifeq (C,$$($1_LANG))
|
||||
ifeq ($$($1_LDEXE),)
|
||||
$1_LDEXE:=$(LDEXE)
|
||||
endif
|
||||
$1_LD:=$(LD)
|
||||
else
|
||||
ifeq (C++,$$($1_LANG))
|
||||
$1_LD:=$(LDCXX)
|
||||
$1_LDEXE:=$(LDEXECXX)
|
||||
else
|
||||
$$(error Unknown native language $$($1_LANG) for $1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_CC),)
|
||||
$1_CC:=$(CC)
|
||||
endif
|
||||
|
||||
# Make sure the dirs exist.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
|
||||
# Find all files in the source trees. Sort to remove duplicates.
|
||||
$1_ALL_SRCS := $$(sort $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f)))
|
||||
# Extract the C/C++ files.
|
||||
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
$1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
|
||||
endif
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
|
||||
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
|
||||
endif
|
||||
ifeq (,$$($1_SRCS))
|
||||
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
|
||||
endif
|
||||
# There can be only a single bin dir root, no need to foreach over the roots.
|
||||
$1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
|
||||
# Now we have a list of all c/c++ files to compile: $$($1_SRCS)
|
||||
# and we have a list of all existing object files: $$($1_BINS)
|
||||
|
||||
# Prepend the source/bin path to the filter expressions. Then do the filtering.
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
endif
|
||||
|
||||
# Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
|
||||
# a reproducable order on the input files to the linker).
|
||||
$1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
|
||||
# Are there too many object files on disk? Perhaps because some source file was removed?
|
||||
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
|
||||
# Clean out the superfluous object files.
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
|
||||
$1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
|
||||
ifneq ($(DEBUG_LEVEL),release)
|
||||
# Pickup extra debug dependent variables for CFLAGS
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
else
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
|
||||
$1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
|
||||
ifneq ($(DEBUG_LEVEL),release)
|
||||
# Pickup extra debug dependent variables for CXXFLAGS
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
else
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_CXXFLAGS),)
|
||||
$1_CXXFLAGS:=$$($1_CFLAGS)
|
||||
endif
|
||||
ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
|
||||
$1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_REORDER))
|
||||
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
|
||||
endif
|
||||
|
||||
ifneq (no, $(ENABLE_DEBUG_SYMBOLS))
|
||||
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# <weird code />
|
||||
# There is very weird code in Defs-solaris.gmk that first sets variables as decribed below
|
||||
# and then a couple of hundreds of line below resets them...
|
||||
# this feels like a sure bug...but before this is confirmed, mimic this behaviour
|
||||
# (note: skip indenting this as it will surely be removed anyway)
|
||||
# <weird code />
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
$1_OPTIMIZATION := LOW
|
||||
$1_EXTRA_CFLAGS += $(CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CXXFLAGS += $(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
# <weird code />
|
||||
endif
|
||||
# <weird code />
|
||||
endif
|
||||
|
||||
ifeq (NONE, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_NONE)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NONE)
|
||||
else ifeq (LOW, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_NORM)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NORM)
|
||||
else ifeq (HIGH, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_HI)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HI)
|
||||
else ifeq (HIGHEST, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_HIGHEST)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HIGHEST)
|
||||
else ifneq (, $$($1_OPTIMIZATION))
|
||||
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
|
||||
endif
|
||||
|
||||
# Now create a list of the packages that are about to compile. Used when sending source
|
||||
# in a batch to the compiler.
|
||||
$$(shell $(RM) $$($1_OBJECT_DIR)/_the.list_of_sources)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_OBJECT_DIR)/_the.list_of_sources))
|
||||
|
||||
# Now call add_native_source for each source file we are going to compile.
|
||||
$$(foreach p,$$($1_SRCS),\
|
||||
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
|
||||
$$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC),\
|
||||
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
|
||||
|
||||
# On windows we need to create a resource file
|
||||
ifeq ($(OPENJDK_TARGET_OS_API), winapi)
|
||||
ifneq (,$$($1_VERSIONINFO_RESOURCE))
|
||||
$1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
|
||||
$$($1_RES): $$($1_VERSIONINFO_RESOURCE)
|
||||
$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
|
||||
endif
|
||||
ifneq (,$$($1_MANIFEST))
|
||||
$1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
|
||||
IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
|
||||
$$($1_GEN_MANIFEST): $$($1_MANIFEST)
|
||||
$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
# mapfile doesnt seem to be implemented on macosx (yet??)
|
||||
ifneq ($(OPENJDK_TARGET_CPU),ppc)
|
||||
ifneq ($(OPENJDK_TARGET_CPU),arm)
|
||||
ifneq ($(OPENJDK_TARGET_OS),macosx)
|
||||
ifneq ($(OPENJDK_TARGET_OS),windows)
|
||||
$1_REAL_MAPFILE:=$$($1_MAPFILE)
|
||||
ifneq (,$$($1_REORDER))
|
||||
$1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile
|
||||
|
||||
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
|
||||
$$(MKDIR) -p $$(@D)
|
||||
$$(CP) $$($1_MAPFILE) $$@.tmp
|
||||
$$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
|
||||
$$(MV) $$@.tmp $$@
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API dependent variables (posix or winapi) and
|
||||
# (linux,solaris,windows,bsd) for LDFLAGS and LDFLAGS_SUFFIX
|
||||
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
|
||||
$1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
|
||||
ifneq (,$$($1_REAL_MAPFILE))
|
||||
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
|
||||
endif
|
||||
|
||||
$1 := $$($1_TARGET)
|
||||
ifneq (,$$($1_LIBRARY))
|
||||
# Generating a dynamic library.
|
||||
$1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
|
||||
endif
|
||||
|
||||
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
|
||||
$(CP) $$< $$@
|
||||
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif # Touch to not retrigger rule on rebuild
|
||||
$(TOUCH) $$@
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), 1)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
|
||||
$(CD) $$($1_OBJECT_DIR) \
|
||||
&& $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
|
||||
else
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
|
||||
$(CD) $$($1_OBJECT_DIR) \
|
||||
&& $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
|
||||
endif
|
||||
else
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
|
||||
$$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
|
||||
else
|
||||
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
$$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
|
||||
$$(call LINKING_MSG,$$($1_BASENAME))
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
|
||||
$$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_STATIC_LIBRARY))
|
||||
# Generating a static library, ie object file archive.
|
||||
$$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
|
||||
$$(call ARCHIVING_MSG,$$($1_LIBRARY))
|
||||
$(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
|
||||
$$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_PROGRAM))
|
||||
# A executable binary has been specified, setup the target for it.
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
|
||||
endif
|
||||
|
||||
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
|
||||
$(CP) $$< $$@
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
|
||||
# empty section headers until a fixed $(OBJCOPY) is available.
|
||||
# An empty section header has sh_addr == 0 and sh_size == 0.
|
||||
# This problem has only been seen on Solaris X64, but we call this tool
|
||||
# on all Solaris builds just in case.
|
||||
#
|
||||
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
|
||||
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
|
||||
endif
|
||||
$(TOUCH) $$@
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), 1)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
|
||||
$(CD) $$($1_OBJECT_DIR) \
|
||||
&& $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
|
||||
else
|
||||
$$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
|
||||
$(CD) $$($1_OBJECT_DIR) \
|
||||
&& $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
|
||||
endif
|
||||
else
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
|
||||
$$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
|
||||
else
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
$$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
|
||||
$$(call LINKING_EXE_MSG,$$($1_BASENAME))
|
||||
$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
|
||||
$$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
ifneq (,$$($1_GEN_MANIFEST))
|
||||
$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1
|
||||
endif
|
||||
|
||||
endif
|
||||
endef
|
||||
104
common/makefiles/RMICompilation.gmk
Normal file
104
common/makefiles/RMICompilation.gmk
Normal file
@@ -0,0 +1,104 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
define SetupRMICompilation
|
||||
# param 1 is a name for a variable to depend on.
|
||||
# param 2 and up are named args.
|
||||
# CLASSES:=List of classes to generate stubs for
|
||||
# CLASSES_DIR:=Directory where to look for classes
|
||||
# STUB_CLASSES_DIR:=Directory in where to put stub classes
|
||||
# RUN_V11:=Set to run rmic with -v1.1
|
||||
# RUN_V12:=Set to run rmic with -v1.2
|
||||
# RUN_IIOP:=Set to run rmic with -iiop
|
||||
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
|
||||
# KEEP_GENERATED:=Set to keep generated sources around
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
|
||||
|
||||
|
||||
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
|
||||
|
||||
$1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
|
||||
$1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
|
||||
$1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
|
||||
$1_TARGETS := $$($1_STUB_FILES)
|
||||
$1_ARGS :=
|
||||
ifneq (,$$($1_RUN_V11))
|
||||
$1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
|
||||
$1_TARGETS += $$($1_SKEL_FILES)
|
||||
$1_ARGS += -v1.1
|
||||
endif
|
||||
ifneq (,$$($1_RUN_V12))
|
||||
$1_ARGS += -v1.2
|
||||
endif
|
||||
|
||||
$1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
|
||||
$1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
$1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
|
||||
ifneq (,$$($1_RUN_IIOP))
|
||||
$1_TARGETS += $$($1_TIE_FILES)
|
||||
$1_ARGS += -iiop
|
||||
endif
|
||||
ifneq (,$$($1_RUN_IIOP_STDPKG))
|
||||
$1_TARGETS += $$($1_TIE_STDPKG_FILES)
|
||||
$1_ARGS2 := -iiop -standardPackage
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_KEEP_GENERATED))
|
||||
$1_ARGS += -keepgenerated
|
||||
$1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
|
||||
endif
|
||||
|
||||
$1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
|
||||
|
||||
$$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
|
||||
|
||||
$$($1_DEP_FILE): $$($1_CLASS_FILES)
|
||||
$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
|
||||
if [ "x$$($1_ARGS)" != "x" ]; then \
|
||||
$(ECHO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
fi;
|
||||
if [ "x$$($1_ARGS2)" != "x" ]; then \
|
||||
$(ECHO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
fi;
|
||||
|
||||
|
||||
$1 := $$($1_TARGETS)
|
||||
|
||||
# By marking as secondary, this "touch" file doesn't need to be touched and will never exist.
|
||||
.SECONDARY: $$($1_DEP_FILE)
|
||||
endef
|
||||
1
common/makefiles/compress.post
Normal file
1
common/makefiles/compress.post
Normal file
@@ -0,0 +1 @@
|
||||
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
|
||||
1
common/makefiles/compress.pre
Normal file
1
common/makefiles/compress.pre
Normal file
@@ -0,0 +1 @@
|
||||
$(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72,
|
||||
72
common/makefiles/uncompress.sed
Normal file
72
common/makefiles/uncompress.sed
Normal file
@@ -0,0 +1,72 @@
|
||||
s|X01|com|g
|
||||
s|X02|org|g
|
||||
s|X03|sun|g
|
||||
s|X04|java|g
|
||||
s|X05|javax|g
|
||||
s|X06|sun/io|g
|
||||
s|X07|com/sun|g
|
||||
s|X08|java/io|g
|
||||
s|X09|org/omg|g
|
||||
s|X10|org/w3c|g
|
||||
s|X11|org/xml|g
|
||||
s|X12|sun/awt|g
|
||||
s|X13|sun/net|g
|
||||
s|X14|sun/nio|g
|
||||
s|X15|sun/rmi|g
|
||||
s|X16|java/awt|g
|
||||
s|X17|java/net|g
|
||||
s|X18|java/nio|g
|
||||
s|X19|java/rmi|g
|
||||
s|X20|META-INF|g
|
||||
s|X21|sun/font|g
|
||||
s|X22|sun/misc|g
|
||||
s|X23|sun/text|g
|
||||
s|X24|sun/util|g
|
||||
s|X25|java/lang|g
|
||||
s|X26|java/math|g
|
||||
s|X27|java/text|g
|
||||
s|X28|java/util|g
|
||||
s|X29|javax/jws|g
|
||||
s|X30|javax/net|g
|
||||
s|X31|javax/rmi|g
|
||||
s|X32|javax/xml|g
|
||||
s|X33|sun/corba|g
|
||||
s|X34|sun/print|g
|
||||
s|X35|sun/swing|g
|
||||
s|X36|java/beans|g
|
||||
s|X37|javax/lang|g
|
||||
s|X38|sun/applet|g
|
||||
s|X39|sun/java2d|g
|
||||
s|X40|java/applet|g
|
||||
s|X41|javax/print|g
|
||||
s|X42|javax/sound|g
|
||||
s|X43|javax/swing|g
|
||||
s|X44|javax/tools|g
|
||||
s|X45|jdk/classes|g
|
||||
s|X46|org/relaxng|g
|
||||
s|X47|sun/reflect|g
|
||||
s|X48|javax/crypto|g
|
||||
s|X49|javax/naming|g
|
||||
s|X50|jaxp/classes|g
|
||||
s|X51|sun/security|g
|
||||
s|X52|corba/classes|g
|
||||
s|X53|java/security|g
|
||||
s|X54|javax/imageio|g
|
||||
s|X55|jdk/btclasses|g
|
||||
s|X56|javax/activity|g
|
||||
s|X57|javax/security|g
|
||||
s|X58|jdk/newclasses|g
|
||||
s|X59|sun/instrument|g
|
||||
s|X60|sun/management|g
|
||||
s|X61|corba/btclasses|g
|
||||
s|X62|jdk/democlasses|g
|
||||
s|X63|javax/activation|g
|
||||
s|X64|javax/annotation|g
|
||||
s|X65|javax/management|g
|
||||
s|X66|javax/transaction|g
|
||||
s|X67|jaxws/jaf_classes|g
|
||||
s|X68|langtools/classes|g
|
||||
s|X69|META-INF/services|g
|
||||
s|X70|jdk/newdemoclasses|g
|
||||
s|X71|javax/accessibility|g
|
||||
s|X72|jaxws/jaxws_classes|g
|
||||
254
common/src/uncygdrive.c
Normal file
254
common/src/uncygdrive.c
Normal file
@@ -0,0 +1,254 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include <Windows.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
/*
|
||||
* Test if pos points to /cygdrive/_/ where _ can
|
||||
* be any character.
|
||||
*/
|
||||
int is_cygdrive_here(int pos, char *in, int len)
|
||||
{
|
||||
// Length of /cygdrive/c/ is 12
|
||||
if (pos+12 > len) return 0;
|
||||
if (in[pos+11]=='/' &&
|
||||
in[pos+9]=='/' &&
|
||||
in[pos+8]=='e' &&
|
||||
in[pos+7]=='v' &&
|
||||
in[pos+6]=='i' &&
|
||||
in[pos+5]=='r' &&
|
||||
in[pos+4]=='d' &&
|
||||
in[pos+3]=='g' &&
|
||||
in[pos+2]=='y' &&
|
||||
in[pos+1]=='c' &&
|
||||
in[pos+0]=='/') {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Replace /cygdrive/_/ with _:/
|
||||
* Works in place since drive letter is always
|
||||
* shorter than /cygdrive/
|
||||
*/
|
||||
char *replace_cygdrive(char *in)
|
||||
{
|
||||
int len = strlen(in);
|
||||
char *out = malloc(len+1);
|
||||
int i,j;
|
||||
|
||||
if (len < 12) {
|
||||
strcpy(out, in);
|
||||
return out;
|
||||
}
|
||||
for (i = 0, j = 0; i<len;) {
|
||||
if (is_cygdrive_here(i, in, len)) {
|
||||
out[j++] = in[i+10];
|
||||
out[j++] = ':';
|
||||
i+=11;
|
||||
} else {
|
||||
out[j] = in[i];
|
||||
i++;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
out[j] = 0;
|
||||
return out;
|
||||
}
|
||||
|
||||
void append(char **b, size_t *bl, size_t *u, char *add, size_t addlen)
|
||||
{
|
||||
while ( (addlen+*u+1) > *bl) {
|
||||
*bl *= 2;
|
||||
*b = realloc(*b, *bl);
|
||||
}
|
||||
memcpy(*b+*u, add, addlen);
|
||||
*u += addlen;
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a new string from in where the first occurance of sub is
|
||||
* replaced by rep.
|
||||
*/
|
||||
char *replace_substring(char *in, char *sub, char *rep)
|
||||
{
|
||||
int in_len = strlen(in);
|
||||
int sub_len = strlen(sub);
|
||||
int rep_len = strlen(rep);
|
||||
char *out = malloc(in_len - sub_len + rep_len + 1);
|
||||
char *p;
|
||||
|
||||
if (!(p = strstr(in, sub))) {
|
||||
// If sub isn't a substring of in, just return in.
|
||||
return in;
|
||||
}
|
||||
|
||||
// Copy characters from beginning of in to start of sub.
|
||||
strncpy(out, in, p - in);
|
||||
out[p - in] = '\0';
|
||||
|
||||
sprintf(out + (p - in), "%s%s", rep, p + sub_len);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
char *files_to_delete[1024];
|
||||
int num_files_to_delete = 0;
|
||||
|
||||
char *fix_at_file(char *in)
|
||||
{
|
||||
char *tmpdir;
|
||||
char name[2048];
|
||||
char *atname;
|
||||
char *buffer;
|
||||
size_t buflen=65536;
|
||||
size_t used=0;
|
||||
size_t len;
|
||||
int rc;
|
||||
FILE *atout;
|
||||
FILE *atin;
|
||||
char block[2048];
|
||||
size_t blocklen;
|
||||
char *fixed;
|
||||
|
||||
atin = fopen(in+1, "r");
|
||||
if (atin == NULL) {
|
||||
fprintf(stderr, "Could not read at file %s\n", in+1);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
tmpdir = getenv("TMP");
|
||||
if (tmpdir == NULL) {
|
||||
tmpdir = "c:/cygwin/tmp";
|
||||
}
|
||||
_snprintf(name, sizeof(name), "%s\\atfile_XXXXXX", tmpdir);
|
||||
|
||||
rc = _mktemp_s(name, strlen(name)+1);
|
||||
if (rc) {
|
||||
fprintf(stderr, "Could not create temporary file name for at file!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
atout = fopen(name, "w");
|
||||
if (atout == NULL) {
|
||||
fprintf(stderr, "Could open temporary file for writing! %s\n", name);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
buffer = malloc(buflen);
|
||||
while((blocklen = fread(block,1,sizeof(block),atin)) > 0) {
|
||||
append(&buffer, &buflen, &used, block, blocklen);
|
||||
}
|
||||
buffer[used] = 0;
|
||||
fixed = replace_cygdrive(buffer);
|
||||
fwrite(fixed, strlen(fixed), 1, atout);
|
||||
fclose(atin);
|
||||
fclose(atout);
|
||||
free(fixed);
|
||||
free(buffer);
|
||||
files_to_delete[num_files_to_delete] = malloc(strlen(name)+1);
|
||||
strcpy(files_to_delete[num_files_to_delete], name);
|
||||
num_files_to_delete++;
|
||||
atname = malloc(strlen(name)+2);
|
||||
atname[0] = '@';
|
||||
strcpy(atname+1, name);
|
||||
return atname;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
unsigned short rc;
|
||||
|
||||
char *new_at_file;
|
||||
char *old_at_file;
|
||||
char *line;
|
||||
int i;
|
||||
DWORD exitCode;
|
||||
|
||||
if (argc<2) {
|
||||
fprintf(stderr, "Usage: uncygdrive.exe /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
line = replace_cygdrive(strstr(GetCommandLine(), argv[1]));
|
||||
|
||||
for (i=1; i<argc; ++i) {
|
||||
if (argv[i][0] == '@') {
|
||||
// Found at-file! Fix it!
|
||||
old_at_file = replace_cygdrive(argv[i]);
|
||||
new_at_file = fix_at_file(old_at_file);
|
||||
line = replace_substring(line, old_at_file, new_at_file);
|
||||
}
|
||||
}
|
||||
|
||||
if (getenv("DEBUG_UNCYGDRIVE") != NULL) {
|
||||
fprintf(stderr, "uncygdrive >%s<\n", line);
|
||||
}
|
||||
|
||||
ZeroMemory(&si,sizeof(si));
|
||||
si.cb=sizeof(si);
|
||||
ZeroMemory(&pi,sizeof(pi));
|
||||
|
||||
rc = CreateProcess(NULL,
|
||||
line,
|
||||
0,
|
||||
0,
|
||||
TRUE,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&si,
|
||||
&pi);
|
||||
if(!rc)
|
||||
{
|
||||
//Could not start process;
|
||||
fprintf(stderr, "Could not start process!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
||||
GetExitCodeProcess(pi.hProcess,&exitCode);
|
||||
|
||||
if (getenv("DEBUG_UNCYGDRIVE") != NULL) {
|
||||
for (i=0; i<num_files_to_delete; ++i) {
|
||||
fprintf(stderr, "Not deleting temporary uncygdrive file %s\n",
|
||||
files_to_delete[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=0; i<num_files_to_delete; ++i) {
|
||||
remove(files_to_delete[i]);
|
||||
}
|
||||
}
|
||||
|
||||
exit(exitCode);
|
||||
}
|
||||
@@ -2,3 +2,4 @@
|
||||
^dist/
|
||||
/nbproject/private/
|
||||
^.hgtip
|
||||
.DS_Store
|
||||
|
||||
@@ -143,3 +143,32 @@ e59c47de1ad8982ff3b0e843773a6902b36c2337 jdk8-b14
|
||||
e1366c5d84ef984095a332bcee70b3938232d07d jdk8-b19
|
||||
51d8b6cb18c0978ecfa4f33e1537d35ee01b69fa jdk8-b20
|
||||
f157fc2a71a38ce44007a6f18d5b011824dce705 jdk8-b21
|
||||
a11d0062c445d5f36651c78650ab88aa594bcbff jdk8-b22
|
||||
5218eb256658442b62b05295aafa5b5f35252972 jdk8-b23
|
||||
b98f0e6dddf987df565029a1f58417fc1844c3f3 jdk8-b24
|
||||
e45d6b406d5f91ff5256a5c82456ab1e7eb8becd jdk8-b25
|
||||
79f709a099f40c08f76567fa6d813f9009a69826 jdk8-b26
|
||||
4fffe75e4edd39a2517f10b743941bf94edb143d jdk8-b27
|
||||
2082eb35d49a9c2aab90b8d4fd31cefb7a23b82e jdk8-b28
|
||||
6117395d422682f89d228347e319fcaac7edc729 jdk8-b29
|
||||
4605f8418bf562e78be79b25b6b8a5110281acae jdk8-b30
|
||||
1954151dfae8f73db24e396380f7c02bdd47c486 jdk8-b31
|
||||
5d820cb6b1afd75b619e7fd69e4f2b0eb1d5d6a1 jdk8-b32
|
||||
1e2ac1ea3f6c32a62bf88f3fa330120c30db59cb jdk8-b33
|
||||
e24c5cc8b0f7cc48374eef0f995838fb4823e0eb jdk8-b34
|
||||
e3d735914edd0a621b16bb85417423f8e6af5d51 jdk8-b35
|
||||
a5a61f259961a7f46b002e5cc50b4a9bf86927b6 jdk8-b36
|
||||
83fac66442cf680bb59ec9e3a71cc4729322b595 jdk8-b37
|
||||
b8cbfb31139f820e5e094ba71449e58159fbe22e jdk8-b38
|
||||
785af00e2827990f149b32ec37f523dbca3efdd1 jdk8-b39
|
||||
56d030e5035fdee5bba6cf318a06287fda5d67ec jdk8-b40
|
||||
113f0d5f0a08aa0947b3edf783b603e7f042748a jdk8-b41
|
||||
79cc42c9c71bbd6630ede681642e98f5e4a841fa jdk8-b42
|
||||
cd879aff5d3cc1f58829aab3116880aa19525b78 jdk8-b43
|
||||
439d9bf8e4ff204cc89c9974c1515a508b2cc6ff jdk8-b44
|
||||
747dad9e9d37d244a5c765a1afe9194f7ddae118 jdk8-b45
|
||||
30141e598d72a6146126cb86b034ed6d0bd191b3 jdk8-b46
|
||||
21e46ea21c6a26246fb7a1926ac7fe8d580d0518 jdk8-b47
|
||||
7e2b179a5b4dbd3f097e28daa00abfcc72ba3e0b jdk8-b48
|
||||
fe44e58a6bdbeae350ce96aafb49770a5dca5d8a jdk8-b49
|
||||
d20d9eb9f093adbf392918c703960ad24c93a331 jdk8-b50
|
||||
|
||||
46
corba/make/common/Defs-bsd.gmk
Normal file
46
corba/make/common/Defs-bsd.gmk
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile to specify compiler flags for programs and libraries
|
||||
# targeted to BSD. Should not contain any rules.
|
||||
#
|
||||
|
||||
# Warning: the following variables are overriden by Defs.gmk. Set
|
||||
# values will be silently ignored:
|
||||
# CFLAGS (set $(OTHER_CFLAGS) instead)
|
||||
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
|
||||
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
|
||||
# LDFLAGS (set $(OTHER_LDFAGS) instead)
|
||||
# LDLIBS (set $(EXTRA_LIBS) instead)
|
||||
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
|
||||
|
||||
# Get shared JDK settings
|
||||
include $(BUILDDIR)/common/shared/Defs.gmk
|
||||
|
||||
ifndef PLATFORM_SRC
|
||||
PLATFORM_SRC = $(TOPDIR)/src/solaris
|
||||
endif # PLATFORM_SRC
|
||||
|
||||
@@ -149,8 +149,8 @@ strip_prop_options_clean:
|
||||
# Strip the properties files
|
||||
strip_all_props: $(STRIPPROPERTIES_JARFILE) $(STRIP_PROP_options)
|
||||
@if [ -s $(STRIP_PROP_options) ] ; then \
|
||||
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) -optionsfile $(STRIP_PROP_options)" ; \
|
||||
$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) -optionsfile $(STRIP_PROP_options) ; \
|
||||
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) @$(STRIP_PROP_options)" ; \
|
||||
$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) @$(STRIP_PROP_options) ; \
|
||||
fi
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
|
||||
131
corba/make/common/shared/Defs-bsd.gmk
Normal file
131
corba/make/common/shared/Defs-bsd.gmk
Normal file
@@ -0,0 +1,131 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
#
|
||||
# Definitions for Bsd.
|
||||
#
|
||||
|
||||
# Default for COMPILER_WARNINGS_FATAL on Bsd (C & C++ compiler warnings)
|
||||
ifndef COMPILER_WARNINGS_FATAL
|
||||
COMPILER_WARNINGS_FATAL=false
|
||||
endif
|
||||
|
||||
# Bsd should use parallel compilation for best build times
|
||||
ifndef COMPILE_APPROACH
|
||||
COMPILE_APPROACH = parallel
|
||||
endif
|
||||
|
||||
# Indication that we are doing an incremental build.
|
||||
# This may trigger the creation of make depend files.
|
||||
ifndef INCREMENTAL_BUILD
|
||||
INCREMENTAL_BUILD = false
|
||||
endif
|
||||
|
||||
# FullPath just makes sure it never ends with a / and no duplicates
|
||||
define FullPath
|
||||
$(shell cd $1 2> $(DEV_NULL) && pwd)
|
||||
endef
|
||||
|
||||
# OptFullPath: Absolute path name of a dir that might not initially exist.
|
||||
define OptFullPath
|
||||
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
|
||||
endef
|
||||
|
||||
# Location on system where jdk installs might be
|
||||
USRJDKINSTANCES_PATH =$(PACKAGE_PATH)
|
||||
|
||||
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
|
||||
else
|
||||
UNIXCOMMAND_PATH = /bin/
|
||||
endif
|
||||
|
||||
# USRBIN_PATH: path to where the most common Unix commands are.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
|
||||
USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
|
||||
else
|
||||
USRBIN_PATH = /usr/bin/
|
||||
endif
|
||||
|
||||
# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
|
||||
UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
|
||||
else
|
||||
UNIXCCS_PATH = /usr/ccs/bin/
|
||||
endif
|
||||
|
||||
# SLASH_JAVA: location of all network accessable files
|
||||
ifdef ALT_SLASH_JAVA
|
||||
SLASH_JAVA :=$(ALT_SLASH_JAVA)
|
||||
else
|
||||
SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
|
||||
endif
|
||||
|
||||
# JDK_DEVTOOLS_DIR: common path for all the java devtools
|
||||
ifdef ALT_JDK_DEVTOOLS_DIR
|
||||
JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
|
||||
else
|
||||
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
|
||||
endif
|
||||
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
|
||||
DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
|
||||
else
|
||||
DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
|
||||
endif
|
||||
|
||||
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
|
||||
# _BOOTDIR2: Second choice
|
||||
ifndef ALT_BOOTDIR
|
||||
_BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
|
||||
_BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
|
||||
endif
|
||||
|
||||
# Import JDK images allow for partial builds, components not built are
|
||||
# imported (or copied from) these import areas when needed.
|
||||
|
||||
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
|
||||
# multiple platforms, e.g. windows-i586, solaris-sparc, bsd-586, etc.
|
||||
ifdef ALT_BUILD_JDK_IMPORT_PATH
|
||||
BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
|
||||
else
|
||||
BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
|
||||
endif
|
||||
BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
|
||||
|
||||
# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
|
||||
ifdef ALT_JDK_IMPORT_PATH
|
||||
JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
|
||||
else
|
||||
JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
|
||||
endif
|
||||
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# These input UTILS_* variables can be defined at anytime, ideally once.
|
||||
# Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/
|
||||
# UTILS_COMMAND_PATH
|
||||
# /usr/bin/
|
||||
# /usr/bin/
|
||||
# UTILS_USR_BIN_PATH
|
||||
# /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs)
|
||||
# UTILS_CCS_BIN_PATH
|
||||
@@ -53,6 +53,13 @@ ifeq ($(PLATFORM),linux)
|
||||
UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),bsd)
|
||||
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
|
||||
UTILS_USR_BIN_PATH=$(USRBIN_PATH)
|
||||
UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
|
||||
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
|
||||
UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH)
|
||||
@@ -166,15 +173,15 @@ ifeq ($(PLATFORM),linux)
|
||||
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command
|
||||
# itself in /usr/bin rather than it's traditional home in /bin.
|
||||
RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
|
||||
$(wildcard $(UTILS_COMMAND_PATH)rpm) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
|
||||
$(wildcard $(UTILS_COMMAND_PATH)rpm) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
# Most Linux distros have "sort" in /bin. Ubuntu, Debian and perhaps
|
||||
# others have it in /usr/bin.
|
||||
SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)sort))
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)sort))
|
||||
NAWK = $(USRBIN_PATH)gawk
|
||||
# Intrinsic unix command, with backslash-escaped character interpretation
|
||||
ECHO = /bin/echo -e
|
||||
@@ -198,3 +205,34 @@ ifeq ($(PLATFORM),solaris)
|
||||
ECHO = /usr/bin/echo
|
||||
endif
|
||||
|
||||
# BSD specific
|
||||
ifeq ($(PLATFORM),bsd)
|
||||
BASENAME = $(UTILS_USR_BIN_PATH)basename
|
||||
EGREP = $(UTILS_USR_BIN_PATH)egrep
|
||||
EXPR = $(UTILS_COMMAND_PATH)expr
|
||||
FMT = $(UTILS_USR_BIN_PATH)fmt
|
||||
GREP = $(UTILS_USR_BIN_PATH)grep
|
||||
GUNZIP = $(UTILS_USR_BIN_PATH)gunzip
|
||||
ID = $(UTILS_USR_BIN_PATH)id
|
||||
MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt
|
||||
SED = $(UTILS_USR_BIN_PATH)sed
|
||||
SORT = $(UTILS_USR_BIN_PATH)sort
|
||||
TEST = $(UTILS_COMMAND_PATH)test
|
||||
TOUCH = $(UTILS_USR_BIN_PATH)touch
|
||||
TRUE = $(UTILS_USR_BIN_PATH)true
|
||||
UNAME = $(UTILS_USR_BIN_PATH)uname
|
||||
# BSD OS_VENDOR specific
|
||||
ifeq ($(OS_VENDOR), Apple)
|
||||
NAWK = $(UTILS_USR_BIN_PATH)awk
|
||||
UNZIPSFX = $(UTILS_USR_BIN_PATH)unzipsfx
|
||||
ZIPEXE = $(UTILS_USR_BIN_PATH)zip
|
||||
else
|
||||
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
|
||||
endif
|
||||
ifeq ($(OS_VENDOR), OpenBSD)
|
||||
NAWK = $(UTILS_USR_BIN_PATH)awk
|
||||
else
|
||||
CPIO = $(UTILS_USR_BIN_PATH)cpio
|
||||
TAR = $(UTILS_USR_BIN_PATH)tar
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -62,8 +62,8 @@ PLATFORM_SHARED=done
|
||||
# CLASSPATH_SEPARATOR separator in classpath, ; or :
|
||||
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
|
||||
# ISA_DIR solaris only: /sparcv9 or /amd64
|
||||
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
|
||||
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
|
||||
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
|
||||
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
|
||||
# USING_CYGWIN windows only: true or false
|
||||
# WINDOWS_NT_VERSION_STRING windows only: long version name
|
||||
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
|
||||
@@ -135,7 +135,7 @@ ifeq ($(SYSTEM_UNAME), SunOS)
|
||||
BUNDLE_FILE_SUFFIX=.tar
|
||||
# Required Solaris version
|
||||
REQUIRED_OS_VERSION = 5.10
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
ifeq ($(ARCH_FAMILY), sparc)
|
||||
REQUIRED_FREE_SPACE=1300000
|
||||
@@ -143,7 +143,7 @@ ifeq ($(SYSTEM_UNAME), SunOS)
|
||||
REQUIRED_FREE_SPACE=1040000
|
||||
endif
|
||||
# How much RAM does this machine have:
|
||||
MB_OF_MEMORY=$(shell /etc/prtconf | fgrep 'Memory size:' | expand | cut -d' ' -f3)
|
||||
MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3)
|
||||
endif
|
||||
|
||||
# Platform settings specific to Linux
|
||||
@@ -207,7 +207,7 @@ ifeq ($(SYSTEM_UNAME), Linux)
|
||||
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar.gz
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
REQUIRED_FREE_SPACE=1460000
|
||||
LINUX_VERSION_INFO = /etc/redhat-release
|
||||
@@ -231,6 +231,99 @@ ifeq ($(SYSTEM_UNAME), Linux)
|
||||
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), FreeBSD)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = freebsd
|
||||
OS_VENDOR = FreeBSD
|
||||
REQUIRED_OS_VERSION = 6.0
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), Darwin)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = darwin
|
||||
OS_VENDOR = Apple
|
||||
REQUIRED_OS_VERSION = 8.0
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), NetBSD)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = netbsd
|
||||
OS_VENDOR = NetBSD
|
||||
REQUIRED_OS_VERSION = 3.0
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), OpenBSD)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = openbsd
|
||||
OS_VENDOR = OpenBSD
|
||||
REQUIRED_OS_VERSION = 4.9
|
||||
endif
|
||||
|
||||
# Platform settings specific to BSD
|
||||
ifeq ($(PLATFORM), bsd)
|
||||
OS_VERSION := $(shell uname -r)
|
||||
# Arch and OS name/version
|
||||
mach := $(shell uname -m)
|
||||
archExpr = case "$(mach)" in \
|
||||
i[3-9]86) \
|
||||
echo i586 \
|
||||
;; \
|
||||
sparc64) \
|
||||
echo sparcv9 \
|
||||
;; \
|
||||
sparc*) \
|
||||
echo sparc \
|
||||
;; \
|
||||
x86_64) \
|
||||
echo x86_64 \
|
||||
;; \
|
||||
"Power Macintosh") \
|
||||
echo ppc \
|
||||
;; \
|
||||
*) \
|
||||
echo $(mach) \
|
||||
;; \
|
||||
esac
|
||||
ARCH := $(shell $(archExpr) )
|
||||
ARCH_FAMILY := $(ARCH)
|
||||
|
||||
# Darwin builds are currently universal but only include 64-bit
|
||||
#
|
||||
# ifeq ($(SYSTEM_UNAME), Darwin)
|
||||
# ifneq ($(ARCH), ppc)
|
||||
# ARCH=universal
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
|
||||
ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
|
||||
ARCH_DATA_MODEL=32
|
||||
else
|
||||
ARCH_DATA_MODEL=64
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), i586)
|
||||
LIBARCH = i386
|
||||
else
|
||||
LIBARCH = $(ARCH)
|
||||
endif
|
||||
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP = $(LIBARCH)
|
||||
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar.gz
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
REQUIRED_FREE_SPACE=1500000
|
||||
# How much RAM does this machine have:
|
||||
ifeq ($(OS_VENDOR), OpenBSD)
|
||||
MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
|
||||
else
|
||||
MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Windows with and without CYGWIN will be slightly different
|
||||
ifeq ($(SYSTEM_UNAME), Windows_NT)
|
||||
PLATFORM = windows
|
||||
@@ -327,7 +420,7 @@ ifeq ($(PLATFORM), windows)
|
||||
endif
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
REQUIRED_FREE_SPACE=500000
|
||||
# How much RAM does this machine have:
|
||||
@@ -335,8 +428,8 @@ ifeq ($(PLATFORM), windows)
|
||||
MB_OF_MEMORY := $(shell \
|
||||
if [ -f "C:/cygwin/bin/free.exe" ] ; then \
|
||||
( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
|
||||
grep Mem: | \
|
||||
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
|
||||
grep Mem: | \
|
||||
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
|
||||
else \
|
||||
echo "512"; \
|
||||
fi)
|
||||
@@ -392,7 +485,7 @@ ifneq ($(PLATFORM), windows)
|
||||
# Where is unwanted output to be delivered?
|
||||
DEV_NULL = /dev/null
|
||||
export DEV_NULL
|
||||
# Character used between entries in classpath
|
||||
# Character used between entries in classpath
|
||||
CLASSPATH_SEPARATOR = :
|
||||
# User name determination (set _USER)
|
||||
ifndef USER
|
||||
|
||||
@@ -1,280 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.stripproperties;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Reads a properties file from standard input and writes an equivalent
|
||||
* properties file without comments to standard output.
|
||||
*/
|
||||
public class StripProperties {
|
||||
|
||||
private static void error(String msg, Exception e) {
|
||||
System.err.println("ERROR: stripproperties: " + msg);
|
||||
if ( e != null ) {
|
||||
System.err.println("EXCEPTION: " + e.toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static List<String> parseOptions(String args[]) {
|
||||
List<String> files = new ArrayList<String>();
|
||||
for ( int i = 0; i < args.length ; i++ ) {
|
||||
if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
|
||||
String filename = args[++i];
|
||||
FileInputStream finput = null;
|
||||
byte contents[] = null;
|
||||
try {
|
||||
finput = new FileInputStream(filename);
|
||||
int byteCount = finput.available();
|
||||
if ( byteCount <= 0 ) {
|
||||
error("The -optionsfile file is empty", null);
|
||||
files = null;
|
||||
} else {
|
||||
contents = new byte[byteCount];
|
||||
int bytesRead = finput.read(contents);
|
||||
if ( byteCount != bytesRead ) {
|
||||
error("Cannot read all of -optionsfile file", null);
|
||||
files = null;
|
||||
}
|
||||
}
|
||||
} catch ( IOException e ) {
|
||||
error("cannot open " + filename, e);
|
||||
files = null;
|
||||
}
|
||||
if ( finput != null ) {
|
||||
try {
|
||||
finput.close();
|
||||
} catch ( IOException e ) {
|
||||
files = null;
|
||||
error("cannot close " + filename, e);
|
||||
}
|
||||
}
|
||||
if ( files != null && contents != null ) {
|
||||
String tokens[] = (new String(contents)).split("\\s+");
|
||||
if ( tokens.length > 0 ) {
|
||||
List<String> ofiles = parseOptions(tokens);
|
||||
if ( ofiles != null ) {
|
||||
files.addAll(ofiles);
|
||||
} else {
|
||||
error("No files found in file", null);
|
||||
files = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( files == null ) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
files.add(args[i]);
|
||||
}
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
private static boolean stripFiles(List<String> files) {
|
||||
boolean ok = true;
|
||||
for ( String file : files ) {
|
||||
|
||||
Properties prop = new Properties();
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(file));
|
||||
prop.load(in);
|
||||
} catch ( FileNotFoundException e ) {
|
||||
error("Cannot access file " + file, e);
|
||||
ok = false;
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception processing file " + file, e);
|
||||
ok = false;
|
||||
}
|
||||
if ( in != null ) {
|
||||
try {
|
||||
in.close();
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception closing file " + file, e);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if ( !ok ) {
|
||||
break;
|
||||
}
|
||||
|
||||
OutputStream out = null;
|
||||
try {
|
||||
out = new FileOutputStream(file);
|
||||
storeProperties(prop, out);
|
||||
out.flush();
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception processing file " + file, e);
|
||||
ok = false;
|
||||
}
|
||||
if ( out != null ) {
|
||||
try {
|
||||
out.close();
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception closing file " + file, e);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if ( !ok ) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip the properties filenames supplied, replacing their contents.
|
||||
* @param args Names of properties files to process and replace contents
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
List<String> files = parseOptions(args);
|
||||
if ( files == null || !stripFiles(files) ) {
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// --- code below here is adapted from java.util.Properties ---
|
||||
|
||||
private static final String specialSaveChars = "=: \t\r\n\f#!";
|
||||
|
||||
/*
|
||||
* Converts unicodes to encoded \uxxxx
|
||||
* and writes out any of the characters in specialSaveChars
|
||||
* with a preceding slash
|
||||
*/
|
||||
private static String saveConvert(String theString, boolean escapeSpace) {
|
||||
int len = theString.length();
|
||||
StringBuffer outBuffer = new StringBuffer(len*2);
|
||||
|
||||
for(int x=0; x<len; x++) {
|
||||
char aChar = theString.charAt(x);
|
||||
switch(aChar) {
|
||||
case ' ':
|
||||
if (x == 0 || escapeSpace) {
|
||||
outBuffer.append('\\');
|
||||
}
|
||||
outBuffer.append(' ');
|
||||
break;
|
||||
case '\\':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('\\');
|
||||
break;
|
||||
case '\t':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('t');
|
||||
break;
|
||||
case '\n':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('n');
|
||||
break;
|
||||
case '\r':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('r');
|
||||
break;
|
||||
case '\f':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('f');
|
||||
break;
|
||||
default:
|
||||
if ((aChar < 0x0020) || (aChar == 0x007e) || (aChar > 0x00ff)) {
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('u');
|
||||
outBuffer.append(toHex((aChar >> 12) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 8) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 4) & 0xF));
|
||||
outBuffer.append(toHex( aChar & 0xF));
|
||||
} else {
|
||||
if (specialSaveChars.indexOf(aChar) != -1) {
|
||||
outBuffer.append('\\');
|
||||
}
|
||||
outBuffer.append(aChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
return outBuffer.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the content of <code>properties</code> to <code>out</code>.
|
||||
* The format is that of Properties.store with the following modifications:
|
||||
* <ul>
|
||||
* <li>No header or date is written
|
||||
* <li>Latin-1 characters are written as single bytes, not escape sequences
|
||||
* <li>Line breaks are indicated by a single \n independent of platform
|
||||
* <ul>
|
||||
*/
|
||||
private static void storeProperties(Properties properties, OutputStream out)
|
||||
throws IOException {
|
||||
BufferedWriter awriter;
|
||||
awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
|
||||
for (Enumeration e = properties.keys(); e.hasMoreElements();) {
|
||||
String key = (String)e.nextElement();
|
||||
String val = (String)properties.get(key);
|
||||
key = saveConvert(key, true);
|
||||
|
||||
/* No need to escape embedded and trailing spaces for value, hence
|
||||
* pass false to flag.
|
||||
*/
|
||||
val = saveConvert(val, false);
|
||||
writeln(awriter, key + "=" + val);
|
||||
}
|
||||
awriter.flush();
|
||||
}
|
||||
|
||||
private static void writeln(BufferedWriter bw, String s) throws IOException {
|
||||
bw.write(s);
|
||||
bw.write("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a nibble to a hex character
|
||||
* @param nibble the nibble to convert.
|
||||
*/
|
||||
private static char toHex(int nibble) {
|
||||
return hexDigit[(nibble & 0xF)];
|
||||
}
|
||||
|
||||
/** A table of hex digits */
|
||||
private static final char[] hexDigit = {
|
||||
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.stripproperties;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Reads a properties file from standard input and writes an equivalent
|
||||
* properties file without comments to standard output.
|
||||
*/
|
||||
public class StripPropertiesCorba {
|
||||
|
||||
private static void error(String msg, Exception e) {
|
||||
System.err.println("ERROR: stripproperties: " + msg);
|
||||
if ( e != null ) {
|
||||
System.err.println("EXCEPTION: " + e.toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static List<String> infiles = new ArrayList<String>();
|
||||
private static List<String> outfiles = new ArrayList<String>();
|
||||
|
||||
private static boolean parseOptions(String args[]) {
|
||||
boolean ok = true;
|
||||
|
||||
for ( int i = 0; i < args.length ; i++ ) {
|
||||
if ( "-clean".equals(args[i]) && i+2 < args.length ) {
|
||||
infiles.add(args[++i]);
|
||||
outfiles.add(args[++i]);
|
||||
} else if ( args[i].charAt(0)=='@') {
|
||||
String filename = args[i].substring(1);
|
||||
FileInputStream finput = null;
|
||||
byte contents[] = null;
|
||||
try {
|
||||
finput = new FileInputStream(filename);
|
||||
int byteCount = finput.available();
|
||||
if ( byteCount <= 0 ) {
|
||||
error("The @file is empty", null);
|
||||
ok = false;
|
||||
} else {
|
||||
contents = new byte[byteCount];
|
||||
int bytesRead = finput.read(contents);
|
||||
if ( byteCount != bytesRead ) {
|
||||
error("Cannot read all of @file", null);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
} catch ( IOException e ) {
|
||||
error("cannot open " + filename, e);
|
||||
ok = false;
|
||||
}
|
||||
if ( finput != null ) {
|
||||
try {
|
||||
finput.close();
|
||||
} catch ( IOException e ) {
|
||||
ok = false;
|
||||
error("cannot close " + filename, e);
|
||||
}
|
||||
}
|
||||
if ( ok && contents != null ) {
|
||||
String tokens[] = (new String(contents)).split("\\s+");
|
||||
if ( tokens.length > 0 ) {
|
||||
ok = parseOptions(tokens);
|
||||
}
|
||||
}
|
||||
if ( !ok ) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
infiles.add(args[i]);
|
||||
outfiles.add(args[i]);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
private static boolean stripFiles(List<String> infiles, List<String> outfiles) {
|
||||
boolean ok = true;
|
||||
Iterator<String> inIter = infiles.iterator();
|
||||
Iterator<String> outIter = outfiles.iterator();
|
||||
|
||||
for (; inIter.hasNext(); ) {
|
||||
String infile = inIter.next();
|
||||
String outfile = outIter.next();
|
||||
|
||||
Properties prop = new Properties();
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(infile));
|
||||
prop.load(in);
|
||||
} catch ( FileNotFoundException e ) {
|
||||
error("Cannot access file " + infile, e);
|
||||
ok = false;
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception processing file " + infile, e);
|
||||
ok = false;
|
||||
}
|
||||
if ( in != null ) {
|
||||
try {
|
||||
in.close();
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception closing file " + infile, e);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if ( !ok ) {
|
||||
break;
|
||||
}
|
||||
|
||||
OutputStream out = null;
|
||||
try {
|
||||
out = new FileOutputStream(outfile);
|
||||
storeProperties(prop, out);
|
||||
out.flush();
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception processing file " + outfile, e);
|
||||
ok = false;
|
||||
}
|
||||
if ( out != null ) {
|
||||
try {
|
||||
out.close();
|
||||
} catch ( IOException e ) {
|
||||
error("IO exception closing file " + outfile, e);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if ( !ok ) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip the properties filenames supplied, replacing their contents.
|
||||
* @param args Names of properties files to process and replace contents
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
boolean ok = parseOptions(args);
|
||||
if ( !ok || !stripFiles(infiles, outfiles) ) {
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// --- code below here is adapted from java.util.Properties ---
|
||||
|
||||
private static final String specialSaveChars = "=: \t\r\n\f#!";
|
||||
|
||||
/*
|
||||
* Converts unicodes to encoded \uxxxx
|
||||
* and writes out any of the characters in specialSaveChars
|
||||
* with a preceding slash
|
||||
*/
|
||||
private static String saveConvert(String theString, boolean escapeSpace) {
|
||||
int len = theString.length();
|
||||
StringBuffer outBuffer = new StringBuffer(len*2);
|
||||
|
||||
for(int x=0; x<len; x++) {
|
||||
char aChar = theString.charAt(x);
|
||||
switch(aChar) {
|
||||
case ' ':
|
||||
if (x == 0 || escapeSpace) {
|
||||
outBuffer.append('\\');
|
||||
}
|
||||
outBuffer.append(' ');
|
||||
break;
|
||||
case '\\':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('\\');
|
||||
break;
|
||||
case '\t':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('t');
|
||||
break;
|
||||
case '\n':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('n');
|
||||
break;
|
||||
case '\r':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('r');
|
||||
break;
|
||||
case '\f':
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('f');
|
||||
break;
|
||||
default:
|
||||
if ((aChar < 0x0020) || (aChar == 0x007e) || (aChar > 0x00ff)) {
|
||||
outBuffer.append('\\');
|
||||
outBuffer.append('u');
|
||||
outBuffer.append(toHex((aChar >> 12) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 8) & 0xF));
|
||||
outBuffer.append(toHex((aChar >> 4) & 0xF));
|
||||
outBuffer.append(toHex( aChar & 0xF));
|
||||
} else {
|
||||
if (specialSaveChars.indexOf(aChar) != -1) {
|
||||
outBuffer.append('\\');
|
||||
}
|
||||
outBuffer.append(aChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
return outBuffer.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the content of <code>properties</code> to <code>out</code>.
|
||||
* The format is that of Properties.store with the following modifications:
|
||||
* <ul>
|
||||
* <li>No header or date is written
|
||||
* <li>Latin-1 characters are written as single bytes, not escape sequences
|
||||
* <li>Line breaks are indicated by a single \n independent of platform
|
||||
* <ul>
|
||||
*/
|
||||
private static void storeProperties(Properties properties, OutputStream out)
|
||||
throws IOException {
|
||||
BufferedWriter awriter;
|
||||
awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
|
||||
for (Enumeration<Object> e = properties.keys(); e.hasMoreElements();) {
|
||||
String key = (String)e.nextElement();
|
||||
String val = (String)properties.get(key);
|
||||
key = saveConvert(key, true);
|
||||
|
||||
/* No need to escape embedded and trailing spaces for value, hence
|
||||
* pass false to flag.
|
||||
*/
|
||||
val = saveConvert(val, false);
|
||||
writeln(awriter, key + "=" + val);
|
||||
}
|
||||
awriter.flush();
|
||||
}
|
||||
|
||||
private static void writeln(BufferedWriter bw, String s) throws IOException {
|
||||
bw.write(s);
|
||||
bw.write("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a nibble to a hex character
|
||||
* @param nibble the nibble to convert.
|
||||
*/
|
||||
private static char toHex(int nibble) {
|
||||
return hexDigit[(nibble & 0xF)];
|
||||
}
|
||||
|
||||
/** A table of hex digits */
|
||||
private static final char[] hexDigit = {
|
||||
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
};
|
||||
}
|
||||
@@ -34,7 +34,7 @@ PROGRAM = stripproperties
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/StripProperties.java
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/StripPropertiesCorba.java
|
||||
|
||||
#
|
||||
# Build tool jar rules.
|
||||
|
||||
259
corba/makefiles/Makefile
Normal file
259
corba/makefiles/Makefile
Normal file
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -82,6 +82,6 @@ public class DynAnyFactoryImpl
|
||||
private String[] __ids = { "IDL:omg.org/DynamicAny/DynAnyFactory:1.0" };
|
||||
|
||||
public String[] _ids() {
|
||||
return __ids;
|
||||
return (String[]) __ids.clone();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -195,6 +195,6 @@ abstract class DynAnyImpl extends org.omg.CORBA.LocalObject implements DynAny
|
||||
private String[] __ids = { "IDL:omg.org/DynamicAny/DynAny:1.0" };
|
||||
|
||||
public String[] _ids() {
|
||||
return __ids;
|
||||
return (String[]) __ids.clone();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -22,7 +22,6 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.corba.se.impl.encoding;
|
||||
|
||||
import java.util.Hashtable;
|
||||
@@ -32,7 +31,8 @@ import com.sun.org.omg.SendingContext.CodeBaseHelper;
|
||||
import com.sun.org.omg.SendingContext._CodeBaseImplBase;
|
||||
import com.sun.org.omg.SendingContext._CodeBaseStub;
|
||||
import com.sun.corba.se.spi.transport.CorbaConnection;
|
||||
|
||||
import com.sun.corba.se.spi.ior.IOR;
|
||||
import com.sun.corba.se.spi.orb.ORB;
|
||||
/**
|
||||
* Provides the reading side with a per connection cache of
|
||||
* info obtained via calls to the remote CodeBase.
|
||||
@@ -51,14 +51,24 @@ import com.sun.corba.se.spi.transport.CorbaConnection;
|
||||
*
|
||||
* Needs cache management.
|
||||
*/
|
||||
// REVISIT: revert to package protected after framework merge.
|
||||
public class CachedCodeBase extends _CodeBaseImplBase
|
||||
{
|
||||
private Hashtable implementations, fvds, bases;
|
||||
private CodeBase delegate;
|
||||
private volatile CodeBase delegate;
|
||||
private CorbaConnection conn;
|
||||
|
||||
private static Hashtable iorToCodeBaseObjMap = new Hashtable();
|
||||
private static Object iorMapLock = new Object();
|
||||
private static Hashtable<IOR,CodeBase> iorMap = new Hashtable<>();
|
||||
|
||||
public static synchronized void cleanCache( ORB orb ) {
|
||||
synchronized (iorMapLock) {
|
||||
for (IOR ior : iorMap.keySet()) {
|
||||
if (ior.getORB() == orb) {
|
||||
iorMap.remove(ior);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CachedCodeBase(CorbaConnection connection) {
|
||||
conn = connection;
|
||||
@@ -68,7 +78,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return null;
|
||||
}
|
||||
|
||||
public String implementation (String repId) {
|
||||
public synchronized String implementation (String repId) {
|
||||
String urlResult = null;
|
||||
|
||||
if (implementations == null)
|
||||
@@ -86,7 +96,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return urlResult;
|
||||
}
|
||||
|
||||
public String[] implementations (String[] repIds) {
|
||||
public synchronized String[] implementations (String[] repIds) {
|
||||
String[] urlResults = new String[repIds.length];
|
||||
|
||||
for (int i = 0; i < urlResults.length; i++)
|
||||
@@ -95,7 +105,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return urlResults;
|
||||
}
|
||||
|
||||
public FullValueDescription meta (String repId) {
|
||||
public synchronized FullValueDescription meta (String repId) {
|
||||
FullValueDescription result = null;
|
||||
|
||||
if (fvds == null)
|
||||
@@ -113,7 +123,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return result;
|
||||
}
|
||||
|
||||
public FullValueDescription[] metas (String[] repIds) {
|
||||
public synchronized FullValueDescription[] metas (String[] repIds) {
|
||||
FullValueDescription[] results
|
||||
= new FullValueDescription[repIds.length];
|
||||
|
||||
@@ -123,7 +133,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return results;
|
||||
}
|
||||
|
||||
public String[] bases (String repId) {
|
||||
public synchronized String[] bases (String repId) {
|
||||
|
||||
String[] results = null;
|
||||
|
||||
@@ -145,7 +155,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
// Ensures that we've used the connection's IOR to create
|
||||
// a valid CodeBase delegate. If this returns false, then
|
||||
// it is not valid to access the delegate.
|
||||
private boolean connectedCodeBase() {
|
||||
private synchronized boolean connectedCodeBase() {
|
||||
if (delegate != null)
|
||||
return true;
|
||||
|
||||
@@ -165,7 +175,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return false;
|
||||
}
|
||||
|
||||
synchronized(this) {
|
||||
synchronized(iorMapLock) {
|
||||
|
||||
// Recheck the condition to make sure another
|
||||
// thread didn't already do this while we waited
|
||||
@@ -173,7 +183,8 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
return true;
|
||||
|
||||
// Do we have a reference initialized by another connection?
|
||||
delegate = (CodeBase)CachedCodeBase.iorToCodeBaseObjMap.get(conn.getCodeBaseIOR());
|
||||
delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());
|
||||
|
||||
if (delegate != null)
|
||||
return true;
|
||||
|
||||
@@ -181,8 +192,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
|
||||
delegate = CodeBaseHelper.narrow(getObjectFromIOR());
|
||||
|
||||
// Save it for the benefit of other connections
|
||||
CachedCodeBase.iorToCodeBaseObjMap.put(conn.getCodeBaseIOR(),
|
||||
delegate);
|
||||
CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
|
||||
}
|
||||
|
||||
// It's now safe to use the delegate
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -217,7 +217,7 @@ public final class ClientRequestInfoImpl
|
||||
|
||||
// ClientRequestInfo validity table (see ptc/00-08-06 table 21-1).
|
||||
// Note: These must be in the same order as specified in contants.
|
||||
protected static final boolean validCall[][] = {
|
||||
private static final boolean validCall[][] = {
|
||||
// LEGEND:
|
||||
// s_req = send_request r_rep = receive_reply
|
||||
// s_pol = send_poll r_exc = receive_exception
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -58,7 +58,7 @@ import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
|
||||
import org.omg.PortableInterceptor.TRANSPORT_RETRY;
|
||||
import org.omg.PortableInterceptor.USER_EXCEPTION;
|
||||
import org.omg.PortableInterceptor.PolicyFactory;
|
||||
import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
|
||||
import org.omg.PortableInterceptor.ObjectReferenceTemplate;
|
||||
|
||||
import com.sun.corba.se.pept.encoding.OutputObject;
|
||||
|
||||
@@ -112,10 +112,10 @@ public class PIHandlerImpl implements PIHandler
|
||||
}
|
||||
}
|
||||
|
||||
private ORB orb ;
|
||||
InterceptorsSystemException wrapper ;
|
||||
ORBUtilSystemException orbutilWrapper ;
|
||||
OMGSystemException omgWrapper ;
|
||||
private ORB orb;
|
||||
InterceptorsSystemException wrapper;
|
||||
ORBUtilSystemException orbutilWrapper;
|
||||
OMGSystemException omgWrapper;
|
||||
|
||||
// A unique id used in ServerRequestInfo.
|
||||
// This does not correspond to the GIOP request id.
|
||||
@@ -178,6 +178,21 @@ public class PIHandlerImpl implements PIHandler
|
||||
}
|
||||
};
|
||||
|
||||
public void close() {
|
||||
orb = null;
|
||||
wrapper = null;
|
||||
orbutilWrapper = null;
|
||||
omgWrapper = null;
|
||||
codecFactory = null;
|
||||
arguments = null;
|
||||
interceptorList = null;
|
||||
interceptorInvoker = null;
|
||||
current = null;
|
||||
policyFactoryTable = null;
|
||||
threadLocalClientRequestInfoStack = null;
|
||||
threadLocalServerRequestInfoStack = null;
|
||||
}
|
||||
|
||||
// Class to contain all ThreadLocal data for ClientRequestInfo
|
||||
// maintenance.
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -69,6 +69,9 @@ public class PINoOpHandlerImpl implements PIHandler
|
||||
public PINoOpHandlerImpl( ) {
|
||||
}
|
||||
|
||||
public void close() {
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -195,7 +195,7 @@ public final class ServerRequestInfoImpl
|
||||
|
||||
// ServerRequestInfo validity table (see ptc/00-08-06 table 21-2).
|
||||
// Note: These must be in the same order as specified in contants.
|
||||
protected static final boolean validCall[][] = {
|
||||
private static final boolean validCall[][] = {
|
||||
// LEGEND:
|
||||
// r_rsc = receive_request_service_contexts
|
||||
// r_req = receive_request
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -130,10 +130,23 @@ public class Util implements javax.rmi.CORBA.UtilDelegate
|
||||
private UtilSystemException utilWrapper = UtilSystemException.get(
|
||||
CORBALogDomains.RPC_ENCODING);
|
||||
|
||||
public static Util instance = null;
|
||||
private static Util instance = null;
|
||||
|
||||
public Util() {
|
||||
instance = this;
|
||||
setInstance(this);
|
||||
}
|
||||
|
||||
private static void setInstance( Util util ) {
|
||||
assert instance == null : "Instance already defined";
|
||||
instance = util;
|
||||
}
|
||||
|
||||
public static Util getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static boolean isInstanceDefined() {
|
||||
return instance != null;
|
||||
}
|
||||
|
||||
// Used by TOAFactory.shutdown to unexport all targets for this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -34,14 +34,18 @@ public class MonitoringManagerFactoryImpl implements MonitoringManagerFactory {
|
||||
private HashMap monitoringManagerTable = new HashMap();
|
||||
|
||||
public synchronized MonitoringManager createMonitoringManager(
|
||||
String nameOfTheRoot, String description )
|
||||
String nameOfTheRoot, String description)
|
||||
{
|
||||
MonitoringManagerImpl m = null;
|
||||
m = (MonitoringManagerImpl)monitoringManagerTable.get(nameOfTheRoot);
|
||||
if (m == null) {
|
||||
m = new MonitoringManagerImpl( nameOfTheRoot, description );
|
||||
m = new MonitoringManagerImpl(nameOfTheRoot, description);
|
||||
monitoringManagerTable.put(nameOfTheRoot, m);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
public synchronized void remove(String nameOfTheRoot) {
|
||||
monitoringManagerTable.remove(nameOfTheRoot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -26,6 +26,7 @@
|
||||
package com.sun.corba.se.impl.monitoring;
|
||||
|
||||
import com.sun.corba.se.spi.monitoring.MonitoringManager;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoringManagerFactory;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoredObject;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoredObjectFactory;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoringFactories;
|
||||
@@ -33,18 +34,24 @@ import com.sun.corba.se.spi.monitoring.MonitoringFactories;
|
||||
public class MonitoringManagerImpl implements MonitoringManager {
|
||||
private final MonitoredObject rootMonitoredObject;
|
||||
|
||||
MonitoringManagerImpl( String nameOfTheRoot, String description ) {
|
||||
MonitoringManagerImpl(String nameOfTheRoot, String description) {
|
||||
MonitoredObjectFactory f =
|
||||
MonitoringFactories.getMonitoredObjectFactory();
|
||||
rootMonitoredObject =
|
||||
f.createMonitoredObject( nameOfTheRoot, description );
|
||||
f.createMonitoredObject(nameOfTheRoot, description);
|
||||
}
|
||||
|
||||
public void clearState( ) {
|
||||
rootMonitoredObject.clearState( );
|
||||
public void clearState() {
|
||||
rootMonitoredObject.clearState();
|
||||
}
|
||||
|
||||
public MonitoredObject getRootMonitoredObject( ) {
|
||||
public MonitoredObject getRootMonitoredObject() {
|
||||
return rootMonitoredObject;
|
||||
}
|
||||
|
||||
public void close() {
|
||||
MonitoringManagerFactory f =
|
||||
MonitoringFactories.getMonitoringManagerFactory();
|
||||
f.remove(rootMonitoredObject.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -93,7 +93,7 @@ public abstract class POAPolicyMediatorBase_R extends POAPolicyMediatorBase {
|
||||
|
||||
activeObjectMap.putServant( servant, entry ) ;
|
||||
|
||||
if (Util.instance != null) {
|
||||
if (Util.isInstanceDefined()) {
|
||||
POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
|
||||
POAFactory factory = pm.getFactory() ;
|
||||
factory.registerPOAForServant(poa, servant);
|
||||
@@ -129,7 +129,7 @@ public abstract class POAPolicyMediatorBase_R extends POAPolicyMediatorBase {
|
||||
|
||||
activeObjectMap.remove(key);
|
||||
|
||||
if (Util.instance != null) {
|
||||
if (Util.isInstanceDefined()) {
|
||||
POAManagerImpl pm = (POAManagerImpl)poa.the_POAManager() ;
|
||||
POAFactory factory = pm.getFactory() ;
|
||||
factory.unregisterPOAForServant(poa, s);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -78,8 +78,8 @@ public class TOAFactory implements ObjectAdapterFactory
|
||||
|
||||
public void shutdown( boolean waitForCompletion )
|
||||
{
|
||||
if (Util.instance != null) {
|
||||
Util.instance.unregisterTargetsForORB(orb);
|
||||
if (Util.isInstanceDefined()) {
|
||||
Util.getInstance().unregisterTargetsForORB(orb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,35 +23,37 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.corba.se.impl.orb ;
|
||||
package com.sun.corba.se.impl.orb;
|
||||
|
||||
import java.applet.Applet;
|
||||
|
||||
import java.io.IOException ;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field ;
|
||||
import java.lang.reflect.Modifier ;
|
||||
import java.lang.reflect.InvocationTargetException ;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import java.util.ArrayList ;
|
||||
import java.util.Iterator ;
|
||||
import java.util.Properties ;
|
||||
import java.util.Vector ;
|
||||
import java.util.Hashtable ;
|
||||
import java.util.Map ;
|
||||
import java.util.HashMap ;
|
||||
import java.util.LinkedList ;
|
||||
import java.util.Collection ;
|
||||
import java.util.Collections ;
|
||||
import java.util.StringTokenizer ;
|
||||
import java.util.Enumeration ;
|
||||
import java.util.WeakHashMap ;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Properties;
|
||||
import java.util.Vector;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Enumeration;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import java.net.InetAddress ;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.AccessController ;
|
||||
import java.security.AccessController;
|
||||
|
||||
import javax.rmi.CORBA.Util;
|
||||
import javax.rmi.CORBA.ValueHandler;
|
||||
@@ -82,18 +84,18 @@ import org.omg.CORBA.ORBPackage.InvalidName;
|
||||
import com.sun.org.omg.SendingContext.CodeBase;
|
||||
|
||||
import com.sun.corba.se.pept.broker.Broker;
|
||||
import com.sun.corba.se.pept.protocol.ClientInvocationInfo ;
|
||||
import com.sun.corba.se.pept.protocol.ClientInvocationInfo;
|
||||
import com.sun.corba.se.pept.transport.ContactInfo;
|
||||
import com.sun.corba.se.pept.transport.ConnectionCache;
|
||||
import com.sun.corba.se.pept.transport.TransportManager;
|
||||
|
||||
import com.sun.corba.se.spi.ior.IOR;
|
||||
import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder ;
|
||||
import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder;
|
||||
import com.sun.corba.se.spi.ior.TaggedComponentFactoryFinder;
|
||||
import com.sun.corba.se.spi.ior.IORFactories ;
|
||||
import com.sun.corba.se.spi.ior.ObjectKey ;
|
||||
import com.sun.corba.se.spi.ior.ObjectKeyFactory ;
|
||||
import com.sun.corba.se.spi.ior.iiop.IIOPFactories ;
|
||||
import com.sun.corba.se.spi.ior.IORFactories;
|
||||
import com.sun.corba.se.spi.ior.ObjectKey;
|
||||
import com.sun.corba.se.spi.ior.ObjectKeyFactory;
|
||||
import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
|
||||
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
|
||||
import com.sun.corba.se.spi.oa.OAInvocationInfo;
|
||||
import com.sun.corba.se.spi.oa.ObjectAdapterFactory;
|
||||
@@ -122,10 +124,10 @@ import com.sun.corba.se.spi.orb.StringPair;
|
||||
import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory;
|
||||
import com.sun.corba.se.spi.transport.CorbaTransportManager;
|
||||
import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager;
|
||||
import com.sun.corba.se.spi.copyobject.CopierManager ;
|
||||
import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults ;
|
||||
import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
|
||||
import com.sun.corba.se.spi.presentation.rmi.StubAdapter ;
|
||||
import com.sun.corba.se.spi.copyobject.CopierManager;
|
||||
import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults;
|
||||
import com.sun.corba.se.spi.presentation.rmi.PresentationManager;
|
||||
import com.sun.corba.se.spi.presentation.rmi.StubAdapter;
|
||||
import com.sun.corba.se.spi.servicecontext.ServiceContextRegistry;
|
||||
|
||||
import com.sun.corba.se.impl.corba.TypeCodeFactory;
|
||||
@@ -140,6 +142,7 @@ import com.sun.corba.se.impl.corba.AnyImpl;
|
||||
import com.sun.corba.se.impl.corba.RequestImpl;
|
||||
import com.sun.corba.se.impl.dynamicany.DynAnyFactoryImpl;
|
||||
import com.sun.corba.se.impl.encoding.EncapsOutputStream;
|
||||
import com.sun.corba.se.impl.encoding.CachedCodeBase;
|
||||
import com.sun.corba.se.impl.interceptors.PIHandlerImpl;
|
||||
import com.sun.corba.se.impl.interceptors.PINoOpHandlerImpl;
|
||||
import com.sun.corba.se.impl.ior.TaggedComponentFactoryFinderImpl;
|
||||
@@ -185,6 +188,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
private java.lang.Object runObj = new java.lang.Object();
|
||||
private java.lang.Object shutdownObj = new java.lang.Object();
|
||||
private java.lang.Object waitForCompletionObj = new java.lang.Object();
|
||||
private static final byte STATUS_OPERATING = 1;
|
||||
private static final byte STATUS_SHUTTING_DOWN = 2;
|
||||
private static final byte STATUS_SHUTDOWN = 3;
|
||||
@@ -193,6 +197,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
// XXX Should we move invocation tracking to the first level server dispatcher?
|
||||
private java.lang.Object invocationObj = new java.lang.Object();
|
||||
private int numInvocations = 0;
|
||||
|
||||
// thread local variable to store a boolean to detect deadlock in
|
||||
// ORB.shutdown(true).
|
||||
@@ -220,8 +225,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
private int transientServerId ;
|
||||
|
||||
private ThreadGroup threadGroup ;
|
||||
|
||||
private ServiceContextRegistry serviceContextRegistry ;
|
||||
|
||||
// Needed here to implement connect/disconnect
|
||||
@@ -265,6 +268,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
private final Object urlOperationLock = new java.lang.Object() ;
|
||||
|
||||
private CorbaServerRequestDispatcher insNamingDelegate ;
|
||||
|
||||
// resolverLock must be used for all access to either resolver or
|
||||
// localResolver, since it is possible for the resolver to indirectly
|
||||
// refer to the localResolver. Also used to protect access to
|
||||
@@ -279,6 +283,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
private ObjectKeyFactory objectKeyFactory ;
|
||||
|
||||
private boolean orbOwnsThreadPoolManager = false ;
|
||||
|
||||
private ThreadPoolManager threadpoolMgr;
|
||||
|
||||
private void dprint( String msg )
|
||||
@@ -322,11 +328,17 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public ORBVersion getORBVersion()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return (ORBVersion)(orbVersionThreadLocal.get()) ;
|
||||
}
|
||||
|
||||
public void setORBVersion(ORBVersion verObj)
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
orbVersionThreadLocal.set(verObj);
|
||||
}
|
||||
|
||||
@@ -347,46 +359,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
// end of this method.
|
||||
pihandler = new PINoOpHandlerImpl( );
|
||||
|
||||
// See bugs 4916766 and 4936203
|
||||
// We intend to create new threads in a reliable thread group.
|
||||
// This avoids problems if the application/applet
|
||||
// creates a thread group, makes JavaIDL calls which create a new
|
||||
// connection and ReaderThread, and then destroys the thread
|
||||
// group. If our ReaderThreads were to be part of such destroyed thread
|
||||
// group then it might get killed and cause other invoking threads
|
||||
// sharing the same connection to get a non-restartable
|
||||
// CommunicationFailure. We'd like to avoid that.
|
||||
//
|
||||
// Our solution is to create all of our threads in the highest thread
|
||||
// group that we have access to, given our own security clearance.
|
||||
//
|
||||
try {
|
||||
// try to get a thread group that's as high in the threadgroup
|
||||
// parent-child hierarchy, as we can get to.
|
||||
// this will prevent an ORB thread created during applet-init from
|
||||
// being killed when an applet dies.
|
||||
threadGroup = (ThreadGroup) AccessController.doPrivileged(
|
||||
new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ThreadGroup tg = Thread.currentThread().getThreadGroup() ;
|
||||
ThreadGroup ptg = tg ;
|
||||
try {
|
||||
while (ptg != null) {
|
||||
tg = ptg;
|
||||
ptg = tg.getParent();
|
||||
}
|
||||
} catch (SecurityException se) {
|
||||
// Discontinue going higher on a security exception.
|
||||
}
|
||||
return new ThreadGroup(tg, "ORB ThreadGroup");
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (SecurityException e) {
|
||||
// something wrong, we go back to the original code
|
||||
threadGroup = Thread.currentThread().getThreadGroup();
|
||||
}
|
||||
|
||||
// This is the unique id of this server (JVM). Multiple incarnations
|
||||
// of this server will get different ids.
|
||||
// Compute transientServerId = milliseconds since Jan 1, 1970
|
||||
@@ -547,6 +519,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void set_parameters( Properties props )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
preInit( null, props ) ;
|
||||
DataCollector dataCollector =
|
||||
DataCollectorFactory.create( props, getLocalHostName() ) ;
|
||||
@@ -788,6 +763,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public void notifyORB()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (this.svResponseReceived) {
|
||||
this.svResponseReceived.set();
|
||||
this.svResponseReceived.notify();
|
||||
@@ -854,6 +832,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
// Note that we connect this if we have not already done so.
|
||||
public synchronized IOR getFVDCodeBaseIOR()
|
||||
{
|
||||
checkShutdownState();
|
||||
|
||||
if (codeBaseIOR != null) // i.e. We are already connected to it
|
||||
return codeBaseIOR;
|
||||
|
||||
@@ -1118,6 +1098,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public synchronized void setTypeCodeForClass(Class c, TypeCodeImpl tci)
|
||||
{
|
||||
checkShutdownState();
|
||||
|
||||
if (typeCodeForClassMap == null)
|
||||
typeCodeForClassMap = Collections.synchronizedMap(
|
||||
new WeakHashMap(64));
|
||||
@@ -1128,6 +1110,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public synchronized TypeCodeImpl getTypeCodeForClass(Class c)
|
||||
{
|
||||
checkShutdownState();
|
||||
|
||||
if (typeCodeForClassMap == null)
|
||||
return null;
|
||||
return (TypeCodeImpl)typeCodeForClassMap.get(c);
|
||||
@@ -1210,6 +1194,10 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
{
|
||||
CorbaServerRequestDispatcher insnd ;
|
||||
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
|
||||
if ((id == null) || (id.length() == 0))
|
||||
throw new InvalidName() ;
|
||||
|
||||
@@ -1253,66 +1241,88 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
}
|
||||
}
|
||||
|
||||
public void shutdown(boolean wait_for_completion)
|
||||
{
|
||||
// to wait for completion, we would deadlock, so throw a standard
|
||||
// OMG exception.
|
||||
if (wait_for_completion && ((Boolean)isProcessingInvocation.get()).booleanValue()) {
|
||||
throw omgWrapper.shutdownWaitForCompletionDeadlock() ;
|
||||
}
|
||||
|
||||
boolean doShutdown = false ;
|
||||
public void shutdown(boolean wait_for_completion) {
|
||||
boolean wait = false;
|
||||
|
||||
synchronized (this) {
|
||||
checkShutdownState() ;
|
||||
checkShutdownState();
|
||||
|
||||
// This is to avoid deadlock: don't allow a thread that is
|
||||
// processing a request to call shutdown( true ), because
|
||||
// the shutdown would block waiting for the request to complete,
|
||||
// while the request would block waiting for shutdown to complete.
|
||||
if (wait_for_completion &&
|
||||
isProcessingInvocation.get() == Boolean.TRUE) {
|
||||
throw omgWrapper.shutdownWaitForCompletionDeadlock();
|
||||
}
|
||||
|
||||
if (status == STATUS_SHUTTING_DOWN) {
|
||||
if (!wait_for_completion)
|
||||
// If we are already shutting down and don't want
|
||||
// to wait, nothing to do: return.
|
||||
return ;
|
||||
} else {
|
||||
// The ORB status was STATUS_OPERATING, so start the shutdown.
|
||||
status = STATUS_SHUTTING_DOWN ;
|
||||
doShutdown = true ;
|
||||
if (wait_for_completion) {
|
||||
wait = true;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
status = STATUS_SHUTTING_DOWN;
|
||||
}
|
||||
|
||||
// At this point, status is SHUTTING_DOWN.
|
||||
// All shutdown calls with wait_for_completion == true must synchronize
|
||||
// here. Only the first call will be made with doShutdown == true.
|
||||
// Avoid more than one thread performing shutdown at a time.
|
||||
synchronized (shutdownObj) {
|
||||
if (doShutdown) {
|
||||
// shutdownServants will set all POAManagers into the
|
||||
// INACTIVE state, causing request to be rejected.
|
||||
// If wait_for_completion is true, this will not return until
|
||||
// all invocations have completed.
|
||||
// At this point, the ORB status is certainly STATUS_SHUTTING_DOWN.
|
||||
// If wait is true, another thread already called shutdown( true ),
|
||||
// and so we wait for completion
|
||||
if (wait) {
|
||||
while (true) {
|
||||
synchronized (this) {
|
||||
if (status == STATUS_SHUTDOWN)
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
shutdownObj.wait();
|
||||
} catch (InterruptedException exc) {
|
||||
// NOP: just loop and wait until state is changed
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// perform the actual shutdown
|
||||
shutdownServants(wait_for_completion);
|
||||
|
||||
if (wait_for_completion) {
|
||||
synchronized ( waitForCompletionObj ) {
|
||||
while (numInvocations > 0) {
|
||||
try {
|
||||
waitForCompletionObj.wait();
|
||||
} catch (InterruptedException ex) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
synchronized (runObj) {
|
||||
runObj.notifyAll();
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
status = STATUS_SHUTDOWN;
|
||||
}
|
||||
status = STATUS_SHUTDOWN;
|
||||
|
||||
shutdownObj.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** This method shuts down the ORB and causes orb.run() to return.
|
||||
* It will cause all POAManagers to be deactivated, which in turn
|
||||
* will cause all POAs to be deactivated.
|
||||
*/
|
||||
// Cause all ObjectAdapaterFactories to clean up all of their internal state, which
|
||||
// may include activated objects that have associated state and callbacks that must
|
||||
// complete in order to shutdown. This will cause new request to be rejected.
|
||||
protected void shutdownServants(boolean wait_for_completion) {
|
||||
Iterator iter = requestDispatcherRegistry.getObjectAdapterFactories().iterator() ;
|
||||
while (iter.hasNext()) {
|
||||
ObjectAdapterFactory oaf = (ObjectAdapterFactory)iter.next() ;
|
||||
oaf.shutdown( wait_for_completion ) ;
|
||||
Set<ObjectAdapterFactory> oaset;
|
||||
synchronized (this) {
|
||||
oaset = new HashSet<>(requestDispatcherRegistry.getObjectAdapterFactories());
|
||||
}
|
||||
|
||||
for (ObjectAdapterFactory oaf : oaset)
|
||||
oaf.shutdown(wait_for_completion);
|
||||
}
|
||||
|
||||
// REVISIT: was protected - made public for framework
|
||||
// Note that the caller must hold the ORBImpl lock.
|
||||
public void checkShutdownState()
|
||||
{
|
||||
@@ -1327,21 +1337,40 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public boolean isDuringDispatch()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
Boolean value = (Boolean)(isProcessingInvocation.get()) ;
|
||||
return value.booleanValue() ;
|
||||
}
|
||||
|
||||
public void startingDispatch()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (invocationObj) {
|
||||
isProcessingInvocation.set(Boolean.TRUE);
|
||||
numInvocations++;
|
||||
}
|
||||
}
|
||||
|
||||
public void finishedDispatch()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (invocationObj) {
|
||||
isProcessingInvocation.set(Boolean.FALSE);
|
||||
numInvocations--;
|
||||
isProcessingInvocation.set(false);
|
||||
if (numInvocations == 0) {
|
||||
synchronized (waitForCompletionObj) {
|
||||
waitForCompletionObj.notifyAll();
|
||||
}
|
||||
} else if (numInvocations < 0) {
|
||||
throw wrapper.numInvocationsAlreadyZero(
|
||||
CompletionStatus.COMPLETED_YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1350,12 +1379,12 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
* not been shut down, it will start the shutdown process and block until
|
||||
* the ORB has shut down before it destroys the ORB."
|
||||
*/
|
||||
public synchronized void destroy()
|
||||
public void destroy()
|
||||
{
|
||||
boolean shutdownFirst = false ;
|
||||
boolean shutdownFirst = false;
|
||||
|
||||
synchronized (this) {
|
||||
shutdownFirst = (status == STATUS_OPERATING) ;
|
||||
shutdownFirst = (status == STATUS_OPERATING);
|
||||
}
|
||||
|
||||
if (shutdownFirst) {
|
||||
@@ -1365,11 +1394,76 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
synchronized (this) {
|
||||
if (status < STATUS_DESTROYED) {
|
||||
getCorbaTransportManager().close();
|
||||
getPIHandler().destroyInterceptors() ;
|
||||
getPIHandler().destroyInterceptors();
|
||||
status = STATUS_DESTROYED;
|
||||
}
|
||||
}
|
||||
synchronized (threadPoolManagerAccessLock) {
|
||||
if (orbOwnsThreadPoolManager) {
|
||||
try {
|
||||
threadpoolMgr.close();
|
||||
threadpoolMgr = null;
|
||||
} catch (IOException exc) {
|
||||
wrapper.ioExceptionOnClose(exc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
monitoringManager.close();
|
||||
monitoringManager = null;
|
||||
} catch (IOException exc) {
|
||||
wrapper.ioExceptionOnClose(exc);
|
||||
}
|
||||
|
||||
CachedCodeBase.cleanCache(this);
|
||||
try {
|
||||
pihandler.close();
|
||||
} catch (IOException exc) {
|
||||
wrapper.ioExceptionOnClose(exc);
|
||||
}
|
||||
|
||||
super.destroy();
|
||||
|
||||
badServerIdHandlerAccessLock = null;
|
||||
clientDelegateFactoryAccessorLock = null;
|
||||
corbaContactInfoListFactoryAccessLock = null;
|
||||
|
||||
objectKeyFactoryAccessLock = null;
|
||||
legacyServerSocketManagerAccessLock = null;
|
||||
threadPoolManagerAccessLock = null;
|
||||
transportManager = null;
|
||||
legacyServerSocketManager = null;
|
||||
OAInvocationInfoStack = null;
|
||||
clientInvocationInfoStack = null;
|
||||
codeBaseIOR = null;
|
||||
dynamicRequests = null;
|
||||
svResponseReceived = null;
|
||||
runObj = null;
|
||||
shutdownObj = null;
|
||||
waitForCompletionObj = null;
|
||||
invocationObj = null;
|
||||
isProcessingInvocation = null;
|
||||
typeCodeForClassMap = null;
|
||||
valueFactoryCache = null;
|
||||
orbVersionThreadLocal = null;
|
||||
requestDispatcherRegistry = null;
|
||||
copierManager = null;
|
||||
toaFactory = null;
|
||||
poaFactory = null;
|
||||
pihandler = null;
|
||||
configData = null;
|
||||
badServerIdHandler = null;
|
||||
clientDelegateFactory = null;
|
||||
corbaContactInfoListFactory = null;
|
||||
resolver = null;
|
||||
localResolver = null;
|
||||
insNamingDelegate = null;
|
||||
urlOperation = null;
|
||||
taggedComponentFactoryFinder = null;
|
||||
taggedProfileFactoryFinder = null;
|
||||
taggedProfileTemplateFactoryFinder = null;
|
||||
objectKeyFactory = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1434,18 +1528,27 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public OAInvocationInfo peekInvocationInfo()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
|
||||
return (OAInvocationInfo)(stack.peek()) ;
|
||||
}
|
||||
|
||||
public void pushInvocationInfo( OAInvocationInfo info )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
|
||||
stack.push( info ) ;
|
||||
}
|
||||
|
||||
public OAInvocationInfo popInvocationInfo()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
|
||||
return (OAInvocationInfo)(stack.pop()) ;
|
||||
}
|
||||
@@ -1459,6 +1562,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void initBadServerIdHandler()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (badServerIdHandlerAccessLock) {
|
||||
Class cls = configData.getBadServerIdHandler() ;
|
||||
if (cls != null) {
|
||||
@@ -1477,6 +1583,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void setBadServerIdHandler( BadServerIdHandler handler )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (badServerIdHandlerAccessLock) {
|
||||
badServerIdHandler = handler;
|
||||
}
|
||||
@@ -1484,6 +1593,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void handleBadServerId( ObjectKey okey )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (badServerIdHandlerAccessLock) {
|
||||
if (badServerIdHandler == null)
|
||||
throw wrapper.badServerId() ;
|
||||
@@ -1532,6 +1644,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public int getTransientServerId()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
if( configData.getORBServerIdPropertySpecified( ) ) {
|
||||
// ORBServerId is specified then use that value
|
||||
return configData.getPersistentServerId( );
|
||||
@@ -1541,11 +1656,17 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public RequestDispatcherRegistry getRequestDispatcherRegistry()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return requestDispatcherRegistry;
|
||||
}
|
||||
|
||||
public ServiceContextRegistry getServiceContextRegistry()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return serviceContextRegistry ;
|
||||
}
|
||||
|
||||
@@ -1563,12 +1684,18 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
// XXX What about multi-homed host?
|
||||
public boolean isLocalHost( String hostName )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return hostName.equals( configData.getORBServerHost() ) ||
|
||||
hostName.equals( getLocalHostName() ) ;
|
||||
}
|
||||
|
||||
public boolean isLocalServerId( int subcontractId, int serverId )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
if ((subcontractId < ORBConstants.FIRST_POA_SCID) ||
|
||||
(subcontractId > ORBConstants.MAX_POA_SCID))
|
||||
return serverId == getTransientServerId( ) ;
|
||||
@@ -1659,6 +1786,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public ClientInvocationInfo createOrIncrementInvocationInfo()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
StackImpl invocationInfoStack =
|
||||
(StackImpl) clientInvocationInfoStack.get();
|
||||
ClientInvocationInfo clientInvocationInfo = null;
|
||||
@@ -1682,10 +1812,13 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void releaseOrDecrementInvocationInfo()
|
||||
{
|
||||
StackImpl invocationInfoStack =
|
||||
(StackImpl)clientInvocationInfoStack.get();
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
int entryCount = -1;
|
||||
ClientInvocationInfo clientInvocationInfo = null;
|
||||
StackImpl invocationInfoStack =
|
||||
(StackImpl)clientInvocationInfoStack.get();
|
||||
if (!invocationInfoStack.empty()) {
|
||||
clientInvocationInfo =
|
||||
(ClientInvocationInfo)invocationInfoStack.peek();
|
||||
@@ -1705,6 +1838,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public ClientInvocationInfo getInvocationInfo()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
StackImpl invocationInfoStack =
|
||||
(StackImpl) clientInvocationInfoStack.get();
|
||||
return (ClientInvocationInfo) invocationInfoStack.peek();
|
||||
@@ -1719,6 +1855,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void setClientDelegateFactory( ClientDelegateFactory factory )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (clientDelegateFactoryAccessorLock) {
|
||||
clientDelegateFactory = factory ;
|
||||
}
|
||||
@@ -1726,6 +1865,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public ClientDelegateFactory getClientDelegateFactory()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (clientDelegateFactoryAccessorLock) {
|
||||
return clientDelegateFactory ;
|
||||
}
|
||||
@@ -1735,6 +1877,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void setCorbaContactInfoListFactory( CorbaContactInfoListFactory factory )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (corbaContactInfoListFactoryAccessLock) {
|
||||
corbaContactInfoListFactory = factory ;
|
||||
}
|
||||
@@ -1742,6 +1887,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public synchronized CorbaContactInfoListFactory getCorbaContactInfoListFactory()
|
||||
{
|
||||
checkShutdownState();
|
||||
return corbaContactInfoListFactory ;
|
||||
}
|
||||
|
||||
@@ -1750,6 +1896,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public void setResolver( Resolver resolver )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (resolverLock) {
|
||||
this.resolver = resolver ;
|
||||
}
|
||||
@@ -1760,6 +1909,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public Resolver getResolver()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (resolverLock) {
|
||||
return resolver ;
|
||||
}
|
||||
@@ -1770,6 +1922,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public void setLocalResolver( LocalResolver resolver )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (resolverLock) {
|
||||
this.localResolver = resolver ;
|
||||
}
|
||||
@@ -1780,6 +1935,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public LocalResolver getLocalResolver()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (resolverLock) {
|
||||
return localResolver ;
|
||||
}
|
||||
@@ -1790,6 +1948,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public void setURLOperation( Operation stringToObject )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (urlOperationLock) {
|
||||
urlOperation = stringToObject ;
|
||||
}
|
||||
@@ -1800,6 +1961,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
*/
|
||||
public Operation getURLOperation()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (urlOperationLock) {
|
||||
return urlOperation ;
|
||||
}
|
||||
@@ -1807,6 +1971,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void setINSDelegate( CorbaServerRequestDispatcher sdel )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (resolverLock) {
|
||||
insNamingDelegate = sdel ;
|
||||
}
|
||||
@@ -1814,16 +1981,25 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public TaggedComponentFactoryFinder getTaggedComponentFactoryFinder()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return taggedComponentFactoryFinder ;
|
||||
}
|
||||
|
||||
public IdentifiableFactoryFinder getTaggedProfileFactoryFinder()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return taggedProfileFactoryFinder ;
|
||||
}
|
||||
|
||||
public IdentifiableFactoryFinder getTaggedProfileTemplateFactoryFinder()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return taggedProfileTemplateFactoryFinder ;
|
||||
}
|
||||
|
||||
@@ -1831,6 +2007,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public ObjectKeyFactory getObjectKeyFactory()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (objectKeyFactoryAccessLock) {
|
||||
return objectKeyFactory ;
|
||||
}
|
||||
@@ -1838,6 +2017,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void setObjectKeyFactory( ObjectKeyFactory factory )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (objectKeyFactoryAccessLock) {
|
||||
objectKeyFactory = factory ;
|
||||
}
|
||||
@@ -1864,6 +2046,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public LegacyServerSocketManager getLegacyServerSocketManager()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (legacyServerSocketManagerAccessLock) {
|
||||
if (legacyServerSocketManager == null) {
|
||||
legacyServerSocketManager = new LegacyServerSocketManagerImpl(this);
|
||||
@@ -1876,6 +2061,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public void setThreadPoolManager(ThreadPoolManager mgr)
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (threadPoolManagerAccessLock) {
|
||||
threadpoolMgr = mgr;
|
||||
}
|
||||
@@ -1883,9 +2071,13 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public ThreadPoolManager getThreadPoolManager()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
synchronized (threadPoolManagerAccessLock) {
|
||||
if (threadpoolMgr == null) {
|
||||
threadpoolMgr = new ThreadPoolManagerImpl( threadGroup );
|
||||
threadpoolMgr = new ThreadPoolManagerImpl();
|
||||
orbOwnsThreadPoolManager = true;
|
||||
}
|
||||
return threadpoolMgr;
|
||||
}
|
||||
@@ -1893,6 +2085,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
|
||||
public CopierManager getCopierManager()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return copierManager ;
|
||||
}
|
||||
} // Class ORBImpl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -106,7 +106,9 @@ public class ParserTable {
|
||||
|
||||
public ParserData[] getParserData()
|
||||
{
|
||||
return parserData ;
|
||||
ParserData[] parserArray = new ParserData[parserData.length];
|
||||
System.arraycopy(parserData, 0, parserArray, 0, parserData.length);
|
||||
return parserArray;
|
||||
}
|
||||
|
||||
private ParserTable() {
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.corba.se.impl.orbutil ;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -62,7 +62,7 @@ public class RepositoryId_1_3 {
|
||||
// legal use of '.' in a Java name.
|
||||
|
||||
public static final RepositoryIdCache_1_3 cache = new RepositoryIdCache_1_3();
|
||||
public static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
private static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
|
||||
@@ -180,7 +180,7 @@ public class RepositoryId_1_3 {
|
||||
public static final String kRemoteTypeStr = "";
|
||||
public static final String kRemoteValueRepID = "";
|
||||
|
||||
public static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
|
||||
private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
|
||||
@@ -189,7 +189,7 @@ public class RepositoryId_1_3 {
|
||||
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesRepIDs = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
|
||||
@@ -197,7 +197,7 @@ public class RepositoryId_1_3 {
|
||||
kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesStubValues = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesStubValues = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
|
||||
@@ -209,7 +209,7 @@ public class RepositoryId_1_3 {
|
||||
}
|
||||
|
||||
|
||||
public static final Hashtable kSpecialCasesVersions = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesVersions = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
|
||||
@@ -220,7 +220,7 @@ public class RepositoryId_1_3 {
|
||||
kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesClasses = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesClasses = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
|
||||
@@ -232,7 +232,7 @@ public class RepositoryId_1_3 {
|
||||
//kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesArrayPrefix.put(java.lang.String.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
|
||||
@@ -243,7 +243,7 @@ public class RepositoryId_1_3 {
|
||||
kSpecialCasesArrayPrefix.put(java.rmi.Remote.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialPrimitives = new Hashtable();
|
||||
private static final Hashtable kSpecialPrimitives = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialPrimitives.put("int","long");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -63,7 +63,7 @@ public class RepositoryId_1_3_1 {
|
||||
// uniformly, and is safe because that is the only
|
||||
// legal use of '.' in a Java name.
|
||||
|
||||
public static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
private static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
|
||||
@@ -198,7 +198,7 @@ public class RepositoryId_1_3_1 {
|
||||
public static final String kRemoteTypeStr = "";
|
||||
public static final String kRemoteValueRepID = "";
|
||||
|
||||
public static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
|
||||
private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
|
||||
@@ -207,7 +207,7 @@ public class RepositoryId_1_3_1 {
|
||||
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesRepIDs = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
|
||||
@@ -215,7 +215,7 @@ public class RepositoryId_1_3_1 {
|
||||
kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesStubValues = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesStubValues = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
|
||||
@@ -227,7 +227,7 @@ public class RepositoryId_1_3_1 {
|
||||
}
|
||||
|
||||
|
||||
public static final Hashtable kSpecialCasesVersions = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesVersions = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
|
||||
@@ -238,7 +238,7 @@ public class RepositoryId_1_3_1 {
|
||||
kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesClasses = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesClasses = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
|
||||
@@ -250,7 +250,7 @@ public class RepositoryId_1_3_1 {
|
||||
//kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesArrayPrefix.put(java.lang.String.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
|
||||
@@ -261,7 +261,7 @@ public class RepositoryId_1_3_1 {
|
||||
kSpecialCasesArrayPrefix.put(java.rmi.Remote.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialPrimitives = new Hashtable();
|
||||
private static final Hashtable kSpecialPrimitives = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialPrimitives.put("int","long");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,6 +25,18 @@
|
||||
|
||||
package com.sun.corba.se.impl.orbutil.threadpool;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Closeable;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import com.sun.corba.se.spi.orbutil.threadpool.NoSuchWorkQueueException;
|
||||
import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
|
||||
import com.sun.corba.se.spi.orbutil.threadpool.Work;
|
||||
@@ -36,12 +48,27 @@ import com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoringConstants;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoredObject;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoringFactories;
|
||||
import com.sun.corba.se.spi.orb.ORB;
|
||||
import com.sun.corba.se.spi.monitoring.LongMonitoredAttributeBase;
|
||||
|
||||
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
|
||||
import com.sun.corba.se.impl.orbutil.ORBConstants;
|
||||
import com.sun.corba.se.spi.logging.CORBALogDomains;
|
||||
|
||||
public class ThreadPoolImpl implements ThreadPool
|
||||
{
|
||||
private static int threadCounter = 0; // serial counter useful for debugging
|
||||
// serial counter useful for debugging
|
||||
private static AtomicInteger threadCounter = new AtomicInteger(0);
|
||||
private static final ORBUtilSystemException wrapper =
|
||||
ORBUtilSystemException.get(CORBALogDomains.RPC_TRANSPORT);
|
||||
|
||||
|
||||
// Any time currentThreadCount and/or availableWorkerThreads is updated
|
||||
// or accessed this ThreadPool's WorkQueue must be locked. And, it is
|
||||
// expected that this ThreadPool's WorkQueue is the only object that
|
||||
// updates and accesses these values directly and indirectly though a
|
||||
// call to a method in this ThreadPool. If any call to update or access
|
||||
// those values must synchronized on this ThreadPool's WorkQueue.
|
||||
private WorkQueue workQueue;
|
||||
|
||||
// Stores the number of available worker threads
|
||||
@@ -65,14 +92,11 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
// Running count of the work items processed
|
||||
// Set the value to 1 so that divide by zero is avoided in
|
||||
// averageWorkCompletionTime()
|
||||
private long processedCount = 1;
|
||||
private AtomicLong processedCount = new AtomicLong(1);
|
||||
|
||||
// Running aggregate of the time taken in millis to execute work items
|
||||
// processed by the threads in the threadpool
|
||||
private long totalTimeTaken = 0;
|
||||
|
||||
// Lock for protecting state when required
|
||||
private Object lock = new Object();
|
||||
private AtomicLong totalTimeTaken = new AtomicLong(0);
|
||||
|
||||
// Name of the ThreadPool
|
||||
private String name;
|
||||
@@ -81,7 +105,10 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
private MonitoredObject threadpoolMonitoredObject;
|
||||
|
||||
// ThreadGroup in which threads should be created
|
||||
private ThreadGroup threadGroup ;
|
||||
private ThreadGroup threadGroup;
|
||||
|
||||
Object workersLock = new Object();
|
||||
List<WorkerThread> workers = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* This constructor is used to create an unbounded threadpool
|
||||
@@ -90,7 +117,7 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
inactivityTimeout = ORBConstants.DEFAULT_INACTIVITY_TIMEOUT;
|
||||
maxWorkerThreads = Integer.MAX_VALUE;
|
||||
workQueue = new WorkQueueImpl(this);
|
||||
threadGroup = tg ;
|
||||
threadGroup = tg;
|
||||
name = threadpoolName;
|
||||
initializeMonitoring();
|
||||
}
|
||||
@@ -121,6 +148,30 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
initializeMonitoring();
|
||||
}
|
||||
|
||||
// Note that this method should not return until AFTER all threads have died.
|
||||
public void close() throws IOException {
|
||||
|
||||
// Copy to avoid concurrent modification problems.
|
||||
List<WorkerThread> copy = null;
|
||||
synchronized (workersLock) {
|
||||
copy = new ArrayList<>(workers);
|
||||
}
|
||||
|
||||
for (WorkerThread wt : copy) {
|
||||
wt.close();
|
||||
while (wt.getState() != Thread.State.TERMINATED) {
|
||||
try {
|
||||
wt.join();
|
||||
} catch (InterruptedException exc) {
|
||||
wrapper.interruptedJoinCallWhileClosingThreadPool(exc, wt, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
threadGroup = null;
|
||||
}
|
||||
|
||||
|
||||
// Setup monitoring for this threadpool
|
||||
private void initializeMonitoring() {
|
||||
// Get root monitored object
|
||||
@@ -217,8 +268,8 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
* or notify waiting threads on the queue for available work
|
||||
*/
|
||||
void notifyForAvailableWork(WorkQueue aWorkQueue) {
|
||||
synchronized (lock) {
|
||||
if (availableWorkerThreads == 0) {
|
||||
synchronized (aWorkQueue) {
|
||||
if (availableWorkerThreads < aWorkQueue.workItemsInQueue()) {
|
||||
createWorkerThread();
|
||||
} else {
|
||||
aWorkQueue.notify();
|
||||
@@ -227,120 +278,145 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To be called from the workqueue to create worker threads when none
|
||||
* available.
|
||||
*/
|
||||
void createWorkerThread() {
|
||||
WorkerThread thread;
|
||||
|
||||
synchronized (lock) {
|
||||
if (boundedThreadPool) {
|
||||
if (currentThreadCount < maxWorkerThreads) {
|
||||
thread = new WorkerThread(threadGroup, getName());
|
||||
currentThreadCount++;
|
||||
} else {
|
||||
// REVIST - Need to create a thread to monitor the
|
||||
// the state for deadlock i.e. all threads waiting for
|
||||
// something which can be got from the item in the
|
||||
// workqueue, but there is no thread available to
|
||||
// process that work item - DEADLOCK !!
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
thread = new WorkerThread(threadGroup, getName());
|
||||
currentThreadCount++;
|
||||
}
|
||||
private Thread createWorkerThreadHelper( String name ) {
|
||||
// Thread creation needs to be in a doPrivileged block
|
||||
// if there is a non-null security manager for two reasons:
|
||||
// 1. The creation of a thread in a specific ThreadGroup
|
||||
// is a privileged operation. Lack of a doPrivileged
|
||||
// block here causes an AccessControlException
|
||||
// (see bug 6268145).
|
||||
// 2. We want to make sure that the permissions associated
|
||||
// with this thread do NOT include the permissions of
|
||||
// the current thread that is calling this method.
|
||||
// This leads to problems in the app server where
|
||||
// some threads in the ThreadPool randomly get
|
||||
// bad permissions, leading to unpredictable
|
||||
// permission errors (see bug 6021011).
|
||||
//
|
||||
// A Java thread contains a stack of call frames,
|
||||
// one for each method called that has not yet returned.
|
||||
// Each method comes from a particular class. The class
|
||||
// was loaded by a ClassLoader which has an associated
|
||||
// CodeSource, and this determines the Permissions
|
||||
// for all methods in that class. The current
|
||||
// Permissions for the thread are the intersection of
|
||||
// all Permissions for the methods on the stack.
|
||||
// This is part of the Security Context of the thread.
|
||||
//
|
||||
// When a thread creates a new thread, the new thread
|
||||
// inherits the security context of the old thread.
|
||||
// This is bad in a ThreadPool, because different
|
||||
// creators of threads may have different security contexts.
|
||||
// This leads to occasional unpredictable errors when
|
||||
// a thread is re-used in a different security context.
|
||||
//
|
||||
// Avoiding this problem is simple: just do the thread
|
||||
// creation in a doPrivileged block. This sets the
|
||||
// inherited security context to that of the code source
|
||||
// for the ORB code itself, which contains all permissions
|
||||
// in either Java SE or Java EE.
|
||||
WorkerThread thread = new WorkerThread(threadGroup, name);
|
||||
synchronized (workersLock) {
|
||||
workers.add(thread);
|
||||
}
|
||||
|
||||
// The thread must be set to a daemon thread so the
|
||||
// VM can exit if the only threads left are PooledThreads
|
||||
// or other daemons. We don't want to rely on the
|
||||
// calling thread always being a daemon.
|
||||
// Note that no exception is possible here since we
|
||||
// are inside the doPrivileged block.
|
||||
thread.setDaemon(true);
|
||||
|
||||
// Catch exceptions since setDaemon can cause a
|
||||
// security exception to be thrown under netscape
|
||||
// in the Applet mode
|
||||
try {
|
||||
thread.setDaemon(true);
|
||||
} catch (Exception e) {
|
||||
// REVISIT - need to do some logging here
|
||||
}
|
||||
wrapper.workerThreadCreated(thread, thread.getContextClassLoader());
|
||||
|
||||
thread.start();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method will return the minimum number of threads maintained
|
||||
* by the threadpool.
|
||||
*/
|
||||
* To be called from the workqueue to create worker threads when none
|
||||
* available.
|
||||
*/
|
||||
void createWorkerThread() {
|
||||
final String name = getName();
|
||||
synchronized (workQueue) {
|
||||
try {
|
||||
if (System.getSecurityManager() == null) {
|
||||
createWorkerThreadHelper(name);
|
||||
} else {
|
||||
// If we get here, we need to create a thread.
|
||||
AccessController.doPrivileged(
|
||||
new PrivilegedAction() {
|
||||
public Object run() {
|
||||
return createWorkerThreadHelper(name);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
// Decrementing the count of current worker threads.
|
||||
// But, it will be increased in the finally block.
|
||||
decrementCurrentNumberOfThreads();
|
||||
wrapper.workerThreadCreationFailure(t);
|
||||
} finally {
|
||||
incrementCurrentNumberOfThreads();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int minimumNumberOfThreads() {
|
||||
return minWorkerThreads;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return the maximum number of threads in the
|
||||
* threadpool at any point in time, for the life of the threadpool
|
||||
*/
|
||||
public int maximumNumberOfThreads() {
|
||||
return maxWorkerThreads;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return the time in milliseconds when idle
|
||||
* threads in the threadpool are removed.
|
||||
*/
|
||||
public long idleTimeoutForThreads() {
|
||||
return inactivityTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return the total number of threads currently in the
|
||||
* threadpool. This method returns a value which is not synchronized.
|
||||
*/
|
||||
public int currentNumberOfThreads() {
|
||||
synchronized (lock) {
|
||||
synchronized (workQueue) {
|
||||
return currentThreadCount;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return the number of available threads in the
|
||||
* threadpool which are waiting for work. This method returns a
|
||||
* value which is not synchronized.
|
||||
*/
|
||||
void decrementCurrentNumberOfThreads() {
|
||||
synchronized (workQueue) {
|
||||
currentThreadCount--;
|
||||
}
|
||||
}
|
||||
|
||||
void incrementCurrentNumberOfThreads() {
|
||||
synchronized (workQueue) {
|
||||
currentThreadCount++;
|
||||
}
|
||||
}
|
||||
|
||||
public int numberOfAvailableThreads() {
|
||||
synchronized (lock) {
|
||||
synchronized (workQueue) {
|
||||
return availableWorkerThreads;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will return the number of busy threads in the threadpool
|
||||
* This method returns a value which is not synchronized.
|
||||
*/
|
||||
public int numberOfBusyThreads() {
|
||||
synchronized (lock) {
|
||||
synchronized (workQueue) {
|
||||
return (currentThreadCount - availableWorkerThreads);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the average elapsed time taken to complete a Work
|
||||
* item in milliseconds.
|
||||
*/
|
||||
public long averageWorkCompletionTime() {
|
||||
synchronized (lock) {
|
||||
return (totalTimeTaken / processedCount);
|
||||
synchronized (workQueue) {
|
||||
return (totalTimeTaken.get() / processedCount.get());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the number of Work items processed by the threadpool
|
||||
*/
|
||||
public long currentProcessedCount() {
|
||||
synchronized (lock) {
|
||||
return processedCount;
|
||||
synchronized (workQueue) {
|
||||
return processedCount.get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,15 +433,37 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
|
||||
|
||||
private static synchronized int getUniqueThreadId() {
|
||||
return ThreadPoolImpl.threadCounter++;
|
||||
return ThreadPoolImpl.threadCounter.incrementAndGet();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will decrement the number of available threads
|
||||
* in the threadpool which are waiting for work. Called from
|
||||
* WorkQueueImpl.requestWork()
|
||||
*/
|
||||
void decrementNumberOfAvailableThreads() {
|
||||
synchronized (workQueue) {
|
||||
availableWorkerThreads--;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will increment the number of available threads
|
||||
* in the threadpool which are waiting for work. Called from
|
||||
* WorkQueueImpl.requestWork()
|
||||
*/
|
||||
void incrementNumberOfAvailableThreads() {
|
||||
synchronized (workQueue) {
|
||||
availableWorkerThreads++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class WorkerThread extends Thread
|
||||
private class WorkerThread extends Thread implements Closeable
|
||||
{
|
||||
private Work currentWork;
|
||||
private int threadId = 0; // unique id for the thread
|
||||
// thread pool this WorkerThread belongs too
|
||||
private volatile boolean closeCalled = false;
|
||||
private String threadPoolName;
|
||||
// name seen by Thread.getName()
|
||||
private StringBuffer workerThreadName = new StringBuffer();
|
||||
@@ -377,100 +475,61 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
setName(composeWorkerThreadName(threadPoolName, "Idle"));
|
||||
}
|
||||
|
||||
public synchronized void close() {
|
||||
closeCalled = true;
|
||||
interrupt();
|
||||
}
|
||||
|
||||
private void resetClassLoader() {
|
||||
|
||||
}
|
||||
|
||||
private void performWork() {
|
||||
long start = System.currentTimeMillis();
|
||||
try {
|
||||
currentWork.doWork();
|
||||
} catch (Throwable t) {
|
||||
wrapper.workerThreadDoWorkThrowable(this, t);
|
||||
}
|
||||
long elapsedTime = System.currentTimeMillis() - start;
|
||||
totalTimeTaken.addAndGet(elapsedTime);
|
||||
processedCount.incrementAndGet();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
while (true) {
|
||||
try {
|
||||
|
||||
synchronized (lock) {
|
||||
availableWorkerThreads++;
|
||||
}
|
||||
|
||||
// Get some work to do
|
||||
currentWork = ((WorkQueueImpl)workQueue).requestWork(inactivityTimeout);
|
||||
|
||||
synchronized (lock) {
|
||||
availableWorkerThreads--;
|
||||
// It is possible in notifyForAvailableWork that the
|
||||
// check for availableWorkerThreads = 0 may return
|
||||
// false, because the availableWorkerThreads has not been
|
||||
// decremented to zero before the producer thread added
|
||||
// work to the queue. This may create a deadlock, if the
|
||||
// executing thread needs information which is in the work
|
||||
// item queued in the workqueue, but has no thread to work
|
||||
// on it since none was created because availableWorkerThreads = 0
|
||||
// returned false.
|
||||
// The following code will ensure that a thread is always available
|
||||
// in those situations
|
||||
if ((availableWorkerThreads == 0) &&
|
||||
(workQueue.workItemsInQueue() > 0)) {
|
||||
createWorkerThread();
|
||||
}
|
||||
}
|
||||
|
||||
// Set the thread name for debugging.
|
||||
setName(composeWorkerThreadName(threadPoolName,
|
||||
Integer.toString(this.threadId)));
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
try {
|
||||
while (!closeCalled) {
|
||||
try {
|
||||
// Do the work
|
||||
currentWork.doWork();
|
||||
currentWork = ((WorkQueueImpl)workQueue).requestWork(
|
||||
inactivityTimeout);
|
||||
if (currentWork == null)
|
||||
continue;
|
||||
} catch (InterruptedException exc) {
|
||||
wrapper.workQueueThreadInterrupted( exc, getName(),
|
||||
Boolean.valueOf(closeCalled));
|
||||
|
||||
continue ;
|
||||
} catch (Throwable t) {
|
||||
// Ignore all errors.
|
||||
;
|
||||
wrapper.workerThreadThrowableFromRequestWork(this, t,
|
||||
workQueue.getName());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
long end = System.currentTimeMillis();
|
||||
|
||||
|
||||
synchronized (lock) {
|
||||
totalTimeTaken += (end - start);
|
||||
processedCount++;
|
||||
}
|
||||
performWork();
|
||||
|
||||
// set currentWork to null so that the work item can be
|
||||
// garbage collected
|
||||
// garbage collected without waiting for the next work item.
|
||||
currentWork = null;
|
||||
|
||||
setName(composeWorkerThreadName(threadPoolName, "Idle"));
|
||||
|
||||
} catch (TimeoutException e) {
|
||||
// This thread timed out waiting for something to do.
|
||||
|
||||
synchronized (lock) {
|
||||
availableWorkerThreads--;
|
||||
|
||||
// This should for both bounded and unbounded case
|
||||
if (currentThreadCount > minWorkerThreads) {
|
||||
currentThreadCount--;
|
||||
// This thread can exit.
|
||||
return;
|
||||
} else {
|
||||
// Go back to waiting on workQueue
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException ie) {
|
||||
// InterruptedExceptions are
|
||||
// caught here. Thus, threads can be forced out of
|
||||
// requestWork and so they have to reacquire the lock.
|
||||
// Other options include ignoring or
|
||||
// letting this thread die.
|
||||
// Ignoring for now. REVISIT
|
||||
synchronized (lock) {
|
||||
availableWorkerThreads--;
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
|
||||
// Ignore any exceptions that currentWork.process
|
||||
// accidently lets through, but let Errors pass.
|
||||
// Add debugging output? REVISIT
|
||||
synchronized (lock) {
|
||||
availableWorkerThreads--;
|
||||
}
|
||||
|
||||
resetClassLoader();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
// This should not be possible
|
||||
wrapper.workerThreadCaughtUnexpectedThrowable(this,e);
|
||||
} finally {
|
||||
synchronized (workersLock) {
|
||||
workers.remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,6 +25,15 @@
|
||||
|
||||
package com.sun.corba.se.impl.orbutil.threadpool;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.AccessController;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.sun.corba.se.spi.orb.ORB;
|
||||
|
||||
import com.sun.corba.se.spi.orbutil.threadpool.NoSuchThreadPoolException;
|
||||
import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
|
||||
import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager;
|
||||
@@ -33,21 +42,102 @@ import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolChooser;
|
||||
import com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl;
|
||||
import com.sun.corba.se.impl.orbutil.ORBConstants;
|
||||
|
||||
import com.sun.corba.se.impl.logging.ORBUtilSystemException;
|
||||
import com.sun.corba.se.impl.orbutil.ORBConstants;
|
||||
import com.sun.corba.se.spi.logging.CORBALogDomains;
|
||||
|
||||
|
||||
public class ThreadPoolManagerImpl implements ThreadPoolManager
|
||||
{
|
||||
private ThreadPool threadPool ;
|
||||
private ThreadPool threadPool;
|
||||
private ThreadGroup threadGroup;
|
||||
|
||||
public ThreadPoolManagerImpl( ThreadGroup tg )
|
||||
{
|
||||
// Use unbounded threadpool in J2SE ORB
|
||||
// ThreadPoolManager from s1as appserver code base can be set in the
|
||||
// ORB. ThreadPools in the appserver are bounded. In that situation
|
||||
// the ThreadPool in this ThreadPoolManager will have its threads
|
||||
// die after the idle timeout.
|
||||
// XXX Should there be cleanup when ORB.shutdown is called if the
|
||||
// ORB owns the ThreadPool?
|
||||
threadPool = new ThreadPoolImpl( tg,
|
||||
ORBConstants.THREADPOOL_DEFAULT_NAME ) ;
|
||||
private static final ORBUtilSystemException wrapper =
|
||||
ORBUtilSystemException.get(CORBALogDomains.RPC_TRANSPORT);
|
||||
|
||||
public ThreadPoolManagerImpl() {
|
||||
threadGroup = getThreadGroup();
|
||||
threadPool = new ThreadPoolImpl(threadGroup,
|
||||
ORBConstants.THREADPOOL_DEFAULT_NAME);
|
||||
}
|
||||
|
||||
private static AtomicInteger tgCount = new AtomicInteger();
|
||||
|
||||
|
||||
private ThreadGroup getThreadGroup() {
|
||||
ThreadGroup tg;
|
||||
|
||||
// See bugs 4916766 and 4936203
|
||||
// We intend to create new threads in a reliable thread group.
|
||||
// This avoids problems if the application/applet
|
||||
// creates a thread group, makes JavaIDL calls which create a new
|
||||
// connection and ReaderThread, and then destroys the thread
|
||||
// group. If our ReaderThreads were to be part of such destroyed thread
|
||||
// group then it might get killed and cause other invoking threads
|
||||
// sharing the same connection to get a non-restartable
|
||||
// CommunicationFailure. We'd like to avoid that.
|
||||
//
|
||||
// Our solution is to create all of our threads in the highest thread
|
||||
// group that we have access to, given our own security clearance.
|
||||
//
|
||||
try {
|
||||
// try to get a thread group that's as high in the threadgroup
|
||||
// parent-child hierarchy, as we can get to.
|
||||
// this will prevent an ORB thread created during applet-init from
|
||||
// being killed when an applet dies.
|
||||
tg = AccessController.doPrivileged(
|
||||
new PrivilegedAction<ThreadGroup>() {
|
||||
public ThreadGroup run() {
|
||||
ThreadGroup tg = Thread.currentThread().getThreadGroup();
|
||||
ThreadGroup ptg = tg;
|
||||
try {
|
||||
while (ptg != null) {
|
||||
tg = ptg;
|
||||
ptg = tg.getParent();
|
||||
}
|
||||
} catch (SecurityException se) {
|
||||
// Discontinue going higher on a security exception.
|
||||
}
|
||||
return new ThreadGroup(tg, "ORB ThreadGroup " + tgCount.getAndIncrement());
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (SecurityException e) {
|
||||
// something wrong, we go back to the original code
|
||||
tg = Thread.currentThread().getThreadGroup();
|
||||
}
|
||||
|
||||
return tg;
|
||||
}
|
||||
|
||||
public void close() {
|
||||
try {
|
||||
threadPool.close();
|
||||
} catch (IOException exc) {
|
||||
wrapper.threadPoolCloseError();
|
||||
}
|
||||
|
||||
try {
|
||||
boolean isDestroyed = threadGroup.isDestroyed();
|
||||
int numThreads = threadGroup.activeCount();
|
||||
int numGroups = threadGroup.activeGroupCount();
|
||||
|
||||
if (isDestroyed) {
|
||||
wrapper.threadGroupIsDestroyed(threadGroup);
|
||||
} else {
|
||||
if (numThreads > 0)
|
||||
wrapper.threadGroupHasActiveThreadsInClose(threadGroup, numThreads);
|
||||
|
||||
if (numGroups > 0)
|
||||
wrapper.threadGroupHasSubGroupsInClose(threadGroup, numGroups);
|
||||
|
||||
threadGroup.destroy();
|
||||
}
|
||||
} catch (IllegalThreadStateException exc) {
|
||||
wrapper.threadGroupDestroyFailed(exc, threadGroup);
|
||||
}
|
||||
|
||||
threadGroup = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -111,24 +111,23 @@ public class WorkQueueImpl implements WorkQueue
|
||||
return workqueueMonitoredObject;
|
||||
}
|
||||
|
||||
public void addWork(Work work) {
|
||||
synchronized (this) {
|
||||
public synchronized void addWork(Work work) {
|
||||
workItemsAdded++;
|
||||
work.setEnqueueTime(System.currentTimeMillis());
|
||||
theWorkQueue.addLast(work);
|
||||
((ThreadPoolImpl)workerThreadPool).notifyForAvailableWork(this);
|
||||
}
|
||||
}
|
||||
|
||||
Work requestWork(long waitTime)
|
||||
throws TimeoutException, InterruptedException
|
||||
synchronized Work requestWork(long waitTime) throws TimeoutException, InterruptedException
|
||||
{
|
||||
Work workItem;
|
||||
synchronized (this) {
|
||||
((ThreadPoolImpl)workerThreadPool).incrementNumberOfAvailableThreads();
|
||||
|
||||
if (theWorkQueue.size() != 0) {
|
||||
workItem = (Work)theWorkQueue.removeFirst();
|
||||
totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime();
|
||||
workItemsDequeued++;
|
||||
((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
|
||||
return workItem;
|
||||
}
|
||||
|
||||
@@ -145,6 +144,7 @@ public class WorkQueueImpl implements WorkQueue
|
||||
workItem = (Work)theWorkQueue.removeFirst();
|
||||
totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime();
|
||||
workItemsDequeued++;
|
||||
((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
|
||||
return workItem;
|
||||
}
|
||||
|
||||
@@ -152,12 +152,13 @@ public class WorkQueueImpl implements WorkQueue
|
||||
|
||||
} while (remainingWaitTime > 0);
|
||||
|
||||
((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
|
||||
throw new TimeoutException();
|
||||
|
||||
} catch (InterruptedException ie) {
|
||||
((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
|
||||
throw ie;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setThreadPool(ThreadPool workerThreadPool) {
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.corba.se.impl.presentation.rmi ;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -1666,7 +1666,9 @@ public class CorbaMessageMediatorImpl
|
||||
((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();
|
||||
|
||||
ORB orb = (ORB)messageMediator.getBroker();
|
||||
orb.checkShutdownState();
|
||||
synchronized (orb) {
|
||||
orb.checkShutdownState();
|
||||
}
|
||||
|
||||
ObjectKey okey = messageMediator.getObjectKey();
|
||||
if (orb.subcontractDebugFlag) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -52,7 +52,7 @@ public abstract class LocalClientRequestDispatcherBase implements LocalClientReq
|
||||
|
||||
// If isNextIsLocalValid.get() == Boolean.TRUE,
|
||||
// the next call to isLocal should be valid
|
||||
protected static ThreadLocal isNextCallValid = new ThreadLocal() {
|
||||
private static final ThreadLocal isNextCallValid = new ThreadLocal() {
|
||||
protected synchronized Object initialValue() {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -69,8 +69,8 @@ public class SelectorImpl
|
||||
private HashMap listenerThreads;
|
||||
private Map readerThreads;
|
||||
private boolean selectorStarted;
|
||||
private boolean closed;
|
||||
private ORBUtilSystemException wrapper ;
|
||||
private volatile boolean closed;
|
||||
private ORBUtilSystemException wrapper;
|
||||
|
||||
|
||||
public SelectorImpl(ORB orb)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -57,7 +57,7 @@ public class RepositoryId {
|
||||
// uniformly, and is safe because that is the only
|
||||
// legal use of '.' in a Java name.
|
||||
|
||||
public static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
private static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
|
||||
@@ -95,7 +95,7 @@ public class RepositoryId {
|
||||
private static IdentityHashtable classIDLToRepStr = new IdentityHashtable();
|
||||
private static IdentityHashtable classSeqToRepStr = new IdentityHashtable();
|
||||
|
||||
private static IdentityHashtable repStrToByteArray = new IdentityHashtable();
|
||||
private static final IdentityHashtable repStrToByteArray = new IdentityHashtable();
|
||||
private static Hashtable repStrToClass = new Hashtable();
|
||||
|
||||
private String repId = null;
|
||||
@@ -192,7 +192,7 @@ public class RepositoryId {
|
||||
public static final String kRemoteTypeStr = "";
|
||||
public static final String kRemoteValueRepID = "";
|
||||
|
||||
public static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
|
||||
private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
|
||||
@@ -201,7 +201,7 @@ public class RepositoryId {
|
||||
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesRepIDs = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
|
||||
@@ -209,7 +209,7 @@ public class RepositoryId {
|
||||
kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesStubValues = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesStubValues = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
|
||||
@@ -221,7 +221,7 @@ public class RepositoryId {
|
||||
}
|
||||
|
||||
|
||||
public static final Hashtable kSpecialCasesVersions = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesVersions = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
|
||||
@@ -232,7 +232,7 @@ public class RepositoryId {
|
||||
kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesClasses = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesClasses = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
|
||||
@@ -244,7 +244,7 @@ public class RepositoryId {
|
||||
//kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
|
||||
private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialCasesArrayPrefix.put(java.lang.String.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
|
||||
@@ -255,7 +255,7 @@ public class RepositoryId {
|
||||
kSpecialCasesArrayPrefix.put(java.rmi.Remote.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
|
||||
}
|
||||
|
||||
public static final Hashtable kSpecialPrimitives = new Hashtable();
|
||||
private static final Hashtable kSpecialPrimitives = new Hashtable();
|
||||
|
||||
static {
|
||||
kSpecialPrimitives.put("int","long");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -58,7 +58,7 @@ public abstract class CORBALogDomains {
|
||||
private CORBALogDomains() {}
|
||||
|
||||
// Top level log domain for CORBA
|
||||
public static String TOP_LEVEL_DOMAIN = "javax.enterprise.resource.corba";
|
||||
public static final String TOP_LEVEL_DOMAIN = "javax.enterprise.resource.corba";
|
||||
|
||||
public static final String RPC = "rpc" ;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
;
|
||||
|
||||
; Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
; Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
;
|
||||
; This code is free software; you can redistribute it and/or modify it
|
||||
@@ -62,6 +62,7 @@
|
||||
(IS_LOCAL_REQUIRES_STUB 43 WARNING "Call to StubAdapter.isLocal did not pass a stub")
|
||||
(REQUEST_REQUIRES_STUB 44 WARNING "Call to StubAdapter.request did not pass a stub")
|
||||
(BAD_ACTIVATE_TIE_CALL 45 WARNING "Call to StubAdapter.activateTie did not pass a valid Tie")
|
||||
(IO_EXCEPTION_ON_CLOSE 46 FINE "Useless exception on call to Closeable.close()")
|
||||
)
|
||||
(BAD_PARAM
|
||||
(NULL_PARAM 1 WARNING "Null parameter")
|
||||
@@ -291,7 +292,31 @@
|
||||
(JAVA_STREAM_INIT_FAILED 95 WARNING "Java stream initialization failed")
|
||||
(DUPLICATE_ORB_VERSION_SERVICE_CONTEXT 96 WARNING "An ORBVersionServiceContext was already in the service context list")
|
||||
(DUPLICATE_SENDING_CONTEXT_SERVICE_CONTEXT 97 WARNING "A SendingContextServiceContext was already in the service context list")
|
||||
(WORK_QUEUE_THREAD_INTERRUPTED 98 FINE "Worker Thread from thread pool {0} was interrupted: closeCalled is {1}.")
|
||||
(WORKER_THREAD_CREATED
|
||||
104 FINE "Worker thread {0} has been created with ClassLoader {1}")
|
||||
(WORKER_THREAD_THROWABLE_FROM_REQUEST_WORK
|
||||
109 FINE "Worker thread {0} caught throwable {1} when requesting work from work queue {2}.")
|
||||
(WORKER_THREAD_NOT_NEEDED
|
||||
110 FINE "Worker thread {0} will exit; current thread count, {1}, greater than minunum worker threads needed, {2}.")
|
||||
(WORKER_THREAD_DO_WORK_THROWABLE
|
||||
111 FINE "Worker thread {0} caught throwable {1} while executing work.")
|
||||
(WORKER_THREAD_CAUGHT_UNEXPECTED_THROWABLE
|
||||
112 WARNING "Worker thread {0} caught unexpected throwable {1}.")
|
||||
(WORKER_THREAD_CREATION_FAILURE
|
||||
113 SEVERE "Worker thread creation failure; cause {0}.")
|
||||
(WORKER_THREAD_SET_NAME_FAILURE
|
||||
114 WARNING "Unable to set worker thread {0} name to {1}; cause {2}.")
|
||||
(WORK_QUEUE_REQUEST_WORK_NO_WORK_FOUND
|
||||
116 WARNING "Ignoring unexpected {0} when retrieving of work from work queue, {1}.")
|
||||
(THREAD_POOL_CLOSE_ERROR 126 WARNING "Error in closing ThreadPool")
|
||||
(THREAD_GROUP_IS_DESTROYED 127 WARNING "ThreadGroup {0} is already destroyed: can't destroy it")
|
||||
(THREAD_GROUP_HAS_ACTIVE_THREADS_IN_CLOSE 128 WARNING "ThreadGroup {0} has {1} active threads: destroy may cause exception")
|
||||
(THREAD_GROUP_HAS_SUB_GROUPS_IN_CLOSE 129 WARNING "ThreadGroup {0} has {1} sub-thread groups: destroy may cause exception")
|
||||
(THREAD_GROUP_DESTROY_FAILED 130 WARNING "ThreadGroup {0} could not be destroyed")
|
||||
(INTERRUPTED_JOIN_CALL_WHILE_CLOSING_THREAD_POOL 131 WARNING "Join was interrupted on thread {0} while closing ThreadPool {1}")
|
||||
)
|
||||
|
||||
(MARSHAL
|
||||
(CHUNK_OVERFLOW 1 WARNING "Data read past end of chunk without closing the chunk")
|
||||
(UNEXPECTED_EOF 2 WARNING "Grow buffer strategy called underflow handler")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package com.sun.corba.se.spi.monitoring;
|
||||
|
||||
import java.io.Closeable;
|
||||
import com.sun.corba.se.spi.orb.ORB;
|
||||
import com.sun.corba.se.spi.monitoring.MonitoredObject;
|
||||
import java.util.*;
|
||||
@@ -39,7 +40,7 @@ import java.util.*;
|
||||
* @author Hemanth Puttaswamy
|
||||
* </p>
|
||||
*/
|
||||
public interface MonitoringManager {
|
||||
public interface MonitoringManager extends Closeable {
|
||||
|
||||
///////////////////////////////////////
|
||||
// operations
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,4 +40,6 @@ public interface MonitoringManagerFactory {
|
||||
*/
|
||||
MonitoringManager createMonitoringManager( String nameOfTheRoot,
|
||||
String description );
|
||||
|
||||
void remove(String nameOfTheRoot);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -171,7 +171,7 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||
|
||||
private static Map staticWrapperMap = new ConcurrentHashMap();
|
||||
|
||||
private MonitoringManager monitoringManager;
|
||||
protected MonitoringManager monitoringManager;
|
||||
|
||||
// There is only one instance of the PresentationManager
|
||||
// that is shared between all ORBs. This is necessary
|
||||
@@ -226,6 +226,14 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||
globalPM.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
wrapper = null;
|
||||
omgWrapper = null;
|
||||
typeCodeMap = null;
|
||||
primitiveTypeCodeConstants = null;
|
||||
byteBufferPool = null;
|
||||
}
|
||||
|
||||
/** Get the single instance of the PresentationManager
|
||||
*/
|
||||
public static PresentationManager getPresentationManager()
|
||||
@@ -302,6 +310,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||
// Typecode support: needed in both ORBImpl and ORBSingleton
|
||||
public TypeCodeImpl get_primitive_tc(int kind)
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
try {
|
||||
return primitiveTypeCodeConstants[kind] ;
|
||||
} catch (Throwable t) {
|
||||
@@ -311,15 +322,20 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||
|
||||
public synchronized void setTypeCode(String id, TypeCodeImpl code)
|
||||
{
|
||||
checkShutdownState();
|
||||
typeCodeMap.put(id, code);
|
||||
}
|
||||
|
||||
public synchronized TypeCodeImpl getTypeCode(String id)
|
||||
{
|
||||
checkShutdownState();
|
||||
return (TypeCodeImpl)typeCodeMap.get(id);
|
||||
}
|
||||
|
||||
public MonitoringManager getMonitoringManager( ) {
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
return monitoringManager;
|
||||
}
|
||||
|
||||
@@ -434,6 +450,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||
*/
|
||||
public Logger getLogger( String domain )
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
ORBData odata = getORBData() ;
|
||||
|
||||
// Determine the correct ORBId. There are 3 cases:
|
||||
@@ -510,6 +529,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
|
||||
// This method must also be inherited by both ORB and ORBSingleton.
|
||||
public ByteBufferPool getByteBufferPool()
|
||||
{
|
||||
synchronized (this) {
|
||||
checkShutdownState();
|
||||
}
|
||||
if (byteBufferPool == null)
|
||||
byteBufferPool = new ByteBufferPoolImpl(this);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,9 +25,15 @@
|
||||
|
||||
package com.sun.corba.se.spi.orbutil.threadpool;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public interface ThreadPool
|
||||
/** This interface defines a thread pool execution service. The ORB uses this
|
||||
* interface, which preceeds the JDK 5 ExecutorService. Note that the close
|
||||
* method must be called in order to reclaim thread resources.
|
||||
*/
|
||||
public interface ThreadPool extends Closeable
|
||||
{
|
||||
|
||||
/**
|
||||
* This method will return any instance of the WorkQueue. If the ThreadPool
|
||||
* instance only services one WorkQueue then that WorkQueue instance will
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,7 +25,9 @@
|
||||
|
||||
package com.sun.corba.se.spi.orbutil.threadpool;
|
||||
|
||||
public interface ThreadPoolManager
|
||||
import java.io.Closeable;
|
||||
|
||||
public interface ThreadPoolManager extends Closeable
|
||||
{
|
||||
/**
|
||||
* This method will return an instance of the threadpool given a threadpoolId,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
package com.sun.corba.se.spi.protocol;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
|
||||
import org.omg.PortableInterceptor.Interceptor ;
|
||||
import org.omg.PortableInterceptor.Current ;
|
||||
@@ -51,7 +53,7 @@ import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage ;
|
||||
/** This interface defines the PI interface that is used to interface the rest of the
|
||||
* ORB to the PI implementation.
|
||||
*/
|
||||
public interface PIHandler {
|
||||
public interface PIHandler extends Closeable {
|
||||
/** Complete the initialization of the PIHandler. This will execute the methods
|
||||
* on the ORBInitializers, if any are defined. This must be done here so that
|
||||
* the ORB can obtain the PIHandler BEFORE the ORBInitializers run, since they
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -37,33 +37,59 @@ import com.sun.corba.se.spi.oa.ObjectAdapterFactory ;
|
||||
* This is a registry of all subcontract ID dependent objects. This includes:
|
||||
* LocalClientRequestDispatcherFactory, ClientRequestDispatcher, ServerRequestDispatcher, and
|
||||
* ObjectAdapterFactory.
|
||||
* XXX Should the registerXXX methods take an scid or not? I think we
|
||||
* want to do this so that the same instance can be shared across multiple
|
||||
* scids (and this is already true for ObjectAdapterFactory and LocalClientRequestDispatcherFactory),
|
||||
* but this will require some changes for ClientRequestDispatcher and ServerRequestDispatcher.
|
||||
*/
|
||||
public interface RequestDispatcherRegistry {
|
||||
// XXX needs javadocs!
|
||||
|
||||
/** Register a ClientRequestDispatcher for a particular subcontract ID.
|
||||
* The subcontract ID appears in the ObjectKey of an object reference, and is used
|
||||
* to control how a remote method invocation is processed by the ORB for a
|
||||
* particular kind of object reference.
|
||||
*/
|
||||
void registerClientRequestDispatcher( ClientRequestDispatcher csc, int scid) ;
|
||||
|
||||
/** Get the ClientRequestDispatcher for subcontract ID scid.
|
||||
*/
|
||||
ClientRequestDispatcher getClientRequestDispatcher( int scid ) ;
|
||||
|
||||
/** Register a LocalClientRequestDispatcher for a particular subcontract ID.
|
||||
* The subcontract ID appears in the ObjectKey of an object reference, and is used
|
||||
* to control how a particular kind of colocated request is processed.
|
||||
*/
|
||||
void registerLocalClientRequestDispatcherFactory( LocalClientRequestDispatcherFactory csc, int scid) ;
|
||||
|
||||
/** Get the LocalClientRequestDispatcher for subcontract ID scid.
|
||||
*/
|
||||
LocalClientRequestDispatcherFactory getLocalClientRequestDispatcherFactory( int scid ) ;
|
||||
|
||||
/** Register a CorbaServerRequestDispatcher for a particular subcontract ID.
|
||||
* The subcontract ID appears in the ObjectKey of an object reference, and is used
|
||||
* to control how a particular kind of request is processed when received by the ORB.
|
||||
*/
|
||||
void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, int scid) ;
|
||||
|
||||
/** Get the CorbaServerRequestDispatcher for subcontract ID scid.
|
||||
*/
|
||||
CorbaServerRequestDispatcher getServerRequestDispatcher(int scid) ;
|
||||
|
||||
/** Register a CorbaServerRequestDispatcher for handling an explicit object key name.
|
||||
* This is used for non-standard invocations such as INS and the bootstrap name service.
|
||||
*/
|
||||
void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, String name ) ;
|
||||
|
||||
/** Get the CorbaServerRequestDispatcher for a particular object key.
|
||||
*/
|
||||
CorbaServerRequestDispatcher getServerRequestDispatcher( String name ) ;
|
||||
|
||||
/** Register an ObjectAdapterFactory for a particular subcontract ID.
|
||||
* This controls how Object references are created and managed.
|
||||
*/
|
||||
void registerObjectAdapterFactory( ObjectAdapterFactory oaf, int scid) ;
|
||||
|
||||
/** Get the ObjectAdapterFactory for a particular subcontract ID scid.
|
||||
*/
|
||||
ObjectAdapterFactory getObjectAdapterFactory( int scid ) ;
|
||||
|
||||
Set getObjectAdapterFactories() ;
|
||||
/** Return the set of all ObjectAdapterFactory instances that are registered.
|
||||
*/
|
||||
Set<ObjectAdapterFactory> getObjectAdapterFactories();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -138,7 +138,7 @@ public abstract class _CodeBaseImplBase extends org.omg.CORBA.portable.ObjectImp
|
||||
|
||||
public String[] _ids ()
|
||||
{
|
||||
return __ids;
|
||||
return (String[]) __ids.clone();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -71,6 +71,34 @@ public class IDLNames implements sun.rmi.rmic.iiop.Constants {
|
||||
(byte)'F',
|
||||
};
|
||||
|
||||
// Legal IDL Identifier characters (1 = legal). Note
|
||||
// that '.' (2E) is marked as legal even though it is
|
||||
// not legal in IDL. This allows us to treat a fully
|
||||
// qualified Java name with '.' package separators
|
||||
// uniformly, and is safe because that is the only
|
||||
// legal use of '.' in a Java name.
|
||||
|
||||
private static final byte[] IDL_IDENTIFIER_CHARS = {
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 10-1f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // 20-2f
|
||||
1,1,1,1, 1,1,1,1, 1,1,0,0, 0,0,0,0, // 30-3f
|
||||
0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 40-4f
|
||||
1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,1, // 50-5f
|
||||
0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 60-6f
|
||||
1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0, // 70-7f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 80-8f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 90-9f
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // a0-af
|
||||
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // b0-bf
|
||||
1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // c0-cf
|
||||
0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // d0-df
|
||||
1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // e0-ef
|
||||
0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // f0-ff
|
||||
};
|
||||
|
||||
//_____________________________________________________________________
|
||||
// Public Interfaces
|
||||
//_____________________________________________________________________
|
||||
@@ -139,7 +167,7 @@ public class IDLNames implements sun.rmi.rmic.iiop.Constants {
|
||||
result = replace(result,"x\\U","U");
|
||||
|
||||
// Now see if we have any remaining illegal characters (see
|
||||
// RepositoryId.IDL_IDENTIFIER_CHARS array)...
|
||||
// IDL_IDENTIFIER_CHARS array)...
|
||||
|
||||
int length = result.length();
|
||||
StringBuffer buffer = null;
|
||||
@@ -148,7 +176,7 @@ public class IDLNames implements sun.rmi.rmic.iiop.Constants {
|
||||
|
||||
char c = result.charAt(i);
|
||||
|
||||
if (c > 255 || RepositoryId.IDL_IDENTIFIER_CHARS[c] == 0) {
|
||||
if (c > 255 || IDL_IDENTIFIER_CHARS[c] == 0) {
|
||||
|
||||
// We gotta convert. Have we already started?
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user