mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-04 15:41:38 +01:00
Compare commits
745 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05b129ec25 | ||
|
|
589e1177ef | ||
|
|
3522b53f7b | ||
|
|
c71bc3581a | ||
|
|
74827c6a87 | ||
|
|
2c73c97dd0 | ||
|
|
dca38708e5 | ||
|
|
ce2fbabb94 | ||
|
|
f02372f4fc | ||
|
|
cfb102ab89 | ||
|
|
3bd3094c88 | ||
|
|
feea6b06c3 | ||
|
|
3caefcab66 | ||
|
|
b45137814b | ||
|
|
4c7f1ac52c | ||
|
|
ec605aa039 | ||
|
|
ef24e174a4 | ||
|
|
771a76dd9e | ||
|
|
2ca067436f | ||
|
|
19ea0009a6 | ||
|
|
88af1f11ee | ||
|
|
d76f461144 | ||
|
|
e5a5c2a832 | ||
|
|
47a8c7c889 | ||
|
|
0940f438aa | ||
|
|
f5578ab220 | ||
|
|
acb3103b8f | ||
|
|
fc927f60c3 | ||
|
|
3a7f72200c | ||
|
|
8994d5ad0e | ||
|
|
7bdcc7ea89 | ||
|
|
9f1e654058 | ||
|
|
f74d0aef61 | ||
|
|
8280624a5f | ||
|
|
0628437ecc | ||
|
|
64bf300bf6 | ||
|
|
b66ffad152 | ||
|
|
562b3c4393 | ||
|
|
516fa74ca5 | ||
|
|
ae966db198 | ||
|
|
f52ea8839e | ||
|
|
d4941f14af | ||
|
|
8c60a48bc2 | ||
|
|
ffac9ae61c | ||
|
|
6744ceac88 | ||
|
|
de3604ea0c | ||
|
|
f439f2166b | ||
|
|
58ff4ee8c4 | ||
|
|
5daba498e4 | ||
|
|
539c0ad417 | ||
|
|
10ced3a050 | ||
|
|
d88408c75b | ||
|
|
10b29b4ca8 | ||
|
|
0cfa66ddce | ||
|
|
11fc5a4d73 | ||
|
|
f0cd136c74 | ||
|
|
54b1510aa7 | ||
|
|
5c55118223 | ||
|
|
1926d24306 | ||
|
|
b86d96a381 | ||
|
|
6ec6080397 | ||
|
|
457efdbfca | ||
|
|
65113c9136 | ||
|
|
b0b8a51be1 | ||
|
|
798b830ad8 | ||
|
|
23ede624d8 | ||
|
|
ff223cc1ee | ||
|
|
7152a20473 | ||
|
|
97a42c860f | ||
|
|
daea65318e | ||
|
|
4ee1b63881 | ||
|
|
72628783c5 | ||
|
|
605827c671 | ||
|
|
c866d037bc | ||
|
|
254138139f | ||
|
|
50484af54b | ||
|
|
68b1b6c580 | ||
|
|
3fb8a072a1 | ||
|
|
2c4466755b | ||
|
|
eb36e850a5 | ||
|
|
42f6751d6f | ||
|
|
366192f502 | ||
|
|
dd5043a7d6 | ||
|
|
4a0424f9bf | ||
|
|
b46b19cb58 | ||
|
|
8bb3dc6619 | ||
|
|
cf0e82688b | ||
|
|
c37c87b388 | ||
|
|
61aa187aaf | ||
|
|
889a041f22 | ||
|
|
1deb2a7bd5 | ||
|
|
1780fdeae7 | ||
|
|
ff76e20be8 | ||
|
|
ebbacc188e | ||
|
|
b01af2b4bf | ||
|
|
4166d0663c | ||
|
|
5b02a98b21 | ||
|
|
5f52842c26 | ||
|
|
f62bc01efe | ||
|
|
ea6bd4c0ec | ||
|
|
3d4edcc571 | ||
|
|
a131e1668f | ||
|
|
af7782b1a0 | ||
|
|
28e38031a2 | ||
|
|
d3e24d6682 | ||
|
|
dfb4b0979b | ||
|
|
9995861868 | ||
|
|
d4d8c255b2 | ||
|
|
3e166182e0 | ||
|
|
be7644263d | ||
|
|
9f72c07d5a | ||
|
|
68c6ef69de | ||
|
|
522a9d15fd | ||
|
|
c43cebb5cf | ||
|
|
08ad8da3f7 | ||
|
|
6a37cbc50c | ||
|
|
155a105d79 | ||
|
|
2cf53991cd | ||
|
|
7a762e0598 | ||
|
|
b64d0ef66d | ||
|
|
f3ae7d1bd9 | ||
|
|
77d0099725 | ||
|
|
5e529f5d62 | ||
|
|
b4beeae554 | ||
|
|
fa4abe66dd | ||
|
|
354249f51e | ||
|
|
d7765d9002 | ||
|
|
e8a9982ea6 | ||
|
|
60ce64e54a | ||
|
|
28342b55f9 | ||
|
|
d0ec59a9fb | ||
|
|
d381c82162 | ||
|
|
ec495ebede | ||
|
|
5a7aff9897 | ||
|
|
17b8a043c4 | ||
|
|
5db337db24 | ||
|
|
3a03cd060f | ||
|
|
b4d4d8f66c | ||
|
|
c68e276b0d | ||
|
|
789e437e6c | ||
|
|
95b1eef0da | ||
|
|
89d8e788f5 | ||
|
|
23c15b8f4c | ||
|
|
3414903aba | ||
|
|
dc42a2bab5 | ||
|
|
794133c11b | ||
|
|
98c77d44de | ||
|
|
1392d4b80f | ||
|
|
3dfe4d61b3 | ||
|
|
3e7c7c6cdf | ||
|
|
e23e30e61b | ||
|
|
a2818d9625 | ||
|
|
14c85c2934 | ||
|
|
cddf0c19ae | ||
|
|
6d207011e0 | ||
|
|
03dfb66004 | ||
|
|
56dea21da2 | ||
|
|
851718cee4 | ||
|
|
c5df5c1f0b | ||
|
|
cb275ca384 | ||
|
|
22000aa73b | ||
|
|
3b8d9ef239 | ||
|
|
d078a3f091 | ||
|
|
d2ce0ae7d4 | ||
|
|
69af907cee | ||
|
|
843a9abbce | ||
|
|
47176b1cee | ||
|
|
2a3b12aec8 | ||
|
|
d2e6289c0b | ||
|
|
703621f15f | ||
|
|
1739105160 | ||
|
|
16a61139e2 | ||
|
|
9093953813 | ||
|
|
13dd8888d2 | ||
|
|
3918ed17a5 | ||
|
|
6fc221df4d | ||
|
|
2471caab08 | ||
|
|
03c754baa0 | ||
|
|
22ba8afbe7 | ||
|
|
073257906c | ||
|
|
83256c19ee | ||
|
|
f0499d1caa | ||
|
|
75d088ecc4 | ||
|
|
b9b29cb3d6 | ||
|
|
4b482389bf | ||
|
|
083a22d87c | ||
|
|
c1359ec107 | ||
|
|
809315bdd1 | ||
|
|
2fb89326ba | ||
|
|
38dcf9fdf1 | ||
|
|
5b53102c9e | ||
|
|
1bb8fd058c | ||
|
|
052e9233e2 | ||
|
|
56d737d8c7 | ||
|
|
3ad60c1bd2 | ||
|
|
5671589a10 | ||
|
|
5f4f3883d8 | ||
|
|
f408526f30 | ||
|
|
a98b4ecb5c | ||
|
|
bd70c72fd2 | ||
|
|
380a8b15ec | ||
|
|
713858f459 | ||
|
|
d3d2bc3228 | ||
|
|
432a71e564 | ||
|
|
13999ec96e | ||
|
|
74cbe9d441 | ||
|
|
b8ab854bdc | ||
|
|
7cb9e5821e | ||
|
|
31dabd4d7f | ||
|
|
4b6ab35c85 | ||
|
|
6287aead09 | ||
|
|
cb29fa0380 | ||
|
|
2fe174d6b2 | ||
|
|
89cb6a90d2 | ||
|
|
6df55e9a7d | ||
|
|
f42b8e4a00 | ||
|
|
f7d02bbaf0 | ||
|
|
d4c69026bf | ||
|
|
2591c21c01 | ||
|
|
c37e80c84f | ||
|
|
2a8c2ece43 | ||
|
|
6196bf4ee1 | ||
|
|
fcf6408e6c | ||
|
|
f98720e441 | ||
|
|
9e4f91707b | ||
|
|
04b8b8deff | ||
|
|
c2859d192d | ||
|
|
b5c20a6e1c | ||
|
|
4aa85f9489 | ||
|
|
d8dc99ec5c | ||
|
|
42dc61aad0 | ||
|
|
7578044e71 | ||
|
|
c6109771f1 | ||
|
|
6f44bbc940 | ||
|
|
0b6f8bb24a | ||
|
|
3715cbe450 | ||
|
|
b6a2f5517e | ||
|
|
d78e0978af | ||
|
|
e1f8cacc0b | ||
|
|
9b23b4f128 | ||
|
|
3f5b571b5a | ||
|
|
5d3e5d9275 | ||
|
|
3e28c2f71d | ||
|
|
aa9cf33c1e | ||
|
|
8f56ea639d | ||
|
|
ced92116db | ||
|
|
9f9f7ec458 | ||
|
|
62ec6e6d1d | ||
|
|
2af1df8c10 | ||
|
|
d4cf0ebee8 | ||
|
|
4bb064c62d | ||
|
|
cfe9ad4608 | ||
|
|
b2ed2bda60 | ||
|
|
f23f23fc76 | ||
|
|
5ccc696fd2 | ||
|
|
c0dadb27ea | ||
|
|
16f2a0e7a0 | ||
|
|
25da45e26f | ||
|
|
004b22e401 | ||
|
|
fc9a7d12a8 | ||
|
|
90b572b0c9 | ||
|
|
ddf6846500 | ||
|
|
ac45567657 | ||
|
|
cff8ccbcf7 | ||
|
|
eab5dab516 | ||
|
|
4ea684bf31 | ||
|
|
bdc7ee1a5d | ||
|
|
8a170b8042 | ||
|
|
93138c756e | ||
|
|
a76221f5a7 | ||
|
|
a95d50a5fc | ||
|
|
10ef2cd87c | ||
|
|
d057334330 | ||
|
|
e27aca5e99 | ||
|
|
0b78370b74 | ||
|
|
fc3364785a | ||
|
|
eb9d86fff1 | ||
|
|
739c973204 | ||
|
|
48b9835669 | ||
|
|
edb1509a0e | ||
|
|
f6ca24c05f | ||
|
|
abb7e3a52a | ||
|
|
f74677e37e | ||
|
|
a74437edc9 | ||
|
|
e2f49705aa | ||
|
|
dc06e6553a | ||
|
|
01353e7787 | ||
|
|
f47021e2ab | ||
|
|
d851dd077b | ||
|
|
26712bcb1b | ||
|
|
128f91288c | ||
|
|
fa933f3971 | ||
|
|
2a4d4b43b4 | ||
|
|
d41cbf61a1 | ||
|
|
50f6694f00 | ||
|
|
b8689741ec | ||
|
|
06a9e1a72f | ||
|
|
2c5a0835a9 | ||
|
|
ff6a245d89 | ||
|
|
51ab999e0e | ||
|
|
023fc4b866 | ||
|
|
1087d69b46 | ||
|
|
eb3ec99500 | ||
|
|
4f8c5b6949 | ||
|
|
347c253452 | ||
|
|
f2c21c058d | ||
|
|
5287d9a366 | ||
|
|
8241f85b85 | ||
|
|
7e1c60b79b | ||
|
|
03af65fa7d | ||
|
|
899b64249c | ||
|
|
36449e6c30 | ||
|
|
114e61d126 | ||
|
|
e447371492 | ||
|
|
6e70a69893 | ||
|
|
c3893b01c1 | ||
|
|
4faf9a2199 | ||
|
|
95d34d138d | ||
|
|
b9bc9f0be8 | ||
|
|
d050bedee8 | ||
|
|
bc472b0530 | ||
|
|
1a839d0882 | ||
|
|
7d1735efbb | ||
|
|
6be7841937 | ||
|
|
b962c75f25 | ||
|
|
08193e2dfb | ||
|
|
f1540011d0 | ||
|
|
f3fc38d5f5 | ||
|
|
2606b1f985 | ||
|
|
0bf8fa1855 | ||
|
|
28c9fe47bc | ||
|
|
98a4315c72 | ||
|
|
276e1da447 | ||
|
|
b085ebe7b7 | ||
|
|
17fe1b7ec7 | ||
|
|
91105a9a52 | ||
|
|
6842f2f659 | ||
|
|
acd1f4797f | ||
|
|
4e971f5455 | ||
|
|
13aaf94964 | ||
|
|
1b12333f8f | ||
|
|
dcabd45c6c | ||
|
|
0977b752ff | ||
|
|
29dd30e010 | ||
|
|
8cf755c120 | ||
|
|
6ef9800875 | ||
|
|
30d35b2854 | ||
|
|
9ab1b854ca | ||
|
|
7c3b34ae81 | ||
|
|
a7b3a19ec4 | ||
|
|
bf480bcbfe | ||
|
|
cc873b716f | ||
|
|
b1c09c22bb | ||
|
|
f9b19eb874 | ||
|
|
b6c2b234ef | ||
|
|
987c3a2d87 | ||
|
|
9beff15bed | ||
|
|
7daf655c16 | ||
|
|
7c4ed0b15b | ||
|
|
02dce3adac | ||
|
|
0e2519d28f | ||
|
|
9d59a4c2cc | ||
|
|
147e4f3054 | ||
|
|
514930360f | ||
|
|
55b32f6b41 | ||
|
|
45f751f518 | ||
|
|
845f7823de | ||
|
|
0e83ce1738 | ||
|
|
80e322bbcc | ||
|
|
541978b4a2 | ||
|
|
8f24dc87b1 | ||
|
|
749ad1ee03 | ||
|
|
3c9dfe26ed | ||
|
|
efeaca8cda | ||
|
|
4932677ba4 | ||
|
|
4ce3f37ba2 | ||
|
|
a25a95120e | ||
|
|
789e827f1a | ||
|
|
5c19524622 | ||
|
|
934390b571 | ||
|
|
8d72dcd040 | ||
|
|
553380e693 | ||
|
|
7d7c653abf | ||
|
|
bc690b263b | ||
|
|
a0382a29e5 | ||
|
|
f187ff88ae | ||
|
|
75ab2501f7 | ||
|
|
4779c85b46 | ||
|
|
eeaf00be4f | ||
|
|
d26069837f | ||
|
|
c9757ad448 | ||
|
|
8abc2c38f7 | ||
|
|
b68ed88ffb | ||
|
|
60f417575e | ||
|
|
751fa92e41 | ||
|
|
d5ec9dbfb5 | ||
|
|
b0cb59ac31 | ||
|
|
0e1817736c | ||
|
|
9caf4aeb12 | ||
|
|
7f25db6e5f | ||
|
|
69c57791a4 | ||
|
|
dd416bbf33 | ||
|
|
41ace19206 | ||
|
|
48f208f193 | ||
|
|
34480e526e | ||
|
|
ba9f9457dd | ||
|
|
2f74993973 | ||
|
|
b3597efef7 | ||
|
|
0279b2d49a | ||
|
|
40f004ad8c | ||
|
|
2f8f0b23cd | ||
|
|
b44023eb8d | ||
|
|
167d81a718 | ||
|
|
9f0da6d94f | ||
|
|
8dcabfdf5f | ||
|
|
ca8a2aceed | ||
|
|
e3b7698786 | ||
|
|
48aad3bd2f | ||
|
|
e7f7bcdb06 | ||
|
|
0a40080ee1 | ||
|
|
683817de43 | ||
|
|
999168d66b | ||
|
|
b53c31d599 | ||
|
|
982d2dc7de | ||
|
|
6d85cafef2 | ||
|
|
7a6b695959 | ||
|
|
ffdfd48fd2 | ||
|
|
8deac7d09b | ||
|
|
6ff900807d | ||
|
|
5f7839ae5a | ||
|
|
d7dd9d1027 | ||
|
|
44ab590f44 | ||
|
|
6f98c021d1 | ||
|
|
753e4ed499 | ||
|
|
7f04dec594 | ||
|
|
897d228899 | ||
|
|
24ae32f082 | ||
|
|
3c2d19f0bc | ||
|
|
b7c0ee5812 | ||
|
|
a0b36d2293 | ||
|
|
a4630a5b3b | ||
|
|
6494aaaee7 | ||
|
|
9eb320a418 | ||
|
|
e5131d5ceb | ||
|
|
38e8a07f05 | ||
|
|
2bf1bf3afb | ||
|
|
1c318a676e | ||
|
|
831b32b2a9 | ||
|
|
0db8f238af | ||
|
|
333333a507 | ||
|
|
3138724d05 | ||
|
|
3e53369eb8 | ||
|
|
073cfe14a5 | ||
|
|
04944778bf | ||
|
|
0b8689b331 | ||
|
|
89c2e03b1d | ||
|
|
dff176cc84 | ||
|
|
80f4b22956 | ||
|
|
92ee8dfe8a | ||
|
|
7052a83930 | ||
|
|
ae133c49b5 | ||
|
|
83bb2205e8 | ||
|
|
191a1f80a1 | ||
|
|
5f7d996632 | ||
|
|
1335ebada2 | ||
|
|
f2a5dad023 | ||
|
|
17dd36e4c9 | ||
|
|
94aa298a46 | ||
|
|
085c643eec | ||
|
|
414e05f6d7 | ||
|
|
0584441390 | ||
|
|
00b3f917ac | ||
|
|
5dc2184391 | ||
|
|
ea5f35759b | ||
|
|
aa51ac19b3 | ||
|
|
697c3fc073 | ||
|
|
482ff9cfdf | ||
|
|
69287b5b99 | ||
|
|
7d09a4bc83 | ||
|
|
5e9d4e4eaf | ||
|
|
f8db247cde | ||
|
|
317bef9a41 | ||
|
|
2b3d492b43 | ||
|
|
c2735a15d7 | ||
|
|
ce205655fe | ||
|
|
672ddf57fc | ||
|
|
b1723061be | ||
|
|
7baa56621e | ||
|
|
f5b63e9852 | ||
|
|
c971362aa0 | ||
|
|
fec9d472e3 | ||
|
|
0b40438ae8 | ||
|
|
4b5ffe70d9 | ||
|
|
2f7bcc872f | ||
|
|
783894f2f7 | ||
|
|
46d5554295 | ||
|
|
967599181a | ||
|
|
bbb4bcd69d | ||
|
|
35a7cc10b7 | ||
|
|
8d78d1851e | ||
|
|
8641dcffca | ||
|
|
d46ebb546d | ||
|
|
bb337bd480 | ||
|
|
d6e9a698d0 | ||
|
|
aa1aec4b56 | ||
|
|
e4d034cf9a | ||
|
|
056c5059ae | ||
|
|
01a0105416 | ||
|
|
81a51d8c45 | ||
|
|
b9ecb2e95b | ||
|
|
9392abce27 | ||
|
|
4d25aec1b4 | ||
|
|
15541c4818 | ||
|
|
7bd0087f96 | ||
|
|
e6c7f041f9 | ||
|
|
cf8d43353f | ||
|
|
15ac25be9d | ||
|
|
6de0123fd7 | ||
|
|
f7a44a7d8a | ||
|
|
7568db027d | ||
|
|
4567ed7c3e | ||
|
|
dd61a0c90d | ||
|
|
78de84bc1e | ||
|
|
7e5577a6c1 | ||
|
|
6d4be03205 | ||
|
|
739ca33412 | ||
|
|
49b87d7f72 | ||
|
|
cd31cb85e9 | ||
|
|
551a0d104f | ||
|
|
8dff4034fd | ||
|
|
e2620f3128 | ||
|
|
52841d639a | ||
|
|
7a13702c48 | ||
|
|
c0cb471231 | ||
|
|
8550a5c92d | ||
|
|
8275c3907b | ||
|
|
005ff62989 | ||
|
|
eb5804b42e | ||
|
|
3ee098f301 | ||
|
|
724d1916fe | ||
|
|
c1700dddf5 | ||
|
|
46051a71c6 | ||
|
|
ef6b063751 | ||
|
|
73388668cd | ||
|
|
73afc1dc4b | ||
|
|
a559c8b653 | ||
|
|
22762d1cdc | ||
|
|
15ecb4705f | ||
|
|
fc1b01b9a2 | ||
|
|
e332323760 | ||
|
|
1de9d061ec | ||
|
|
8f528fba93 | ||
|
|
60764aee2a | ||
|
|
284bf59656 | ||
|
|
94ecb77665 | ||
|
|
6b802a9513 | ||
|
|
f61a078bd2 | ||
|
|
869f9e2ed0 | ||
|
|
1655b15477 | ||
|
|
d771fc3a6b | ||
|
|
c19d18871c | ||
|
|
672ecb7266 | ||
|
|
aad1a3592c | ||
|
|
07c484a8a9 | ||
|
|
4c078f48da | ||
|
|
4825756a2b | ||
|
|
b69a95d78d | ||
|
|
ca1e762c1f | ||
|
|
99cb8d9af1 | ||
|
|
1c41d1d3e0 | ||
|
|
b0e4bce398 | ||
|
|
3be36b20e4 | ||
|
|
6e9f44c74c | ||
|
|
906712e7c8 | ||
|
|
0fb7dffb83 | ||
|
|
ceb48aba9b | ||
|
|
1da7dc6296 | ||
|
|
a0c0b250cd | ||
|
|
9465174f72 | ||
|
|
7ca917e9bd | ||
|
|
7f0f329daf | ||
|
|
f4c6bc0030 | ||
|
|
ac524f2837 | ||
|
|
cf61647c30 | ||
|
|
74ff5c6807 | ||
|
|
80fa8a7208 | ||
|
|
41a54f3f49 | ||
|
|
0255b84ad3 | ||
|
|
00993afe1a | ||
|
|
c5f5601b1c | ||
|
|
1cf8169a2e | ||
|
|
8379d6995a | ||
|
|
3e132d770d | ||
|
|
46c4af28a4 | ||
|
|
459909ddf3 | ||
|
|
fb8bca78ee | ||
|
|
49beab63c8 | ||
|
|
473e36a9f3 | ||
|
|
989b326949 | ||
|
|
f815c509cf | ||
|
|
a34fdd1809 | ||
|
|
5edc13c005 | ||
|
|
c025944b69 | ||
|
|
6fc52a47f9 | ||
|
|
de4aa804af | ||
|
|
7be1368ad8 | ||
|
|
1924909d78 | ||
|
|
8918acdc7a | ||
|
|
9c8adb8718 | ||
|
|
9e5bf18428 | ||
|
|
7030f25abd | ||
|
|
64e992633f | ||
|
|
c83a45ddf9 | ||
|
|
c8c8cd7238 | ||
|
|
7838184968 | ||
|
|
c7e601e911 | ||
|
|
d1750de1fc | ||
|
|
8df5a77e73 | ||
|
|
1209c4bcb3 | ||
|
|
d32979d771 | ||
|
|
6d1ca0d85a | ||
|
|
407df53824 | ||
|
|
b82f6aee37 | ||
|
|
2ba2b2f07b | ||
|
|
4233e28ee3 | ||
|
|
5092eae913 | ||
|
|
03c717a5a9 | ||
|
|
84d83a6998 | ||
|
|
dfb6247815 | ||
|
|
61592ca6fa | ||
|
|
c54ef2b296 | ||
|
|
add0d817f5 | ||
|
|
ebd77628a4 | ||
|
|
647501969f | ||
|
|
c6bbed9592 | ||
|
|
8f739404a7 | ||
|
|
01ab4faae4 | ||
|
|
0d68fdfec3 | ||
|
|
5cfe75dd1a | ||
|
|
4a79a36b6d | ||
|
|
f06ebe9b3a | ||
|
|
47158e4313 | ||
|
|
a755f466eb | ||
|
|
e1069d367d | ||
|
|
691eb78732 | ||
|
|
b1bede0343 | ||
|
|
5dee8bee72 | ||
|
|
6a80c5906f | ||
|
|
bc0b016989 | ||
|
|
8e4276d628 | ||
|
|
64cef020e7 | ||
|
|
3e0afd207d | ||
|
|
755fa4beb7 | ||
|
|
7cd32cad89 | ||
|
|
fb9db6b02d | ||
|
|
038b5f571c | ||
|
|
3851e0e030 | ||
|
|
c4f1bb0019 | ||
|
|
ede41aa311 | ||
|
|
bc5ee0f53c | ||
|
|
1a5f4b8fa2 | ||
|
|
b9ff3a75b7 | ||
|
|
9ecafd93f5 | ||
|
|
d60ccd7c4c | ||
|
|
90060a97f9 | ||
|
|
b2deecf8e4 | ||
|
|
168e8b2abe | ||
|
|
28f0646ef1 | ||
|
|
853ed9b9e3 | ||
|
|
e8fc01629a | ||
|
|
2486e0815b | ||
|
|
96eb1f1fdd | ||
|
|
75c57161f1 | ||
|
|
b2de114d80 | ||
|
|
676fd0e040 | ||
|
|
3ea843adfe | ||
|
|
91a2daa9a2 | ||
|
|
1f15d2bb46 | ||
|
|
ada54c7d1a | ||
|
|
0cd7cb821a | ||
|
|
77eb30dae3 | ||
|
|
3b3ebcd097 | ||
|
|
9726143563 | ||
|
|
a2000f8720 | ||
|
|
df559fe00e | ||
|
|
d417fc4af1 | ||
|
|
257f4fccd0 | ||
|
|
808189636a | ||
|
|
114c1a7a69 | ||
|
|
670ac3b236 | ||
|
|
1c4fcc1627 | ||
|
|
c7421b5e3b | ||
|
|
1d0acb189a | ||
|
|
f01d0f469c | ||
|
|
12a45fe7f8 | ||
|
|
dd8b189097 | ||
|
|
4db5d786b7 | ||
|
|
47bbcac667 | ||
|
|
e817cd88c1 | ||
|
|
e55a05957d | ||
|
|
52d3bf29b2 | ||
|
|
2cb1917bac | ||
|
|
7660d97e2e | ||
|
|
0a10af4b06 | ||
|
|
255a2fb119 | ||
|
|
9ab8cd5bc2 | ||
|
|
d679703c0b | ||
|
|
39c3127dc1 | ||
|
|
ae9a3ef830 | ||
|
|
72b9968396 | ||
|
|
4f190cacf6 | ||
|
|
5672dfedd4 | ||
|
|
b2609808df | ||
|
|
48e6e1e6c4 | ||
|
|
e9b04293e3 | ||
|
|
463f07b41a | ||
|
|
6f1c27a2c9 | ||
|
|
2d847b1eb6 | ||
|
|
490d2ce747 | ||
|
|
0ddc8c6900 | ||
|
|
c139d774ba | ||
|
|
8ccf366ee6 | ||
|
|
25515e11c8 | ||
|
|
23d7131895 | ||
|
|
0b97a1bcbe | ||
|
|
97d777c85f | ||
|
|
e52d643ff5 | ||
|
|
a738a4c053 | ||
|
|
1a25bbdf0f | ||
|
|
a400b9417f | ||
|
|
fff718badb | ||
|
|
a3cb6e9204 | ||
|
|
dcb4e73a38 | ||
|
|
99725d3ea6 | ||
|
|
71a40bce38 | ||
|
|
20dfdc0720 | ||
|
|
c43b98c1ff | ||
|
|
7c6a67a268 | ||
|
|
e1356ec6cf | ||
|
|
3c2e5acfce | ||
|
|
027d478e6d | ||
|
|
3a7a71981a | ||
|
|
27cf4b91d1 | ||
|
|
e8a8207852 | ||
|
|
af5670373e |
12
.hgtags
12
.hgtags
@@ -460,9 +460,19 @@ a2008587c13fa05fa2dbfcb09fe987576fbedfd1 jdk-10+32
|
||||
bbd692ad4fa300ecca7939ffbe3b1d5e52a28cc6 jdk-10+33
|
||||
89deac44e51517841491ba86ff44aa82a5ca96b3 jdk-10+34
|
||||
d8c634b016c628622c9abbdc6bf50509e5dedbec jdk-10+35
|
||||
cb54a299aa91419cb7caef3992592e7b22488163 jdk-10+36
|
||||
0ee20aad71c4f33c426372b4c8bcc1235ce2ec08 jdk-11+0
|
||||
959f2f7cbaa6d2ee45d50029744efb219721576c jdk-10+36
|
||||
4f830b447edf04fb4a52151a5ad44d9bb60723cd jdk-10+37
|
||||
e569e83139fdfbecfeb3cd9014d560917787f158 jdk-10+38
|
||||
5b834ec962366e00d4445352a999a3ac14e26f64 jdk-10+39
|
||||
860326263d1f6a83996d7da0f4c66806ae4aa1eb jdk-10+40
|
||||
3eae36c6baa5f916a3024cf1513e22357e00185d jdk-10+41
|
||||
4b62b815b4f49970b91a952929cf50115c263cb3 jdk-10+42
|
||||
107413b070b92c88bde6230ceb4a19b579781068 jdk-10+43
|
||||
dfa46cfe56346884a61efdc30dc50f7505d66761 jdk-11+1
|
||||
03ae177c26b016353e5ea1cab6ffd051dfa086ca jdk-11+2
|
||||
663f20fc51091bd7f95d18448850ba091207b7bd jdk-10+44
|
||||
4f96cf952e71cb8a127334494faf28880c26181b jdk-10+45
|
||||
1fd4d6068f54561cfc67d54fc9ca84af7212c4f8 jdk-11+3
|
||||
e59941f7247d451fa7df9eaef3fce0f492f8420c jdk-11+4
|
||||
d5c43e9f08fb9a7c74aae0d48daf17f2ad2afaef jdk-11+5
|
||||
|
||||
48
bin/idea.sh
48
bin/idea.sh
@@ -30,9 +30,10 @@ usage() {
|
||||
}
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
PWD=`pwd`
|
||||
#assume TOP is the dir from which the script has been called
|
||||
TOP=`pwd`
|
||||
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
|
||||
cd ../; TOP=`pwd`; cd $PWD
|
||||
cd $TOP;
|
||||
|
||||
IDEA_OUTPUT=$TOP/.idea
|
||||
VERBOSE="false"
|
||||
@@ -66,30 +67,42 @@ done
|
||||
mkdir $IDEA_OUTPUT || exit 1
|
||||
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||
|
||||
IDEA_MAKE="$TOP/make/idea"
|
||||
MAKE_DIR="$SCRIPT_DIR/../make"
|
||||
IDEA_MAKE="$MAKE_DIR/idea"
|
||||
IDEA_TEMPLATE="$IDEA_MAKE/template"
|
||||
IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml"
|
||||
ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml"
|
||||
MISC_TEMPLATE="$IDEA_TEMPLATE/misc.xml"
|
||||
IDEA_IML="$IDEA_OUTPUT/jdk.iml"
|
||||
IDEA_ANT="$IDEA_OUTPUT/ant.xml"
|
||||
IDEA_MISC="$IDEA_OUTPUT/misc.xml"
|
||||
|
||||
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
||||
|
||||
#init template variables
|
||||
for file in `ls -p $IDEA_TEMPLATE | grep -v /`; do
|
||||
VAR_SUFFIX=`echo $file | cut -d'.' -f1 | tr [:lower:] [:upper:]`
|
||||
eval "$VAR_SUFFIX"_TEMPLATE="$IDEA_TEMPLATE"/$file
|
||||
eval IDEA_"$VAR_SUFFIX"="$IDEA_OUTPUT"/$file
|
||||
done
|
||||
|
||||
#override template variables
|
||||
if [ -d "$TEMPLATES_OVERRIDE" ] ; then
|
||||
for file in `ls -p "$TEMPLATES_OVERRIDE" | grep -v /`; do
|
||||
cp "$TEMPLATES_OVERRIDE"/$file "$IDEA_OUTPUT"/
|
||||
VAR_SUFFIX=`echo $file | cut -d'.' -f1 | tr [:lower:] [:upper:]`
|
||||
eval "$VAR_SUFFIX"_TEMPLATE="$TEMPLATES_OVERRIDE"/$file
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$VERBOSE" = "true" ] ; then
|
||||
echo "output dir: $IDEA_OUTPUT"
|
||||
echo "idea template dir: $IDEA_TEMPLATE"
|
||||
fi
|
||||
|
||||
if [ ! -f "$IML_TEMPLATE" ] ; then
|
||||
echo "FATAL: cannot find $IML_TEMPLATE" >&2; exit 1
|
||||
if [ ! -f "$JDK_TEMPLATE" ] ; then
|
||||
echo "FATAL: cannot find $JDK_TEMPLATE" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$ANT_TEMPLATE" ] ; then
|
||||
echo "FATAL: cannot find $ANT_TEMPLATE" >&2; exit 1
|
||||
fi
|
||||
|
||||
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I make/common idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
. $IDEA_OUTPUT/env.cfg
|
||||
@@ -118,11 +131,12 @@ addSourceFolder() {
|
||||
root=$@
|
||||
relativePath="`echo "$root" | sed -e s@"$TOP/\(.*$\)"@"\1"@`"
|
||||
folder="`echo "$SOURCE_FOLDER" | sed -e s@"\(.*/\)####\(.*\)"@"\1$relativePath\2"@`"
|
||||
printf "%s\n" "$folder" >> $IDEA_IML
|
||||
printf "%s\n" "$folder" >> $IDEA_JDK
|
||||
}
|
||||
|
||||
### Generate project iml
|
||||
rm -f $IDEA_IML
|
||||
|
||||
rm -f $IDEA_JDK
|
||||
while IFS= read -r line
|
||||
do
|
||||
if echo "$line" | egrep "^ .* <sourceFolder.*####" > /dev/null ; then
|
||||
@@ -133,9 +147,9 @@ do
|
||||
done
|
||||
fi
|
||||
else
|
||||
printf "%s\n" "$line" >> $IDEA_IML
|
||||
printf "%s\n" "$line" >> $IDEA_JDK
|
||||
fi
|
||||
done < "$IML_TEMPLATE"
|
||||
done < "$JDK_TEMPLATE"
|
||||
|
||||
|
||||
MODULE_NAME=" <property name=\"module.name\" value=\"####\" />"
|
||||
|
||||
@@ -44,10 +44,7 @@
|
||||
<li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
|
||||
<li><a href="#jdk-8-on-linux">JDK 8 on Linux</a></li>
|
||||
<li><a href="#jdk-8-on-windows">JDK 8 on Windows</a></li>
|
||||
<li><a href="#jdk-8-on-macos">JDK 8 on macOS</a></li>
|
||||
<li><a href="#jdk-8-on-aix">JDK 8 on AIX</a></li>
|
||||
<li><a href="#getting-jdk-binaries">Getting JDK binaries</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#external-library-requirements">External Library Requirements</a><ul>
|
||||
<li><a href="#freetype">FreeType</a></li>
|
||||
@@ -56,10 +53,10 @@
|
||||
<li><a href="#alsa">ALSA</a></li>
|
||||
<li><a href="#libffi">libffi</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#other-tooling-requirements">Other Tooling Requirements</a><ul>
|
||||
<li><a href="#build-tools-requirements">Build Tools Requirements</a><ul>
|
||||
<li><a href="#autoconf">Autoconf</a></li>
|
||||
<li><a href="#gnu-make">GNU Make</a></li>
|
||||
<li><a href="#gnu-bash">GNU Bash</a></li>
|
||||
<li><a href="#autoconf">Autoconf</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#running-configure">Running Configure</a><ul>
|
||||
<li><a href="#common-configure-arguments">Common Configure Arguments</a></li>
|
||||
@@ -116,10 +113,10 @@
|
||||
<p>If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build.</p>
|
||||
<ol type="1">
|
||||
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
|
||||
<code>hg clone http://hg.openjdk.java.net/jdk10/master</code></p></li>
|
||||
<code>hg clone http://hg.openjdk.java.net/jdk/jdk</code></p></li>
|
||||
<li><p><a href="#running-configure">Run configure</a>:<br />
|
||||
<code>bash configure</code></p>
|
||||
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
|
||||
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
|
||||
<li><p><a href="#running-make">Run make</a>:<br />
|
||||
<code>make images</code></p></li>
|
||||
<li><p>Verify your newly built JDK:<br />
|
||||
@@ -194,19 +191,20 @@
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build OpenJDK.</p>
|
||||
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
||||
<p>Windows is the only non-POSIX OS supported by OpenJDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. For OpenJDK 9, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require a community effort to implement.)</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-freetype=/cygdrive/c/freetype</code> rather than <code>--with-freetype=c:\freetype</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<h4 id="cygwin">Cygwin</h4>
|
||||
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is thus required for building OpenJDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
|
||||
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the OpenJDK build process, and that can cause unexpected build problems.</p>
|
||||
<p>OpenJDK requires GNU Make 4.0 or greater on Windows. This is usually not a problem, since Cygwin currently only distributes GNU Make at a version above 4.0.</p>
|
||||
<p>Apart from the basic Cygwin installation, the following packages must also be installed:</p>
|
||||
<ul>
|
||||
<li><code>autoconf</code></li>
|
||||
<li><code>make</code></li>
|
||||
<li><code>zip</code></li>
|
||||
<li><code>unzip</code></li>
|
||||
</ul>
|
||||
<p>Often, you can install these packages using the following command line:</p>
|
||||
<pre><code><path to Cygwin setup>/setup-x86_64 -q -P make -P unzip -P zip</code></pre>
|
||||
<pre><code><path to Cygwin setup>/setup-x86_64 -q -P autoconf -P make -P unzip -P zip</code></pre>
|
||||
<p>Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the <a href="https://cygwin.com/faq/faq.html#faq.using.bloda">"BLODA" list</a> and the section on <a href="https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures">fork() failures</a>.</p>
|
||||
<h3 id="solaris">Solaris</h3>
|
||||
<p>See <code>make/devkit/solaris11.1-package-list.txt</code> for a list of recommended packages to install when building on Solaris. The versions specified in this list is the versions used by the daily builds at Oracle, and is likely to work properly.</p>
|
||||
@@ -363,37 +361,24 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
|
||||
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
|
||||
<p>Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the "boot JDK". The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
|
||||
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be an JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to "build itself", so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
|
||||
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to "build itself", so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
|
||||
<p>Early in the release cycle, version <em>N-1</em> may not yet have been released. In that case, the preferred boot JDK will be version <em>N-2</em> until version <em>N-1</em> is available.</p>
|
||||
<p>If the Boot JDK is not automatically detected, or the wrong JDK is picked, use <code>--with-boot-jdk</code> to point to the JDK to use.</p>
|
||||
<h3 id="jdk-8-on-linux">JDK 8 on Linux</h3>
|
||||
<p>On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-8-jdk</code> is typically enough to install OpenJDK 8. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-1.8.0-openjdk-devel</code>.</p>
|
||||
<h3 id="jdk-8-on-windows">JDK 8 on Windows</h3>
|
||||
<p>No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for Windows.</p>
|
||||
<h3 id="jdk-8-on-macos">JDK 8 on macOS</h3>
|
||||
<p>No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>, or to install it using <code>brew cask install java</code>. Another option is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for macOS.</p>
|
||||
<h3 id="jdk-8-on-aix">JDK 8 on AIX</h3>
|
||||
<p>No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the time of writing. A starting point for working with OpenJDK on AIX is the <a href="http://openjdk.java.net/projects/ppc-aix-port/">PowerPC/AIX Port Project</a>.</p>
|
||||
<h3 id="getting-jdk-binaries">Getting JDK binaries</h3>
|
||||
<p>OpenJDK binaries for Linux, Windows and macOS can be downloaded from <a href="http://jdk.java.net">jdk.java.net</a>. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for various platforms.</p>
|
||||
<p>On Linux you can also get OpenJDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-<VERSION>-jdk</code> is typically enough to install OpenJDK <VERSION>. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-<VERSION>-openjdk-devel</code>.</p>
|
||||
<h2 id="external-library-requirements">External Library Requirements</h2>
|
||||
<p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
|
||||
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
|
||||
<p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
|
||||
<h3 id="freetype">FreeType</h3>
|
||||
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is required on all platforms. At least version 2.3 is required.</p>
|
||||
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling OpenJDK's own copy.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libcups2-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install cups-devel</code>.</li>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
|
||||
<li>To install on Solaris, try running <code>pkg install system/library/freetype-2</code>.</li>
|
||||
<li>To install on macOS, try running <code>brew install freetype</code>.</li>
|
||||
<li>To install on Windows, see <a href="#building-freetype-on-windows">below</a>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-freetype=<path></code> if <code>configure</code> does not properly locate your FreeType files.</p>
|
||||
<h4 id="building-freetype-on-windows">Building FreeType on Windows</h4>
|
||||
<p>On Windows, there is no readily available compiled version of FreeType. OpenJDK can help you compile FreeType from source. Download the FreeType sources and unpack them into an arbitrary directory:</p>
|
||||
<pre><code>wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
|
||||
tar -xzf freetype-2.5.3.tar.gz</code></pre>
|
||||
<p>Then run <code>configure</code> with <code>--with-freetype-src=<freetype_src></code>. This will automatically build the freetype library into <code><freetype_src>/lib64</code> for 64-bit builds or into <code><freetype_src>/lib32</code> for 32-bit builds. Afterwards you can always use <code>--with-freetype-include=<freetype_src>/include</code> and <code>--with-freetype-lib=<freetype_src>/lib[32|64]</code> for other builds.</p>
|
||||
<p>Alternatively you can unpack the sources like this to use the default directory:</p>
|
||||
<pre><code>tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz</code></pre>
|
||||
<p>Use <code>--with-freetype-include=<path></code> and <code>--with-freetype-lib=<path></code> if <code>configure</code> does not automatically locate the platform FreeType files.</p>
|
||||
<h3 id="cups">CUPS</h3>
|
||||
<p>CUPS, <a href="http://www.cups.org">Common UNIX Printing System</a> header files are required on all platforms, except Windows. Often these files are provided by your operating system.</p>
|
||||
<ul>
|
||||
@@ -424,7 +409,17 @@ tar -xzf freetype-2.5.3.tar.gz</code></pre>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-libffi=<path></code> if <code>configure</code> does not properly locate your libffi files.</p>
|
||||
<h2 id="other-tooling-requirements">Other Tooling Requirements</h2>
|
||||
<h2 id="build-tools-requirements">Build Tools Requirements</h2>
|
||||
<h3 id="autoconf">Autoconf</h3>
|
||||
<p>OpenJDK requires <a href="http://www.gnu.org/software/autoconf">Autoconf</a> on all platforms. At least version 2.69 is required.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install autoconf</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install autoconf</code>.</li>
|
||||
<li>To install on macOS, try running <code>brew install autoconf</code>.</li>
|
||||
<li>To install on Windows, try running <code><path to Cygwin setup>/setup-x86_64 -q -P autoconf</code>.</li>
|
||||
</ul>
|
||||
<p>If <code>configure</code> has problems locating your installation of autoconf, you can specify it using the <code>AUTOCONF</code> environment variable, like this:</p>
|
||||
<pre><code>AUTOCONF=<path to autoconf> configure ...</code></pre>
|
||||
<h3 id="gnu-make">GNU Make</h3>
|
||||
<p>OpenJDK requires <a href="http://www.gnu.org/software/make">GNU Make</a>. No other flavors of make are supported.</p>
|
||||
<p>At least version 3.81 of GNU Make must be used. For distributions supporting GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful functionality to handle parallel building (supported by <code>--with-output-sync</code>) and speed and stability improvements.</p>
|
||||
@@ -434,10 +429,6 @@ tar -xzf freetype-2.5.3.tar.gz</code></pre>
|
||||
<h3 id="gnu-bash">GNU Bash</h3>
|
||||
<p>OpenJDK requires <a href="http://www.gnu.org/software/bash">GNU Bash</a>. No other shells are supported.</p>
|
||||
<p>At least version 3.2 of GNU Bash must be used.</p>
|
||||
<h3 id="autoconf">Autoconf</h3>
|
||||
<p>If you want to modify the build system itself, you need to install <a href="http://www.gnu.org/software/autoconf">Autoconf</a>.</p>
|
||||
<p>However, if you only need to build OpenJDK or if you only edit the actual OpenJDK source files, there is no dependency on autoconf, since the source distribution includes a pre-generated <code>configure</code> shell script.</p>
|
||||
<p>See the section on <a href="#autoconf-details">Autoconf Details</a> for details on how OpenJDK uses autoconf. This is especially important if you plan to contribute changes to OpenJDK that modifies the build system.</p>
|
||||
<h2 id="running-configure">Running Configure</h2>
|
||||
<p>To build OpenJDK, you need a "configuration", which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how OpenJDK is built.</p>
|
||||
<p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
|
||||
@@ -871,15 +862,9 @@ test-support/</code></pre>
|
||||
<p>When building for distribution, <code>zipped</code> is a good solution. Binaries built with <code>internal</code> is suitable for use by developers, since they facilitate debugging, but should be stripped before distributed to end users.</p>
|
||||
<h3 id="autoconf-details">Autoconf Details</h3>
|
||||
<p>The <code>configure</code> script is based on the autoconf framework, but in some details deviate from a normal autoconf <code>configure</code> script.</p>
|
||||
<p>The <code>configure</code> script in the top level directory of OpenJDK is just a thin wrapper that calls <code>make/autoconf/configure</code>. This in turn provides functionality that is not easily expressed in the normal Autoconf framework, and then calls into the core of the <code>configure</code> script, which is the <code>make/autoconf/generated-configure.sh</code> file.</p>
|
||||
<p>As the name implies, this file is generated by Autoconf. It is checked in after regeneration, to alleviate the common user to have to install Autoconf.</p>
|
||||
<p>The build system will detect if the Autoconf source files have changed, and will trigger a regeneration of <code>make/autoconf/generated-configure.sh</code> if needed. You can also manually request such an update by <code>bash make/autoconf/autogen.sh</code>.</p>
|
||||
<p>If you make changes to the build system that requires a re-generation, note the following:</p>
|
||||
<ul>
|
||||
<li><p>You must use <em>exactly</em> version 2.69 of autoconf for your patch to be accepted. This is to avoid spurious changes in the generated file. Note that Ubuntu 16.04 ships a patched version of autoconf which claims to be 2.69, but is not.</p></li>
|
||||
<li><p>You do not need to include the generated file in reviews.</p></li>
|
||||
<li><p>If the generated file needs updating, the Oracle JDK closed counter-part will also need to be updated. It is very much appreciated if you ask for an Oracle engineer to sponsor your push so this can be made in tandem.</p></li>
|
||||
</ul>
|
||||
<p>The <code>configure</code> script in the top level directory of OpenJDK is just a thin wrapper that calls <code>make/autoconf/configure</code>. This in turn will run <code>autoconf</code> to create the runnable (generated) configure script, as <code>.build/generated-configure.sh</code>. Apart from being responsible for the generation of the runnable script, the <code>configure</code> script also provides functionality that is not easily expressed in the normal Autoconf framework. As part of this functionality, the generated script is called.</p>
|
||||
<p>The build system will detect if the Autoconf source files have changed, and will trigger a regeneration of the generated script if needed. You can also manually request such an update by <code>bash configure autogen</code>.</p>
|
||||
<p>In previous versions of the OpenJDK, the generated script was checked in at <code>make/autoconf/generated-configure.sh</code>. This is no longer the case.</p>
|
||||
<h3 id="developing-the-build-system-itself">Developing the Build System Itself</h3>
|
||||
<p>This section contains a few remarks about how to develop for the build system itself. It is not relevant if you are only making changes in the product source code.</p>
|
||||
<p>While technically using <code>make</code>, the make source files of the OpenJDK does not resemble most other Makefiles. Instead of listing specific targets and actions (perhaps using patterns), the basic modus operandi is to call a high-level function (or properly, macro) from the API in <code>make/common</code>. For instance, to compile all classes in the <code>jdk.internal.foo</code> package in the <code>jdk.foo</code> module, a call like this would be made:</p>
|
||||
@@ -897,7 +882,7 @@ test-support/</code></pre>
|
||||
<pre><code>make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot</code></pre>
|
||||
<p>See <code>make/InitSupport.gmk</code> for details on how to use <code>COMPARE_BUILD</code>.</p>
|
||||
<p>To analyze build performance, run with <code>LOG=trace</code> and check <code>$BUILD/build-trace-time.log</code>. Use <code>JOBS=1</code> to avoid parallelism.</p>
|
||||
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches. Also see the section in <a href="#autoconf-details">Autoconf Details</a> about the generated configure script.</p>
|
||||
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
|
||||
<h2 id="contributing-to-openjdk">Contributing to OpenJDK</h2>
|
||||
<p>So, now you've build your OpenJDK, and made your first patch, and want to contribute it back to the OpenJDK community.</p>
|
||||
<p>First of all: Thank you! We gladly welcome your contribution to the OpenJDK. However, please bear in mind that OpenJDK is a massive project, and we must ask you to follow our rules and guidelines to be able to accept your contribution.</p>
|
||||
|
||||
169
doc/building.md
169
doc/building.md
@@ -7,13 +7,14 @@ the time. They assume that you have installed Mercurial (and Cygwin if running
|
||||
on Windows) and cloned the top-level OpenJDK repository that you want to build.
|
||||
|
||||
1. [Get the complete source code](#getting-the-source-code): \
|
||||
`hg clone http://hg.openjdk.java.net/jdk10/master`
|
||||
`hg clone http://hg.openjdk.java.net/jdk/jdk`
|
||||
|
||||
2. [Run configure](#running-configure): \
|
||||
`bash configure`
|
||||
|
||||
If `configure` fails due to missing dependencies (to either the
|
||||
[toolchain](#native-compiler-toolchain-requirements), [external libraries](
|
||||
[toolchain](#native-compiler-toolchain-requirements), [build tools](
|
||||
#build-tools-requirements), [external libraries](
|
||||
#external-library-requirements) or the [boot JDK](#boot-jdk-requirements)),
|
||||
most of the time it prints a suggestion on how to resolve the situation on
|
||||
your platform. Follow the instructions, and try running `bash configure`
|
||||
@@ -172,8 +173,8 @@ require a community effort to implement.)
|
||||
Internally in the build system, all paths are represented as Unix-style paths,
|
||||
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
|
||||
rule also applies to input to the build system, e.g. in arguments to
|
||||
`configure`. So, use `--with-freetype=/cygdrive/c/freetype` rather than
|
||||
`--with-freetype=c:\freetype`. For details on this conversion, see the section
|
||||
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
|
||||
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
|
||||
on [Fixpath](#fixpath).
|
||||
|
||||
#### Cygwin
|
||||
@@ -195,13 +196,14 @@ problem, since Cygwin currently only distributes GNU Make at a version above
|
||||
Apart from the basic Cygwin installation, the following packages must also be
|
||||
installed:
|
||||
|
||||
* `autoconf`
|
||||
* `make`
|
||||
* `zip`
|
||||
* `unzip`
|
||||
|
||||
Often, you can install these packages using the following command line:
|
||||
```
|
||||
<path to Cygwin setup>/setup-x86_64 -q -P make -P unzip -P zip
|
||||
<path to Cygwin setup>/setup-x86_64 -q -P autoconf -P make -P unzip -P zip
|
||||
```
|
||||
|
||||
Unfortunately, Cygwin can be unreliable in certain circumstances. If you
|
||||
@@ -399,43 +401,31 @@ porting OpenJDK to a new platform, chances are that there already exists
|
||||
another JDK for that platform that is usable as boot JDK.
|
||||
|
||||
The rule of thumb is that the boot JDK for building JDK major version *N*
|
||||
should be an JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
|
||||
should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
|
||||
suitable as boot JDK. However, OpenJDK should be able to "build itself", so an
|
||||
up-to-date build of the current OpenJDK source is an acceptable alternative. If
|
||||
you are following the *N-1* rule, make sure you got the latest update version,
|
||||
since JDK 8 GA might not be able to build JDK 9 on all platforms.
|
||||
you are following the *N-1* rule, make sure you've got the latest update
|
||||
version, since JDK 8 GA might not be able to build JDK 9 on all platforms.
|
||||
|
||||
Early in the release cycle, version *N-1* may not yet have been released. In
|
||||
that case, the preferred boot JDK will be version *N-2* until version *N-1*
|
||||
is available.
|
||||
|
||||
If the Boot JDK is not automatically detected, or the wrong JDK is picked, use
|
||||
`--with-boot-jdk` to point to the JDK to use.
|
||||
|
||||
### JDK 8 on Linux
|
||||
### Getting JDK binaries
|
||||
|
||||
On apt-based distros (like Debian and Ubuntu), `sudo apt-get install
|
||||
openjdk-8-jdk` is typically enough to install OpenJDK 8. On rpm-based distros
|
||||
(like Fedora and Red Hat), try `sudo yum install java-1.8.0-openjdk-devel`.
|
||||
OpenJDK binaries for Linux, Windows and macOS can be downloaded from
|
||||
[jdk.java.net](http://jdk.java.net). An alternative is to download the
|
||||
[Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads). Another
|
||||
is the [Adopt OpenJDK Project](https://adoptopenjdk.net/), which publishes
|
||||
experimental prebuilt binaries for various platforms.
|
||||
|
||||
### JDK 8 on Windows
|
||||
|
||||
No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the
|
||||
time of writing. An alternative is to download the [Oracle JDK](
|
||||
http://www.oracle.com/technetwork/java/javase/downloads). Another is the [Adopt
|
||||
OpenJDK Project](https://adoptopenjdk.net/), which publishes experimental
|
||||
prebuilt binaries for Windows.
|
||||
|
||||
### JDK 8 on macOS
|
||||
|
||||
No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the
|
||||
time of writing. An alternative is to download the [Oracle JDK](
|
||||
http://www.oracle.com/technetwork/java/javase/downloads), or to install it
|
||||
using `brew cask install java`. Another option is the [Adopt OpenJDK Project](
|
||||
https://adoptopenjdk.net/), which publishes experimental prebuilt binaries for
|
||||
macOS.
|
||||
|
||||
### JDK 8 on AIX
|
||||
|
||||
No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the
|
||||
time of writing. A starting point for working with OpenJDK on AIX is
|
||||
the [PowerPC/AIX Port Project](http://openjdk.java.net/projects/ppc-aix-port/).
|
||||
On Linux you can also get OpenJDK from the Linux distribution. On apt-based
|
||||
distros (like Debian and Ubuntu), `sudo apt-get install openjdk-<VERSION>-jdk`
|
||||
is typically enough to install OpenJDK \<VERSION\>. On rpm-based distros (like
|
||||
Fedora and Red Hat), try `sudo yum install java-<VERSION>-openjdk-devel`.
|
||||
|
||||
## External Library Requirements
|
||||
|
||||
@@ -454,43 +444,19 @@ and the lib directory separately.
|
||||
|
||||
### FreeType
|
||||
|
||||
FreeType2 from [The FreeType Project](http://www.freetype.org/) is required on
|
||||
all platforms. At least version 2.3 is required.
|
||||
FreeType2 from [The FreeType Project](http://www.freetype.org/) is not required
|
||||
on any platform. The exception is on Unix-based platforms when configuring such
|
||||
that the build artifacts will reference a system installed library,
|
||||
rather than bundling OpenJDK's own copy.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
libcups2-dev`.
|
||||
libfreetype6-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
cups-devel`.
|
||||
freetype-devel`.
|
||||
* To install on Solaris, try running `pkg install system/library/freetype-2`.
|
||||
* To install on macOS, try running `brew install freetype`.
|
||||
* To install on Windows, see [below](#building-freetype-on-windows).
|
||||
|
||||
Use `--with-freetype=<path>` if `configure` does not properly locate your
|
||||
FreeType files.
|
||||
|
||||
#### Building FreeType on Windows
|
||||
|
||||
On Windows, there is no readily available compiled version of FreeType. OpenJDK
|
||||
can help you compile FreeType from source. Download the FreeType sources and
|
||||
unpack them into an arbitrary directory:
|
||||
|
||||
```
|
||||
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
|
||||
tar -xzf freetype-2.5.3.tar.gz
|
||||
```
|
||||
|
||||
Then run `configure` with `--with-freetype-src=<freetype_src>`. This will
|
||||
automatically build the freetype library into `<freetype_src>/lib64` for 64-bit
|
||||
builds or into `<freetype_src>/lib32` for 32-bit builds. Afterwards you can
|
||||
always use `--with-freetype-include=<freetype_src>/include` and
|
||||
`--with-freetype-lib=<freetype_src>/lib[32|64]` for other builds.
|
||||
|
||||
Alternatively you can unpack the sources like this to use the default
|
||||
directory:
|
||||
|
||||
```
|
||||
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz
|
||||
```
|
||||
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
|
||||
if `configure` does not automatically locate the platform FreeType files.
|
||||
|
||||
### CUPS
|
||||
|
||||
@@ -552,7 +518,27 @@ Hotspot.
|
||||
Use `--with-libffi=<path>` if `configure` does not properly locate your libffi
|
||||
files.
|
||||
|
||||
## Other Tooling Requirements
|
||||
## Build Tools Requirements
|
||||
|
||||
### Autoconf
|
||||
|
||||
OpenJDK requires [Autoconf](http://www.gnu.org/software/autoconf) on all
|
||||
platforms. At least version 2.69 is required.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
autoconf`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
autoconf`.
|
||||
* To install on macOS, try running `brew install autoconf`.
|
||||
* To install on Windows, try running `<path to Cygwin setup>/setup-x86_64 -q
|
||||
-P autoconf`.
|
||||
|
||||
If `configure` has problems locating your installation of autoconf, you can
|
||||
specify it using the `AUTOCONF` environment variable, like this:
|
||||
|
||||
```
|
||||
AUTOCONF=<path to autoconf> configure ...
|
||||
```
|
||||
|
||||
### GNU Make
|
||||
|
||||
@@ -585,19 +571,6 @@ are supported.
|
||||
|
||||
At least version 3.2 of GNU Bash must be used.
|
||||
|
||||
### Autoconf
|
||||
|
||||
If you want to modify the build system itself, you need to install [Autoconf](
|
||||
http://www.gnu.org/software/autoconf).
|
||||
|
||||
However, if you only need to build OpenJDK or if you only edit the actual
|
||||
OpenJDK source files, there is no dependency on autoconf, since the source
|
||||
distribution includes a pre-generated `configure` shell script.
|
||||
|
||||
See the section on [Autoconf Details](#autoconf-details) for details on how
|
||||
OpenJDK uses autoconf. This is especially important if you plan to contribute
|
||||
changes to OpenJDK that modifies the build system.
|
||||
|
||||
## Running Configure
|
||||
|
||||
To build OpenJDK, you need a "configuration", which consists of a directory
|
||||
@@ -1660,32 +1633,19 @@ The `configure` script is based on the autoconf framework, but in some details
|
||||
deviate from a normal autoconf `configure` script.
|
||||
|
||||
The `configure` script in the top level directory of OpenJDK is just a thin
|
||||
wrapper that calls `make/autoconf/configure`. This in turn provides
|
||||
functionality that is not easily expressed in the normal Autoconf framework,
|
||||
and then calls into the core of the `configure` script, which is the
|
||||
`make/autoconf/generated-configure.sh` file.
|
||||
|
||||
As the name implies, this file is generated by Autoconf. It is checked in after
|
||||
regeneration, to alleviate the common user to have to install Autoconf.
|
||||
wrapper that calls `make/autoconf/configure`. This in turn will run `autoconf`
|
||||
to create the runnable (generated) configure script, as
|
||||
`.build/generated-configure.sh`. Apart from being responsible for the
|
||||
generation of the runnable script, the `configure` script also provides
|
||||
functionality that is not easily expressed in the normal Autoconf framework. As
|
||||
part of this functionality, the generated script is called.
|
||||
|
||||
The build system will detect if the Autoconf source files have changed, and
|
||||
will trigger a regeneration of `make/autoconf/generated-configure.sh` if
|
||||
needed. You can also manually request such an update by `bash
|
||||
make/autoconf/autogen.sh`.
|
||||
will trigger a regeneration of the generated script if needed. You can also
|
||||
manually request such an update by `bash configure autogen`.
|
||||
|
||||
If you make changes to the build system that requires a re-generation, note the
|
||||
following:
|
||||
|
||||
* You must use *exactly* version 2.69 of autoconf for your patch to be
|
||||
accepted. This is to avoid spurious changes in the generated file. Note
|
||||
that Ubuntu 16.04 ships a patched version of autoconf which claims to be
|
||||
2.69, but is not.
|
||||
|
||||
* You do not need to include the generated file in reviews.
|
||||
|
||||
* If the generated file needs updating, the Oracle JDK closed counter-part
|
||||
will also need to be updated. It is very much appreciated if you ask for an
|
||||
Oracle engineer to sponsor your push so this can be made in tandem.
|
||||
In previous versions of the OpenJDK, the generated script was checked in at
|
||||
`make/autoconf/generated-configure.sh`. This is no longer the case.
|
||||
|
||||
### Developing the Build System Itself
|
||||
|
||||
@@ -1736,8 +1696,7 @@ Use `JOBS=1` to avoid parallelism.
|
||||
|
||||
Please check that you adhere to the [Code Conventions for the Build System](
|
||||
http://openjdk.java.net/groups/build/doc/code-conventions.html) before
|
||||
submitting patches. Also see the section in [Autoconf Details](
|
||||
#autoconf-details) about the generated configure script.
|
||||
submitting patches.
|
||||
|
||||
## Contributing to OpenJDK
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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,6 @@ $(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
|
||||
COPY := .properties, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
||||
--add-modules java.corba \
|
||||
--add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
|
||||
$(INTERIM_RMIC_ADD_EXPORTS), \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2018, 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
|
||||
@@ -38,10 +38,6 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||
################################################################################
|
||||
# Module specific build settings
|
||||
|
||||
java.activation_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
|
||||
################################################################################
|
||||
|
||||
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
|
||||
java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
|
||||
java.base_CLEAN += intrinsic.properties
|
||||
@@ -256,7 +252,7 @@ java.prefs_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,
|
||||
|
||||
################################################################################
|
||||
|
||||
java.transaction_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -279,27 +275,6 @@ java.rmi_CLEAN_FILES += $(wildcard \
|
||||
|
||||
################################################################################
|
||||
|
||||
java.corba_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
|
||||
java.corba_COPY += .prp
|
||||
java.corba_CLEAN += .properties
|
||||
|
||||
java.corba_EXCLUDES += \
|
||||
com/sun/corba/se/PortableActivationIDL \
|
||||
com/sun/tools/corba/se/logutil \
|
||||
#
|
||||
java.corba_EXCLUDE_FILES += \
|
||||
com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
|
||||
com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
|
||||
com/sun/org/omg/CORBA/IDLTypeOperations.java \
|
||||
com/sun/org/omg/CORBA/IRObjectOperations.java \
|
||||
org/omg/PortableInterceptor/UNKNOWN.java \
|
||||
com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
|
||||
com/sun/corba/se/impl/presentation/rmi/jndi.properties \
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
|
||||
javax.xml.transform javax.xml.validation javax.xml.xpath)'
|
||||
@@ -307,32 +282,11 @@ java.xml_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
java.xml.bind_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml.soap_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
java.xml.soap_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
java.xml.ws_COPY += .xml
|
||||
java.xml.ws_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
|
||||
java.naming_CLEAN += jndiprovider.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.security.saaj_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.security.saaj_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.security.jgss_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
@@ -493,6 +447,7 @@ jdk.internal.vm.compiler_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
#
|
||||
|
||||
jdk.internal.vm.compiler_EXCLUDES += \
|
||||
org.graalvm.collections.test \
|
||||
org.graalvm.compiler.core.match.processor \
|
||||
org.graalvm.compiler.nodeinfo.processor \
|
||||
org.graalvm.compiler.options.processor \
|
||||
@@ -511,6 +466,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
|
||||
org.graalvm.compiler.graph.test \
|
||||
org.graalvm.compiler.hotspot.amd64.test \
|
||||
org.graalvm.compiler.hotspot.lir.test \
|
||||
org.graalvm.compiler.hotspot.sparc.test \
|
||||
org.graalvm.compiler.hotspot.test \
|
||||
org.graalvm.compiler.jtt \
|
||||
org.graalvm.compiler.lir.jtt \
|
||||
@@ -553,17 +509,6 @@ jdk.aot_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
jdk.xml.bind_CLEAN += .properties
|
||||
jdk.xml.bind_COPY += .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
jdk.xml.ws_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
sun.charsets_COPY += .dat
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -48,6 +48,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.word/src \
|
||||
$(SRC_DIR)/org.graalvm.collections/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.common/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
|
||||
@@ -101,6 +102,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.collections/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.options/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.options.processor/src \
|
||||
$(SRC_DIR)/org.graalvm.util/src \
|
||||
@@ -117,6 +119,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/org.graalvm.word/src \
|
||||
$(SRC_DIR)/org.graalvm.collections/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.verifier/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.api.replacements/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.code/src \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -53,9 +53,7 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-modules java.xml.bind \
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
--add-exports java.xml.bind/javax.xml.bind.annotation=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.text=ALL-UNNAMED \
|
||||
, \
|
||||
))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2018, 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
|
||||
@@ -44,7 +44,7 @@ $(eval $(call IncludeCustomExtension, Docs.gmk))
|
||||
#
|
||||
# We will generate API documentation for two different selections of the source
|
||||
# code: "Java SE", which contains just the modules covered by the top-level
|
||||
# module java.se.ee, and "JDK", which covers all of Java SE and also all
|
||||
# module java.se and "JDK", which covers all of Java SE and also all
|
||||
# other available modules that should be documented, including imported modules,
|
||||
# if any.
|
||||
#
|
||||
@@ -61,7 +61,7 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
|
||||
$(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub)
|
||||
|
||||
# URLs
|
||||
JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=homepage
|
||||
JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase10&id=homepage
|
||||
BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
|
||||
COPYRIGHT_URL := {@docroot}/../legal/copyright.html
|
||||
LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html
|
||||
@@ -200,7 +200,7 @@ JAVASE_LONG_NAME := Java<sup>®</sup> Platform, Standard Edition
|
||||
#
|
||||
define setup_gengraph_dot_to_png
|
||||
$1_$2_DOT_SRC := $$($1_GENGRAPHS_DIR)/$2.dot
|
||||
$1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2-graph.png
|
||||
$1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2/module-graph.png
|
||||
|
||||
# For each module needing a graph, create a png file from the dot file
|
||||
# generated by the GenGraphs tool and store it in the target dir.
|
||||
@@ -396,8 +396,8 @@ endef
|
||||
|
||||
# Define the groups of the JDK API documentation
|
||||
JavaSE_GROUP_NAME := Java SE
|
||||
JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se.ee \
|
||||
$(call FindTransitiveIndirectDepsForModules, java.se.ee)))
|
||||
JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se \
|
||||
$(call FindTransitiveIndirectDepsForModules, java.se)))
|
||||
JavaSE_GROUP_DESCRIPTION := \
|
||||
The Java Platform, Standard Edition (Java SE) APIs define the core Java \
|
||||
platform for general-purpose computing. These APIs are in modules whose \
|
||||
@@ -445,9 +445,9 @@ $(eval $(call SetupApiDocsGeneration, JDK_API, \
|
||||
################################################################################
|
||||
# Setup generation of the Java SE API documentation (javadoc + modulegraph)
|
||||
|
||||
# The Java SE module scope is just java.se.ee and its transitive indirect
|
||||
# The Java SE module scope is just java.se and its transitive indirect
|
||||
# exports.
|
||||
JAVASE_MODULES := java.se.ee
|
||||
JAVASE_MODULES := java.se
|
||||
|
||||
$(eval $(call SetupApiDocsGeneration, JAVASE_API, \
|
||||
MODULES := $(JAVASE_MODULES), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2018, 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
|
||||
@@ -47,7 +47,7 @@ JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
|
||||
$(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
|
||||
JDK_MODULES += $(ALL_MODULES)
|
||||
|
||||
# Modules list for compact builds
|
||||
# Modules list for compact builds
|
||||
JRE_COMPACT1_MODULES := \
|
||||
java.logging \
|
||||
java.scripting \
|
||||
@@ -134,18 +134,22 @@ $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jdk jimage
|
||||
$(RM) -r $(JDK_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
|
||||
$(JLINK_JDK_EXTRA_OPTS) \
|
||||
--output $(JDK_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
$(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
|
||||
$(JLINK_JDK_EXTRA_OPTS) \
|
||||
--output $(JDK_IMAGE_DIR) \
|
||||
)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre jimage
|
||||
$(RM) -r $(JRE_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_IMAGE_DIR) \
|
||||
)
|
||||
$(TOUCH) $@
|
||||
|
||||
|
||||
@@ -153,27 +157,33 @@ $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre compact1 jimage
|
||||
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --add-modules $(JRE_COMPACT1_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_COMPACT1_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact1, \
|
||||
$(JLINK_TOOL) --add-modules $(JRE_COMPACT1_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_COMPACT1_IMAGE_DIR) \
|
||||
)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre compact2 jimage
|
||||
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --add-modules $(JRE_COMPACT2_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_COMPACT2_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact2, \
|
||||
$(JLINK_TOOL) --add-modules $(JRE_COMPACT2_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_COMPACT2_IMAGE_DIR) \
|
||||
)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(ECHO) Creating jre compact3 jimage
|
||||
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR)
|
||||
$(JLINK_TOOL) --add-modules $(JRE_COMPACT3_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_COMPACT3_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact3, \
|
||||
$(JLINK_TOOL) --add-modules $(JRE_COMPACT3_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_COMPACT3_IMAGE_DIR) \
|
||||
)
|
||||
$(TOUCH) $@
|
||||
|
||||
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
||||
@@ -199,7 +209,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
rmid.1 \
|
||||
rmiregistry.1 \
|
||||
servertool.1 \
|
||||
tnameserv.1 \
|
||||
unpack200.1
|
||||
|
||||
JDK_MAN_PAGES += \
|
||||
@@ -223,11 +232,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
jstat.1 \
|
||||
jstatd.1 \
|
||||
rmic.1 \
|
||||
schemagen.1 \
|
||||
serialver.1 \
|
||||
wsgen.1 \
|
||||
wsimport.1 \
|
||||
xjc.1
|
||||
serialver.1
|
||||
|
||||
# This variable is potentially overridden in the closed makefile.
|
||||
MAN_SRC_BASEDIR ?= $(TOPDIR)/src
|
||||
|
||||
@@ -361,6 +361,12 @@ else # $(HAS_SPEC)=true
|
||||
|
||||
BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
|
||||
|
||||
ifneq ($(CUSTOM_ROOT), )
|
||||
topdir=$(CUSTOM_ROOT)
|
||||
else
|
||||
topdir=$(TOPDIR)
|
||||
endif
|
||||
|
||||
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
||||
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
|
||||
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
|
||||
@@ -373,7 +379,7 @@ else # $(HAS_SPEC)=true
|
||||
# FAIL can be set to false to have the return value of compare be ignored.
|
||||
define ParseCompareBuild
|
||||
ifneq ($$(COMPARE_BUILD), )
|
||||
COMPARE_BUILD_OUTPUTDIR := $(TOPDIR)/build/compare-build/$(CONF_NAME)
|
||||
COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME)
|
||||
COMPARE_BUILD_FAIL := true
|
||||
|
||||
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
|
||||
@@ -412,9 +418,9 @@ else # $(HAS_SPEC)=true
|
||||
endif
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_PATCH), )
|
||||
ifneq ($$(wildcard $$(TOPDIR)/$$(COMPARE_BUILD_PATCH)), )
|
||||
ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), )
|
||||
# Assume relative path, if file exists
|
||||
COMPARE_BUILD_PATCH := $$(wildcard $$(TOPDIR)/$$(COMPARE_BUILD_PATCH))
|
||||
COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH))
|
||||
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
|
||||
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
|
||||
endif
|
||||
@@ -429,11 +435,11 @@ else # $(HAS_SPEC)=true
|
||||
define PrepareCompareBuild
|
||||
$(ECHO) "Preparing for comparison rebuild"
|
||||
# Apply patch, if any
|
||||
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
|
||||
# Move the first build away temporarily
|
||||
$(RM) -r $(TOPDIR)/build/.compare-build-temp
|
||||
$(MKDIR) -p $(TOPDIR)/build/.compare-build-temp
|
||||
$(MV) $(OUTPUTDIR) $(TOPDIR)/build/.compare-build-temp
|
||||
$(RM) -r $(topdir)/build/.compare-build-temp
|
||||
$(MKDIR) -p $(topdir)/build/.compare-build-temp
|
||||
$(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp
|
||||
# Restore an old compare-build, or create a new compare-build directory.
|
||||
if test -d $(COMPARE_BUILD_OUTPUTDIR); then \
|
||||
$(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \
|
||||
@@ -443,18 +449,18 @@ else # $(HAS_SPEC)=true
|
||||
# Re-run configure with the same arguments (and possibly some additional),
|
||||
# must be done after patching.
|
||||
( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \
|
||||
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
|
||||
$(BASH) $(topdir)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
|
||||
endef
|
||||
|
||||
# Cleanup after a compare build
|
||||
define CleanupCompareBuild
|
||||
# If running with a COMPARE_BUILD patch, reverse-apply it
|
||||
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
|
||||
# Move this build away and restore the original build
|
||||
$(MKDIR) -p $(TOPDIR)/build/compare-build
|
||||
$(MKDIR) -p $(topdir)/build/compare-build
|
||||
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
|
||||
$(MV) $(TOPDIR)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
|
||||
$(RM) -r $(TOPDIR)/build/.compare-build-temp
|
||||
$(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
|
||||
$(RM) -r $(topdir)/build/.compare-build-temp
|
||||
endef
|
||||
|
||||
# Do the actual comparison of two builds
|
||||
|
||||
@@ -48,6 +48,7 @@ $(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(RM) -r $(INTERIM_IMAGE_DIR)
|
||||
$(JLINK_TOOL) \
|
||||
--output $(INTERIM_IMAGE_DIR) \
|
||||
--disable-plugin generate-jli-classes \
|
||||
--add-modules $(INTERIM_MODULES_LIST)
|
||||
$(TOUCH) $@
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -124,10 +124,9 @@ ifneq ($(CREATING_BUILDJDK), true)
|
||||
LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
|
||||
INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
|
||||
$(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
|
||||
CORBA_GENSRC_TARGETS := $(filter $(addsuffix -%, $(CORBA_MODULES)), $(GENSRC_TARGETS))
|
||||
HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
|
||||
JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
|
||||
$(CORBA_GENSRC_TARGETS) $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
|
||||
$(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
|
||||
|
||||
GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
|
||||
GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
|
||||
@@ -400,10 +399,13 @@ docs-zip:
|
||||
update-build-docs:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
|
||||
|
||||
update-x11wrappers:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
|
||||
|
||||
ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
|
||||
docs-javase-api-javadoc docs-javase-api-modulegraph \
|
||||
docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
|
||||
docs-jdk-index docs-zip update-build-docs
|
||||
docs-jdk-index docs-zip update-build-docs update-x11wrappers
|
||||
|
||||
################################################################################
|
||||
# Cross compilation support
|
||||
@@ -618,8 +620,6 @@ else
|
||||
|
||||
buildtools-modules: exploded-image-base
|
||||
|
||||
$(CORBA_GENSRC_TARGETS): interim-langtools
|
||||
|
||||
$(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot
|
||||
|
||||
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
|
||||
@@ -637,15 +637,18 @@ else
|
||||
# Declare dependencies between hotspot-<variant>* targets
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
|
||||
$(eval hotspot-$v-libs: hotspot-$v-gensrc) \
|
||||
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
|
||||
)
|
||||
|
||||
hotspot-ide-project: hotspot exploded-image
|
||||
|
||||
generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
|
||||
|
||||
# If not already set, set the JVM variant target so that the JVM will be built.
|
||||
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
|
||||
|
||||
# Building one JVM variant is enough to start building the other libs
|
||||
$(LIBS_TARGETS): hotspot-$(JVM_VARIANT_MAIN)-libs
|
||||
$(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
|
||||
|
||||
$(LAUNCHER_TARGETS): java.base-libs
|
||||
|
||||
@@ -691,8 +694,9 @@ else
|
||||
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
|
||||
|
||||
# The swing beans need to have java base properly generated to avoid errors
|
||||
# in javadoc.
|
||||
java.desktop-gensrc-src: java.base-gensrc
|
||||
# in javadoc. The X11 wrappers need the java.base include files to have been
|
||||
# copied and processed.
|
||||
java.desktop-gensrc-src: java.base-gensrc java.base-copy
|
||||
|
||||
# The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler
|
||||
# needs classes from the current JDK.
|
||||
@@ -721,8 +725,11 @@ else
|
||||
java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
|
||||
endif
|
||||
|
||||
# Building java.base-jmod requires all of hotspot to be built.
|
||||
java.base-jmod: hotspot
|
||||
# If not already set, set the JVM target so that the JVM will be built.
|
||||
JVM_MAIN_TARGETS ?= hotspot
|
||||
|
||||
# Building java.base-jmod requires all of VM (ie hotspot) to be built.
|
||||
java.base-jmod: $(JVM_MAIN_TARGETS)
|
||||
|
||||
# Declare dependencies from <module>-jmod to all other module targets
|
||||
# When creating a BUILDJDK, the java compilation has already been done by the
|
||||
@@ -748,7 +755,7 @@ else
|
||||
# in java.base-copy) and tzdb.dat (done in java.base-gendata) to the
|
||||
# appropriate location otherwise jimage, jlink and jmod won't start. This
|
||||
# also applies when creating the buildjdk.
|
||||
DEFAULT_JMOD_DEPS := java.base-libs java.base-copy java.base-gendata \
|
||||
DEFAULT_JMOD_DEPS += java.base-libs java.base-copy java.base-gendata \
|
||||
jdk.jlink-launchers
|
||||
# When cross compiling and buildjdk is to be created, depend on creating the
|
||||
# buildjdk instead of the default dependencies.
|
||||
@@ -824,8 +831,11 @@ else
|
||||
|
||||
docs-reference-api-modulegraph: exploded-image buildtools-modules
|
||||
|
||||
# If not already set, then set the JVM specific docs targets
|
||||
JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
|
||||
|
||||
# The gensrc steps for hotspot and jdk.jdi create html spec files.
|
||||
docs-jdk-specs: hotspot-$(JVM_VARIANT_MAIN)-gensrc jdk.jdi-gensrc \
|
||||
docs-jdk-specs: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
|
||||
docs-jdk-index
|
||||
|
||||
docs-jdk-index: exploded-image buildtools-modules
|
||||
@@ -887,13 +897,17 @@ else
|
||||
|
||||
generate-summary: jmods buildtools-modules
|
||||
|
||||
update-x11wrappers: java.base-copy buildtools-jdk
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Virtual targets without recipes
|
||||
|
||||
# If not already set, set the JVM specific tools targets
|
||||
JVM_TOOLS_TARGETS ?= buildtools-hotspot
|
||||
buildtools: buildtools-langtools interim-langtools interim-rmic \
|
||||
buildtools-jdk buildtools-hotspot
|
||||
buildtools-jdk $(JVM_TOOLS_TARGETS)
|
||||
|
||||
hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig
|
||||
|
||||
@@ -936,7 +950,7 @@ $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
||||
$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
|
||||
|
||||
# Building java.base includes building all of hotspot.
|
||||
java.base: hotspot
|
||||
java.base: $(JVM_MAIN_TARGETS)
|
||||
|
||||
demos: demos-jdk
|
||||
|
||||
@@ -1003,10 +1017,15 @@ endif
|
||||
# This target builds the documentation image
|
||||
docs-image: docs-jdk
|
||||
|
||||
# If not already set, set the JVM specific targets to build the test image
|
||||
JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
|
||||
|
||||
# This target builds the test image
|
||||
test-image: prepare-test-image test-image-hotspot-jtreg-native \
|
||||
test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest \
|
||||
test-image-demos-jdk
|
||||
test-image: prepare-test-image \
|
||||
test-image-jdk-jtreg-native test-image-failure-handler \
|
||||
test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
# all-images builds all our deliverables as images.
|
||||
all-images: product-images test-image docs-image
|
||||
@@ -1145,6 +1164,8 @@ create-main-targets-include:
|
||||
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Main-post.gmk))
|
||||
|
||||
.PHONY: $(ALL_TARGETS)
|
||||
|
||||
|
||||
@@ -60,6 +60,18 @@ define SetTestOpt
|
||||
endif
|
||||
endef
|
||||
|
||||
# Setup _NT_SYMBOL_PATH on Windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifndef _NT_SYMBOL_PATH
|
||||
# Can't use PathList here as it adds quotes around the value.
|
||||
_NT_SYMBOL_PATH := \
|
||||
$(subst $(SPACE),;, $(foreach p, $(sort $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), $(call FixPath, $p)))
|
||||
export _NT_SYMBOL_PATH
|
||||
$(info _NT_SYMBOL_PATH $(_NT_SYMBOL_PATH))
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, RunTests.gmk))
|
||||
@@ -496,6 +508,11 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR
|
||||
# Some tests needs to find a boot JDK using the JDK8_HOME variable.
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)
|
||||
# If running on Windows, propagate the _NT_SYMBOL_PATH to enable
|
||||
# symbol lookup in hserr files
|
||||
ifeq ($$(OPENJDK_TARGET_OS), windows)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += \
|
||||
$$(addprefix -javaoption:, $$(JTREG_JAVA_OPTIONS)) \
|
||||
|
||||
@@ -113,6 +113,7 @@ $(eval $(call SetupVariable,JT_HOME))
|
||||
# These can have default values based on the ones above
|
||||
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
|
||||
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
|
||||
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols))
|
||||
|
||||
# Provide default values for tools that we need
|
||||
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
|
||||
@@ -245,6 +246,7 @@ $(call CreateNewSpec, $(NEW_SPEC), \
|
||||
JT_HOME := $(JT_HOME), \
|
||||
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
|
||||
TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
|
||||
SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \
|
||||
MAKE := $(MAKE), \
|
||||
BASH := $(BASH), \
|
||||
JIB_JAR := $(JIB_JAR), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -92,7 +92,6 @@ TOOL_SPP = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.too
|
||||
|
||||
# Nimbus is used somewhere in the swing build.
|
||||
TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
--add-modules java.xml.bind \
|
||||
build.tools.generatenimbus.Generator
|
||||
|
||||
TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
|
||||
101
make/UpdateX11Wrappers.gmk
Normal file
101
make/UpdateX11Wrappers.gmk
Normal file
@@ -0,0 +1,101 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2018, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include NativeCompilation.gmk
|
||||
include ToolsJdk.gmk
|
||||
|
||||
################################################################################
|
||||
# This file is responsible for extracting the x11 native struct offsets to
|
||||
# the xawt Java library. The tool needs to be run on the os/arch that
|
||||
# will host the final jvm, thus the tool cannot be used when cross compiling.
|
||||
#
|
||||
# Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are
|
||||
# committed into the source code repository. These are the ones used in
|
||||
# GensrcX11Wrappers.gmk to generate the Java code during the build.
|
||||
################################################################################
|
||||
|
||||
ifeq ($(COMPILE_TYPE), cross)
|
||||
$(error It is not possible to update the x11wrappers when cross-compiling)
|
||||
endif
|
||||
|
||||
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
|
||||
|
||||
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
|
||||
|
||||
BITS := $(OPENJDK_TARGET_CPU_BITS)
|
||||
|
||||
# Generate the C code for the program that will output the offset file.
|
||||
$(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
|
||||
$(call LogInfo, Generating X11 wrapper data generator source code)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $@, \
|
||||
$(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS))
|
||||
|
||||
DATA_GENERATOR_INCLUDES := \
|
||||
-I$(TOPDIR)/src/hotspot/share/include \
|
||||
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
|
||||
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
|
||||
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
|
||||
-I$(TOPDIR)/src/java.base/share/native/libjava \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
||||
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
|
||||
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
|
||||
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
|
||||
#
|
||||
|
||||
# Compile the generated C code into an executable.
|
||||
$(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
|
||||
PROGRAM := data_generator, \
|
||||
OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \
|
||||
EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \
|
||||
CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
LIBS := $(X_LIBS), \
|
||||
OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \
|
||||
))
|
||||
|
||||
# Run the executable to create the data file.
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET)
|
||||
$(call LogInfo, Generating X11 wrapper data files)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $(X11WRAPPERS_OUTPUT)/generation, \
|
||||
$(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@)
|
||||
$(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly
|
||||
$(ECHO) need to be updated for both 32 and 64 bit platforms. You have now
|
||||
$(ECHO) updated them for $(BITS) bit platforms only.
|
||||
|
||||
TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default
|
||||
@@ -1,81 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, 2017, 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.
|
||||
#
|
||||
|
||||
generate_configure_script() {
|
||||
# First create a header
|
||||
cat > $1 << EOT
|
||||
#!/bin/bash
|
||||
#
|
||||
# ##########################################################
|
||||
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
|
||||
# ##########################################################
|
||||
#
|
||||
EOT
|
||||
# Then replace "magic" variables in configure.ac and append the output
|
||||
# from autoconf. $2 is either cat (just a no-op) or a filter.
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
||||
eval $2 | ${AUTOCONF} -W all -I$script_dir - >> $1
|
||||
rm -rf autom4te.cache
|
||||
}
|
||||
|
||||
script_dir=`dirname $0`
|
||||
|
||||
# Create a timestamp as seconds since epoch
|
||||
if test "x`uname -s`" = "xSunOS"; then
|
||||
TIMESTAMP=`date +%s`
|
||||
if test "x$TIMESTAMP" = "x%s"; then
|
||||
# date +%s not available on this Solaris, use workaround from nawk(1):
|
||||
TIMESTAMP=`nawk 'BEGIN{print srand()}'`
|
||||
fi
|
||||
else
|
||||
TIMESTAMP=`date +%s`
|
||||
fi
|
||||
|
||||
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
|
||||
|
||||
if test "x${AUTOCONF}" = x; then
|
||||
echo "You need autoconf installed to be able to regenerate the configure script"
|
||||
echo "Error: Cannot find autoconf" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
autoconf_version=`$AUTOCONF --version | head -1`
|
||||
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
|
||||
|
||||
echo "Generating generated-configure.sh"
|
||||
generate_configure_script "$script_dir/generated-configure.sh" 'cat'
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != "x"; then
|
||||
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
|
||||
if test ! -e $custom_hook; then
|
||||
echo "CUSTOM_CONFIG_DIR set but $CUSTOM_CONFIG_DIR/custom-hook.m4 not present"
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have custom sources available; also generate configure script
|
||||
# with custom hooks compiled in.
|
||||
echo "Generating custom generated-configure.sh"
|
||||
generate_configure_script "$CUSTOM_CONFIG_DIR/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
|
||||
fi
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -258,16 +258,12 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
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 --version 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
|
||||
READLINK_ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
|
||||
# If READLINK_ISGNU is empty, then it's a non-GNU readlink. Don't use it.
|
||||
READLINK_TESTED=yes
|
||||
fi
|
||||
|
||||
if test "x$READLINK" != x; then
|
||||
if test "x$READLINK" != x && test "x$READLINK_ISGNU" != x; then
|
||||
$1=`$READLINK -f [$]$1`
|
||||
else
|
||||
# Save the current directory for restoring afterwards
|
||||
@@ -336,7 +332,6 @@ AC_DEFUN_ONCE([BASIC_INIT],
|
||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
|
||||
])
|
||||
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
@@ -495,6 +490,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
BASIC_REQUIRE_PROGS(MV, mv)
|
||||
BASIC_REQUIRE_PROGS(NAWK, [nawk gawk awk])
|
||||
BASIC_REQUIRE_PROGS(PRINTF, printf)
|
||||
BASIC_REQUIRE_PROGS(READLINK, [greadlink readlink])
|
||||
BASIC_REQUIRE_PROGS(RM, rm)
|
||||
BASIC_REQUIRE_PROGS(RMDIR, rmdir)
|
||||
BASIC_REQUIRE_PROGS(SH, sh)
|
||||
@@ -526,7 +522,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
|
||||
# These are not required on all platforms
|
||||
BASIC_PATH_PROGS(CYGPATH, cygpath)
|
||||
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
|
||||
BASIC_PATH_PROGS(DF, df)
|
||||
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
|
||||
BASIC_PATH_PROGS(NICE, nice)
|
||||
@@ -586,69 +581,71 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
[
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this devkit for compilers, tools and resources])],
|
||||
[
|
||||
BASIC_FIXUP_PATH([with_devkit])
|
||||
DEVKIT_ROOT="$with_devkit"
|
||||
# Check for a meta data info file in the root of the devkit
|
||||
if test -f "$DEVKIT_ROOT/devkit.info"; then
|
||||
. $DEVKIT_ROOT/devkit.info
|
||||
# This potentially sets the following:
|
||||
# A descriptive name of the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
|
||||
# Corresponds to --with-extra-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
|
||||
# Corresponds to --with-toolchain-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
|
||||
# Corresponds to --with-sysroot
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
|
||||
[use this devkit for compilers, tools and resources])])
|
||||
|
||||
# Identifies the Visual Studio version in the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
|
||||
# The Visual Studio include environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
|
||||
# The Visual Studio lib environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
|
||||
# Corresponds to --with-msvcr-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
|
||||
# Corresponds to --with-msvcp-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||
fi
|
||||
if test "x$with_devkit" = xyes; then
|
||||
AC_MSG_ERROR([--with-devkit must have a value])
|
||||
elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
|
||||
BASIC_FIXUP_PATH([with_devkit])
|
||||
DEVKIT_ROOT="$with_devkit"
|
||||
# Check for a meta data info file in the root of the devkit
|
||||
if test -f "$DEVKIT_ROOT/devkit.info"; then
|
||||
. $DEVKIT_ROOT/devkit.info
|
||||
# This potentially sets the following:
|
||||
# A descriptive name of the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
|
||||
# Corresponds to --with-extra-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
|
||||
# Corresponds to --with-toolchain-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
|
||||
# Corresponds to --with-sysroot
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
|
||||
|
||||
AC_MSG_CHECKING([for devkit])
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
|
||||
else
|
||||
AC_MSG_RESULT([$DEVKIT_ROOT])
|
||||
fi
|
||||
# Identifies the Visual Studio version in the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
|
||||
# The Visual Studio include environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
|
||||
# The Visual Studio lib environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
|
||||
# Corresponds to --with-msvcr-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
|
||||
# Corresponds to --with-msvcp-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||
fi
|
||||
|
||||
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
||||
AC_MSG_CHECKING([for devkit])
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
|
||||
else
|
||||
AC_MSG_RESULT([$DEVKIT_ROOT])
|
||||
fi
|
||||
|
||||
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
||||
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
|
||||
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
|
||||
fi
|
||||
BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
|
||||
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
||||
|
||||
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
|
||||
# places for backwards compatiblity.
|
||||
if test "x$DEVKIT_SYSROOT" != x; then
|
||||
SYSROOT="$DEVKIT_SYSROOT"
|
||||
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
|
||||
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
|
||||
fi
|
||||
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
||||
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
|
||||
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
|
||||
fi
|
||||
BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
|
||||
|
||||
if test "x$DEVKIT_ROOT" != x; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
|
||||
fi
|
||||
AC_SUBST(DEVKIT_LIB_DIR)
|
||||
fi
|
||||
]
|
||||
)
|
||||
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
|
||||
# places for backwards compatiblity.
|
||||
if test "x$DEVKIT_SYSROOT" != x; then
|
||||
SYSROOT="$DEVKIT_SYSROOT"
|
||||
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
|
||||
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
|
||||
fi
|
||||
|
||||
if test "x$DEVKIT_ROOT" != x; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
|
||||
fi
|
||||
AC_SUBST(DEVKIT_LIB_DIR)
|
||||
fi
|
||||
fi
|
||||
|
||||
# You can force the sysroot if the sysroot encoded into the compiler tools
|
||||
# is not correct.
|
||||
@@ -813,6 +810,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
| $SED -e 's/config.log//g' \
|
||||
-e 's/configure.log//g' \
|
||||
-e 's/confdefs.h//g' \
|
||||
-e 's/configure-support//g' \
|
||||
-e 's/ //g' \
|
||||
| $TR -d '\n'`
|
||||
if test "x$filtered_files" != x; then
|
||||
@@ -1129,6 +1127,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
fi
|
||||
fi
|
||||
BASIC_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -1185,9 +1185,6 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
[
|
||||
# Did user specify any unknown variables?
|
||||
BASIC_CHECK_LEFTOVER_OVERRIDDEN
|
||||
|
||||
AC_MSG_CHECKING([if build directory is on local disk])
|
||||
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUTDIR,
|
||||
[OUTPUT_DIR_IS_LOCAL="yes"],
|
||||
|
||||
@@ -77,10 +77,11 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`]
|
||||
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
|
||||
| $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
|
||||
AC_MSG_NOTICE([(Your Boot JDK must be version 9 or 10)])
|
||||
AC_MSG_NOTICE([(Your Boot JDK version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
@@ -102,8 +103,33 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
|
||||
[
|
||||
if test "x$with_boot_jdk" != x; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_FOUND=maybe
|
||||
if test -d "$with_boot_jdk"; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_FOUND=maybe
|
||||
elif test -f "$with_boot_jdk"; then
|
||||
case "$with_boot_jdk" in
|
||||
*.tar.gz )
|
||||
BOOT_JDK_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/boot-jdk
|
||||
$RM -rf $BOOT_JDK_SUPPORT_DIR
|
||||
$MKDIR -p $BOOT_JDK_SUPPORT_DIR
|
||||
$GUNZIP -c $with_boot_jdk | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
|
||||
|
||||
# Try to find javac to determine BOOT_JDK path
|
||||
BOOT_JDK_JAVAC_PATH=`$FIND $BOOT_JDK_SUPPORT_DIR | $GREP "/bin/javac"`
|
||||
if test "x$BOOT_JDK_JAVAC_PATH" != x; then
|
||||
BOOT_JDK_FOUND=maybe
|
||||
BOOT_JDK=$($DIRNAME $($DIRNAME $BOOT_JDK_JAVAC_PATH))
|
||||
else
|
||||
BOOT_JDK_FOUND=no
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
BOOT_JDK_FOUND=no
|
||||
;;
|
||||
esac
|
||||
else
|
||||
BOOT_JDK_FOUND=no
|
||||
fi
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
|
||||
fi
|
||||
])
|
||||
@@ -485,10 +511,10 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
|
||||
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`]
|
||||
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
|
||||
AC_MSG_NOTICE([(Your Build JDK must be version 10)])
|
||||
AC_MSG_NOTICE([(Your Build JDK must be version $VERSION_FEATURE)])
|
||||
BUILD_JDK_FOUND=no
|
||||
else
|
||||
# We're done!
|
||||
|
||||
@@ -55,6 +55,7 @@ OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@
|
||||
OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
|
||||
OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
|
||||
OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
|
||||
OPENJDK_TARGET_OS_INCLUDE_SUBDIR := @OPENJDK_BUILD_OS_INCLUDE_SUBDIR@
|
||||
|
||||
HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@
|
||||
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@
|
||||
|
||||
176
make/autoconf/configure
vendored
176
make/autoconf/configure
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2018, 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
|
||||
@@ -43,82 +43,143 @@ fi
|
||||
export CONFIG_SHELL=$BASH
|
||||
export _as_can_reexec=no
|
||||
|
||||
conf_script_dir="$TOPDIR/make/autoconf"
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
if test ! -e $CUSTOM_CONFIG_DIR/generated-configure.sh; then
|
||||
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
|
||||
if test ! -e $custom_hook; then
|
||||
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
CURRENT_DIR=`pwd`
|
||||
if test "x$CURRENT_DIR" = "x$TOPDIR"; then
|
||||
# We are running configure from the src root.
|
||||
# Create '.configure-support' under $TOPDIR/build
|
||||
build_support_dir="$TOPDIR/build/.configure-support"
|
||||
elif test "x$CURRENT_DIR" = "x$CUSTOM_ROOT"; then
|
||||
# We are running configure from the custom root.
|
||||
# Create '.configure-support' under $CUSTOM_ROOT/build
|
||||
build_support_dir="$CUSTOM_ROOT/build/.configure-support"
|
||||
else
|
||||
# We are running configure from outside of the src dir.
|
||||
# Create 'build_support_dir' in the current directory.
|
||||
build_support_dir="$CURRENT_DIR/configure-support"
|
||||
fi
|
||||
|
||||
conf_script_dir="$TOPDIR/make/autoconf"
|
||||
generated_script="$build_support_dir/generated-configure.sh"
|
||||
|
||||
###
|
||||
### Test that the generated configure is up-to-date
|
||||
### Use autoconf to create a runnable configure script, if needed
|
||||
###
|
||||
|
||||
run_autogen_or_fail() {
|
||||
if test "x`which autoconf 2> /dev/null | grep -v '^no autoconf in'`" = x; then
|
||||
echo "Cannot locate autoconf, unable to correct situation."
|
||||
echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
else
|
||||
echo "Running autogen.sh to correct the situation"
|
||||
bash $conf_script_dir/autogen.sh
|
||||
autoconf_missing_help() {
|
||||
APT_GET="`which apt-get 2> /dev/null | grep -v '^no apt-get in'`"
|
||||
YUM="`which yum 2> /dev/null | grep -v '^no yum in'`"
|
||||
BREW="`which brew 2> /dev/null | grep -v '^no brew in'`"
|
||||
CYGWIN="`which cygpath 2> /dev/null | grep -v '^no cygpath in'`"
|
||||
|
||||
if test "x$APT_GET" != x; then
|
||||
PKGHANDLER_COMMAND="sudo apt-get install autoconf"
|
||||
elif test "x$YUM" != x; then
|
||||
PKGHANDLER_COMMAND="sudo yum install autoconf"
|
||||
elif test "x$BREW" != x; then
|
||||
PKGHANDLER_COMMAND="brew install autoconf"
|
||||
elif test "x$CYGWIN" != x; then
|
||||
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
|
||||
fi
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
echo "You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
fi
|
||||
}
|
||||
|
||||
check_autoconf_timestamps() {
|
||||
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 ; do
|
||||
if test $file -nt $conf_script_dir/generated-configure.sh; then
|
||||
echo "Warning: The configure source files is newer than the generated files."
|
||||
run_autogen_or_fail
|
||||
generate_configure_script() {
|
||||
if test "x$AUTOCONF" != x; then
|
||||
if test ! -x "$AUTOCONF"; then
|
||||
echo
|
||||
echo "The specified AUTOCONF variable does not point to a valid autoconf executable:"
|
||||
echo "AUTOCONF=$AUTOCONF"
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
|
||||
if test "x$AUTOCONF" = x; then
|
||||
echo
|
||||
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."
|
||||
echo "You need autoconf to be able to generate a runnable configure script."
|
||||
autoconf_missing_help
|
||||
echo "Error: Cannot find autoconf" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
autoconf_version=`$AUTOCONF --version | head -1`
|
||||
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# If custom source configure is available, make sure it is up-to-date as well.
|
||||
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $CUSTOM_CONFIG_DIR/*.m4; do
|
||||
if test $file -nt $CUSTOM_CONFIG_DIR/generated-configure.sh; then
|
||||
echo "Warning: The configure source files is newer than the custom generated files."
|
||||
run_autogen_or_fail
|
||||
fi
|
||||
done
|
||||
# Generate configure script with custom hooks compiled in.
|
||||
custom_patcher='sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
|
||||
else
|
||||
custom_patcher='cat'
|
||||
fi
|
||||
|
||||
mkdir -p $build_support_dir
|
||||
# Call autoconf but replace the "magic" variable in configure.ac if requested.
|
||||
cat $conf_script_dir/configure.ac | eval $custom_patcher | \
|
||||
${AUTOCONF} -W all -I$conf_script_dir - > $generated_script
|
||||
rm -rf autom4te.cache
|
||||
|
||||
# Sanity check
|
||||
if test ! -s $generated_script; then
|
||||
echo "Error: Failed to generate runnable configure script" 1>&2
|
||||
rm -f $generated_script
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_hg_updates() {
|
||||
if test "x`which hg 2> /dev/null | grep -v '^no hg in'`" != x; then
|
||||
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard . 2> /dev/null`
|
||||
if test "x$conf_updated_autoconf_files" != x; then
|
||||
echo "Configure source code has been updated, checking time stamps"
|
||||
check_autoconf_timestamps
|
||||
elif test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# If custom source configure is available, make sure it is up-to-date as well.
|
||||
conf_custom_updated_autoconf_files=`cd $CUSTOM_CONFIG_DIR && hg status -mard . 2> /dev/null`
|
||||
if test "x$conf_custom_updated_autoconf_files" != x; then
|
||||
echo "Configure custom source code has been updated, checking time stamps"
|
||||
check_autoconf_timestamps
|
||||
fi
|
||||
test_generated_up_to_date() {
|
||||
conf_source_files="$conf_script_dir/configure.ac $conf_script_dir/*.m4"
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
conf_custom_source_files="$CUSTOM_CONFIG_DIR/*.m4"
|
||||
else
|
||||
conf_custom_source_files=""
|
||||
fi
|
||||
|
||||
for file in $conf_source_files $conf_custom_source_files ; do
|
||||
if test $file -nt $generated_script; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Check for local changes
|
||||
check_hg_updates
|
||||
run_autoconf=false
|
||||
if test "x$1" = xautogen; then
|
||||
# User called us as "configure autogen", so force regeneration
|
||||
run_autoconf=true
|
||||
shift
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# Test if open configure is newer than custom configure, if so, custom needs to
|
||||
# be regenerated. This test is required to ensure consistency with custom source.
|
||||
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
|
||||
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $CUSTOM_CONFIG_DIR/generated-configure.sh | cut -d"=" -f 2`
|
||||
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
|
||||
echo "Warning: The generated configure file contains changes not present in the custom generated file."
|
||||
run_autogen_or_fail
|
||||
if test ! -s $generated_script; then
|
||||
# Generated script is missing, so we need to create it
|
||||
echo "Runnable configure script is not present"
|
||||
run_autoconf=true
|
||||
else
|
||||
# File is present, but is it up to date?
|
||||
if test_generated_up_to_date; then
|
||||
echo "Runnable configure script is not up to date"
|
||||
run_autoconf=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$run_autoconf" = xtrue; then
|
||||
echo "Generating runnable configure script at $generated_script"
|
||||
generate_configure_script
|
||||
fi
|
||||
|
||||
# Autoconf calls the configure script recursively sometimes.
|
||||
# Don't start logging twice in that case
|
||||
if test "x$conf_debug_configure" = xtrue; then
|
||||
@@ -240,15 +301,6 @@ conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arg
|
||||
###
|
||||
### Call the configure script
|
||||
###
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
# Custom source configure available; run that instead
|
||||
echo "Running custom generated-configure.sh"
|
||||
conf_script_to_run=$CUSTOM_CONFIG_DIR/generated-configure.sh
|
||||
else
|
||||
echo "Running generated-configure.sh"
|
||||
conf_script_to_run=$conf_script_dir/generated-configure.sh
|
||||
fi
|
||||
|
||||
if test "x$conf_debug_configure" != x; then
|
||||
# Turn on shell debug output if requested (initial or recursive)
|
||||
set -x
|
||||
@@ -259,7 +311,7 @@ fi
|
||||
RCDIR=`mktemp -dt jdk-build-configure.tmp.XXXXXX` || exit $?
|
||||
trap "rm -rf \"$RCDIR\"" EXIT
|
||||
conf_logfile=./configure.log
|
||||
(exec 3>&1 ; ((. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) \
|
||||
(exec 3>&1 ; ((. $generated_script "${conf_processed_arguments[@]}" 2>&1 1>&3 ) \
|
||||
; echo $? > "$RCDIR/rc" ) \
|
||||
| tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile
|
||||
|
||||
@@ -284,7 +336,7 @@ EOT
|
||||
|
||||
# Print additional help, e.g. a list of toolchains and JVM features.
|
||||
# This must be done by the autoconf script.
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $conf_script_to_run PRINTF=printf )
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
|
||||
|
||||
cat <<EOT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SRC#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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,9 +63,6 @@ AC_DEFUN_ONCE([CUSTOM_SUMMARY_AND_WARNINGS_HOOK])
|
||||
# custom sources.
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Initialization / Boot-strapping
|
||||
@@ -166,10 +163,9 @@ JDKOPT_SETUP_STATIC_BUILD
|
||||
# First determine the toolchain type (compiler family)
|
||||
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
|
||||
|
||||
# User supplied flags should be used when configure detects compilers
|
||||
FLAGS_SETUP_USER_SUPPLIED_FLAGS
|
||||
# The sysroot cflags are needed for configure to be able to run the compilers
|
||||
FLAGS_SETUP_SYSROOT_FLAGS
|
||||
# The global flags are needed for configure to be able to run the compilers
|
||||
# correctly.
|
||||
FLAGS_PRE_TOOLCHAIN
|
||||
|
||||
# Then detect the actual binaries needed
|
||||
TOOLCHAIN_PRE_DETECTION
|
||||
@@ -187,17 +183,15 @@ TOOLCHAIN_SETUP_JTREG
|
||||
# Setup Jib dependency tool
|
||||
TOOLCHAIN_SETUP_JIB
|
||||
|
||||
FLAGS_SETUP_INIT_FLAGS
|
||||
# After toolchain setup, we need to process some flags to be able to continue.
|
||||
FLAGS_POST_TOOLCHAIN
|
||||
|
||||
# Now we can test some aspects on the target using configure macros.
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
FLAGS_SETUP_COMPILER_FLAGS_MISC
|
||||
FLAGS_SETUP_FLAGS
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
@@ -280,6 +274,9 @@ CUSTOM_LATE_HOOK
|
||||
# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
|
||||
HOTSPOT_VALIDATE_JVM_FEATURES
|
||||
|
||||
# Did user specify any unknown variables?
|
||||
BASIC_CHECK_LEFTOVER_OVERRIDDEN
|
||||
|
||||
# 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="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
|
||||
|
||||
840
make/autoconf/flags-cflags.m4
Normal file
840
make/autoconf/flags-cflags.m4
Normal file
@@ -0,0 +1,840 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup flags for C/C++ compiler
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# How to compile shared libraries.
|
||||
#
|
||||
AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
[
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
C_FLAG_REORDER=''
|
||||
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
C_FLAG_REORDER=''
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Linking is different on MacOSX
|
||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
|
||||
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
|
||||
# arm specific settings
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
|
||||
# '-Wl,-z,origin' isn't used on arm.
|
||||
SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
|
||||
else
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
C_FLAG_REORDER='-xF'
|
||||
SHARED_LIBRARY_FLAGS="-G"
|
||||
SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-h [$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
C_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-dll"
|
||||
SET_EXECUTABLE_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
|
||||
fi
|
||||
|
||||
AC_SUBST(C_FLAG_REORDER)
|
||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
|
||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
[
|
||||
# Debug symbols
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# -g0 enables debug symbols without disabling inlining.
|
||||
CFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-Z7 -d2Zi+"
|
||||
fi
|
||||
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
[
|
||||
AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
|
||||
[do not consider native warnings to be an error @<:@enabled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if native warnings are errors])
|
||||
if test "x$enable_warnings_as_errors" = "xyes"; then
|
||||
AC_MSG_RESULT([yes (explicitly set)])
|
||||
WARNINGS_AS_ERRORS=true
|
||||
elif test "x$enable_warnings_as_errors" = "xno"; then
|
||||
AC_MSG_RESULT([no])
|
||||
WARNINGS_AS_ERRORS=false
|
||||
elif test "x$enable_warnings_as_errors" = "x"; then
|
||||
AC_MSG_RESULT([yes (default)])
|
||||
WARNINGS_AS_ERRORS=true
|
||||
else
|
||||
AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
|
||||
fi
|
||||
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
|
||||
case "${TOOLCHAIN_TYPE}" in
|
||||
microsoft)
|
||||
DISABLE_WARNING_PREFIX="-wd"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
;;
|
||||
solstudio)
|
||||
DISABLE_WARNING_PREFIX="-erroff="
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
|
||||
;;
|
||||
gcc)
|
||||
DISABLE_WARNING_PREFIX="-Wno-"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
|
||||
# Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
|
||||
# CFLAGS since any target specific flags will likely not work with the
|
||||
# build compiler
|
||||
CC_OLD="$CC"
|
||||
CXX_OLD="$CXX"
|
||||
CC="$BUILD_CC"
|
||||
CXX="$BUILD_CXX"
|
||||
CFLAGS_OLD="$CFLAGS"
|
||||
CFLAGS=""
|
||||
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
|
||||
CC="$CC_OLD"
|
||||
CXX="$CXX_OLD"
|
||||
CFLAGS="$CFLAGS_OLD"
|
||||
;;
|
||||
clang)
|
||||
DISABLE_WARNING_PREFIX="-Wno-"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
|
||||
;;
|
||||
xlc)
|
||||
DISABLE_WARNING_PREFIX="-qsuppress="
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(DISABLE_WARNING_PREFIX)
|
||||
AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
|
||||
AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
|
||||
[
|
||||
# bounds, memory and behavior checking options
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
case $DEBUG_LEVEL in
|
||||
release )
|
||||
# no adjustment
|
||||
;;
|
||||
fastdebug )
|
||||
# no adjustment
|
||||
;;
|
||||
slowdebug )
|
||||
# FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
|
||||
# get's added conditionally on whether we produce debug symbols or not.
|
||||
# This is most likely not really correct.
|
||||
|
||||
# Add runtime stack smashing and undefined behavior checks.
|
||||
CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
|
||||
CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
|
||||
|
||||
JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -fstack-protector-all --param ssp-buffer-size=1"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
|
||||
[
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CC_HIGHEST="-fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
|
||||
|
||||
C_O_FLAG_HIGHEST_JVM="-xO4"
|
||||
C_O_FLAG_DEBUG_JVM=""
|
||||
C_O_FLAG_SIZE=""
|
||||
C_O_FLAG_DEBUG=""
|
||||
C_O_FLAG_NONE=""
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST"
|
||||
C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
|
||||
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 \
|
||||
-xprefetch=auto,explicit -xchip=ultra $CC_HIGHEST"
|
||||
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_SIZE="-Os"
|
||||
C_O_FLAG_DEBUG="-O0"
|
||||
C_O_FLAG_DEBUG_JVM="-O0"
|
||||
C_O_FLAG_NONE="-O0"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# On MacOSX we optimize for size, something
|
||||
# we should do for all platforms?
|
||||
C_O_FLAG_HIGHEST_JVM="-Os"
|
||||
C_O_FLAG_HIGHEST="-Os"
|
||||
C_O_FLAG_HI="-Os"
|
||||
C_O_FLAG_NORM="-Os"
|
||||
C_O_FLAG_DEBUG_JVM=""
|
||||
else
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_DEBUG_JVM="-O0"
|
||||
fi
|
||||
C_O_FLAG_SIZE="-Os"
|
||||
C_O_FLAG_DEBUG="-O0"
|
||||
C_O_FLAG_NONE="-O0"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
|
||||
C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
|
||||
C_O_FLAG_HI="-O3 -qinline -qinlglue"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_DEBUG="-qnoopt"
|
||||
# FIXME: Value below not verified.
|
||||
C_O_FLAG_DEBUG_JVM=""
|
||||
C_O_FLAG_NONE="-qnoopt"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
|
||||
C_O_FLAG_HIGHEST="-O2"
|
||||
C_O_FLAG_HI="-O1"
|
||||
C_O_FLAG_NORM="-O1"
|
||||
C_O_FLAG_DEBUG="-Od"
|
||||
C_O_FLAG_DEBUG_JVM=""
|
||||
C_O_FLAG_NONE="-Od"
|
||||
C_O_FLAG_SIZE="-Os"
|
||||
fi
|
||||
|
||||
# Now copy to C++ flags
|
||||
CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
|
||||
CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
|
||||
CXX_O_FLAG_HI="$C_O_FLAG_HI"
|
||||
CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
|
||||
CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
|
||||
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
|
||||
CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# In solstudio, also add this to C (but not C++) flags...
|
||||
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xalias_level=basic"
|
||||
fi
|
||||
|
||||
# Adjust optimization flags according to debug level.
|
||||
case $DEBUG_LEVEL in
|
||||
release )
|
||||
# no adjustment
|
||||
;;
|
||||
fastdebug )
|
||||
# Not quite so much optimization
|
||||
C_O_FLAG_HI="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
|
||||
;;
|
||||
slowdebug )
|
||||
# Disable optimization
|
||||
C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
|
||||
C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
|
||||
C_O_FLAG_HI="$C_O_FLAG_DEBUG"
|
||||
C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
|
||||
C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
|
||||
CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
|
||||
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
|
||||
CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
|
||||
CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(C_O_FLAG_HIGHEST_JVM)
|
||||
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(C_O_FLAG_SIZE)
|
||||
AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
|
||||
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(CXX_O_FLAG_SIZE)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_CFLAGS],
|
||||
[
|
||||
### CFLAGS
|
||||
|
||||
FLAGS_SETUP_CFLAGS_HELPER
|
||||
|
||||
FLAGS_OS=$OPENJDK_TARGET_OS
|
||||
FLAGS_OS_TYPE=$OPENJDK_TARGET_OS_TYPE
|
||||
FLAGS_CPU=$OPENJDK_TARGET_CPU
|
||||
FLAGS_CPU_ARCH=$OPENJDK_TARGET_CPU_ARCH
|
||||
FLAGS_CPU_BITS=$OPENJDK_TARGET_CPU_BITS
|
||||
FLAGS_CPU_ENDIAN=$OPENJDK_TARGET_CPU_ENDIAN
|
||||
FLAGS_CPU_LEGACY=$OPENJDK_TARGET_CPU_LEGACY
|
||||
FLAGS_CPU_LEGACY_LIB=$OPENJDK_TARGET_CPU_LEGACY_LIB
|
||||
|
||||
FLAGS_SETUP_CFLAGS_CPU_DEP([TARGET])
|
||||
|
||||
FLAGS_OS=$OPENJDK_BUILD_OS
|
||||
FLAGS_OS_TYPE=$OPENJDK_BUILD_OS_TYPE
|
||||
FLAGS_CPU=$OPENJDK_BUILD_CPU
|
||||
FLAGS_CPU_ARCH=$OPENJDK_BUILD_CPU_ARCH
|
||||
FLAGS_CPU_BITS=$OPENJDK_BUILD_CPU_BITS
|
||||
FLAGS_CPU_ENDIAN=$OPENJDK_BUILD_CPU_ENDIAN
|
||||
FLAGS_CPU_LEGACY=$OPENJDK_BUILD_CPU_LEGACY
|
||||
FLAGS_CPU_LEGACY_LIB=$OPENJDK_BUILD_CPU_LEGACY_LIB
|
||||
|
||||
FLAGS_SETUP_CFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
|
||||
|
||||
# Tests are only ever compiled for TARGET
|
||||
CFLAGS_TESTLIB="$CFLAGS_JDKLIB"
|
||||
CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"
|
||||
CFLAGS_TESTEXE="$CFLAGS_JDKEXE"
|
||||
CXXFLAGS_TESTEXE="$CXXFLAGS_JDKEXE"
|
||||
|
||||
AC_SUBST(CFLAGS_TESTLIB)
|
||||
AC_SUBST(CFLAGS_TESTEXE)
|
||||
AC_SUBST(CXXFLAGS_TESTLIB)
|
||||
AC_SUBST(CXXFLAGS_TESTEXE)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# platform independent
|
||||
AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
[
|
||||
#### OS DEFINES, these should be independent on toolchain
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CFLAGS_OS_DEF_JVM="-DLINUX"
|
||||
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CFLAGS_OS_DEF_JVM="-DSOLARIS"
|
||||
CFLAGS_OS_DEF_JDK="-D__solaris__"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
CFLAGS_OS_DEF_JVM="-DAIX"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
|
||||
fi
|
||||
|
||||
# Setup target OS define. Use OS target name but in upper case.
|
||||
OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
|
||||
|
||||
#### GLOBAL DEFINES
|
||||
# Set some common defines. These works for all compilers, but assume
|
||||
# -D is universally accepted.
|
||||
|
||||
# Always enable optional macros for VM.
|
||||
ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
|
||||
|
||||
# Setup some hard coded includes
|
||||
ALWAYS_CFLAGS_JDK=" \
|
||||
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
|
||||
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
|
||||
-I${TOPDIR}/src/java.base/share/native/libjava \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
|
||||
-I${TOPDIR}/src/hotspot/share/include \
|
||||
-I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
|
||||
|
||||
###############################################################################
|
||||
|
||||
# Adjust flags according to debug level.
|
||||
# Setup debug/release defines
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
DEBUG_CFLAGS_JDK="-DNDEBUG"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK -DTRIMMED"
|
||||
fi
|
||||
else
|
||||
DEBUG_CFLAGS_JDK="-DDEBUG"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
|
||||
# Hotspot now overflows its 64K TOC (currently only for debug),
|
||||
# so for debug we build with '-qpic=large -bbigtoc'.
|
||||
DEBUG_CFLAGS_JVM="-qpic=large"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
DEBUG_OPTIONS_FLAGS_JDK="$CFLAGS_DEBUG_OPTIONS"
|
||||
DEBUG_SYMBOLS_CFLAGS_JDK="$CFLAGS_DEBUG_SYMBOLS"
|
||||
fi
|
||||
|
||||
#### TOOLCHAIN DEFINES
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
ALWAYS_DEFINES_JVM="-DSPARC_WORKS -D_Crun_inline_placement"
|
||||
ALWAYS_DEFINES_JDK="-DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
|
||||
ALWAYS_DEFINES_JDK_CXXONLY="-DCC_NOEX"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
ALWAYS_DEFINES_JVM="-D_REENTRANT"
|
||||
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
#
|
||||
# CFLAGS BASIC
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# COMMON to gcc and clang
|
||||
TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
|
||||
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new"
|
||||
TOOLCHAIN_CFLAGS_JDK="-pipe"
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX (but since this gives *worse* performance, use no-strict-aliasing everywhere!)
|
||||
|
||||
CXXSTD_CXXFLAG="-std=gnu++98"
|
||||
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
|
||||
IF_FALSE: [CXXSTD_CXXFLAG=""])
|
||||
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$CXXSTD_CXXFLAG"
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CXXSTD_CXXFLAG"
|
||||
ADLC_CXXFLAG="$CXXSTD_CXXFLAG"
|
||||
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# Restrict the debug information created by Clang to avoid
|
||||
# too big object files and speed the build up a little bit
|
||||
# (see http://llvm.org/bugs/show_bug.cgi?id=7554)
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
TOOLCHAIN_CFLAGS_JDK="-pipe"
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
TOOLCHAIN_CFLAGS_JDK="-mt"
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only
|
||||
TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
|
||||
TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
|
||||
-library=stlport4 -mt -features=no%except"
|
||||
if test "x$DEBUG_LEVEL" = xslowdebug; then
|
||||
# Previously -g was used instead of -g0 for slowdebug; this is equivalent
|
||||
# to setting +d.
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM +d"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
TOOLCHAIN_CFLAGS_JDK="-qchars=signed -qfullpath -qsaveopt" # add on both CFLAGS
|
||||
TOOLCHAIN_CFLAGS_JVM="-qtune=balanced \
|
||||
-qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
|
||||
-qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
|
||||
fi
|
||||
|
||||
# CFLAGS WARNINGS STUFF
|
||||
# Set JVM_CFLAGS warning handling
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# COMMON to gcc and clang
|
||||
WARNING_CFLAGS_JVM="-Wpointer-arith -Wsign-compare -Wunused-function"
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
# Non-zero builds have stricter warnings
|
||||
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wundef -Wformat=2"
|
||||
fi
|
||||
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
|
||||
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wunused-value -Woverloaded-virtual"
|
||||
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
# Non-zero builds have stricter warnings
|
||||
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wreturn-type"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-sometimes-uninitialized"
|
||||
WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
WARNING_CFLAGS_JDK_CONLY="-errshort=tags"
|
||||
WARNING_CFLAGS_JDK_CXXONLY="+w"
|
||||
WARNING_CFLAGS_JDK="-errtags=yes -errfmt"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
WARNING_CFLAGS="-W3"
|
||||
WARNING_CFLAGS_JDK="-wd4800"
|
||||
fi
|
||||
|
||||
# Set some additional per-OS defines.
|
||||
|
||||
# Additional macosx handling
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
|
||||
-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
|
||||
if test -n "$MACOSX_VERSION_MAX"; then
|
||||
OS_CFLAGS="$OS_CFLAGS \
|
||||
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Where does this really belong??
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
PICFLAG="-fPIC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
PICFLAG="-KPIC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
|
||||
# one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
|
||||
# will have to patch this single instruction with a call to some out-of-order code which
|
||||
# does the load from the TOC. This is of course slow. But in that case we also would have
|
||||
# to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
|
||||
# With 'qpic=large' the compiler will by default generate a two-instruction sequence which
|
||||
# can be patched directly by the linker and does not require a jump to out-of-order code.
|
||||
# Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
|
||||
# instead. This creates a distinct TOC for every compilation unit (and thus requires two
|
||||
# loads for accessing a global variable). But there are rumors that this may be seen as a
|
||||
# 'performance feature' because of improved code locality of the symbols used in a
|
||||
# compilation unit.
|
||||
PICFLAG="-qpic"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
PICFLAG=""
|
||||
fi
|
||||
|
||||
JVM_PICFLAG="$PICFLAG"
|
||||
JDK_PICFLAG="$PICFLAG"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Linking is different on MacOSX
|
||||
JDK_PICFLAG=''
|
||||
if test "x$STATIC_BUILD" = xtrue; then
|
||||
JVM_PICFLAG=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
|
||||
fi
|
||||
|
||||
# Optional POSIX functionality needed by the JVM
|
||||
#
|
||||
# Check if clock_gettime is available and in which library. This indicates
|
||||
# availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
|
||||
# don't let it update LIBS.
|
||||
save_LIBS="$LIBS"
|
||||
AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
|
||||
if test "x$LIBS" = "x-lrt "; then
|
||||
CLOCK_GETTIME_IN_LIBRT=true
|
||||
fi
|
||||
LIBS="$save_LIBS"
|
||||
|
||||
if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
|
||||
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DSUPPORTS_CLOCK_MONOTONIC"
|
||||
if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
|
||||
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DNEEDS_LIBRT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# EXPORT
|
||||
AC_SUBST(ADLC_CXXFLAG)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
|
||||
# conditionals against.
|
||||
# $2 - Optional prefix for each variable defined.
|
||||
AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
[
|
||||
#### CPU DEFINES, these should (in theory) be independent on toolchain
|
||||
|
||||
# Setup target CPU
|
||||
# Setup endianness
|
||||
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
|
||||
$1_DEFINES_CPU_JVM="-DVM_LITTLE_ENDIAN"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
|
||||
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
|
||||
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
|
||||
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN="
|
||||
else
|
||||
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN="
|
||||
fi
|
||||
else
|
||||
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
|
||||
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN"
|
||||
else
|
||||
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN"
|
||||
fi
|
||||
fi
|
||||
|
||||
# setup CPU bit size
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DARCH='\"$FLAGS_CPU_LEGACY\"' \
|
||||
-D$FLAGS_CPU_LEGACY"
|
||||
|
||||
if test "x$FLAGS_CPU_BITS" = x64; then
|
||||
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
|
||||
# unpack200.exe.
|
||||
if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
|
||||
fi
|
||||
if test "x$FLAGS_OS" != xsolaris && test "x$FLAGS_OS" != xaix; then
|
||||
# Solaris does not have _LP64=1 in the old build.
|
||||
# xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
|
||||
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
# toolchain dependend, per-cpu
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$FLAGS_CPU_ARCH" = xx86; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DcpuIntel -Di586 -D$FLAGS_CPU_LEGACY_LIB"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x$FLAGS_CPU" = xx86_64; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64"
|
||||
else
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_X86_ -Dx86"
|
||||
fi
|
||||
fi
|
||||
|
||||
# CFLAGS PER CPU
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# COMMON to gcc and clang
|
||||
if test "x$FLAGS_CPU" = xx86; then
|
||||
# Force compatibility with i586 on 32 bit intel platforms.
|
||||
$1_CFLAGS_CPU="-march=i586"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$FLAGS_CPU" = xarm; then
|
||||
# -Wno-psabi to get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
|
||||
$1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
|
||||
$1_CFLAGS_CPU_JVM="-DARM"
|
||||
elif test "x$FLAGS_CPU" = xaarch64; then
|
||||
if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
|
||||
$1_CFLAGS_CPU_JVM="-fsigned-char -DARM"
|
||||
fi
|
||||
elif test "x$FLAGS_CPU_ARCH" = xppc; then
|
||||
$1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
# -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
|
||||
# Use ppc64 instructions, but schedule for power5
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc -mcpu=powerpc64 -mtune=power5"
|
||||
elif test "x$FLAGS_CPU" = xppc64le; then
|
||||
# Little endian machine uses ELFv2 ABI.
|
||||
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
|
||||
fi
|
||||
elif test "x$FLAGS_CPU" = xs390x; then
|
||||
$1_CFLAGS_CPU="-mbackchain -march=z10"
|
||||
fi
|
||||
|
||||
if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
|
||||
# for all archs except arm and ppc, prevent gcc to omit frame pointer
|
||||
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$FLAGS_OS" = xlinux; then
|
||||
# ppc test not really needed for clang
|
||||
if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
|
||||
# for all archs except arm and ppc, prevent gcc to omit frame pointer
|
||||
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$FLAGS_CPU" = xx86_64; then
|
||||
# NOTE: -xregs=no%frameptr is supposed to be default on x64
|
||||
$1_CFLAGS_CPU_JDK="-xregs=no%frameptr"
|
||||
elif test "x$FLAGS_CPU" = xsparcv9; then
|
||||
$1_CFLAGS_CPU_JVM="-xarch=sparc"
|
||||
$1_CFLAGS_CPU_JDK_LIBONLY="-xregs=no%appl"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
$1_CFLAGS_CPU_JVM="-qarch=ppc64"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x$FLAGS_CPU" = xx86; then
|
||||
$1_CFLAGS_CPU_JVM="-arch:IA32"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
# NOTE: This is probably redundant; -homeparams is default on
|
||||
# non-release builds.
|
||||
$1_CFLAGS_CPU_JVM="-homeparams"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($1))
|
||||
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
|
||||
|
||||
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
|
||||
fi
|
||||
|
||||
# EXPORT to API
|
||||
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM $TOOLCHAIN_CFLAGS_JVM \
|
||||
$OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
|
||||
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG"
|
||||
|
||||
CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
|
||||
$OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
|
||||
$WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK"
|
||||
|
||||
# Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
|
||||
# (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
|
||||
# change in the future.)
|
||||
|
||||
CFLAGS_JDK_COMMON_CONLY="$TOOLCHAIN_CFLAGS_JDK_CONLY \
|
||||
$WARNING_CFLAGS_JDK_CONLY ${$2EXTRA_CFLAGS}"
|
||||
CFLAGS_JDK_COMMON_CXXONLY="$ALWAYS_DEFINES_JDK_CXXONLY $TOOLCHAIN_CFLAGS_JDK_CXXONLY \
|
||||
$WARNING_CFLAGS_JDK_CXXONLY ${$2EXTRA_CXXFLAGS}"
|
||||
|
||||
$1_CFLAGS_JVM="${$1_DEFINES_CPU_JVM} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JVM} ${$1_TOOLCHAIN_CFLAGS} ${$1_WARNING_CFLAGS_JVM}"
|
||||
$1_CFLAGS_JDK="${$1_DEFINES_CPU_JDK} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JDK} ${$1_TOOLCHAIN_CFLAGS}"
|
||||
|
||||
$2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM} ${$2EXTRA_CXXFLAGS}"
|
||||
|
||||
$2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK}"
|
||||
$2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK}"
|
||||
$2CFLAGS_JDKLIB="${$2CFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
|
||||
$2CXXFLAGS_JDKLIB="${$2CXXFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
|
||||
|
||||
AC_SUBST($2JVM_CFLAGS)
|
||||
AC_SUBST($2CFLAGS_JDKLIB)
|
||||
AC_SUBST($2CFLAGS_JDKEXE)
|
||||
AC_SUBST($2CXXFLAGS_JDKLIB)
|
||||
AC_SUBST($2CXXFLAGS_JDKEXE)
|
||||
])
|
||||
|
||||
# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
|
||||
# Arguments:
|
||||
# $1 - Prefix for each variable defined.
|
||||
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
|
||||
[
|
||||
# These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
|
||||
# runs afoul of the more aggressive versions of these optimisations.
|
||||
# Notably, value range propagation now assumes that the this pointer of C++
|
||||
# member functions is non-null.
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
|
||||
dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
|
||||
dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
|
||||
dnl IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
|
||||
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
|
||||
dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
|
||||
dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
|
||||
dnl IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
|
||||
AC_MSG_NOTICE([GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}])
|
||||
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
|
||||
])
|
||||
|
||||
# Documentation on common flags used for solstudio in 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.
|
||||
#
|
||||
# -fns: Use non-standard floating point mode (not IEEE 754)
|
||||
# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
|
||||
# -fsingle: Use single precision floating point with 'float'
|
||||
# -xalias_level=basic: 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)
|
||||
# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
|
||||
# -xrestrict: 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)
|
||||
# -xlibmil: Inline some library routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
212
make/autoconf/flags-ldflags.m4
Normal file
212
make/autoconf/flags-ldflags.m4
Normal file
@@ -0,0 +1,212 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, 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([FLAGS_SETUP_LDFLAGS],
|
||||
[
|
||||
FLAGS_SETUP_LDFLAGS_HELPER
|
||||
|
||||
# Setup the target toolchain
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# For any of the variants server, client or minimal, the dir matches the
|
||||
# variant name. The "main" variant should be used for linking. For the
|
||||
# rest, the dir is just server.
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
|
||||
|| HOTSPOT_CHECK_JVM_VARIANT(minimal); then
|
||||
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
|
||||
else
|
||||
TARGET_JVM_VARIANT_PATH=server
|
||||
fi
|
||||
FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
|
||||
|
||||
# Setup the build toolchain
|
||||
|
||||
# When building a buildjdk, it's always only the server variant
|
||||
BUILD_JVM_VARIANT_PATH=server
|
||||
|
||||
FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
|
||||
|
||||
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
|
||||
LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE ${TARGET_LDFLAGS_JDK_LIBPATH}"
|
||||
AC_SUBST(LDFLAGS_TESTLIB)
|
||||
AC_SUBST(LDFLAGS_TESTEXE)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
|
||||
# CPU independent LDFLAGS setup, used for both target and build toolchain.
|
||||
AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
[
|
||||
# Setup basic LDFLAGS
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both, why?
|
||||
# We have previously set HAS_GNU_HASH if this is the case
|
||||
if test -n "$HAS_GNU_HASH"; then
|
||||
BASIC_LDFLAGS="-Wl,--hash-style=both"
|
||||
LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
|
||||
fi
|
||||
|
||||
# Add -z defs, to forbid undefined symbols in object files.
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs"
|
||||
|
||||
BASIC_LDFLAGS_JVM_ONLY="-Wl,-z,noexecstack -Wl,-O1 -Wl,-z,relro"
|
||||
|
||||
BASIC_LDFLAGS_JDK_LIB_ONLY="-Wl,-z,noexecstack"
|
||||
LIBJSIG_NOEXECSTACK_LDFLAGS="-Wl,-z,noexecstack"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
|
||||
-stdlib=libstdc++ -fPIC"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
BASIC_LDFLAGS="-Wl,-z,defs"
|
||||
BASIC_LDFLAGS_ONLYCXX="-norunpath"
|
||||
BASIC_LDFLAGS_ONLYCXX_JDK_ONLY="-xnolib"
|
||||
|
||||
BASIC_LDFLAGS_JDK_ONLY="-ztext"
|
||||
BASIC_LDFLAGS_JVM_ONLY="-library=%none -mt -z noversion"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
BASIC_LDFLAGS="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K \
|
||||
-bdatapsize:64K -bstackpsize:64K"
|
||||
BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
BASIC_LDFLAGS="-nologo -opt:ref"
|
||||
BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
|
||||
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows -base:0x8000000"
|
||||
fi
|
||||
|
||||
# Setup OS-dependent LDFLAGS
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Assume clang or gcc.
|
||||
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
|
||||
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
|
||||
OS_LDFLAGS_JDK_ONLY="-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup debug level-dependent LDFLAGS
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test x$DEBUG_LEVEL = xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
|
||||
else
|
||||
# mark relocations read only on (fast/slow) debug builds
|
||||
DEBUGLEVEL_LDFLAGS_JDK_ONLY="-Wl,-z,relro"
|
||||
fi
|
||||
if test x$DEBUG_LEVEL = xslowdebug; then
|
||||
# do relocations at load
|
||||
DEBUGLEVEL_LDFLAGS="-Wl,-z,now"
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
|
||||
# Hotspot now overflows its 64K TOC (currently only for debug),
|
||||
# so we build with '-qpic=large -bbigtoc'.
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup LDFLAGS for linking executables
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
|
||||
fi
|
||||
|
||||
# Export some intermediate variables for compatibility
|
||||
LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
|
||||
AC_SUBST(LDFLAGS_CXX_JDK)
|
||||
AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
|
||||
AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
|
||||
# conditionals against.
|
||||
# $2 - Optional prefix for each variable defined.
|
||||
AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
|
||||
[
|
||||
# Setup CPU-dependent basic LDFLAGS. These can differ between the target and
|
||||
# build toolchain.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x${OPENJDK_$1_CPU}" = xx86; then
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="-march=i586"
|
||||
elif test "x$OPENJDK_$1_CPU" = xarm; then
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
|
||||
$1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
|
||||
elif test "x$FLAGS_CPU" = xaarch64; then
|
||||
if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x${OPENJDK_$1_CPU}" = "xsparcv9"; then
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="-xarch=sparc"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x${OPENJDK_$1_CPU}" = "xx86"; then
|
||||
$1_CPU_LDFLAGS="-safeseh"
|
||||
# NOTE: Old build added -machine. Probably not needed.
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
|
||||
$1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
|
||||
else
|
||||
$1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"
|
||||
$1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
|
||||
fi
|
||||
fi
|
||||
|
||||
# JVM_VARIANT_PATH depends on if this is build or target...
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
$1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
|
||||
else
|
||||
$1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
|
||||
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
|
||||
fi
|
||||
|
||||
# Export variables according to old definitions, prefix with $2 if present.
|
||||
LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
|
||||
$OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
|
||||
$2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
|
||||
${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
|
||||
$2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
|
||||
${$1_CPU_EXECUTABLE_LDFLAGS}"
|
||||
|
||||
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS_JVM_ONLY \
|
||||
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
|
||||
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
|
||||
|
||||
AC_SUBST($2LDFLAGS_JDKLIB)
|
||||
AC_SUBST($2LDFLAGS_JDKEXE)
|
||||
|
||||
AC_SUBST($2JVM_LDFLAGS)
|
||||
])
|
||||
126
make/autoconf/flags-other.m4
Normal file
126
make/autoconf/flags-other.m4
Normal file
@@ -0,0 +1,126 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup flags for other tools than C/C++ compiler
|
||||
#
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_ARFLAGS],
|
||||
[
|
||||
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ARFLAGS="-r -mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
ARFLAGS="-X64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# lib.exe is used as AR to create static libraries.
|
||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
||||
else
|
||||
ARFLAGS=""
|
||||
fi
|
||||
|
||||
AC_SUBST(ARFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
|
||||
[
|
||||
## Setup strip.
|
||||
# FIXME: should this really be per platform, or should it be per toolchain type?
|
||||
# strip is not provided by clang or solstudio; so guessing platform makes most sense.
|
||||
# FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
STRIPFLAGS="-g"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
STRIPFLAGS="-x"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
STRIPFLAGS="-S"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
STRIPFLAGS="-X32_64"
|
||||
fi
|
||||
|
||||
AC_SUBST(STRIPFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_RCFLAGS],
|
||||
[
|
||||
# On Windows, we need to set RC flags.
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
RC_FLAGS="-nologo -l0x409"
|
||||
JVM_RCFLAGS="-nologo"
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
RC_FLAGS="$RC_FLAGS -DNDEBUG"
|
||||
JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
|
||||
fi
|
||||
|
||||
# The version variables used to create RC_FLAGS may be overridden
|
||||
# in a custom configure script, or possibly the command line.
|
||||
# Let those variables be expanded at make time in spec.gmk.
|
||||
# The \$ are escaped to the shell, and the $(...) variables
|
||||
# are evaluated by make.
|
||||
RC_FLAGS="$RC_FLAGS \
|
||||
-D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
|
||||
-D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
|
||||
-D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
|
||||
-D\"JDK_VER=\$(VERSION_NUMBER)\" \
|
||||
-D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
|
||||
-D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
|
||||
-D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
|
||||
|
||||
JVM_RCFLAGS="$JVM_RCFLAGS \
|
||||
-D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
|
||||
-D\"HS_COMPANY=\$(COMPANY_NAME)\" \
|
||||
-D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
|
||||
-D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
|
||||
-D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
|
||||
-D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
|
||||
-D\"HS_FNAME=jvm.dll\" \
|
||||
-D\"HS_INTERNAL_NAME=jvm\""
|
||||
fi
|
||||
AC_SUBST(RC_FLAGS)
|
||||
AC_SUBST(JVM_RCFLAGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# platform independent
|
||||
AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
JVM_BASIC_ASFLAGS="-x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
|
||||
# conditionals against.
|
||||
# $2 - Optional prefix for each variable defined.
|
||||
AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
|
||||
[
|
||||
# Misuse EXTRA_CFLAGS to mimic old behavior
|
||||
$2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
|
||||
|
||||
AC_SUBST($2JVM_ASFLAGS)
|
||||
])
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
|
||||
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
[
|
||||
# Print a helpful message on how to acquire the necessary build dependency.
|
||||
# $1 is the help tag: freetype, cups, alsa etc
|
||||
# $1 is the help tag: cups, alsa etc
|
||||
MISSING_DEPENDENCY=$1
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@@ -76,24 +76,6 @@ cygwin_help() {
|
||||
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
freetype)
|
||||
HELP_MSG="
|
||||
The freetype library can now be build during the configure process.
|
||||
Download the freetype sources and unpack them into an arbitrary directory:
|
||||
|
||||
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
|
||||
tar -xzf freetype-2.5.3.tar.gz
|
||||
|
||||
Then run configure with '--with-freetype-src=<freetype_src>'. This will
|
||||
automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
|
||||
builds or into '<freetype_src>/lib32' for 32-bit builds.
|
||||
Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
|
||||
and '--with-freetype-lib=<freetype_src>/lib[32|64]' for other builds.
|
||||
|
||||
Alternatively you can unpack the sources like this to use the default directory:
|
||||
|
||||
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -242,10 +224,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
if test "x$TOOLCHAIN_VERSION" != "x"; then
|
||||
print_version=" $TOOLCHAIN_VERSION"
|
||||
fi
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
|
||||
|
||||
@@ -292,6 +271,12 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "You should run without '--no-create | -n' to create the configuration.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
|
||||
printf "WARNING: The toolchain version used is known to have issues. Please\n"
|
||||
printf "consider using a supported version unless you know what you are doing.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -277,13 +277,9 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm; then
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
|
||||
JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
|
||||
HOTSPOT_TARGET_CPU=arm_64
|
||||
HOTSPOT_TARGET_CPU_ARCH=arm
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
|
||||
JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
|
||||
fi
|
||||
|
||||
# Verify that dependencies are met for explicitly set features.
|
||||
|
||||
@@ -381,6 +381,10 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
VENDOR_VERSION_STRING="$with_vendor_version_string"
|
||||
fi
|
||||
|
||||
# We could define --with flags for these, if really needed
|
||||
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
|
||||
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
|
||||
|
||||
AC_MSG_CHECKING([for version string])
|
||||
AC_MSG_RESULT([$VERSION_STRING])
|
||||
|
||||
@@ -398,4 +402,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_SUBST(VERSION_IS_GA)
|
||||
AC_SUBST(VERSION_DATE)
|
||||
AC_SUBST(VENDOR_VERSION_STRING)
|
||||
AC_SUBST(VERSION_CLASSFILE_MAJOR)
|
||||
AC_SUBST(VERSION_CLASSFILE_MINOR)
|
||||
|
||||
])
|
||||
|
||||
@@ -209,7 +209,17 @@ AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
|
||||
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
|
||||
fi
|
||||
|
||||
LIBZ_CFLAGS=""
|
||||
LIBZ_LIBS=""
|
||||
if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then
|
||||
LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib"
|
||||
else
|
||||
LIBZ_LIBS="-lz"
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LIBZ)
|
||||
AC_SUBST(LIBZ_CFLAGS)
|
||||
AC_SUBST(LIBZ_LIBS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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,91 +23,6 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Build the freetype lib from source
|
||||
################################################################################
|
||||
AC_DEFUN([LIB_BUILD_FREETYPE],
|
||||
[
|
||||
FREETYPE_SRC_PATH="$1"
|
||||
BUILD_FREETYPE=yes
|
||||
|
||||
# Check if the freetype sources are acessible..
|
||||
if ! test -d $FREETYPE_SRC_PATH; then
|
||||
AC_MSG_WARN([--with-freetype-src specified, but can not find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
|
||||
BUILD_FREETYPE=no
|
||||
fi
|
||||
# ..and contain a vc2010 project file
|
||||
vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
|
||||
if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
|
||||
AC_MSG_WARN([Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
|
||||
BUILD_FREETYPE=no
|
||||
fi
|
||||
# Now check if configure found a version of 'msbuild.exe'
|
||||
if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
|
||||
AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
|
||||
BUILD_FREETYPE=no
|
||||
fi
|
||||
|
||||
# Ready to go..
|
||||
if test "x$BUILD_FREETYPE" = xyes; then
|
||||
# msbuild requires trailing slashes for output directories
|
||||
freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
|
||||
freetype_lib_path_unix="$freetype_lib_path"
|
||||
freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
freetype_platform=x64
|
||||
else
|
||||
freetype_platform=win32
|
||||
fi
|
||||
|
||||
# The original freetype project file is for VS 2010 (i.e. 'v100'),
|
||||
# so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
|
||||
# Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
|
||||
# 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
|
||||
AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
|
||||
|
||||
# First we try to build the freetype.dll
|
||||
$ECHO -e "@echo off\n"\
|
||||
"$MSBUILD $vcxproj_path "\
|
||||
"/p:PlatformToolset=$PLATFORM_TOOLSET "\
|
||||
"/p:Configuration=\"Release Multithreaded\" "\
|
||||
"/p:Platform=$freetype_platform "\
|
||||
"/p:ConfigurationType=DynamicLibrary "\
|
||||
"/p:TargetName=freetype "\
|
||||
"/p:OutDir=\"$freetype_lib_path\" "\
|
||||
"/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
|
||||
cmd /c freetype.bat
|
||||
|
||||
if test -s "$freetype_lib_path_unix/freetype.dll"; then
|
||||
# If that succeeds we also build freetype.lib
|
||||
$ECHO -e "@echo off\n"\
|
||||
"$MSBUILD $vcxproj_path "\
|
||||
"/p:PlatformToolset=$PLATFORM_TOOLSET "\
|
||||
"/p:Configuration=\"Release Multithreaded\" "\
|
||||
"/p:Platform=$freetype_platform "\
|
||||
"/p:ConfigurationType=StaticLibrary "\
|
||||
"/p:TargetName=freetype "\
|
||||
"/p:OutDir=\"$freetype_lib_path\" "\
|
||||
"/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
|
||||
cmd /c freetype.bat
|
||||
|
||||
if test -s "$freetype_lib_path_unix/freetype.lib"; then
|
||||
# Once we build both, lib and dll, set freetype lib and include path appropriately
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
|
||||
AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
|
||||
else
|
||||
BUILD_FREETYPE=no
|
||||
fi
|
||||
else
|
||||
BUILD_FREETYPE=no
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Check if a potential freeype library match is correct and usable
|
||||
################################################################################
|
||||
@@ -122,7 +37,7 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
|
||||
# First look for the canonical freetype main include file ft2build.h.
|
||||
if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
|
||||
# Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
|
||||
# Oh no! Let's try in the freetype2 directory.
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
|
||||
if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
|
||||
# Fail.
|
||||
@@ -130,33 +45,16 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
if test "x$FOUND_FREETYPE" = "xyes"; then
|
||||
# Include file found, let's continue the sanity check.
|
||||
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
|
||||
|
||||
# Reset to default value
|
||||
FREETYPE_BASE_NAME=freetype
|
||||
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
|
||||
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
|
||||
# On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
|
||||
# for the .6 version explicitly.
|
||||
FREETYPE_BASE_NAME=freetype.6
|
||||
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
|
||||
AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
|
||||
else
|
||||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# On Windows, we will need both .lib and .dll file.
|
||||
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
|
||||
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris" \
|
||||
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
|
||||
# Found lib in isa dir, use that instead.
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
|
||||
@@ -165,10 +63,7 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
|
||||
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
|
||||
|
||||
if test "x$FOUND_FREETYPE" = "xyes"; then
|
||||
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
|
||||
AC_MSG_CHECKING([for freetype includes])
|
||||
AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
|
||||
@@ -184,293 +79,147 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
|
||||
[
|
||||
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
|
||||
[specify prefix directory for the freetype package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
[specify whether to use 'system' or 'bundled' freetype. Other values are errors.
|
||||
The selected option applies to both build time and run time.
|
||||
The default behaviour can be platform dependent.
|
||||
If using 'system' and either the include files or libraries cannot be
|
||||
located automatically, then additionally specify both using
|
||||
--with-freetype-include and --with-freetype-lib.])])
|
||||
AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
|
||||
[specify directory for the freetype include files])])
|
||||
AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
|
||||
[specify directory for the freetype library])])
|
||||
AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
|
||||
[specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
|
||||
AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
|
||||
[disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
|
||||
AC_ARG_WITH(freetype-license, [AS_HELP_STRING([--with-freetype-license],
|
||||
[if bundling freetype, also bundle this license file])])
|
||||
|
||||
# Need to specify explicitly since it needs to be overridden on some versions of macosx
|
||||
# This setup is to verify access to system installed freetype header and libraries.
|
||||
# On Windows and MacOS this does not apply and using these options will report an error.
|
||||
# On other platforms (Linux, Solaris, and perhaps AIX), they will default to using
|
||||
# the system libraries. If they are found automatically, nothing need be done.
|
||||
# If they are not found, the configure "--with-freetype-*" options may be used to fix that.
|
||||
# If the preference is to bundle on these platforms then use --with-freetype=bundled
|
||||
FREETYPE_BASE_NAME=freetype
|
||||
FREETYPE_CFLAGS=
|
||||
FREETYPE_LIBS=
|
||||
FREETYPE_BUNDLE_LIB_PATH=
|
||||
|
||||
if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
|
||||
if (test "x$with_freetype" != x && test "x$with_freetype" != xno) || \
|
||||
(test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
|
||||
(test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
|
||||
(test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
|
||||
AC_MSG_WARN([[freetype not used, so --with-freetype[-*] is ignored]])
|
||||
fi
|
||||
if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
|
||||
AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
|
||||
fi
|
||||
else
|
||||
# freetype is needed to build; go get it!
|
||||
if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
|
||||
(test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
|
||||
AC_MSG_ERROR(['must specify both or neither of --with_freetype_include and --with_freetype_lib])
|
||||
fi
|
||||
|
||||
BUNDLE_FREETYPE="$enable_freetype_bundling"
|
||||
|
||||
if test "x$with_freetype_src" != x; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# Try to build freetype if --with-freetype-src was given on Windows
|
||||
LIB_BUILD_FREETYPE([$with_freetype_src])
|
||||
if test "x$BUILD_FREETYPE" = xyes; then
|
||||
# Okay, we built it. Check that it works.
|
||||
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
|
||||
AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
|
||||
# User has specified settings
|
||||
|
||||
if test "x$BUNDLE_FREETYPE" = x; then
|
||||
# If not specified, default is to bundle freetype
|
||||
BUNDLE_FREETYPE=yes
|
||||
fi
|
||||
|
||||
if test "x$with_freetype" != x; then
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
|
||||
fi
|
||||
|
||||
# Allow --with-freetype-lib and --with-freetype-include to override
|
||||
if test "x$with_freetype_include" != x; then
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
|
||||
fi
|
||||
if test "x$with_freetype_lib" != x; then
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
|
||||
fi
|
||||
|
||||
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
|
||||
# Okay, we got it. Check that it works.
|
||||
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
|
||||
fi
|
||||
else
|
||||
# User specified only one of lib or include. This is an error.
|
||||
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
|
||||
AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
|
||||
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
|
||||
else
|
||||
AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
|
||||
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
|
||||
fi
|
||||
FREETYPE_TO_USE=bundled
|
||||
if (test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_OS" != "xmacosx"); then
|
||||
FREETYPE_TO_USE=system
|
||||
fi
|
||||
if (test "x$with_freetype" != "x"); then
|
||||
if (test "x$with_freetype" = "xsystem"); then
|
||||
FREETYPE_TO_USE=system
|
||||
elif (test "x$with_freetype" = "xbundled"); then
|
||||
FREETYPE_TO_USE=bundled
|
||||
if (test "x$with_freetype_include" != "x" || test "x$with_freetype_lib" != "x"); then
|
||||
AC_MSG_ERROR(['bundled' cannot be specified with --with_freetype_include and --with_freetype_lib])
|
||||
fi
|
||||
else
|
||||
# User did not specify settings, but we need freetype. Try to locate it.
|
||||
AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BUNDLE_FREETYPE" = x; then
|
||||
# If not specified, default is to bundle freetype only on windows
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
BUNDLE_FREETYPE=yes
|
||||
else
|
||||
BUNDLE_FREETYPE=no
|
||||
fi
|
||||
if (test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" != "x"); then
|
||||
FREETYPE_TO_USE=system
|
||||
fi
|
||||
|
||||
if (test "x$FREETYPE_TO_USE" = "xsystem") && \
|
||||
(test "x$OPENJDK_TARGET_OS" = "xwindows" || test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
|
||||
AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
|
||||
fi
|
||||
|
||||
if (test "x$with_freetype_include" != "x"); then
|
||||
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
|
||||
fi
|
||||
if (test "x$with_freetype_lib" != "x"); then
|
||||
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
|
||||
fi
|
||||
|
||||
if (test "x$FREETYPE_TO_USE" = "xsystem"); then
|
||||
if (test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != "x" && test "x$POTENTIAL_FREETYPE_LIB_PATH" != "x"); then
|
||||
# Okay, we got it. Check that it works.
|
||||
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype-lib|include])
|
||||
fi
|
||||
else
|
||||
# User did not specify a location, but asked for system freetype. Try to locate it.
|
||||
|
||||
# If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
|
||||
if test "x$SYSROOT" = x; then
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
if (test "x$SYSROOT" = "x"); then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
# Check modules using pkg-config, but only if we have it (ugly output results otherwise)
|
||||
if test "x$PKG_CONFIG" != x; then
|
||||
if (test "x$PKG_CONFIG" != "x"); then
|
||||
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
if (test "x$FOUND_FREETYPE" = "xyes"); then
|
||||
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
|
||||
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
|
||||
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
if (test "x$OPENJDK_TARGET_OS" = "xsolaris" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
|
||||
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
|
||||
fi
|
||||
# PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
|
||||
if test "x$BUNDLE_FREETYPE" = xyes; then
|
||||
AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
|
||||
FOUND_FREETYPE=no
|
||||
else
|
||||
AC_MSG_CHECKING([for freetype])
|
||||
AC_MSG_RESULT([yes (using pkg-config)])
|
||||
fi
|
||||
AC_MSG_CHECKING([for freetype])
|
||||
AC_MSG_RESULT([yes (using pkg-config)])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
# Check in well-known locations
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$HOME/freetype"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location])
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
|
||||
&& test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
|
||||
# Source is available, as a last resort try to build freetype in default location
|
||||
LIB_BUILD_FREETYPE($FREETYPE_BASE_DIR)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location])
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
fi
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/local"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr/local"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
# Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
|
||||
FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
FREETYPE_BASE_DIR="$SYSROOT/usr"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
if (test "x$OPENJDK_TARGET_CPU_BITS" = "x64"); then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
|
||||
else
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi # end check in well-known locations
|
||||
|
||||
if test "x$FOUND_FREETYPE" != xyes; then
|
||||
if (test "x$FOUND_FREETYPE" != "xyes"); then
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype])
|
||||
AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
|
||||
fi
|
||||
fi # end user specified settings
|
||||
|
||||
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
|
||||
if test "x$FREETYPE_CFLAGS" = x; then
|
||||
BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
|
||||
if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
|
||||
if (test "x$FREETYPE_CFLAGS" = "x"); then
|
||||
if (test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype); then
|
||||
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
|
||||
else
|
||||
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FREETYPE_LIBS" = x; then
|
||||
BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
|
||||
else
|
||||
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
|
||||
fi
|
||||
if (test "x$FREETYPE_LIBS" = "x"); then
|
||||
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Try to compile it
|
||||
AC_MSG_CHECKING([if we can compile and link with freetype])
|
||||
AC_LANG_PUSH(C++)
|
||||
PREV_CXXCFLAGS="$CXXFLAGS"
|
||||
PREV_LIBS="$LIBS"
|
||||
PREV_CXX="$CXX"
|
||||
CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
|
||||
LIBS="$LIBS $FREETYPE_LIBS"
|
||||
CXX="$FIXPATH $CXX"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
#include<ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
int main () {
|
||||
FT_Init_FreeType(NULL);
|
||||
return 0;
|
||||
}
|
||||
]])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
|
||||
AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
|
||||
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype])
|
||||
AC_MSG_RESULT([Using freetype: $FREETYPE_TO_USE])
|
||||
|
||||
AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
|
||||
]
|
||||
)
|
||||
CXXCFLAGS="$PREV_CXXFLAGS"
|
||||
LIBS="$PREV_LIBS"
|
||||
CXX="$PREV_CXX"
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
AC_MSG_CHECKING([if we should bundle freetype])
|
||||
if test "x$BUNDLE_FREETYPE" = xyes; then
|
||||
FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
|
||||
fi
|
||||
AC_MSG_RESULT([$BUNDLE_FREETYPE])
|
||||
|
||||
if test "x$BUNDLE_FREETYPE" = xyes; then
|
||||
FREETYPE_LICENSE=""
|
||||
AC_MSG_CHECKING([for freetype license])
|
||||
if test "x$with_freetype_license" = "xyes"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([--with-freetype-license must have a value])
|
||||
elif test "x$with_freetype_license" != "x"; then
|
||||
AC_MSG_RESULT([$with_freetype_license])
|
||||
FREETYPE_LICENSE="$with_freetype_license"
|
||||
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
|
||||
if test ! -f "$FREETYPE_LICENSE"; then
|
||||
AC_MSG_ERROR([$FREETYPE_LICENSE cannot be found])
|
||||
fi
|
||||
else
|
||||
if test "x$with_freetype" != "x" && test -f $with_freetype/freetype.md; then
|
||||
FREETYPE_LICENSE="$with_freetype/freetype.md"
|
||||
AC_MSG_RESULT([$FREETYPE_LICENSE])
|
||||
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
fi # end freetype needed
|
||||
|
||||
AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
|
||||
AC_SUBST(FREETYPE_TO_USE)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
||||
AC_SUBST(FREETYPE_LIBS)
|
||||
AC_SUBST(FREETYPE_LICENSE)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -81,6 +81,9 @@ AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
|
||||
LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LIBCXX_JVM="-lCrun"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBCXX)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -101,6 +101,67 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
LIB_SETUP_BUNDLED_LIBS
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_SOLARIS_STLPORT
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
GLOBAL_LIBS="-lc"
|
||||
else
|
||||
GLOBAL_LIBS=""
|
||||
fi
|
||||
|
||||
BASIC_JDKLIB_LIBS=""
|
||||
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
||||
BASIC_JDKLIB_LIBS="-ljava -ljvm"
|
||||
fi
|
||||
|
||||
# Math library
|
||||
if test "x$OPENJDK_TARGET_OS" != xsolaris; then
|
||||
BASIC_JVM_LIBS="$LIBM"
|
||||
else
|
||||
# FIXME: This hard-coded path is not really proper.
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
BASIC_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
|
||||
BASIC_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
|
||||
fi
|
||||
BASIC_JVM_LIBS="$BASIC_SOLARIS_LIBM_LIBS"
|
||||
fi
|
||||
|
||||
# Dynamic loading library
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBDL"
|
||||
fi
|
||||
|
||||
# Threading library
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lthread"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lsocket -lsched -ldoor -ldemangle -lnsl \
|
||||
-lrt"
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBCXX_JVM"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
|
||||
wsock32.lib winmm.lib version.lib psapi.lib"
|
||||
fi
|
||||
|
||||
JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
|
||||
JDKEXE_LIBS=""
|
||||
JVM_LIBS="$BASIC_JVM_LIBS"
|
||||
OPENJDK_BUILD_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
|
||||
OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS"
|
||||
|
||||
AC_SUBST(JDKLIB_LIBS)
|
||||
AC_SUBST(JDKEXE_LIBS)
|
||||
AC_SUBST(JVM_LIBS)
|
||||
AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS)
|
||||
AC_SUBST(OPENJDK_BUILD_JVM_LIBS)
|
||||
AC_SUBST(GLOBAL_LIBS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -403,15 +403,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}"
|
||||
AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM)
|
||||
|
||||
if test "x$OPENJDK_$1_CPU_BITS" = x64; then
|
||||
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
|
||||
# unpack200.exe. This variable is used in
|
||||
# FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
|
||||
if test "x$OPENJDK_$1_OS" = xlinux || test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
OPENJDK_$1_ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# FIXME: ... or should this include reduced builds..?
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_$1_CPU_LEGACY"
|
||||
@@ -478,6 +469,14 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
|
||||
|
||||
# For historical reasons, the OS include directories have odd names.
|
||||
OPENJDK_$1_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
OPENJDK_$1_OS_INCLUDE_SUBDIR="win32"
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
OPENJDK_$1_OS_INCLUDE_SUBDIR="darwin"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_$1_OS_INCLUDE_SUBDIR)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
@@ -555,31 +554,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
AC_SUBST(OS_VERSION_MICRO)
|
||||
])
|
||||
|
||||
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
|
||||
# Add -mX to various FLAGS variables.
|
||||
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
|
||||
[
|
||||
# When we add flags to the "official" CFLAGS etc, we need to
|
||||
# keep track of these additions in ADDED_CFLAGS etc. These
|
||||
# will later be checked to make sure only controlled additions
|
||||
# have been made to CFLAGS etc.
|
||||
ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_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}"
|
||||
|
||||
JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
|
||||
JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
[
|
||||
###############################################################################
|
||||
@@ -589,22 +563,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
# is made at runtime.)
|
||||
#
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# Always specify -m flag on Solaris
|
||||
# And -q on AIX because otherwise the compiler produces 32-bit objects by default
|
||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||
elif test "x$COMPILE_TYPE" = xreduced; then
|
||||
if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
|
||||
# Specify -m if running reduced on unix platforms
|
||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
fi
|
||||
|
||||
# Make compilation sanity check
|
||||
AC_CHECK_HEADERS([stdio.h], , [
|
||||
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
|
||||
@@ -627,33 +585,14 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
|
||||
|
||||
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
|
||||
# This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
|
||||
# Let's try to implicitely set the compilers target architecture and retry the test
|
||||
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
|
||||
AC_MSG_NOTICE([Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
|
||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||
|
||||
# We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
|
||||
unset ac_cv_sizeof_int_p
|
||||
# And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#undef SIZEOF_INT_P
|
||||
_ACEOF
|
||||
|
||||
AC_CHECK_SIZEOF([int *], [1111])
|
||||
|
||||
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
|
||||
|
||||
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
|
||||
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
|
||||
if test "x$COMPILE_TYPE" = xreduced; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([reduced])
|
||||
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
|
||||
elif test "x$COMPILE_TYPE" = xcross; then
|
||||
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot continue.])
|
||||
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
|
||||
if test "x$COMPILE_TYPE" = xreduced; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([reduced])
|
||||
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
|
||||
elif test "x$COMPILE_TYPE" = xcross; then
|
||||
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot continue.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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,6 +78,7 @@ OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
|
||||
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
|
||||
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
|
||||
OPENJDK_TARGET_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
|
||||
|
||||
HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@
|
||||
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@
|
||||
@@ -100,6 +101,8 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
|
||||
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
|
||||
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
|
||||
|
||||
OPENJDK_BUILD_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
|
||||
|
||||
# Target platform value in ModuleTarget class file attribute.
|
||||
OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
|
||||
|
||||
@@ -189,6 +192,10 @@ VERSION_DATE := @VERSION_DATE@
|
||||
# Vendor version string
|
||||
VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@
|
||||
|
||||
# Class-file version
|
||||
VERSION_CLASSFILE_MAJOR := @VERSION_CLASSFILE_MAJOR@
|
||||
VERSION_CLASSFILE_MINOR := @VERSION_CLASSFILE_MINOR@
|
||||
|
||||
# Convenience CFLAGS settings for passing version information into native programs.
|
||||
VERSION_CFLAGS := \
|
||||
-DVERSION_FEATURE=$(VERSION_FEATURE) \
|
||||
@@ -204,6 +211,8 @@ VERSION_CFLAGS := \
|
||||
-DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
|
||||
-DVERSION_DATE='"$(VERSION_DATE)"' \
|
||||
-DVENDOR_VERSION_STRING='"$(VENDOR_VERSION_STRING)"' \
|
||||
-DVERSION_CLASSFILE_MAJOR=$(VERSION_CLASSFILE_MAJOR) \
|
||||
-DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \
|
||||
#
|
||||
|
||||
ifneq ($(COMPANY_NAME),)
|
||||
@@ -212,9 +221,9 @@ ifneq ($(COMPANY_NAME),)
|
||||
# Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
|
||||
# Otherwise the default value for VENDOR, which is used to set the "java.vendor"
|
||||
# and "java.vm.vendor" properties is hard-coded into the source code (i.e. in
|
||||
# System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor")
|
||||
# System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor")
|
||||
ifneq ($(COMPANY_NAME), N/A)
|
||||
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
|
||||
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -323,10 +332,9 @@ TEST_JOBS?=@TEST_JOBS@
|
||||
# Default make target
|
||||
DEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@
|
||||
|
||||
FREETYPE_TO_USE:=@FREETYPE_TO_USE@
|
||||
FREETYPE_LIBS:=@FREETYPE_LIBS@
|
||||
FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
|
||||
FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
|
||||
FREETYPE_LICENSE=@FREETYPE_LICENSE@
|
||||
FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
|
||||
CUPS_CFLAGS:=@CUPS_CFLAGS@
|
||||
ALSA_LIBS:=@ALSA_LIBS@
|
||||
@@ -414,7 +422,7 @@ CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
|
||||
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
|
||||
|
||||
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
|
||||
CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
|
||||
ADLC_CXXFLAG=@ADLC_CXXFLAG@
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
|
||||
@@ -427,11 +435,10 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
|
||||
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
|
||||
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
|
||||
|
||||
LDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
|
||||
LDFLAGS_NO_EXEC_STACK := @LDFLAGS_NO_EXEC_STACK@
|
||||
LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
|
||||
LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@
|
||||
|
||||
JVM_CFLAGS := @JVM_CFLAGS@
|
||||
JVM_CFLAGS_SYMBOLS := @JVM_CFLAGS_SYMBOLS@
|
||||
JVM_LDFLAGS := @JVM_LDFLAGS@
|
||||
JVM_ASFLAGS := @JVM_ASFLAGS@
|
||||
JVM_LIBS := @JVM_LIBS@
|
||||
@@ -460,6 +467,7 @@ USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
|
||||
JDKLIB_LIBS:=@JDKLIB_LIBS@
|
||||
GLOBAL_LIBS:=@GLOBAL_LIBS@
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
|
||||
@@ -515,7 +523,6 @@ 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
|
||||
@@ -524,7 +531,6 @@ COPY_DEBUG_SYMBOLS := @COPY_DEBUG_SYMBOLS@
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@
|
||||
|
||||
CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
|
||||
CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
|
||||
|
||||
#
|
||||
# Compress (or not) jars
|
||||
@@ -604,6 +610,8 @@ INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.javadoc
|
||||
INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES))
|
||||
INTERIM_LANGTOOLS_ADD_EXPORTS := \
|
||||
--add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \
|
||||
--add-exports java.base/jdk.internal.jmod=jdk.compiler.interim \
|
||||
--add-exports java.base/jdk.internal.misc=jdk.compiler.interim \
|
||||
#
|
||||
INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
|
||||
$(INTERIM_LANGTOOLS_MODULES))))
|
||||
@@ -618,14 +626,11 @@ JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
|
||||
|
||||
INTERIM_RMIC_BASE_MODULES := jdk.rmic
|
||||
INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES))
|
||||
INTERIM_RMIC_ADD_EXPORTS := \
|
||||
--add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
|
||||
#
|
||||
# Use = to delay expansion of PathList since it's not available in this file.
|
||||
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc,java.corba \
|
||||
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc \
|
||||
--module-path $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules) \
|
||||
$(INTERIM_RMIC_ADD_EXPORTS) \
|
||||
#
|
||||
|
||||
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
|
||||
@@ -677,6 +682,7 @@ NICE:=@NICE@
|
||||
PANDOC:=@FIXPATH@ @PANDOC@
|
||||
PATCH:=@PATCH@
|
||||
PRINTF:=@PRINTF@
|
||||
READLINK:=@READLINK@
|
||||
RM:=@RM@
|
||||
RMDIR:=@RMDIR@
|
||||
SED:=@SED@
|
||||
@@ -701,6 +707,7 @@ CYGPATH:=@CYGPATH@
|
||||
LDD:=@LDD@
|
||||
OTOOL:=@OTOOL@
|
||||
READELF:=@READELF@
|
||||
ELFEDIT:=@ELFEDIT@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
DOT:=@DOT@
|
||||
@@ -726,6 +733,8 @@ ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@
|
||||
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
|
||||
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
|
||||
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
||||
LIBZ_CFLAGS:=@LIBZ_CFLAGS@
|
||||
LIBZ_LIBS:=@LIBZ_LIBS@
|
||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||
MSVCR_DLL:=@MSVCR_DLL@
|
||||
MSVCP_DLL:=@MSVCP_DLL@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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,11 +52,14 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
|
||||
# Minimum supported versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="4.8"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
|
||||
TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc=""
|
||||
|
||||
# Minimum supported linker versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.18"
|
||||
|
||||
# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
|
||||
# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
|
||||
# $1 - optional variable prefix for compiler and version variables (BUILD_)
|
||||
@@ -114,6 +117,57 @@ BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION],
|
||||
fi
|
||||
])
|
||||
|
||||
# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
|
||||
# Must have LD_VERSION_NUMBER.
|
||||
# $1 - optional variable prefix for compiler and version variables (BUILD_)
|
||||
# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
|
||||
AC_DEFUN([TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS],
|
||||
[
|
||||
if [ [[ "[$]$1LD_VERSION_NUMBER" =~ (.*\.){4} ]] ]; then
|
||||
AC_MSG_WARN([Linker version number has more than four parts (W.X.Y.Z): [$]$1LD_VERSION_NUMBER. Comparisons might be wrong.])
|
||||
fi
|
||||
|
||||
if [ [[ "[$]$1LD_VERSION_NUMBER" =~ [0-9]{6} ]] ]; then
|
||||
AC_MSG_WARN([Linker version number has a part larger than 99999: [$]$1LD_VERSION_NUMBER. Comparisons might be wrong.])
|
||||
fi
|
||||
|
||||
$2COMPARABLE_ACTUAL_LD_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "[$]$1LD_VERSION_NUMBER"`
|
||||
])
|
||||
|
||||
# Check if the configured linker is of a specific version or
|
||||
# newer. TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS must have been called before.
|
||||
#
|
||||
# Arguments:
|
||||
# VERSION: The version string to check against the found version
|
||||
# IF_AT_LEAST: block to run if the compiler is at least this version (>=)
|
||||
# IF_OLDER_THAN: block to run if the compiler is older than this version (<)
|
||||
# PREFIX: Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
|
||||
BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_LINKER_VERSION],
|
||||
[*VERSION PREFIX IF_AT_LEAST IF_OLDER_THAN], [$@],
|
||||
[
|
||||
# Need to assign to a variable since m4 is blocked from modifying parts in [].
|
||||
REFERENCE_VERSION=ARG_VERSION
|
||||
|
||||
if [ [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ]; then
|
||||
AC_MSG_ERROR([Internal error: Cannot compare to ARG_VERSION, only four parts (W.X.Y.Z) is supported])
|
||||
fi
|
||||
|
||||
if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then
|
||||
AC_MSG_ERROR([Internal error: Cannot compare to ARG_VERSION, only parts < 99999 is supported])
|
||||
fi
|
||||
|
||||
# Version comparison method inspired by http://stackoverflow.com/a/24067243
|
||||
COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$REFERENCE_VERSION"`
|
||||
|
||||
if test [$]ARG_PREFIX[COMPARABLE_ACTUAL_LD_VERSION] -ge $COMPARABLE_REFERENCE_VERSION ; then
|
||||
:
|
||||
ARG_IF_AT_LEAST
|
||||
else
|
||||
:
|
||||
ARG_IF_OLDER_THAN
|
||||
fi
|
||||
])
|
||||
|
||||
# Setup a number of variables describing how native output files are
|
||||
# named on this platform/toolchain.
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
|
||||
@@ -241,6 +295,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
|
||||
toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
|
||||
TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
|
||||
toolchain_var_name=TOOLCHAIN_MINIMUM_LD_VERSION_$TOOLCHAIN_TYPE
|
||||
TOOLCHAIN_MINIMUM_LD_VERSION=${!toolchain_var_name}
|
||||
toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
|
||||
TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
|
||||
toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
|
||||
@@ -286,7 +342,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
if test "x$XCODE_VERSION_OUTPUT" != x; then
|
||||
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
|
||||
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
|
||||
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
|
||||
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
|
||||
else
|
||||
# Currently we do not define this for other toolchains. This might change as the need arise.
|
||||
TOOLCHAIN_VERSION=
|
||||
@@ -524,6 +580,76 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
|
||||
])
|
||||
|
||||
# Retrieve the linker version number and store it in LD_VERSION_NUMBER
|
||||
# (as a dotted number), and
|
||||
# the full version string in LD_VERSION_STRING.
|
||||
#
|
||||
# $1 = linker to test (LD or BUILD_LD)
|
||||
# $2 = human readable name of linker (Linker or BuildLinker)
|
||||
AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
|
||||
[
|
||||
LINKER=[$]$1
|
||||
LINKER_NAME=$2
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# cc -Wl,-V output typically looks like
|
||||
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2329
|
||||
|
||||
# solstudio cc requires us to have an existing file to pass as argument,
|
||||
# but it need not be a syntactically correct C file, so just use
|
||||
# ourself. :)
|
||||
LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $HEAD -n 1 | $SED -e 's/ld: //'`
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ]
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
LINKER_VERSION_STRING="Unknown"
|
||||
LINKER_VERSION_NUMBER="0.0"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# There is no specific version flag, but all output starts with a version string.
|
||||
# First line typically looks something like:
|
||||
# Microsoft (R) Incremental Linker Version 12.00.31101.0
|
||||
LINKER_VERSION_STRING=`$LD 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# gcc -Wl,-version output typically looks like
|
||||
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
|
||||
# Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
# This program is free software; [...]
|
||||
LINKER_VERSION_STRING=`$LD -Wl,-version 2>&1 | $HEAD -n 1`
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# clang -Wl,-v output typically looks like
|
||||
# @(#)PROGRAM:ld PROJECT:ld64-305
|
||||
# configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
|
||||
# Library search paths: [...]
|
||||
# or
|
||||
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
|
||||
|
||||
LINKER_VERSION_STRING=`$LD -Wl,-v 2>&1 | $HEAD -n 1`
|
||||
# Check if we're using the GNU ld
|
||||
$ECHO "$LINKER_VERSION_STRING" | $GREP "GNU" > /dev/null
|
||||
if test $? -eq 0; then
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
else
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.*-\([0-9][0-9]*\)/\1/'` ]
|
||||
fi
|
||||
fi
|
||||
|
||||
$1_VERSION_NUMBER="$LINKER_VERSION_NUMBER"
|
||||
$1_VERSION_STRING="$LINKER_VERSION_STRING"
|
||||
|
||||
AC_MSG_NOTICE([Using $TOOLCHAIN_TYPE $LINKER_NAME version $LINKER_VERSION_NUMBER @<:@$LINKER_VERSION_STRING@:>@])
|
||||
])
|
||||
|
||||
# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
|
||||
# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
|
||||
# archiver (AR). Verify that the compilers are correct according to the
|
||||
@@ -591,6 +717,17 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)
|
||||
AC_SUBST(LDCXX)
|
||||
|
||||
TOOLCHAIN_EXTRACT_LD_VERSION([LD], [linker])
|
||||
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS
|
||||
|
||||
if test "x$TOOLCHAIN_MINIMUM_LD_VERSION" != x; then
|
||||
TOOLCHAIN_CHECK_LINKER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_LD_VERSION,
|
||||
IF_OLDER_THAN: [
|
||||
AC_MSG_WARN([You are using a linker older than $TOOLCHAIN_MINIMUM_LD_VERSION. This is not a supported configuration.])
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
#
|
||||
# Setup the assembler (AS)
|
||||
#
|
||||
@@ -783,7 +920,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
fi
|
||||
|
||||
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
|
||||
FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
|
||||
|
||||
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
||||
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
|
||||
@@ -819,6 +955,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
TOOLCHAIN_EXTRACT_COMPILER_VERSION(BUILD_CC, [BuildC])
|
||||
TOOLCHAIN_EXTRACT_COMPILER_VERSION(BUILD_CXX, [BuildC++])
|
||||
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
|
||||
TOOLCHAIN_EXTRACT_LD_VERSION(BUILD_LD, [build linker])
|
||||
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
|
||||
else
|
||||
# If we are not cross compiling, use the normal target compilers for
|
||||
# building the build platform executables.
|
||||
@@ -830,11 +968,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BUILD_AS="$AS"
|
||||
BUILD_OBJCOPY="$OBJCOPY"
|
||||
BUILD_STRIP="$STRIP"
|
||||
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
|
||||
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
|
||||
BUILD_AR="$AR"
|
||||
|
||||
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([], [OPENJDK_BUILD_])
|
||||
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_CC)
|
||||
@@ -843,8 +980,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
AC_SUBST(BUILD_LDCXX)
|
||||
AC_SUBST(BUILD_NM)
|
||||
AC_SUBST(BUILD_AS)
|
||||
AC_SUBST(BUILD_SYSROOT_CFLAGS)
|
||||
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
|
||||
AC_SUBST(BUILD_AR)
|
||||
])
|
||||
|
||||
@@ -876,24 +1011,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
# 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'`
|
||||
# This is later checked when setting flags.
|
||||
|
||||
# "-Og" suppported for GCC 4.8 and later
|
||||
CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
|
||||
IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
|
||||
IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
|
||||
|
||||
# "-z relro" supported in GNU binutils 2.17 and later
|
||||
LINKER_RELRO_FLAG="-Wl,-z,relro"
|
||||
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
|
||||
IF_TRUE: [HAS_LINKER_RELRO=true],
|
||||
IF_FALSE: [HAS_LINKER_RELRO=false])
|
||||
|
||||
# "-z now" supported in GNU binutils 2.11 and later
|
||||
LINKER_NOW_FLAG="-Wl,-z,now"
|
||||
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
|
||||
IF_TRUE: [HAS_LINKER_NOW=true],
|
||||
IF_FALSE: [HAS_LINKER_NOW=false])
|
||||
fi
|
||||
|
||||
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
################################################################################
|
||||
# The order of these defines the priority by which we try to find them.
|
||||
VALID_VS_VERSIONS="2013 2012 2010"
|
||||
VALID_VS_VERSIONS="2013 2012 2010 2015 2017"
|
||||
|
||||
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
|
||||
VS_VERSION_INTERNAL_2010=100
|
||||
@@ -58,6 +58,30 @@ VS_SDK_INSTALLDIR_2013=
|
||||
VS_VS_PLATFORM_NAME_2013="v120"
|
||||
VS_SDK_PLATFORM_NAME_2013=
|
||||
|
||||
VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
|
||||
VS_VERSION_INTERNAL_2015=140
|
||||
VS_MSVCR_2015=vcruntime140.dll
|
||||
VS_MSVCP_2015=msvcp140.dll
|
||||
VS_ENVVAR_2015="VS140COMNTOOLS"
|
||||
VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
|
||||
VS_SDK_INSTALLDIR_2015=
|
||||
VS_VS_PLATFORM_NAME_2015="v140"
|
||||
VS_SDK_PLATFORM_NAME_2015=
|
||||
# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
|
||||
# explicitly specifying Windows Kit 8.1 to be used.
|
||||
VS_ENV_ARGS_2015="8.1"
|
||||
|
||||
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
|
||||
VS_VERSION_INTERNAL_2017=141
|
||||
VS_MSVCR_2017=vcruntime140.dll
|
||||
VS_MSVCP_2017=msvcp140.dll
|
||||
VS_ENVVAR_2017="VS150COMNTOOLS"
|
||||
VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
|
||||
VS_EDITIONS_2017="BuildTools Community Professional Enterprise"
|
||||
VS_SDK_INSTALLDIR_2017=
|
||||
VS_VS_PLATFORM_NAME_2017="v141"
|
||||
VS_SDK_PLATFORM_NAME_2017=
|
||||
|
||||
################################################################################
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
@@ -67,23 +91,41 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
VS_BASE="$2"
|
||||
METHOD="$3"
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
VCVARSFILE="vc/bin/vcvars32.bat"
|
||||
else
|
||||
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
|
||||
# In VS 2017, the default installation is in a subdir named after the edition.
|
||||
# Find the first one present and use that.
|
||||
if test "x$VS_EDITIONS" != x; then
|
||||
for edition in $VS_EDITIONS; do
|
||||
if test -d "$VS_BASE/$edition"; then
|
||||
VS_BASE="$VS_BASE/$edition"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
|
||||
if test -d "$VS_BASE"; then
|
||||
if test -f "$VS_BASE/$VCVARSFILE"; then
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
|
||||
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
|
||||
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
|
||||
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
|
||||
else
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
|
||||
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
|
||||
fi
|
||||
|
||||
for VCVARSFILE in $VCVARSFILES; do
|
||||
if test -f "$VS_BASE/$VCVARSFILE"; then
|
||||
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
AC_MSG_NOTICE([Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring])
|
||||
else
|
||||
# PLATFORM_TOOLSET is used during the compilation of the freetype sources
|
||||
# (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
|
||||
# 'v110' or 'v120' for VS 2010, 2012 or VS2013
|
||||
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -133,7 +175,9 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
|
||||
eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
|
||||
eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
|
||||
eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
|
||||
eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
|
||||
eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
|
||||
|
||||
# When using --with-tools-dir, assume it points to the correct and default
|
||||
# version of Visual Studio or that --with-toolchain-version was also set.
|
||||
@@ -153,7 +197,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
fi
|
||||
|
||||
VS_ENV_CMD=""
|
||||
VS_ENV_ARGS=""
|
||||
|
||||
if test "x$VS_COMNTOOLS" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
@@ -213,7 +256,11 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
elif test "x$DEVKIT_VS_VERSION" != x; then
|
||||
VS_VERSION=$DEVKIT_VS_VERSION
|
||||
TOOLCHAIN_VERSION=$VS_VERSION
|
||||
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
|
||||
# If the devkit has a name, use that as description
|
||||
VS_DESCRIPTION="$DEVKIT_NAME"
|
||||
if test "x$VS_DESCRIPTION" = x; then
|
||||
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
|
||||
fi
|
||||
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||
@@ -267,6 +314,11 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
|
||||
if test "$TOOLCHAIN_VERSION" -gt 2013; then
|
||||
UNSUPPORTED_TOOLCHAIN_VERSION=yes
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -320,6 +372,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
# This will end up something like:
|
||||
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
|
||||
$ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
# In some cases, the VS_ENV_CMD will change directory, change back so
|
||||
# the set-vs-env.sh ends up in the right place.
|
||||
$ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
|
||||
# These will end up something like:
|
||||
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
|
||||
# The trailing space for everyone except PATH is no typo, but is needed due
|
||||
@@ -483,18 +538,30 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
MSVC_DLL=
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
# Probe: Using well-known location from Visual Studio 10.0
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||
if test "$VS_VERSION" -lt 2017; then
|
||||
# Probe: Using well-known location from Visual Studio 12.0 and older
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||
else
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||
fi
|
||||
else
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||
# Probe: Using well-known location from VS 2017
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
else
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
fi
|
||||
fi
|
||||
$ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
[well-known location in VCINSTALLDIR])
|
||||
# In case any of the above finds more than one file, loop over them.
|
||||
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
|
||||
$ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
|
||||
[well-known location in VCINSTALLDIR])
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -576,7 +643,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
|
||||
fi
|
||||
fi
|
||||
MSVCR_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
|
||||
@@ -599,7 +666,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
|
||||
fi
|
||||
fi
|
||||
MSVCP_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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,11 +25,14 @@
|
||||
|
||||
# Default version numbers to use unless overridden by configure
|
||||
|
||||
DEFAULT_VERSION_FEATURE=10
|
||||
DEFAULT_VERSION_FEATURE=11
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=0
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_DATE=2018-03-20
|
||||
DEFAULT_VERSION_DATE=2018-09-18
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="9 10 11"
|
||||
|
||||
LAUNCHER_NAME=openjdk
|
||||
PRODUCT_NAME=OpenJDK
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, 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
|
||||
$$(call LogInfo, Compiling IDL $(patsubst $2/%,%,$4))
|
||||
$$(call MakeDir, $$(@D))
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
$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) -r $3/$$($4_TMPDIR)/* $3
|
||||
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
endef
|
||||
|
||||
# Setup make rules for creating an IDL compilation.
|
||||
#
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||
# and the targets generated are listed in a variable by that name.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# IDLJ
|
||||
# SRC
|
||||
# BIN
|
||||
# INCLUDES
|
||||
# EXCLUDES
|
||||
# OLDIMPLBASES
|
||||
# DELETES
|
||||
SetupIdlCompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupIdlCompilationBody
|
||||
|
||||
# Find all existing java files and existing class files.
|
||||
$$(call MakeDir,$$($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
|
||||
119
make/common/JdkNativeCompilation.gmk
Normal file
119
make/common/JdkNativeCompilation.gmk
Normal file
@@ -0,0 +1,119 @@
|
||||
#
|
||||
# Copyright (c) 2018, 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.
|
||||
#
|
||||
|
||||
ifndef _JDK_NATIVE_COMPILATION_GMK
|
||||
_JDK_NATIVE_COMPILATION_GMK := 1
|
||||
|
||||
ifeq ($(_MAKEBASE_GMK), )
|
||||
$(error You must include MakeBase.gmk prior to including JdkNativeCompilation.gmk)
|
||||
endif
|
||||
|
||||
include NativeCompilation.gmk
|
||||
|
||||
# Setup make rules for creating a native shared library with suitable defaults
|
||||
# for the OpenJDK project.
|
||||
#
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||
# and the targets generated are listed in a variable by that name.
|
||||
#
|
||||
# Remaining parameters are named arguments. These are all passed on to
|
||||
# SetupNativeCompilation, except for
|
||||
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
|
||||
SetupJdkLibrary = $(NamedParamsMacroTemplate)
|
||||
define SetupJdkLibraryBody
|
||||
ifeq ($$($1_OUTPUT_DIR), )
|
||||
$1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_OBJECT_DIR), )
|
||||
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_VERSIONINFO_RESOURCE), )
|
||||
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
|
||||
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
|
||||
$1_VERSIONINFO_RESOURCE :=
|
||||
endif
|
||||
|
||||
ifeq ($$($1_RC_FLAGS), )
|
||||
$1_RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=$$($1_NAME).dll" \
|
||||
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
|
||||
-D "JDK_FTYPE=0x2L"
|
||||
else ifeq ($$($1_RC_FLAGS), DISABLE)
|
||||
$1_RC_FLAGS :=
|
||||
endif
|
||||
|
||||
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
|
||||
|
||||
# Since we reuse the rule name ($1), all our arguments will pass through.
|
||||
# We lose in transparency, but gain in brevity in this call...
|
||||
$$(eval $$(call SetupNativeCompilation, $1, ))
|
||||
endef
|
||||
|
||||
# Setup make rules for creating a native executable with suitable defaults for
|
||||
# the OpenJDK project.
|
||||
#
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||
# and the targets generated are listed in a variable by that name.
|
||||
#
|
||||
# Remaining parameters are named arguments. These are all passed on to
|
||||
# SetupNativeCompilation, except for
|
||||
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
|
||||
SetupJdkExecutable = $(NamedParamsMacroTemplate)
|
||||
define SetupJdkExecutableBody
|
||||
$1_TYPE := EXECUTABLE
|
||||
|
||||
ifeq ($$($1_OUTPUT_DIR), )
|
||||
$1_OUTPUT_DIR := $$(call FindExecutableDirForModule, $$(MODULE))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_OBJECT_DIR), )
|
||||
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$$($1_NAME)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_VERSIONINFO_RESOURCE), )
|
||||
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
|
||||
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
|
||||
$1_VERSIONINFO_RESOURCE :=
|
||||
endif
|
||||
|
||||
ifeq ($$($1_RC_FLAGS), )
|
||||
$1_RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=$$($1_NAME).exe" \
|
||||
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
|
||||
-D "JDK_FTYPE=0x01L"
|
||||
else ifeq ($$($1_RC_FLAGS), DISABLE)
|
||||
$1_RC_FLAGS :=
|
||||
endif
|
||||
|
||||
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
|
||||
|
||||
# Since we reuse the rule name ($1), all our arguments will pass through.
|
||||
# We lose in transparency, but gain in brevity in this call...
|
||||
$$(eval $$(call SetupNativeCompilation, $1))
|
||||
endef
|
||||
|
||||
endif # _JDK_NATIVE_COMPILATION_GMK
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -67,6 +67,7 @@ endef
|
||||
# In GNU Make 4.0 and higher, there is a file function for writing to files.
|
||||
ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
|
||||
HAS_FILE_FUNCTION := true
|
||||
CORRECT_FUNCTION_IN_RECIPE_EVALUATION := true
|
||||
endif
|
||||
|
||||
##############################
|
||||
@@ -423,7 +424,7 @@ _sequence-do = \
|
||||
|
||||
################################################################################
|
||||
|
||||
MAX_PARAMS := 35
|
||||
MAX_PARAMS := 36
|
||||
PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
|
||||
|
||||
# Template for creating a macro taking named parameters. To use it, assign the
|
||||
@@ -518,12 +519,14 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
define install-file
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
if [ '$(call DecodeSpace, $(dir $@))' != \
|
||||
if [ '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))' != \
|
||||
'$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \
|
||||
$(CP) -f -r -P '$(call DecodeSpace, $<)' '$(call DecodeSpace, $(@D))'; \
|
||||
if [ '$(call DecodeSpace, $(@F))' != \
|
||||
$(CP) -f -r -P '$(call DecodeSpace, $<)' \
|
||||
'$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))'; \
|
||||
if [ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $@)))' != \
|
||||
'$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))' ]; then \
|
||||
$(MV) '$(call DecodeSpace, $(@D)/$(<F))' '$(call DecodeSpace, $@)'; \
|
||||
$(MV) '$(call DecodeSpace, $(dir $(call EncodeSpace, $@))/$(notdir $(call EncodeSpace, $<)))' \
|
||||
'$(call DecodeSpace, $@)'; \
|
||||
fi; \
|
||||
else \
|
||||
if [ -L '$(call DecodeSpace, $<)' ]; then \
|
||||
@@ -545,8 +548,18 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
define install-file
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
|
||||
if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then $(XATTR) -cs '$(call DecodeSpace, $@)'; fi
|
||||
# Work around a weirdness with cp on Macosx. When copying a symlink, if
|
||||
# the target of the link is write protected (e.g. 444), cp will add
|
||||
# write permission for the user on the target file (644). Avoid this by
|
||||
# using ln to create a new link instead.
|
||||
if [ -h '$(call DecodeSpace, $<)' ]; then \
|
||||
$(LN) -s "`$(READLINK) '$(call DecodeSpace, $<)'`" '$(call DecodeSpace, $@)'; \
|
||||
else \
|
||||
$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
|
||||
fi
|
||||
if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then \
|
||||
$(XATTR) -cs '$(call DecodeSpace, $@)'; \
|
||||
fi
|
||||
endef
|
||||
else
|
||||
define install-file
|
||||
@@ -1000,6 +1013,7 @@ endif
|
||||
# Param 2 - The command to run
|
||||
ExecuteWithLog = \
|
||||
$(call LogCmdlines, Exececuting: [$(strip $2)]) \
|
||||
$(call MakeDir, $(dir $(strip $1))) \
|
||||
$(call WriteFile, $2, $(strip $1).cmdline) \
|
||||
( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
|
||||
( exitcode=$(DOLLAR)? && \
|
||||
@@ -1013,6 +1027,12 @@ ExecuteWithLog = \
|
||||
FindLibDirForModule = \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
|
||||
|
||||
################################################################################
|
||||
# Find executable dir for module
|
||||
# Param 1 - module name
|
||||
FindExecutableDirForModule = \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
|
||||
|
||||
################################################################################
|
||||
# Return a string suitable for use after a -classpath or --module-path option. It
|
||||
# will be correct and safe to use on all platforms. Arguments are given as space
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2018, 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
|
||||
@@ -74,24 +74,13 @@ BOOT_MODULES += \
|
||||
# Modules that directly or indirectly requiring upgradeable modules
|
||||
# should carefully be considered if it should be upgradeable or not.
|
||||
UPGRADEABLE_MODULES += \
|
||||
java.activation \
|
||||
java.compiler \
|
||||
java.corba \
|
||||
java.transaction \
|
||||
java.xml.bind \
|
||||
java.xml.ws \
|
||||
java.xml.ws.annotation \
|
||||
jdk.internal.vm.compiler \
|
||||
#
|
||||
|
||||
UPGRADEABLE_TOOL_MODULES += \
|
||||
jdk.xml.bind \
|
||||
jdk.xml.ws \
|
||||
#
|
||||
|
||||
AGGREGATOR_MODULES += \
|
||||
java.se \
|
||||
java.se.ee \
|
||||
#
|
||||
|
||||
PLATFORM_MODULES += \
|
||||
@@ -105,6 +94,7 @@ PLATFORM_MODULES += \
|
||||
java.smartcardio \
|
||||
java.sql \
|
||||
java.sql.rowset \
|
||||
java.transaction.xa \
|
||||
java.xml.crypto \
|
||||
jdk.accessibility \
|
||||
jdk.charsets \
|
||||
@@ -143,7 +133,7 @@ JRE_TOOL_MODULES += \
|
||||
# DOCS_MODULES defines the root modules for javadoc generation.
|
||||
# All of their `require transitive` modules directly and indirectly will be included.
|
||||
DOCS_MODULES += \
|
||||
java.se.ee \
|
||||
java.se \
|
||||
java.smartcardio \
|
||||
jdk.accessibility \
|
||||
jdk.attach \
|
||||
@@ -195,8 +185,6 @@ LANGTOOLS_MODULES := \
|
||||
jdk.jshell \
|
||||
#
|
||||
|
||||
CORBA_MODULES := java.corba
|
||||
|
||||
HOTSPOT_MODULES := \
|
||||
jdk.aot \
|
||||
jdk.hotspot.agent \
|
||||
@@ -395,7 +383,7 @@ FindTransitiveIndirectDepsForModules = \
|
||||
# Upgradeable modules are those that are either defined as upgradeable or that
|
||||
# require an upradeable module.
|
||||
FindAllUpgradeableModules = \
|
||||
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES) $(UPGRADEABLE_TOOL_MODULES)))
|
||||
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES)))
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2018, 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
|
||||
@@ -30,7 +30,7 @@
|
||||
ifndef _NATIVE_COMPILATION_GMK
|
||||
_NATIVE_COMPILATION_GMK := 1
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
ifeq ($(_MAKEBASE_GMK), )
|
||||
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
|
||||
endif
|
||||
|
||||
@@ -150,7 +150,7 @@ NATIVE_SOURCE_EXTENSIONS := %.s %.S %.c %.cpp %.cc %.m %.mm
|
||||
define replace_with_obj_extension
|
||||
$(strip \
|
||||
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
|
||||
$(patsubst $(extension),%$(OBJ_SUFFIX),$(filter $(extension),$1))) \
|
||||
$(patsubst $(extension),%$(OBJ_SUFFIX), $(filter $(extension), $1))) \
|
||||
)
|
||||
endef
|
||||
|
||||
@@ -183,150 +183,160 @@ DEPENDENCY_TARGET_SED_PATTERN := \
|
||||
-e 's/$$$$/ :/' \
|
||||
#
|
||||
|
||||
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
|
||||
# param 9 = set to disable THIS_FILE
|
||||
################################################################################
|
||||
# Create the recipe needed to compile a single native source file.
|
||||
#
|
||||
# Parameter 1 is the name of the rule, based on the name of the library/
|
||||
# program being build and the name of the source code file, e.g.
|
||||
# BUILD_LIBFOO_fooMain.cpp.
|
||||
#
|
||||
# Remaining parameters are named arguments:
|
||||
# FILE - The full path of the source file to compiler
|
||||
# BASE - The name of the rule for the entire binary to build ($1)
|
||||
# DISABLE_THIS_FILE_DEFINE - Set to true to disable the THIS_FILE define.
|
||||
#
|
||||
SetupCompileNativeFile = $(NamedParamsMacroTemplate)
|
||||
define SetupCompileNativeFileBody
|
||||
$1_FILENAME := $$(notdir $$($1_FILE))
|
||||
|
||||
ifeq ($9, )
|
||||
$1_$2_THIS_FILE = -DTHIS_FILE='"$$(<F)"'
|
||||
endif
|
||||
# The target file to be generated.
|
||||
$1_OBJ := $$($$($1_BASE)_OBJECT_DIR)/$$(call replace_with_obj_extension, \
|
||||
$$($1_FILENAME))
|
||||
|
||||
ifeq ($$($1_$(notdir $2)_OPTIMIZATION), )
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $$($1_OPT_CFLAGS)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $$($1_OPT_CXXFLAGS)
|
||||
else
|
||||
ifeq (NONE, $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_NONE)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
else ifeq (LOW, $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_NORM)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
|
||||
else ifeq (HIGH, $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HI)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
|
||||
else ifeq (HIGHEST, $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
|
||||
else ifeq (HIGHEST_JVM, $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
|
||||
else ifeq (SIZE, $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_SIZE)
|
||||
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
|
||||
# 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_OBJ), $$($$($1_BASE)_OBJS_SO_FAR)), )
|
||||
$$($1_BASE)_OBJS_SO_FAR += $$($1_OBJ)
|
||||
# This is the definite source file to use for $1_FILENAME.
|
||||
$1_SRC_FILE := $$($1_FILE)
|
||||
|
||||
ifneq ($$($1_DISABLE_THIS_FILE_DEFINE), true)
|
||||
$1_THIS_FILE = -DTHIS_FILE='"$$(<F)"'
|
||||
endif
|
||||
|
||||
ifeq ($$($1_OPTIMIZATION), )
|
||||
$1_OPT_CFLAGS := $$($$($1_BASE)_OPT_CFLAGS)
|
||||
$1_OPT_CXXFLAGS := $$($$($1_BASE)_OPT_CXXFLAGS)
|
||||
else
|
||||
$$(error Unknown value for OPTIMIZATION: $$($1_$(notdir $2)_OPTIMIZATION))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$($1_PRECOMPILED_HEADER), )
|
||||
ifeq ($$(filter $$(notdir $2), $$($1_PRECOMPILED_HEADER_EXCLUDE)), )
|
||||
$1_$2_USE_PCH_FLAGS := $$($1_USE_PCH_FLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$$(filter %.c,$2))
|
||||
# Compile as a C file
|
||||
$1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
|
||||
$$($1_$(notdir $2)_OPT_CFLAGS) \
|
||||
$$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.m,$2))
|
||||
# Compile as an Objective-C file
|
||||
$1_$2_FLAGS=-x objective-c $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
|
||||
$$($1_$(notdir $2)_OPT_CFLAGS) \
|
||||
$$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.s %.S,$2))
|
||||
# Compile as assembler file
|
||||
$1_$2_FLAGS=$8
|
||||
$1_$2_COMP=$(AS)
|
||||
$1_$2_DEP_FLAG:=
|
||||
else ifneq (,$$(filter %.cpp,$2)$$(filter %.cc,$2)$$(filter %.mm,$2))
|
||||
# Compile as a C++ or Objective-C++ file
|
||||
$1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $6 \
|
||||
$$($1_$(notdir $2)_OPT_CXXFLAGS) \
|
||||
$$($1_$(notdir $2)_CXXFLAGS) $$($1_$2_THIS_FILE) -c
|
||||
$1_$2_COMP=$7
|
||||
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
|
||||
else
|
||||
$$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
|
||||
endif
|
||||
# Generate the .o (.obj) file name and place it in the bin dir.
|
||||
$1_$2_OBJ := $3/$$(call replace_with_obj_extension, $$(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 %.S,$2))
|
||||
# And this is the dependency file for this obj file.
|
||||
$1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
|
||||
# The dependency target file lists all dependencies as empty targets
|
||||
# to avoid make error "No rule to make target" for removed files
|
||||
$1_$2_DEP_TARGETS:=$$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_$2_OBJ))
|
||||
|
||||
# Include previously generated dependency information. (if it exists)
|
||||
-include $$($1_$2_DEP)
|
||||
-include $$($1_$2_DEP_TARGETS)
|
||||
|
||||
ifeq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
# To avoid name clashes between pdbs for objects and libs/execs, put
|
||||
# object pdbs in a separate subdir.
|
||||
$1_$2_DEBUG_OUT_FLAGS:=-Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \
|
||||
$$($1_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ))))
|
||||
ifeq ($$($1_OPTIMIZATION), NONE)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_NONE)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
else ifeq ($$($1_OPTIMIZATION), LOW)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_NORM)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
|
||||
else ifeq ($$($1_OPTIMIZATION), HIGH)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HI)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
|
||||
else ifeq ($$($1_OPTIMIZATION), HIGHEST)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
|
||||
else ifeq ($$($1_OPTIMIZATION), HIGHEST_JVM)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
|
||||
else ifeq ($$($1_OPTIMIZATION), SIZE)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_SIZE)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
|
||||
else
|
||||
$$(error Unknown value for file OPTIMIZATION: $$($1_OPTIMIZATION))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(strip $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) \
|
||||
$$($1_$(notdir $2)_OPTIMIZATION)), )
|
||||
$1_$2_VARDEPS := $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) \
|
||||
$$($1_$(notdir $2)_OPT_CFLAGS) $$($1_$(notdir $2)_OPT_CXXFLAGS)
|
||||
$1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, $$($1_$2_OBJ).vardeps)
|
||||
ifneq ($$($$($1_BASE)_PRECOMPILED_HEADER), )
|
||||
ifeq ($$(filter $$($1_FILENAME), $$($$($1_BASE)_PRECOMPILED_HEADER_EXCLUDE)), )
|
||||
$1_USE_PCH_FLAGS := $$($$($1_BASE)_USE_PCH_FLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
$$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO)
|
||||
$$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET))))
|
||||
$$(call MakeDir, $$(@D) $$(@D)/pdb)
|
||||
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS)
|
||||
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
|
||||
|
||||
ifneq ($$(filter %.c, $$($1_FILENAME)), )
|
||||
# Compile as a C file
|
||||
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
|
||||
$$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CC)
|
||||
$1_DEP_FLAG := $(C_FLAG_DEPS)
|
||||
else ifneq ($$(filter %.m, $$($1_FILENAME)), )
|
||||
# Compile as an Objective-C file
|
||||
$1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
|
||||
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CC)
|
||||
$1_DEP_FLAG := $(C_FLAG_DEPS)
|
||||
else ifneq ($$(filter %.s %.S, $$($1_FILENAME)), )
|
||||
# Compile as assembler file
|
||||
$1_FLAGS := $$($$($1_BASE)_ASFLAGS)
|
||||
$1_COMPILER := $(AS)
|
||||
$1_DEP_FLAG :=
|
||||
else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
|
||||
# Compile as a C++ or Objective-C++ file
|
||||
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
|
||||
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) $$($1_THIS_FILE) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CXX)
|
||||
$1_DEP_FLAG := $(CXX_FLAG_DEPS)
|
||||
else
|
||||
$$(error Internal error in NativeCompilation.gmk: no compiler for file $$($1_FILENAME))
|
||||
endif
|
||||
|
||||
ifeq ($$(filter %.s %.S, $$($1_FILENAME)), )
|
||||
# And this is the dependency file for this obj file.
|
||||
$1_DEP := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_OBJ))
|
||||
# The dependency target file lists all dependencies as empty targets to
|
||||
# avoid make error "No rule to make target" for removed files
|
||||
$1_DEP_TARGETS := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_OBJ))
|
||||
|
||||
# Include previously generated dependency information. (if it exists)
|
||||
-include $$($1_DEP)
|
||||
-include $$($1_DEP_TARGETS)
|
||||
endif
|
||||
|
||||
ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
|
||||
$1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPT_CFLAGS) \
|
||||
$$($1_OPT_CXXFLAGS)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
|
||||
endif
|
||||
|
||||
$$($1_OBJ): $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
|
||||
$$($1_VARDEPS_FILE) | $$($$($1_BASE)_BUILD_INFO)
|
||||
$$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
|
||||
$$(call MakeDir, $$(@D))
|
||||
ifneq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio)
|
||||
# The Solaris studio compiler doesn't output the full path to the object file in the
|
||||
# generated deps files. Fixing it with sed. If compiling assembly, don't try this.
|
||||
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $$($1_FILENAME)), solstudio)
|
||||
# The Solaris studio compiler doesn't output the full path to the
|
||||
# object file in the generated deps files. Fixing it with sed. If
|
||||
# compiling assembly, don't try this.
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
|
||||
$(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
|
||||
$$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP).tmp \
|
||||
$(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
|
||||
$(SED) 's|^$$(@F):|$$@:|' $$($1_DEP).tmp > $$($1_DEP)
|
||||
else
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
|
||||
$$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP) \
|
||||
$(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
|
||||
endif
|
||||
# Create a dependency target file from the dependency file.
|
||||
# Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
||||
ifneq ($$($1_$2_DEP),)
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
|
||||
ifneq ($$($1_DEP), )
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)
|
||||
endif
|
||||
else
|
||||
# The Visual Studio compiler lacks a feature for generating make dependencies, but by
|
||||
# setting -showIncludes, all included files are printed. These are filtered out and
|
||||
# parsed into make dependences.
|
||||
# Keep as much as possible on one execution line for best performance on Windows.
|
||||
# No need to save exit code from compilation since pipefail is always active on
|
||||
# Windows.
|
||||
# The Visual Studio compiler lacks a feature for generating make
|
||||
# dependencies, but by setting -showIncludes, all included files are
|
||||
# printed. These are filtered out and parsed into make dependences.
|
||||
#
|
||||
# Keep as much as possible on one execution line for best performance
|
||||
# on Windows. No need to save exit code from compilation since
|
||||
# pipefail is always active on Windows.
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
|
||||
$(CC_OUT_OPTION)$$($1_$2_OBJ) $2) \
|
||||
| $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$(notdir $2)$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$@: \\ > $$($1_$2_DEP) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_OBJ).log \
|
||||
| $(SORT) -u >> $$($1_$2_DEP) ; \
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
|
||||
$$($1_COMPILER) $$($1_FLAGS) -showIncludes \
|
||||
$(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)) \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$($1_FILENAME)$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$@: \\ > $$($1_DEP) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_OBJ).log \
|
||||
| $(SORT) -u >> $$($1_DEP) ; \
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
@@ -338,6 +348,9 @@ endef
|
||||
# and the targets generated are listed in a variable by that name.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# NAME The base name for the resulting binary, excluding decorations (like *.exe)
|
||||
# TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
|
||||
# SUFFIX Override the default suffix for the output file
|
||||
# TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
|
||||
# SRC one or more directory roots to scan for C/C++ files.
|
||||
# CFLAGS the compiler flags to be used, used both for C and C++.
|
||||
@@ -347,8 +360,6 @@ endef
|
||||
# ARFLAGS the archiver flags to be used
|
||||
# OBJECT_DIR the directory where we store the object files
|
||||
# OUTPUT_DIR the directory where the resulting binary is put
|
||||
# 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!
|
||||
@@ -377,114 +388,66 @@ endef
|
||||
# COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
|
||||
# ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol
|
||||
# zipping
|
||||
# CFLAGS_DEBUG_SYMBOLS Overrides the default cflags for enabling debug symbols
|
||||
# CXXFLAGS_DEBUG_SYMBOLS Overrides the default cxxflags for enabling debug symbols
|
||||
# STRIPFLAGS Optionally change the flags given to the strip command
|
||||
# PRECOMPILED_HEADER Header file to use as precompiled header
|
||||
# PRECOMPILED_HEADER_EXCLUDE List of source files that should not use PCH
|
||||
SetupNativeCompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupNativeCompilationBody
|
||||
|
||||
# If type is unspecified, default to LIBRARY
|
||||
ifeq ($$($1_TYPE), )
|
||||
$1_TYPE := LIBRARY
|
||||
endif
|
||||
|
||||
# If we're doing a static build and producing a library
|
||||
# force it to be a static library and remove the -l libraries
|
||||
ifeq ($(STATIC_BUILD), true)
|
||||
ifneq ($$($1_LIBRARY),)
|
||||
$1_STATIC_LIBRARY := $$($1_LIBRARY)
|
||||
$1_LIBRARY :=
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
$1_TYPE := STATIC_LIBRARY
|
||||
endif
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
ifeq ($$($1_SUFFIX), )
|
||||
$1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
|
||||
endif
|
||||
|
||||
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$$($1_SUFFIX)
|
||||
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
$1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_LIBRARY)
|
||||
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
|
||||
|
||||
ifeq ($$($1_SUFFIX), )
|
||||
$1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
|
||||
endif
|
||||
|
||||
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$$($1_SUFFIX)
|
||||
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
$1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)
|
||||
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
|
||||
|
||||
ifeq ($$($1_TYPE), EXECUTABLE)
|
||||
$1_PREFIX :=
|
||||
ifeq ($$($1_SUFFIX), )
|
||||
$1_SUFFIX := $(EXE_SUFFIX)
|
||||
endif
|
||||
|
||||
$1_BASENAME:=$$($1_PROGRAM)$$($1_SUFFIX)
|
||||
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
$1_NOSUFFIX:=$$($1_PROGRAM)
|
||||
else
|
||||
$1_PREFIX := $(LIBRARY_PREFIX)
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
ifeq ($$($1_SUFFIX), )
|
||||
$1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
|
||||
endif
|
||||
else ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
ifeq ($$($1_SUFFIX), )
|
||||
$1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$($1_NAME), $(basename $$($1_NAME)))
|
||||
$$(error NAME must not contain any directory path in $1)
|
||||
endif
|
||||
ifneq ($(findstring $$($1_SUFFIX), $$($1_NAME)), )
|
||||
$$(error NAME should be specified without suffix: $$($1_SUFFIX) in $1)
|
||||
endif
|
||||
ifneq ($(findstring $$($1_PREFIX), $$($1_NAME)), )
|
||||
$$(error NAME should be specified without prefix: $$($1_PREFIX) in $1)
|
||||
endif
|
||||
ifeq ($$($1_OUTPUT_DIR), )
|
||||
$$(error OUTPUT_DIR is missing in $1)
|
||||
endif
|
||||
ifneq ($$($1_MANIFEST), )
|
||||
ifeq ($$($1_MANIFEST_VERSION), )
|
||||
$$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
|
||||
endif
|
||||
endif
|
||||
|
||||
$1_BASENAME := $$($1_PREFIX)$$($1_NAME)$$($1_SUFFIX)
|
||||
$1_TARGET := $$($1_OUTPUT_DIR)/$$($1_BASENAME)
|
||||
$1_NOSUFFIX := $$($1_PREFIX)$$($1_NAME)
|
||||
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
|
||||
|
||||
ifeq (,$$($1_TARGET))
|
||||
$$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
|
||||
endif
|
||||
|
||||
# Setup the toolchain to be used
|
||||
$$(call SetIfEmpty, $1_TOOLCHAIN, TOOLCHAIN_DEFAULT)
|
||||
$$(call SetIfEmpty, $1_CC, $$($$($1_TOOLCHAIN)_CC))
|
||||
@@ -499,41 +462,35 @@ define SetupNativeCompilationBody
|
||||
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
|
||||
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
|
||||
|
||||
ifneq ($$($1_MANIFEST), )
|
||||
ifeq ($$($1_MANIFEST_VERSION), )
|
||||
$$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Make sure the dirs exist.
|
||||
$$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),, \
|
||||
$$(call MakeDir, $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
|
||||
$$(foreach d, $$($1_SRC), $$(if $$(wildcard $$d), , \
|
||||
$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
|
||||
|
||||
# Find all files in the source trees. Preserve order.
|
||||
$1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind,$$(s)))
|
||||
$1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind, $$(s)))
|
||||
$1_SRCS := $$(filter $$(NATIVE_SOURCE_EXTENSIONS), $$($1_SRCS))
|
||||
# Extract the C/C++ files.
|
||||
ifneq ($$($1_EXCLUDE_PATTERNS), )
|
||||
# We must not match the exclude pattern against the src root(s).
|
||||
$1_SRCS_WITHOUT_ROOTS := $$($1_SRCS)
|
||||
$$(foreach i,$$($1_SRC),$$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
|
||||
$$(foreach i, $$($1_SRC), $$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
|
||||
$$i/%,%, $$($1_SRCS_WITHOUT_ROOTS))))
|
||||
$1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
|
||||
$$($1_SRCS_WITHOUT_ROOTS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
ifneq ($$($1_EXCLUDE_FILES), )
|
||||
$1_ALL_EXCLUDE_FILES += $$($1_EXCLUDE_FILES)
|
||||
endif
|
||||
ifneq ($$($1_ALL_EXCLUDE_FILES),)
|
||||
ifneq ($$($1_ALL_EXCLUDE_FILES), )
|
||||
$1_EXCLUDE_FILES_PAT := $$($1_ALL_EXCLUDE_FILES) \
|
||||
$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_ALL_EXCLUDE_FILES)))
|
||||
$1_EXCLUDE_FILES_PAT := $$(addprefix %,$$($1_EXCLUDE_FILES_PAT))
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT),$$($1_SRCS))
|
||||
$$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_ALL_EXCLUDE_FILES)))
|
||||
$1_EXCLUDE_FILES_PAT := $$(addprefix %, $$($1_EXCLUDE_FILES_PAT))
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT), $$($1_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_INCLUDE_FILES), )
|
||||
$1_INCLUDE_FILES_PAT := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT),$$($1_SRCS))
|
||||
$1_INCLUDE_FILES_PAT := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT), $$($1_SRCS))
|
||||
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))
|
||||
@@ -541,29 +498,29 @@ define SetupNativeCompilationBody
|
||||
# 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))
|
||||
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 := $$(addsuffix /%,$$($1_EXCLUDES))
|
||||
$1_SRC_EXCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
ifneq ($$($1_EXCLUDES), )
|
||||
$1_SRC_EXCLUDES := $$(addsuffix /%, $$($1_EXCLUDES))
|
||||
$1_SRC_EXCLUDES += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_EXCLUDES))))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES), $$($1_SRCS))
|
||||
endif
|
||||
|
||||
$1_SRCS += $$($1_EXTRA_FILES)
|
||||
|
||||
ifeq (,$$($1_SRCS))
|
||||
ifeq ($$($1_SRCS), )
|
||||
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
|
||||
endif
|
||||
|
||||
# Calculate the expected output from compiling the sources
|
||||
$1_EXPECTED_OBJS_FILENAMES := $$(call replace_with_obj_extension, $$(notdir $$($1_SRCS)))
|
||||
$1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/,$$($1_EXPECTED_OBJS_FILENAMES))
|
||||
$1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/, $$($1_EXPECTED_OBJS_FILENAMES))
|
||||
# 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)))
|
||||
$1_SUPERFLOUS_OBJS := $$(sort $$(filter-out $$($1_EXPECTED_OBJS), $$($1_BINS)))
|
||||
# Clean out the superfluous object files.
|
||||
ifneq ($$($1_SUPERFLUOUS_OBJS),)
|
||||
ifneq ($$($1_SUPERFLUOUS_OBJS), )
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
endif
|
||||
# Sort to remove dupliates and provide a reproducable order on the input files to the linker.
|
||||
@@ -571,64 +528,62 @@ define SetupNativeCompilationBody
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS, and/or OPENJDK_TARGET_OS plus
|
||||
# OPENJDK_TARGET_CPU pair dependent variables for CFLAGS.
|
||||
$1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
|
||||
$1_EXTRA_CFLAGS := $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU))
|
||||
ifneq ($(DEBUG_LEVEL),release)
|
||||
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_TYPE)_debug)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
|
||||
else
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
|
||||
$1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
|
||||
ifneq ($(DEBUG_LEVEL),release)
|
||||
$1_EXTRA_CXXFLAGS := $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($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_TYPE)_debug)
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_debug)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_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_TYPE)_release)
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_release)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
endif
|
||||
|
||||
# If no C++ flags are explicitly set, default to using the C flags.
|
||||
# After that, we can set additional C++ flags that should not interfere
|
||||
# with the mechanism for copying the C flags by default.
|
||||
ifeq ($$($1_CXXFLAGS),)
|
||||
$1_CXXFLAGS:=$$($1_CFLAGS)
|
||||
ifeq ($$($1_CXXFLAGS), )
|
||||
$1_CXXFLAGS := $$($1_CFLAGS)
|
||||
endif
|
||||
ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
|
||||
$1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
|
||||
ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)), )
|
||||
$1_EXTRA_CXXFLAGS := $$($1_EXTRA_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
|
||||
$$(call SetIfEmpty, $1_CFLAGS_DEBUG_SYMBOLS, $(CFLAGS_DEBUG_SYMBOLS))
|
||||
$$(call SetIfEmpty, $1_CXXFLAGS_DEBUG_SYMBOLS, $(CXXFLAGS_DEBUG_SYMBOLS))
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_REORDER))
|
||||
ifneq ($$($1_REORDER), )
|
||||
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
|
||||
$1_EXTRA_CXXFLAGS += $$(C_FLAG_REORDER)
|
||||
endif
|
||||
|
||||
# Pass the library name for static JNI library naming
|
||||
ifneq ($$($1_STATIC_LIBRARY),)
|
||||
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
|
||||
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME)
|
||||
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_NAME)
|
||||
endif
|
||||
|
||||
# Pick up disabled warnings, if possible on this platform.
|
||||
ifneq ($(DISABLE_WARNING_PREFIX),)
|
||||
ifneq ($(DISABLE_WARNING_PREFIX), )
|
||||
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
|
||||
$$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)))
|
||||
@@ -639,8 +594,8 @@ define SetupNativeCompilationBody
|
||||
|
||||
# Check if warnings should be considered errors.
|
||||
# Pick first binary and toolchain specific, then binary specific, then general setting.
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),)
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS),)
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), )
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS), )
|
||||
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$(WARNINGS_AS_ERRORS)
|
||||
else
|
||||
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$($1_WARNINGS_AS_ERRORS)
|
||||
@@ -692,11 +647,12 @@ define SetupNativeCompilationBody
|
||||
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
|
||||
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch.obj
|
||||
|
||||
$$(eval $$(call add_native_source,$1,$$($1_GENERATED_PCH_SRC), \
|
||||
$$($1_OBJECT_DIR),,, \
|
||||
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS) \
|
||||
-Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
|
||||
$$($1_CXX),,no_this_file))
|
||||
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
|
||||
FILE := $$($1_GENERATED_PCH_SRC), \
|
||||
BASE := $1, \
|
||||
EXTRA_CXXFLAGS := -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
|
||||
DISABLE_THIS_FILE_DEFINE := true, \
|
||||
))
|
||||
|
||||
$1_USE_PCH_FLAGS := \
|
||||
-Fp$$($1_PCH_FILE) -Yu$$(notdir $$($1_PRECOMPILED_HEADER))
|
||||
@@ -739,18 +695,18 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
endif
|
||||
|
||||
# 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_SYSROOT_CFLAGS), \
|
||||
$$($1_CC), \
|
||||
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS), \
|
||||
$$($1_CXX), $$($1_ASFLAGS))))
|
||||
# Now call SetupCompileNativeFile for each source file we are going to compile.
|
||||
$$(foreach file, $$($1_SRCS), \
|
||||
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$(file)),\
|
||||
FILE := $$(file), \
|
||||
BASE := $1, \
|
||||
)) \
|
||||
)
|
||||
|
||||
# Setup rule for printing progress info when compiling source files.
|
||||
# This is a rough heuristic and may not always print accurate information.
|
||||
$$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
|
||||
ifeq ($$(wildcard $$($1_TARGET)),)
|
||||
ifeq ($$(wildcard $$($1_TARGET)), )
|
||||
$(ECHO) 'Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
|
||||
$$(filter-out %.vardeps, $$?)) file(s)'
|
||||
else
|
||||
@@ -763,10 +719,10 @@ define SetupNativeCompilationBody
|
||||
|
||||
# On windows we need to create a resource file
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifneq (,$$($1_VERSIONINFO_RESOURCE))
|
||||
$1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
|
||||
$1_RES_DEP:=$$($1_RES).d
|
||||
$1_RES_DEP_TARGETS:=$$($1_RES).d.targets
|
||||
ifneq ($$($1_VERSIONINFO_RESOURCE), )
|
||||
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
|
||||
$1_RES_DEP := $$($1_RES).d
|
||||
$1_RES_DEP_TARGETS := $$($1_RES).d.targets
|
||||
-include $$($1_RES_DEP)
|
||||
-include $$($1_RES_DEP_TARGETS)
|
||||
|
||||
@@ -775,11 +731,11 @@ define SetupNativeCompilationBody
|
||||
$$($1_RES).vardeps)
|
||||
|
||||
$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
|
||||
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$(notdir $$($1_TARGET))))
|
||||
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
|
||||
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
|
||||
$$(call ExecuteWithLog, $$@, \
|
||||
$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
|
||||
$$($1_VERSIONINFO_RESOURCE))
|
||||
$$($1_VERSIONINFO_RESOURCE) 2>&1 )
|
||||
# Windows RC compiler does not support -showIncludes, so we mis-use CL
|
||||
# for this. Filter out RC specific arguments that are unknown to CL.
|
||||
# For some unknown reason, in this case CL actually outputs the show
|
||||
@@ -790,7 +746,7 @@ define SetupNativeCompilationBody
|
||||
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
|
||||
$(CC_OUT_OPTION)$$($1_RES_DEP).obj -P -Fi$$($1_RES_DEP).pp \
|
||||
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
|
||||
| $(GREP) -v -e "^Note: including file:" \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEP) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEP).obj.log >> $$($1_RES_DEP) ; \
|
||||
@@ -798,10 +754,10 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(DISABLE_MAPFILES),true)
|
||||
ifneq ($(DISABLE_MAPFILES), true)
|
||||
$1_REAL_MAPFILE := $$($1_MAPFILE)
|
||||
ifneq ($(OPENJDK_TARGET_OS),windows)
|
||||
ifneq (,$$($1_REORDER))
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifneq ($$($1_REORDER), )
|
||||
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
|
||||
|
||||
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
|
||||
@@ -815,9 +771,9 @@ define SetupNativeCompilationBody
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
|
||||
# for LDFLAGS and LIBS
|
||||
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
|
||||
$1_EXTRA_LIBS:=$$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
|
||||
ifneq (,$$($1_REAL_MAPFILE))
|
||||
$1_EXTRA_LDFLAGS := $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
|
||||
$1_EXTRA_LIBS := $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
|
||||
ifneq ($$($1_REAL_MAPFILE), )
|
||||
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
|
||||
endif
|
||||
|
||||
@@ -835,17 +791,13 @@ define SetupNativeCompilationBody
|
||||
ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
|
||||
ifneq ($$($1_DEBUG_SYMBOLS), false)
|
||||
# Only copy debug symbols for dynamic libraries and programs.
|
||||
ifeq ($$($1_STATIC_LIBRARY), )
|
||||
ifneq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
# Generate debuginfo files.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
|
||||
"-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"
|
||||
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \
|
||||
$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map
|
||||
# No separate command is needed for debuginfo on windows, instead
|
||||
# touch target to make sure it has a later time stamp than the debug
|
||||
# symbol files to avoid unnecessary relinking on rebuild.
|
||||
$1_CREATE_DEBUGINFO_CMDS := $(TOUCH) $$($1_TARGET)
|
||||
|
||||
else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
|
||||
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
|
||||
@@ -860,15 +812,25 @@ define SetupNativeCompilationBody
|
||||
$1_DEBUGINFO_FILES := \
|
||||
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
|
||||
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
|
||||
# On Macosx, the debuginfo generation doesn't touch the linked binary, but
|
||||
# to avoid always relinking, touch it anyway to force a later timestamp than
|
||||
# the dSYM files.
|
||||
$1_CREATE_DEBUGINFO_CMDS := \
|
||||
$(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET) $$(NEWLINE) \
|
||||
$(TOUCH) $$($1_TARGET)
|
||||
$(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
|
||||
endif # OPENJDK_TARGET_OS
|
||||
|
||||
# Since the link rule creates more than one file that we want to track,
|
||||
# we have to use some tricks to get make to cooperate. To properly
|
||||
# trigger downstream dependants of $$($1_DEBUGINFO_FILES), we must have
|
||||
# a recipe in the rule below. To avoid rerunning the recipe every time
|
||||
# have it touch the target. If a debuginfo file is deleted by something
|
||||
# external, explicitly delete the TARGET to trigger a rebuild of both.
|
||||
ifneq ($$(wildcard $$($1_DEBUGINFO_FILES)), $$($1_DEBUGINFO_FILES))
|
||||
$$(call LogDebug, Deleting $$($1_BASENAME) because debuginfo files are missing)
|
||||
$$(shell $(RM) $$($1_TARGET))
|
||||
endif
|
||||
$$($1_DEBUGINFO_FILES): $$($1_TARGET)
|
||||
$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
|
||||
$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
|
||||
)
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_DEBUGINFO_FILES)
|
||||
|
||||
@@ -899,22 +861,35 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_LIBRARY))
|
||||
ifeq ($$($1_TYPE), 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"
|
||||
# Create a rule for the import lib so that other rules may depend on it
|
||||
$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib: $$($1_TARGET)
|
||||
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
|
||||
$1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
|
||||
# To properly trigger downstream dependants of the import library, just as
|
||||
# for debug files, we must have a recipe in the rule. To avoid rerunning
|
||||
# the recipe every time have it touch the target. If an import library
|
||||
# file is deleted by something external, explicitly delete the target to
|
||||
# trigger a rebuild of both.
|
||||
ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY))
|
||||
$$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing)
|
||||
$$(shell $(RM) $$($1_TARGET))
|
||||
endif
|
||||
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
||||
$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
|
||||
$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
|
||||
)
|
||||
$(TOUCH) $$@
|
||||
endif
|
||||
|
||||
# Create loadmap on AIX. Helps in diagnosing some problems.
|
||||
ifneq ($(COMPILER_BINDCMD_FILE_FLAG),)
|
||||
ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
|
||||
$1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \
|
||||
$$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \
|
||||
$$($1_STRIP_CMD)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||
@@ -924,7 +899,7 @@ define SetupNativeCompilationBody
|
||||
# If there are many object files, use an @-file...
|
||||
ifneq ($$(word 17, $$($1_ALL_OBJS)), )
|
||||
$1_OBJ_FILE_LIST := $$($1_OBJECT_DIR)/_$1_objectfilenames.txt
|
||||
ifneq ($(COMPILER_COMMAND_FILE_FLAG),)
|
||||
ifneq ($(COMPILER_COMMAND_FILE_FLAG), )
|
||||
$1_LD_OBJ_ARG := $(COMPILER_COMMAND_FILE_FLAG)$$($1_OBJ_FILE_LIST)
|
||||
else
|
||||
# ...except for toolchains which don't support them.
|
||||
@@ -968,8 +943,8 @@ define SetupNativeCompilationBody
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
||||
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
|
||||
$$($1_EXTRA_LIBS)) \
|
||||
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
|
||||
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
|
||||
test "$$$$?" = "1" ; \
|
||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
||||
@@ -978,15 +953,15 @@ define SetupNativeCompilationBody
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
||||
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
|
||||
$$($1_EXTRA_LIBS)) ; \
|
||||
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
|
||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
||||
$$($1_STRIP_CMD)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_STATIC_LIBRARY))
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
|
||||
$$($1_EXTRA_LIBS)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
@@ -1000,7 +975,7 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
|
||||
$$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP)
|
||||
$$(call LogInfo, Archiving $$($1_STATIC_LIBRARY))
|
||||
$$(call LogInfo, Building static library $$($1_BASENAME))
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
|
||||
$$($1_RES))
|
||||
@@ -1013,10 +988,10 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_PROGRAM))
|
||||
ifeq ($$($1_TYPE), EXECUTABLE)
|
||||
# A executable binary has been specified, setup the target for it.
|
||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
||||
$$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
||||
$$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
|
||||
$$($1_STRIP_CMD)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
@@ -1035,16 +1010,16 @@ define SetupNativeCompilationBody
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
||||
$(EXE_OUT_OPTION)$$($1_TARGET) \
|
||||
$$($1_ALL_OBJS) $$($1_RES) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS))
|
||||
$$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS))
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifneq ($$($1_MANIFEST), )
|
||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_PROGRAM).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
|
||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
|
||||
endif
|
||||
endif
|
||||
# This only works if the openjdk_codesign identity is present on the system. Let
|
||||
# silently fail otherwise.
|
||||
ifneq (,$(CODESIGN))
|
||||
ifneq (,$$($1_CODESIGN))
|
||||
ifneq ($(CODESIGN), )
|
||||
ifneq ($$($1_CODESIGN), )
|
||||
$(CODESIGN) -s openjdk_codesign $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -26,13 +26,16 @@
|
||||
ifndef _SETUP_GMK
|
||||
_SETUP_GMK := 1
|
||||
|
||||
# Include custom extension hook
|
||||
$(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
DISABLE_WARNINGS := -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
||||
DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
||||
|
||||
# If warnings needs to be non-fatal for testing purposes use a command like:
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS := -Xlint:all -Werror
|
||||
JAVAC_WARNINGS ?= -Xlint:all -Werror
|
||||
|
||||
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
|
||||
# and the interim javac, to be run by the boot jdk.
|
||||
@@ -69,7 +72,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
||||
JVM := $(JAVA_JAVAC), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -source 10 -target 10 --doclint-format html5 \
|
||||
FLAGS := -source 11 -target 11 --doclint-format html5 \
|
||||
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
@@ -79,7 +82,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
||||
JVM := $(JAVA_JAVAC), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -source 10 -target 10 \
|
||||
FLAGS := -source 11 -target 11 \
|
||||
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2018, 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
|
||||
@@ -44,6 +44,7 @@ include NativeCompilation.gmk
|
||||
# TYPE Must be either PROGRAM or LIBRARY.
|
||||
# SOURCE_DIRS A list of source directories to search
|
||||
# OUTPUT_DIR Where to put the resulting files
|
||||
# EXCLUDE A list of filenames to exclude from compilation
|
||||
SetupTestFilesCompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupTestFilesCompilationBody
|
||||
|
||||
@@ -59,13 +60,15 @@ define SetupTestFilesCompilationBody
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
$1_PREFIX = lib
|
||||
$1_OUTPUT_SUBDIR := lib
|
||||
$1_CFLAGS := $(CFLAGS_TESTLIB) $(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
$1_CFLAGS := $(CFLAGS_TESTLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_TESTLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_COMPILATION_TYPE := LIBRARY
|
||||
else ifeq ($$($1_TYPE), PROGRAM)
|
||||
$1_PREFIX = exe
|
||||
$1_OUTPUT_SUBDIR := bin
|
||||
$1_CFLAGS := $(CFLAGS_TESTEXE) $(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
$1_CFLAGS := $(CFLAGS_TESTEXE)
|
||||
$1_LDFLAGS := $(LDFLAGS_TESTEXE)
|
||||
$1_COMPILATION_TYPE := EXECUTABLE
|
||||
else
|
||||
$$(error Unknown type: $$($1_TYPE))
|
||||
endif
|
||||
@@ -74,19 +77,23 @@ define SetupTestFilesCompilationBody
|
||||
$1_FILE_LIST := \
|
||||
$$(shell $$(FIND) $$($1_SOURCE_DIRS) -type f -name "$$($1_PREFIX)*.c")
|
||||
|
||||
$1_EXCLUDE_PATTERN := $$(addprefix %/, $$($1_EXCLUDE))
|
||||
$1_FILTERED_FILE_LIST := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_FILE_LIST))
|
||||
|
||||
# Setup a compilation for each and every one of them
|
||||
$$(foreach file, $$($1_FILE_LIST),\
|
||||
$$(eval name := $$(strip $$(patsubst $$($1_PREFIX)%, %, $$(basename $$(notdir $$(file)))))) \
|
||||
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
|
||||
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
|
||||
$$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \
|
||||
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
|
||||
$$($1_TYPE) := $$(name), \
|
||||
NAME := $$(unprefixed_name), \
|
||||
TYPE := $$($1_COMPILATION_TYPE), \
|
||||
SRC := $$(patsubst %/,%,$$(dir $$(file))), \
|
||||
INCLUDE_FILES := $$(notdir $$(file)), \
|
||||
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \
|
||||
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
|
||||
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
|
||||
LANG := C, \
|
||||
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
|
||||
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
|
||||
LIBS := $$($1_LIBS_$$($1_PREFIX)$$(name)), \
|
||||
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
|
||||
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(name)), \
|
||||
LIBS := $$($1_LIBS_$$(name)), \
|
||||
OPTIMIZATION := LOW, \
|
||||
COPY_DEBUG_SYMBOLS := false, \
|
||||
STRIP_SYMBOLS := false, \
|
||||
|
||||
@@ -153,11 +153,11 @@ define SetupTextFileProcessingBody
|
||||
endif
|
||||
|
||||
# Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command
|
||||
# line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/'
|
||||
# and ';' with '/" -e "s/', and adjusting for edge cases.
|
||||
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)' \
|
||||
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)' \
|
||||
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)'
|
||||
# line (-e "s/A/B/g" -e "s/C/D/g" ...), basically by replacing '=>' with '/'
|
||||
# and ';' with '/g" -e "s/', and adjusting for edge cases.
|
||||
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)g' \
|
||||
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)g' \
|
||||
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)g'
|
||||
else
|
||||
# We don't have any replacements, just pipe the file through cat.
|
||||
$1_REPLACEMENTS_COMMAND_LINE := $(CAT)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, 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
|
||||
@@ -200,7 +200,7 @@ var getJibProfiles = function (input) {
|
||||
data.configuration_make_arg = "CONF_NAME=";
|
||||
|
||||
// Exclude list to use when Jib creates a source bundle
|
||||
data.src_bundle_excludes = "./build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
|
||||
data.src_bundle_excludes = "./build .build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
|
||||
// Include list to use when creating a minimal jib source bundle which
|
||||
// contains just the jib configuration files.
|
||||
data.conf_bundle_includes = "*/conf/jib-profiles.* make/autoconf/version-numbers"
|
||||
@@ -232,7 +232,8 @@ var getJibProfilesCommon = function (input, data) {
|
||||
common.main_profile_names = [
|
||||
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
|
||||
"solaris-sparcv9", "windows-x64", "windows-x86",
|
||||
"linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn"
|
||||
"linux-aarch64", "linux-arm64", "linux-arm-vfp-hflt",
|
||||
"linux-arm-vfp-hflt-dyn"
|
||||
];
|
||||
|
||||
// These are the base setttings for all the main build profiles.
|
||||
@@ -411,7 +412,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "graphviz", "pandoc"],
|
||||
dependencies: ["devkit", "autoconf", "graphviz", "pandoc"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--enable-full-docs", "--with-zlib=system"),
|
||||
default_make_targets: ["docs-bundles"],
|
||||
@@ -421,7 +422,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit"],
|
||||
dependencies: ["devkit", "autoconf"],
|
||||
configure_args: concat(common.configure_args_32bit,
|
||||
"--with-jvm-variants=minimal,server", "--with-zlib=system"),
|
||||
},
|
||||
@@ -429,7 +430,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"macosx-x64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "freetype"],
|
||||
dependencies: ["devkit", "autoconf"],
|
||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
||||
"--with-macosx-version-max=10.7.0"),
|
||||
},
|
||||
@@ -437,7 +438,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"solaris-x64": {
|
||||
target_os: "solaris",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "cups"],
|
||||
dependencies: ["devkit", "autoconf", "cups"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-zlib=system", "--enable-dtrace"),
|
||||
},
|
||||
@@ -445,7 +446,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"solaris-sparcv9": {
|
||||
target_os: "solaris",
|
||||
target_cpu: "sparcv9",
|
||||
dependencies: ["devkit", "cups"],
|
||||
dependencies: ["devkit", "autoconf", "cups"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-zlib=system", "--enable-dtrace"),
|
||||
},
|
||||
@@ -453,7 +454,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"windows-x64": {
|
||||
target_os: "windows",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "freetype"],
|
||||
dependencies: ["devkit", "autoconf"],
|
||||
configure_args: concat(common.configure_args_64bit),
|
||||
},
|
||||
|
||||
@@ -461,15 +462,25 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "windows",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "freetype"],
|
||||
dependencies: ["devkit", "autoconf"],
|
||||
configure_args: concat(common.configure_args_32bit),
|
||||
},
|
||||
|
||||
"linux-aarch64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "autoconf", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--openjdk-target=aarch64-linux-gnu"
|
||||
],
|
||||
},
|
||||
|
||||
"linux-arm64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"],
|
||||
dependencies: ["devkit", "autoconf", "build_devkit", "cups", "headless_stubs"],
|
||||
configure_args: [
|
||||
"--with-cpu-port=arm64",
|
||||
"--with-jvm-variants=server",
|
||||
@@ -482,7 +493,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "arm",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
dependencies: ["devkit", "autoconf", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--with-jvm-variants=minimal1,client",
|
||||
"--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI",
|
||||
@@ -517,6 +528,32 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
profiles[debugName] = concatObjects(profiles[name],
|
||||
common.slowdebug_profile_base);
|
||||
});
|
||||
// Generate testmake profiles for the main profile of each build host
|
||||
// platform. This profile only runs the makefile tests.
|
||||
// Ant is needed to run the idea project generator test.
|
||||
var testmakeBase = {
|
||||
dependencies: [ "ant" ],
|
||||
environment: {
|
||||
"ANT_HOME": input.get("ant", "install_path") + "/apache-ant-1.7.1"
|
||||
}
|
||||
};
|
||||
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var maketestName = name + "-testmake";
|
||||
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
|
||||
profiles[maketestName].default_make_targets = [ "test-make" ];
|
||||
});
|
||||
// Generate cmp-baseline profiles for each main profile. This profile does
|
||||
// a compare build run with no changes to verify that the compare script
|
||||
// has a clean baseline
|
||||
common.main_profile_names.forEach(function (name) {
|
||||
var cmpBaselineName = name + "-cmp-baseline";
|
||||
profiles[cmpBaselineName] = clone(profiles[name]);
|
||||
// Only compare the images target. This should pressumably be expanded
|
||||
// to include more build targets when possible.
|
||||
profiles[cmpBaselineName].default_make_targets = [ "images" ];
|
||||
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
|
||||
});
|
||||
|
||||
// Profiles for building the zero jvm variant. These are used for verification
|
||||
// in JPRT.
|
||||
@@ -582,6 +619,9 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"windows-x86": {
|
||||
platform: "windows-x86",
|
||||
},
|
||||
"linux-aarch64": {
|
||||
platform: "linux-aarch64",
|
||||
},
|
||||
"linux-arm64": {
|
||||
platform: "linux-arm64-vfp-hflt",
|
||||
},
|
||||
@@ -743,11 +783,22 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
dependencies: [ "devkit" ],
|
||||
environment_path: input.get("devkit", "install_path")
|
||||
+ "/Xcode.app/Contents/Developer/usr/bin"
|
||||
}
|
||||
};
|
||||
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
|
||||
profiles["run-test-jprt"] = concatObjects(profiles["run-test-jprt"], macosxRunTestExtra);
|
||||
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra);
|
||||
}
|
||||
// On windows we want the debug symbols available at test time
|
||||
if (input.build_os == "windows") {
|
||||
windowsRunTestPrebuiltExtra = {
|
||||
dependencies: [ testedProfile + ".jdk_symbols" ],
|
||||
environment: {
|
||||
"PRODUCT_SYMBOLS_HOME": input.get(testedProfile + ".jdk_symbols", "home_path"),
|
||||
}
|
||||
};
|
||||
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
|
||||
windowsRunTestPrebuiltExtra);
|
||||
}
|
||||
|
||||
// Generate the missing platform attributes
|
||||
profiles = generatePlatformAttributes(profiles);
|
||||
@@ -768,9 +819,11 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
linux_x64: "gcc4.9.2-OEL6.4+1.2",
|
||||
macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
|
||||
windows_x64: "VS2013SP4+1.0",
|
||||
linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0",
|
||||
linux_aarch64: (input.profile != null && input.profile.indexOf("arm64") >= 0
|
||||
? "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0"
|
||||
: "gcc7.3.0-Fedora27+1.0"),
|
||||
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
|
||||
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
|
||||
: "arm-linaro-4.7+1.0")
|
||||
@@ -783,12 +836,6 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
|
||||
+ "-" + input.build_cpu;
|
||||
|
||||
var freetype_version = {
|
||||
windows_x64: "2.7.1-v120+1.1",
|
||||
windows_x86: "2.7.1-v120+1.1",
|
||||
macosx_x64: "2.7.1-Xcode6.3-MacOSX10.9+1.0"
|
||||
}[input.target_platform];
|
||||
|
||||
var makeBinDir = (input.build_os == "windows"
|
||||
? input.get("gnumake", "install_path") + "/cygwin/bin"
|
||||
: input.get("gnumake", "install_path") + "/bin");
|
||||
@@ -829,7 +876,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "javare",
|
||||
revision: "4.2",
|
||||
build_number: "b10",
|
||||
build_number: "b12",
|
||||
checksum_file: "MD5_VALUES",
|
||||
file: "jtreg_bin-4.2.zip",
|
||||
environment_name: "JT_HOME",
|
||||
@@ -854,11 +901,15 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
environment_path: makeBinDir
|
||||
},
|
||||
|
||||
freetype: {
|
||||
autoconf: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: freetype_version,
|
||||
module: "freetype-" + input.target_platform
|
||||
revision: "2.69+1.0.1",
|
||||
module: (input.build_os == "windows"
|
||||
? "autoconf-" + input.build_osenv_platform
|
||||
: "autoconf-" + input.build_platform),
|
||||
configure_args: "",
|
||||
environment_path: input.get("autoconf", "install_path")
|
||||
},
|
||||
|
||||
graphviz: {
|
||||
@@ -878,6 +929,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
|
||||
environment_path: input.get("pandoc", "install_path") + "/pandoc"
|
||||
},
|
||||
|
||||
// This adds java jib as a dependency for the test artifacts resolver
|
||||
jib: {
|
||||
organization: "com.oracle.java.jib",
|
||||
@@ -887,7 +939,15 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
environment_name: "JIB_JAR",
|
||||
environment_value: input.get("jib", "install_path")
|
||||
+ "/jib-3.0-SNAPSHOT-distribution/lib/jib-3.0-SNAPSHOT.jar"
|
||||
}
|
||||
},
|
||||
|
||||
ant: {
|
||||
organization: common.organization,
|
||||
ext: "zip",
|
||||
revision: "1.7.1+1.0",
|
||||
configure_args: "",
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
// Need to add a value for the Visual Studio tools variable to make
|
||||
@@ -1077,6 +1137,7 @@ var versionArgs = function(input, common) {
|
||||
if (input.build_type == "promoted") {
|
||||
args = concat(args,
|
||||
// This needs to be changed when we start building release candidates
|
||||
// with-version-pre must be set to ea for 'ea' and empty for fcs build
|
||||
"--with-version-pre=ea",
|
||||
"--without-version-opt");
|
||||
} else {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#
|
||||
|
||||
include CopyCommon.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
|
||||
|
||||
@@ -244,3 +245,16 @@ ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Generate classfile_constants.h
|
||||
|
||||
$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
|
||||
SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \
|
||||
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \
|
||||
REPLACEMENTS := \
|
||||
@@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
|
||||
@@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \
|
||||
))
|
||||
|
||||
TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Copy idl files to jdk/lib.
|
||||
$(eval $(call SetupCopyFiles,COPY_IDL, \
|
||||
SRC := $(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl, \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
|
||||
FILES := $(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/orb.idl \
|
||||
$(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/ir.idl))
|
||||
|
||||
TARGETS := $(COPY_IDL)
|
||||
@@ -29,52 +29,6 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
|
||||
# We need to bundle the freetype library, so it will be available at runtime
|
||||
# as well as link time.
|
||||
#
|
||||
# NB: Default freetype build system uses -h linker option and
|
||||
# result .so contains hardcoded library name that is later
|
||||
# used for adding dependencies to other objects
|
||||
# (e.g. libfontmanager.so).
|
||||
#
|
||||
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
|
||||
# without overcomplicating logic here.
|
||||
# To workaround this we hardcode .6 suffix for now.
|
||||
#
|
||||
# Note that .so.6 library will not be found by System.loadLibrary()
|
||||
# but fortunately we need to load FreeType library explicitly
|
||||
# on windows only
|
||||
#
|
||||
#TODO: rework this to avoid hardcoding library name in the makefile
|
||||
#
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris), )
|
||||
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype).6
|
||||
else
|
||||
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype)
|
||||
endif
|
||||
|
||||
# We can't use $(install-file) in this rule because it preserves symbolic links and
|
||||
# libfreetype.so is usually a symbolic link to something like libfreetype.so.6 on Unix.
|
||||
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) $< $@
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
$(CHMOD) +rx $@
|
||||
endif
|
||||
|
||||
TARGETS += $(FREETYPE_TARGET_LIB)
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_FREETYPE_LICENSE, \
|
||||
FILES := $(FREETYPE_LICENSE), \
|
||||
DEST := $(LEGAL_DST_DIR), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_FREETYPE_LICENSE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(CONF_DST_DIR)/sound.properties: $(TOPDIR)/src/java.desktop/share/conf/sound.properties
|
||||
$(call install-file)
|
||||
|
||||
|
||||
@@ -39,20 +39,12 @@ ifneq ($(wildcard $(INCLUDE_SOURCE_DIR)/*), )
|
||||
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE, \
|
||||
SRC := $(INCLUDE_SOURCE_DIR), \
|
||||
DEST := $(INCLUDE_TARGET_DIR), \
|
||||
FILES := $(shell $(FIND) $(INCLUDE_SOURCE_DIR) -type f), \
|
||||
FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_DIR))), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_EXPORTED_INCLUDE)
|
||||
endif
|
||||
|
||||
# For historical reasons, the OS include directories have odd names.
|
||||
INCLUDE_TARGET_OS_SUBDIR := $(OPENJDK_TARGET_OS)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
INCLUDE_TARGET_OS_SUBDIR := win32
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
INCLUDE_TARGET_OS_SUBDIR := darwin
|
||||
endif
|
||||
|
||||
# Use the most specific of OS and OS_TYPE.
|
||||
INCLUDE_SOURCE_OS_DIR := $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/native/include
|
||||
ifeq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
|
||||
@@ -62,8 +54,8 @@ endif
|
||||
ifneq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
|
||||
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE_OS, \
|
||||
SRC := $(INCLUDE_SOURCE_OS_DIR), \
|
||||
DEST := $(INCLUDE_TARGET_DIR)/$(INCLUDE_TARGET_OS_SUBDIR), \
|
||||
FILES := $(shell $(FIND) $(INCLUDE_SOURCE_OS_DIR) -type f), \
|
||||
DEST := $(INCLUDE_TARGET_DIR)/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR), \
|
||||
FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_EXPORTED_INCLUDE_OS)
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2009, 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.logutil;
|
||||
|
||||
import java.io.PrintWriter ;
|
||||
import java.io.Writer ;
|
||||
import java.io.OutputStream ;
|
||||
import java.io.BufferedWriter ;
|
||||
import java.io.OutputStreamWriter ;
|
||||
import java.util.StringTokenizer ;
|
||||
|
||||
public class IndentingPrintWriter extends PrintWriter {
|
||||
private int level = 0 ;
|
||||
private int indentWidth = 4 ;
|
||||
private String indentString = "" ;
|
||||
|
||||
public void printMsg( String msg, Object... data )
|
||||
{
|
||||
// System.out.println( "printMsg called with msg=" + msg + " data=" + data ) ;
|
||||
StringTokenizer st = new StringTokenizer( msg, "@", true ) ;
|
||||
StringBuffer result = new StringBuffer() ;
|
||||
String token = null ;
|
||||
int pos = 0;
|
||||
|
||||
while (st.hasMoreTokens()) {
|
||||
token = st.nextToken() ;
|
||||
if (token.equals("@")) {
|
||||
if (pos < data.length) {
|
||||
result.append( data[pos] );
|
||||
++pos;
|
||||
} else {
|
||||
throw new Error( "List too short for message" ) ;
|
||||
}
|
||||
} else {
|
||||
result.append( token ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// System.out.println( "Printing result " + result + " to file" ) ;
|
||||
print( result ) ;
|
||||
println() ;
|
||||
}
|
||||
|
||||
public IndentingPrintWriter (Writer out) {
|
||||
super( out, true ) ;
|
||||
// System.out.println( "Constructing a new IndentingPrintWriter with Writer " + out ) ;
|
||||
}
|
||||
|
||||
public IndentingPrintWriter(Writer out, boolean autoFlush) {
|
||||
super( out, autoFlush ) ;
|
||||
// System.out.println( "Constructing a new IndentingPrintWriter with Writer " + out ) ;
|
||||
}
|
||||
|
||||
public IndentingPrintWriter(OutputStream out) {
|
||||
super(out, true);
|
||||
// System.out.println( "Constructing a new IndentingPrintWriter with OutputStream " + out ) ;
|
||||
}
|
||||
|
||||
public IndentingPrintWriter(OutputStream out, boolean autoFlush) {
|
||||
super(new BufferedWriter(new OutputStreamWriter(out)), autoFlush);
|
||||
// System.out.println( "Constructing a new IndentingPrintWriter with OutputStream " + out ) ;
|
||||
}
|
||||
|
||||
public void setIndentWidth( int indentWidth )
|
||||
{
|
||||
this.indentWidth = indentWidth ;
|
||||
updateIndentString() ;
|
||||
}
|
||||
|
||||
public void indent()
|
||||
{
|
||||
level++ ;
|
||||
updateIndentString() ;
|
||||
}
|
||||
|
||||
public void undent()
|
||||
{
|
||||
if (level > 0) {
|
||||
level-- ;
|
||||
updateIndentString() ;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateIndentString()
|
||||
{
|
||||
int size = level * indentWidth ;
|
||||
StringBuffer sbuf = new StringBuffer( size ) ;
|
||||
for (int ctr = 0; ctr<size; ctr++ )
|
||||
sbuf.append( " " ) ;
|
||||
indentString = sbuf.toString() ;
|
||||
}
|
||||
|
||||
// overridden from PrintWriter
|
||||
public void println()
|
||||
{
|
||||
super.println() ;
|
||||
|
||||
print( indentString ) ;
|
||||
}
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2009, 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.logutil;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Input {
|
||||
|
||||
/**
|
||||
* The name of the package this class will inhabit.
|
||||
*/
|
||||
private String packageName;
|
||||
|
||||
/**
|
||||
* The name of the generated class.
|
||||
*/
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* The name of the group of exceptions handled by the class.
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* The group of exceptions.
|
||||
*/
|
||||
private Queue<InputException> exceptions;
|
||||
|
||||
/**
|
||||
* Represents the current state of parsing the input.
|
||||
*/
|
||||
private enum State
|
||||
{
|
||||
OUTER,
|
||||
IN_CLASS,
|
||||
IN_EXCEPTION_LIST
|
||||
};
|
||||
|
||||
/**
|
||||
* Regular expression to match each code line.
|
||||
*/
|
||||
private static final Pattern EXCEPTION_INFO_REGEX =
|
||||
Pattern.compile("(\\w+)\\s*(\\d+)\\s*(\\w+)");
|
||||
|
||||
/**
|
||||
* Parses the specified file to create a new {@link Input}
|
||||
* object.
|
||||
*
|
||||
* @param filename the file to parse.
|
||||
* @throws FileNotFoundException if the file can't be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
public Input(final String filename)
|
||||
throws FileNotFoundException, IOException {
|
||||
BufferedReader r =
|
||||
new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
|
||||
State state = State.OUTER;
|
||||
InputException current = null;
|
||||
exceptions = new LinkedList<InputException>();
|
||||
String line;
|
||||
while ((line = r.readLine()) != null) {
|
||||
// Skip ; comments
|
||||
if (line.startsWith(";"))
|
||||
continue;
|
||||
|
||||
int index = line.indexOf("(");
|
||||
if (index == -1)
|
||||
continue;
|
||||
|
||||
switch (state) {
|
||||
case OUTER:
|
||||
state = State.IN_CLASS;
|
||||
String[] classInfo = line.substring(index).split(" ");
|
||||
packageName = classInfo[0].substring(2, classInfo[0].length() - 1);
|
||||
className = classInfo[1].substring(1, classInfo[1].length() - 1);
|
||||
groupName = classInfo[2];
|
||||
break;
|
||||
case IN_CLASS:
|
||||
state = State.IN_EXCEPTION_LIST;
|
||||
break;
|
||||
case IN_EXCEPTION_LIST:
|
||||
boolean inQuote = false;
|
||||
boolean inCode = false;
|
||||
boolean end = false;
|
||||
int start = index + 1;
|
||||
Queue<String> lines = new LinkedList<String>();
|
||||
for (int a = start; a < line.length(); ++a) {
|
||||
if (line.charAt(a) == '(' && !inCode && !inQuote) {
|
||||
if (current == null)
|
||||
current =
|
||||
new InputException(line.substring(start, a).trim());
|
||||
start = a + 1;
|
||||
inCode = true;
|
||||
}
|
||||
if (line.charAt(a) == '"')
|
||||
inQuote = !inQuote;
|
||||
if (line.charAt(a) == ')' && !inQuote) {
|
||||
if (inCode) {
|
||||
lines.offer(line.substring(start, a));
|
||||
inCode = false;
|
||||
} else
|
||||
end = true;
|
||||
}
|
||||
if (!end && a == line.length() - 1)
|
||||
line += r.readLine();
|
||||
}
|
||||
for (String l : lines) {
|
||||
int stringStart = l.indexOf("\"") + 1;
|
||||
int stringEnd = l.indexOf("\"", stringStart);
|
||||
Matcher matcher = EXCEPTION_INFO_REGEX.matcher(l.substring(0, stringStart));
|
||||
if (matcher.find())
|
||||
current.add(new InputCode(matcher.group(1),
|
||||
Integer.parseInt(matcher.group(2)),
|
||||
matcher.group(3),
|
||||
l.substring(stringStart, stringEnd)));
|
||||
}
|
||||
exceptions.offer(current);
|
||||
current = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this group of exceptions.
|
||||
*
|
||||
* @return the name of this group of exceptions.
|
||||
*/
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the package this class will go in.
|
||||
*
|
||||
* @return the name of the package.
|
||||
*/
|
||||
public String getPackageName()
|
||||
{
|
||||
return packageName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the generated class.
|
||||
*
|
||||
* @return the name of the class.
|
||||
*/
|
||||
public String getClassName()
|
||||
{
|
||||
return className;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the exceptions contained in this class.
|
||||
*
|
||||
* @return the exceptions.
|
||||
*/
|
||||
public Queue<InputException> getExceptions() {
|
||||
return exceptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of this input.
|
||||
*
|
||||
* @return a textual representation.
|
||||
*/
|
||||
public String toString() {
|
||||
return getClass().getName() +
|
||||
"[packageName=" + packageName +
|
||||
",className=" + className +
|
||||
",groupName=" + groupName +
|
||||
",exceptions=" + exceptions +
|
||||
"]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2009, 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.logutil;
|
||||
|
||||
public class InputCode {
|
||||
|
||||
/**
|
||||
* The name of this code.
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The code.
|
||||
*/
|
||||
private final int code;
|
||||
|
||||
/**
|
||||
* The log level for this code.
|
||||
*/
|
||||
private final String logLevel;
|
||||
|
||||
/**
|
||||
* The error message for this code.
|
||||
*/
|
||||
private final String message;
|
||||
|
||||
/**
|
||||
* Creates a new error code with the specified name, code,
|
||||
* log level and error message.
|
||||
*
|
||||
* @param name the name of the new code.
|
||||
* @param code the code itself.
|
||||
* @param logLevel the level of severity of this error.
|
||||
* @param message the error message for this code.
|
||||
*/
|
||||
public InputCode(final String name, final int code,
|
||||
final String logLevel, final String message) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
this.logLevel = logLevel;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this code.
|
||||
*
|
||||
* @return the name of the code.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the code.
|
||||
*
|
||||
* @return the code.
|
||||
*/
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the severity of this code.
|
||||
*
|
||||
* @return the log level severity of the code.
|
||||
*/
|
||||
public String getLogLevel() {
|
||||
return logLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the error message for this code.
|
||||
*
|
||||
* @return the error message for this code.
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of this code.
|
||||
*
|
||||
* @return a textual representation.
|
||||
*/
|
||||
public String toString() {
|
||||
return getClass().getName() +
|
||||
"[name=" + name +
|
||||
",code=" + code +
|
||||
",logLevel=" + logLevel +
|
||||
",message=" + message +
|
||||
"]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2009, 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.logutil;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
public class InputException {
|
||||
|
||||
/**
|
||||
* The name of this exception.
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The codes associated with this exception.
|
||||
*/
|
||||
private final Queue<InputCode> codes;
|
||||
|
||||
/**
|
||||
* Constructs a new {@link InputException} with the
|
||||
* specified name.
|
||||
*
|
||||
* @param name the name of the new exception;
|
||||
*/
|
||||
public InputException(final String name) {
|
||||
this.name = name;
|
||||
codes = new LinkedList<InputCode>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new code to this exception.
|
||||
*
|
||||
* @param c the code to add.
|
||||
*/
|
||||
public void add(InputCode c)
|
||||
{
|
||||
codes.offer(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this exception.
|
||||
*
|
||||
* @return the exception's name.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the codes associated with this exception.
|
||||
*
|
||||
* @return the exception's codes.
|
||||
*/
|
||||
public Queue<InputCode> getCodes() {
|
||||
return codes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of this exception.
|
||||
*
|
||||
* @return a textual representation.
|
||||
*/
|
||||
public String toString() {
|
||||
return getClass().getName()
|
||||
+ "[name=" + name
|
||||
+ ",codes=" + codes
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,559 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2009, 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.logutil;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Formatter;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
|
||||
public class MC {
|
||||
|
||||
private static final String VERSION = "1.0";
|
||||
|
||||
private static final List<String> SUN_EXCEPTION_GROUPS = Arrays.asList(new String[]
|
||||
{ "SUNBASE", "ORBUTIL", "ACTIVATION", "NAMING", "INTERCEPTORS", "POA", "IOR", "UTIL" });
|
||||
|
||||
private static final List<String> EXCEPTIONS = Arrays.asList(new String[]
|
||||
{ "UNKNOWN", "BAD_PARAM", "NO_MEMORY", "IMP_LIMIT", "COMM_FAILURE", "INV_OBJREF", "NO_PERMISSION",
|
||||
"INTERNAL", "MARSHAL", "INITIALIZE", "NO_IMPLEMENT", "BAD_TYPECODE", "BAD_OPERATION", "NO_RESOURCES",
|
||||
"NO_RESPONSE", "PERSIST_STORE", "BAD_INV_ORDER", "TRANSIENT", "FREE_MEM", "INV_IDENT", "INV_FLAG",
|
||||
"INTF_REPOS", "BAD_CONTEXT", "OBJ_ADAPTER", "DATA_CONVERSION", "OBJECT_NOT_EXIST", "TRANSACTION_REQUIRED",
|
||||
"TRANSACTION_ROLLEDBACK", "INVALID_TRANSACTION", "INV_POLICY", "CODESET_INCOMPATIBLE", "REBIND",
|
||||
"TIMEOUT", "TRANSACTION_UNAVAILABLE", "BAD_QOS", "INVALID_ACTIVITY", "ACTIVITY_COMPLETED",
|
||||
"ACTIVITY_REQUIRED" });
|
||||
|
||||
/**
|
||||
* Read the minor codes from the input file and
|
||||
* write out a resource file.
|
||||
*
|
||||
* @param inFile the file to read the codes from.
|
||||
* @param outDir the directory to write the resource file to.
|
||||
* @throws FileNotFoundException if the input file can not be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
private void makeResource(String inFile, String outDir)
|
||||
throws FileNotFoundException, IOException {
|
||||
writeResource(outDir, new Input(inFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Java source file using the specified Scheme input file,
|
||||
* and writing the result to the given output directory.
|
||||
*
|
||||
* @param inFile the file to read the data from.
|
||||
* @param outDir the directory to write the Java class to.
|
||||
* @throws FileNotFoundException if the input file can not be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
private void makeClass(String inFile, String outDir)
|
||||
throws FileNotFoundException, IOException {
|
||||
writeClass(inFile, outDir, new Input(inFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a Java source file using the data from the given
|
||||
* {@link Input} object. The result is written to {@code outDir}.
|
||||
* The name of the input file is just used in the header of the
|
||||
* resulting source file.
|
||||
*
|
||||
* @param inFile the name of the file the data was read from.
|
||||
* @param outDir the directory to write the Java class to.
|
||||
* @param input the parsed input data.
|
||||
* @throws FileNotFoundException if the output file can't be written.
|
||||
*/
|
||||
private void writeClass(String inFile, String outDir, Input input)
|
||||
throws FileNotFoundException {
|
||||
String packageName = input.getPackageName();
|
||||
String className = input.getClassName();
|
||||
String groupName = input.getGroupName();
|
||||
Queue<InputException> exceptions = input.getExceptions();
|
||||
FileOutputStream file = new FileOutputStream(outDir + File.separator + className + ".java");
|
||||
IndentingPrintWriter pw = new IndentingPrintWriter(file);
|
||||
|
||||
writeClassHeader(inFile, groupName, pw);
|
||||
pw.printMsg("package @ ;", packageName);
|
||||
pw.println();
|
||||
pw.println("import java.util.logging.Logger ;");
|
||||
pw.println("import java.util.logging.Level ;");
|
||||
pw.println();
|
||||
pw.println("import org.omg.CORBA.OMGVMCID ;");
|
||||
pw.println( "import com.sun.corba.se.impl.util.SUNVMCID ;");
|
||||
pw.println( "import org.omg.CORBA.CompletionStatus ;");
|
||||
pw.println( "import org.omg.CORBA.SystemException ;");
|
||||
pw.println();
|
||||
pw.println( "import com.sun.corba.se.spi.orb.ORB ;");
|
||||
pw.println();
|
||||
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperFactory;");
|
||||
pw.println();
|
||||
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperBase;");
|
||||
pw.println();
|
||||
writeImports(exceptions, pw);
|
||||
pw.println();
|
||||
pw.indent();
|
||||
pw.printMsg("public class @ extends LogWrapperBase {", className);
|
||||
pw.println();
|
||||
pw.printMsg("public @( Logger logger )", className);
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.undent();
|
||||
pw.println( "super( logger ) ;");
|
||||
pw.println( "}");
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeFactoryMethod(className, groupName, pw);
|
||||
writeExceptions(groupName, exceptions, className, pw);
|
||||
pw.undent();
|
||||
pw.println( );
|
||||
pw.println( "}");
|
||||
pw.flush();
|
||||
pw.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out the header of a Java source file.
|
||||
*
|
||||
* @param inFile the input file the file was generated from.
|
||||
* @param groupName the group of exceptions the Java source file is for.
|
||||
* @param pw the print writer used to write the output.
|
||||
*/
|
||||
private void writeClassHeader(String inFile, String groupName,
|
||||
IndentingPrintWriter pw) {
|
||||
if (groupName.equals("OMG"))
|
||||
pw.println("// Log wrapper class for standard exceptions");
|
||||
else
|
||||
pw.printMsg("// Log wrapper class for Sun private system exceptions in group @",
|
||||
groupName);
|
||||
pw.println("//");
|
||||
pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
|
||||
pw.printMsg("// Generated from input file @ on @", inFile, new Date());
|
||||
pw.println();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write out the import list for the exceptions.
|
||||
*
|
||||
* @param groups the exceptions that were parsed.
|
||||
* @param pw the {@link IndentingPrintWriter} for writing to the file.
|
||||
*/
|
||||
private void writeImports(Queue<InputException> exceptions,
|
||||
IndentingPrintWriter pw) {
|
||||
if (exceptions == null)
|
||||
return;
|
||||
for (InputException e : exceptions)
|
||||
pw.println("import org.omg.CORBA." + e.getName() + " ;");
|
||||
}
|
||||
|
||||
/**
|
||||
* Write out the factory method for this group of exceptions.
|
||||
*
|
||||
* @param className the name of the generated class.
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param pw the {@link IndentingPrintWriter} for writing to the file.
|
||||
*/
|
||||
private void writeFactoryMethod(String className, String groupName,
|
||||
IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.println( "private static LogWrapperFactory factory = new LogWrapperFactory() {");
|
||||
pw.println( "public LogWrapperBase create( Logger logger )" );
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.undent();
|
||||
pw.printMsg("return new @( logger ) ;", className);
|
||||
pw.undent();
|
||||
pw.println( "}" );
|
||||
pw.println( "} ;" );
|
||||
pw.println();
|
||||
pw.printMsg("public static @ get( ORB orb, String logDomain )", className);
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.indent();
|
||||
pw.printMsg( "@ wrapper = ", className);
|
||||
pw.indent();
|
||||
pw.printMsg( "(@) orb.getLogWrapper( logDomain, ", className);
|
||||
pw.undent();
|
||||
pw.undent();
|
||||
pw.printMsg( "\"@\", factory ) ;", groupName);
|
||||
pw.undent();
|
||||
pw.println( "return wrapper ;" );
|
||||
pw.println( "} " );
|
||||
pw.println();
|
||||
pw.printMsg( "public static @ get( String logDomain )", className);
|
||||
pw.indent();
|
||||
pw.println( "{");
|
||||
pw.indent();
|
||||
pw.printMsg( "@ wrapper = ", className);
|
||||
pw.indent();
|
||||
pw.printMsg( "(@) ORB.staticGetLogWrapper( logDomain, ", className);
|
||||
pw.undent();
|
||||
pw.undent();
|
||||
pw.printMsg( "\"@\", factory ) ;", groupName);
|
||||
pw.undent();
|
||||
pw.println( "return wrapper ;" );
|
||||
pw.println( "} " );
|
||||
pw.println();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out the exceptions themselves.
|
||||
*
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param exceptions the exceptions to write out.
|
||||
* @param className the name of the generated class.
|
||||
* @param pw the {@link IndentingPrintWriter} for writing to the file.
|
||||
*/
|
||||
private void writeExceptions(String groupName, Queue<InputException> exceptions,
|
||||
String className, IndentingPrintWriter pw) {
|
||||
for (InputException e : exceptions) {
|
||||
pw.println("///////////////////////////////////////////////////////////");
|
||||
pw.printMsg("// @", e.getName());
|
||||
pw.println("///////////////////////////////////////////////////////////");
|
||||
pw.println();
|
||||
for (InputCode c : e.getCodes())
|
||||
writeMethods(groupName, e.getName(), c.getName(), c.getCode(),
|
||||
c.getLogLevel(), className, StringUtil.countArgs(c.getMessage()), pw);
|
||||
pw.flush();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out the methods for a particular error.
|
||||
*
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param errorName the name of this particular error.
|
||||
* @param code the minor code for this particular error.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param level the level at which to place log messages.
|
||||
* @param className the name of the class for this group of exceptions.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethods(String groupName, String exceptionName, String errorName,
|
||||
int code, String level, String className, int numParams,
|
||||
IndentingPrintWriter pw) {
|
||||
String ident = StringUtil.toMixedCase(errorName);
|
||||
pw.printMsg("public static final int @ = @ ;", errorName, getBase(groupName, code));
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodStatusCause(groupName, exceptionName, errorName, ident, level,
|
||||
numParams, className, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodStatus(exceptionName, ident, numParams, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodCause(exceptionName, ident, numParams, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
writeMethodNoArgs(exceptionName, ident, numParams, pw);
|
||||
pw.println();
|
||||
pw.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes a
|
||||
* {@link org.omg.CORBA.CompletionStatus} and a cause.
|
||||
*
|
||||
* @param groupName the name of this group of exceptions.
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param errorName the name of this particular error.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param logLevel the level at which to place log messages.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param className the name of the class for this group of exceptions.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodStatusCause(String groupName, String exceptionName,
|
||||
String errorName, String ident,
|
||||
String logLevel, int numParams,
|
||||
String className, IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.printMsg( "public @ @( CompletionStatus cs, Throwable t@) {", exceptionName,
|
||||
ident, makeDeclArgs(true, numParams));
|
||||
pw.printMsg( "@ exc = new @( @, cs ) ;", exceptionName, exceptionName, errorName);
|
||||
pw.indent();
|
||||
pw.println( "if (t != null)" );
|
||||
pw.undent();
|
||||
pw.println( "exc.initCause( t ) ;" );
|
||||
pw.println();
|
||||
pw.indent();
|
||||
pw.printMsg( "if (logger.isLoggable( Level.@ )) {", logLevel);
|
||||
if (numParams > 0) {
|
||||
pw.printMsg( "Object[] parameters = new Object[@] ;", numParams);
|
||||
for (int a = 0; a < numParams; ++a)
|
||||
pw.printMsg("parameters[@] = arg@ ;", a, a);
|
||||
} else
|
||||
pw.println( "Object[] parameters = null ;");
|
||||
pw.indent();
|
||||
pw.printMsg( "doLog( Level.@, \"@.@\",", logLevel, groupName, ident);
|
||||
pw.undent();
|
||||
pw.undent();
|
||||
pw.printMsg( "parameters, @.class, exc ) ;", className);
|
||||
pw.println( "}");
|
||||
pw.println();
|
||||
|
||||
pw.undent();
|
||||
pw.println( "return exc ;");
|
||||
pw.println( "}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes a
|
||||
* {@link org.omg.CORBA.CompletionStatus}.
|
||||
*
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodStatus(String exceptionName, String ident,
|
||||
int numParams, IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.printMsg("public @ @( CompletionStatus cs@) {", exceptionName,
|
||||
ident, makeDeclArgs(true, numParams));
|
||||
pw.undent();
|
||||
pw.printMsg("return @( cs, null@ ) ;", ident, makeCallArgs(true, numParams));
|
||||
pw.println("}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes a cause.
|
||||
*
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodCause(String exceptionName, String ident,
|
||||
int numParams, IndentingPrintWriter pw) {
|
||||
pw.indent();
|
||||
pw.printMsg("public @ @( Throwable t@) {", exceptionName, ident,
|
||||
makeDeclArgs(true, numParams));
|
||||
pw.undent();
|
||||
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, t@ ) ;", ident,
|
||||
makeCallArgs(true, numParams));
|
||||
pw.println("}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a method for an error that takes no arguments.
|
||||
*
|
||||
* @param exceptionName the name of this particular exception.
|
||||
* @param ident the name of the error in mixed-case identifier form.
|
||||
* @param numParams the number of parameters the detail message takes.
|
||||
* @param pw the print writer for writing to the file.
|
||||
*/
|
||||
private void writeMethodNoArgs(String exceptionName, String ident,
|
||||
int numParams, IndentingPrintWriter pw) {
|
||||
|
||||
pw.indent();
|
||||
pw.printMsg("public @ @( @) {", exceptionName, ident,
|
||||
makeDeclArgs(false, numParams));
|
||||
pw.undent();
|
||||
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, null@ ) ;",
|
||||
ident, makeCallArgs(true, numParams));
|
||||
pw.println("}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of comma-separated arguments with type declarations.
|
||||
*
|
||||
* @param leadingComma true if the list should start with a comma.
|
||||
* @param numArgs the number of arguments to generate.
|
||||
* @return the generated string.
|
||||
*/
|
||||
private String makeDeclArgs(boolean leadingComma, int numArgs) {
|
||||
return makeArgString("Object arg", leadingComma, numArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of comma-separated arguments without type declarations.
|
||||
*
|
||||
* @param leadingComma true if the list should start with a comma.
|
||||
* @param numArgs the number of arguments to generate.
|
||||
* @return the generated string.
|
||||
*/
|
||||
private String makeCallArgs(boolean leadingComma, int numArgs) {
|
||||
return makeArgString("arg", leadingComma, numArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of comma-separated arguments.
|
||||
*
|
||||
* @param prefixString the string with which to prefix each argument.
|
||||
* @param leadingComma true if the list should start with a comma.
|
||||
* @param numArgs the number of arguments to generate.
|
||||
* @return the generated string.
|
||||
*/
|
||||
private String makeArgString(String prefixString, boolean leadingComma,
|
||||
int numArgs) {
|
||||
if (numArgs == 0)
|
||||
return " ";
|
||||
if (numArgs == 1) {
|
||||
if (leadingComma)
|
||||
return ", " + prefixString + (numArgs - 1);
|
||||
else
|
||||
return " " + prefixString + (numArgs - 1);
|
||||
}
|
||||
return makeArgString(prefixString, leadingComma, numArgs - 1) +
|
||||
", " + prefixString + (numArgs - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link String} containing the calculation of the
|
||||
* error code.
|
||||
*
|
||||
* @param groupName the group of exception to which the code belongs.
|
||||
* @param code the minor code number representing the exception within the group.
|
||||
* @return the unique error code.
|
||||
*/
|
||||
private String getBase(String groupName, int code) {
|
||||
if (groupName.equals("OMG"))
|
||||
return "OMGVMCID.value + " + code;
|
||||
else
|
||||
return "SUNVMCID.value + " + (code + getSunBaseNumber(groupName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the base number for Sun-specific exceptions.
|
||||
*
|
||||
* @return the base number.
|
||||
*/
|
||||
private int getSunBaseNumber(String groupName) {
|
||||
return 200 * SUN_EXCEPTION_GROUPS.indexOf(groupName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a resource file using the data from the given
|
||||
* {@link Input} object. The result is written to {@code outDir}.
|
||||
*
|
||||
* @param outDir the directory to write the Java class to.
|
||||
* @param input the parsed input data.
|
||||
* @throws FileNotFoundException if the output file can't be written.
|
||||
*/
|
||||
private void writeResource(String outDir, Input input)
|
||||
throws FileNotFoundException {
|
||||
FileOutputStream file = new FileOutputStream(outDir + File.separator +
|
||||
input.getClassName() + ".resource");
|
||||
IndentingPrintWriter pw = new IndentingPrintWriter(file);
|
||||
String groupName = input.getGroupName();
|
||||
for (InputException e : input.getExceptions()) {
|
||||
String exName = e.getName();
|
||||
for (InputCode c : e.getCodes()) {
|
||||
String ident = StringUtil.toMixedCase(c.getName());
|
||||
pw.printMsg("@.@=\"@: (@) @\"", groupName, ident,
|
||||
getMessageID(groupName, exName, c.getCode()), exName, c.getMessage());
|
||||
}
|
||||
pw.flush();
|
||||
}
|
||||
pw.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message ID corresponding to the given group name,
|
||||
* exception name and error code.
|
||||
*
|
||||
* @param groupName the name of the group of exceptions.
|
||||
* @param exception the name of the particular exception.
|
||||
* @param code an error code from the given exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getMessageID(String groupName, String exceptionName, int code) {
|
||||
if (groupName.equals("OMG"))
|
||||
return getStandardMessageID(exceptionName, code);
|
||||
else
|
||||
return getSunMessageID(groupName, exceptionName, code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the standard (OMG) message ID corresponding to the given
|
||||
* exception name and error code.
|
||||
*
|
||||
* @param exceptionName the name of the particular exception.
|
||||
* @param code an error code from the given exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getStandardMessageID(String exceptionName, int code) {
|
||||
return new Formatter().format("IOP%s0%04d", getExceptionID(exceptionName),
|
||||
code).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Sun message ID corresponding to the given group name,
|
||||
* exception name and error code.
|
||||
*
|
||||
* @param groupName the name of the group of exceptions.
|
||||
* @param exceptionName the name of the particular exception.
|
||||
* @param code an error code from the given exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getSunMessageID(String groupName, String exceptionName, int code) {
|
||||
return new Formatter().format("IOP%s1%04d", getExceptionID(exceptionName),
|
||||
getSunBaseNumber(groupName) + code).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the exception ID corresponding to the given exception name.
|
||||
*
|
||||
* @param exceptionName the name of the particular exception.
|
||||
* @return the message ID.
|
||||
*/
|
||||
private String getExceptionID(String exceptionName) {
|
||||
return new Formatter().format("%03d", EXCEPTIONS.indexOf(exceptionName)).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point for running the generator from the command
|
||||
* line. Users can specify either "make-class" or "make-resource"
|
||||
* as the first argument to generate the specified type of file.
|
||||
*
|
||||
* @param args the command-line arguments.
|
||||
* @throws FileNotFoundException if the input file can not be found.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
throws FileNotFoundException, IOException
|
||||
{
|
||||
if (args.length < 3)
|
||||
{
|
||||
System.err.println("(make-class|make-resource) <input file> <output dir>");
|
||||
System.exit(-1);
|
||||
}
|
||||
if (args[0].equals("make-class"))
|
||||
new MC().makeClass(args[1], args[2]);
|
||||
else if (args[0].equals("make-resource"))
|
||||
new MC().makeResource(args[1], args[2]);
|
||||
else
|
||||
System.err.println("Invalid command: " + args[0]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 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.logutil;
|
||||
|
||||
public abstract class StringUtil {
|
||||
/** Take a string containing underscores, and return a string
|
||||
* with the underscore removed, and all characters exception in lower
|
||||
* case except the characters after the underscores.
|
||||
*/
|
||||
public static String toMixedCase( String str )
|
||||
{
|
||||
StringBuffer sbuf = new StringBuffer( str.length() ) ;
|
||||
boolean uppercaseNext = false ;
|
||||
for (int ctr=0; ctr<str.length(); ctr++) {
|
||||
char ch = str.charAt( ctr ) ;
|
||||
|
||||
if (ch == '_') {
|
||||
uppercaseNext = true ;
|
||||
} else if (uppercaseNext) {
|
||||
sbuf.append( Character.toUpperCase( ch ) ) ;
|
||||
uppercaseNext = false ;
|
||||
} else {
|
||||
sbuf.append( Character.toLowerCase( ch ) ) ;
|
||||
}
|
||||
}
|
||||
|
||||
return sbuf.toString() ;
|
||||
}
|
||||
|
||||
public static int countArgs( String str )
|
||||
{
|
||||
int result = 0 ;
|
||||
for( int ctr = 0; ctr<str.length(); ctr++ )
|
||||
if (str.charAt(ctr) == '{')
|
||||
result++ ;
|
||||
|
||||
return result ;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2018, 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
|
||||
@@ -159,20 +159,37 @@ class CharacterDataLatin1 extends CharacterData {
|
||||
return toUpperCase(ch);
|
||||
}
|
||||
|
||||
// Digit values for codePoints in the 0-255 range. Contents generated using:
|
||||
// for (char i = 0; i < 256; i++) {
|
||||
// int v = -1;
|
||||
// if (i >= '0' && i <= '9') { v = i - '0'; }
|
||||
// else if (i >= 'A' && i <= 'Z') { v = i - 'A' + 10; }
|
||||
// else if (i >= 'a' && i <= 'z') { v = i - 'a' + 10; }
|
||||
// if (i % 20 == 0) System.out.println();
|
||||
// System.out.printf("%2d, ", v);
|
||||
// }
|
||||
//
|
||||
// Analysis has shown that generating the whole array allows the JIT to generate
|
||||
// better code compared to a slimmed down array, such as one cutting off after 'z'
|
||||
private static final byte[] DIGITS = new byte[] {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1,
|
||||
-1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
||||
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, 10, 11, 12,
|
||||
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
||||
33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
|
||||
|
||||
int digit(int ch, int radix) {
|
||||
int value = -1;
|
||||
if (radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX) {
|
||||
int val = getProperties(ch);
|
||||
int kind = val & $$maskType;
|
||||
if (kind == Character.DECIMAL_DIGIT_NUMBER) {
|
||||
value = ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit;
|
||||
}
|
||||
else if ((val & $$maskNumericType) == $$valueJavaSupradecimal) {
|
||||
// Java supradecimal digit
|
||||
value = (ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit) + 10;
|
||||
}
|
||||
}
|
||||
return (value < radix) ? value : -1;
|
||||
int value = DIGITS[ch];
|
||||
return (value >= 0 && value < radix && radix >= Character.MIN_RADIX
|
||||
&& radix <= Character.MAX_RADIX) ? value : -1;
|
||||
}
|
||||
|
||||
int getNumericValue(int ch) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
@@ -869,7 +869,6 @@ JDWP "Java(tm) Debug Wire Protocol"
|
||||
"section in "
|
||||
"<cite>The Java™ Virtual Machine Specification</cite>. "
|
||||
"Since JDWP version 1.5."
|
||||
"<p>
|
||||
(Out
|
||||
(referenceType refType "The reference type ID.")
|
||||
)
|
||||
@@ -2723,7 +2722,6 @@ JDWP "Java(tm) Debug Wire Protocol"
|
||||
"<P>"
|
||||
"The events that are grouped in a composite event are restricted in the "
|
||||
"following ways: "
|
||||
"<P>"
|
||||
"<UL>"
|
||||
"<LI>Only with other thread start events for the same thread:"
|
||||
" <UL>"
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
tzdata2017c
|
||||
tzdata2018c
|
||||
|
||||
@@ -181,7 +181,6 @@ Link Africa/Abidjan Africa/Freetown # Sierra Leone
|
||||
Link Africa/Abidjan Africa/Lome # Togo
|
||||
Link Africa/Abidjan Africa/Nouakchott # Mauritania
|
||||
Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso
|
||||
Link Africa/Abidjan Africa/Sao_Tome # São Tomé and Príncipe
|
||||
Link Africa/Abidjan Atlantic/St_Helena # St Helena
|
||||
|
||||
# Djibouti
|
||||
@@ -448,7 +447,7 @@ Link Africa/Nairobi Indian/Mayotte
|
||||
#
|
||||
# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30.
|
||||
#
|
||||
# In 1972 Liberia was the last country to switch from a UTC offset
|
||||
# In 1972 Liberia was the last country to switch from a UT offset
|
||||
# that was not a multiple of 15 or 20 minutes. The 1972 change was on
|
||||
# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of:
|
||||
# Presidential Papers: First year of the administration of
|
||||
@@ -1060,6 +1059,19 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
|
||||
# Inaccessible, Nightingale: uninhabited
|
||||
|
||||
# São Tomé and Príncipe
|
||||
|
||||
# From Steffen Thorsen (2018-01-08):
|
||||
# Multiple sources tell that São Tomé changed from UTC to UTC+1 as
|
||||
# they entered the year 2018.
|
||||
# From Michael Deckers (2018-01-08):
|
||||
# the switch is from 01:00 to 02:00 ... [Decree No. 25/2017]
|
||||
# http://www.mnec.gov.st/index.php/publicacoes/documentos/file/90-decreto-lei-n-25-2017
|
||||
|
||||
Zone Africa/Sao_Tome 0:26:56 - LMT 1884
|
||||
-0:36:45 - LMT 1912 # Lisbon Mean Time
|
||||
0:00 - GMT 2018 Jan 1 01:00
|
||||
1:00 - WAT
|
||||
|
||||
# Senegal
|
||||
# See Africa/Abidjan.
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
# 9:00 KST KDT Korea when at +09
|
||||
# 9:30 ACST Australian Central Standard Time
|
||||
# Otherwise, these tables typically use numeric abbreviations like +03
|
||||
# and +0330 for integer hour and minute UTC offsets. Although earlier
|
||||
# and +0330 for integer hour and minute UT offsets. Although earlier
|
||||
# editions invented alphabetic time zone abbreviations for every
|
||||
# offset, this did not reflect common practice.
|
||||
#
|
||||
@@ -670,17 +670,17 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30
|
||||
# time", in which abolished the adoption of Western Standard Time in
|
||||
# western islands (listed above), which means the whole Japan
|
||||
# territory, including later occupations, adopt Japan Central Time
|
||||
# (UTC+9). The adoption began on Oct 1, 1937. The original text can
|
||||
# (UT+9). The adoption began on Oct 1, 1937. The original text can
|
||||
# be found on Wikisource:
|
||||
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
|
||||
#
|
||||
# That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937.
|
||||
# That is, the time zone of Taipei switched to UT+9 on Oct 1, 1937.
|
||||
|
||||
# From Yu-Cheng Chuang (2014-07-02):
|
||||
# I've found more evidence about when the time zone was switched from UTC+9
|
||||
# back to UTC+8 after WW2. I believe it was on Sep 21, 1945. In a document
|
||||
# I've found more evidence about when the time zone was switched from UT+9
|
||||
# back to UT+8 after WW2. I believe it was on Sep 21, 1945. In a document
|
||||
# during Japanese era [1] in which the officer told the staff to change time
|
||||
# zone back to Western Standard Time (UTC+8) on Sep 21. And in another
|
||||
# zone back to Western Standard Time (UT+8) on Sep 21. And in another
|
||||
# history page of National Cheng Kung University [2], on Sep 21 there is a
|
||||
# note "from today, switch back to Western Standard Time". From these two
|
||||
# materials, I believe that the time zone change happened on Sep 21. And
|
||||
@@ -1487,17 +1487,17 @@ Zone Asia/Jerusalem 2:20:54 - LMT 1880
|
||||
# of the Japanese wanted to scrap daylight-saving time, as opposed to 30% who
|
||||
# wanted to keep it.)
|
||||
|
||||
# From Paul Eggert (2006-03-22):
|
||||
# Shanks & Pottenger write that DST in Japan during those years was as follows:
|
||||
# From Takayuki Nikai (2018-01-19):
|
||||
# The source of information is Japanese law.
|
||||
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00219480428029.htm
|
||||
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm
|
||||
# ... In summary, it is written as follows. From 24:00 on the first Saturday
|
||||
# in May, until 0:00 on the day after the second Saturday in September.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Japan 1948 only - May Sun>=1 2:00 1:00 D
|
||||
Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S
|
||||
Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D
|
||||
Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
|
||||
# but the only locations using it (for birth certificates, presumably, since
|
||||
# their audience is astrologers) were US military bases. For now, assume
|
||||
# that for most purposes daylight-saving time was observed; otherwise, what
|
||||
# would have been the point of the 1951 poll?
|
||||
Rule Japan 1948 only - May Sat>=1 24:00 1:00 D
|
||||
Rule Japan 1948 1951 - Sep Sun>=9 0:00 0 S
|
||||
Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D
|
||||
Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D
|
||||
|
||||
# From Hideyuki Suzuki (1998-11-09):
|
||||
# 'Tokyo' usually stands for the former location of Tokyo Astronomical
|
||||
@@ -1528,7 +1528,7 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
|
||||
#
|
||||
# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which
|
||||
# means the whole Japan territory, including later occupations, adopt Japan
|
||||
# Central Time (UTC+9). The adoption began on Oct 1, 1937.
|
||||
# Central Time (UT+9). The adoption began on Oct 1, 1937.
|
||||
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
@@ -2089,8 +2089,8 @@ Zone Asia/Kuching 7:21:20 - LMT 1926 Mar
|
||||
|
||||
# Maldives
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
|
||||
4:54:00 - MMT 1960 # Male Mean Time
|
||||
Zone Indian/Maldives 4:54:00 - LMT 1880 # Malé
|
||||
4:54:00 - MMT 1960 # Malé Mean Time
|
||||
5:00 - +05
|
||||
|
||||
# Mongolia
|
||||
|
||||
@@ -706,8 +706,8 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
|
||||
# From Steffen Thorsen (2012-07-25)
|
||||
# ... we double checked by calling hotels and offices based in Tokelau asking
|
||||
# about the time there, and they all told a time that agrees with UTC+13....
|
||||
# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change
|
||||
# actually was to UTC-11 back then.
|
||||
# Shanks says UT-10 from 1901 [but] ... there is a good chance the change
|
||||
# actually was to UT-11 back then.
|
||||
#
|
||||
# From Paul Eggert (2012-07-25)
|
||||
# A Google Books snippet of Appendix to the Journals of the House of
|
||||
@@ -1473,7 +1473,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
|
||||
#
|
||||
# From Paul Eggert (2006-03-22):
|
||||
# The Department of Internal Affairs (DIA) maintains a brief history,
|
||||
# as does Carol Squires; see tz-link.htm for the full references.
|
||||
# as does Carol Squires; see tz-link.html for the full references.
|
||||
# Use these sources in preference to Shanks & Pottenger.
|
||||
#
|
||||
# For Chatham, IATA SSIM (1991/1999) gives the NZ rules but with
|
||||
|
||||
@@ -91,14 +91,15 @@
|
||||
# 0:00 WET WEST WEMT Western Europe
|
||||
# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937)
|
||||
# 1:00 BST British Standard (1968-1971)
|
||||
# 1:00 IST GMT Irish Standard (1968-) with winter DST
|
||||
# 1:00 CET CEST CEMT Central Europe
|
||||
# 1:00:14 SET Swedish (1879-1899)
|
||||
# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)*
|
||||
# 2:00 EET EEST Eastern Europe
|
||||
# 3:00 MSK MSD MDST* Moscow
|
||||
|
||||
# From Peter Ilieve (1994-12-04),
|
||||
# The original six [EU members]: Belgium, France, (West) Germany, Italy,
|
||||
# From Peter Ilieve (1994-12-04), re EEC/EC/EU members:
|
||||
# The original six: Belgium, France, (West) Germany, Italy,
|
||||
# Luxembourg, the Netherlands.
|
||||
# Plus, from 1 Jan 73: Denmark, Ireland, United Kingdom.
|
||||
# Plus, from 1 Jan 81: Greece.
|
||||
@@ -301,16 +302,31 @@
|
||||
# The following claim by Shanks & Pottenger is possible though doubtful;
|
||||
# we'll ignore it for now.
|
||||
# * Dublin's 1971-10-31 switch was at 02:00, even though London's was 03:00.
|
||||
|
||||
# From Paul Eggert (2017-12-04):
|
||||
#
|
||||
#
|
||||
# Whitman says Dublin Mean Time was -0:25:21, which is more precise than
|
||||
# Shanks & Pottenger.
|
||||
# Perhaps this was Dunsink Observatory Time, as Dunsink Observatory
|
||||
# (8 km NW of Dublin's center) seemingly was to Dublin as Greenwich was
|
||||
# to London. For example:
|
||||
# Dunsink Observatory (8 km NW of Dublin's center) was to Dublin as
|
||||
# Greenwich was to London. For example:
|
||||
#
|
||||
# "Timeball on the ballast office is down. Dunsink time."
|
||||
# -- James Joyce, Ulysses
|
||||
#
|
||||
# The abbreviation DMT stood for "Dublin Mean Time" or "Dunsink Mean Time";
|
||||
# this being Ireland, opinions differed.
|
||||
#
|
||||
# Whitman says Dublin/Dunsink Mean Time was UT-00:25:21, which agrees
|
||||
# with measurements of recent visitors to the Meridian Room of Dunsink
|
||||
# Observatory; see Malone D. Dunsink and timekeeping. 2016-01-24.
|
||||
# <https://www.maths.tcd.ie/~dwmalone/time/dunsink.html>. Malone
|
||||
# writes that the Nautical Almanac listed UT-00:25:22 until 1896, when
|
||||
# it moved to UT-00:25:21.1 (I confirmed that the 1893 edition used
|
||||
# the former and the 1896 edition used the latter). Evidently the
|
||||
# news of this change propagated slowly, as Milne 1899 still lists
|
||||
# UT-00:25:22 and cites the International Telegraph Bureau. As it is
|
||||
# not clear that there was any practical significance to the change
|
||||
# from UT-00:25:22 to UT-00:25:21.1 in civil timekeeping, omit this
|
||||
# transition for now and just use the latter value, omitting its
|
||||
# fraction since our format cannot represent fractions.
|
||||
|
||||
# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time
|
||||
# was among various actions undertaken by the 'English' government that
|
||||
@@ -370,12 +386,28 @@
|
||||
# regulations. I spoke this morning with the Secretary of the Department of
|
||||
# Justice (tel +353 1 678 9711) who confirmed to me that the correct name is
|
||||
# "Irish Summer Time", abbreviated to "IST".
|
||||
#
|
||||
# From Paul Eggert (2017-12-07):
|
||||
# The 1996 anonymous contributor's goal was to determine the correct
|
||||
# abbreviation for summer time in Dublin and so the contributor
|
||||
# focused on the "IST", not on the "Irish Summer Time". Though the
|
||||
# "IST" was correct, the "Irish Summer Time" appears to have been an
|
||||
# error, as Ireland's Standard Time (Amendment) Act, 1971 states that
|
||||
# standard time in Ireland remains at UT +01 and is observed in
|
||||
# summer, and that Greenwich mean time is observed in winter. (Thanks
|
||||
# to Derick Rethans for pointing out the error.) That is, when
|
||||
# Ireland amended the 1968 act that established UT +01 as Irish
|
||||
# Standard Time, it left standard time unchanged and established GMT
|
||||
# as a negative daylight saving time in winter. So, in this database
|
||||
# IST stands for Irish Summer Time for timestamps before 1968, and for
|
||||
# Irish Standard Time after that. See:
|
||||
# http://www.irishstatutebook.ie/eli/1971/act/17/enacted/en/print
|
||||
|
||||
# Michael Deckers (2017-06-01) gave the following URLs for Ireland's
|
||||
# Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947:
|
||||
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html
|
||||
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html
|
||||
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html
|
||||
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print
|
||||
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print
|
||||
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
# Summer Time Act, 1916
|
||||
@@ -499,9 +531,23 @@ Link Europe/London Europe/Jersey
|
||||
Link Europe/London Europe/Guernsey
|
||||
Link Europe/London Europe/Isle_of_Man
|
||||
|
||||
# From Paul Eggert (2018-01-19):
|
||||
# The following is like GB-Eire and EU, except with standard time in
|
||||
# summer and negative daylight saving time in winter.
|
||||
# Although currently commented out, this will need to become uncommented
|
||||
# once the ICU/OpenJDK workaround is removed; see below.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
#Rule Eire 1971 only - Oct 31 2:00u -1:00 GMT
|
||||
#Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 IST
|
||||
#Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 GMT
|
||||
#Rule Eire 1981 max - Mar lastSun 1:00u 0 IST
|
||||
#Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 GMT
|
||||
#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 GMT
|
||||
#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 GMT
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
|
||||
-0:25:21 - DMT 1916 May 21 2:00s # Dublin MT
|
||||
-0:25:21 - DMT 1916 May 21 2:00s
|
||||
-0:25:21 1:00 IST 1916 Oct 1 2:00s
|
||||
0:00 GB-Eire %s 1921 Dec 6 # independence
|
||||
0:00 GB-Eire GMT/IST 1940 Feb 25 2:00s
|
||||
@@ -510,16 +556,33 @@ Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
|
||||
0:00 1:00 IST 1947 Nov 2 2:00s
|
||||
0:00 - GMT 1948 Apr 18 2:00s
|
||||
0:00 GB-Eire GMT/IST 1968 Oct 27
|
||||
# From Paul Eggert (2018-01-18):
|
||||
# The next line should look like this:
|
||||
# 1:00 Eire IST/GMT
|
||||
# However, in January 2018 we discovered that the Eire rules cause
|
||||
# problems with tests for ICU:
|
||||
# https://mm.icann.org/pipermail/tz/2018-January/025825.html
|
||||
# and with tests for OpenJDK:
|
||||
# https://mm.icann.org/pipermail/tz/2018-January/025822.html
|
||||
# To work around this problem, use a traditional approximation for
|
||||
# time stamps after 1971-10-31 02:00 UTC, to give ICU and OpenJDK
|
||||
# developers breathing room to fix bugs. This approximation has
|
||||
# correct UTC offsets, but results in tm_isdst flags are the reverse
|
||||
# of what they should be. This workaround is temporary and should be
|
||||
# removed reasonably soon.
|
||||
1:00 - IST 1971 Oct 31 2:00u
|
||||
0:00 GB-Eire GMT/IST 1996
|
||||
0:00 EU GMT/IST
|
||||
# End of workaround for ICU and OpenJDK bugs.
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
# Europe
|
||||
|
||||
# EU rules are for the European Union, previously known as the EC, EEC,
|
||||
# Common Market, etc.
|
||||
# The following rules are for the European Union and for its
|
||||
# predecessor organization, the European Communities.
|
||||
# For brevity they are called "EU rules" elsewhere in this file.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
|
||||
@@ -952,7 +1015,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850
|
||||
# The page http://www.retsinfo.dk/_GETDOCI_/ACCN/A18930008330-REGL
|
||||
# confirms this, and states that the law was put forth 1893-03-29.
|
||||
#
|
||||
# The EU treaty with effect from 1973:
|
||||
# The EU [actually, EEC and Euratom] treaty with effect from 1973:
|
||||
# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19722110030-REGL
|
||||
#
|
||||
# This provoked a new law from 1974 to make possible summer time changes
|
||||
@@ -1008,9 +1071,10 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn
|
||||
# East Greenland and Franz Josef Land, but we don't know their time zones.
|
||||
# My source for this is Wilhelm Dege's book mentioned under Svalbard.
|
||||
#
|
||||
# From Paul Eggert (2006-03-22):
|
||||
# Greenland joined the EU as part of Denmark, obtained home rule on 1979-05-01,
|
||||
# and left the EU on 1985-02-01. It therefore should have been using EU
|
||||
# From Paul Eggert (2017-12-10):
|
||||
# Greenland joined the European Communities as part of Denmark,
|
||||
# obtained home rule on 1979-05-01, and left the European Communities
|
||||
# on 1985-02-01. It therefore should have been using EU
|
||||
# rules at least through 1984. Shanks & Pottenger say Scoresbysund and Godthåb
|
||||
# used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU
|
||||
# rules since at least 1991. Assume EU rules since 1980.
|
||||
@@ -1324,7 +1388,7 @@ Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
|
||||
# From Markus Kuhn (1998-09-29):
|
||||
# The German time zone web site by the Physikalisch-Technische
|
||||
# Bundesanstalt contains DST information back to 1916.
|
||||
# [See tz-link.htm for the URL.]
|
||||
# [See tz-link.html for the URL.]
|
||||
|
||||
# From Jörg Schilling (2002-10-23):
|
||||
# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
|
||||
@@ -1421,7 +1485,7 @@ Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14
|
||||
1:00 Greece CE%sT 1944 Apr 4
|
||||
2:00 Greece EE%sT 1981
|
||||
# Shanks & Pottenger say it switched to C-Eur in 1981;
|
||||
# go with EU instead, since Greece joined it on Jan 1.
|
||||
# go with EU rules instead, since Greece joined Jan 1.
|
||||
2:00 EU EE%sT
|
||||
|
||||
# Hungary
|
||||
@@ -2120,7 +2184,7 @@ Zone Europe/Warsaw 1:24:00 - LMT 1880
|
||||
# IATA SSIM (1991/1992) reports that the Azores were at -1:00.
|
||||
# IATA SSIM (1993-02) says +0:00; later issues (through 1996-09) say -1:00.
|
||||
# Guess that the Azores changed to EU rules in 1992 (since that's when Portugal
|
||||
# harmonized with the EU), and that they stayed +0:00 that winter.
|
||||
# harmonized with EU rules), and that they stayed +0:00 that winter.
|
||||
#
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
# DSH writes that despite Decree 1,469 (1915), the change to the clocks was not
|
||||
@@ -2795,9 +2859,9 @@ Zone Asia/Omsk 4:53:30 - LMT 1919 Nov 14
|
||||
#
|
||||
# https://regnum.ru/news/society/1957270.html
|
||||
# has some historical data for Altai Krai:
|
||||
# before 1957: west part on UTC+6, east on UTC+7
|
||||
# after 1957: UTC+7
|
||||
# since 1995: UTC+6
|
||||
# before 1957: west part on UT+6, east on UT+7
|
||||
# after 1957: UT+7
|
||||
# since 1995: UT+6
|
||||
# http://barnaul.rusplt.ru/index/pochemu_altajskij_kraj_okazalsja_v_neprivychnom_chasovom_pojase-17648.html
|
||||
# confirms that and provides more details including 1995-05-28 transition date.
|
||||
|
||||
@@ -3605,6 +3669,17 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
|
||||
# The change is permanent, so this is the new standard time in Turkey.
|
||||
# It takes effect today, which is not much notice.
|
||||
|
||||
# From Kıvanç Yazan (2017-10-28):
|
||||
# Turkey will go back to Daylight Saving Time starting 2018-10.
|
||||
# http://www.resmigazete.gov.tr/eskiler/2017/10/20171028-5.pdf
|
||||
#
|
||||
# From Even Scharning (2017-11-08):
|
||||
# ... today it was announced that the DST will become "continuous":
|
||||
# http://www.hurriyet.com.tr/son-dakika-yaz-saati-uygulamasi-surekli-hale-geldi-40637482
|
||||
# From Paul Eggert (2017-11-08):
|
||||
# Although Google Translate misfires on that source, it looks like
|
||||
# Turkey reversed last month's decision, and so will stay at +03.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Turkey 1916 only - May 1 0:00 1:00 S
|
||||
Rule Turkey 1916 only - Oct 1 0:00 0 -
|
||||
|
||||
@@ -80,5 +80,5 @@ Leap 2012 Jun 30 23:59:60 + S
|
||||
Leap 2015 Jun 30 23:59:60 + S
|
||||
Leap 2016 Dec 31 23:59:60 + S
|
||||
|
||||
# Updated through IERS Bulletin C54
|
||||
# File expires on: 28 June 2018
|
||||
# Updated through IERS Bulletin C55
|
||||
# File expires on: 28 December 2018
|
||||
|
||||
@@ -371,6 +371,18 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
|
||||
# Nebraska, eastern North Dakota, Oklahoma, eastern South Dakota,
|
||||
# western Tennessee, most of Texas, Wisconsin
|
||||
|
||||
# From Paul Eggert (2018-01-07):
|
||||
# In 1869 the Chicago Astronomical Society contracted with the city to keep
|
||||
# time. Though delayed by the Great Fire, by 1880 a wire ran from the
|
||||
# Dearborn Observatory (on the University of Chicago campus) to City Hall,
|
||||
# which then sent signals to police and fire stations. However, railroads got
|
||||
# their time signals from the Allegheny Observatory, the Madison Observatory,
|
||||
# the Ann Arbor Observatory, etc., so their clocks did not agree with each
|
||||
# other or with the city's official time. The confusion took some years to
|
||||
# clear up. See:
|
||||
# Moser M. How Chicago gave America its time zones. Chicago. 2018-01-04.
|
||||
# http://www.chicagomag.com/city-life/January-2018/How-Chicago-Gave-America-Its-Time-Zones/
|
||||
|
||||
# From Larry M. Smith (2006-04-26) re Wisconsin:
|
||||
# https://docs.legis.wisconsin.gov/statutes/statutes/175.pdf
|
||||
# is currently enforced at the 01:00 time of change. Because the local
|
||||
@@ -1919,7 +1931,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
|
||||
# manager of the Creston & District Museum. The article was written in May 2009.
|
||||
# http://www.ilovecreston.com/?p=articles&t=spec&ar=260
|
||||
# According to the article, Creston has not changed its clocks since June 1918.
|
||||
# i.e. Creston has been stuck on UTC-7 for 93 years.
|
||||
# i.e. Creston has been stuck on UT-7 for 93 years.
|
||||
# Dawson Creek, on the other hand, changed its clocks as recently as April 1972.
|
||||
|
||||
# Unfortunately the exact date for the time change in June 1918 remains
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
# https://www.jstor.org/stable/1774359
|
||||
#
|
||||
# These tables use numeric abbreviations like -03 and -0330 for
|
||||
# integer hour and minute UTC offsets. Although earlier editions used
|
||||
# integer hour and minute UT offsets. Although earlier editions used
|
||||
# alphabetic time zone abbreviations, these abbreviations were
|
||||
# invented and did not reflect common practice.
|
||||
|
||||
@@ -602,7 +602,7 @@ Link America/Curacao America/Aruba
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/La_Paz -4:32:36 - LMT 1890
|
||||
-4:32:36 - CMT 1931 Oct 15 # Calamarca MT
|
||||
-4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST
|
||||
-4:32:36 1:00 BST 1932 Mar 21 # Bolivia ST
|
||||
-4:00 - -04
|
||||
|
||||
# Brazil
|
||||
@@ -931,12 +931,25 @@ Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S
|
||||
# [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the
|
||||
# 3rd Feb Sunday. There is an exception on the return date when this is
|
||||
# the Carnival Sunday then the return date will be the next Sunday...
|
||||
Rule Brazil 2008 max - Oct Sun>=15 0:00 1:00 S
|
||||
Rule Brazil 2008 2017 - Oct Sun>=15 0:00 1:00 S
|
||||
Rule Brazil 2008 2011 - Feb Sun>=15 0:00 0 -
|
||||
# Decree 7,584 <http://pcdsh01.on.br/HVdecreto7584_20111013.jpg> (2011-10-13)
|
||||
# added Bahia.
|
||||
Rule Brazil 2012 only - Feb Sun>=22 0:00 0 -
|
||||
# Decree 7,826 <http://pcdsh01.on.br/HVdecreto7826_20121015.jpg> (2012-10-15)
|
||||
# removed Bahia and added Tocantins.
|
||||
# Decree 8,112 <http://pcdsh01.on.br/HVdecreto8112_20130930.JPG> (2013-09-30)
|
||||
# removed Tocantins.
|
||||
Rule Brazil 2013 2014 - Feb Sun>=15 0:00 0 -
|
||||
Rule Brazil 2015 only - Feb Sun>=22 0:00 0 -
|
||||
Rule Brazil 2016 2022 - Feb Sun>=15 0:00 0 -
|
||||
# From Steffen Thorsen (2017-12-18):
|
||||
# According to many media sources, next year's DST start in Brazil will move to
|
||||
# the first Sunday of November, and it will stay like that for the years after.
|
||||
# ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
|
||||
# From Steffen Thorsen (2017-12-20):
|
||||
# http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
|
||||
Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 S
|
||||
Rule Brazil 2023 only - Feb Sun>=22 0:00 0 -
|
||||
Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 -
|
||||
Rule Brazil 2026 only - Feb Sun>=22 0:00 0 -
|
||||
@@ -1091,7 +1104,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
|
||||
|
||||
# From Paul Eggert (2015-04-03):
|
||||
# Shanks & Pottenger says America/Santiago introduced standard time in
|
||||
# 1890 and rounds its UTC offset to 70W40; guess that in practice this
|
||||
# 1890 and rounds its UT offset to 70W40; guess that in practice this
|
||||
# was the same offset as in 1916-1919. It also says Pacific/Easter
|
||||
# standardized on 109W22 in 1890; assume this didn't change the clocks.
|
||||
#
|
||||
|
||||
@@ -395,7 +395,7 @@ SM +4355+01228 Europe/San_Marino
|
||||
SN +1440-01726 Africa/Dakar
|
||||
SO +0204+04522 Africa/Mogadishu
|
||||
SR +0550-05510 America/Paramaribo
|
||||
SS +0451+03136 Africa/Juba
|
||||
SS +0451+03137 Africa/Juba
|
||||
ST +0020+00644 Africa/Sao_Tome
|
||||
SV +1342-08912 America/El_Salvador
|
||||
SX +180305-0630250 America/Lower_Princes
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
!XGetWindowProperty|int
|
||||
w long
|
||||
property Atom
|
||||
long_offset long
|
||||
long_length long
|
||||
delete Bool
|
||||
req_type Atom
|
||||
actual_type Atom out
|
||||
actual_format int out
|
||||
number_of_items long out
|
||||
bytes_after long out
|
||||
data pointer out free
|
||||
!XQueryTree|int
|
||||
w long
|
||||
root long out
|
||||
parent long out
|
||||
children pointer out free
|
||||
nchildren int out
|
||||
!XTranslateCoordinates|int
|
||||
scr_w long
|
||||
dest_w long
|
||||
src_x int
|
||||
src_y int
|
||||
dest_x int out
|
||||
dest_y int out
|
||||
child long out
|
||||
1017
make/data/x11wrappergen/sizes-32.txt
Normal file
1017
make/data/x11wrappergen/sizes-32.txt
Normal file
File diff suppressed because it is too large
Load Diff
1017
make/data/x11wrappergen/sizes-64.txt
Normal file
1017
make/data/x11wrappergen/sizes-64.txt
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
//
|
||||
//
|
||||
// This file is used for automated generation of java classes to wrap native structures.
|
||||
// The detail on format of this file see WrapperGenerator.java
|
||||
// For details on format of this file, see WrapperGenerator.java
|
||||
//
|
||||
// WARNING: if you modified this file, you need to regenerate sizes.64-solaris-i386
|
||||
// WARNING: If you modify this file, you need to regenerate sizes-32.txt and sizes-64.txt.
|
||||
// Run "make update-x11wrappers" to do this.
|
||||
//
|
||||
|
||||
XExtData
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
##########################################################################################
|
||||
################################################################################
|
||||
#
|
||||
# This Makefile, together with Tools.gmk, can be used to compile a set of
|
||||
# gcc based cross compilation, portable, self contained packages, capable
|
||||
@@ -31,60 +31,60 @@
|
||||
#
|
||||
# In addition to the makefiles, access to Oracle Linux installation
|
||||
# media is required. This has been tested against Oracle Enterprise Linux
|
||||
# 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point
|
||||
# to directory containing the RPMs.
|
||||
# 6.4.
|
||||
#
|
||||
# By default this Makefile will build crosstools for:
|
||||
# * i686-unknown-linux-gnu
|
||||
# * x86_64-unknown-linux-gnu
|
||||
# The x86_64 version of the compilers will work in multi arch mode and will
|
||||
# be able to compile 32bit binaries with the -m32 flag. This makes the
|
||||
# explicit cross compiler for i686 somewhat redundant and is a known issue.
|
||||
# By default this Makefile will build a native toolchain for the current
|
||||
# platform if called with something like this:
|
||||
#
|
||||
# To build the full set of crosstools, use a command line looking like this:
|
||||
# make tars
|
||||
#
|
||||
# make tars RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
|
||||
# To build the full set of crosstools for additional platforms, use a command
|
||||
# line looking like this:
|
||||
#
|
||||
# To create a x86_64 package without the redundant i686 cross compiler, do
|
||||
# like this:
|
||||
# make cross_compile_target="aarch64-linux-gnu" BASE_OS=Fedora27
|
||||
#
|
||||
# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
|
||||
|
||||
#
|
||||
# Main makefile which iterates over all host and target platforms.
|
||||
# This is the makefile which iterates over all host and target platforms.
|
||||
#
|
||||
|
||||
os := $(shell uname -o)
|
||||
cpu := x86_64
|
||||
#$(shell uname -p)
|
||||
|
||||
#
|
||||
# This wrapper script can handle exactly these platforms
|
||||
#
|
||||
platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
|
||||
#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
|
||||
cpu := $(shell uname -p)
|
||||
|
||||
# Figure out what platform this is building on.
|
||||
me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
|
||||
|
||||
$(info Building on platform $(me))
|
||||
|
||||
#
|
||||
# By default just build for the current platform, which is assumed to be Linux
|
||||
#
|
||||
ifeq ($(cross_compile_target), )
|
||||
platforms := $(me)
|
||||
host_platforms := $(platforms)
|
||||
else
|
||||
platforms := $(cross_compile_target)
|
||||
host_platforms := $(me)
|
||||
endif
|
||||
target_platforms := $(platforms)
|
||||
$(info host_platforms $(host_platforms))
|
||||
$(info target_platforms $(target_platforms))
|
||||
|
||||
all compile : $(platforms)
|
||||
|
||||
ifeq (,$(SKIP_ME))
|
||||
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
|
||||
endif
|
||||
|
||||
OUTPUTDIR = $(abspath ../../build/devkit)
|
||||
RESULT = $(OUTPUTDIR)/result
|
||||
OUTPUT_ROOT = $(abspath ../../build/devkit)
|
||||
RESULT = $(OUTPUT_ROOT)/result
|
||||
|
||||
submakevars = HOST=$@ BUILD=$(me) \
|
||||
RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
|
||||
OUTPUTDIR=$(OUTPUTDIR)
|
||||
$(platforms) :
|
||||
OUTPUT_ROOT=$(OUTPUT_ROOT)
|
||||
$(host_platforms) :
|
||||
@echo 'Building compilers for $@'
|
||||
@echo 'Targets: $(platforms)'
|
||||
for p in $@ $(filter-out $@,$(platforms)); do \
|
||||
@echo 'Targets: $(target_platforms)'
|
||||
for p in $(filter $@, $(target_platforms)) $(filter-out $@, $(target_platforms)); do \
|
||||
$(MAKE) -f Tools.gmk download-rpms $(submakevars) TARGET=$$p && \
|
||||
$(MAKE) -f Tools.gmk all $(submakevars) \
|
||||
TARGET=$$p || exit 1 ; \
|
||||
done
|
||||
@@ -92,12 +92,8 @@ $(platforms) :
|
||||
$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
|
||||
@echo 'All done"'
|
||||
|
||||
$(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
|
||||
|
||||
ia32 : i686
|
||||
today := $(shell date +%Y%m%d)
|
||||
|
||||
|
||||
define Mktar
|
||||
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
|
||||
$$($(1)_tar) : PLATFORM = $(1)
|
||||
@@ -105,7 +101,7 @@ define Mktar
|
||||
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
|
||||
endef
|
||||
|
||||
$(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
|
||||
$(foreach p,$(host_platforms),$(eval $(call Mktar,$(p))))
|
||||
|
||||
tars : all $(TARFILES)
|
||||
onlytars : $(TARFILES)
|
||||
@@ -115,7 +111,9 @@ onlytars : $(TARFILES)
|
||||
touch $@
|
||||
|
||||
clean :
|
||||
rm -rf build result
|
||||
rm -rf $(addprefix ../../build/devkit/, result $(host_platforms))
|
||||
dist-clean: clean
|
||||
rm -rf $(addprefix ../../build/devkit/, src download)
|
||||
|
||||
FORCE :
|
||||
.PHONY : $(configs) $(platforms)
|
||||
.PHONY : all compile tars $(configs) $(host_platforms) clean dist-clean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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
|
||||
@@ -44,27 +44,52 @@ $(info HOST=$(HOST))
|
||||
$(info BUILD=$(BUILD))
|
||||
|
||||
ARCH := $(word 1,$(subst -, ,$(TARGET)))
|
||||
$(info ARCH=$(ARCH))
|
||||
|
||||
ifeq ($(BASE_OS), OEL6)
|
||||
OEL_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
|
||||
LINUX_VERSION := OEL6.4
|
||||
else ifeq ($(BASE_OS), Fedora27)
|
||||
OEL_URL := https://dl.fedoraproject.org/pub/fedora-secondary/releases/27/Everything/$(ARCH)/os/Packages/
|
||||
LINUX_VERSION := Fedora 27
|
||||
else
|
||||
$(error Unknown base OS $(BASE_OS))
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
# Define external dependencies
|
||||
|
||||
# Latest that could be made to work.
|
||||
gcc_ver := gcc-4.9.2
|
||||
binutils_ver := binutils-2.25
|
||||
ccache_ver := ccache-3.2.1
|
||||
mpfr_ver := mpfr-3.0.1
|
||||
gmp_ver := gmp-4.3.2
|
||||
mpc_ver := mpc-1.0.1
|
||||
GCC_VER := 7.3.0
|
||||
ifeq ($(GCC_VER), 7.3.0)
|
||||
gcc_ver := gcc-7.3.0
|
||||
binutils_ver := binutils-2.30
|
||||
ccache_ver := ccache-3.3.6
|
||||
mpfr_ver := mpfr-3.1.5
|
||||
gmp_ver := gmp-6.1.2
|
||||
mpc_ver := mpc-1.0.3
|
||||
gdb_ver := gdb-8.1
|
||||
else ifeq ($(GCC_VER), 4.9.2)
|
||||
gcc_ver := gcc-4.9.2
|
||||
binutils_ver := binutils-2.25
|
||||
ccache_ver := ccache-3.2.1
|
||||
mpfr_ver := mpfr-3.0.1
|
||||
gmp_ver := gmp-4.3.2
|
||||
mpc_ver := mpc-1.0.1
|
||||
gdb_ver := gdb-7.12.1
|
||||
else
|
||||
$(error Unsupported GCC version)
|
||||
endif
|
||||
|
||||
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
|
||||
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
|
||||
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
|
||||
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
|
||||
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.xz
|
||||
CCACHE := https://samba.org/ftp/ccache/$(ccache_ver).tar.xz
|
||||
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
|
||||
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
|
||||
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
|
||||
MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
|
||||
GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
|
||||
|
||||
# RPMs in OEL6.4
|
||||
LINUX_VERSION := OEL6.4
|
||||
# RPMs used by all BASE_OS
|
||||
RPM_LIST := \
|
||||
kernel-headers \
|
||||
glibc glibc-headers glibc-devel \
|
||||
@@ -85,30 +110,9 @@ RPM_LIST := \
|
||||
libgcc \
|
||||
zlib zlib-devel \
|
||||
libffi libffi-devel \
|
||||
fontconfig fontconfig-devel
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
RPM_DIR ?= $(RPM_DIR_x86_64)
|
||||
RPM_ARCHS := x86_64 noarch
|
||||
ifeq ($(BUILD),$(HOST))
|
||||
ifeq ($(TARGET),$(HOST))
|
||||
# When building the native compiler for x86_64, enable mixed mode.
|
||||
RPM_ARCHS += i386 i686
|
||||
endif
|
||||
endif
|
||||
else
|
||||
RPM_DIR ?= $(RPM_DIR_i686)
|
||||
RPM_ARCHS := i386 i686
|
||||
endif
|
||||
|
||||
# Sort to remove duplicates
|
||||
RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
|
||||
|
||||
#$(info RPM_FILE_LIST $(RPM_FILE_LIST))
|
||||
|
||||
ifeq ($(RPM_FILE_LIST),)
|
||||
$(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
|
||||
endif
|
||||
fontconfig fontconfig-devel \
|
||||
systemtap-sdt-devel \
|
||||
#
|
||||
|
||||
##########################################################################################
|
||||
# Define common directories and files
|
||||
@@ -122,13 +126,14 @@ else
|
||||
endif
|
||||
|
||||
# Define directories
|
||||
RESULT := $(OUTPUTDIR)/result
|
||||
BUILDDIR := $(OUTPUTDIR)/$(HOST)/$(TARGET)
|
||||
RESULT := $(OUTPUT_ROOT)/result
|
||||
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
|
||||
PREFIX := $(RESULT)/$(HOST)
|
||||
TARGETDIR := $(PREFIX)/$(TARGET)
|
||||
SYSROOT := $(TARGETDIR)/sysroot
|
||||
DOWNLOAD := $(OUTPUTDIR)/download
|
||||
SRCDIR := $(OUTPUTDIR)/src
|
||||
DOWNLOAD := $(OUTPUT_ROOT)/download
|
||||
DOWNLOAD_RPMS := $(DOWNLOAD)/rpms
|
||||
SRCDIR := $(OUTPUT_ROOT)/src
|
||||
|
||||
# Marker file for unpacking rpms
|
||||
rpms := $(SYSROOT)/rpms_unpacked
|
||||
@@ -136,6 +141,16 @@ rpms := $(SYSROOT)/rpms_unpacked
|
||||
# Need to patch libs that are linker scripts to use non-absolute paths
|
||||
libs := $(SYSROOT)/libs_patched
|
||||
|
||||
################################################################################
|
||||
# Download RPMs
|
||||
download-rpms:
|
||||
mkdir -p $(DOWNLOAD_RPMS)
|
||||
# Only run this if rpm dir is empty.
|
||||
ifeq ($(wildcard $(DOWNLOAD_RPMS)/*.rpm), )
|
||||
cd $(DOWNLOAD_RPMS) && \
|
||||
wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(OEL_URL)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
# Unpack source packages
|
||||
|
||||
@@ -147,7 +162,7 @@ define Download
|
||||
|
||||
$$($(1)_CFG) : $$($(1)_FILE)
|
||||
mkdir -p $$(SRCDIR)
|
||||
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
|
||||
tar -C $$(SRCDIR) -xf $$<
|
||||
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
|
||||
echo PATCHING $$(p) ; \
|
||||
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
|
||||
@@ -159,15 +174,32 @@ define Download
|
||||
endef
|
||||
|
||||
# Download and unpack all source packages
|
||||
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
|
||||
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
|
||||
|
||||
##########################################################################################
|
||||
# Unpack RPMS
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
RPM_ARCHS := x86_64 noarch
|
||||
ifeq ($(BUILD),$(HOST))
|
||||
ifeq ($(TARGET),$(HOST))
|
||||
# When building the native compiler for x86_64, enable mixed mode.
|
||||
RPM_ARCHS += i386 i686
|
||||
endif
|
||||
endif
|
||||
else ifeq ($(ARCH),i686)
|
||||
RPM_ARCHS := i386 i686 noarch
|
||||
else
|
||||
RPM_ARCHS := $(ARCH) noarch
|
||||
endif
|
||||
|
||||
RPM_FILE_LIST := $(sort $(foreach a, $(RPM_ARCHS), \
|
||||
$(wildcard $(patsubst %,$(DOWNLOAD_RPMS)/%*$a.rpm,$(RPM_LIST))) \
|
||||
))
|
||||
|
||||
# Note. For building linux you should install rpm2cpio.
|
||||
define unrpm
|
||||
$(SYSROOT)/$(notdir $(1)).unpacked \
|
||||
: $(1)
|
||||
$(SYSROOT)/$(notdir $(1)).unpacked : $(1)
|
||||
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
|
||||
endef
|
||||
|
||||
@@ -210,19 +242,20 @@ $(libs) : $(rpms)
|
||||
##########################################################################################
|
||||
# Create links for ffi header files so that they become visible by default when using the
|
||||
# devkit.
|
||||
ifeq ($(ARCH), x86_64)
|
||||
$(SYSROOT)/usr/include/ffi.h: $(rpms)
|
||||
cd $(@D) && rm -f $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
|
||||
|
||||
$(SYSROOT)/usr/include/ffi.h: $(rpms)
|
||||
cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
|
||||
$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
|
||||
cd $(@D) && rm -f $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
|
||||
|
||||
$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
|
||||
cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
|
||||
|
||||
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
|
||||
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# Define marker files for each source package to be compiled
|
||||
$(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
|
||||
$(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
@@ -234,7 +267,8 @@ CONFIG = --target=$(TARGET) \
|
||||
PATHEXT = $(RESULT)/$(BUILD)/bin:
|
||||
|
||||
PATHPRE = PATH=$(PATHEXT)$(PATH)
|
||||
BUILDPAR = -j16
|
||||
NUM_CORES := $(shell cat /proc/cpuinfo | grep -c processor)
|
||||
BUILDPAR = -j$(NUM_CORES)
|
||||
|
||||
# Default commands to when making
|
||||
MAKECMD =
|
||||
@@ -317,6 +351,8 @@ $(BUILDDIR)/$(binutils_ver)/Makefile \
|
||||
--disable-nls \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-multilib \
|
||||
--enable-gold \
|
||||
--enable-plugins \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
@@ -392,7 +428,6 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-shared \
|
||||
--enable-multilib \
|
||||
--disable-nls \
|
||||
--with-gnu-as \
|
||||
--with-gnu-ld \
|
||||
@@ -410,6 +445,29 @@ $(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
|
||||
$(mpfr) : $(gmp)
|
||||
$(mpc) : $(gmp) $(mpfr)
|
||||
|
||||
################################################################################
|
||||
# Build gdb but only where host and target match
|
||||
ifeq ($(HOST), $(TARGET))
|
||||
$(BUILDDIR)/$(gdb_ver)/Makefile: $(GDB_CFG)
|
||||
$(info Configuring $@. Log in $(@D)/log.config)
|
||||
mkdir -p $(@D)
|
||||
( \
|
||||
cd $(@D) ; \
|
||||
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" $(GDB_CFG) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
) > $(@D)/log.config 2>&1
|
||||
@echo 'done'
|
||||
|
||||
$(gdb): $(gcc)
|
||||
else
|
||||
$(BUILDDIR)/$(gdb_ver)/Makefile:
|
||||
$(info Faking $@, not used when cross-compiling)
|
||||
mkdir -p $(@D)
|
||||
echo "install:" > $@
|
||||
@echo 'done'
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
# very straightforward. just build a ccache. it is only for host.
|
||||
$(BUILDDIR)/$(ccache_ver)/Makefile \
|
||||
@@ -434,7 +492,7 @@ ifeq ($(HOST),$(TARGET))
|
||||
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
|
||||
then \
|
||||
cd $(PREFIX)/bin && \
|
||||
ln -s $$f $(TARGET)-$$f ; \
|
||||
ln -fs $$f $(TARGET)-$$f ; \
|
||||
fi \
|
||||
done
|
||||
@touch $@
|
||||
@@ -451,7 +509,7 @@ ifeq ($(HOST),$(TARGET))
|
||||
if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
|
||||
mkdir -p $(TARGETDIR)/$(l) && \
|
||||
cd $(TARGETDIR)/$(l)/ && \
|
||||
ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
|
||||
ln -fs $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
|
||||
fi \
|
||||
done;)
|
||||
@echo 'done'
|
||||
@@ -471,6 +529,7 @@ $(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
|
||||
$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
|
||||
@echo -n 'installing...'
|
||||
$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
|
||||
@mkdir -p $(@D)
|
||||
@touch $@
|
||||
@echo 'done'
|
||||
|
||||
@@ -485,18 +544,39 @@ $(PREFIX)/devkit.info: FRC
|
||||
echo '' >> $@
|
||||
echo 'DEVKIT_NAME="$(gcc_ver) - $(LINUX_VERSION)"' >> $@
|
||||
echo 'DEVKIT_TOOLCHAIN_PATH="$$DEVKIT_ROOT/bin"' >> $@
|
||||
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$$host/sysroot"' >> $@
|
||||
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$(TARGET)/sysroot"' >> $@
|
||||
echo 'DEVKIT_EXTRA_PATH="$$DEVKIT_ROOT/bin"' >> $@
|
||||
|
||||
##########################################################################################
|
||||
# Copy these makefiles into the root of the kit
|
||||
$(PREFIX)/Makefile: ./Makefile
|
||||
rm -rf $@
|
||||
cp $< $@
|
||||
|
||||
$(PREFIX)/Tools.gmk: ./Tools.gmk
|
||||
rm -rf $@
|
||||
cp $< $@
|
||||
|
||||
THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk
|
||||
|
||||
##########################################################################################
|
||||
|
||||
ifeq ($(TARGET), $(HOST))
|
||||
# To build with dtrace support, the build needs access to the dtrace executable from the
|
||||
# sysroot. Generally we don't want to add binaries in the sysroot to the path, but
|
||||
# luckily this seems to execute well enough on a different host Linux distro, so symlink
|
||||
# it into the main bin dir.
|
||||
$(PREFIX)/bin/dtrace:
|
||||
@echo 'Creating dtrace soft link'
|
||||
ln -s ../$(HOST)/sysroot/usr/bin/dtrace $@
|
||||
|
||||
$(PREFIX)/bin/%:
|
||||
@echo 'Creating missing $* soft link'
|
||||
ln -s $(TARGET)-$* $@
|
||||
|
||||
missing-links := $(addprefix $(PREFIX)/bin/, \
|
||||
addr2line ar as c++ c++filt elfedit g++ gcc gprof ld nm objcopy ranlib readelf \
|
||||
size strings strip)
|
||||
size strings strip ld.bfd ld.gold dtrace)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
@@ -507,7 +587,9 @@ rpms : $(rpms)
|
||||
libs : $(libs)
|
||||
sysroot : rpms libs
|
||||
gcc : sysroot $(gcc) $(gccpatch)
|
||||
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS)
|
||||
gdb : $(gdb)
|
||||
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS) \
|
||||
$(THESE_MAKEFILES) gdb
|
||||
|
||||
# this is only built for host. so separate.
|
||||
ccache : $(ccache)
|
||||
|
||||
116
make/devkit/createAutoconfBundle.sh
Normal file
116
make/devkit/createAutoconfBundle.sh
Normal file
@@ -0,0 +1,116 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Copyright (c) 2018, 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.
|
||||
#
|
||||
|
||||
# Create a bundle in the current directory, containing what's needed to run
|
||||
# the 'autoconf' program by the OpenJDK build.
|
||||
|
||||
# Autoconf depends on m4, so download and build that first.
|
||||
AUTOCONF_VERSION=2.69
|
||||
M4_VERSION=1.4.18
|
||||
|
||||
PACKAGE_VERSION=1.0.1
|
||||
TARGET_PLATFORM=linux_x86
|
||||
MODULE_NAME=autoconf-$TARGET_PLATFORM-$AUTOCONF_VERSION+$PACKAGE_VERSION
|
||||
BUNDLE_NAME=$MODULE_NAME.tar.gz
|
||||
|
||||
TMPDIR=`mktemp -d -t autoconfbundle-XXXX`
|
||||
trap "rm -rf \"$TMPDIR\"" EXIT
|
||||
|
||||
ORIG_DIR=`pwd`
|
||||
cd $TMPDIR
|
||||
OUTPUT_DIR=$TMPDIR/$MODULE_NAME
|
||||
mkdir -p $OUTPUT_DIR/usr
|
||||
|
||||
# Download and build m4
|
||||
|
||||
if test "x$TARGET_PLATFORM" = xcygwin_x64; then
|
||||
# On cygwin 64-bit, just copy the cygwin .exe file
|
||||
mkdir -p $OUTPUT_DIR/usr/bin
|
||||
cp /usr/bin/m4 $OUTPUT_DIR/usr/bin
|
||||
elif test "x$TARGET_PLATFORM" = xcygwin_x86; then
|
||||
# On cygwin 32-bit, just copy the cygwin .exe file
|
||||
mkdir -p $OUTPUT_DIR/usr/bin
|
||||
cp /usr/bin/m4 $OUTPUT_DIR/usr/bin
|
||||
elif test "x$TARGET_PLATFORM" = xlinux_x64; then
|
||||
M4_VERSION=1.4.13-5
|
||||
wget http://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/m4-$M4_VERSION.el6.x86_64.rpm
|
||||
cd $OUTPUT_DIR
|
||||
rpm2cpio ../m4-$M4_VERSION.el6.x86_64.rpm | cpio -d -i
|
||||
elif test "x$TARGET_PLATFORM" = xlinux_x86; then
|
||||
M4_VERSION=1.4.13-5
|
||||
wget http://yum.oracle.com/repo/OracleLinux/OL6/latest/i386/getPackage/m4-$M4_VERSION.el6.i686.rpm
|
||||
cd $OUTPUT_DIR
|
||||
rpm2cpio ../m4-$M4_VERSION.el6.i686.rpm | cpio -d -i
|
||||
else
|
||||
wget https://ftp.gnu.org/gnu/m4/m4-$M4_VERSION.tar.gz
|
||||
tar xzf m4-$M4_VERSION.tar.gz
|
||||
cd m4-$M4_VERSION
|
||||
./configure --prefix=$OUTPUT_DIR/usr
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# Download and build autoconf
|
||||
|
||||
wget https://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz
|
||||
tar xzf autoconf-$AUTOCONF_VERSION.tar.gz
|
||||
cd autoconf-$AUTOCONF_VERSION
|
||||
./configure --prefix=$OUTPUT_DIR/usr M4=$OUTPUT_DIR/usr/bin/m4
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
perl -pi -e "s!$OUTPUT_DIR/!./!" $OUTPUT_DIR/usr/bin/auto* $OUTPUT_DIR/usr/share/autoconf/autom4te.cfg
|
||||
cp $OUTPUT_DIR/usr/share/autoconf/autom4te.cfg $OUTPUT_DIR/autom4te.cfg
|
||||
|
||||
cat > $OUTPUT_DIR/autoconf << EOF
|
||||
#!/bin/bash
|
||||
# Get an absolute path to this script
|
||||
this_script_dir=\`dirname \$0\`
|
||||
this_script_dir=\`cd \$this_script_dir > /dev/null && pwd\`
|
||||
|
||||
export M4="\$this_script_dir/usr/bin/m4"
|
||||
export AUTOM4TE="\$this_script_dir/usr/bin/autom4te"
|
||||
export AUTOCONF="\$this_script_dir/usr/bin/autoconf"
|
||||
export AUTOHEADER="\$this_script_dir/usr/bin/autoheader"
|
||||
export AC_MACRODIR="\$this_script_dir/usr/share/autoconf"
|
||||
export autom4te_perllibdir="\$this_script_dir/usr/share/autoconf"
|
||||
|
||||
autom4te_cfg=\$this_script_dir/usr/share/autoconf/autom4te.cfg
|
||||
cp \$this_script_dir/autom4te.cfg \$autom4te_cfg
|
||||
|
||||
echo 'begin-language: "M4sugar"' >> \$autom4te_cfg
|
||||
echo "args: --prepend-include '"\$this_script_dir/usr/share/autoconf"'" >> \$autom4te_cfg
|
||||
echo 'end-language: "M4sugar"' >> \$autom4te_cfg
|
||||
|
||||
exec \$this_script_dir/usr/bin/autoconf "\$@"
|
||||
EOF
|
||||
chmod +x $OUTPUT_DIR/autoconf
|
||||
cd $OUTPUT_DIR
|
||||
tar -cvzf ../$BUNDLE_NAME *
|
||||
cd ..
|
||||
cp $BUNDLE_NAME "$ORIG_DIR"
|
||||
146
make/devkit/createMacosxDevkit9.sh
Normal file
146
make/devkit/createMacosxDevkit9.sh
Normal file
@@ -0,0 +1,146 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 2018, 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 script copies parts of an Xcode installation into a devkit suitable
|
||||
# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
|
||||
# to be either installed or extracted using for example Archive Utility.
|
||||
# The easiest way to accomplish this is to right click the file in Finder
|
||||
# and choose "Open With -> Archive Utility", or possible typing
|
||||
# "open Xcode_9.2.xip" in a terminal.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
USAGE="$0 <Xcode.app>"
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XCODE_APP="$1"
|
||||
XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
# Find the version of Xcode
|
||||
XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
|
||||
| awk '/Xcode/ { print $2 }' )"
|
||||
SDK_VERSION="MacOSX10.13"
|
||||
if [ ! -e "$XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
|
||||
echo "Expected SDK version not found: ${SDK_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Xcode version: $XCODE_VERSION"
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
mkdir -p $DEVKIT_ROOT
|
||||
|
||||
################################################################################
|
||||
# Copy the relevant parts of Xcode.app, removing things that are both big and
|
||||
# unecessary for our purposes, without building an impossibly long exclude list.
|
||||
#
|
||||
# Not including WatchSimulator.platform makes ibtool crashes in some situations.
|
||||
# It doesn't seem to matter which extra platform is included, but that is the
|
||||
# smallest one.
|
||||
|
||||
EXCLUDE_DIRS=" \
|
||||
Contents/_CodeSignature \
|
||||
$XCODE_APP_DIR_NAME/Contents/Applications \
|
||||
$XCODE_APP_DIR_NAME/Contents/Resources \
|
||||
$XCODE_APP_DIR_NAME/Contents/Library \
|
||||
$XCODE_APP_DIR_NAME/Contents/XPCServices \
|
||||
$XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
|
||||
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
|
||||
Platforms/AppleTVSimulator.platform \
|
||||
Platforms/iPhoneSimulator.platform \
|
||||
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
|
||||
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
|
||||
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
|
||||
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
|
||||
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
|
||||
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
|
||||
$(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
|
||||
| grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
|
||||
"
|
||||
|
||||
for ex in $EXCLUDE_DIRS; do
|
||||
EXCLUDE_ARGS+="--exclude=$ex "
|
||||
done
|
||||
|
||||
echo "Copying Xcode.app..."
|
||||
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
|
||||
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
|
||||
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
|
||||
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle..."
|
||||
GZIP=$(command -v pigz)
|
||||
if [ -z "$GZIP" ]; then
|
||||
GZIP="gzip"
|
||||
fi
|
||||
(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")
|
||||
@@ -1,148 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 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 script creates a devkit for building OpenJDK on Solaris by copying
|
||||
# part of a Solaris Studio installation and cretaing a sysroot by installing
|
||||
# a limited set of system packages. It is assumed that a suitable pkg
|
||||
# publisher is configured for the system where the script is executed.
|
||||
#
|
||||
# The Solaris Studio installation must contain at least these packages:
|
||||
# developer/solarisstudio-124/backend 12.4-1.0.6.0 i--
|
||||
# developer/solarisstudio-124/c++ 12.4-1.0.10.0 i--
|
||||
# developer/solarisstudio-124/cc 12.4-1.0.4.0 i--
|
||||
# developer/solarisstudio-124/library/c++-libs 12.4-1.0.10.0 i--
|
||||
# developer/solarisstudio-124/library/math-libs 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/library/studio-gccrt 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-common 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-ja 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-legal 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-zhCN 12.4-1.0.0.1 i--
|
||||
# In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc
|
||||
# version.
|
||||
#
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
USAGE="$0 <Solaris Studio installation> <Path to gnu make binary>"
|
||||
|
||||
if [ "$1" = "" ] || [ "$2" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLARIS_STUDIO_VERSION=12u4
|
||||
SOLARIS_VERSION=11u1
|
||||
case `uname -p` in
|
||||
i*)
|
||||
ARCH=x86
|
||||
;;
|
||||
sparc*)
|
||||
ARCH=sparc
|
||||
;;
|
||||
esac
|
||||
|
||||
SOLARIS_STUDIO_SRC=$1
|
||||
GNU_MAKE=$2
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
|
||||
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
|
||||
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
|
||||
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
|
||||
INSTALL_ROOT=${BUILD_DIR}/install-root
|
||||
SYSROOT=${DEVKIT_ROOT}/sysroot
|
||||
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
|
||||
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
|
||||
|
||||
# Extract the publisher from the system
|
||||
if [ -z "${PUBLISHER_URI}" ]; then
|
||||
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
|
||||
fi
|
||||
|
||||
if [ ! -d $INSTALL_ROOT ]; then
|
||||
echo "Creating $INSTALL_ROOT and installing packages"
|
||||
pkg image-create $INSTALL_ROOT
|
||||
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
|
||||
pkg -R $INSTALL_ROOT install --accept $(cat solaris11.1-package-list.txt)
|
||||
else
|
||||
echo "Skipping installing packages"
|
||||
fi
|
||||
|
||||
if [ ! -d $SYSROOT ]; then
|
||||
echo "Copying from $INSTALL_ROOT to $SYSROOT"
|
||||
mkdir -p $SYSROOT
|
||||
cp -rH $INSTALL_ROOT/lib $SYSROOT/
|
||||
mkdir $SYSROOT/usr $DEVKIT_ROOT/gnu
|
||||
# Some of the tools in sysroot are needed in the OpenJDK build but cannot be
|
||||
# run from their current location due to relative runtime paths in the
|
||||
# binaries. Move the sysroot/usr/bin directory to the outer bin and have them
|
||||
# be runnable from there to force them to link to the system libraries
|
||||
cp -rH $INSTALL_ROOT/usr/bin $DEVKIT_ROOT
|
||||
cp -rH $INSTALL_ROOT/usr/gnu/bin $DEVKIT_ROOT/gnu/
|
||||
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
|
||||
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
|
||||
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
|
||||
else
|
||||
echo "Skipping copying to $SYSROOT"
|
||||
fi
|
||||
|
||||
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
|
||||
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
|
||||
cp -rH $SOLARIS_STUDIO_SRC ${SOLARIS_STUDIO_DIR%/*}
|
||||
mv ${SOLARIS_STUDIO_DIR%/*}/${SOLARIS_STUDIO_SRC##*/} $SOLARIS_STUDIO_DIR
|
||||
# Solaris Studio 12.4 requires /lib/libmmheap.so.1 to run, but this lib is not
|
||||
# installed by default on all Solaris systems. Sneak it in from the sysroot to
|
||||
# make it run OOTB on more systems.
|
||||
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
|
||||
else
|
||||
echo "Skipping copying of Solaris Studio"
|
||||
fi
|
||||
|
||||
echo "Copying gnu make to $DEVKIT_ROOT/bin"
|
||||
mkdir -p $DEVKIT_ROOT/bin
|
||||
cp $GNU_MAKE $DEVKIT_ROOT/bin/
|
||||
if [ ! -e $DEVKIT_ROOT/bin/gmake ]; then
|
||||
ln -s make $DEVKIT_ROOT/bin/gmake
|
||||
fi
|
||||
|
||||
# Create the devkit.info file
|
||||
echo Creating devkit.info
|
||||
INFO_FILE=$DEVKIT_ROOT/devkit.info
|
||||
rm -f $INFO_FILE
|
||||
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
|
||||
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
|
||||
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
|
||||
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
|
||||
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
|
||||
|
||||
if [ ! -e $BUNDLE ]; then
|
||||
echo "Creating $BUNDLE from $DEVKIT_ROOT"
|
||||
cd $DEVKIT_ROOT/..
|
||||
tar zcf $BUNDLE $DEVKIT_NAME
|
||||
else
|
||||
echo "Skipping creation of $BUNDLE"
|
||||
fi
|
||||
184
make/devkit/createSolarisDevkit12.4.sh
Normal file
184
make/devkit/createSolarisDevkit12.4.sh
Normal file
@@ -0,0 +1,184 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 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 script creates a devkit for building OpenJDK on Solaris by copying
|
||||
# part of a Solaris Studio installation and cretaing a sysroot by installing
|
||||
# a limited set of system packages. It is assumed that a suitable pkg
|
||||
# publisher is configured for the system where the script is executed.
|
||||
#
|
||||
# The Solaris Studio installation must contain at least these packages:
|
||||
# developer/solarisstudio-124/backend 12.4-1.0.6.0 i--
|
||||
# developer/solarisstudio-124/c++ 12.4-1.0.10.0 i--
|
||||
# developer/solarisstudio-124/cc 12.4-1.0.4.0 i--
|
||||
# developer/solarisstudio-124/library/c++-libs 12.4-1.0.10.0 i--
|
||||
# developer/solarisstudio-124/library/math-libs 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/library/studio-gccrt 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-common 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-ja 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-legal 12.4-1.0.0.1 i--
|
||||
# developer/solarisstudio-124/studio-zhCN 12.4-1.0.0.1 i--
|
||||
# In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc
|
||||
# version.
|
||||
#
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
USAGE="$0 <Solaris Studio installation> <Path to gnu make binary>"
|
||||
|
||||
if [ "$1" = "" ] || [ "$2" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLARIS_STUDIO_VERSION=12u4
|
||||
SOLARIS_VERSION=11u1
|
||||
case `uname -p` in
|
||||
i*)
|
||||
ARCH=x86
|
||||
;;
|
||||
sparc*)
|
||||
ARCH=sparc
|
||||
;;
|
||||
esac
|
||||
|
||||
SOLARIS_STUDIO_SRC=$1
|
||||
GNU_MAKE=$2
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
|
||||
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
|
||||
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
|
||||
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
|
||||
INSTALL_ROOT=${BUILD_DIR}/install-root-$SOLARIS_VERSION
|
||||
INSTALL_ROOT_TOOLS=${BUILD_DIR}/install-root-tools-$SOLARIS_VERSION
|
||||
SYSROOT=${DEVKIT_ROOT}/sysroot
|
||||
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
|
||||
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
|
||||
|
||||
# Extract the publisher from the system
|
||||
if [ -z "${PUBLISHER_URI}" ]; then
|
||||
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
|
||||
fi
|
||||
|
||||
if [ ! -d $INSTALL_ROOT ]; then
|
||||
echo "Creating $INSTALL_ROOT and installing packages"
|
||||
pkg image-create $INSTALL_ROOT
|
||||
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
|
||||
pkg -R $INSTALL_ROOT install --accept $(cat solaris11.1-package-list.txt)
|
||||
else
|
||||
echo "Skipping installing packages"
|
||||
fi
|
||||
|
||||
# Since we have implicitly been running 11.2 tools for a long time, we need
|
||||
# to pick them for the tools dir in the devkit. Create a separate install-root
|
||||
# for it.
|
||||
if [ ! -d $INSTALL_ROOT_TOOLS ]; then
|
||||
echo "Creating $INSTALL_ROOT_TOOLS and installing packages"
|
||||
pkg image-create $INSTALL_ROOT_TOOLS
|
||||
pkg -R $INSTALL_ROOT_TOOLS set-publisher -P -g ${PUBLISHER_URI} solaris
|
||||
sudo pkg -R $INSTALL_ROOT_TOOLS install --accept \
|
||||
entire@0.5.11-0.175.2.5.0.5.0 \
|
||||
system/linker \
|
||||
developer/base-developer-utilities \
|
||||
developer/gnu-binutils
|
||||
else
|
||||
echo "Skipping installing tools packages"
|
||||
fi
|
||||
|
||||
if [ ! -d $SYSROOT ]; then
|
||||
echo "Copying from $INSTALL_ROOT to $SYSROOT"
|
||||
mkdir -p $SYSROOT
|
||||
cp -rH $INSTALL_ROOT/lib $SYSROOT/
|
||||
mkdir $SYSROOT/usr
|
||||
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
|
||||
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
|
||||
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
|
||||
else
|
||||
echo "Skipping copying to $SYSROOT"
|
||||
fi
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/tools ]; then
|
||||
echo "Copying from $INSTALL_ROOT_TOOLS to $DEVKIT_ROOT/tools"
|
||||
# Some of the tools in sysroot are needed in the OpenJDK build. We need
|
||||
# to copy them into a tools dir, including their specific libraries.
|
||||
mkdir -p $DEVKIT_ROOT/tools/usr/bin/sparcv9 $DEVKIT_ROOT/tools/lib/sparcv9 \
|
||||
$DEVKIT_ROOT/tools/usr/gnu/bin
|
||||
cp $INSTALL_ROOT_TOOLS/usr/bin/{ar,nm,strip,ld,ldd} \
|
||||
$DEVKIT_ROOT/tools/usr/bin/
|
||||
cp $INSTALL_ROOT_TOOLS/usr/bin/sparcv9/{ar,nm,strip,ld,ldd} \
|
||||
$DEVKIT_ROOT/tools/usr/bin/sparcv9/
|
||||
cp $INSTALL_ROOT_TOOLS/usr/sbin/dtrace $DEVKIT_ROOT/tools/usr/bin/
|
||||
cp $INSTALL_ROOT_TOOLS/usr/sbin/sparcv9/dtrace $DEVKIT_ROOT/tools/usr/bin/sparcv9/
|
||||
cp -rH $INSTALL_ROOT_TOOLS/usr/gnu/bin/* $DEVKIT_ROOT/tools/usr/gnu/bin/
|
||||
cp $INSTALL_ROOT_TOOLS/lib/{libelf.so*,libld.so*,liblddbg.so*} \
|
||||
$DEVKIT_ROOT/tools/lib/
|
||||
cp $INSTALL_ROOT_TOOLS/lib/sparcv9/{libelf.so*,libld.so*,liblddbg.so*} \
|
||||
$DEVKIT_ROOT/tools/lib/sparcv9/
|
||||
for t in $(ls $DEVKIT_ROOT/tools/usr/gnu/bin); do
|
||||
if [ -f $DEVKIT_ROOT/tools/usr/gnu/bin/$t ]; then
|
||||
ln -s ../gnu/bin/$t $DEVKIT_ROOT/tools/usr/bin/g$t
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Skipping copying to tools dir $DEVKIT_ROOT/tools"
|
||||
fi
|
||||
|
||||
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
|
||||
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
|
||||
mkdir -p ${SOLARIS_STUDIO_DIR}
|
||||
cp -rH $SOLARIS_STUDIO_SRC/. ${SOLARIS_STUDIO_DIR}/
|
||||
# Solaris Studio 12.4 requires /lib/libmmheap.so.1 to run, but this lib is not
|
||||
# installed by default on all Solaris systems. Sneak it in from the sysroot to
|
||||
# make it run OOTB on more systems.
|
||||
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
|
||||
else
|
||||
echo "Skipping copying of Solaris Studio"
|
||||
fi
|
||||
|
||||
echo "Copying gnu make to $DEVKIT_ROOT/bin"
|
||||
cp $GNU_MAKE $DEVKIT_ROOT/tools/usr/bin/
|
||||
if [ ! -e $DEVKIT_ROOT/tools/usr/bin/gmake ]; then
|
||||
ln -s make $DEVKIT_ROOT/tools/usr/bin/gmake
|
||||
fi
|
||||
|
||||
# Create the devkit.info file
|
||||
echo Creating devkit.info
|
||||
INFO_FILE=$DEVKIT_ROOT/devkit.info
|
||||
rm -f $INFO_FILE
|
||||
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
|
||||
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
|
||||
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
|
||||
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/tools/usr/bin\"" >> $INFO_FILE
|
||||
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
|
||||
|
||||
if [ ! -e $BUNDLE ]; then
|
||||
echo "Creating $BUNDLE from $DEVKIT_ROOT"
|
||||
cd $DEVKIT_ROOT/..
|
||||
tar zcf $BUNDLE $DEVKIT_NAME
|
||||
else
|
||||
echo "Skipping creation of $BUNDLE"
|
||||
fi
|
||||
167
make/devkit/createSolarisDevkit12.6.sh
Normal file
167
make/devkit/createSolarisDevkit12.6.sh
Normal file
@@ -0,0 +1,167 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 2018, 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 script creates a devkit for building OpenJDK on Solaris by copying
|
||||
# part of a Solaris Studio installation and cretaing a sysroot by installing
|
||||
# a limited set of system packages. It is assumed that a suitable pkg
|
||||
# publisher is configured for the system where the script is executed.
|
||||
#
|
||||
# Note that you will need to be able to sudo to root to run the pkg install
|
||||
# part of this script. It should not affect the running system, but only
|
||||
# install in a separate temporary image.
|
||||
#
|
||||
# The Solaris Studio installation must contain at least these packages:
|
||||
# developer/developerstudio-126/backend 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/c++ 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/cc 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/dbx (solarisstudio) 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/library/c++-libs 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/library/math-libs 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/library/c-libs 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/library/studio-gccrt 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/studio-common 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/studio-ja 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/studio-legal 12.6-1.0.0.0 i--
|
||||
# developer/developerstudio-126/studio-zhCN 12.6-1.0.0.0 i--
|
||||
#
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
USAGE="$0 <Solaris Studio installation>"
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOLARIS_STUDIO_VERSION=12u6
|
||||
SOLARIS_VERSION=11u3
|
||||
SOLARIS_ENTIRE_VERSION=0.5.11-0.175.3.20.0.6.0
|
||||
case `uname -p` in
|
||||
i*)
|
||||
ARCH=x86
|
||||
;;
|
||||
sparc*)
|
||||
ARCH=sparc
|
||||
;;
|
||||
esac
|
||||
|
||||
SOLARIS_STUDIO_SRC=$1
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
|
||||
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
|
||||
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
|
||||
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
|
||||
INSTALL_ROOT=${BUILD_DIR}/install-root-$SOLARIS_VERSION
|
||||
SYSROOT=${DEVKIT_ROOT}/sysroot
|
||||
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
|
||||
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
|
||||
|
||||
# Extract the publisher from the system
|
||||
if [ -z "${PUBLISHER_URI}" ]; then
|
||||
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
|
||||
fi
|
||||
|
||||
if [ ! -d $INSTALL_ROOT ]; then
|
||||
echo "Creating $INSTALL_ROOT and installing packages"
|
||||
pkg image-create $INSTALL_ROOT
|
||||
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
|
||||
sudo pkg -R $INSTALL_ROOT install --accept entire@$SOLARIS_ENTIRE_VERSION \
|
||||
system/install developer/gnu-binutils system/library/mmheap system/picl \
|
||||
developer/assembler
|
||||
else
|
||||
echo "Skipping installing packages"
|
||||
fi
|
||||
|
||||
if [ ! -d $SYSROOT ]; then
|
||||
echo "Copying from $INSTALL_ROOT to $SYSROOT"
|
||||
mkdir -p $SYSROOT
|
||||
cp -rH $INSTALL_ROOT/lib $SYSROOT/
|
||||
mkdir $SYSROOT/usr
|
||||
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
|
||||
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
|
||||
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
|
||||
else
|
||||
echo "Skipping copying to $SYSROOT"
|
||||
fi
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/tools ]; then
|
||||
# Some of the tools in sysroot are needed in the OpenJDK build. We need
|
||||
# to copy them into a tools dir, including their specific libraries.
|
||||
mkdir -p $DEVKIT_ROOT/tools/usr/bin $DEVKIT_ROOT/tools/lib/sparcv9 \
|
||||
$DEVKIT_ROOT/tools/usr/gnu/bin $DEVKIT_ROOT/tools/usr/bin/sparcv9
|
||||
cp $INSTALL_ROOT/usr/bin/{as,ar,nm,strip,ld,pigz,ldd} \
|
||||
$DEVKIT_ROOT/tools/usr/bin/
|
||||
cp $INSTALL_ROOT/usr/sbin/dtrace $DEVKIT_ROOT/tools/usr/bin/
|
||||
cp $INSTALL_ROOT/usr/sbin/sparcv9/dtrace $DEVKIT_ROOT/tools/usr/bin/sparcv9/
|
||||
cp -rH $INSTALL_ROOT/usr/gnu/bin/* $DEVKIT_ROOT/tools/usr/gnu/bin/
|
||||
cp $INSTALL_ROOT/lib/sparcv9/{libelf.so*,libld.so*,liblddbg.so*} $DEVKIT_ROOT/tools/lib/sparcv9/
|
||||
for t in $(ls $DEVKIT_ROOT/tools/usr/gnu/bin); do
|
||||
if [ -f $DEVKIT_ROOT/tools/usr/gnu/bin/$t ]; then
|
||||
ln -s ../gnu/bin/$t $DEVKIT_ROOT/tools/usr/bin/g$t
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Skipping copying to tools dir $DEVKIT_ROOT/tools"
|
||||
fi
|
||||
|
||||
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
|
||||
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
|
||||
mkdir -p ${SOLARIS_STUDIO_DIR}
|
||||
cp -rH $SOLARIS_STUDIO_SRC/. ${SOLARIS_STUDIO_DIR}/
|
||||
# Solaris Studio 12.6 requires libmmheap.so.1 and libsunmath.so.1 to run, but
|
||||
# these libs are not installed by default on all Solaris systems.
|
||||
# Sneak them in from the sysroot to make it run OOTB on more systems.
|
||||
cp $SYSROOT/lib/libsunmath.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
|
||||
cp $SYSROOT/lib/sparcv9/libsunmath.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/sparcv9/
|
||||
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
|
||||
cp $SYSROOT/lib/sparcv9/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/sparcv9/
|
||||
else
|
||||
echo "Skipping copying of Solaris Studio"
|
||||
fi
|
||||
|
||||
# Create the devkit.info file
|
||||
echo Creating devkit.info
|
||||
INFO_FILE=$DEVKIT_ROOT/devkit.info
|
||||
rm -f $INFO_FILE
|
||||
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
|
||||
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
|
||||
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
|
||||
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/tools/usr/bin\"" >> $INFO_FILE
|
||||
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
|
||||
|
||||
if [ ! -e $BUNDLE ]; then
|
||||
GZIP=$(command -v pigz)
|
||||
if [ -z "$GZIP" ]; then
|
||||
GZIP="gzip"
|
||||
fi
|
||||
echo "Creating $BUNDLE from $DEVKIT_ROOT"
|
||||
(cd $DEVKIT_ROOT && tar cf - . | $GZIP - > "$BUNDLE")
|
||||
else
|
||||
echo "Skipping creation of $BUNDLE"
|
||||
fi
|
||||
142
make/devkit/createWindowsDevkit2015.sh
Normal file
142
make/devkit/createWindowsDevkit2015.sh
Normal file
@@ -0,0 +1,142 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 2018, 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 script copies parts of a Visual Studio installation into a devkit
|
||||
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
VS_VERSION="2015"
|
||||
VS_VERSION_NUM="14.0"
|
||||
VS_VERSION_NUM_NODOT="140"
|
||||
SDK_VERSION="8.1"
|
||||
VS_VERSION_SP="update3"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/vcruntime${VS_VERSION_NUM_NODOT}.dll
|
||||
MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
|
||||
|
||||
################################################################################
|
||||
# Copy Visual Studio files
|
||||
|
||||
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
|
||||
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
|
||||
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/VC ]; then
|
||||
echo "Copying VC..."
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
|
||||
cp "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
|
||||
cp "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
|
||||
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
|
||||
cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
|
||||
cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
mkdir -p $DEVKIT_ROOT/VC/redist
|
||||
cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
|
||||
cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
|
||||
# The redist runtime libs are needed to run the compiler but may not be
|
||||
# installed on the machine where the devkit will be used.
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
|
||||
# The msvcdis dll is needed to run some of the tools in VC/bin but is not
|
||||
# shipped in that directory. Copy it from the common dir.
|
||||
cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
|
||||
$DEVKIT_ROOT/VC/bin/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Copy SDK files
|
||||
|
||||
PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
|
||||
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
|
||||
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
|
||||
echo "Copying SDK..."
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
|
||||
cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
|
||||
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
|
||||
# In 2015, the new Universal CRT is delivered in the sdk 10 directory
|
||||
# so need to include that as well.
|
||||
mkdir -p $DEVKIT_ROOT/10/lib
|
||||
cp -r "$SDK_INSTALL_DIR/../10/lib/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/lib/
|
||||
mkdir -p $DEVKIT_ROOT/10/include
|
||||
cp -r "$SDK_INSTALL_DIR/../10/include/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/include/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
|
||||
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86;\$DEVKIT_ROOT/10/lib/ucrt/x86\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64;\$DEVKIT_ROOT/10/lib/ucrt/x64\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle: $DEVKIT_BUNDLE"
|
||||
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
|
||||
172
make/devkit/createWindowsDevkit2017.sh
Normal file
172
make/devkit/createWindowsDevkit2017.sh
Normal file
@@ -0,0 +1,172 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 2018, 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 script copies parts of a Visual Studio installation into a devkit
|
||||
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
VS_VERSION="2017"
|
||||
VS_VERSION_NUM_NODOT="150"
|
||||
VS_DLL_VERSION="140"
|
||||
SDK_VERSION="10"
|
||||
SDK_FULL_VERSION="10.0.16299.0"
|
||||
MSVC_DIR="Microsoft.VC141.CRT"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
################################################################################
|
||||
# Prepare settings
|
||||
|
||||
# Work around the insanely named ProgramFiles(x86) env variable
|
||||
PROGRAMFILES_X86="$(cygpath "$(env | sed -n 's/^ProgramFiles(x86)=//p')")"
|
||||
|
||||
# Find Visual Studio installation dir
|
||||
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
|
||||
if [ -d "$VSNNNCOMNTOOLS" ]; then
|
||||
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
|
||||
else
|
||||
VS_INSTALL_DIR="${PROGRAMFILES_X86}/Microsoft Visual Studio/2017"
|
||||
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional} 2>/dev/null | head -n1)"
|
||||
VS_INSTALL_DIR="$(cygpath "$VS_INSTALL_DIR")"
|
||||
fi
|
||||
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
|
||||
|
||||
# Extract semantic version
|
||||
POTENTIAL_INI_FILES="Common7\IDE\wdexpress.isolation.ini Common7\IDE\devenv.isolation.ini"
|
||||
for f in $POTENTIAL_INI_FILES; do
|
||||
if [ -f "$VS_INSTALL_DIR/$f" ]; then
|
||||
VS_VERSION_SP="$(grep ^SemanticVersion= "$VS_INSTALL_DIR/$f")"
|
||||
# Remove SemnaticVersion=
|
||||
VS_VERSION_SP="${VS_VERSION_SP#*=}"
|
||||
# Remove suffix of too detailed numbering starting with +
|
||||
VS_VERSION_SP="${VS_VERSION_SP%+*}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$VS_VERSION_SP" ]; then
|
||||
echo "Failed to find SP version"
|
||||
exit 1
|
||||
fi
|
||||
echo "Found Version SP: $VS_VERSION_SP"
|
||||
|
||||
# Setup output dirs
|
||||
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-${VS_VERSION_SP}-devkit"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
MSVCR_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}.dll
|
||||
MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
|
||||
|
||||
################################################################################
|
||||
# Copy Visual Studio files
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/VC ]; then
|
||||
VC_SUBDIR="VC/Tools/MSVC/14.12.25827"
|
||||
REDIST_SUBDIR="VC/Redist/MSVC/14.12.25810"
|
||||
echo "Copying VC..."
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
|
||||
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
|
||||
mkdir -p $DEVKIT_ROOT/VC/Auxiliary
|
||||
cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
|
||||
mkdir -p $DEVKIT_ROOT/VC/redist
|
||||
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
|
||||
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
|
||||
|
||||
# The redist runtime libs are needed to run the compiler but may not be
|
||||
# installed on the machine where the devkit will be used.
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Copy SDK files
|
||||
|
||||
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
|
||||
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
|
||||
echo "Copying SDK..."
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
|
||||
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
|
||||
cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
|
||||
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib/x86;\$DEVKIT_ROOT/VC/atlmfc/lib/x86;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlmfc/lib/x64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle: $DEVKIT_BUNDLE"
|
||||
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
|
||||
@@ -1,242 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2016, 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include IdlCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_CORBA, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(TOPDIR)/make/corba/src/classes, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes))
|
||||
|
||||
TOOL_LOGUTIL_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes \
|
||||
build.tools.logutil.MC
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_IDLJ, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(TOPDIR)/src/java.corba/share/classes, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/idlj_classes, \
|
||||
COPY := .prp, \
|
||||
INCLUDES := com/sun/tools/corba/se/idl, \
|
||||
EXCLUDE_FILES := ResourceBundleUtil.java module-info.java))
|
||||
|
||||
# Force the language to english for predictable source code generation.
|
||||
TOOL_IDLJ_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/idlj_classes \
|
||||
-Duser.language=en com.sun.tools.corba.se.idl.toJavaPortable.Compile
|
||||
|
||||
################################################################################
|
||||
|
||||
EXCEPTION_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging
|
||||
LOGWRAPPER_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/_logwrappers
|
||||
|
||||
# Generate LogWrapper classes
|
||||
$(EXCEPTION_DIR)/%SystemException.java: \
|
||||
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
|
||||
$(BUILD_TOOLS_CORBA)
|
||||
$(call LogInfo, Generating class file from $*.mc)
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) -f $(@D)/_the_wrappers.d
|
||||
$(TOOL_LOGUTIL_CMD) make-class $< $(@D)
|
||||
|
||||
# Generate LogWrapper properties file by concatening resource files
|
||||
$(EXCEPTION_DIR)/LogStrings.properties: \
|
||||
$(LOGWRAPPER_DIR)/ActivationSystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/IORSystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/InterceptorsSystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/NamingSystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/OMGSystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/ORBUtilSystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/POASystemException.resource \
|
||||
$(LOGWRAPPER_DIR)/UtilSystemException.resource
|
||||
$(call LogInfo, Concatenating 8 resource files into $(@F))
|
||||
$(call MakeDir, $(@D))
|
||||
$(CAT) $^ > $@
|
||||
|
||||
# The resources files are generated from lisp-like .mc files.
|
||||
$(LOGWRAPPER_DIR)/%SystemException.resource: \
|
||||
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
|
||||
$(BUILD_TOOLS_CORBA)
|
||||
$(call LogInfo, Generating resource file from $*.mc)
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) -f $(@D)/_the_wrappers.d
|
||||
$(TOOL_LOGUTIL_CMD) make-resource $< $(@D)
|
||||
|
||||
|
||||
LOGWRAPPER_TARGETS := \
|
||||
$(EXCEPTION_DIR)/ActivationSystemException.java \
|
||||
$(EXCEPTION_DIR)/IORSystemException.java \
|
||||
$(EXCEPTION_DIR)/InterceptorsSystemException.java \
|
||||
$(EXCEPTION_DIR)/NamingSystemException.java \
|
||||
$(EXCEPTION_DIR)/OMGSystemException.java \
|
||||
$(EXCEPTION_DIR)/ORBUtilSystemException.java \
|
||||
$(EXCEPTION_DIR)/POASystemException.java \
|
||||
$(EXCEPTION_DIR)/UtilSystemException.java \
|
||||
$(EXCEPTION_DIR)/LogStrings.properties
|
||||
|
||||
################################################################################
|
||||
# Build the IDLs.
|
||||
|
||||
IDL_DELETES := \
|
||||
org/omg/DynamicAny/*POA* \
|
||||
org/omg/DynamicAny/*Holder* \
|
||||
org/omg/DynamicAny/DynValueBoxHelper.java \
|
||||
org/omg/DynamicAny/DynValueCommonHelper.java \
|
||||
org/omg/DynamicAny/_DynValueCommonStub.java \
|
||||
org/omg/DynamicAny/_DynValueBoxStub.java \
|
||||
org/omg/DynamicAny/DynAnyPackage/TypeMismatchHolder.java \
|
||||
org/omg/DynamicAny/DynAnyPackage/InvalidValueHolder.java \
|
||||
org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHolder.java \
|
||||
org/omg/IOP/BI_DIR_IIOP.java \
|
||||
org/omg/IOP/ChainBypassCheck.java \
|
||||
org/omg/IOP/ChainBypassInfo.java \
|
||||
org/omg/IOP/FORWARDED_IDENTITY.java \
|
||||
org/omg/IOP/INVOCATION_POLICIES.java \
|
||||
org/omg/IOP/LogicalThreadId.java \
|
||||
org/omg/IOP/SendingContextRunTime.java \
|
||||
org/omg/IOP/UnknownExceptionInfo.java \
|
||||
org/omg/IOP/TaggedComponentSeqHolder.java \
|
||||
org/omg/PortableServer/CurrentPackage/NoContextHolder.java \
|
||||
org/omg/PortableServer/ForwardRequestHolder.java \
|
||||
org/omg/PortableServer/IdAssignmentPolicyValueHelper.java \
|
||||
org/omg/PortableServer/IdAssignmentPolicyValueHolder.java \
|
||||
org/omg/PortableServer/IdUniquenessPolicyValueHelper.java \
|
||||
org/omg/PortableServer/IdUniquenessPolicyValueHolder.java \
|
||||
org/omg/PortableServer/ImplicitActivationPolicyValueHelper.java \
|
||||
org/omg/PortableServer/ImplicitActivationPolicyValueHolder.java \
|
||||
org/omg/PortableServer/LifespanPolicyValueHelper.java \
|
||||
org/omg/PortableServer/LifespanPolicyValueHolder.java \
|
||||
org/omg/PortableServer/ServantRetentionPolicyValueHelper.java \
|
||||
org/omg/PortableServer/ServantRetentionPolicyValueHolder.java \
|
||||
org/omg/PortableServer/ObjectIdHelper.java \
|
||||
org/omg/PortableServer/ObjectIdHolder.java \
|
||||
org/omg/PortableServer/POAListHelper.java \
|
||||
org/omg/PortableServer/POAListHolder.java \
|
||||
org/omg/PortableServer/POAManagerPackage/AdapterInactiveHolder.java \
|
||||
org/omg/PortableServer/POAManagerPackage/StateHelper.java \
|
||||
org/omg/PortableServer/POAManagerPackage/StateHolder.java \
|
||||
org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHolder.java \
|
||||
org/omg/PortableServer/POAPackage/AdapterNonExistentHolder.java \
|
||||
org/omg/PortableServer/POAPackage/InvalidPolicyHolder.java \
|
||||
org/omg/PortableServer/POAPackage/NoServantHolder.java \
|
||||
org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHolder.java \
|
||||
org/omg/PortableServer/POAPackage/ObjectNotActiveHolder.java \
|
||||
org/omg/PortableServer/POAPackage/ServantAlreadyActiveHolder.java \
|
||||
org/omg/PortableServer/POAPackage/ServantNotActiveHolder.java \
|
||||
org/omg/PortableServer/POAPackage/WrongAdapterHolder.java \
|
||||
org/omg/PortableServer/POAPackage/WrongPolicyHolder.java \
|
||||
org/omg/PortableServer/RequestProcessingPolicyValueHelper.java \
|
||||
org/omg/PortableServer/RequestProcessingPolicyValueHolder.java \
|
||||
org/omg/PortableServer/ServantActivatorHolder.java \
|
||||
org/omg/PortableServer/ServantLocatorHolder.java \
|
||||
org/omg/PortableServer/ThreadPolicyValueHelper.java \
|
||||
org/omg/PortableServer/ThreadPolicyValueHolder.java \
|
||||
org/omg/PortableInterceptor/ClientRequestInfoHelper.java \
|
||||
org/omg/PortableInterceptor/ClientRequestInterceptorHelper.java \
|
||||
org/omg/PortableInterceptor/IORInfoHelper.java \
|
||||
org/omg/PortableInterceptor/IORInterceptorHelper.java \
|
||||
org/omg/PortableInterceptor/InterceptorHelper.java \
|
||||
org/omg/PortableInterceptor/ORBInitInfoHelper.java \
|
||||
org/omg/PortableInterceptor/ORBInitializerHelper.java \
|
||||
org/omg/PortableInterceptor/PolicyFactoryHelper.java \
|
||||
org/omg/PortableInterceptor/ReplyStatusHelper.java \
|
||||
org/omg/PortableInterceptor/RequestInfoHelper.java \
|
||||
org/omg/PortableInterceptor/ServerRequestInfoHelper.java \
|
||||
org/omg/PortableInterceptor/ServerRequestInterceptorHelper.java \
|
||||
org/omg/PortableInterceptor/SlotIdHelper.java \
|
||||
org/omg/PortableInterceptor/ClientRequestInfoHolder.java \
|
||||
org/omg/PortableInterceptor/ClientRequestInterceptorHolder.java \
|
||||
org/omg/PortableInterceptor/CurrentHolder.java \
|
||||
org/omg/PortableInterceptor/ForwardRequestHolder.java \
|
||||
org/omg/PortableInterceptor/IORInfoHolder.java \
|
||||
org/omg/PortableInterceptor/IORInterceptorHolder.java \
|
||||
org/omg/PortableInterceptor/InterceptorHolder.java \
|
||||
org/omg/PortableInterceptor/InvalidSlotHolder.java \
|
||||
org/omg/PortableInterceptor/ORBInitInfoHolder.java \
|
||||
org/omg/PortableInterceptor/ORBInitializerHolder.java \
|
||||
org/omg/PortableInterceptor/PolicyFactoryHolder.java \
|
||||
org/omg/PortableInterceptor/RequestInfoHolder.java \
|
||||
org/omg/PortableInterceptor/ServerRequestInfoHolder.java \
|
||||
org/omg/PortableInterceptor/ServerRequestInterceptorHolder.java \
|
||||
org/omg/PortableInterceptor/TaggedComponentSeqHolder.java \
|
||||
org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHolder.java \
|
||||
org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHolder.java \
|
||||
org/omg/IOP/CodecPackage/FormatMismatchHolder.java \
|
||||
org/omg/IOP/CodecPackage/InvalidTypeForEncodingHolder.java \
|
||||
org/omg/IOP/CodecPackage/TypeMismatchHolder.java \
|
||||
org/omg/IOP/CodecHelper.java \
|
||||
org/omg/IOP/EncodingFormatHelper.java \
|
||||
org/omg/IOP/EncodingHelper.java \
|
||||
org/omg/IOP/CodecFactoryPackage/UnknownEncodingHolder.java \
|
||||
org/omg/IOP/CodecFactoryHolder.java \
|
||||
org/omg/IOP/CodecHolder.java \
|
||||
org/omg/IOP/EncodingHolder.java \
|
||||
org/omg/IOP/TaggedComponentSeqHelper.java \
|
||||
org/omg/Dynamic/ContextListHelper.java \
|
||||
org/omg/Dynamic/ExceptionListHelper.java \
|
||||
org/omg/Dynamic/ParameterHolder.java \
|
||||
org/omg/Dynamic/ParameterListHolder.java \
|
||||
org/omg/Dynamic/ExceptionListHolder.java \
|
||||
org/omg/Dynamic/ParameterHelper.java \
|
||||
org/omg/Dynamic/ParameterListHelper.java \
|
||||
org/omg/Dynamic/RequestContextHelper.java \
|
||||
org/omg/CORBA/OctetSeqHelper.java \
|
||||
org/omg/CORBA/OctetSeqHolder.java \
|
||||
org/omg/CORBA/PolicyError.java \
|
||||
org/omg/CORBA/RepositoryIdHelper.java \
|
||||
#
|
||||
|
||||
$(eval $(call SetupIdlCompilation,BUILD_IDLS, \
|
||||
IDLJ := $(TOOL_IDLJ_CMD), \
|
||||
SRC := $(TOPDIR)/src/java.corba/share/classes, \
|
||||
BIN := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
|
||||
EXCLUDES := com/sun/tools/corba/se/idl/% \
|
||||
org/omg/CORBA/% \
|
||||
com/sun/corba/se/GiopIDL/% \
|
||||
org/omg/PortableServer/corba.idl, \
|
||||
INCLUDES := %, \
|
||||
OLDIMPLBASES := com/sun/corba/se/PortableActivationIDL/activation.idl \
|
||||
com/sun/corba/se/spi/activation/activation.idl, \
|
||||
DELETES := $(IDL_DELETES)))
|
||||
|
||||
$(BUILD_IDLS): $(BUILD_IDLJ)
|
||||
|
||||
################################################################################
|
||||
# zh_HK is just a copy of zh_TW
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties: \
|
||||
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
|
||||
$(install-file)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(BUILD_IDLS) $(LOGWRAPPER_TARGETS) \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties
|
||||
@@ -30,10 +30,10 @@ $(eval $(call IncludeCustomExtension, gensrc/Gensrc-java.desktop.gmk))
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
include GensrcIcons.gmk
|
||||
endif
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
include GensrcX11Wrappers.gmk
|
||||
endif
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris aix), )
|
||||
include GensrcX11Wrappers.gmk
|
||||
endif
|
||||
|
||||
include GensrcSwing.gmk
|
||||
|
||||
@@ -123,7 +123,7 @@ TARGETS += $(GENSRC_DIR)/_gensrc_proc_done
|
||||
$(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
|
||||
($(CD) $(GENSRC_DIR)/META-INF/providers && \
|
||||
p=""; \
|
||||
for i in $$($(LS)); do \
|
||||
for i in $$($(LS) | $(SORT)); do \
|
||||
c=$$($(CAT) $$i | $(TR) -d '\n\r'); \
|
||||
if test x$$p != x$$c; then \
|
||||
if test x$$p != x; then \
|
||||
@@ -137,7 +137,7 @@ $(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
|
||||
$(ECHO) " ;" >> $@; \
|
||||
$(ECHO) "uses org.graalvm.compiler.options.OptionDescriptors;" >> $@; \
|
||||
$(ECHO) "provides org.graalvm.compiler.options.OptionDescriptors with" >> $@; \
|
||||
for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java'); do \
|
||||
for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java' | $(SORT)); do \
|
||||
c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.internal\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \
|
||||
$(ECHO) " $$c," >> $@; \
|
||||
done; \
|
||||
|
||||
@@ -168,3 +168,7 @@ $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
|
||||
$(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))
|
||||
|
||||
GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)
|
||||
|
||||
# Include custom extension post hook
|
||||
$(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2018, 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,106 +23,30 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This file is responsible for extracting the x11 native struct offsets to
|
||||
# the xawt Java library. The tool needs to be run on the os/arch that
|
||||
# will host the final jvm, thus the tool cannot be used when cross compiling.
|
||||
# Generate java sources using the X11 offsets that are precalculated in files
|
||||
# make/data/x11wrappergen/sizes-<address size>.txt.
|
||||
|
||||
# To enable cross compiling, the two versions of the generated offset file,
|
||||
# sizes.32 and sizes.64 are committed into the source code repository.
|
||||
# These are the ones used.
|
||||
GENSRC_X11WRAPPERS_OUTPUT_TOP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
|
||||
|
||||
# However when not cross compiling, the offset generator tool is built and
|
||||
# run, to verify that it still generates the same sizes.32 and sizes.64.
|
||||
GENSRC_X11WRAPPERS_MARKER := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/_x11wrappers.marker
|
||||
|
||||
GENSRC_X11WRAPPERS :=
|
||||
# Put temporary c-code and executable to calculate offsets here.
|
||||
# Also put verification offset file here as well.
|
||||
GENSRC_X11WRAPPERS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_x11wrappers
|
||||
# Put the generated Java classes used to interface X11 from awt here.
|
||||
GENSRC_X11WRAPPERS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
|
||||
GENSRC_X11WRAPPERS_OUTPUTDIR := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/sun/awt/X11
|
||||
|
||||
# The pre-calculated offset file are stored here:
|
||||
GENSRC_SIZER_DIR := $(TOPDIR)/make/data/x11wrappergen
|
||||
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
|
||||
GENSRC_X11WRAPPERS_DATA := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(OPENJDK_TARGET_CPU_BITS).txt
|
||||
|
||||
# Normal case is to generate only according to target bits
|
||||
GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
|
||||
ifneq ($(OPENJDK_TARGET_OS), linux)
|
||||
# On all 64-bit systems except Linux, generate both 32 and 64 bit versions
|
||||
GENSRC_X11_VERSION := 32 64
|
||||
endif
|
||||
else
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# As a special case, solaris 32-bit also generates the 64-bit version
|
||||
GENSRC_X11_VERSION := 32 64
|
||||
endif
|
||||
endif
|
||||
|
||||
GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_X11_VERSION))
|
||||
|
||||
# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
|
||||
# file prefix it is given so those not needed need to be hidden.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) '$@'
|
||||
$(SORT) $< > $@
|
||||
|
||||
# Run the tool on the offset files copied from the source repository to generate several Java classes
|
||||
# used in awt.
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
|
||||
$(call MakeDir, $(GENSRC_X11WRAPPERS_DST))
|
||||
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
|
||||
# Run the tool on the offset files to generate several Java classes used in awt.
|
||||
$(GENSRC_X11WRAPPERS_MARKER): $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt
|
||||
$(call MakeDir, $(GENSRC_X11WRAPPERS_OUTPUTDIR))
|
||||
$(call LogInfo, Generating X11 wrapper source files)
|
||||
$(call ExecuteWithLog, $@, \
|
||||
$(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
|
||||
$(OPENJDK_TARGET_CPU_BITS))
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_X11WRAPPERS += $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11
|
||||
|
||||
ifneq ($(COMPILE_TYPE), cross)
|
||||
# This is not a cross compile, regenerate the offset file, so that we
|
||||
# can compare it with the version in the source code repository.
|
||||
|
||||
# Generate the C code for the program that will output the offset file.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
|
||||
$(call LogInfo, Generating X11 wrapper ($*-bit version))
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
|
||||
|
||||
# use -m32/-m64 only if the compiler supports it
|
||||
ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
|
||||
MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
|
||||
endif
|
||||
|
||||
SIZER_CFLAGS := \
|
||||
-I${TOPDIR}/src/hotspot/share/include \
|
||||
-I${TOPDIR}/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/include \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/libjava \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
||||
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
|
||||
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
|
||||
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
|
||||
#
|
||||
|
||||
# Compile the C code into an executable.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
|
||||
$(call MakeDir, $(@D))
|
||||
(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
|
||||
$(X_CFLAGS) \
|
||||
$(X_LIBS) \
|
||||
$(SIZER_CFLAGS) -lc)
|
||||
|
||||
.PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
|
||||
|
||||
# Run the executable create the offset file and check that it is identical
|
||||
# to the offset file in the source code repository.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
|
||||
$(call LogInfo, Verifying X11 wrapper sizes)
|
||||
$(call MakeDir, $(@D))
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
|
||||
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
|
||||
mv $@.tmp $@
|
||||
|
||||
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
|
||||
endif
|
||||
|
||||
GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS)
|
||||
GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS_MARKER)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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,8 +52,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
endif
|
||||
|
||||
# Set the C++ standard if supported
|
||||
ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
|
||||
|
||||
ADLC_CFLAGS += $(ADLC_CXXFLAG)
|
||||
|
||||
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
|
||||
# hurt.
|
||||
ADLC_CFLAGS += -DASSERT
|
||||
@@ -63,6 +63,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
|
||||
NAME := adlc, \
|
||||
TYPE := EXECUTABLE, \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
|
||||
SRC := $(TOPDIR)/src/hotspot/share/adlc, \
|
||||
EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
|
||||
@@ -71,7 +73,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
LIBS := $(ADLC_LIBS), \
|
||||
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
|
||||
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
|
||||
PROGRAM := adlc, \
|
||||
DEBUG_SYMBOLS := false, \
|
||||
DISABLED_WARNINGS_clang := tautological-compare, \
|
||||
DISABLED_WARNINGS_solstudio := notemsource, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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
|
||||
@@ -46,7 +46,7 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
$(call LogInfo, Generating dtrace header file $(@F))
|
||||
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
|
||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
|
||||
( $(CC) -E $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d ) )
|
||||
($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
|
||||
# Process all .d files in DTRACE_SOURCE_DIR. They are:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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
|
||||
@@ -46,17 +46,14 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
# in the libjvm.so, using JVM_CFLAGS as setup in CompileJvm.gmk. Otherwise
|
||||
# this would preferrably have been done as a part of GensrcDtrace.gmk.
|
||||
$(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
|
||||
NAME := dtraceGenOffsets, \
|
||||
TYPE := EXECUTABLE, \
|
||||
SRC := $(TOPDIR)/make/hotspot/src/native/dtrace, \
|
||||
CC := $(BUILD_CXX), \
|
||||
CXX := $(BUILD_CXX), \
|
||||
LDEXE := $(BUILD_CXX), \
|
||||
generateJvmOffsets.cpp_CXXFLAGS := $(JVM_CFLAGS) -mt -xnolib -norunpath, \
|
||||
generateJvmOffsetsMain.c_CFLAGS := -mt -m64 -norunpath -z nodefs, \
|
||||
TOOLCHAIN := $(TOOLCHAIN_BUILD), \
|
||||
LDFLAGS := -m64, \
|
||||
LIBS := -lc, \
|
||||
CFLAGS := -m64 $(JVM_CFLAGS), \
|
||||
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets/objs, \
|
||||
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets, \
|
||||
PROGRAM := dtraceGenOffsets, \
|
||||
))
|
||||
|
||||
DTRACE_GEN_OFFSETS_TOOL := $(BUILD_DTRACE_GEN_OFFSETS_TARGET)
|
||||
@@ -77,24 +74,11 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
JVM_OFFSETS_INDEX_H := $(DTRACE_SUPPORT_DIR)/JvmOffsetsIndex.h
|
||||
|
||||
# Run the dtrace-gen-offset tool to generate these three files.
|
||||
# The generated JvmOffsets.cpp is compiled with the rest of libjvm.
|
||||
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_H), header))
|
||||
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_INDEX_H), index))
|
||||
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_CPP), table))
|
||||
|
||||
############################################################################
|
||||
# Compile JVM_OFFSETS_OBJ which is linked with libjvm.so.
|
||||
|
||||
# JvmOffsets.cpp is compiled without the common JVM_CFLAGS. Otherwise, the
|
||||
# natural way would have been to included this source code in BUILD_LIBJVM.
|
||||
JVM_OFFSETS_CFLAGS := -m64
|
||||
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
|
||||
JVM_OFFSETS_CFLAGS += -xarch=sparc
|
||||
endif
|
||||
|
||||
$(JVM_OFFSETS_OBJ): $(JVM_OFFSETS_CPP) $(JVM_OFFSETS_H)
|
||||
$(call LogInfo, Compiling dtrace file JvmOffsets.cpp (for libjvm.so))
|
||||
$(call ExecuteWithLog, $@, $(CXX) -c -I$(<D) -o $@ $(JVM_OFFSETS_CFLAGS) $<)
|
||||
|
||||
############################################################################
|
||||
# Generate DTRACE_OBJ which is linked with libjvm.so.
|
||||
|
||||
@@ -146,8 +130,8 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
$(DTRACE_OBJ): $(JVM_OUTPUTDIR)/objs/dtrace.d $(DTRACE_INSTRUMENTED_OBJS)
|
||||
$(call LogInfo, Generating $(@F) from $(<F) and object files)
|
||||
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
|
||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
|
||||
$(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
|
||||
($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -xlazyload -o $@ \
|
||||
-s $(DTRACE_SUPPORT_DIR)/$(@F).d $(sort $(DTRACE_INSTRUMENTED_OBJS)))
|
||||
|
||||
@@ -156,21 +140,29 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
|
||||
# Unfortunately dtrace generates incorrect types for some symbols in
|
||||
# dtrace_jhelper.o, resulting in "warning: symbol X has differing types"
|
||||
# This is tracked in JDK-6890703.
|
||||
$(DTRACE_JHELPER_OBJ): $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d \
|
||||
$(JVM_OFFSETS_INDEX_H)
|
||||
$(call LogInfo, Running dtrace for $(<F))
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) $(DTRACE_CPP_FLAGS) -C \
|
||||
-I$(DTRACE_SUPPORT_DIR) -o $@ -s $<)
|
||||
# See JDK-6890703 for details.
|
||||
# We work around this by fixing the types for these symbols using elfedit,
|
||||
# after dtrace has generated the .o file.
|
||||
JHELPER_DTRACE_SRC := $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d
|
||||
|
||||
# NOTE: We should really do something like this, but unfortunately this
|
||||
# results in a compilation error. :-(
|
||||
# $(call MakeDir, $(DTRACE_SUPPORT_DIR))
|
||||
# $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
|
||||
# $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
|
||||
# > $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
# $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
|
||||
# -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
GetElfeditCommands = \
|
||||
$(foreach symbol, \
|
||||
$(shell $(GREP) ^extern $(JHELPER_DTRACE_SRC) | $(AWK) '{ gsub(";","") ; print $$3 }'), \
|
||||
-e 'sym:st_type $(symbol) 1')
|
||||
|
||||
# Make sure we run our selected compiler for preprocessing instead of letting
|
||||
# the dtrace tool pick it on it's own.
|
||||
$(DTRACE_JHELPER_OBJ): $(JHELPER_DTRACE_SRC) $(JVM_OFFSETS_INDEX_H)
|
||||
$(call LogInfo, Running dtrace for $(<F))
|
||||
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
|
||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
|
||||
($(CPP) $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
|
||||
> $(DTRACE_SUPPORT_DIR)/$(@F).d))
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
|
||||
-s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||
$(call ExecuteWithLog, $@.elfedit, $(ELFEDIT) $(call GetElfeditCommands) $@)
|
||||
endif
|
||||
|
||||
############################################################################
|
||||
# Build the stand-alone dtrace libraries
|
||||
@@ -178,12 +170,12 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
LIBJVM_DTRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm_dtrace
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DTRACE, \
|
||||
LIBRARY := jvm_dtrace, \
|
||||
NAME := jvm_dtrace, \
|
||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_dtrace, \
|
||||
CFLAGS := -m64 -G -mt -KPIC, \
|
||||
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
|
||||
LIBS := $(LIBDL) -lc -lthread -ldoor, \
|
||||
LIBS := $(LIBDL) -lthread -ldoor, \
|
||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_dtrace/mapfile-vers, \
|
||||
OBJECT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR)/objs, \
|
||||
))
|
||||
@@ -193,13 +185,12 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
# Note that libjvm_db.c has tests for COMPILER2, but this was never set by
|
||||
# the old build.
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DB, \
|
||||
LIBRARY := jvm_db, \
|
||||
NAME := jvm_db, \
|
||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_db, \
|
||||
CFLAGS := -I$(JVM_VARIANT_OUTPUTDIR)/gensrc -I$(DTRACE_SUPPORT_DIR) \
|
||||
-m64 -G -mt -KPIC, \
|
||||
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
|
||||
LIBS := -lc, \
|
||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_db/mapfile-vers, \
|
||||
OBJECT_DIR := $(LIBJVM_DB_OUTPUTDIR)/objs, \
|
||||
))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2018, 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
|
||||
@@ -29,8 +29,11 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
# CompileJvm.gmk
|
||||
DTRACE_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace.o
|
||||
DTRACE_JHELPER_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace_jhelper.o
|
||||
JVM_OFFSETS_OBJ := $(JVM_OUTPUTDIR)/objs/JvmOffsets.o
|
||||
DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ)
|
||||
|
||||
DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ) $(JVM_OFFSETS_OBJ)
|
||||
# Since we cannot generate JvmOffsets.cpp as part of the gensrc step,
|
||||
# we need this special hook to get it to compile with the rest of libjvm.
|
||||
JVM_OFFSETS_CPP := $(DTRACE_SUPPORT_DIR)/JvmOffsets.cpp
|
||||
DTRACE_EXTRA_SOURCE_FILES := $(JVM_OFFSETS_CPP)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2018, 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,8 +63,8 @@ endif
|
||||
# exclusive to the gtest libjvm.so.
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
|
||||
NAME := jvm, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LIBRARY := jvm, \
|
||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
|
||||
SRC := $(GTEST_TEST_SRC), \
|
||||
@@ -81,12 +81,11 @@ $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
|
||||
CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4, \
|
||||
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
|
||||
CFLAGS_aix := -qpic=large, \
|
||||
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
DISABLED_WARNINGS_gcc := undef, \
|
||||
DISABLED_WARNINGS_clang := undef switch format-nonliteral \
|
||||
tautological-undefined-compare $(BUILD_LIBJVM_DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_solstudio := identexpected, \
|
||||
DISABLED_WARNINGS_CXX_microsoft := 4996, \
|
||||
LDFLAGS := $(JVM_LDFLAGS), \
|
||||
LDFLAGS_solaris := -library=stlport4 $(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_aix := -bbigtoc, \
|
||||
@@ -107,14 +106,13 @@ TARGETS += $(BUILD_GTEST_LIBJVM)
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LAUNCHER, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
PROGRAM := gtestLauncher, \
|
||||
NAME := gtestLauncher, \
|
||||
TYPE := EXECUTABLE, \
|
||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
||||
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
|
||||
CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
|
||||
-I$(GTEST_FRAMEWORK_SRC)/include, \
|
||||
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_solaris := -library=stlport4, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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
|
||||
@@ -59,8 +59,8 @@ JVM_CFLAGS_INCLUDES += \
|
||||
-I$(TOPDIR)/src/hotspot/share/precompiled \
|
||||
-I$(TOPDIR)/src/hotspot/share/include \
|
||||
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/include \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
|
||||
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
|
||||
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
|
||||
-I$(TOPDIR)/src/java.base/share/native/libjimage \
|
||||
#
|
||||
|
||||
@@ -210,17 +210,16 @@ JVM_STRIPFLAGS ?= $(STRIPFLAGS)
|
||||
# Now set up the actual compilation of the main hotspot native library
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
|
||||
NAME := jvm, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LIBRARY := jvm, \
|
||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||
SRC := $(JVM_SRC_DIRS), \
|
||||
EXTRA_FILES := $(DTRACE_EXTRA_SOURCE_FILES), \
|
||||
EXCLUDES := $(JVM_EXCLUDES), \
|
||||
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
|
||||
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
|
||||
EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
|
||||
CFLAGS := $(JVM_CFLAGS), \
|
||||
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
||||
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
||||
DISABLED_WARNINGS_clang := tautological-compare, \
|
||||
@@ -244,10 +243,10 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# It doesn't matter which jvm.lib file gets exported, but we need
|
||||
# to pick just one.
|
||||
ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
|
||||
ifeq ($(JVM_VARIANT), $(JVM_VARIANT_MAIN))
|
||||
$(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
|
||||
DEST := $(LIB_OUTPUTDIR), \
|
||||
FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib, \
|
||||
FILES :=$(BUILD_LIBJVM_IMPORT_LIBRARY), \
|
||||
))
|
||||
TARGETS += $(COPY_JVM_LIB)
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2018, 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
|
||||
@@ -36,7 +36,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(STATIC_BUILD), false)
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
|
||||
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) ${LDFLAGS_NO_EXEC_STACK} $(EXTRA_CFLAGS)
|
||||
LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) ${LIBJSIG_NOEXECSTACK_LDFLAGS} $(EXTRA_CFLAGS)
|
||||
LIBJSIG_LIBS := $(LIBDL)
|
||||
|
||||
# NOTE: The old build compiled this library without -soname.
|
||||
@@ -76,7 +76,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
|
||||
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
|
||||
LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS)
|
||||
else
|
||||
$(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
|
||||
endif
|
||||
@@ -90,7 +90,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \
|
||||
LIBRARY := jsig, \
|
||||
NAME := jsig, \
|
||||
SRC := $(LIBJSIG_SRC_DIR), \
|
||||
OUTPUT_DIR := $(LIB_OUTPUTDIR), \
|
||||
LANG := C, \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user