mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 17:39:40 +01:00
Compare commits
942 Commits
jdk-11.0.1
...
jdk-11.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be01e6e792 | ||
|
|
40ee106645 | ||
|
|
a3661a5857 | ||
|
|
f65058efd6 | ||
|
|
a956ba6a82 | ||
|
|
911c3597a2 | ||
|
|
bd7420a71c | ||
|
|
f9bedac07d | ||
|
|
345122d7ad | ||
|
|
1f4decf7a7 | ||
|
|
6321d3eaf1 | ||
|
|
24205922cd | ||
|
|
a72d0b2894 | ||
|
|
fca62cfa50 | ||
|
|
250d7a8ad9 | ||
|
|
fac59555ce | ||
|
|
f2488a31e0 | ||
|
|
78141024c2 | ||
|
|
10ddd51b43 | ||
|
|
45e3cbf6ed | ||
|
|
046b213712 | ||
|
|
5a7b227193 | ||
|
|
1b6ff86666 | ||
|
|
4aa3196d4e | ||
|
|
5d14b134c6 | ||
|
|
27bfce0473 | ||
|
|
2b9d54a022 | ||
|
|
a2ef2482c4 | ||
|
|
6038e04bf2 | ||
|
|
623fd8ebe5 | ||
|
|
8f7589fce8 | ||
|
|
2bbab16d08 | ||
|
|
c54521b236 | ||
|
|
416c48e9d3 | ||
|
|
34cc0891f2 | ||
|
|
b773f56744 | ||
|
|
799a7c8d4c | ||
|
|
0bc8b22218 | ||
|
|
3592b70aea | ||
|
|
75daf18555 | ||
|
|
662f3bde53 | ||
|
|
68807aa7c7 | ||
|
|
5754eb1009 | ||
|
|
2aca53f88e | ||
|
|
ff19eeb90b | ||
|
|
2f3fc25050 | ||
|
|
48f1f39821 | ||
|
|
b64a1acb21 | ||
|
|
80d3bb46c0 | ||
|
|
1f67ffb029 | ||
|
|
f6bdbe8966 | ||
|
|
feb051fa69 | ||
|
|
9abfddecff | ||
|
|
18d616d6da | ||
|
|
f993ef52fb | ||
|
|
92c5062578 | ||
|
|
d90b9ac9d0 | ||
|
|
33771273d3 | ||
|
|
c73323bae6 | ||
|
|
569ecf4e7f | ||
|
|
ef475f7654 | ||
|
|
4ebccd61a4 | ||
|
|
d0045daa83 | ||
|
|
de9ae1eac4 | ||
|
|
32e63eb87f | ||
|
|
2fbb4b92bd | ||
|
|
910e2c463e | ||
|
|
46ce8cb44a | ||
|
|
9f74d2622e | ||
|
|
53acd95dc3 | ||
|
|
dd1994ee51 | ||
|
|
cf13e82c56 | ||
|
|
b9936cdf6b | ||
|
|
9be4d3fceb | ||
|
|
35000fb1c2 | ||
|
|
a4080b94a8 | ||
|
|
a6ee5aa738 | ||
|
|
365daccf24 | ||
|
|
f6a05cf85a | ||
|
|
c922821cfc | ||
|
|
a28f66b456 | ||
|
|
ce38b3ee60 | ||
|
|
2835c6a1a6 | ||
|
|
129e856762 | ||
|
|
c12421376a | ||
|
|
fb8676a9b5 | ||
|
|
639afbe61a | ||
|
|
abeacbfa20 | ||
|
|
d439c4a3f6 | ||
|
|
0b60ec791a | ||
|
|
21536b0fff | ||
|
|
281a51feef | ||
|
|
92a47bc702 | ||
|
|
fbc8bed3f8 | ||
|
|
5247b7208d | ||
|
|
701f3e225f | ||
|
|
9752bedf01 | ||
|
|
7be6fc22f3 | ||
|
|
3ba3e88b91 | ||
|
|
855efc413d | ||
|
|
c780db754e | ||
|
|
94d3648be1 | ||
|
|
363855d9dc | ||
|
|
84bc2528c1 | ||
|
|
efc3f4aa44 | ||
|
|
4780287574 | ||
|
|
75b7c7946f | ||
|
|
6e34daa288 | ||
|
|
2a39b98459 | ||
|
|
8336e3e256 | ||
|
|
a75f34ff00 | ||
|
|
b017f76f34 | ||
|
|
c4faab6693 | ||
|
|
df5ff37ba2 | ||
|
|
0aba9b7b5c | ||
|
|
a046767fe0 | ||
|
|
9bdeff7a46 | ||
|
|
cac0ab2c8e | ||
|
|
56463890dd | ||
|
|
43a93ccce9 | ||
|
|
682bcf2231 | ||
|
|
059f73cf90 | ||
|
|
96e3db73bc | ||
|
|
e60621f7f8 | ||
|
|
e994cb9079 | ||
|
|
ead65b47fe | ||
|
|
fb7e6e3899 | ||
|
|
ac0bc1b81c | ||
|
|
51a80ddd92 | ||
|
|
a4b30272bc | ||
|
|
cf722df2a4 | ||
|
|
0beae37693 | ||
|
|
166adaacab | ||
|
|
ffef09805d | ||
|
|
f530f34944 | ||
|
|
c2ac5e2f52 | ||
|
|
bcac47f00a | ||
|
|
e7b20779fe | ||
|
|
2513c89a03 | ||
|
|
b2a6484503 | ||
|
|
cdc33dc948 | ||
|
|
72d97e05d4 | ||
|
|
cd3c64fbfc | ||
|
|
ce1602d1eb | ||
|
|
70862e011b | ||
|
|
d0038240d3 | ||
|
|
d52e9ed182 | ||
|
|
723c0c0163 | ||
|
|
f356adbff9 | ||
|
|
6fe81727d8 | ||
|
|
de3589ca47 | ||
|
|
94c048f909 | ||
|
|
22dd2d3801 | ||
|
|
5c7ec0dea6 | ||
|
|
269224c81b | ||
|
|
3dd87610f9 | ||
|
|
470789a62a | ||
|
|
0d9a364d00 | ||
|
|
0713dbb1ce | ||
|
|
d4254d5edf | ||
|
|
0fd1ce3eea | ||
|
|
d77215acdd | ||
|
|
bcce7afba4 | ||
|
|
423e9698c0 | ||
|
|
50074a04e6 | ||
|
|
765f6af915 | ||
|
|
3eb7a82fef | ||
|
|
d4e7c76744 | ||
|
|
5327f67b9e | ||
|
|
72018a19cc | ||
|
|
dc47d1fd38 | ||
|
|
1bbbad1d2f | ||
|
|
7ce927107a | ||
|
|
caa05aca91 | ||
|
|
4cd3ad9c71 | ||
|
|
373be4349c | ||
|
|
f5eb11f381 | ||
|
|
121c997e02 | ||
|
|
14fa970e61 | ||
|
|
d76e6ea25e | ||
|
|
b77c161e75 | ||
|
|
b984b0a293 | ||
|
|
c86ba43b8e | ||
|
|
39986e07ed | ||
|
|
749ecd5063 | ||
|
|
89a88f0545 | ||
|
|
e1b839e7ee | ||
|
|
81806b786e | ||
|
|
2bfbe31fbc | ||
|
|
2b9f562967 | ||
|
|
c844a55f2f | ||
|
|
eeec20f4c8 | ||
|
|
e65fbde33a | ||
|
|
094cd261ae | ||
|
|
cde3cd2a94 | ||
|
|
fffaff3d5e | ||
|
|
1b3c516eff | ||
|
|
d0f6931ab7 | ||
|
|
399633c223 | ||
|
|
a7dab960a4 | ||
|
|
3c9dc44bff | ||
|
|
ee128b2f6c | ||
|
|
cb392e6bac | ||
|
|
95a42a8831 | ||
|
|
de64492682 | ||
|
|
e9ac2bc80c | ||
|
|
9eadce369e | ||
|
|
ba86e9dbad | ||
|
|
026e328252 | ||
|
|
2411c887b3 | ||
|
|
00f3931961 | ||
|
|
6faea22b52 | ||
|
|
d24c7dff21 | ||
|
|
06772f1d0c | ||
|
|
daeb36203d | ||
|
|
9d15f3e653 | ||
|
|
f5f17ec7c3 | ||
|
|
2c547273fe | ||
|
|
0416d4cc8a | ||
|
|
440eea1747 | ||
|
|
adc74777b3 | ||
|
|
7cf5b10c21 | ||
|
|
894613f86f | ||
|
|
6e8a66adb0 | ||
|
|
514c0eb836 | ||
|
|
910f35e111 | ||
|
|
c029177a52 | ||
|
|
e10b8874dc | ||
|
|
b49e8b282c | ||
|
|
7051296f46 | ||
|
|
6747c786ea | ||
|
|
93419e59b7 | ||
|
|
f0b10f2314 | ||
|
|
864baf7fe5 | ||
|
|
c06d7485cc | ||
|
|
581b34f573 | ||
|
|
35ec241ae0 | ||
|
|
977465389a | ||
|
|
f8d6c54bab | ||
|
|
540be49431 | ||
|
|
65e7759e78 | ||
|
|
32e16aefa9 | ||
|
|
161a941a86 | ||
|
|
8e971f59db | ||
|
|
e24312905b | ||
|
|
3fdf183988 | ||
|
|
96cc4c0a4f | ||
|
|
667acaf9e3 | ||
|
|
548c802505 | ||
|
|
6f0efc4c6c | ||
|
|
edbe574492 | ||
|
|
1a99b6e5c4 | ||
|
|
b9a29eb4cf | ||
|
|
dbf8820d60 | ||
|
|
750387bec7 | ||
|
|
2854320bda | ||
|
|
9fecfb3e29 | ||
|
|
6b84480e9f | ||
|
|
532fbe9c3c | ||
|
|
6b77069a17 | ||
|
|
b3417d8c8a | ||
|
|
a829804de5 | ||
|
|
a975a1e0b2 | ||
|
|
d61a4b4ee7 | ||
|
|
18939b7625 | ||
|
|
5ba24640f6 | ||
|
|
e3b68c57d8 | ||
|
|
bc9d1298e7 | ||
|
|
bf301e2476 | ||
|
|
b0bc8aef0c | ||
|
|
842f8ae089 | ||
|
|
c99f1e012f | ||
|
|
c4fb98d7bd | ||
|
|
985c7a10ae | ||
|
|
f321deb7c9 | ||
|
|
8528c520a0 | ||
|
|
003bdbb4d4 | ||
|
|
e5d679320a | ||
|
|
da6c1c7848 | ||
|
|
c0abfab0d9 | ||
|
|
be15767c61 | ||
|
|
9c97b37e1b | ||
|
|
339518e283 | ||
|
|
aa54ef1e5a | ||
|
|
54cb972718 | ||
|
|
abfab03e69 | ||
|
|
142d467c03 | ||
|
|
d45544d87f | ||
|
|
186d04cc61 | ||
|
|
b2d9d44667 | ||
|
|
729838bad5 | ||
|
|
a6d63040fe | ||
|
|
b837a7703f | ||
|
|
a0b46148c2 | ||
|
|
b6ffc252f3 | ||
|
|
e8c9452d7c | ||
|
|
79d01850bf | ||
|
|
dccbde750d | ||
|
|
e986452eeb | ||
|
|
398f413eed | ||
|
|
480b23dc75 | ||
|
|
08e0d08de3 | ||
|
|
770c1f65c5 | ||
|
|
ccbb92851c | ||
|
|
193dc76cbf | ||
|
|
97c07a1254 | ||
|
|
5506ecf31e | ||
|
|
cc88f4c77e | ||
|
|
4dd85cb08c | ||
|
|
e0b98bc11b | ||
|
|
b2e04df744 | ||
|
|
7f1047edba | ||
|
|
4a7557e3b0 | ||
|
|
513732dc24 | ||
|
|
817254db3c | ||
|
|
77837e303a | ||
|
|
e30705e577 | ||
|
|
30f0493263 | ||
|
|
114bb9a8e6 | ||
|
|
5506f90ab1 | ||
|
|
ffe80b29db | ||
|
|
50f876c05a | ||
|
|
ef1e4fa517 | ||
|
|
6e12eba9a9 | ||
|
|
20fe22f7ef | ||
|
|
e6aba913a1 | ||
|
|
defa0b27c2 | ||
|
|
4452721160 | ||
|
|
273987b5ca | ||
|
|
0eb4503cc2 | ||
|
|
dda5ed28bd | ||
|
|
ade997313a | ||
|
|
64c9026d7f | ||
|
|
2cc4596390 | ||
|
|
c1f759e9d0 | ||
|
|
d981db830a | ||
|
|
d5d3981855 | ||
|
|
0b7efe44ad | ||
|
|
09685c8944 | ||
|
|
c1939dd34e | ||
|
|
d7701cd76a | ||
|
|
ad283ae813 | ||
|
|
c1bb926f4d | ||
|
|
3bc72d04cb | ||
|
|
26652c8a41 | ||
|
|
c1b7fd2033 | ||
|
|
d286dded5f | ||
|
|
9fe6adec6c | ||
|
|
0fdd6dd4d5 | ||
|
|
d0252df66c | ||
|
|
7c6beb1050 | ||
|
|
31fb083d52 | ||
|
|
b11aa05ca8 | ||
|
|
db37a67ab1 | ||
|
|
16e40e448f | ||
|
|
ad3a90f630 | ||
|
|
0770b1f04f | ||
|
|
5067ea24d8 | ||
|
|
185ad54aac | ||
|
|
166078856a | ||
|
|
e3dd9ddf78 | ||
|
|
7a357419ab | ||
|
|
3207e73397 | ||
|
|
81bb36e57a | ||
|
|
d917caaffe | ||
|
|
3ba2a18ecd | ||
|
|
3cdce91c91 | ||
|
|
19bd319ae6 | ||
|
|
4267a37abd | ||
|
|
b2faa3567e | ||
|
|
1000b1c007 | ||
|
|
3613ae41b0 | ||
|
|
398753e0b5 | ||
|
|
9eded68161 | ||
|
|
1cbdcc996e | ||
|
|
b3d6981ea4 | ||
|
|
8a0b64bf08 | ||
|
|
5401f1248d | ||
|
|
5c4e744dab | ||
|
|
682728ef0a | ||
|
|
2e01473e09 | ||
|
|
5fa213a8ab | ||
|
|
c0ae141679 | ||
|
|
589894526d | ||
|
|
a9bb31fce5 | ||
|
|
608eca15bf | ||
|
|
6b4feb5e78 | ||
|
|
31396660db | ||
|
|
507a3927a2 | ||
|
|
be0de41d42 | ||
|
|
2f6a287317 | ||
|
|
0ef2e112eb | ||
|
|
ca62ba5f72 | ||
|
|
b46e240275 | ||
|
|
9317eec06d | ||
|
|
12093c04f6 | ||
|
|
f5da5da37e | ||
|
|
804ed8387c | ||
|
|
75c5063c72 | ||
|
|
63cb8a1086 | ||
|
|
d8f1a341eb | ||
|
|
7e93c80e26 | ||
|
|
521833eecd | ||
|
|
2995d0813b | ||
|
|
1f49004e6a | ||
|
|
7b2d5fca95 | ||
|
|
6a28ccb06e | ||
|
|
4548929ce5 | ||
|
|
1f601e90a5 | ||
|
|
8c243a33b2 | ||
|
|
2c8069c6b6 | ||
|
|
93d1d22da0 | ||
|
|
5a574eabdb | ||
|
|
ceb6793bf3 | ||
|
|
e537b9d740 | ||
|
|
a22373bf9e | ||
|
|
fc85d952d9 | ||
|
|
26e3971485 | ||
|
|
42ae833f36 | ||
|
|
aed5d6fc2d | ||
|
|
c0cde47aed | ||
|
|
2991b2b016 | ||
|
|
31c0528746 | ||
|
|
24981ccee5 | ||
|
|
f26efe7d4d | ||
|
|
3eed850193 | ||
|
|
b368809849 | ||
|
|
6dc0712062 | ||
|
|
3c8135263b | ||
|
|
c3e92e8830 | ||
|
|
2ccf28ed99 | ||
|
|
e28b210d50 | ||
|
|
f2186fb246 | ||
|
|
aaedfb3455 | ||
|
|
691657a204 | ||
|
|
7f30a6c7c1 | ||
|
|
9e2c1ef9d2 | ||
|
|
1eb49413a9 | ||
|
|
229c712dc9 | ||
|
|
f0af8f996e | ||
|
|
c8e66301f5 | ||
|
|
b4caafe16f | ||
|
|
bb2e0d85b6 | ||
|
|
2081c00707 | ||
|
|
3a3ab6ec3f | ||
|
|
504887c927 | ||
|
|
4a4f5c528c | ||
|
|
780327d1de | ||
|
|
db13ccf01e | ||
|
|
91328b3285 | ||
|
|
36871ab89c | ||
|
|
a5bdad69ee | ||
|
|
2871c6e718 | ||
|
|
2d806d0e2f | ||
|
|
432b9f03f6 | ||
|
|
f9ef046584 | ||
|
|
13b61e7ba1 | ||
|
|
3c8c45ef3e | ||
|
|
6dedd8a22b | ||
|
|
00b7647f83 | ||
|
|
835f2cab1d | ||
|
|
d8993e68ff | ||
|
|
e12516d44c | ||
|
|
88434e5c7b | ||
|
|
75fb8a99d6 | ||
|
|
386addf905 | ||
|
|
1516012ebc | ||
|
|
ab51b151a0 | ||
|
|
f1c92b472d | ||
|
|
f4776fe17f | ||
|
|
1ab869358a | ||
|
|
be64682e29 | ||
|
|
362c2e3ee3 | ||
|
|
4b5fdd8854 | ||
|
|
41ad04794e | ||
|
|
dd6421231d | ||
|
|
b8ac68dbdb | ||
|
|
97809afd1c | ||
|
|
c6f00859fd | ||
|
|
939741c0a0 | ||
|
|
e80528bf2b | ||
|
|
479ddb6e5c | ||
|
|
7d8991978b | ||
|
|
80615a6f39 | ||
|
|
0748e2abf3 | ||
|
|
8a726afcdf | ||
|
|
915ac570b5 | ||
|
|
125cf5ab2b | ||
|
|
de6d2c9bd5 | ||
|
|
2405ca61a3 | ||
|
|
bd9c2fb385 | ||
|
|
15bdc4dcc4 | ||
|
|
5802a9a926 | ||
|
|
86b8ea8d20 | ||
|
|
d21d985d00 | ||
|
|
558eab220a | ||
|
|
6ed8694766 | ||
|
|
18c06bb11a | ||
|
|
cf58d59c8e | ||
|
|
64434da0a2 | ||
|
|
cfb05cb26d | ||
|
|
83456c63be | ||
|
|
efe44815b1 | ||
|
|
c8c63cb33b | ||
|
|
05db32270e | ||
|
|
cb5d79c234 | ||
|
|
b3820b21ec | ||
|
|
b396137eda | ||
|
|
411aaff4c2 | ||
|
|
c692aa9aad | ||
|
|
bc29f1eb26 | ||
|
|
183bb3604a | ||
|
|
363586ef0b | ||
|
|
2244467c81 | ||
|
|
ffac38fc95 | ||
|
|
eb8c6f59aa | ||
|
|
5f998197a4 | ||
|
|
013aa4d85e | ||
|
|
dbee8618f3 | ||
|
|
169b3d24d3 | ||
|
|
272199168c | ||
|
|
1ce9a65510 | ||
|
|
b51ebf8c3d | ||
|
|
cdd3e0425f | ||
|
|
43e53a32c7 | ||
|
|
98e3b0d08d | ||
|
|
bfd05a6256 | ||
|
|
1364140346 | ||
|
|
06ee0b67cd | ||
|
|
630c80ebea | ||
|
|
d942151552 | ||
|
|
131084c5a0 | ||
|
|
1d32290c27 | ||
|
|
5c1748a40e | ||
|
|
22be06112b | ||
|
|
a3d867bbea | ||
|
|
3a2a0f9070 | ||
|
|
5685e581bf | ||
|
|
0a9127402f | ||
|
|
6678084b22 | ||
|
|
b096b9d92d | ||
|
|
d7a6e6ae49 | ||
|
|
1f0e77e8d1 | ||
|
|
4c27fa0591 | ||
|
|
8773d465b9 | ||
|
|
6c6006eb49 | ||
|
|
c90bc806cf | ||
|
|
3614fb27a4 | ||
|
|
834e07259c | ||
|
|
88d8eb2222 | ||
|
|
a220aaf3c6 | ||
|
|
7d7aa61eb0 | ||
|
|
c58a06666d | ||
|
|
43a0015f22 | ||
|
|
d0984dfce4 | ||
|
|
2c47c45f07 | ||
|
|
816e53bad5 | ||
|
|
0c42ee4690 | ||
|
|
08f86131bd | ||
|
|
faabe54e71 | ||
|
|
b88cd771f0 | ||
|
|
9d7bb60136 | ||
|
|
65180f10d2 | ||
|
|
7e74421cbc | ||
|
|
ebac392d65 | ||
|
|
fc4b9de407 | ||
|
|
6ffd006da0 | ||
|
|
f5a04fbca5 | ||
|
|
acedbcbecb | ||
|
|
37a15a1002 | ||
|
|
8547c8040e | ||
|
|
b10ad197bf | ||
|
|
54692ca250 | ||
|
|
a6d4402a74 | ||
|
|
727ae39586 | ||
|
|
64d7622f8b | ||
|
|
271c46b8c8 | ||
|
|
d183dc25f7 | ||
|
|
4e13da9908 | ||
|
|
644b50e0bc | ||
|
|
60d46cdce2 | ||
|
|
08e09c52a5 | ||
|
|
e1ca75ab8d | ||
|
|
3c51c43731 | ||
|
|
c02f7fea72 | ||
|
|
684a870e4f | ||
|
|
de8c37acea | ||
|
|
5b349eaf93 | ||
|
|
9ef11ac262 | ||
|
|
f999efd282 | ||
|
|
d1fb7b25c8 | ||
|
|
f4c5bdf0a5 | ||
|
|
e4fdd03917 | ||
|
|
c9ce60b9d0 | ||
|
|
0422f0585a | ||
|
|
f4eccbe1c7 | ||
|
|
01b213899c | ||
|
|
972ff6fb64 | ||
|
|
ee89e430e1 | ||
|
|
c1dfd3ee8f | ||
|
|
465b4f2e58 | ||
|
|
014c5ae90a | ||
|
|
edf4fb0a00 | ||
|
|
15cb63e0ea | ||
|
|
8dd8122d0c | ||
|
|
6c3d4dff58 | ||
|
|
b52d8ad547 | ||
|
|
9c684a103e | ||
|
|
71e89e121c | ||
|
|
84583683b2 | ||
|
|
6faa77c414 | ||
|
|
c20794cd45 | ||
|
|
466edc09df | ||
|
|
7bbb6ba0c8 | ||
|
|
b3cf0cf9fc | ||
|
|
ba60e61ca2 | ||
|
|
9c3f547f78 | ||
|
|
03555b1119 | ||
|
|
50b3039415 | ||
|
|
ca23550982 | ||
|
|
e92b7c3e45 | ||
|
|
369dedbaf5 | ||
|
|
75f695f688 | ||
|
|
80eecc50e6 | ||
|
|
e1cba983e2 | ||
|
|
a288e74b70 | ||
|
|
ba9a70cf12 | ||
|
|
dfcf7c1c29 | ||
|
|
06f769a2f8 | ||
|
|
1d78ce4d8a | ||
|
|
3c2763f9bc | ||
|
|
decfc86053 | ||
|
|
dc5590f2e9 | ||
|
|
1713cf1f44 | ||
|
|
13eadde75b | ||
|
|
ff60b34881 | ||
|
|
60732964fd | ||
|
|
9f00921b91 | ||
|
|
25b2407a2a | ||
|
|
52737cd0da | ||
|
|
d8450efaca | ||
|
|
d2c8326ac7 | ||
|
|
62191cd7e1 | ||
|
|
f9f3fcb9e5 | ||
|
|
f6aef8aa14 | ||
|
|
d1f6bd1690 | ||
|
|
c898a3ed88 | ||
|
|
5971a6a725 | ||
|
|
984e4565c0 | ||
|
|
d52365e876 | ||
|
|
ffc2cedb41 | ||
|
|
4c2ff08466 | ||
|
|
7f2cea1626 | ||
|
|
4640c05b2d | ||
|
|
a3f37e5b5c | ||
|
|
96fded9518 | ||
|
|
211530564c | ||
|
|
b46279bb15 | ||
|
|
5fd24c4c0b | ||
|
|
d351595b93 | ||
|
|
572639f779 | ||
|
|
bf2d083f6f | ||
|
|
57f29406b9 | ||
|
|
fde6e89f8b | ||
|
|
b9c29ca1fe | ||
|
|
b5e97eebba | ||
|
|
4895d4ce5e | ||
|
|
ce10688829 | ||
|
|
c46dcc56aa | ||
|
|
445ab52195 | ||
|
|
ca49dbf399 | ||
|
|
bcda0410a9 | ||
|
|
ffea91377b | ||
|
|
3e65a7c5d3 | ||
|
|
23aeca9be6 | ||
|
|
a3d0522910 | ||
|
|
c356873bff | ||
|
|
6a4603f829 | ||
|
|
31b51844bc | ||
|
|
2a5ae36da2 | ||
|
|
dba3022721 | ||
|
|
1acc508f2e | ||
|
|
3990eb2507 | ||
|
|
674218b0b0 | ||
|
|
8a4915e5e0 | ||
|
|
5f4b38a490 | ||
|
|
88954e1e81 | ||
|
|
3f66b16257 | ||
|
|
01f5a19710 | ||
|
|
77d919a870 | ||
|
|
12eca2f8ac | ||
|
|
b3c7b287c3 | ||
|
|
604dd4d9c6 | ||
|
|
7d50d5199b | ||
|
|
e5c800c5ad | ||
|
|
9197181f4e | ||
|
|
6400cdc724 | ||
|
|
89f9f91d3a | ||
|
|
07399029d7 | ||
|
|
87c8450c3e | ||
|
|
dbd378c4a1 | ||
|
|
5fdb254e0f | ||
|
|
da9de48899 | ||
|
|
dcc318c78d | ||
|
|
0bf122c006 | ||
|
|
31666ecc02 | ||
|
|
f643709b39 | ||
|
|
09d50d9d92 | ||
|
|
13bcc231c5 | ||
|
|
b5555c1915 | ||
|
|
178b400267 | ||
|
|
bc704daea5 | ||
|
|
af27be332f | ||
|
|
99b722d797 | ||
|
|
7f440c2849 | ||
|
|
40f4fc2da8 | ||
|
|
382ac6b955 | ||
|
|
c488e046f3 | ||
|
|
597a8009de | ||
|
|
57111978d2 | ||
|
|
18055b84a4 | ||
|
|
3bdd37064e | ||
|
|
f27d48ec6e | ||
|
|
7340e1bdc0 | ||
|
|
7964440dd3 | ||
|
|
14592778b1 | ||
|
|
5d9c09b8f1 | ||
|
|
7e6c47dd9b | ||
|
|
9eac68b4cc | ||
|
|
7706fa81f5 | ||
|
|
4ee685a92a | ||
|
|
1f17371681 | ||
|
|
50437846be | ||
|
|
55354dde48 | ||
|
|
1549bb1ecf | ||
|
|
b7b00f7fb4 | ||
|
|
e3eccbcbc2 | ||
|
|
954a6e4834 | ||
|
|
f2f7be92a0 | ||
|
|
8a40a9cf54 | ||
|
|
7e0603f2a8 | ||
|
|
5d28a71c1f | ||
|
|
d2af6538c0 | ||
|
|
3b7f045cd4 | ||
|
|
338f9af9aa | ||
|
|
03fa47127f | ||
|
|
7c664bcd82 | ||
|
|
ca885ee2a7 | ||
|
|
dde20e471d | ||
|
|
6664437b46 | ||
|
|
c09c43375f | ||
|
|
03e1247274 | ||
|
|
df9c46aef4 | ||
|
|
8f5ae914eb | ||
|
|
f07e69187b | ||
|
|
3e3f66552d | ||
|
|
ca988a65c6 | ||
|
|
188ab5910f | ||
|
|
f24340a8e0 | ||
|
|
6b2e6aef6f | ||
|
|
d403e0d02b | ||
|
|
13c07e6218 | ||
|
|
7c5f9c6831 | ||
|
|
3b40d21343 | ||
|
|
182173afe3 | ||
|
|
91f1538246 | ||
|
|
82c9cf2c3f | ||
|
|
5c454ae994 | ||
|
|
b928a88fd5 | ||
|
|
7067c7ccf5 | ||
|
|
1f618ab43c | ||
|
|
b9b5e526d6 | ||
|
|
429cbc4854 | ||
|
|
0b0529e6a1 | ||
|
|
0f08e3c46b | ||
|
|
5ecd16d284 | ||
|
|
18631ef992 | ||
|
|
cb5e61162b | ||
|
|
3c1e0cf887 | ||
|
|
d30cbebdb5 | ||
|
|
19b9fde597 | ||
|
|
70ddb1b025 | ||
|
|
8608557bd4 | ||
|
|
87853b0194 | ||
|
|
37d3bbd603 | ||
|
|
a2b2a2292c | ||
|
|
54651057b8 | ||
|
|
bd92c2fa02 | ||
|
|
f688a0ff9d | ||
|
|
62aee6f50e | ||
|
|
b919240d11 | ||
|
|
b092d77b37 | ||
|
|
7a90ff2800 | ||
|
|
3dec4fc30b | ||
|
|
887eed36bb | ||
|
|
e8b7e77c8b | ||
|
|
9b7f3f930f | ||
|
|
192179ee64 | ||
|
|
7655988ef4 | ||
|
|
7a7b3df292 | ||
|
|
b77b0b535c | ||
|
|
bc2d8cc472 | ||
|
|
243a55ef31 | ||
|
|
58ac9292a7 | ||
|
|
6acfa07280 | ||
|
|
1ff1f0c332 | ||
|
|
7b3b204514 | ||
|
|
fb364dbe5f | ||
|
|
8fadf3d010 | ||
|
|
16a4bd3dcc | ||
|
|
523ef55ae1 | ||
|
|
957a888428 | ||
|
|
e864cfc563 | ||
|
|
74bc485165 | ||
|
|
31d178b6a6 | ||
|
|
c064dcea3f | ||
|
|
9ffc4b3bef | ||
|
|
fb08d9d220 | ||
|
|
1d9108f4f7 | ||
|
|
81e900a4db | ||
|
|
64a3b18bb2 | ||
|
|
605e3907e0 | ||
|
|
f67b4de8a0 | ||
|
|
4566c88572 | ||
|
|
4be6963e54 | ||
|
|
dde80ab85a | ||
|
|
380cbc801e | ||
|
|
a6fafe89d7 | ||
|
|
01d99fa2a2 | ||
|
|
fbaf2f2841 | ||
|
|
01cc71f355 | ||
|
|
910546f704 | ||
|
|
0910bdb1ae | ||
|
|
ec5041eba3 | ||
|
|
5a3e86c2d0 | ||
|
|
f614119493 | ||
|
|
df6d5f8fbc | ||
|
|
53092b3439 | ||
|
|
84e52a3837 | ||
|
|
eb0b0ac0af | ||
|
|
52c940e4f3 | ||
|
|
9ddc8b02fa | ||
|
|
34b1178caa | ||
|
|
69ce82b96f | ||
|
|
18d8559d8e | ||
|
|
1d94bc4e27 | ||
|
|
bdd901737c | ||
|
|
3622c42c15 | ||
|
|
cf0812d6f1 | ||
|
|
094ca7153a | ||
|
|
57c1b21928 | ||
|
|
df5f253ac6 | ||
|
|
3b9e482145 | ||
|
|
b6bf677123 | ||
|
|
a84c7736f7 | ||
|
|
f7e6d0d93f | ||
|
|
c9d5eb3e22 | ||
|
|
4b2941d010 | ||
|
|
a48bd87348 | ||
|
|
3ce188ba7d | ||
|
|
9c29d00fc2 | ||
|
|
3fbcd78893 | ||
|
|
9014a180dc | ||
|
|
0013d849ff | ||
|
|
b8bc72094b | ||
|
|
f8e71f816b | ||
|
|
905baaf38a | ||
|
|
1c70f5492c | ||
|
|
0db04eeefd | ||
|
|
79dc540e3a | ||
|
|
7548ffaaa5 | ||
|
|
c2a13eef36 | ||
|
|
749d4ed10e | ||
|
|
49b85e8474 | ||
|
|
fba01e8ba5 | ||
|
|
0f84f9963f | ||
|
|
b5a20c9206 | ||
|
|
18c17a1391 | ||
|
|
4bc8257db5 | ||
|
|
80110d64dc | ||
|
|
fb9a2790c7 | ||
|
|
66d4be3030 | ||
|
|
ca33f6c563 | ||
|
|
2ebb8997c0 | ||
|
|
378b516a0d | ||
|
|
594458119d | ||
|
|
367a734c35 | ||
|
|
dbf95d477c | ||
|
|
1215ef1893 | ||
|
|
2f695bbaad | ||
|
|
6e53ef274a | ||
|
|
b5dbfefc36 | ||
|
|
dab4c4458b | ||
|
|
79576588be | ||
|
|
bcdcc9f35a | ||
|
|
32d424603a | ||
|
|
9ae65e8dcf | ||
|
|
19d065b580 | ||
|
|
cd29d6e96f | ||
|
|
ad0878c8d7 | ||
|
|
016bfd1e7b | ||
|
|
6cbaa7faac | ||
|
|
e9ba915905 | ||
|
|
6d308126f8 | ||
|
|
6784ea08b3 | ||
|
|
0dc103593c | ||
|
|
09fe47f0d3 | ||
|
|
9767c4ccd8 | ||
|
|
c249ca92e5 | ||
|
|
0ba5a81e7c | ||
|
|
131eab63cb | ||
|
|
f75b74d19e | ||
|
|
78ba1e5a5f | ||
|
|
2548ed31ae | ||
|
|
75b3e45fe9 | ||
|
|
de5b4b4c0b | ||
|
|
de91323ed2 | ||
|
|
6e30d22dee | ||
|
|
2f0f34ce4c | ||
|
|
9186b3c074 | ||
|
|
c9f313574a | ||
|
|
351508cc54 | ||
|
|
0cd49f5955 | ||
|
|
90a6418853 | ||
|
|
1afd1f4984 | ||
|
|
81c295838c | ||
|
|
cbbec73800 | ||
|
|
01db4763e8 | ||
|
|
1d7b2929ff | ||
|
|
75e4cb3891 | ||
|
|
e0d592b9ce | ||
|
|
317f79cc80 | ||
|
|
5d344f1a2f | ||
|
|
42dc282b04 | ||
|
|
76cab61f23 | ||
|
|
a491f0d8cd | ||
|
|
fa8c0d641c | ||
|
|
501352cc8f | ||
|
|
a77dd69747 | ||
|
|
ad2e6e4d25 | ||
|
|
58076db0c1 | ||
|
|
3db29c409d |
@@ -1,9 +1,12 @@
|
||||
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
# 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
|
||||
@@ -18,34 +21,26 @@
|
||||
# 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.
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# @test testme.sh
|
||||
# @summary Stack guard pages should be installed correctly and removed when thread is detached
|
||||
# @compile DoOverflow.java
|
||||
# @run shell testme.sh
|
||||
#
|
||||
|
||||
if [ "${TESTSRC}" = "" ]
|
||||
then
|
||||
TESTSRC=${PWD}
|
||||
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||
fi
|
||||
echo "TESTSRC=${TESTSRC}"
|
||||
## Adding common setup Variables for running shell tests.
|
||||
. ${TESTSRC}/../../test_env.sh
|
||||
name: 'Config'
|
||||
description: 'Read JDK Configuration Variables'
|
||||
inputs:
|
||||
var:
|
||||
description: 'The name of the variable to read'
|
||||
required: true
|
||||
outputs:
|
||||
value:
|
||||
description: 'The value of the configuration variable'
|
||||
value: ${{ steps.read-config.outputs.value }}
|
||||
|
||||
if [ "${VM_OS}" != "linux" ]
|
||||
then
|
||||
echo "Test only valid for Linux"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LD_LIBRARY_PATH=.:${TESTJAVA}/lib/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
# Run the test for a java and native overflow
|
||||
${TESTNATIVEPATH}/invoke test_java_overflow
|
||||
${TESTNATIVEPATH}/invoke test_native_overflow
|
||||
exit $?
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Read configuration variable from repo'
|
||||
id: read-config
|
||||
run: |
|
||||
# Extract value from configuration file
|
||||
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
|
||||
echo "value=$value" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
80
.github/actions/do-build/action.yml
vendored
Normal file
80
.github/actions/do-build/action.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Do build'
|
||||
description: 'Build the JDK using make'
|
||||
inputs:
|
||||
make-target:
|
||||
description: 'Make target(s)'
|
||||
required: true
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
run: >
|
||||
make LOG=info ${{ inputs.make-target }}
|
||||
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||
shell: bash
|
||||
|
||||
- name: 'Check for failure'
|
||||
id: check
|
||||
run: |
|
||||
# Check for failure marker file
|
||||
build_dir="$(ls -d build/*)"
|
||||
if [[ -e $build_dir/build-failure ]]; then
|
||||
# Collect relevant log files
|
||||
mkdir failure-logs
|
||||
cp \
|
||||
$build_dir/spec.gmk \
|
||||
$build_dir/build.log \
|
||||
$build_dir/configure.log \
|
||||
$build_dir/make-support/failure-summary.log \
|
||||
$build_dir/make-support/failure-logs/* \
|
||||
failure-logs/ 2> /dev/null || true
|
||||
echo 'failure=true' >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload build logs'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: failure-logs
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about build failures'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('Build failed. See summary for details.')
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2023, 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.
|
||||
#
|
||||
|
||||
name: 'Get BootJDK'
|
||||
description: 'Download the BootJDK from cache or source location'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform'
|
||||
required: true
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed BootJDK'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Determine platform prefix'
|
||||
id: platform-prefix
|
||||
run: |
|
||||
# Convert platform name to upper case
|
||||
platform_prefix="$(echo ${{ inputs.platform }} | tr [a-z-] [A-Z_])"
|
||||
echo "value=$platform_prefix" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: 'Get URL configuration'
|
||||
id: url
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_URL
|
||||
|
||||
- name: 'Get SHA256 configuration'
|
||||
id: sha256
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_SHA256
|
||||
|
||||
- name: 'Get file extension configuration'
|
||||
id: ext
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_EXT
|
||||
|
||||
- name: 'Check cache for BootJDK'
|
||||
id: get-cached-bootjdk
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: bootjdk/jdk
|
||||
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
|
||||
|
||||
# macOS is missing sha256sum
|
||||
- name: 'Install sha256sum'
|
||||
run: |
|
||||
# Run Homebrew installation
|
||||
brew install coreutils
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true' && runner.os == 'macOS'
|
||||
|
||||
- name: 'Download BootJDK'
|
||||
run: |
|
||||
# Download BootJDK and verify checksum
|
||||
mkdir -p bootjdk/jdk
|
||||
mkdir -p bootjdk/unpacked
|
||||
wget --progress=dot:mega -O bootjdk/jdk.${{ steps.ext.outputs.value }} '${{ steps.url.outputs.value }}'
|
||||
echo '${{ steps.sha256.outputs.value }} bootjdk/jdk.${{ steps.ext.outputs.value }}' | sha256sum -c >/dev/null -
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Unpack BootJDK'
|
||||
run: |
|
||||
# Unpack the BootJDK and move files to a common location
|
||||
if [[ '${{ steps.ext.outputs.value }}' == 'tar.gz' ]]; then
|
||||
tar -xf bootjdk/jdk.${{ steps.ext.outputs.value }} -C bootjdk/unpacked
|
||||
else
|
||||
unzip -q bootjdk/jdk.${{ steps.ext.outputs.value }} -d bootjdk/unpacked
|
||||
fi
|
||||
jdk_root="$(dirname $(find bootjdk/unpacked -name bin -type d))"
|
||||
mv "$jdk_root"/* bootjdk/jdk/
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where BootJDK is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the absolute path
|
||||
echo "path=`pwd`/bootjdk/jdk" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
109
.github/actions/get-bundles/action.yml
vendored
Normal file
109
.github/actions/get-bundles/action.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Get bundles'
|
||||
description: 'Download resulting JDK bundles'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
outputs:
|
||||
jdk-path:
|
||||
description: 'Path to the installed JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.jdk }}
|
||||
symbols-path:
|
||||
description: 'Path to the installed symbols bundle'
|
||||
value: ${{ steps.path-name.outputs.symbols }}
|
||||
tests-path:
|
||||
description: 'Path to the installed tests bundle'
|
||||
value: ${{ steps.path-name.outputs.tests }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Download bundles artifact'
|
||||
id: download-bundles
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
|
||||
- name: 'Download bundles artifact (retry)'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
if: steps.download-bundles.outcome == 'failure'
|
||||
|
||||
- name: 'Unpack bundles'
|
||||
run: |
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||
echo 'Unpacking jdk bundle...'
|
||||
mkdir -p bundles/jdk
|
||||
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip -d bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking jdk bundle...'
|
||||
mkdir -p bundles/jdk
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking symbols bundle...'
|
||||
mkdir -p bundles/symbols
|
||||
tar -xf bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/symbols
|
||||
fi
|
||||
|
||||
if [[ -e bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking tests bundle...'
|
||||
mkdir -p bundles/tests
|
||||
tar -xf bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/tests
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Export paths to where bundles are installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the paths
|
||||
|
||||
jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/jdk -name bin -type d))"
|
||||
symbols_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/symbols -name bin -type d))"
|
||||
tests_dir="$GITHUB_WORKSPACE/bundles/tests"
|
||||
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
jdk_dir="$(cygpath $jdk_dir)"
|
||||
symbols_dir="$(cygpath $symbols_dir)"
|
||||
tests_dir="$(cygpath $tests_dir)"
|
||||
fi
|
||||
|
||||
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
|
||||
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
|
||||
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Get JTReg'
|
||||
description: 'Download JTReg from cache or source location'
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed JTReg'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Get JTReg version configuration'
|
||||
id: version
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: JTREG_VERSION
|
||||
|
||||
- name: 'Check cache for JTReg'
|
||||
id: get-cached-jtreg
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
|
||||
- name: 'Checkout the JTReg source'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: openjdk/jtreg
|
||||
ref: jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/src
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_11_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
shell: bash
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where JTReg is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
@@ -1,9 +1,12 @@
|
||||
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
# 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
|
||||
@@ -18,32 +21,24 @@
|
||||
# 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.
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# @test testme.sh
|
||||
# @summary Linux kernel stack guard should not cause segfaults on x86-32
|
||||
# @compile T.java
|
||||
# @run shell testme.sh
|
||||
#
|
||||
|
||||
if [ "${TESTSRC}" = "" ]
|
||||
then
|
||||
TESTSRC=${PWD}
|
||||
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||
fi
|
||||
echo "TESTSRC=${TESTSRC}"
|
||||
## Adding common setup Variables for running shell tests.
|
||||
. ${TESTSRC}/../../test_env.sh
|
||||
name: 'Get MSYS2'
|
||||
description: 'Download MSYS2 and prepare a Windows host'
|
||||
|
||||
if [ "${VM_OS}" != "linux" ]
|
||||
then
|
||||
echo "Test only valid for Linux"
|
||||
exit 0
|
||||
fi
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
location: ${{ runner.tool_cache }}/msys2
|
||||
|
||||
LD_LIBRARY_PATH=.:${TESTJAVA}/lib/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
${TESTNATIVEPATH}/stack-gap || exit $?
|
||||
${TESTNATIVEPATH}/stack-gap -XX:+DisablePrimordialThreadGuardPages || exit $?
|
||||
# We can't run bash until this is completed, so stick with pwsh
|
||||
- name: 'Set MSYS2 path'
|
||||
run: |
|
||||
# Prepend msys2/msys64/usr/bin to the PATH
|
||||
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||
shell: pwsh
|
||||
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Upload bundles'
|
||||
description: 'Upload resulting JDK bundles'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
|
||||
- name: 'Determine bundle names'
|
||||
id: bundles
|
||||
run: |
|
||||
# Rename bundles to consistent names
|
||||
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
|
||||
mkdir bundles
|
||||
|
||||
if [[ "$jdk_bundle_zip" != "" ]]; then
|
||||
mv "$jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip"
|
||||
fi
|
||||
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$symbols_bundle" != "" ]]; then
|
||||
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$tests_bundle" != "" ]]; then
|
||||
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
|
||||
echo 'bundles-found=true' >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo 'bundles-found=false' >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
retention-days: 1
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
||||
51
.github/scripts/gen-build-failure-report.sh
vendored
Normal file
51
.github/scripts/gen-build-failure-report.sh
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
BUILD_DIR="$(ls -d build/*)"
|
||||
|
||||
# Send signal to the do-build action that we failed
|
||||
touch "$BUILD_DIR/build-failure"
|
||||
|
||||
(
|
||||
echo '### :boom: Build failure summary'
|
||||
echo ''
|
||||
echo 'The build failed. Here follows the failure summary from the build.'
|
||||
echo '<details><summary><b>View build failure summary</b></summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
if [[ -f "$BUILD_DIR/make-support/failure-summary.log" ]]; then
|
||||
cat "$BUILD_DIR/make-support/failure-summary.log"
|
||||
else
|
||||
echo "Failure summary ($BUILD_DIR/make-support/failure-summary.log) not found"
|
||||
fi
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
echo ''
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
92
.github/scripts/gen-test-results.sh
vendored
Normal file
92
.github/scripts/gen-test-results.sh
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
|
||||
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||
results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
|
||||
report_dir=build/run-test-prebuilt/test-support/$test_suite_name
|
||||
|
||||
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# If we have nothing to report, exit this step now
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
|
||||
for test in $failures $errors; do
|
||||
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||
base_path="$(echo "$test" | tr '#' '_')"
|
||||
report_file="$report_dir/$base_path.jtr"
|
||||
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
|
||||
echo "#### <a id="$anchor">$test"
|
||||
|
||||
echo '<details><summary>View test results</summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
if [[ -f "$report_file" ]]; then
|
||||
cat "$report_file"
|
||||
else
|
||||
echo "Error: Result file $report_file not found"
|
||||
fi
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
if [[ "$hs_err_files" != "" ]]; then
|
||||
echo '<details><summary>View HotSpot error log</summary>'
|
||||
echo ''
|
||||
for hs_err in $hs_err_files; do
|
||||
echo '```'
|
||||
echo "$hs_err:"
|
||||
echo ''
|
||||
cat "$hs_err"
|
||||
echo '```'
|
||||
done
|
||||
|
||||
echo '</details>'
|
||||
echo ''
|
||||
fi
|
||||
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
|
||||
# Trim it down if so.
|
||||
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
|
||||
if [[ $summary_size -gt 1000000 ]]; then
|
||||
# Trim to below 1024 kB, and cut off after the last detail group
|
||||
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
|
||||
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
|
||||
(
|
||||
echo ''
|
||||
echo ':x: **WARNING: Summary is too large and has been truncated.**'
|
||||
echo ''
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
|
||||
70
.github/scripts/gen-test-summary.sh
vendored
Normal file
70
.github/scripts/gen-test-summary.sh
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
GITHUB_OUTPUT="$2"
|
||||
|
||||
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||
results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
|
||||
|
||||
if [[ ! -f build/run-test-prebuilt/make-support/exit-with-error ]]; then
|
||||
# There were no failures, exit now
|
||||
exit
|
||||
fi
|
||||
|
||||
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||
failure_count=$(echo $failures | wc -w || true)
|
||||
error_count=$(echo $errors | wc -w || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# We know something went wrong, but not what
|
||||
echo 'error-message=Unspecified test suite failure. Please see log for job for details.' >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo 'failure=true' >> $GITHUB_OUTPUT
|
||||
echo "error-message=Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details." >> $GITHUB_OUTPUT
|
||||
|
||||
echo '### :boom: Test failures summary' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [[ "$failures" != "" ]]; then
|
||||
echo '' >> $GITHUB_STEP_SUMMARY
|
||||
echo 'These tests reported failure:' >> $GITHUB_STEP_SUMMARY
|
||||
for test in $failures; do
|
||||
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||
echo "* [$test](#user-content-$anchor)"
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [[ "$errors" != "" ]]; then
|
||||
echo '' >> $GITHUB_STEP_SUMMARY
|
||||
echo 'These tests reported errors:' >> $GITHUB_STEP_SUMMARY
|
||||
for test in $errors; do
|
||||
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||
echo "* [$test](#user-content-$anchor)"
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
170
.github/workflows/build-cross-compile.yml
vendored
Normal file
170
.github/workflows/build-cross-compile.yml
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Build (cross-compile)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
gcc-major-version:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
configure-arguments:
|
||||
required: false
|
||||
type: string
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
name: build
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target-cpu:
|
||||
- aarch64
|
||||
- arm
|
||||
- s390x
|
||||
- ppc64le
|
||||
include:
|
||||
- target-cpu: aarch64
|
||||
gnu-arch: aarch64
|
||||
debian-arch: arm64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
- target-cpu: arm
|
||||
gnu-arch: arm
|
||||
debian-arch: armhf
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
gnu-arch: s390x
|
||||
debian-arch: s390x
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
- target-cpu: ppc64le
|
||||
gnu-arch: powerpc64le
|
||||
debian-arch: ppc64el
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Use linux-x64 JDK bundle as build JDK
|
||||
- name: 'Get build JDK'
|
||||
id: buildjdk
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Install dependencies using apt-get
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install \
|
||||
gcc-${{ inputs.gcc-major-version }} \
|
||||
g++-${{ inputs.gcc-major-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Check cache for sysroot'
|
||||
id: get-cached-sysroot
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: sysroot
|
||||
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
|
||||
|
||||
- name: 'Install sysroot dependencies'
|
||||
run: sudo apt-get install debootstrap qemu-user-static
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Create sysroot'
|
||||
run: >
|
||||
sudo debootstrap
|
||||
--arch=${{ matrix.debian-arch }}
|
||||
--verbose
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
|
||||
--resolve-deps
|
||||
--variant=minbase
|
||||
${{ matrix.debian-version }}
|
||||
sysroot
|
||||
${{ matrix.debian-repository }}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Prepare sysroot'
|
||||
run: |
|
||||
# Prepare sysroot and remove unused files to minimize cache
|
||||
sudo chroot sysroot symlinks -cr .
|
||||
sudo chown ${USER} -R sysroot
|
||||
rm -rf sysroot/{dev,proc,run,sys,var}
|
||||
rm -rf sysroot/usr/{sbin,bin,share}
|
||||
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
|
||||
rm -rf sysroot/usr/libexec/gcc
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=linux-${{ matrix.target-cpu }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-zlib=system
|
||||
--enable-debug
|
||||
--disable-precompiled-headers
|
||||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||
--with-sysroot=sysroot
|
||||
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: 'hotspot ${{ inputs.make-arguments }}'
|
||||
platform: linux-${{ matrix.target-cpu }}
|
||||
140
.github/workflows/build-linux.yml
vendored
Normal file
140
.github/workflows/build-linux.yml
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Build (linux)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
make-target:
|
||||
required: false
|
||||
type: string
|
||||
default: 'product-bundles test-bundles'
|
||||
debug-levels:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
gcc-major-version:
|
||||
required: true
|
||||
type: string
|
||||
gcc-package-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
apt-architecture:
|
||||
required: false
|
||||
type: string
|
||||
apt-extra-packages:
|
||||
required: false
|
||||
type: string
|
||||
configure-arguments:
|
||||
required: false
|
||||
type: string
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: build
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Set architecture'
|
||||
id: arch
|
||||
run: |
|
||||
# Set a proper suffix for packages if using a different architecture
|
||||
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||
echo 'suffix=:${{ inputs.apt-architecture }}' >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Install dependencies using apt-get
|
||||
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||
sudo dpkg --add-architecture ${{ inputs.apt-architecture }}
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
118
.github/workflows/build-macos.yml
vendored
Normal file
118
.github/workflows/build-macos.yml
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Build (macos)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
make-target:
|
||||
required: false
|
||||
type: string
|
||||
default: 'product-bundles test-bundles'
|
||||
debug-levels:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
xcode-toolset-version:
|
||||
required: true
|
||||
type: string
|
||||
configure-arguments:
|
||||
required: false
|
||||
type: string
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
name: build
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: macos-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Homebrew installation and xcode-select
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
150
.github/workflows/build-windows.yml
vendored
Normal file
150
.github/workflows/build-windows.yml
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Build (windows)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
make-target:
|
||||
required: false
|
||||
type: string
|
||||
default: 'product-bundles test-bundles'
|
||||
debug-levels:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
msvc-toolset-version:
|
||||
required: true
|
||||
type: string
|
||||
msvc-toolset-architecture:
|
||||
required: true
|
||||
type: string
|
||||
configure-arguments:
|
||||
required: false
|
||||
type: string
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
MSYS2_PATH_TYPE: minimal
|
||||
CHERE_INVOKING: 1
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
name: build
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: windows-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Check toolchain installed'
|
||||
id: toolchain-check
|
||||
run: |
|
||||
set +e
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Toolchain is already installed"
|
||||
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Toolchain is not yet installed"
|
||||
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
env:
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
PATH: ''
|
||||
shell: env /usr/bin/bash --login -eo pipefail {0}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
360
.github/workflows/main.yml
vendored
Normal file
360
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,360 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'OpenJDK GHA Sanity Checks'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- pr/*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
|
||||
required: true
|
||||
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64'
|
||||
configure-arguments:
|
||||
description: 'Additional configure arguments'
|
||||
required: false
|
||||
make-arguments:
|
||||
description: 'Additional make arguments'
|
||||
required: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
###
|
||||
### Determine platforms to include
|
||||
###
|
||||
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
|
||||
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
|
||||
macos-x64: ${{ steps.include.outputs.macos-x64 }}
|
||||
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
|
||||
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||
|
||||
steps:
|
||||
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
|
||||
- name: 'Check what jobs to run'
|
||||
id: include
|
||||
run: |
|
||||
# Determine which platform jobs to run
|
||||
|
||||
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
|
||||
# 'false' otherwise.
|
||||
# arg $1: platform name or names to look for
|
||||
function check_platform() {
|
||||
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||
input='${{ github.event.inputs.platforms }}'
|
||||
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
|
||||
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
|
||||
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
|
||||
echo 'false'
|
||||
return
|
||||
else
|
||||
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
|
||||
fi
|
||||
fi
|
||||
|
||||
normalized_input="$(echo ,$input, | tr -d ' ')"
|
||||
if [[ "$normalized_input" == ",," ]]; then
|
||||
# For an empty input, assume all platforms should run
|
||||
echo 'true'
|
||||
return
|
||||
else
|
||||
# Check for all acceptable platform names
|
||||
for part in $* ; do
|
||||
if echo "$normalized_input" | grep -q -e ",$part," ; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
||||
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
||||
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
|
||||
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
|
||||
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
||||
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
||||
|
||||
###
|
||||
### Build jobs
|
||||
###
|
||||
|
||||
build-linux-x64:
|
||||
name: linux-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
|
||||
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-linux-x86:
|
||||
name: linux-x86
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
gcc-major-version: '10'
|
||||
gcc-package-suffix: '-multilib'
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
build-linux-x64-hs-nopch:
|
||||
name: linux-x64-hs-nopch
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-zero:
|
||||
name: linux-x64-hs-zero
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-minimal:
|
||||
name: linux-x64-hs-minimal
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-optimized:
|
||||
name: linux-x64-hs-optimized
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-cross-compile:
|
||||
name: linux-cross-compile
|
||||
needs:
|
||||
- select
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/build-cross-compile.yml
|
||||
with:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
name: macos-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
xcode-toolset-version: '11.7'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.macos-x64 == 'true'
|
||||
|
||||
build-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
xcode-toolset-version: '12.4'
|
||||
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.macos-aarch64 == 'true'
|
||||
|
||||
build-windows-x64:
|
||||
name: windows-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
name: windows-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'arm64'
|
||||
make-target: 'hotspot'
|
||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.windows-aarch64 == 'true'
|
||||
|
||||
###
|
||||
### Test jobs
|
||||
###
|
||||
|
||||
test-linux-x64:
|
||||
name: linux-x64
|
||||
needs:
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-linux-x86:
|
||||
name: linux-x86
|
||||
needs:
|
||||
- build-linux-x86
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
needs:
|
||||
- build-macos-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-11
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
needs:
|
||||
- build-windows-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
bootjdk-platform: windows-x64
|
||||
runs-on: windows-2019
|
||||
|
||||
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
|
||||
remove-bundles:
|
||||
name: 'Remove bundle artifacts'
|
||||
runs-on: ubuntu-22.04
|
||||
if: always()
|
||||
needs:
|
||||
- build-linux-x64
|
||||
- build-linux-x86
|
||||
- build-linux-x64-hs-nopch
|
||||
- build-linux-x64-hs-zero
|
||||
- build-linux-x64-hs-minimal
|
||||
- build-linux-x64-hs-optimized
|
||||
- build-linux-cross-compile
|
||||
- build-macos-x64
|
||||
- build-macos-aarch64
|
||||
- build-windows-x64
|
||||
- build-windows-aarch64
|
||||
- test-linux-x64
|
||||
- test-linux-x86
|
||||
- test-macos-x64
|
||||
- test-windows-x64
|
||||
|
||||
steps:
|
||||
# Hack to get hold of the api environment variables that are only defined for actions
|
||||
- name: 'Get API configuration'
|
||||
id: api
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
- name: 'Remove bundle artifacts'
|
||||
run: |
|
||||
# Find and remove all bundle artifacts
|
||||
ALL_ARTIFACT_URLS="$(curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
|
||||
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
|
||||
for url in $BUNDLE_ARTIFACT_URLS; do
|
||||
echo "Removing $url"
|
||||
curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
-X DELETE "$url" \
|
||||
|| echo "Failed to remove bundle"
|
||||
done
|
||||
1935
.github/workflows/submit.yml
vendored
1935
.github/workflows/submit.yml
vendored
File diff suppressed because it is too large
Load Diff
205
.github/workflows/test.yml
vendored
Normal file
205
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
#
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
name: 'Run tests'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
bootjdk-platform:
|
||||
required: true
|
||||
type: string
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
MSYS2_PATH_TYPE: minimal
|
||||
CHERE_INVOKING: 1
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: test
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test-name:
|
||||
- 'jdk/tier1 part 1'
|
||||
- 'jdk/tier1 part 2'
|
||||
- 'jdk/tier1 part 3'
|
||||
- 'langtools/tier1'
|
||||
- 'hs/tier1 common'
|
||||
- 'hs/tier1 compiler'
|
||||
- 'hs/tier1 gc'
|
||||
- 'hs/tier1 runtime'
|
||||
- 'hs/tier1 serviceability'
|
||||
|
||||
include:
|
||||
- test-name: 'jdk/tier1 part 1'
|
||||
test-suite: 'test/jdk/:tier1_part1'
|
||||
|
||||
- test-name: 'jdk/tier1 part 2'
|
||||
test-suite: 'test/jdk/:tier1_part2'
|
||||
|
||||
- test-name: 'jdk/tier1 part 3'
|
||||
test-suite: 'test/jdk/:tier1_part3'
|
||||
|
||||
- test-name: 'langtools/tier1'
|
||||
test-suite: 'test/langtools/:tier1'
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: ${{ inputs.bootjdk-platform }}
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get bundles'
|
||||
id: bundles
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
# On macOS we need to install some dependencies for testing
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
if: runner.os == 'macOS'
|
||||
|
||||
- name: 'Set PATH'
|
||||
id: path
|
||||
run: |
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
echo "value=" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "value=$PATH" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Run tests'
|
||||
id: run-tests
|
||||
run: >
|
||||
make run-test-prebuilt
|
||||
TEST='${{ matrix.test-suite }}'
|
||||
BOOT_JDK=${{ steps.bootjdk.outputs.path }}
|
||||
JT_HOME=${{ steps.jtreg.outputs.path }}
|
||||
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
||||
env:
|
||||
PATH: ${{ steps.path.outputs.value }}
|
||||
|
||||
# This is a separate step, since if the markdown from a step gets bigger than
|
||||
# 1024 kB it is skipped, but then the short summary above is still generated
|
||||
- name: 'Generate test report'
|
||||
run: bash ./.github/scripts/gen-test-results.sh "$GITHUB_STEP_SUMMARY"
|
||||
if: always()
|
||||
|
||||
- name: 'Package test results'
|
||||
id: package
|
||||
run: |
|
||||
# Package test-results and relevant parts of test-support
|
||||
mkdir results
|
||||
|
||||
if [[ -d build/run-test-prebuilt/test-results ]]; then
|
||||
cd build/run-test-prebuilt/test-results/
|
||||
zip -r -9 "$GITHUB_WORKSPACE/results/test-results.zip" .
|
||||
cd $GITHUB_WORKSPACE
|
||||
else
|
||||
echo '::warning ::Missing test-results directory'
|
||||
fi
|
||||
|
||||
if [[ -d build/run-test-prebuilt/test-support ]]; then
|
||||
cd build/run-test-prebuilt/test-support/
|
||||
zip -r -9 "$GITHUB_WORKSPACE/results/test-support.zip" . -i *.jtr -i */hs_err*.log -i */replay*.log
|
||||
cd $GITHUB_WORKSPACE
|
||||
else
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
|
||||
if: always()
|
||||
|
||||
- name: 'Upload test results'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: results
|
||||
name: ${{ steps.package.outputs.artifact-name }}
|
||||
if: always()
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about test failures'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
|
||||
if: steps.run-tests.outputs.failure == 'true'
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -13,3 +13,5 @@ test/nashorn/lib
|
||||
NashornProfile.txt
|
||||
**/JTreport/**
|
||||
**/JTwork/**
|
||||
/compile_commands.json
|
||||
/.cache
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk-updates
|
||||
jbs=JDK
|
||||
version=11.0.17
|
||||
version=11.0.22
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
|
||||
|
||||
@@ -128,6 +128,15 @@ install_jib() {
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# Want to check the filetype using file, to see if we got served a HTML error page.
|
||||
# This is sensitive to the filename containing a specific string, but good enough.
|
||||
file "${installed_jib_script}.gz" | grep "gzip compressed data" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: ${installed_jib_script}.gz is not a gzip file."
|
||||
echo "If you are behind a proxy you may need to configure exceptions using no_proxy."
|
||||
echo "The download URL was: ${jib_url}"
|
||||
exit 1
|
||||
fi
|
||||
echo "Extracting JIB bootstrap script"
|
||||
rm -f "${installed_jib_script}"
|
||||
gunzip "${installed_jib_script}.gz"
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="generator" content="pandoc">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Building the JDK</title>
|
||||
<style type="text/css">code{white-space: pre;}</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Building the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
@@ -67,6 +72,9 @@
|
||||
<li><a href="#make-control-variables">Make Control Variables</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#running-tests">Running Tests</a></li>
|
||||
<li><a href="#signing">Signing</a><ul>
|
||||
<li><a href="#macos-1">macOS</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
||||
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
||||
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
||||
@@ -195,7 +203,7 @@
|
||||
<h3 id="windows">Windows</h3>
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</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 the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, 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 effort to implement.)</p>
|
||||
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layers are Cygwin and MSYS2. (MSYS is no longer supported due to an outdated bash; While OpenJDK can be built with MSYS2, support for it is still experimental, so build failures and unusual errors are not uncommon.)</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather than <code>C:\git\jdk\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 the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
|
||||
@@ -234,30 +242,30 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Operating system</th>
|
||||
<th style="text-align: left;">Supported toolchain</th>
|
||||
<th>Operating system</th>
|
||||
<th>Supported toolchain</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Linux</td>
|
||||
<td style="text-align: left;">gcc, clang</td>
|
||||
<td>Linux</td>
|
||||
<td>gcc, clang</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">macOS</td>
|
||||
<td style="text-align: left;">Apple Xcode (using clang)</td>
|
||||
<td>macOS</td>
|
||||
<td>Apple Xcode (using clang)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Solaris</td>
|
||||
<td style="text-align: left;">Oracle Solaris Studio</td>
|
||||
<td>Solaris</td>
|
||||
<td>Oracle Solaris Studio</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">AIX</td>
|
||||
<td style="text-align: left;">IBM XL C/C++</td>
|
||||
<td>AIX</td>
|
||||
<td>IBM XL C/C++</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio</td>
|
||||
<td>Windows</td>
|
||||
<td>Microsoft Visual Studio</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -265,26 +273,26 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Operating system</th>
|
||||
<th style="text-align: left;">Toolchain version</th>
|
||||
<th>Operating system</th>
|
||||
<th>Toolchain version</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Linux</td>
|
||||
<td style="text-align: left;">gcc 7.3.0</td>
|
||||
<td>Linux</td>
|
||||
<td>gcc 7.3.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">macOS</td>
|
||||
<td style="text-align: left;">Apple Xcode 9.4 (using clang 9.1.0)</td>
|
||||
<td>macOS</td>
|
||||
<td>Apple Xcode 9.4 (using clang 9.1.0)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Solaris</td>
|
||||
<td style="text-align: left;">Oracle Solaris Studio 12.4 (with compiler version 5.13)</td>
|
||||
<td>Solaris</td>
|
||||
<td>Oracle Solaris Studio 12.4 (with compiler version 5.13)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td>
|
||||
<td>Windows</td>
|
||||
<td>Microsoft Visual Studio 2017 update 15.9.16</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -297,9 +305,13 @@
|
||||
<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
|
||||
<h3 id="apple-xcode">Apple Xcode</h3>
|
||||
<p>The oldest supported version of Xcode is 8.</p>
|
||||
<p>You will need the Xcode command lines developers tools to be able to build the JDK. (Actually, <em>only</em> the command lines tools are needed, not the IDE.) The simplest way to install these is to run:</p>
|
||||
<p>You will need the Xcode command line developer tools to be able to build the JDK. (Actually, <em>only</em> the command line tools are needed, not the IDE.) The simplest way to install these is to run:</p>
|
||||
<pre><code>xcode-select --install</code></pre>
|
||||
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
|
||||
<p>When updating Xcode, it is advisable to keep an older version for building the JDK. To use a specific version of Xcode you have multiple options:</p>
|
||||
<ul>
|
||||
<li>Use <code>xcode-select -s</code> before running <code>configure</code>, e.g. <code>xcode-select -s /Applications/Xcode13.1.app</code>. The drawback is that the setting is system wide and you may have to revert it after an OpenJDK build.</li>
|
||||
<li>Use configure option <code>--with-xcode-path</code>, e.g. <code>configure --with-xcode-path=/Applications/Xcode13.1.app</code> This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by <code>xcode-select</code>.</li>
|
||||
</ul>
|
||||
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
|
||||
<h3 id="oracle-solaris-studio">Oracle Solaris Studio</h3>
|
||||
<p>The minimum accepted version of the Solaris Studio compilers is 5.13 (corresponding to Solaris Studio 12.4). Older versions will not be accepted by configure.</p>
|
||||
@@ -363,6 +375,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
|
||||
<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
|
||||
<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
|
||||
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
|
||||
<p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>
|
||||
<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
|
||||
@@ -402,7 +415,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel</code>.</li>
|
||||
<li>To install on Alpine Linux, try running <code>sudo apk add libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev</code>.</li>
|
||||
<li>To install on Alpine Linux, try running <code>sudo apk add libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev</code>.</li>
|
||||
<li>To install on Solaris, try running <code>pkg install x11/header/x11-protocols x11/library/libice x11/library/libpthread-stubs x11/library/libsm x11/library/libx11 x11/library/libxau x11/library/libxcb x11/library/libxdmcp x11/library/libxevie x11/library/libxext x11/library/libxrender x11/library/libxscrnsaver x11/library/libxtst x11/library/toolkit/libxt</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-x=<path></code> if <code>configure</code> does not properly locate your X11 files.</p>
|
||||
@@ -552,7 +565,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<li><code>CONF</code> and <code>CONF_NAME</code> - Selecting the configuration(s) to use. See <a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||
</ul>
|
||||
<h4 id="test-make-control-variables">Test Make Control Variables</h4>
|
||||
<p>These make control variables only make sense when running tests. Please see <a href="testing.html">Testing the JDK</a> for details.</p>
|
||||
<p>These make control variables only make sense when running tests. Please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>) for details.</p>
|
||||
<ul>
|
||||
<li><code>TEST</code></li>
|
||||
<li><code>TEST_JOBS</code></li>
|
||||
@@ -572,7 +585,13 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://adopt-openjdk.ci.cloudbees.com/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>To execute the most basic tests (tier 1), use:</p>
|
||||
<pre><code>make run-test-tier1</code></pre>
|
||||
<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p>
|
||||
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
|
||||
<h2 id="signing">Signing</h2>
|
||||
<h3 id="macos-1">macOS</h3>
|
||||
<p>Modern versions of macOS require applications to be signed and notarizied before distribution. See Apple's documentation for more background on what this means and how it works. To help support this, the JDK build can be configured to automatically sign all native binaries, and the JDK bundle, with all the options needed for successful notarization, as well as all the entitlements required by the JDK. To enable <code>hardened</code> signing, use configure parameter <code>--with-macosx-codesign=hardened</code> and configure the signing identity you wish to use with <code>--with-macosx-codesign-identity=<identity></code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p>
|
||||
<p>When not signing for distribution with the hardened option, the JDK build will still attempt to perform <code>adhoc</code> signing to add the special entitlement <code>com.apple.security.get-task-allow</code> to each binary. This entitlement is required to be able to dump core files from a process. Note that adding this entitlement makes the build invalid for notarization, so it is only added when signing in <code>debug</code> mode. To explicitly enable this kind of adhoc signing, use configure parameter <code>--with-macosx-codesign=debug</code>. It will be enabled by default in most cases.</p>
|
||||
<p>It's also possible to completely disable any explicit codesign operations done by the JDK build using the configure parameter <code>--without-macosx-codesign</code>. The exact behavior then depends on the architecture. For macOS on x64, it (at least at the time of this writing) results in completely unsigned binaries that should still work fine for development and debugging purposes. On aarch64, the Xcode linker will apply a default "adhoc" signing, without any entitlements. Such a build does not allow dumping core files.</p>
|
||||
<p>The default mode "auto" will try for <code>hardened</code> signing if the debug level is <code>release</code> and either the default identity or the specified identity is valid. If hardened isn't possible, then <code>debug</code> signing is chosen if it works. If nothing works, the codesign build step is disabled.</p>
|
||||
<h2 id="cross-compiling">Cross-compiling</h2>
|
||||
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
|
||||
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
|
||||
@@ -644,11 +663,13 @@ x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
|
||||
<p>Note that alsa is needed even if you only want to build a headless JDK.</p>
|
||||
<ul>
|
||||
<li><p>Go to <a href="https://www.debian.org/distrib/packages">Debian Package Search</a> and search for the <code>libasound2</code> and <code>libasound2-dev</code> packages for your <em>target</em> system. Download them to /tmp.</p></li>
|
||||
<li><p>Install the libraries into the cross-compilation toolchain. For instance:</p>
|
||||
<li>Install the libraries into the cross-compilation toolchain. For instance:</li>
|
||||
</ul>
|
||||
<pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
|
||||
dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .
|
||||
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre></li>
|
||||
<li><p>If alsa is not properly detected by <code>configure</code>, you can point it out by <code>--with-alsa</code>.</p></li>
|
||||
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre>
|
||||
<ul>
|
||||
<li>If alsa is not properly detected by <code>configure</code>, you can point it out by <code>--with-alsa</code>.</li>
|
||||
</ul>
|
||||
<h4 id="x11-1">X11</h4>
|
||||
<p>You will need X11 libraries suitable for your <em>target</em> system. For most cases, using Debian's pre-built libraries work fine.</p>
|
||||
@@ -943,6 +964,8 @@ Clock skew detected. Your build may be incomplete.</code></pre>
|
||||
cannot create ... Permission denied
|
||||
spawn failed</code></pre>
|
||||
<p>This can be a sign of a Cygwin problem. See the information about solving problems in the <a href="#cygwin">Cygwin</a> section. Rebooting the computer might help temporarily.</p>
|
||||
<h4 id="spaces-in-path">Spaces in Path</h4>
|
||||
<p>On Windows, when configuring, <code>fixpath.sh</code> may report that some directory names have spaces. Usually, it assumes those directories have <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name">short paths</a>. You can run <code>fsutil file setshortname</code> in <code>cmd</code> on certain directories, such as <code>Microsoft Visual Studio</code> or <code>Windows Kits</code>, to assign arbitrary short paths so <code>configure</code> can access them.</p>
|
||||
<h3 id="getting-help">Getting Help</h3>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
||||
|
||||
105
doc/building.md
105
doc/building.md
@@ -177,10 +177,9 @@ On Windows, it is important that you pay attention to the instructions in the
|
||||
|
||||
Windows is the only non-POSIX OS supported by the JDK, and as such, requires
|
||||
some extra care. A POSIX support layer is required to build on Windows.
|
||||
Currently, 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 effort to implement.)
|
||||
Currently, the only supported such layers are Cygwin and MSYS2. (MSYS is no longer
|
||||
supported due to an outdated bash; While OpenJDK can be built with MSYS2,
|
||||
support for it is still experimental, so build failures and unusual errors are not uncommon.)
|
||||
|
||||
Internally in the build system, all paths are represented as Unix-style paths,
|
||||
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
|
||||
@@ -292,13 +291,13 @@ be able to run on the target platform. In theory, toolchain and operating
|
||||
system should be independent factors, but in practice there's more or less a
|
||||
one-to-one correlation between target operating system and toolchain.
|
||||
|
||||
Operating system Supported toolchain
|
||||
------------------ -------------------------
|
||||
Linux gcc, clang
|
||||
macOS Apple Xcode (using clang)
|
||||
Solaris Oracle Solaris Studio
|
||||
AIX IBM XL C/C++
|
||||
Windows Microsoft Visual Studio
|
||||
| Operating system | Supported toolchain |
|
||||
| ------------------ | ------------------------- |
|
||||
| Linux | gcc, clang |
|
||||
| macOS | Apple Xcode (using clang) |
|
||||
| Solaris | Oracle Solaris Studio |
|
||||
| AIX | IBM XL C/C++ |
|
||||
| Windows | Microsoft Visual Studio |
|
||||
|
||||
Please see the individual sections on the toolchains for version
|
||||
recommendations. As a reference, these versions of the toolchains are used, at
|
||||
@@ -307,12 +306,12 @@ possible to compile the JDK with both older and newer versions, but the closer
|
||||
you stay to this list, the more likely you are to compile successfully without
|
||||
issues.
|
||||
|
||||
Operating system Toolchain version
|
||||
------------------ -------------------------------------------------------
|
||||
Linux gcc 7.3.0
|
||||
macOS Apple Xcode 9.4 (using clang 9.1.0)
|
||||
Solaris Oracle Solaris Studio 12.4 (with compiler version 5.13)
|
||||
Windows Microsoft Visual Studio 2017 update 15.9.16
|
||||
| Operating system | Toolchain version |
|
||||
| ------------------ | ------------------------------------------------------- |
|
||||
| Linux | gcc 7.3.0 |
|
||||
| macOS | Apple Xcode 9.4 (using clang 9.1.0) |
|
||||
| Solaris | Oracle Solaris Studio 12.4 (with compiler version 5.13) |
|
||||
| Windows | Microsoft Visual Studio 2017 update 15.9.16 |
|
||||
|
||||
### gcc
|
||||
|
||||
@@ -335,20 +334,20 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
|
||||
|
||||
The oldest supported version of Xcode is 8.
|
||||
|
||||
You will need the Xcode command lines developers tools to be able to build
|
||||
the JDK. (Actually, *only* the command lines tools are needed, not the IDE.)
|
||||
You will need the Xcode command line developer tools to be able to build
|
||||
the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
|
||||
The simplest way to install these is to run:
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
It is advisable to keep an older version of Xcode for building the JDK when
|
||||
updating Xcode. This [blog page](
|
||||
http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has
|
||||
good suggestions on managing multiple Xcode versions. To use a specific version
|
||||
of Xcode, use `xcode-select -s` before running `configure`, or use
|
||||
`--with-toolchain-path` to point to the version of Xcode to use, e.g.
|
||||
`configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin`
|
||||
When updating Xcode, it is advisable to keep an older version for building the JDK.
|
||||
To use a specific version of Xcode you have multiple options:
|
||||
|
||||
* Use `xcode-select -s` before running `configure`, e.g. `xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting
|
||||
is system wide and you may have to revert it after an OpenJDK build.
|
||||
* Use configure option `--with-xcode-path`, e.g. `configure --with-xcode-path=/Applications/Xcode13.1.app`
|
||||
This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by `xcode-select`.
|
||||
|
||||
If you have recently (inadvertently) updated your OS and/or Xcode version, and
|
||||
the JDK can no longer be built, please see the section on [Problems with the
|
||||
@@ -403,6 +402,9 @@ specific installation order. However, the solution suggested by the KB article
|
||||
does not always resolve the problem. See [this stackoverflow discussion](
|
||||
https://stackoverflow.com/questions/10888391) for other suggestions.
|
||||
|
||||
If you have Visual Studio installed but `configure` fails to detect it, it may
|
||||
be because of [spaces in path](#spaces-in-path).
|
||||
|
||||
### IBM XL C/C++
|
||||
|
||||
The regular builds by SAP is using version 12.1, described as `IBM XL C/C++ for
|
||||
@@ -833,7 +835,7 @@ configuration, as opposed to the "configure time" configuration.
|
||||
#### Test Make Control Variables
|
||||
|
||||
These make control variables only make sense when running tests. Please see
|
||||
[Testing the JDK](testing.html) for details.
|
||||
**Testing the JDK** ([html](testing.html), [markdown](testing.md)) for details.
|
||||
|
||||
* `TEST`
|
||||
* `TEST_JOBS`
|
||||
@@ -871,8 +873,44 @@ To execute the most basic tests (tier 1), use:
|
||||
make run-test-tier1
|
||||
```
|
||||
|
||||
For more details on how to run tests, please see the [Testing
|
||||
the JDK](testing.html) document.
|
||||
For more details on how to run tests, please see **Testing the JDK**
|
||||
([html](testing.html), [markdown](testing.md)).
|
||||
|
||||
## Signing
|
||||
|
||||
### macOS
|
||||
|
||||
Modern versions of macOS require applications to be signed and notarizied before
|
||||
distribution. See Apple's documentation for more background on what this means
|
||||
and how it works. To help support this, the JDK build can be configured to
|
||||
automatically sign all native binaries, and the JDK bundle, with all the options
|
||||
needed for successful notarization, as well as all the entitlements required by
|
||||
the JDK. To enable `hardened` signing, use configure parameter
|
||||
`--with-macosx-codesign=hardened` and configure the signing identity you wish to
|
||||
use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a
|
||||
signing identity from Apple that needs to be preinstalled on the build host.
|
||||
|
||||
When not signing for distribution with the hardened option, the JDK build will
|
||||
still attempt to perform `adhoc` signing to add the special entitlement
|
||||
`com.apple.security.get-task-allow` to each binary. This entitlement is required
|
||||
to be able to dump core files from a process. Note that adding this entitlement
|
||||
makes the build invalid for notarization, so it is only added when signing in
|
||||
`debug` mode. To explicitly enable this kind of adhoc signing, use configure
|
||||
parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
|
||||
cases.
|
||||
|
||||
It's also possible to completely disable any explicit codesign operations done
|
||||
by the JDK build using the configure parameter `--without-macosx-codesign`.
|
||||
The exact behavior then depends on the architecture. For macOS on x64, it (at
|
||||
least at the time of this writing) results in completely unsigned binaries that
|
||||
should still work fine for development and debugging purposes. On aarch64, the
|
||||
Xcode linker will apply a default "adhoc" signing, without any entitlements.
|
||||
Such a build does not allow dumping core files.
|
||||
|
||||
The default mode "auto" will try for `hardened` signing if the debug level is
|
||||
`release` and either the default identity or the specified identity is valid.
|
||||
If hardened isn't possible, then `debug` signing is chosen if it works. If
|
||||
nothing works, the codesign build step is disabled.
|
||||
|
||||
## Cross-compiling
|
||||
|
||||
@@ -1510,6 +1548,15 @@ This can be a sign of a Cygwin problem. See the information about solving
|
||||
problems in the [Cygwin](#cygwin) section. Rebooting the computer might help
|
||||
temporarily.
|
||||
|
||||
#### Spaces in Path
|
||||
|
||||
On Windows, when configuring, `fixpath.sh` may report that some directory
|
||||
names have spaces. Usually, it assumes those directories have
|
||||
[short paths](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name).
|
||||
You can run `fsutil file setshortname` in `cmd` on certain directories, such as
|
||||
`Microsoft Visual Studio` or `Windows Kits`, to assign arbitrary short paths so
|
||||
`configure` can access them.
|
||||
|
||||
### Getting Help
|
||||
|
||||
If none of the suggestions in this document helps you, or if you find what you
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</nav>
|
||||
<h2 id="using-the-run-test-framework">Using the run-test framework</h2>
|
||||
<p>This new way of running tests is developer-centric. It assumes that you have built a JDK locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
|
||||
<p>The main target “run-test” uses the jdk-image as the tested product. There is also an alternate target “exploded-run-test” that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
|
||||
<p>The main target "run-test" uses the jdk-image as the tested product. There is also an alternate target "exploded-run-test" that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
|
||||
<p>Some example command-lines:</p>
|
||||
<pre><code>$ make run-test-tier1
|
||||
$ make run-test-jdk_lang JTREG="JOBS=8"
|
||||
@@ -55,7 +55,7 @@ $ make run-test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8
|
||||
$ make run-test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java"
|
||||
$ make exploded-run-test TEST=tier2</code></pre>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
|
||||
<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
|
||||
<h2 id="test-selection">Test selection</h2>
|
||||
<p>All functionality is available using the run-test make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, run-test-only can be used instead, which do not depend on the source and test image build.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make run-test-tier1</code> is equivalent to <code>make run-test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>run-test TEST="x"</code> solution needs to be used.</p>
|
||||
@@ -82,7 +82,7 @@ $ make exploded-run-test TEST=tier2</code></pre>
|
||||
<h3 id="gtest">Gtest</h3>
|
||||
<p>Since the Hotspot Gtest suite is so quick, the default is to run all tests. This is specified by just <code>gtest</code>, or as a fully qualified test descriptor <code>gtest:all</code>.</p>
|
||||
<p>If you want, you can single out an individual test or a group of tests, for instance <code>gtest:LogDecorations</code> or <code>gtest:LogDecorations.level_test_vm</code>. This can be particularly useful if you want to run a shaky test repeatedly.</p>
|
||||
<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/<variant></code> to the test descriptor, e.g. <code>gtest:Log/client</code>. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then <code>gtest:all</code> will be equivalent to <code>gtest:all/server</code>.</p>
|
||||
<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/<variant></code> to the test descriptor, e.g. <code>gtest:Log/client</code>. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then <code>gtest:all</code> will be equivalent to <code>gtest:all/server</code>.</p>
|
||||
<h2 id="test-results-and-summary">Test results and summary</h2>
|
||||
<p>At the end of the test run, a summary of all tests run will be presented. This will have a consistent look, regardless of what test suites were used. This is a sample summary:</p>
|
||||
<pre><code>==============================
|
||||
@@ -97,16 +97,16 @@ TEST FAILURE</code></pre>
|
||||
<p>Tests where the number of TOTAL tests does not equal the number of PASSed tests will be considered a test failure. These are marked with the <code>>> ... <<</code> marker for easy identification.</p>
|
||||
<p>The classification of non-passed tests differs a bit between test suites. In the summary, ERROR is used as a catch-all for tests that neither passed nor are classified as failed by the framework. This might indicate test framework error, timeout or other problems.</p>
|
||||
<p>In case of test failures, <code>make run-test</code> will exit with a non-zero exit value.</p>
|
||||
<p>All tests have their result stored in <code>build/$BUILD/test-results/$TEST_ID</code>, where TEST_ID is a path-safe conversion from the fully qualified test descriptor, e.g. for <code>jtreg:jdk/test:tier1</code> the TEST_ID is <code>jtreg_jdk_test_tier1</code>. This path is also printed in the log at the end of the test run.</p>
|
||||
<p>All tests have their result stored in <code>build/$BUILD/test-results/$TEST_ID</code>, where TEST_ID is a path-safe conversion from the fully qualified test descriptor, e.g. for <code>jtreg:jdk/test:tier1</code> the TEST_ID is <code>jtreg_jdk_test_tier1</code>. This path is also printed in the log at the end of the test run.</p>
|
||||
<p>Additional work data is stored in <code>build/$BUILD/test-support/$TEST_ID</code>. For some frameworks, this directory might contain information that is useful in determining the cause of a failed test.</p>
|
||||
<h2 id="test-suite-control">Test suite control</h2>
|
||||
<p>It is possible to control various aspects of the test suites using make control variables.</p>
|
||||
<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT=8"</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG="TMIEOUT=8"</code> would give an error, while <code>JTREG_TMIEOUT=8</code> would just pass unnoticed.</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
|
||||
<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
|
||||
<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don’t want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
|
||||
<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don't want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
|
||||
<p>There are also some keywords that applies globally to the test runner system, not to any specific test suites. These are also available as TEST_OPTS keywords.</p>
|
||||
<h4 id="jobs">JOBS</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
@@ -179,11 +179,11 @@ TEST FAILURE</code></pre>
|
||||
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
|
||||
<h4 id="macos">MacOS</h4>
|
||||
<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
|
||||
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect “Turn keyboard access on or off” option which is responsible for <code>CTRL + F1</code> combination.</p>
|
||||
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect "Turn keyboard access on or off" option which is responsible for <code>CTRL + F1</code> combination.</p>
|
||||
<h4 id="linux">Linux</h4>
|
||||
<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for “Turn off Windows key hotkeys” and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -36,7 +36,7 @@ DOCS_TARGETS :=
|
||||
# On Windows tar frequently complains that "file changed as we read it" for
|
||||
# some random source files. This seems to be cause by anti virus scanners and
|
||||
# is most likely safe to ignore. When it happens, tar returns '1'.
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
ifeq ($(call isBuildOs, windows), true)
|
||||
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
|
||||
endif
|
||||
|
||||
@@ -156,7 +156,7 @@ endef
|
||||
|
||||
# On Macosx, we bundle up the macosx specific images which already have the
|
||||
# correct base directories.
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
|
||||
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
|
||||
JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
|
||||
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
|
||||
@@ -208,7 +208,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
|
||||
# Create special filter rules when dealing with unzipped .dSYM directories on
|
||||
# macosx
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
|
||||
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
|
||||
@@ -288,16 +288,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
# Macosx release build and code signing available.
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -234,7 +234,7 @@ $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
|
||||
$(call install-file)
|
||||
$(CHMOD) -f ug+w $@
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
|
||||
@@ -51,21 +51,18 @@ java.base_EXCLUDES += java/lang/doc-files
|
||||
# data files and shouldn't go in the product
|
||||
java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call isTargetOs, solaris), false)
|
||||
java.base_EXCLUDE_FILES += \
|
||||
SolarisLoginModule.java \
|
||||
SolarisSystem.java \
|
||||
#
|
||||
endif
|
||||
|
||||
ifeq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), )
|
||||
#
|
||||
# only solaris, macosx and aix
|
||||
#
|
||||
ifeq ($(call isTargetOs, solaris macosx aix), false)
|
||||
java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
java.base_EXCLUDE_FILES += \
|
||||
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
|
||||
#
|
||||
@@ -124,7 +121,7 @@ java.desktop_EXCLUDE_FILES += \
|
||||
.template \
|
||||
#
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
# exclude all X11 on Mac.
|
||||
java.desktop_EXCLUDES += \
|
||||
sun/awt/X11 \
|
||||
@@ -186,7 +183,7 @@ else
|
||||
sun/awt/X11/XwcTextItem.java
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk
|
||||
endif
|
||||
|
||||
@@ -194,8 +191,7 @@ ifdef BUILD_HEADLESS_ONLY
|
||||
java.desktop_EXCLUDES += sun/applet
|
||||
endif
|
||||
|
||||
# Used on windows and macosx
|
||||
ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
|
||||
ifeq ($(call isTargetOs, windows macosx), false)
|
||||
java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
|
||||
endif
|
||||
|
||||
@@ -374,11 +370,11 @@ SCTP_IMPL_CLASSES = \
|
||||
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \
|
||||
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),aix)
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
|
||||
endif
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
|
||||
$(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR))
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
|
||||
|
||||
@@ -165,7 +165,7 @@ ifeq ($(MODULE), java.base)
|
||||
endif
|
||||
endif
|
||||
else # not java.base
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# Only java.base needs to include the MSVC*_DLLs. Make sure no other module
|
||||
# tries to include them (typically imported ones).
|
||||
ifneq ($(MSVCR_DLL), )
|
||||
@@ -173,6 +173,11 @@ else # not java.base
|
||||
JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
|
||||
endif
|
||||
endif
|
||||
ifneq ($(VCRUNTIME_1_DLL), )
|
||||
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(VCRUNTIME_1_DLL))), )
|
||||
JMOD_FLAGS += --exclude '$(notdir $(VCRUNTIME_1_DLL))'
|
||||
endif
|
||||
endif
|
||||
ifneq ($(MSVCP_DLL), )
|
||||
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
|
||||
JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
|
||||
|
||||
@@ -57,7 +57,7 @@ ifeq ($(EXTERNAL_BUILDJDK), true)
|
||||
INTERIM_IMAGE_DIR := $(BUILD_JDK)
|
||||
endif
|
||||
|
||||
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
|
||||
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
|
||||
$(call MakeDir, $(LINK_OPT_DIR))
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
|
||||
@@ -72,7 +72,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
|
||||
# dependencies, make will correctly rebuild both jli trace and classlist
|
||||
# incrementally using the single recipe above.
|
||||
$(CLASSLIST_FILE): $(JLI_TRACE_FILE)
|
||||
$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
|
||||
$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
|
||||
|
||||
TARGETS += $(CLASSLIST_FILE) $(JLI_TRACE_FILE)
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ ifneq ($(filter jdk, $(MAKECMDGOALS)), )
|
||||
)
|
||||
|
||||
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES))
|
||||
else
|
||||
DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES))
|
||||
@@ -296,7 +296,7 @@ ALL_JDK_MODULES := $(JDK_MODULES)
|
||||
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
|
||||
$(call FindTransitiveDepsForModule, $m)))
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
LIBS_TARGET_SUBDIR := bin
|
||||
else
|
||||
LIBS_TARGET_SUBDIR := lib
|
||||
@@ -316,7 +316,7 @@ else
|
||||
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
|
||||
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
|
||||
# dirs.
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
$(call FillFindCache, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
|
||||
FindDebuginfoFiles = \
|
||||
|
||||
@@ -226,6 +226,9 @@ else # HAS_SPEC=true
|
||||
# Parse COMPARE_BUILD (for makefile development)
|
||||
$(eval $(call ParseCompareBuild))
|
||||
|
||||
# Setup reproducible build environment
|
||||
$(eval $(call SetupReproducibleBuild))
|
||||
|
||||
# If no LOG= was given on command line, but we have a non-standard default
|
||||
# value, use that instead and re-parse log level.
|
||||
ifeq ($(LOG), )
|
||||
|
||||
@@ -303,6 +303,15 @@ else # $(HAS_SPEC)=true
|
||||
topdir=$(TOPDIR)
|
||||
endif
|
||||
|
||||
# Setup the build environment to match the requested specification on
|
||||
# level of reproducible builds
|
||||
define SetupReproducibleBuild
|
||||
ifeq ($$(SOURCE_DATE), updated)
|
||||
SOURCE_DATE := $$(shell $$(DATE) +"%s")
|
||||
endif
|
||||
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
|
||||
endef
|
||||
|
||||
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
||||
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
|
||||
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
|
||||
@@ -479,7 +488,7 @@ else # $(HAS_SPEC)=true
|
||||
$(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
|
||||
endef
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
ifeq ($(call isBuildOs, windows), true)
|
||||
# On windows we need to synchronize with the javac server to be able to
|
||||
# move or remove the build output directory. Since we have no proper
|
||||
# synchronization process, wait for a while and hope it helps. This is only
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@@ -32,7 +32,7 @@ include Modules.gmk
|
||||
################################################################################
|
||||
|
||||
# Use this file inside the image as target for make rule
|
||||
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
|
||||
JIMAGE_TARGET_FILE := bin/java$(EXECUTABLE_SUFFIX)
|
||||
|
||||
INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ include TextFileProcessing.gmk
|
||||
default: bundles
|
||||
|
||||
# Only macosx has bundles defined.
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
|
||||
bundles: jre-bundle jdk-bundle
|
||||
|
||||
@@ -38,11 +38,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
|
||||
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
|
||||
|
||||
BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
|
||||
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
|
||||
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
|
||||
BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
|
||||
BUNDLE_VERSION := $(VERSION_NUMBER)
|
||||
ifeq ($(COMPANY_NAME), N/A)
|
||||
BUNDLE_VENDOR := UNDEFINED
|
||||
else
|
||||
@@ -75,24 +72,26 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
|
||||
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
|
||||
REPLACEMENTS := \
|
||||
@@ID@@ => $(BUNDLE_ID).jdk ; \
|
||||
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
|
||||
@@NAME@@ => $(BUNDLE_NAME) ; \
|
||||
@@INFO@@ => $(BUNDLE_INFO) ; \
|
||||
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
|
||||
@@VERSION@@ => $(BUNDLE_VERSION) ; \
|
||||
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
|
||||
@@VERSION@@ => $(VERSION_NUMBER) ; \
|
||||
@@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
|
||||
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
|
||||
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
|
||||
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
|
||||
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
|
||||
REPLACEMENTS := \
|
||||
@@ID@@ => $(BUNDLE_ID).jre ; \
|
||||
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
|
||||
@@NAME@@ => $(BUNDLE_NAME) ; \
|
||||
@@INFO@@ => $(BUNDLE_INFO) ; \
|
||||
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
|
||||
@@VERSION@@ => $(BUNDLE_VERSION) ; \
|
||||
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
|
||||
@@VERSION@@ => $(VERSION_NUMBER) ; \
|
||||
@@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
|
||||
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
|
||||
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
|
||||
))
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
|
||||
|
||||
@@ -1123,7 +1123,7 @@ ifneq ($(CREATE_BUILDJDK), true)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
product-images: mac-jdk-bundle
|
||||
|
||||
legacy-images: mac-legacy-jre-bundle
|
||||
|
||||
@@ -42,7 +42,7 @@ TARGETS :=
|
||||
include $(MAKEFILE_PREFIX)-$(MODULE).gmk
|
||||
|
||||
# Setup copy rules from the modules directories to the jdk image directory.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
|
||||
|
||||
@@ -51,6 +51,7 @@ define create-info-file
|
||||
$(if $(VENDOR_VERSION_STRING), \
|
||||
$(call info-file-item, "IMPLEMENTOR_VERSION", "$(VENDOR_VERSION_STRING)"))
|
||||
$(call info-file-item, "JAVA_VERSION_DATE", "$(VERSION_DATE)")
|
||||
$(call info-file-item, "JAVA_RUNTIME_VERSION", "$(VERSION_STRING)")
|
||||
$(call info-file-item, "OS_NAME", "$(RELEASE_FILE_OS_NAME)")
|
||||
$(call info-file-item, "OS_ARCH", "$(RELEASE_FILE_OS_ARCH)")
|
||||
$(call info-file-item, "LIBC", "$(RELEASE_FILE_LIBC)")
|
||||
|
||||
@@ -60,18 +60,13 @@ define SetTestOpt
|
||||
endif
|
||||
endef
|
||||
|
||||
# Setup _NT_SYMBOL_PATH on Windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifndef _NT_SYMBOL_PATH
|
||||
# Can't use PathList here as it adds quotes around the value.
|
||||
_NT_SYMBOL_PATH := \
|
||||
$(subst $(SPACE),;,$(strip \
|
||||
$(foreach p, $(sort $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), \
|
||||
$(call FixPath, $p) \
|
||||
) \
|
||||
))
|
||||
export _NT_SYMBOL_PATH
|
||||
SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb))))))
|
||||
export _NT_SYMBOL_PATH := $(subst \\,\, $(call FixPath, \
|
||||
$(subst $(DQUOTE),, $(SYMBOL_PATH))))
|
||||
$(info _NT_SYMBOL_PATH=$(_NT_SYMBOL_PATH))
|
||||
endif
|
||||
endif
|
||||
@@ -205,7 +200,7 @@ TEST_JOBS_FACTOR_MACHINE ?= 1
|
||||
|
||||
ifeq ($(TEST_JOBS), 0)
|
||||
CORES_DIVIDER := 2
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||
ifeq ($(call isTargetCpuArch, sparc), true)
|
||||
# For smaller SPARC machines we see reasonable scaling of throughput up to
|
||||
# cpus/4 without affecting test reliability. On the bigger machines, cpus/4
|
||||
# causes intermittent timeouts.
|
||||
@@ -637,7 +632,7 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
|
||||
|
||||
# SPARC is in general slower per core so need to scale up timeouts a bit.
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||
ifeq ($(call isTargetCpuArch, sparc), true)
|
||||
JTREG_TIMEOUT_FACTOR ?= 8
|
||||
else
|
||||
JTREG_TIMEOUT_FACTOR ?= 4
|
||||
@@ -678,7 +673,7 @@ define SetupRunJtregTestBody
|
||||
$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)
|
||||
ifeq ($$(call isTargetOs, windows), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
|
||||
endif
|
||||
|
||||
|
||||
@@ -157,6 +157,10 @@ ifeq ($(UNAME_OS), CYGWIN)
|
||||
OPENJDK_TARGET_OS := windows
|
||||
OPENJDK_TARGET_OS_TYPE := windows
|
||||
OPENJDK_TARGET_OS_ENV := windows.cygwin
|
||||
else ifeq ($(UNAME_OS), MINGW64)
|
||||
OPENJDK_TARGET_OS := windows
|
||||
OPENJDK_TARGET_OS_TYPE := windows
|
||||
OPENJDK_TARGET_OS_ENV := windows.msys2
|
||||
else
|
||||
OPENJDK_TARGET_OS_TYPE:=unix
|
||||
ifeq ($(UNAME_OS), Linux)
|
||||
@@ -171,6 +175,9 @@ else
|
||||
OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS)
|
||||
endif
|
||||
|
||||
# Sanity check env detection
|
||||
$(info Detected target OS, type and env: [$(OPENJDK_TARGET_OS)] [$(OPENJDK_TARGET_OS_TYPE)] [$(OPENJDK_TARGET_OS_ENV)])
|
||||
|
||||
# Assume little endian unless otherwise specified
|
||||
OPENJDK_TARGET_CPU_ENDIAN := little
|
||||
|
||||
@@ -209,15 +216,9 @@ else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(wildcard $(TEST_IMAGE_DIR)/bin/fixpath.exe), )
|
||||
$(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)')
|
||||
$(error Cannot continue.)
|
||||
endif
|
||||
FIXPATH := $(TEST_IMAGE_DIR)/bin/fixpath.exe -c
|
||||
PATH_SEP:=;
|
||||
FIXPATH := $(BASH) $(TOPDIR)/make/scripts/fixpath.sh exec
|
||||
else
|
||||
FIXPATH :=
|
||||
PATH_SEP:=:
|
||||
endif
|
||||
|
||||
# Check number of cores and memory in MB
|
||||
@@ -301,7 +302,6 @@ $(call CreateNewSpec, $(NEW_SPEC), \
|
||||
BASH := $(BASH), \
|
||||
JIB_JAR := $(JIB_JAR), \
|
||||
FIXPATH := $(FIXPATH), \
|
||||
PATH_SEP := $(PATH_SEP), \
|
||||
OPENJDK_TARGET_OS := $(OPENJDK_TARGET_OS), \
|
||||
OPENJDK_TARGET_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE), \
|
||||
OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS_ENV), \
|
||||
|
||||
@@ -116,7 +116,6 @@ JAVAC_CMD := $(BOOT_JDK)/bin/javac
|
||||
JAR_CMD := $(BOOT_JDK)/bin/jar
|
||||
JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
|
||||
JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
|
||||
JARSIGNER_CMD := $(BOOT_JDK)/bin/jarsigner
|
||||
|
||||
JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||
@@ -125,7 +124,6 @@ JAVAC := $(FIXPATH) $(JAVAC_CMD)
|
||||
JAR := $(FIXPATH) $(JAR_CMD)
|
||||
JLINK := $(FIXPATH) $(JLINK_CMD)
|
||||
JMOD := $(FIXPATH) $(JMOD_CMD)
|
||||
JARSIGNER := $(FIXPATH) $(JARSIGNER_CMD)
|
||||
|
||||
BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
|
||||
################################################################################
|
||||
@@ -167,7 +165,6 @@ TAIL := tail
|
||||
TEE := tee
|
||||
TR := tr
|
||||
TOUCH := touch
|
||||
UNIQ := uniq
|
||||
WC := wc
|
||||
XARGS := xargs
|
||||
ZIPEXE := zip
|
||||
@@ -188,7 +185,7 @@ ifeq ($(OPENJDK_BUILD_OS), solaris)
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
CYGPATH := cygpath
|
||||
PATHTOOL := cygpath
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -30,13 +30,6 @@ include MakeBase.gmk
|
||||
|
||||
############################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
FIXPATH_COPY := $(TEST_IMAGE_DIR)/bin/fixpath.exe
|
||||
|
||||
$(FIXPATH_COPY): $(firstword $(FIXPATH))
|
||||
$(call install-file)
|
||||
endif
|
||||
|
||||
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
|
||||
|
||||
FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO))
|
||||
@@ -44,10 +37,10 @@ FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO))
|
||||
$(BUILD_INFO_PROPERTIES):
|
||||
$(call MakeTargetDir)
|
||||
$(ECHO) "# Build info properties for JDK tests" > $@
|
||||
$(FIXPATH_ECHO) "build.workspace.root=$(WORKSPACE_ROOT)" >> $@
|
||||
$(FIXPATH_ECHO) "build.output.root=$(OUTPUTDIR)" >> $@
|
||||
$(ECHO) 'build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))' >> $@
|
||||
$(ECHO) 'build.output.root=$(call FixPath, $(OUTPUTDIR))' >> $@
|
||||
|
||||
prepare-test-image: $(FIXPATH_COPY) $(BUILD_INFO_PROPERTIES)
|
||||
prepare-test-image: $(BUILD_INFO_PROPERTIES)
|
||||
$(call MakeDir, $(TEST_IMAGE_DIR))
|
||||
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
|
||||
#
|
||||
# Windows specific binary security packages.
|
||||
#
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# sec-windows-bin.zip is used by builds where the corresponding sources are not available
|
||||
$(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
|
||||
SRC := $(JDK_OUTPUTDIR), \
|
||||
@@ -80,7 +80,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
|
||||
|
||||
# JGSS files contain the native Kerberos library
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
ifeq ($(call isTargetCpu, x86_64), true)
|
||||
JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
|
||||
else
|
||||
JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, 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
|
||||
@@ -31,6 +31,7 @@ include JavaCompilation.gmk
|
||||
include Modules.gmk
|
||||
|
||||
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
|
||||
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, ZipSource.gmk))
|
||||
@@ -51,10 +52,10 @@ ALL_MODULES := $(FindAllModules)
|
||||
# again to create src.zip.
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \
|
||||
$(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \
|
||||
$(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$(patsubst $(SUPPORT_OUTPUTDIR)/%,%,$d))/$m) \
|
||||
$(if $(SRC_GENERATED), , \
|
||||
$(eval $$($d_TARGET): $d ; \
|
||||
$$(if $(filter $(TOPDIR)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \
|
||||
$$(if $(filter $(SRC_ZIP_BASE)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \
|
||||
) \
|
||||
) \
|
||||
$(eval SRC_ZIP_SRCS += $$($d_TARGET)) \
|
||||
|
||||
555
make/autoconf/basic.m4
Normal file
555
make/autoconf/basic.m4
Normal file
@@ -0,0 +1,555 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
m4_include([basic_tools.m4])
|
||||
m4_include([basic_windows.m4])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
# AUTOCONF might be set in the environment by the user. Preserve for "make reconfigure".
|
||||
AC_SUBST(AUTOCONF)
|
||||
# Save the path variable before it gets changed
|
||||
ORIGINAL_PATH="$PATH"
|
||||
AC_SUBST(ORIGINAL_PATH)
|
||||
DATE_WHEN_CONFIGURED=`date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check that there are no unprocessed overridden variables left.
|
||||
# If so, they are an incorrect argument and we will exit with an error.
|
||||
AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
|
||||
[
|
||||
if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
|
||||
# Replace the separating ! with spaces before presenting for end user.
|
||||
unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
|
||||
AC_MSG_WARN([The following variables might be unknown to configure: $unknown_variables])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Save the current directory this script was started from
|
||||
CONFIGURE_START_DIR="$PWD"
|
||||
|
||||
# We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
|
||||
# for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
|
||||
# was not available at that time.
|
||||
REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
|
||||
if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
|
||||
ORIGINAL_PATH="$REWRITTEN_PATH"
|
||||
AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_SETUP_PATHS_WINDOWS
|
||||
fi
|
||||
|
||||
# We get the top-level directory from the supporting wrappers.
|
||||
BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
|
||||
UTIL_FIXUP_PATH(TOPDIR)
|
||||
AC_MSG_CHECKING([for top-level directory])
|
||||
AC_MSG_RESULT([$TOPDIR])
|
||||
AC_SUBST(TOPDIR)
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
BASIC_WINDOWS_VERIFY_DIR($CUSTOM_ROOT, custom root)
|
||||
UTIL_FIXUP_PATH(CUSTOM_ROOT)
|
||||
WORKSPACE_ROOT="${CUSTOM_ROOT}"
|
||||
else
|
||||
WORKSPACE_ROOT="${TOPDIR}"
|
||||
fi
|
||||
AC_SUBST(WORKSPACE_ROOT)
|
||||
|
||||
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
|
||||
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
|
||||
UTIL_FIXUP_PATH(TOPDIR)
|
||||
|
||||
AC_SUBST(CONFIGURE_START_DIR)
|
||||
|
||||
# Locate the directory of this script.
|
||||
AUTOCONF_DIR=$TOPDIR/make/autoconf
|
||||
|
||||
# Setup username (for use in adhoc version strings etc)
|
||||
# Outer [ ] to quote m4.
|
||||
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
AC_SUBST(USERNAME)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Evaluates platform specific overrides for devkit variables.
|
||||
# $1: Name of variable
|
||||
AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Evaluates platform specific overrides for build devkit variables.
|
||||
# $1: Name of variable
|
||||
AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
eval $1="\${$1_${OPENJDK_BUILD_CPU}}"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
[
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this devkit for compilers, tools and resources])])
|
||||
|
||||
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
|
||||
UTIL_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])
|
||||
|
||||
# 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-vcruntime-1-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VCRUNTIME_1_DLL])
|
||||
# Corresponds to --with-msvcp-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||
# Corresponds to --with-ucrt-dll-dir
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_UCRT_DLL_DIR])
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
UTIL_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
||||
|
||||
# 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
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_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
|
||||
|
||||
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.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[alias for --with-sysroot for backwards compatability])],
|
||||
[SYSROOT=$with_sys_root]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
|
||||
[use this directory as sysroot])],
|
||||
[SYSROOT=$with_sysroot]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[alias for --with-toolchain-path for backwards compatibility])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_tools_dir)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
|
||||
[prepend these directories when searching for toolchain binaries (compilers etc)])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
|
||||
[set up toolchain on Mac OS using a path to an Xcode installation])])
|
||||
|
||||
if test "x$with_xcode_path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
|
||||
$with_xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$with_xcode_path/Contents/Developer/usr/bin)
|
||||
else
|
||||
AC_MSG_WARN([Option --with-xcode-path is only valid on Mac OS, ignoring.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],
|
||||
[prepend these directories to the default path])],
|
||||
[UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# If a devkit has been supplied, find xcodebuild in the toolchain_path.
|
||||
# If not, detect if Xcode is installed by running xcodebuild -version
|
||||
# if no Xcode installed, xcodebuild exits with 1
|
||||
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
|
||||
if test "x$DEVKIT_ROOT" != x || test "x$TOOLCHAIN_PATH" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
# We need to use xcodebuild in the toolchain dir provided by the user
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
|
||||
if test x$XCODEBUILD = x; then
|
||||
# fall back on the stub binary in /usr/bin/xcodebuild
|
||||
XCODEBUILD=/usr/bin/xcodebuild
|
||||
fi
|
||||
else
|
||||
# this should result in SYSROOT being empty, unless --with-sysroot is provided
|
||||
# when only the command line tools are installed there are no SDKs, so headers
|
||||
# are copied into the system frameworks
|
||||
XCODEBUILD=
|
||||
AC_SUBST(XCODEBUILD)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for sdk name])
|
||||
AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
|
||||
[use the platform SDK of the given name. @<:@macosx@:>@])],
|
||||
[SDKNAME=$with_sdk_name]
|
||||
)
|
||||
AC_MSG_RESULT([$SDKNAME])
|
||||
|
||||
# if toolchain path is specified then don't rely on system headers, they may not compile
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=0
|
||||
test -z "$TOOLCHAIN_PATH" && \
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
|
||||
|
||||
if test -z "$SYSROOT"; then
|
||||
if test -n "$XCODEBUILD"; then
|
||||
# if we don't have system headers, use default SDK name (last resort)
|
||||
if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
SDKNAME=${SDKNAME:-macosx}
|
||||
fi
|
||||
|
||||
if test -n "$SDKNAME"; then
|
||||
# Call xcodebuild to determine SYSROOT
|
||||
SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
|
||||
fi
|
||||
else
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
AC_MSG_ERROR([No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# warn user if --with-sdk-name was also set
|
||||
if test -n "$with_sdk_name"; then
|
||||
AC_MSG_WARN([Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
|
||||
# If no system framework headers, then SYSROOT must be set, or we won't build
|
||||
AC_MSG_ERROR([Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments.])
|
||||
fi
|
||||
|
||||
# Perform a basic sanity test
|
||||
if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
if test -z "$SYSROOT"; then
|
||||
AC_MSG_ERROR([Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly])
|
||||
else
|
||||
AC_MSG_ERROR([Invalid SDK or SYSROOT path, dependent framework headers not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# set SDKROOT too, Xcode tools will pick it up
|
||||
SDKROOT="$SYSROOT"
|
||||
AC_SUBST(SDKROOT)
|
||||
fi
|
||||
|
||||
# Prepend the extra path to the global path
|
||||
UTIL_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
|
||||
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_MSG_RESULT([$SYSROOT])
|
||||
AC_MSG_CHECKING([for toolchain path])
|
||||
AC_MSG_RESULT([$TOOLCHAIN_PATH])
|
||||
AC_SUBST(TOOLCHAIN_PATH)
|
||||
AC_MSG_CHECKING([for extra path])
|
||||
AC_MSG_RESULT([$EXTRA_PATH])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
AC_MSG_CHECKING([where to store configuration])
|
||||
if test "x$CONFIGURE_START_DIR" = "x$TOPDIR" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
AC_MSG_RESULT([in default location])
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
|
||||
else
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
|
||||
OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUTDIR"
|
||||
if test ! -d "$OUTPUTDIR"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
|
||||
fi
|
||||
else
|
||||
# We are running configure from outside of the src dir.
|
||||
# Then use the current directory as output dir!
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
|
||||
fi
|
||||
OUTPUTDIR="$CONFIGURE_START_DIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
|
||||
# WARNING: This might be a bad thing to do. You need to be sure you want to
|
||||
# have a configuration in this directory. Do some sanity checks!
|
||||
|
||||
if test ! -e "$OUTPUTDIR/spec.gmk"; then
|
||||
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
|
||||
# other files
|
||||
files_present=`$LS $OUTPUTDIR`
|
||||
# Configure has already touched config.log and confdefs.h in the current dir when this check
|
||||
# is performed.
|
||||
filtered_files=`$ECHO "$files_present" \
|
||||
| $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
|
||||
AC_MSG_NOTICE([Current directory is $CONFIGURE_START_DIR.])
|
||||
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
||||
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
|
||||
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
|
||||
AC_MSG_NOTICE([seriously mess up just about everything.])
|
||||
AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
|
||||
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
|
||||
AC_MSG_ERROR([Will not continue creating configuration in $CONFIGURE_START_DIR])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
|
||||
BASIC_WINDOWS_VERIFY_DIR($OUTPUTDIR, output)
|
||||
UTIL_FIXUP_PATH(OUTPUTDIR)
|
||||
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
|
||||
SPEC="$OUTPUTDIR/spec.gmk"
|
||||
AC_SUBST(SPEC)
|
||||
AC_SUBST(CONF_NAME)
|
||||
AC_SUBST(OUTPUTDIR)
|
||||
AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
|
||||
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
|
||||
# The bootcycle-spec.gmk file contains support for boot cycle builds.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
|
||||
# The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in])
|
||||
# The compare.sh is used to compare the build output to other builds.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# The generated Makefile knows where the spec.gmk is and where the source is.
|
||||
# You can run make from the OUTPUTDIR, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if build directory is on local disk. If not possible to determine,
|
||||
# we prefer to claim it's local.
|
||||
# Argument 1: directory to test
|
||||
# Argument 2: what to do if it is on local disk
|
||||
# Argument 3: what to do otherwise (remote disk or failure)
|
||||
AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if test "x$DF" = x; then
|
||||
# No df here, say it's local
|
||||
$2
|
||||
else
|
||||
# JDK-8189619
|
||||
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
|
||||
# is the same. On older AIXes we just continue to live with a "not local build" warning.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DF_LOCAL_ONLY_OPTION='-T local'
|
||||
else
|
||||
DF_LOCAL_ONLY_OPTION='-l'
|
||||
fi
|
||||
if $DF $DF_LOCAL_ONLY_OPTION $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
# In WSL, local Windows drives are considered remote by df, but we are
|
||||
# required to build into a directory accessible from windows, so consider
|
||||
# them local here.
|
||||
$3
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check that source files have basic read permissions set. This might
|
||||
# not be the case in cygwin in certain conditions.
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
file_to_test="$TOPDIR/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
[
|
||||
AC_MSG_CHECKING([if build directory is on local disk])
|
||||
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUTDIR,
|
||||
[OUTPUT_DIR_IS_LOCAL="yes"],
|
||||
[OUTPUT_DIR_IS_LOCAL="no"])
|
||||
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
|
||||
|
||||
BASIC_CHECK_SRC_PERMS
|
||||
|
||||
# Check if the user has any old-style ALT_ variables set.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUTDIR/spec.gmk; then
|
||||
IS_RECONFIGURE=yes
|
||||
else
|
||||
IS_RECONFIGURE=no
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Default make target
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
|
||||
[
|
||||
AC_ARG_WITH(default-make-target, [AS_HELP_STRING([--with-default-make-target],
|
||||
[set the default make target @<:@exploded-image@:>@])])
|
||||
if test "x$with_default_make_target" = "x" \
|
||||
|| test "x$with_default_make_target" = "xyes"; then
|
||||
DEFAULT_MAKE_TARGET="exploded-image"
|
||||
elif test "x$with_default_make_target" = "xno"; then
|
||||
AC_MSG_ERROR([--without-default-make-target is not a valid option])
|
||||
else
|
||||
DEFAULT_MAKE_TARGET="$with_default_make_target"
|
||||
fi
|
||||
|
||||
AC_SUBST(DEFAULT_MAKE_TARGET)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup the default value for LOG=
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
|
||||
[
|
||||
AC_ARG_WITH(log, [AS_HELP_STRING([--with-log],
|
||||
[[default vaue for make LOG argument [warn]]])])
|
||||
AC_MSG_CHECKING([for default LOG value])
|
||||
if test "x$with_log" = x; then
|
||||
DEFAULT_LOG=""
|
||||
else
|
||||
# Syntax for valid LOG options is a bit too complex for it to be worth
|
||||
# implementing a test for correctness in configure. Just accept it.
|
||||
DEFAULT_LOG=$with_log
|
||||
fi
|
||||
AC_MSG_RESULT([$DEFAULT_LOG])
|
||||
AC_SUBST(DEFAULT_LOG)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Code to run after AC_OUTPUT
|
||||
AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
|
||||
[
|
||||
# Try to move config.log (generated by autoconf) to the configure-support directory.
|
||||
if test -e ./config.log; then
|
||||
$MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Rotate our log file (configure.log)
|
||||
if test -e "$OUTPUTDIR/configure.log.old"; then
|
||||
$RM -f "$OUTPUTDIR/configure.log.old"
|
||||
fi
|
||||
if test -e "$OUTPUTDIR/configure.log"; then
|
||||
$MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Move configure.log from current directory to the build output root
|
||||
if test -e ./configure.log; then
|
||||
$MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUTDIR/compare.sh
|
||||
])
|
||||
453
make/autoconf/basic_tools.m4
Normal file
453
make/autoconf/basic_tools.m4
Normal file
@@ -0,0 +1,453 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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 the most fundamental tools, used for setting up build platform and
|
||||
# path handling.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
# Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
|
||||
AC_PATH_PROGS(BASENAME, basename)
|
||||
UTIL_CHECK_NONEMPTY(BASENAME)
|
||||
AC_PATH_PROGS(DIRNAME, dirname)
|
||||
UTIL_CHECK_NONEMPTY(DIRNAME)
|
||||
AC_PATH_PROGS(FILE, file)
|
||||
UTIL_CHECK_NONEMPTY(FILE)
|
||||
AC_PATH_PROGS(LDD, ldd)
|
||||
|
||||
# Required tools
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
|
||||
# Required tools with some special treatment
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Tools only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup further tools that should be resolved early but after setting up
|
||||
# build platform and path handling.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
[
|
||||
# Required tools
|
||||
UTIL_REQUIRE_PROGS(BASH, bash)
|
||||
UTIL_REQUIRE_PROGS(CAT, cat)
|
||||
UTIL_REQUIRE_PROGS(CHMOD, chmod)
|
||||
UTIL_REQUIRE_PROGS(CP, cp)
|
||||
UTIL_REQUIRE_PROGS(CUT, cut)
|
||||
UTIL_REQUIRE_PROGS(DATE, date)
|
||||
UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
|
||||
UTIL_REQUIRE_PROGS(EXPR, expr)
|
||||
UTIL_REQUIRE_PROGS(FIND, find)
|
||||
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
|
||||
UTIL_REQUIRE_PROGS(GZIP, pigz gzip)
|
||||
UTIL_REQUIRE_PROGS(HEAD, head)
|
||||
UTIL_REQUIRE_PROGS(LN, ln)
|
||||
UTIL_REQUIRE_PROGS(LS, ls)
|
||||
# gmkdir is known to be safe for concurrent invocations with -p flag.
|
||||
UTIL_REQUIRE_PROGS(MKDIR, gmkdir mkdir)
|
||||
UTIL_REQUIRE_PROGS(MKTEMP, mktemp)
|
||||
UTIL_REQUIRE_PROGS(MV, mv)
|
||||
UTIL_REQUIRE_PROGS(NAWK, nawk gawk awk)
|
||||
UTIL_REQUIRE_PROGS(PRINTF, printf)
|
||||
UTIL_REQUIRE_PROGS(RM, rm)
|
||||
UTIL_REQUIRE_PROGS(RMDIR, rmdir)
|
||||
UTIL_REQUIRE_PROGS(SH, sh)
|
||||
UTIL_REQUIRE_PROGS(SORT, sort)
|
||||
UTIL_REQUIRE_PROGS(TAIL, tail)
|
||||
UTIL_REQUIRE_PROGS(TAR, gtar tar)
|
||||
UTIL_REQUIRE_PROGS(TEE, tee)
|
||||
UTIL_REQUIRE_PROGS(TOUCH, touch)
|
||||
UTIL_REQUIRE_PROGS(WHICH, which)
|
||||
UTIL_REQUIRE_PROGS(XARGS, xargs)
|
||||
|
||||
# Required tools with some special treatment
|
||||
UTIL_REQUIRE_SPECIAL(AWK, [AC_PROG_AWK])
|
||||
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
|
||||
|
||||
# Optional tools, we can do without them
|
||||
UTIL_LOOKUP_PROGS(DF, df)
|
||||
UTIL_LOOKUP_PROGS(NICE, nice)
|
||||
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
|
||||
|
||||
# Tools only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
|
||||
|
||||
# For compare.sh only
|
||||
UTIL_LOOKUP_PROGS(CMP, cmp)
|
||||
UTIL_LOOKUP_PROGS(UNIQ, uniq)
|
||||
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if we have found a usable version of make
|
||||
# $1: the path to a potential make binary (or empty)
|
||||
# $2: the description on how we found this
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
[
|
||||
MAKE_CANDIDATE="$1"
|
||||
DESCRIPTION="$2"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[[12]] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
|
||||
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
|
||||
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_EXPECTED_ENV='cygwin'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
|
||||
MAKE_EXPECTED_ENV='msys'
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment])
|
||||
fi
|
||||
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
|
||||
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
|
||||
else
|
||||
# Not relevant for non-Windows
|
||||
IS_MAKE_CORRECT_ENV=true
|
||||
fi
|
||||
if test "x$IS_MAKE_CORRECT_ENV" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
|
||||
else
|
||||
FOUND_MAKE=$MAKE_CANDIDATE
|
||||
UTIL_FIXUP_EXECUTABLE(FOUND_MAKE)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
|
||||
[
|
||||
# Check if make supports the output sync option and if so, setup using it.
|
||||
UTIL_ARG_WITH(NAME: output-sync, TYPE: literal,
|
||||
VALID_VALUES: [none recurse line target], DEFAULT: none,
|
||||
OPTIONAL: true, ENABLED_DEFAULT: true,
|
||||
ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED,
|
||||
CHECKING_MSG: [for make --output-sync value],
|
||||
DESC: [set make --output-sync type if supported by make],
|
||||
CHECK_AVAILABLE:
|
||||
[
|
||||
AC_MSG_CHECKING([if make --output-sync is supported])
|
||||
if ! $MAKE --version -O > /dev/null 2>&1; then
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
]
|
||||
)
|
||||
AC_SUBST(OUTPUT_SYNC_SUPPORTED)
|
||||
AC_SUBST(OUTPUT_SYNC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Goes looking for a usable version of GNU make.
|
||||
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
[
|
||||
UTIL_SETUP_TOOL(MAKE,
|
||||
[
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
UTIL_LOOKUP_PROGS(CHECK_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
UTIL_LOOKUP_PROGS(CHECK_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
# We have a toolchain path, check that as well before giving up.
|
||||
OLD_PATH=$PATH
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
|
||||
fi
|
||||
PATH=$OLD_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
],[
|
||||
# If MAKE was set by user, verify the version
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
|
||||
fi
|
||||
])
|
||||
|
||||
MAKE=$FOUND_MAKE
|
||||
AC_SUBST(MAKE)
|
||||
AC_MSG_NOTICE([Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
|
||||
|
||||
BASIC_CHECK_MAKE_OUTPUT_SYNC
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
[
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
|
||||
DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
|
||||
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
|
||||
|
||||
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
$RM $DELETEDIR/TestIfFindSupportsDelete
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
# AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
|
||||
FIND_DELETE="-print | $XARGS $RM"
|
||||
else
|
||||
FIND_DELETE="-exec $RM \{\} \+"
|
||||
fi
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
$RMDIR $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_TAR],
|
||||
[
|
||||
# Test which kind of tar was found
|
||||
if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
|
||||
TAR_TYPE="gnu"
|
||||
elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$($TAR --version | $GREP "busybox")" != "x"; then
|
||||
TAR_TYPE="busybox"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
TAR_TYPE="solaris"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xaix"; then
|
||||
TAR_TYPE="aix"
|
||||
fi
|
||||
AC_MSG_CHECKING([what type of tar was found])
|
||||
AC_MSG_RESULT([$TAR_TYPE])
|
||||
|
||||
TAR_CREATE_FILE_PARAM=""
|
||||
|
||||
if test "x$TAR_TYPE" = "xgnu"; then
|
||||
TAR_INCLUDE_PARAM="T"
|
||||
TAR_SUPPORTS_TRANSFORM="true"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
# When using gnu tar for Solaris targets, need to use compatibility mode
|
||||
TAR_CREATE_EXTRA_PARAM="--format=ustar"
|
||||
fi
|
||||
elif test "x$TAR_TYPE" = "aix"; then
|
||||
# -L InputList of aix tar: name of file listing the files and directories
|
||||
# that need to be archived or extracted
|
||||
TAR_INCLUDE_PARAM="L"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
elif test "x$TAR_TYPE" = "xbusybox"; then
|
||||
TAR_INCLUDE_PARAM="T"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
else
|
||||
TAR_INCLUDE_PARAM="I"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
fi
|
||||
AC_SUBST(TAR_TYPE)
|
||||
AC_SUBST(TAR_CREATE_EXTRA_PARAM)
|
||||
AC_SUBST(TAR_INCLUDE_PARAM)
|
||||
AC_SUBST(TAR_SUPPORTS_TRANSFORM)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_GREP],
|
||||
[
|
||||
# Test that grep supports -Fx with a list of pattern which includes null pattern.
|
||||
# This is a problem for the grep resident on AIX.
|
||||
AC_MSG_CHECKING([that grep ($GREP) -Fx handles empty lines in the pattern list correctly])
|
||||
# Multiple subsequent spaces..
|
||||
STACK_SPACES='aaa bbb ccc'
|
||||
# ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
|
||||
# patterns in it.
|
||||
STACK_LIST=${STACK_SPACES// /$'\n'}
|
||||
NEEDLE_SPACES='ccc bbb aaa'
|
||||
NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
|
||||
RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
|
||||
if test "x$RESULT" == "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
|
||||
fi
|
||||
AC_MSG_ERROR([grep does not handle -Fx correctly. ${ADDINFO}])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
[
|
||||
BASIC_CHECK_GNU_MAKE
|
||||
|
||||
BASIC_CHECK_FIND_DELETE
|
||||
BASIC_CHECK_TAR
|
||||
BASIC_CHECK_GREP
|
||||
BASIC_SETUP_PANDOC
|
||||
|
||||
# These tools might not be installed by default,
|
||||
# need hint on how to install them.
|
||||
UTIL_REQUIRE_PROGS(UNZIP, unzip)
|
||||
# Since zip uses "ZIP" as a environment variable for passing options, we need
|
||||
# to name our variable differently, hence ZIPEXE.
|
||||
UTIL_REQUIRE_PROGS(ZIPEXE, zip)
|
||||
|
||||
# Non-required basic tools
|
||||
|
||||
UTIL_LOOKUP_PROGS(READELF, greadelf readelf)
|
||||
UTIL_LOOKUP_PROGS(DOT, dot)
|
||||
UTIL_LOOKUP_PROGS(HG, hg)
|
||||
UTIL_LOOKUP_PROGS(GIT, git)
|
||||
UTIL_LOOKUP_PROGS(STAT, stat)
|
||||
UTIL_LOOKUP_PROGS(TIME, time)
|
||||
UTIL_LOOKUP_PROGS(FLOCK, flock)
|
||||
# Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
|
||||
# be in the user path.
|
||||
UTIL_LOOKUP_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
|
||||
UTIL_LOOKUP_PROGS(PATCH, gpatch patch)
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
IS_GNU_TIME=no
|
||||
fi
|
||||
AC_SUBST(IS_GNU_TIME)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
UTIL_REQUIRE_PROGS(DSYMUTIL, dsymutil)
|
||||
UTIL_REQUIRE_PROGS(MIG, mig)
|
||||
UTIL_REQUIRE_PROGS(XATTR, xattr)
|
||||
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
UTIL_REQUIRE_PROGS(ELFEDIT, elfedit)
|
||||
fi
|
||||
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
UTIL_REQUIRE_PROGS(ULIMIT, ulimit)
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check for support for specific options in bash
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
|
||||
[
|
||||
# Check bash version
|
||||
# Extra [ ] to stop m4 mangling
|
||||
[ BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` ]
|
||||
AC_MSG_CHECKING([bash version])
|
||||
AC_MSG_RESULT([$BASH_VER])
|
||||
|
||||
BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
|
||||
BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
|
||||
if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
|
||||
AC_MSG_ERROR([bash version 3.2 or better is required])
|
||||
fi
|
||||
|
||||
# Test if bash supports pipefail.
|
||||
AC_MSG_CHECKING([if bash supports pipefail])
|
||||
if ${BASH} -c 'set -o pipefail'; then
|
||||
BASH_ARGS="$BASH_ARGS -o pipefail"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if bash supports errexit (-e)])
|
||||
if ${BASH} -e -c 'true'; then
|
||||
BASH_ARGS="$BASH_ARGS -e"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(BASH_ARGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup Pandoc
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
[
|
||||
UTIL_LOOKUP_PROGS(PANDOC, pandoc)
|
||||
PANDOC_MARKDOWN_FLAG="markdown"
|
||||
if test -n "$PANDOC"; then
|
||||
AC_MSG_CHECKING(if the pandoc smart extension needs to be disabled for markdown)
|
||||
if $PANDOC --list-extensions | $GREP -q '\+smart'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
if test -n "$PANDOC"; then
|
||||
ENABLE_PANDOC="true"
|
||||
else
|
||||
ENABLE_PANDOC="false"
|
||||
fi
|
||||
AC_SUBST(ENABLE_PANDOC)
|
||||
AC_SUBST(PANDOC_MARKDOWN_FLAG)
|
||||
])
|
||||
187
make/autoconf/basic_windows.m4
Normal file
187
make/autoconf/basic_windows.m4
Normal file
@@ -0,0 +1,187 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
|
||||
# Must be done prior to calling any commands to avoid mangling of command line
|
||||
export MSYS2_ARG_CONV_EXCL="*"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([Windows environment type])
|
||||
WINENV_VENDOR=${OPENJDK_BUILD_OS_ENV#windows.}
|
||||
AC_MSG_RESULT([$WINENV_VENDOR])
|
||||
|
||||
if test "x$WINENV_VENDOR" = x; then
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys2 was detected.])
|
||||
fi
|
||||
|
||||
if test "x$PATHTOOL" = x; then
|
||||
AC_MSG_ERROR([Incorrect $WINENV_VENDOR installation. cygpath was found])
|
||||
fi
|
||||
|
||||
if test "x$CMD" = x; then
|
||||
AC_MSG_ERROR([Incorrect Windows/$WINENV_VENDOR setup. Could not locate cmd.exe])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([$WINENV_VENDOR drive prefix])
|
||||
WINENV_PREFIX=`$PATHTOOL -u c:/ | $SED -e 's!/c/!!'`
|
||||
AC_MSG_RESULT(['$WINENV_PREFIX'])
|
||||
AC_SUBST(WINENV_PREFIX)
|
||||
|
||||
AC_MSG_CHECKING([$WINENV_VENDOR root directory as Windows path])
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1"; then
|
||||
WINENV_ROOT=`$PATHTOOL -w / 2> /dev/null`
|
||||
# msys2 has a trailing backslash; strip it
|
||||
WINENV_ROOT=${WINENV_ROOT%\\}
|
||||
else
|
||||
WINENV_ROOT='[[unavailable]]'
|
||||
fi
|
||||
AC_MSG_RESULT(['$WINENV_ROOT'])
|
||||
AC_SUBST(WINENV_ROOT)
|
||||
|
||||
AC_MSG_CHECKING([$WINENV_VENDOR temp directory])
|
||||
WINENV_TEMP_DIR=$($PATHTOOL -u $($CMD /q /c echo %TEMP% 2> /dev/null) | $TR -d '\r\n')
|
||||
AC_MSG_RESULT([$WINENV_TEMP_DIR])
|
||||
|
||||
AC_MSG_CHECKING([$WINENV_VENDOR release])
|
||||
WINENV_UNAME_RELEASE=`$UNAME -r`
|
||||
AC_MSG_RESULT([$WINENV_UNAME_RELEASE])
|
||||
|
||||
AC_MSG_CHECKING([$WINENV_VENDOR version])
|
||||
WINENV_UNAME_VERSION=`$UNAME -v`
|
||||
AC_MSG_RESULT([$WINENV_UNAME_VERSION])
|
||||
|
||||
WINENV_VERSION="$WINENV_UNAME_RELEASE, $WINENV_UNAME_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([Windows version])
|
||||
|
||||
# We must change directory to one guaranteed to work, otherwise WSL1
|
||||
# can complain (since it does not have a WINENV_ROOT so it can't access
|
||||
# unix-style paths from Windows.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ WINDOWS_VERSION=`cd $WINENV_TEMP_DIR && $CMD /c ver | $EGREP -o '([0-9]+\.)+[0-9]+'` ]
|
||||
AC_MSG_RESULT([$WINDOWS_VERSION])
|
||||
|
||||
# Additional handling per specific env
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ CYGWIN_VERSION_OLD=`$ECHO $WINENV_UNAME_RELEASE | $GREP -e '^1\.[0-6]'` ]
|
||||
if test "x$CYGWIN_VERSION_OLD" != x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if test "x$LDD" = x; then
|
||||
AC_MSG_ERROR([ldd is missing, which is needed on cygwin])
|
||||
fi
|
||||
WINENV_MARKER_DLL=cygwin1.dll
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
|
||||
if test "x$LDD" = x; then
|
||||
AC_MSG_ERROR([ldd is missing, which is needed on msys2])
|
||||
fi
|
||||
WINENV_MARKER_DLL=msys-2.0.dll
|
||||
fi
|
||||
|
||||
# Chicken and egg: FIXPATH is needed for UTIL_FIXUP_PATH to work. So for the
|
||||
# first run we use the auto-detect abilities of fixpath.sh.
|
||||
FIXPATH_DIR="$TOPDIR/make/scripts"
|
||||
FIXPATH="$BASH $FIXPATH_DIR/fixpath.sh exec"
|
||||
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh"
|
||||
FIXPATH_SAVED_PATH="$PATH"
|
||||
UTIL_FIXUP_PATH(FIXPATH_DIR)
|
||||
|
||||
# Now we can use FIXPATH_DIR to rewrite path to fixpath.sh properly.
|
||||
if test "x$WINENV_PREFIX" = x; then
|
||||
# On msys the prefix is empty, but we need to pass something to have the
|
||||
# fixpath.sh options parser happy.
|
||||
WINENV_PREFIX_ARG="NONE"
|
||||
else
|
||||
WINENV_PREFIX_ARG="$WINENV_PREFIX"
|
||||
fi
|
||||
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
|
||||
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
|
||||
FIXPATH="$FIXPATH_BASE exec"
|
||||
|
||||
AC_SUBST(FIXPATH_BASE)
|
||||
AC_SUBST(FIXPATH)
|
||||
|
||||
SRC_ROOT_LENGTH=`$ECHO "$TOPDIR" | $WC -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
# Test if windows or unix "find" is first in path.
|
||||
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
|
||||
FIND_BINARY_OUTPUT=`find --version 2>&1`
|
||||
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
|
||||
AC_MSG_RESULT([unix style])
|
||||
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix tools.])
|
||||
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
])
|
||||
|
||||
# Verify that the directory is usable on Windows
|
||||
AC_DEFUN([BASIC_WINDOWS_VERIFY_DIR],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then
|
||||
OUTPUTDIR_WIN=`$FIXPATH_BASE print $1`
|
||||
if test "x$OUTPUTDIR_WIN" = x; then
|
||||
AC_MSG_NOTICE([For wsl1, the $2 dir must be located on a Windows drive. Please see doc/building.md for details.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Create fixpath wrapper
|
||||
AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
FIXPATH_CMDLINE=". $TOPDIR/make/scripts/fixpath.sh -e $PATHTOOL \
|
||||
-p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR \
|
||||
-c $CMD -q"
|
||||
$ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
|
||||
$ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
|
||||
$ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
|
||||
$CHMOD +x $OUTPUTDIR/fixpath
|
||||
FIXPATH_BASE="$OUTPUTDIR/fixpath"
|
||||
FIXPATH="$FIXPATH_BASE exec"
|
||||
fi
|
||||
])
|
||||
|
||||
# Platform-specific finalization
|
||||
AC_DEFUN([BASIC_WINDOWS_FINALIZE],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Change back from temp dir
|
||||
cd $CONFIGURE_START_DIR
|
||||
fi
|
||||
])
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,451 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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.
|
||||
#
|
||||
|
||||
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
|
||||
[
|
||||
windows_path="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
unix_path=`$CYGPATH -u "$windows_path"`
|
||||
$1="$unix_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
|
||||
$1="$unix_path"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
|
||||
[
|
||||
unix_path="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
windows_path=`$CYGPATH -m "$unix_path"`
|
||||
$1="$windows_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
windows_path=`cmd //c echo $unix_path`
|
||||
$1="$windows_path"
|
||||
fi
|
||||
])
|
||||
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
|
||||
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
|
||||
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
|
||||
# Going to short mode and back again did indeed matter. Since short mode is
|
||||
# case insensitive, let's make it lowercase to improve readability.
|
||||
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Now convert it back to Unix-style (cygpath)
|
||||
input_path=`$CYGPATH -u "$shortmode_path"`
|
||||
new_path="$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
# As a simple fix, exclude /usr/bin since it's not a real path.
|
||||
if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
|
||||
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
|
||||
# a path prefixed by /cygdrive for fixpath to work.
|
||||
new_path="$CYGWIN_ROOT_PATH$input_path"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
])
|
||||
|
||||
# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
|
||||
# and could probably be heavily simplified. However, all changes in this
|
||||
# area tend to need lot of testing in different scenarios, and in lack of
|
||||
# proper unit testing, cleaning this up has not been deemed worth the effort
|
||||
# at the moment.
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
[
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
path="[$]$1"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
[
|
||||
path="[$]$1"
|
||||
has_colon=`$ECHO $path | $GREP ^.:`
|
||||
new_path="$path"
|
||||
if test "x$has_colon" = x; then
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
|
||||
fi
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not always considered executable in cygwin causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
fi
|
||||
if test "x$new_path" = x; then
|
||||
# Oops. Which didn't find the executable.
|
||||
# The splitting of arguments from the executable at a space might have been incorrect,
|
||||
# since paths with space are more likely in Windows. Give it another try with the whole
|
||||
# argument.
|
||||
path="$complete"
|
||||
arguments="EOL"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not always considered executable in cygwin causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
fi
|
||||
if test "x$new_path" = x; then
|
||||
# It's still not found. Now this is an unrecoverable error.
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
# Short path failed, file does not exist as specified.
|
||||
# Try adding .exe or .cmd
|
||||
if test -f "${new_path}.exe"; then
|
||||
input_to_shortpath="${new_path}.exe"
|
||||
elif test -f "${new_path}.cmd"; then
|
||||
input_to_shortpath="${new_path}.cmd"
|
||||
else
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
|
||||
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
else
|
||||
input_to_shortpath="$new_path"
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
new_path="$input_to_shortpath"
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
|
||||
# remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# Oops. Which didn't find the executable.
|
||||
# The splitting of arguments from the executable at a space might have been incorrect,
|
||||
# since paths with space are more likely in Windows. Give it another try with the whole
|
||||
# argument.
|
||||
path="$complete"
|
||||
arguments="EOL"
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not always considered executable in MSYS causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
fi
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# It's still not found. Now this is an unrecoverable error.
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now new_path has a complete unix path to the binary
|
||||
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
|
||||
# Keep paths in /bin as-is, but remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
# Do not save /bin paths to all_fixpath_prefixes!
|
||||
else
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $new_path`
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
# Output is in $new_path
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
# remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
|
||||
fi
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
[
|
||||
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
AC_MSG_CHECKING([cygwin release])
|
||||
CYGWIN_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_VERSION])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.[0-6]'`
|
||||
if test "x$CYGWIN_VERSION_OLD" != x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
AC_MSG_CHECKING([cygwin root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF)
|
||||
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
|
||||
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
|
||||
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
|
||||
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
|
||||
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([msys root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
|
||||
AC_MSG_RESULT([$MSYS_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.])
|
||||
fi
|
||||
|
||||
# Test if windows or unix (cygwin/msys) find is first in path.
|
||||
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
|
||||
FIND_BINARY_OUTPUT=`find --version 2>&1`
|
||||
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
|
||||
AC_MSG_RESULT([unix style])
|
||||
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
|
||||
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
[
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
|
||||
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" != "xaarch64"; then
|
||||
AC_MSG_CHECKING([if fixpath can be created])
|
||||
|
||||
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
|
||||
FIXPATH_SRC_W="$FIXPATH_SRC"
|
||||
FIXPATH_BIN_W="$FIXPATH_BIN"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
|
||||
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
|
||||
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
|
||||
cd $FIXPATH_DIR
|
||||
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
|
||||
if test ! -x $FIXPATH_BIN; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $FIXPATH_BIN])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
else # OPENJDK_TARGET_CPU is aarch64
|
||||
AC_MSG_CHECKING([if fixpath is in place])
|
||||
|
||||
FIXPATH_BIN="$TOPDIR/fixpath.exe"
|
||||
$RM -rf $FIXPATH_DIR
|
||||
$MKDIR -p $FIXPATH_DIR
|
||||
|
||||
if test ! -x $FIXPATH_BIN; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find fixpath.exe under $TOPDIR])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
|
||||
FIXPATH="$FIXPATH_BIN -c"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
|
||||
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
|
||||
# @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
|
||||
| tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
|
||||
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
|
||||
FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
cd $FIXPATH_DIR
|
||||
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
|
||||
> $FIXPATH_DIR/fixpath2.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
FIXPATH_DETACH_FLAG="--detach"
|
||||
fi
|
||||
|
||||
AC_SUBST(FIXPATH)
|
||||
AC_SUBST(FIXPATH_DETACH_FLAG)
|
||||
])
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, 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,18 +63,23 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
# If previous step claimed to have found a JDK, check it to see if it seems to be valid.
|
||||
if test "x$BOOT_JDK_FOUND" = xmaybe; then
|
||||
# Do we have a bin/java?
|
||||
if test ! -x "$BOOT_JDK/bin/java"; then
|
||||
if test ! -x "$BOOT_JDK/bin/java" && test ! -x "$BOOT_JDK/bin/java.exe"; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# Do we have a bin/javac?
|
||||
if test ! -x "$BOOT_JDK/bin/javac"; then
|
||||
if test ! -x "$BOOT_JDK/bin/javac" && test ! -x "$BOOT_JDK/bin/javac.exe"; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
|
||||
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
|
||||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $HEAD -n 1`
|
||||
java_to_test="$BOOT_JDK/bin/java"
|
||||
UTIL_FIXUP_EXECUTABLE(java_to_test)
|
||||
BOOT_JDK_VERSION_OUTPUT=`$java_to_test $USER_BOOT_JDK_OPTIONS -version 2>&1`
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ BOOT_JDK_VERSION=`echo $BOOT_JDK_VERSION_OUTPUT | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
|
||||
|
||||
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
|
||||
AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
|
||||
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
|
||||
@@ -90,18 +95,25 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
|
||||
| $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
|
||||
if test "x$FOUND_CORRECT_VERSION" = x; then
|
||||
|
||||
if test "x$BOOT_JDK_VERSION" = x; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is not a working JDK; ignoring])
|
||||
AC_MSG_NOTICE([Output from java -version was: $BOOT_JDK_VERSION_OUTPUT])
|
||||
BOOT_JDK_FOUND=no
|
||||
elif 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 version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
BOOT_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BOOT_JDK)
|
||||
UTIL_FIXUP_PATH(BOOT_JDK)
|
||||
AC_MSG_CHECKING([for Boot JDK])
|
||||
AC_MSG_RESULT([$BOOT_JDK])
|
||||
AC_MSG_CHECKING([Boot JDK version])
|
||||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR '\n\r' ' '`
|
||||
BOOT_JDK_VERSION=`$java_to_test $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR -d '\r'`
|
||||
# This is not a no-op; it will portably convert newline to space
|
||||
BOOT_JDK_VERSION=`$ECHO $BOOT_JDK_VERSION`
|
||||
AC_MSG_RESULT([$BOOT_JDK_VERSION])
|
||||
fi # end check jdk version
|
||||
fi # end check javac
|
||||
@@ -114,16 +126,18 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
|
||||
[
|
||||
if test "x$with_boot_jdk" != x; then
|
||||
if test -d "$with_boot_jdk"; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_ARG="$with_boot_jdk"
|
||||
UTIL_FIXUP_PATH(BOOT_JDK_ARG)
|
||||
if test -d "$BOOT_JDK_ARG"; then
|
||||
BOOT_JDK=$BOOT_JDK_ARG
|
||||
BOOT_JDK_FOUND=maybe
|
||||
elif test -f "$with_boot_jdk"; then
|
||||
case "$with_boot_jdk" in
|
||||
elif test -f "$BOOT_JDK_ARG"; then
|
||||
case "$BOOT_JDK_ARG" 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
|
||||
$GUNZIP -c $BOOT_JDK_ARG | $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"`
|
||||
@@ -150,8 +164,8 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
[
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
JAVA_HOME_PROCESSED="$JAVA_HOME"
|
||||
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
if test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
UTIL_FIXUP_PATH(JAVA_HOME_PROCESSED, NOFAIL)
|
||||
if test "x$JAVA_HOME_PROCESSED" = x || test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
else
|
||||
# Aha, the user has set a JAVA_HOME
|
||||
@@ -166,8 +180,8 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
|
||||
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
[
|
||||
AC_PATH_PROG(JAVAC_CHECK, javac)
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac, , NOFIXPATH)
|
||||
UTIL_LOOKUP_PROGS(JAVA_CHECK, java, , NOFIXPATH)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
@@ -177,7 +191,7 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
UTIL_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname "$BINARY"`
|
||||
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
@@ -206,9 +220,9 @@ AC_DEFUN([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR],
|
||||
# First check at user selected default
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME()])
|
||||
# If that did not work out (e.g. too old), try explicit versions instead
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.9])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.8])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.7])])
|
||||
for ver in $DEFAULT_ACCEPTABLE_BOOT_VERSIONS ; do
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v $ver])])
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -241,8 +255,10 @@ AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
|
||||
[
|
||||
if test "x[$]$1" != x; then
|
||||
VIRTUAL_DIR="[$]$1/Java"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
|
||||
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
|
||||
UTIL_FIXUP_PATH(VIRTUAL_DIR, NOFAIL)
|
||||
if test "x$VIRTUAL_DIR" != x; then
|
||||
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -269,16 +285,17 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
|
||||
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
[
|
||||
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
|
||||
BASIC_SETUP_TOOL($1,
|
||||
UTIL_REQUIRE_SPECIAL($1,
|
||||
[
|
||||
AC_MSG_CHECKING([for $2 in Boot JDK])
|
||||
AC_MSG_CHECKING([for $2 [[Boot JDK]]])
|
||||
$1=$BOOT_JDK/bin/$2
|
||||
if test ! -x [$]$1; then
|
||||
if test ! -x [$]$1 && test ! -x [$]$1.exe; then
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk])
|
||||
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
|
||||
fi
|
||||
AC_MSG_RESULT(ok)
|
||||
AC_MSG_RESULT(\[$]BOOT_JDK/bin/$2)
|
||||
UTIL_FIXUP_EXECUTABLE($1)
|
||||
AC_SUBST($1)
|
||||
])
|
||||
])
|
||||
@@ -312,12 +329,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
|
||||
fi
|
||||
|
||||
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
|
||||
|
||||
# Test: Is $JAVA_HOME set?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
|
||||
|
||||
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
|
||||
|
||||
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
|
||||
|
||||
@@ -339,7 +356,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner)
|
||||
|
||||
# Finally, set some other options...
|
||||
|
||||
@@ -351,7 +367,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
BOOT_JDK_BITS="64"
|
||||
else
|
||||
BOOT_JDK_BITS="32"
|
||||
@@ -362,11 +378,11 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
# Try to enable CDS
|
||||
AC_MSG_CHECKING([for local Boot JDK Class Data Sharing (CDS)])
|
||||
BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
|
||||
if test "x$boot_jdk_cds_args" != x; then
|
||||
# Try creating a CDS archive
|
||||
"$JAVA" $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
|
||||
$JAVA $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
|
||||
if test $? -eq 0; then
|
||||
BOOTJDK_USE_LOCAL_CDS=true
|
||||
AC_MSG_RESULT([yes, created])
|
||||
@@ -391,18 +407,18 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||
|
||||
# Force en-US environment
|
||||
ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
|
||||
# Use our own CDS archive
|
||||
ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
# Otherwise optimistically use the system-wide one, if one is present
|
||||
ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
|
||||
# Finally append user provided options to allow them to override.
|
||||
ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||
|
||||
@@ -413,7 +429,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
|
||||
|
||||
# Starting amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
|
||||
|
||||
# Maximum amount of heap memory and stack size.
|
||||
@@ -441,8 +457,8 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
STACK_SIZE=$STACK_SIZE_64
|
||||
JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
|
||||
|
||||
@@ -469,10 +485,10 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
||||
|
||||
# Use serial gc for small short lived tools if possible
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_small])
|
||||
|
||||
@@ -531,7 +547,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
|
||||
else
|
||||
# We're done!
|
||||
BUILD_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BUILD_JDK)
|
||||
UTIL_FIXUP_PATH(BUILD_JDK)
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([$BUILD_JDK])
|
||||
AC_MSG_CHECKING([Build JDK version])
|
||||
@@ -578,8 +594,12 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
|
||||
fi
|
||||
fi
|
||||
|
||||
# Since these tools do not yet exist, we cannot use UTIL_FIXUP_EXECUTABLE to
|
||||
# detect the need of fixpath
|
||||
JMOD="$BUILD_JDK/bin/jmod"
|
||||
UTIL_ADD_FIXPATH(JMOD)
|
||||
JLINK="$BUILD_JDK/bin/jlink"
|
||||
UTIL_ADD_FIXPATH(JLINK)
|
||||
AC_SUBST(JMOD)
|
||||
AC_SUBST(JLINK)
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(
|
||||
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
|
||||
endif
|
||||
|
||||
|
||||
# Override specific values to do a boot cycle build
|
||||
|
||||
# Use a different Boot JDK
|
||||
@@ -50,11 +49,10 @@ OLD_OUTPUTDIR:=@OUTPUTDIR@
|
||||
OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build
|
||||
SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_DIR))
|
||||
|
||||
JAVA_CMD:=$(BOOT_JDK)/bin/java
|
||||
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
|
||||
JAR_CMD:=$(BOOT_JDK)/bin/jar
|
||||
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
|
||||
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
|
||||
JAVA_CMD := $(FIXPATH) $(BOOT_JDK)/bin/java
|
||||
JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
|
||||
JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar
|
||||
SJAVAC_SERVER_JAVA_CMD := $(JAVA_CMD)
|
||||
# When building a 32bit target, make sure the sjavac server flags are compatible
|
||||
# with a 32bit JVM.
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
|
||||
|
||||
65
make/autoconf/build-aux/config.guess
vendored
65
make/autoconf/build-aux/config.guess
vendored
@@ -29,7 +29,40 @@
|
||||
# and fix the broken property, if needed.
|
||||
|
||||
DIR=`dirname $0`
|
||||
OUT=`. $DIR/autoconf-config.guess`
|
||||
OUT=`. $DIR/autoconf-config.guess 2> /dev/null`
|
||||
|
||||
# Handle some cases that autoconf-config.guess is not capable of
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
# Test and fix little endian MIPS.
|
||||
if [ `uname -m` = mipsel ]; then
|
||||
OUT=mipsel-unknown-linux-gnu
|
||||
elif [ `uname -m` = mips64el ]; then
|
||||
OUT=mips64el-unknown-linux-gnu
|
||||
# Test and fix little endian PowerPC64.
|
||||
elif [ `uname -m` = ppc64le ]; then
|
||||
OUT=powerpc64le-unknown-linux-gnu
|
||||
# Test and fix LoongArch64.
|
||||
elif [ `uname -m` = loongarch64 ]; then
|
||||
OUT=loongarch64-unknown-linux-gnu
|
||||
# Test and fix RISC-V.
|
||||
elif [ `uname -m` = riscv64 ]; then
|
||||
OUT=riscv64-unknown-linux-gnu
|
||||
fi
|
||||
# Test and fix cygwin machine arch .x86_64
|
||||
elif [[ `uname -s` = CYGWIN* ]]; then
|
||||
if [ `uname -m` = ".x86_64" ]; then
|
||||
OUT=x86_64-unknown-cygwin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$OUT" = x ]; then
|
||||
# Run autoconf-config.guess again to get the error message.
|
||||
. $DIR/autoconf-config.guess > /dev/null
|
||||
else
|
||||
printf "guessed by custom config.guess... " >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix solaris on x86_64
|
||||
echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
|
||||
@@ -88,36 +121,6 @@ if test $? = 0; then
|
||||
OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
# Test and fix little endian PowerPC64.
|
||||
# TODO: should be handled by autoconf-config.guess.
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -m` = ppc64le ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
OUT=powerpc64le-unknown-linux-gnu
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix little endian MIPS.
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
if [ `uname -m` = mipsel ]; then
|
||||
OUT=mipsel-unknown-linux-gnu
|
||||
elif [ `uname -m` = mips64el ]; then
|
||||
OUT=mips64el-unknown-linux-gnu
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix LoongArch64.
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
if [ `uname -m` = loongarch64 ]; then
|
||||
OUT=loongarch64-unknown-linux-gnu
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
|
||||
echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
|
||||
10
make/autoconf/build-aux/config.sub
vendored
10
make/autoconf/build-aux/config.sub
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -34,6 +34,12 @@ if echo $* | grep linux-musl >/dev/null ; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Allow msys2
|
||||
if echo $* | grep pc-msys >/dev/null ; then
|
||||
echo $*
|
||||
exit
|
||||
fi
|
||||
|
||||
# First, filter out everything that doesn't begin with "aarch64-"
|
||||
if ! echo $* | grep '^aarch64-' >/dev/null ; then
|
||||
. $DIR/autoconf-config.sub "$@"
|
||||
@@ -43,7 +49,7 @@ if ! echo $* | grep '^aarch64-' >/dev/null ; then
|
||||
fi
|
||||
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
case $1 in
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
aarch64-* )
|
||||
|
||||
@@ -180,7 +180,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
BASIC_REQUIRE_PROGS(CCACHE, ccache)
|
||||
UTIL_LOOKUP_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
|
||||
CCACHE_STATUS="Active ($CCACHE_VERSION)"
|
||||
@@ -288,12 +288,12 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
[enable distribted compilation of native code using icecc/icecream @<:@disabled@:>@])])
|
||||
|
||||
if test "x${enable_icecc}" = "xyes"; then
|
||||
BASIC_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
UTIL_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
old_path="$PATH"
|
||||
|
||||
# Look for icecc-create-env in some known places
|
||||
PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
|
||||
BASIC_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
|
||||
UTIL_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
|
||||
# Use icecc-create-env to create a minimal compilation environment that can
|
||||
# be sent to the other hosts in the icecream cluster.
|
||||
icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
|
||||
@@ -308,7 +308,7 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
# For clang, the icecc compilerwrapper is needed. It usually resides next
|
||||
# to icecc-create-env.
|
||||
BASIC_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
|
||||
UTIL_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
|
||||
BPERF_RUN_ICECC_CREATE_ENV([--clang ${CC} ${ICECC_WRAPPER}], ${icecc_create_env_log})
|
||||
else
|
||||
AC_MSG_ERROR([Can only create icecc compiler packages for toolchain types gcc and clang])
|
||||
@@ -442,7 +442,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
if test "$MX_VALUE" -lt "512"; then
|
||||
MX_VALUE=512
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
|
||||
@@ -42,7 +42,7 @@ export CMP="@CMP@"
|
||||
export CP="@CP@"
|
||||
export CUT="@CUT@"
|
||||
export DIFF="@DIFF@"
|
||||
export DUMPBIN="@FIXPATH@ @DUMPBIN@"
|
||||
export DUMPBIN="@DUMPBIN@"
|
||||
export EXPR="@EXPR@"
|
||||
export FILE="@FILE@"
|
||||
export FIND="@FIND@"
|
||||
@@ -84,7 +84,7 @@ else
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
export PATH="@VS_PATH@"
|
||||
export PATH="$PATH:@TOOLCHAIN_PATH@"
|
||||
fi
|
||||
|
||||
# Now locate the main script and run it.
|
||||
|
||||
@@ -37,9 +37,9 @@ AC_CONFIG_AUX_DIR([$TOPDIR/make/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
||||
# Include these first...
|
||||
m4_include([basics.m4])
|
||||
m4_include([basics_windows.m4])
|
||||
m4_include([util.m4])
|
||||
# ... then the rest
|
||||
m4_include([basic.m4])
|
||||
m4_include([boot-jdk.m4])
|
||||
m4_include([build-performance.m4])
|
||||
m4_include([flags.m4])
|
||||
@@ -51,7 +51,6 @@ m4_include([libraries.m4])
|
||||
m4_include([platform.m4])
|
||||
m4_include([source-dirs.m4])
|
||||
m4_include([toolchain.m4])
|
||||
m4_include([toolchain_windows.m4])
|
||||
|
||||
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
|
||||
@@ -86,6 +85,7 @@ PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
|
||||
# Continue setting up basic stuff. Most remaining code require fundamental tools.
|
||||
BASIC_SETUP_PATHS
|
||||
BASIC_SETUP_TOOLS
|
||||
|
||||
# Check if it's a pure open build or if custom sources are to be used.
|
||||
JDKOPT_SETUP_OPEN_OR_CUSTOM
|
||||
@@ -107,6 +107,8 @@ BASIC_SETUP_DEVKIT
|
||||
# To properly create a configuration name, we need to have the OpenJDK target
|
||||
# and options (variants and debug level) parsed.
|
||||
BASIC_SETUP_OUTPUT_DIR
|
||||
# After we have the output dir we can finalize the fixpath wrapper
|
||||
BASIC_WINDOWS_FINALIZE_FIXPATH
|
||||
|
||||
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
|
||||
HELP_SETUP_DEPENDENCY_HELP
|
||||
@@ -194,7 +196,8 @@ FLAGS_POST_TOOLCHAIN
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools
|
||||
# Configure flags for the tools. Need to know if we should build reproducible.
|
||||
JDKOPT_SETUP_REPRODUCIBLE_BUILD
|
||||
FLAGS_SETUP_FLAGS
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
@@ -216,9 +219,6 @@ HOTSPOT_ENABLE_DISABLE_GTEST
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
|
||||
BASIC_COMPILE_FIXPATH
|
||||
|
||||
LIB_DETERMINE_DEPENDENCIES
|
||||
LIB_SETUP_LIBRARIES
|
||||
|
||||
@@ -237,6 +237,8 @@ JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
JDKOPT_ENABLE_DISABLE_MANPAGES
|
||||
JDKOPT_SETUP_REPRODUCIBLE_BUILD
|
||||
JDKOPT_SETUP_MACOSX_SIGNING
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -288,6 +290,7 @@ BASIC_CHECK_LEFTOVER_OVERRIDDEN
|
||||
CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
|
||||
|
||||
# Create the actual output files. Now the main work of configure is done.
|
||||
BASIC_WINDOWS_FINALIZE
|
||||
AC_OUTPUT
|
||||
|
||||
# After AC_OUTPUT, we need to do final work
|
||||
|
||||
@@ -164,6 +164,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
case "${TOOLCHAIN_TYPE}" in
|
||||
microsoft)
|
||||
DISABLE_WARNING_PREFIX="-wd"
|
||||
BUILD_CC_DISABLE_WARNING_PREFIX="-wd"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
;;
|
||||
solstudio)
|
||||
@@ -172,8 +173,8 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
;;
|
||||
gcc)
|
||||
DISABLE_WARNING_PREFIX="-Wno-"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
|
||||
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
|
||||
;;
|
||||
clang)
|
||||
DISABLE_WARNING_PREFIX="-Wno-"
|
||||
@@ -812,6 +813,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
|
||||
# Enabling deterministic creates warnings if __DATE__ or __TIME__ are
|
||||
# used, and since we are, silence that warning.
|
||||
REPRODUCIBLE_CFLAGS="-experimental:deterministic -wd5048"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${REPRODUCIBLE_CFLAGS}],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
REPRODUCIBLE_CFLAGS=
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
# Prevent the __FILE__ macro from generating absolute paths into the built
|
||||
# binaries. Depending on toolchain, different mitigations are possible.
|
||||
# * GCC and Clang of new enough versions have -fmacro-prefix-map.
|
||||
@@ -830,6 +843,27 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft &&
|
||||
test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
|
||||
# There is a known issue with the pathmap if the mapping is made to the
|
||||
# empty string. Add a minimal string "s" as prefix to work around this.
|
||||
# PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4.
|
||||
PATHMAP_FLAGS="-pathmap:${WORKSPACE_ROOT}=s"
|
||||
FILE_MACRO_CFLAGS="$PATHMAP_FLAGS"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
PATHMAP_FLAGS=
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([how to prevent absolute paths in output])
|
||||
if test "x$FILE_MACRO_CFLAGS" != x; then
|
||||
AC_MSG_RESULT([using compiler options])
|
||||
else
|
||||
AC_MSG_RESULT([using relative paths])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(FILE_MACRO_CFLAGS)
|
||||
@@ -838,12 +872,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
|
||||
$TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \
|
||||
$OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
|
||||
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS"
|
||||
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS \
|
||||
$REPRODUCIBLE_CFLAGS"
|
||||
|
||||
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 \
|
||||
$FILE_MACRO_CFLAGS"
|
||||
$FILE_MACRO_CFLAGS $REPRODUCIBLE_CFLAGS"
|
||||
|
||||
# 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
|
||||
|
||||
@@ -147,9 +147,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_REPRODUCIBLE_BUILD" = "xtrue"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"
|
||||
# PATHMAP_FLAGS is setup in flags-cflags.m4.
|
||||
FILE_MACRO_LDFLAGS="${PATHMAP_FLAGS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -201,7 +209,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
|
||||
|
||||
# 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"
|
||||
$1_LDFLAGS_JDK_LIBPATH="-libpath:\$(SUPPORT_OUTPUTDIR)/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}"
|
||||
@@ -211,13 +219,15 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
|
||||
LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
|
||||
$OS_LDFLAGS $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
|
||||
$2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
|
||||
${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
|
||||
${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS \
|
||||
$REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
|
||||
$2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
|
||||
${$1_CPU_EXECUTABLE_LDFLAGS}"
|
||||
${$1_CPU_EXECUTABLE_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
|
||||
|
||||
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \
|
||||
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
|
||||
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
|
||||
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS} \
|
||||
$REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
|
||||
|
||||
AC_SUBST($2LDFLAGS_JDKLIB)
|
||||
AC_SUBST($2LDFLAGS_JDKEXE)
|
||||
|
||||
@@ -238,6 +238,14 @@ AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
|
||||
fi
|
||||
fi
|
||||
|
||||
# For the microsoft toolchain, we need to get the SYSROOT flags from the
|
||||
# Visual Studio environment. Currently we cannot handle this as a separate
|
||||
# build toolchain.
|
||||
if test "x$1" = x && test "x$OPENJDK_BUILD_OS" = "xwindows" \
|
||||
&& test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
fi
|
||||
|
||||
AC_SUBST($1SYSROOT_CFLAGS)
|
||||
AC_SUBST($1SYSROOT_LDFLAGS)
|
||||
])
|
||||
@@ -246,6 +254,7 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
|
||||
[
|
||||
# We should always include user supplied flags
|
||||
FLAGS_SETUP_USER_SUPPLIED_FLAGS
|
||||
|
||||
# The sysroot flags are needed for configure to be able to run the compilers
|
||||
FLAGS_SETUP_SYSROOT_FLAGS
|
||||
|
||||
@@ -280,10 +289,6 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
|
||||
GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
|
||||
# FIXME: Don't really know how to do with this, but this was the old behavior
|
||||
GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
|
||||
AC_SUBST(GLOBAL_CFLAGS)
|
||||
AC_SUBST(GLOBAL_CXXFLAGS)
|
||||
AC_SUBST(GLOBAL_LDFLAGS)
|
||||
AC_SUBST(GLOBAL_CPPFLAGS)
|
||||
|
||||
# FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
|
||||
EXTRA_CFLAGS="$MACHINE_FLAG $USER_CFLAGS"
|
||||
@@ -302,6 +307,14 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
|
||||
CXXFLAGS="$GLOBAL_CXXFLAGS"
|
||||
LDFLAGS="$GLOBAL_LDFLAGS"
|
||||
CPPFLAGS="$GLOBAL_CPPFLAGS"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# When autoconf sends both compiler and linker flags to cl.exe at the same
|
||||
# time, linker flags must be last at the command line. Achieve this by
|
||||
# moving them to LIBS.
|
||||
LIBS="$LIBS -link $LDFLAGS"
|
||||
LDFLAGS=""
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
||||
@@ -399,9 +412,6 @@ AC_DEFUN_ONCE([FLAGS_POST_TOOLCHAIN],
|
||||
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(BUILD_SYSROOT_CFLAGS)
|
||||
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_FLAGS],
|
||||
@@ -431,7 +441,7 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the C compiler supports an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
|
||||
[
|
||||
AC_MSG_CHECKING([if ARG_PREFIX[CC] supports "ARG_ARGUMENT"])
|
||||
@@ -462,7 +472,7 @@ BASIC_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the C++ compiler supports an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
|
||||
[
|
||||
AC_MSG_CHECKING([if ARG_PREFIX[CXX] supports "ARG_ARGUMENT"])
|
||||
@@ -493,17 +503,17 @@ BASIC_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the C and C++ compilers support an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
|
||||
[
|
||||
FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
|
||||
FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT,
|
||||
IF_TRUE: [C_COMP_SUPPORTS="yes"],
|
||||
IF_FALSE: [C_COMP_SUPPORTS="no"],
|
||||
PREFIX: [ARG_PREFIX])
|
||||
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
|
||||
PREFIX: ARG_PREFIX)
|
||||
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT,
|
||||
IF_TRUE: [CXX_COMP_SUPPORTS="yes"],
|
||||
IF_FALSE: [CXX_COMP_SUPPORTS="no"],
|
||||
PREFIX: [ARG_PREFIX])
|
||||
PREFIX: ARG_PREFIX)
|
||||
|
||||
AC_MSG_CHECKING([if both ARG_PREFIX[CC] and ARG_PREFIX[CXX] support "ARG_ARGUMENT"])
|
||||
supports=no
|
||||
@@ -525,7 +535,7 @@ BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the linker support an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_LINKER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_LINKER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE], [$@],
|
||||
[
|
||||
AC_MSG_CHECKING([if linker supports "ARG_ARGUMENT"])
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
|
||||
[
|
||||
AC_CHECK_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd apk)
|
||||
UTIL_LOOKUP_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd pacman apk)
|
||||
])
|
||||
|
||||
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
@@ -36,8 +36,6 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
cygwin_help $MISSING_DEPENDENCY
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
msys_help $MISSING_DEPENDENCY
|
||||
else
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
@@ -54,6 +52,8 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
pacman)
|
||||
pacman_help $MISSING_DEPENDENCY ;;
|
||||
apk)
|
||||
apk_help $MISSING_DEPENDENCY ;;
|
||||
esac
|
||||
@@ -81,10 +81,6 @@ cygwin_help() {
|
||||
esac
|
||||
}
|
||||
|
||||
msys_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
apt_help() {
|
||||
case $1 in
|
||||
reduced)
|
||||
@@ -148,6 +144,17 @@ brew_help() {
|
||||
esac
|
||||
}
|
||||
|
||||
pacman_help() {
|
||||
case $1 in
|
||||
unzip)
|
||||
PKGHANDLER_COMMAND="sudo pacman -S unzip" ;;
|
||||
zip)
|
||||
PKGHANDLER_COMMAND="sudo pacman -S zip" ;;
|
||||
make)
|
||||
PKGHANDLER_COMMAND="sudo pacman -S make" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
port_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
@@ -256,12 +263,13 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
printf "* Environment: %s version %s; windows version %s; prefix \"%s\"; root \"%s\"\n" \
|
||||
"$WINENV_VENDOR" "$WINENV_VERSION" "$WINDOWS_VERSION" "$WINENV_PREFIX" "$WINENV_ROOT"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\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"
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, 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
|
||||
@@ -110,7 +110,8 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
AC_MSG_RESULT([$JVM_VARIANTS])
|
||||
|
||||
# Check that the selected variants are valid
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_VARIANTS, $JVM_VARIANTS, $VALID_JVM_VARIANTS)
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_VARIANTS, $JVM_VARIANTS, \
|
||||
$VALID_JVM_VARIANTS)
|
||||
if test "x$INVALID_VARIANTS" != x; then
|
||||
AC_MSG_NOTICE([Unknown variant(s) specified: "$INVALID_VARIANTS"])
|
||||
AC_MSG_NOTICE([The available JVM variants are: "$VALID_JVM_VARIANTS"])
|
||||
@@ -119,9 +120,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
|
||||
# All "special" variants share the same output directory ("server")
|
||||
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, $VALID_MULTIPLE_JVM_VARIANTS)
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
|
||||
AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.])
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
|
||||
$VALID_MULTIPLE_JVM_VARIANTS)
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
|
||||
test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
|
||||
AC_MSG_ERROR([You can only build multiple variants using these variants: '$VALID_MULTIPLE_JVM_VARIANTS'])
|
||||
fi
|
||||
|
||||
# The "main" variant is the one used by other libs to link against during the
|
||||
@@ -162,8 +165,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_DTRACE],
|
||||
|
||||
DTRACE_DEP_MISSING=false
|
||||
|
||||
AC_MSG_CHECKING([for dtrace tool])
|
||||
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_CHECKING([for dtrace tool and platform support])
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xppc"; then
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU_ARCH])
|
||||
DTRACE_DEP_MISSING=true
|
||||
elif test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_RESULT([$DTRACE])
|
||||
else
|
||||
AC_MSG_RESULT([not found, cannot build dtrace])
|
||||
@@ -291,7 +297,7 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
[
|
||||
# Prettify the VALID_JVM_FEATURES string
|
||||
BASIC_SORT_LIST(VALID_JVM_FEATURES, $VALID_JVM_FEATURES)
|
||||
UTIL_SORT_LIST(VALID_JVM_FEATURES, $VALID_JVM_FEATURES)
|
||||
|
||||
# The user can in some cases supply additional jvm features. For the custom
|
||||
# variant, this defines the entire variant.
|
||||
@@ -307,7 +313,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
DISABLED_JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'`
|
||||
|
||||
# Verify that the user has provided valid features
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $VALID_JVM_FEATURES $DEPRECATED_JVM_FEATURES)
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $VALID_JVM_FEATURES $DEPRECATED_JVM_FEATURES)
|
||||
if test "x$INVALID_FEATURES" != x; then
|
||||
AC_MSG_NOTICE([Unknown JVM features specified: "$INVALID_FEATURES"])
|
||||
AC_MSG_NOTICE([The available JVM features are: "$VALID_JVM_FEATURES"])
|
||||
@@ -315,12 +321,12 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
fi
|
||||
|
||||
# Check if the user has provided deprecated features
|
||||
BASIC_GET_MATCHING_VALUES(DEPRECATED_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $DEPRECATED_JVM_FEATURES)
|
||||
UTIL_GET_MATCHING_VALUES(DEPRECATED_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $DEPRECATED_JVM_FEATURES)
|
||||
if test "x$DEPRECATED_FEATURES" != x; then
|
||||
AC_MSG_WARN([Deprecated JVM features specified (will be ignored): "$DEPRECATED_FEATURES"])
|
||||
# Filter out deprecated features
|
||||
BASIC_GET_NON_MATCHING_VALUES(JVM_FEATURES, $JVM_FEATURES, $DEPRECATED_FEATURES)
|
||||
BASIC_GET_NON_MATCHING_VALUES(DISABLED_JVM_FEATURES, $DISABLED_JVM_FEATURES, $DEPRECATED_FEATURES)
|
||||
UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES, $JVM_FEATURES, $DEPRECATED_FEATURES)
|
||||
UTIL_GET_NON_MATCHING_VALUES(DISABLED_JVM_FEATURES, $DISABLED_JVM_FEATURES, $DEPRECATED_FEATURES)
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -554,7 +560,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
AC_SUBST(VALID_JVM_FEATURES)
|
||||
|
||||
# We don't support --with-jvm-interpreter anymore, use zero instead.
|
||||
BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)
|
||||
UTIL_DEPRECATED_ARG_WITH(jvm-interpreter)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -568,10 +574,10 @@ AC_DEFUN_ONCE([HOTSPOT_FINALIZE_JVM_FEATURES],
|
||||
JVM_FEATURES_FOR_VARIANT=${!features_var_name}
|
||||
|
||||
# Filter out user-requested disabled features
|
||||
BASIC_GET_NON_MATCHING_VALUES(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT, $DISABLED_JVM_FEATURES)
|
||||
UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT, $DISABLED_JVM_FEATURES)
|
||||
|
||||
# Keep feature lists sorted and free of duplicates
|
||||
BASIC_SORT_LIST(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT)
|
||||
UTIL_SORT_LIST(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT)
|
||||
|
||||
# Update real feature set variable
|
||||
eval $features_var_name='"'$JVM_FEATURES_FOR_VARIANT'"'
|
||||
@@ -584,7 +590,7 @@ AC_DEFUN_ONCE([HOTSPOT_FINALIZE_JVM_FEATURES],
|
||||
fi
|
||||
|
||||
# Validate features (for configure script errors, not user errors)
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES_FOR_VARIANT, $VALID_JVM_FEATURES)
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES_FOR_VARIANT, $VALID_JVM_FEATURES)
|
||||
if test "x$INVALID_FEATURES" != x; then
|
||||
AC_MSG_ERROR([Internal configure script error. Invalid JVM feature(s): $INVALID_FEATURES])
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, 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
|
||||
@@ -129,7 +129,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
|
||||
|
||||
# custom-make-dir is deprecated. Please use your custom-hook.m4 to override
|
||||
# the IncludeCustomExtension macro.
|
||||
BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
|
||||
UTIL_DEPRECATED_ARG_WITH(custom-make-dir)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
@@ -346,12 +346,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
|
||||
# --enable-debug-symbols is deprecated.
|
||||
# Please use --with-native-debug-symbols=[internal,external,zipped] .
|
||||
BASIC_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols,
|
||||
UTIL_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols,
|
||||
[Please use --with-native-debug-symbols=[[internal,external,zipped]] .])
|
||||
|
||||
# --enable-zip-debug-info is deprecated.
|
||||
# Please use --with-native-debug-symbols=zipped .
|
||||
BASIC_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info,
|
||||
UTIL_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info,
|
||||
[Please use --with-native-debug-symbols=zipped .])
|
||||
|
||||
AC_SUBST(COMPILE_WITH_DEBUG_SYMBOLS)
|
||||
@@ -683,3 +683,178 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
|
||||
|
||||
AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Check and set options related to reproducible builds.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
[
|
||||
AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
|
||||
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated@:>@])],
|
||||
[with_source_date_present=true], [with_source_date_present=false])
|
||||
|
||||
AC_MSG_CHECKING([what source date to use])
|
||||
|
||||
if test "x$with_source_date" = xyes; then
|
||||
AC_MSG_ERROR([--with-source-date must have a value])
|
||||
elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; then
|
||||
# Tell the makefiles to update at each build
|
||||
SOURCE_DATE=updated
|
||||
AC_MSG_RESULT([determined at build time, from 'updated'])
|
||||
elif test "x$with_source_date" = xcurrent; then
|
||||
# Set the current time
|
||||
SOURCE_DATE=$($DATE +"%s")
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from 'current'])
|
||||
elif test "x$with_source_date" = xversion; then
|
||||
# Use the date from version-numbers
|
||||
UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $DEFAULT_VERSION_DATE)
|
||||
if test "x$SOURCE_DATE" = x; then
|
||||
AC_MSG_RESULT([unavailable])
|
||||
AC_MSG_ERROR([Cannot convert DEFAULT_VERSION_DATE to timestamp])
|
||||
fi
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from 'version'])
|
||||
else
|
||||
# It's a timestamp, an ISO-8601 date, or an invalid string
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ [[ "$with_source_date" =~ ^[0-9][0-9]*$ ]] ] ; then
|
||||
SOURCE_DATE=$with_source_date
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from timestamp on command line])
|
||||
else
|
||||
UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $with_source_date)
|
||||
if test "x$SOURCE_DATE" != x; then
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from ISO-8601 date on command line])
|
||||
else
|
||||
AC_MSG_RESULT([unavailable])
|
||||
AC_MSG_ERROR([Cannot parse date string "$with_source_date"])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows && \
|
||||
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse; then
|
||||
# To support banning absolute paths on Windows, we must use the -pathmap
|
||||
# method, which requires reproducible builds.
|
||||
REPRODUCIBLE_BUILD_DEFAULT=true
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $REPRODUCIBLE_BUILD_DEFAULT,
|
||||
RESULT: ENABLE_REPRODUCIBLE_BUILD,
|
||||
DESC: [enable reproducible builds (not yet fully functional)],
|
||||
DEFAULT_DESC: [enabled if --with-source-date is given or on Windows without absolute paths])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows && \
|
||||
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse && \
|
||||
test "x$ENABLE_REPRODUCIBLE_BUILD" = xfalse; then
|
||||
AC_MSG_NOTICE([On Windows it is not possible to combine --disable-reproducible-builds])
|
||||
AC_MSG_NOTICE([with --disable-absolute-paths-in-output.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_SUBST(SOURCE_DATE)
|
||||
AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup signing on macOS. This can either be setup to sign with a real identity
|
||||
# and enabling the hardened runtime, or it can simply add the debug entitlement
|
||||
# com.apple.security.get-task-allow without actually signing any binaries. The
|
||||
# latter is needed to be able to debug processes and dump core files on modern
|
||||
# versions of macOS. It can also be skipped completely.
|
||||
#
|
||||
# Check if codesign will run with the given parameters
|
||||
# $1: Parameters to run with
|
||||
# $2: Checking message
|
||||
# Sets CODESIGN_SUCCESS=true/false
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
|
||||
[
|
||||
PARAMS="$1"
|
||||
MESSAGE="$2"
|
||||
CODESIGN_TESTFILE="$CONFIGURESUPPORT_OUTPUTDIR/codesign-testfile"
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
$TOUCH "$CODESIGN_TESTFILE"
|
||||
CODESIGN_SUCCESS=false
|
||||
eval \"$CODESIGN\" $PARAMS \"$CODESIGN_TESTFILE\" 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
AC_MSG_CHECKING([$MESSAGE])
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED],
|
||||
[
|
||||
JDKOPT_CHECK_CODESIGN_PARAMS([-s \"$MACOSX_CODESIGN_IDENTITY\" --option runtime],
|
||||
[if codesign with hardened runtime is possible])
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_DEBUG],
|
||||
[
|
||||
JDKOPT_CHECK_CODESIGN_PARAMS([-s -], [if debug mode codesign is possible])
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
[
|
||||
ENABLE_CODESIGN=false
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$CODESIGN" != "x"; then
|
||||
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign, TYPE: literal, OPTIONAL: true,
|
||||
VALID_VALUES: [hardened debug auto], DEFAULT: auto,
|
||||
ENABLED_DEFAULT: true,
|
||||
CHECKING_MSG: [for macosx code signing mode],
|
||||
DESC: [set the macosx code signing mode (hardened, debug, auto)]
|
||||
)
|
||||
|
||||
MACOSX_CODESIGN_MODE=disabled
|
||||
if test "x$MACOSX_CODESIGN_ENABLED" = "xtrue"; then
|
||||
|
||||
# Check for user provided code signing identity.
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
|
||||
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
|
||||
DESC: [specify the macosx code signing identity],
|
||||
CHECKING_MSG: [for macosx code signing identity]
|
||||
)
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
if test "x$MACOSX_CODESIGN" = "xauto"; then
|
||||
# Only try to default to hardened signing on release builds
|
||||
if test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
JDKOPT_CHECK_CODESIGN_HARDENED
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
MACOSX_CODESIGN_MODE=hardened
|
||||
fi
|
||||
fi
|
||||
if test "x$MACOSX_CODESIGN_MODE" = "xdisabled"; then
|
||||
JDKOPT_CHECK_CODESIGN_DEBUG
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
MACOSX_CODESIGN_MODE=debug
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([for macosx code signing mode])
|
||||
AC_MSG_RESULT([$MACOSX_CODESIGN_MODE])
|
||||
elif test "x$MACOSX_CODESIGN" = "xhardened"; then
|
||||
JDKOPT_CHECK_CODESIGN_HARDENED
|
||||
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
|
||||
AC_MSG_ERROR([Signing with hardened runtime is not possible])
|
||||
fi
|
||||
MACOSX_CODESIGN_MODE=hardened
|
||||
elif test "x$MACOSX_CODESIGN" = "xdebug"; then
|
||||
JDKOPT_CHECK_CODESIGN_DEBUG
|
||||
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
|
||||
AC_MSG_ERROR([Signing in debug mode is not possible])
|
||||
fi
|
||||
MACOSX_CODESIGN_MODE=debug
|
||||
else
|
||||
AC_MSG_ERROR([unknown value for --with-macosx-codesign: $MACOSX_CODESIGN])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
AC_SUBST(MACOSX_CODESIGN_MODE)
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
|
||||
[
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then
|
||||
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)$|^0*(0)$ ]] ] ; then
|
||||
AC_MSG_ERROR(["$2" is not a valid numerical value for $1])
|
||||
fi
|
||||
# Extract the version number without leading zeros.
|
||||
@@ -58,13 +58,13 @@ AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
|
||||
AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
[
|
||||
# Warn user that old version arguments are deprecated.
|
||||
BASIC_DEPRECATED_ARG_WITH([milestone])
|
||||
BASIC_DEPRECATED_ARG_WITH([update-version])
|
||||
BASIC_DEPRECATED_ARG_WITH([user-release-suffix])
|
||||
BASIC_DEPRECATED_ARG_WITH([build-number])
|
||||
BASIC_DEPRECATED_ARG_WITH([version-major])
|
||||
BASIC_DEPRECATED_ARG_WITH([version-minor])
|
||||
BASIC_DEPRECATED_ARG_WITH([version-security])
|
||||
UTIL_DEPRECATED_ARG_WITH([milestone])
|
||||
UTIL_DEPRECATED_ARG_WITH([update-version])
|
||||
UTIL_DEPRECATED_ARG_WITH([user-release-suffix])
|
||||
UTIL_DEPRECATED_ARG_WITH([build-number])
|
||||
UTIL_DEPRECATED_ARG_WITH([version-major])
|
||||
UTIL_DEPRECATED_ARG_WITH([version-minor])
|
||||
UTIL_DEPRECATED_ARG_WITH([version-security])
|
||||
|
||||
# Source the version numbers file
|
||||
. $AUTOCONF_DIR/version-numbers
|
||||
@@ -76,34 +76,6 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_SUBST(JDK_RC_PLATFORM_NAME)
|
||||
AC_SUBST(HOTSPOT_VM_DISTRO)
|
||||
|
||||
# Set the MACOSX Bundle Name base
|
||||
AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
|
||||
[Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_name_base" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
|
||||
elif test "x$with_macosx_bundle_name_base" != x; then
|
||||
# Set MACOSX_BUNDLE_NAME_BASE to the configured value.
|
||||
MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
|
||||
|
||||
# Set the MACOSX Bundle ID base
|
||||
AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
|
||||
[Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_id_base" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
|
||||
elif test "x$with_macosx_bundle_id_base" != x; then
|
||||
# Set MACOSX_BUNDLE_ID_BASE to the configured value.
|
||||
MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
|
||||
|
||||
# Set the JDK RC name
|
||||
AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
|
||||
[Set JDK RC name. This is used for FileDescription and ProductName properties
|
||||
@@ -511,6 +483,60 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
VENDOR_VERSION_STRING="$with_vendor_version_string"
|
||||
fi
|
||||
|
||||
# Set the MACOSX Bundle Name base
|
||||
AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
|
||||
[Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_name_base" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
|
||||
elif test "x$with_macosx_bundle_name_base" != x; then
|
||||
# Set MACOSX_BUNDLE_NAME_BASE to the configured value.
|
||||
MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
|
||||
|
||||
# Set the MACOSX Bundle ID base
|
||||
AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
|
||||
[Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_id_base" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
|
||||
elif test "x$with_macosx_bundle_id_base" != x; then
|
||||
# Set MACOSX_BUNDLE_ID_BASE to the configured value.
|
||||
MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
|
||||
else
|
||||
# If using the default value, append the VERSION_PRE if there is one
|
||||
# to make it possible to tell official builds apart from developer builds
|
||||
if test "x$VERSION_PRE" != x; then
|
||||
MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
|
||||
|
||||
# Set the MACOSX CFBundleVersion field
|
||||
AC_ARG_WITH(macosx-bundle-build-version, [AS_HELP_STRING([--with-macosx-bundle-build-version],
|
||||
[Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
|
||||
string composed of one to three period-separated integers and should represent the
|
||||
build version. Defaults to the build number.])])
|
||||
if test "x$with_macosx_bundle_build_version" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-build-version must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_build_version =~ ^[0-9\.]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-build-version contains non numbers and periods: $with_macosx_bundle_build_version])
|
||||
elif test "x$with_macosx_bundle_build_version" != x; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$with_macosx_bundle_build_version"
|
||||
else
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
|
||||
# If VERSION_OPT consists of only numbers and periods, add it.
|
||||
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
|
||||
|
||||
# We could define --with flags for these, if really needed
|
||||
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
|
||||
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
|
||||
|
||||
@@ -51,7 +51,6 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_GRAALUNIT],
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_FIXUP_PATH([GRAALUNIT_LIB])
|
||||
UTIL_FIXUP_PATH([GRAALUNIT_LIB])
|
||||
AC_SUBST(GRAALUNIT_LIB)
|
||||
])
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, 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
|
||||
@@ -103,22 +103,28 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
|
||||
|
||||
HEADERS_TO_CHECK="X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h"
|
||||
# There is no Xrandr extension on AIX
|
||||
if test "x$OPENJDK_TARGET_OS" != xaix; then
|
||||
HEADERS_TO_CHECK="$HEADERS_TO_CHECK X11/extensions/Xrandr.h"
|
||||
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h X11/extensions/Xrandr.h],
|
||||
[X11_HEADERS_OK=yes],
|
||||
[X11_HEADERS_OK=no; break],
|
||||
[
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
]
|
||||
)
|
||||
else
|
||||
# There is no Xrandr extension on AIX. Code is duplicated to avoid autoconf
|
||||
# 2.71+ warning "AC_CHECK_HEADERS: you should use literals"
|
||||
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
|
||||
[X11_HEADERS_OK=yes],
|
||||
[X11_HEADERS_OK=no; break],
|
||||
[
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
|
||||
AC_CHECK_HEADERS([$HEADERS_TO_CHECK],
|
||||
[X11_HEADERS_OK=yes],
|
||||
[X11_HEADERS_OK=no; break],
|
||||
[
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
]
|
||||
)
|
||||
|
||||
if test "x$X11_HEADERS_OK" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([x11])
|
||||
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG])
|
||||
|
||||
@@ -187,9 +187,9 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||
|
||||
# Deprecated libraries, keep the flags for backwards compatibility
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||
UTIL_DEPRECATED_ARG_WITH([dxsdk])
|
||||
UTIL_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||
UTIL_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||
fi
|
||||
|
||||
# Control if libzip can use mmap. Available for purposes of overriding.
|
||||
@@ -214,7 +214,7 @@ AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
|
||||
fi
|
||||
if test -f "$STLPORT_LIB"; then
|
||||
AC_MSG_RESULT([yes, $STLPORT_LIB])
|
||||
BASIC_FIXUP_PATH([STLPORT_LIB])
|
||||
UTIL_FIXUP_PATH([STLPORT_LIB])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found at $STLPORT_LIB])
|
||||
AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests])
|
||||
|
||||
@@ -194,9 +194,9 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
VAR_OS=windows
|
||||
VAR_OS_ENV=windows.cygwin
|
||||
;;
|
||||
*mingw*)
|
||||
*msys* | *mingw*)
|
||||
VAR_OS=windows
|
||||
VAR_OS_ENV=windows.msys
|
||||
VAR_OS_ENV=windows.msys2
|
||||
;;
|
||||
*aix*)
|
||||
VAR_OS=aix
|
||||
@@ -566,6 +566,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV
|
||||
elif test "x$OPENJDK_$1_CPU" = xloongarch64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=LOONGARCH64
|
||||
elif test "x$OPENJDK_$1_CPU" != x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
|
||||
fi
|
||||
@@ -628,6 +630,7 @@ AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
[
|
||||
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
|
||||
@@ -711,7 +714,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Is the target little of big endian?
|
||||
# Is the target little or big endian?
|
||||
#
|
||||
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -28,9 +28,6 @@ AC_DEFUN_ONCE([SRCDIRS_SETUP_DIRS],
|
||||
OUTPUTDIR="$OUTPUTDIR"
|
||||
AC_SUBST(OUTPUTDIR)
|
||||
JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
|
||||
|
||||
# Where are the sources.
|
||||
AC_SUBST(TOPDIR)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -46,7 +43,7 @@ AC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
|
||||
&& test "x$with_import_modules" != "xno"; then
|
||||
if test -d "$with_import_modules"; then
|
||||
IMPORT_MODULES_TOPDIR="$with_import_modules"
|
||||
BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
|
||||
UTIL_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
|
||||
elif test -e "$with_import_modules"; then
|
||||
IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
|
||||
$RM -rf "$IMPORT_MODULES_TOPDIR"
|
||||
|
||||
@@ -126,18 +126,27 @@ RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
|
||||
RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
|
||||
RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@
|
||||
|
||||
SOURCE_DATE := @SOURCE_DATE@
|
||||
ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
|
||||
|
||||
LIBM:=@LIBM@
|
||||
LIBDL:=@LIBDL@
|
||||
|
||||
# colon or semicolon
|
||||
PATH_SEP:=@PATH_SEP@
|
||||
WINENV_ROOT := @WINENV_ROOT@
|
||||
WINENV_PREFIX := @WINENV_PREFIX@
|
||||
|
||||
ifeq (@OPENJDK_BUILD_OS_ENV@, windows.msys2)
|
||||
# Prohibit msys2 from attemping any path wrangling
|
||||
export MSYS2_ARG_CONV_EXCL := "*"
|
||||
endif
|
||||
|
||||
# Save the original path before replacing it with the Visual Studio tools
|
||||
ORIGINAL_PATH:=@ORIGINAL_PATH@
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# On Windows, the Visual Studio toolchain needs the PATH to be adjusted
|
||||
# to include Visual Studio tools (this needs to be in cygwin/msys style).
|
||||
export PATH:=@VS_PATH@
|
||||
ORIGINAL_PATH := @ORIGINAL_PATH@
|
||||
|
||||
ifeq (@TOOLCHAIN_TYPE@, microsoft)
|
||||
# The Visual Studio toolchain needs the PATH to be adjusted to include
|
||||
# Visual Studio tools.
|
||||
export PATH := @TOOLCHAIN_PATH@:$(PATH)
|
||||
endif
|
||||
|
||||
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
|
||||
@@ -169,6 +178,7 @@ COMPANY_NAME:=@COMPANY_NAME@
|
||||
HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
|
||||
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
|
||||
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
|
||||
MACOSX_BUNDLE_BUILD_VERSION=@MACOSX_BUNDLE_BUILD_VERSION@
|
||||
USERNAME:=@USERNAME@
|
||||
VENDOR_URL:=@VENDOR_URL@
|
||||
VENDOR_URL_BUG:=@VENDOR_URL_BUG@
|
||||
@@ -412,7 +422,8 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
# The highest allowed version of macosx
|
||||
MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
|
||||
|
||||
# The macosx code signing identity to use
|
||||
# The macosx code signing configuration
|
||||
MACOSX_CODESIGN_MODE:=@MACOSX_CODESIGN_MODE@
|
||||
MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@
|
||||
|
||||
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
|
||||
@@ -466,7 +477,7 @@ CFLAGS_CCACHE:=@CFLAGS_CCACHE@
|
||||
ADLC_CXXFLAG=@ADLC_CXXFLAG@
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
|
||||
CC := @CCACHE@ @ICECC@ @CC@
|
||||
|
||||
# CFLAGS used to compile the jdk native libraries (C-code)
|
||||
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
|
||||
@@ -492,12 +503,12 @@ EXTRA_CXXFLAGS = @EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
|
||||
EXTRA_ASFLAGS = @EXTRA_ASFLAGS@
|
||||
|
||||
CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
|
||||
CXX := @CCACHE@ @ICECC@ @CXX@
|
||||
|
||||
CPP:=@FIXPATH@ @CPP@
|
||||
CPP := @CPP@
|
||||
|
||||
# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
|
||||
LD:=@FIXPATH@ @LD@
|
||||
LD := @LD@
|
||||
|
||||
# Linker used by the jaotc tool for AOT compilation.
|
||||
LD_JAOTC:=@LD_JAOTC@
|
||||
@@ -518,7 +529,7 @@ JDKEXE_LIBS:=@JDKEXE_LIBS@
|
||||
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
|
||||
|
||||
# Sometimes a different linker is needed for c++ libs
|
||||
LDCXX:=@FIXPATH@ @LDCXX@
|
||||
LDCXX := @LDCXX@
|
||||
# The flags for linking libstdc++ linker.
|
||||
LIBCXX:=@LIBCXX@
|
||||
|
||||
@@ -527,22 +538,22 @@ LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
|
||||
|
||||
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
|
||||
# build platform.
|
||||
BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
|
||||
BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
|
||||
BUILD_LD:=@FIXPATH@ @BUILD_LD@
|
||||
BUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
|
||||
BUILD_AS:=@FIXPATH@ @BUILD_AS@
|
||||
BUILD_AR:=@FIXPATH@ @BUILD_AR@
|
||||
BUILD_NM:=@FIXPATH@ @BUILD_NM@
|
||||
BUILD_CC := @BUILD_ICECC@ @BUILD_CC@
|
||||
BUILD_CXX := @BUILD_ICECC@ @BUILD_CXX@
|
||||
BUILD_LD := @BUILD_LD@
|
||||
BUILD_LDCXX := @BUILD_LDCXX@
|
||||
BUILD_AS := @BUILD_AS@
|
||||
BUILD_AR := @BUILD_AR@
|
||||
BUILD_NM := @BUILD_NM@
|
||||
BUILD_OBJCOPY:=@BUILD_OBJCOPY@
|
||||
BUILD_STRIP:=@BUILD_STRIP@
|
||||
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
|
||||
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
|
||||
|
||||
AS:=@FIXPATH@ @AS@
|
||||
AS := @AS@
|
||||
|
||||
# AR is used to create a static library (is ar in unix, lib.exe in windows)
|
||||
AR:=@FIXPATH@ @AR@
|
||||
AR := @AR@
|
||||
ARFLAGS:=@ARFLAGS@
|
||||
|
||||
NM:=@NM@
|
||||
@@ -595,7 +606,7 @@ STATIC_LIBRARY=@STATIC_LIBRARY@
|
||||
LIBRARY_PREFIX:=@LIBRARY_PREFIX@
|
||||
SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
|
||||
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
|
||||
EXE_SUFFIX:=@EXE_SUFFIX@
|
||||
EXECUTABLE_SUFFIX:=@EXECUTABLE_SUFFIX@
|
||||
OBJ_SUFFIX:=@OBJ_SUFFIX@
|
||||
STATIC_BUILD:=@STATIC_BUILD@
|
||||
|
||||
@@ -617,28 +628,25 @@ JAVADOC_CMD:=@JAVADOC@
|
||||
JAR_CMD:=@JAR@
|
||||
JLINK_CMD := @JLINK@
|
||||
JMOD_CMD := @JMOD@
|
||||
JARSIGNER_CMD:=@JARSIGNER@
|
||||
SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
|
||||
# These variables are meant to be used. They are defined with = instead of := to make
|
||||
# it possible to override only the *_CMD variables.
|
||||
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||
JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
|
||||
JAVAC=@FIXPATH@ $(JAVAC_CMD)
|
||||
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
|
||||
JAR=@FIXPATH@ $(JAR_CMD)
|
||||
JLINK = @FIXPATH@ $(JLINK_CMD)
|
||||
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
|
||||
JAVA = $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
JAVA_SMALL = $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||
JAVA_JAVAC = $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
|
||||
JAVAC = $(JAVAC_CMD)
|
||||
JAVADOC = $(JAVADOC_CMD)
|
||||
JAR = $(JAR_CMD)
|
||||
JLINK = $(JLINK_CMD)
|
||||
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
# A specific java binary with specific options can be used to run
|
||||
# the long running background sjavac servers and other long running tasks.
|
||||
SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
|
||||
SJAVAC_SERVER_JAVA = $(SJAVAC_SERVER_JAVA_CMD) \
|
||||
$(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
|
||||
# overriding that value by using ?=.
|
||||
JAVAC_FLAGS?=@JAVAC_FLAGS@
|
||||
|
||||
JAVAC_FLAGS? = @JAVAC_FLAGS@
|
||||
|
||||
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
@@ -695,9 +703,7 @@ CCACHE:=@CCACHE@
|
||||
CD:=cd
|
||||
CHMOD:=@CHMOD@
|
||||
CODESIGN:=@CODESIGN@
|
||||
COMM:=@COMM@
|
||||
CP:=@CP@
|
||||
CPIO:=@CPIO@
|
||||
CUT:=@CUT@
|
||||
DATE:=@DATE@
|
||||
DIFF:=@DIFF@
|
||||
@@ -719,7 +725,7 @@ MKDIR:=@MKDIR@
|
||||
MV:=@MV@
|
||||
NAWK:=@NAWK@
|
||||
NICE:=@NICE@
|
||||
PANDOC:=@FIXPATH@ @PANDOC@
|
||||
PANDOC:=@PANDOC@
|
||||
PATCH:=@PATCH@
|
||||
PRINTF:=@PRINTF@
|
||||
READLINK:=@READLINK@
|
||||
@@ -735,15 +741,14 @@ TIME:=@TIME@
|
||||
IS_GNU_TIME:=@IS_GNU_TIME@
|
||||
TR:=@TR@
|
||||
TOUCH:=@TOUCH@
|
||||
UNIQ:=@UNIQ@
|
||||
WC:=@WC@
|
||||
XARGS:=@XARGS@
|
||||
ZIPEXE:=@ZIPEXE@
|
||||
UNZIP:=@UNZIP@
|
||||
MT:=@FIXPATH@ @MT@
|
||||
RC:=@FIXPATH@ @RC@
|
||||
DUMPBIN:=@FIXPATH@ @DUMPBIN@
|
||||
CYGPATH:=@CYGPATH@
|
||||
MT:=@MT@
|
||||
RC:=@RC@
|
||||
DUMPBIN:=@DUMPBIN@
|
||||
PATHTOOL:=@PATHTOOL@
|
||||
LDD:=@LDD@
|
||||
OTOOL:=@OTOOL@
|
||||
READELF:=@READELF@
|
||||
@@ -761,7 +766,8 @@ JTREGEXE:=@JTREGEXE@
|
||||
JIB_HOME:=@JIB_HOME@
|
||||
XCODEBUILD=@XCODEBUILD@
|
||||
DTRACE := @DTRACE@
|
||||
FIXPATH:=@FIXPATH@
|
||||
FIXPATH := @FIXPATH@
|
||||
FIXPATH_BASE := @FIXPATH_BASE@
|
||||
ULIMIT:=@ULIMIT@
|
||||
|
||||
TAR_TYPE:=@TAR_TYPE@
|
||||
@@ -779,9 +785,12 @@ LIBZ_CFLAGS:=@LIBZ_CFLAGS@
|
||||
LIBZ_LIBS:=@LIBZ_LIBS@
|
||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||
MSVCR_DLL:=@MSVCR_DLL@
|
||||
VCRUNTIME_1_DLL:=@VCRUNTIME_1_DLL@
|
||||
MSVCP_DLL:=@MSVCP_DLL@
|
||||
UCRT_DLL_DIR:=@UCRT_DLL_DIR@
|
||||
STLPORT_LIB:=@STLPORT_LIB@
|
||||
ENABLE_PANDOC:=@ENABLE_PANDOC@
|
||||
PANDOC_MARKDOWN_FLAG:=@PANDOC_MARKDOWN_FLAG@
|
||||
|
||||
####################################################
|
||||
#
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
# compilers and related tools that are used.
|
||||
########################################################################
|
||||
|
||||
m4_include([toolchain_microsoft.m4])
|
||||
|
||||
# All valid toolchains, regardless of platform (used by help.m4)
|
||||
VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
|
||||
@@ -91,7 +92,7 @@ AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
|
||||
# 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_COMPILER_VERSION],
|
||||
UTIL_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION],
|
||||
[*VERSION PREFIX IF_AT_LEAST IF_OLDER_THAN], [$@],
|
||||
[
|
||||
# Need to assign to a variable since m4 is blocked from modifying parts in [].
|
||||
@@ -142,7 +143,7 @@ AC_DEFUN([TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS],
|
||||
# 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],
|
||||
UTIL_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 [].
|
||||
@@ -180,7 +181,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
|
||||
SHARED_LIBRARY='[$]1.dll'
|
||||
STATIC_LIBRARY='[$]1.lib'
|
||||
OBJ_SUFFIX='.obj'
|
||||
EXE_SUFFIX='.exe'
|
||||
EXECUTABLE_SUFFIX='.exe'
|
||||
else
|
||||
LIBRARY_PREFIX=lib
|
||||
SHARED_LIBRARY_SUFFIX='.so'
|
||||
@@ -188,7 +189,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
|
||||
SHARED_LIBRARY='lib[$]1.so'
|
||||
STATIC_LIBRARY='lib[$]1.a'
|
||||
OBJ_SUFFIX='.o'
|
||||
EXE_SUFFIX=''
|
||||
EXECUTABLE_SUFFIX=''
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# For full static builds, we're overloading the SHARED_LIBRARY
|
||||
# variables in order to limit the amount of changes required.
|
||||
@@ -212,7 +213,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
|
||||
AC_SUBST(SHARED_LIBRARY)
|
||||
AC_SUBST(STATIC_LIBRARY)
|
||||
AC_SUBST(OBJ_SUFFIX)
|
||||
AC_SUBST(EXE_SUFFIX)
|
||||
AC_SUBST(EXECUTABLE_SUFFIX)
|
||||
])
|
||||
|
||||
# Determine which toolchain type to use, and make sure it is valid for this
|
||||
@@ -337,9 +338,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||
# special setup, e.g. additional paths etc.
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
[
|
||||
# FIXME: Is this needed?
|
||||
AC_LANG(C++)
|
||||
|
||||
# Store the CFLAGS etc passed to the configure script.
|
||||
ORG_CFLAGS="$CFLAGS"
|
||||
ORG_CXXFLAGS="$CXXFLAGS"
|
||||
@@ -347,44 +345,26 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
# autoconf magic only relies on PATH, so update it if tools dir is specified
|
||||
OLD_PATH="$PATH"
|
||||
|
||||
# On Windows, we need to detect the visual studio installation first.
|
||||
# This will change the PATH, but we need to keep that new PATH even
|
||||
# after toolchain detection is done, since the compiler (on x86) uses
|
||||
# it for DLL resolution in runtime.
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows" \
|
||||
&& test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
|
||||
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
|
||||
PATH="$VS_PATH"
|
||||
# The microsoft toolchain also requires INCLUDE and LIB to be set.
|
||||
export INCLUDE="$VS_INCLUDE"
|
||||
export LIB="$VS_LIB"
|
||||
else
|
||||
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_VERSION"
|
||||
else
|
||||
# Currently we do not define this for other toolchains. This might change as the need arise.
|
||||
TOOLCHAIN_VERSION=
|
||||
fi
|
||||
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_VERSION"
|
||||
fi
|
||||
AC_SUBST(TOOLCHAIN_VERSION)
|
||||
|
||||
# Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
|
||||
# Finally prepend TOOLCHAIN_PATH to the PATH, to allow --with-tools-dir to
|
||||
# override all other locations.
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
export PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
])
|
||||
|
||||
# Restore path, etc
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
|
||||
[
|
||||
# Restore old path, except for the microsoft toolchain, which requires VS_PATH
|
||||
# to remain in place. Otherwise the compiler will not work in some siutations
|
||||
# in later configure checks.
|
||||
# Restore old path, except for the microsoft toolchain, which requires the
|
||||
# toolchain path to remain in place. Otherwise the compiler will not work in
|
||||
# some siutations in later configure checks.
|
||||
if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
|
||||
PATH="$OLD_PATH"
|
||||
fi
|
||||
@@ -452,7 +432,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
|
||||
# First line typically looks something like:
|
||||
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
|
||||
# but the compiler name may vary depending on locale.
|
||||
COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
||||
COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 1>/dev/null | $HEAD -n 1 | $TR -d '\r'`
|
||||
# Check that this is likely to be Microsoft CL.EXE.
|
||||
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft" > /dev/null
|
||||
if test $? -ne 0; then
|
||||
@@ -531,7 +511,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
if test "x`basename [$]$1`" = "x[$]$1"; then
|
||||
# A command without a complete path is provided, search $PATH.
|
||||
|
||||
AC_PATH_PROGS(POTENTIAL_$1, [$]$1)
|
||||
UTIL_LOOKUP_PROGS(POTENTIAL_$1, [$]$1)
|
||||
if test "x$POTENTIAL_$1" != x; then
|
||||
$1=$POTENTIAL_$1
|
||||
else
|
||||
@@ -553,39 +533,21 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
# If we are not cross compiling, then the default compiler name will be
|
||||
# used.
|
||||
|
||||
$1=
|
||||
# If TOOLCHAIN_PATH is set, check for all compiler names in there first
|
||||
# before checking the rest of the PATH.
|
||||
# FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
|
||||
# step, this should not be necessary.
|
||||
if test -n "$TOOLCHAIN_PATH"; then
|
||||
PATH_save="$PATH"
|
||||
PATH="$TOOLCHAIN_PATH"
|
||||
AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
|
||||
$1=$TOOLCHAIN_PATH_$1
|
||||
PATH="$PATH_save"
|
||||
fi
|
||||
|
||||
# AC_PATH_TOOL can't be run multiple times with the same variable,
|
||||
# so create a new name for this run.
|
||||
if test "x[$]$1" = x; then
|
||||
AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(POTENTIAL_$1, $SEARCH_LIST)
|
||||
if test "x$POTENTIAL_$1" != x; then
|
||||
$1=$POTENTIAL_$1
|
||||
fi
|
||||
|
||||
if test "x[$]$1" = x; then
|
||||
else
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now we have a compiler binary in $1. Make sure it's okay.
|
||||
BASIC_FIXUP_EXECUTABLE($1)
|
||||
TEST_COMPILER="[$]$1"
|
||||
|
||||
AC_MSG_CHECKING([resolved symbolic links for $1])
|
||||
SYMLINK_ORIGINAL="$TEST_COMPILER"
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
|
||||
UTIL_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
|
||||
if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
|
||||
AC_MSG_RESULT([no symlink])
|
||||
else
|
||||
@@ -633,19 +595,26 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
|
||||
# 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'`
|
||||
LINKER_VERSION_STRING=`$LINKER 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
|
||||
# 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`
|
||||
# If using gold it will look like:
|
||||
# GNU gold (GNU Binutils 2.30) 1.15
|
||||
LINKER_VERSION_STRING=`$LINKER -Wl,--version 2> /dev/null | $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/'` ]
|
||||
if [ [[ "$LINKER_VERSION_STRING" == *gold* ]] ]; then
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*) .*/\1/'` ]
|
||||
else
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# clang -Wl,-v output typically looks like
|
||||
# @(#)PROGRAM:ld PROJECT:ld64-305
|
||||
@@ -654,7 +623,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
|
||||
# or
|
||||
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
|
||||
|
||||
LINKER_VERSION_STRING=`$LD -Wl,-v 2>&1 | $HEAD -n 1`
|
||||
LINKER_VERSION_STRING=`$LINKER -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
|
||||
@@ -674,6 +643,23 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
|
||||
AC_MSG_NOTICE([Using $TOOLCHAIN_TYPE $LINKER_NAME version $LINKER_VERSION_NUMBER @<:@$LINKER_VERSION_STRING@:>@])
|
||||
])
|
||||
|
||||
# Make sure we did not pick up /usr/bin/link, which is the unix-style link
|
||||
# executable.
|
||||
#
|
||||
# $1 = linker to test (LD or BUILD_LD)
|
||||
AC_DEFUN(TOOLCHAIN_VERIFY_LINK_BINARY,
|
||||
[
|
||||
LINKER=[$]$1
|
||||
|
||||
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
|
||||
$LINKER --version > /dev/null
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([$LINKER is the winenv link tool. Please check your PATH and rerun configure.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
])
|
||||
# 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
|
||||
@@ -709,38 +695,27 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# Setup the preprocessor (CPP and CXXCPP)
|
||||
#
|
||||
AC_PROG_CPP
|
||||
BASIC_FIXUP_EXECUTABLE(CPP)
|
||||
UTIL_FIXUP_EXECUTABLE(CPP)
|
||||
AC_PROG_CXXCPP
|
||||
BASIC_FIXUP_EXECUTABLE(CXXCPP)
|
||||
UTIL_FIXUP_EXECUTABLE(CXXCPP)
|
||||
|
||||
#
|
||||
# Setup the linker (LD)
|
||||
#
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# In the Microsoft toolchain we have a separate LD command "link".
|
||||
# Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
|
||||
# a cygwin program for something completely different.
|
||||
AC_CHECK_PROG([LD], [link],[link],,, [$CYGWIN_LINK])
|
||||
BASIC_FIXUP_EXECUTABLE(LD)
|
||||
# Verify that we indeed succeeded with this trick.
|
||||
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
|
||||
"$LD" --version > /dev/null
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(LD, link)
|
||||
TOOLCHAIN_VERIFY_LINK_BINARY(LD)
|
||||
LDCXX="$LD"
|
||||
# jaotc being a windows program expects the linker to be supplied with exe suffix.
|
||||
LD_JAOTC="$LD$EXE_SUFFIX"
|
||||
# jaotc being a windows program expects the linker to be supplied with exe suffix.but without
|
||||
# fixpath
|
||||
LD_JAOTC="${LD##$FIXPATH }"
|
||||
else
|
||||
# All other toolchains use the compiler to link.
|
||||
LD="$CC"
|
||||
LDCXX="$CXX"
|
||||
# jaotc expects 'ld' as the linker rather than the compiler.
|
||||
BASIC_CHECK_TOOLS([LD_JAOTC], ld)
|
||||
BASIC_FIXUP_EXECUTABLE(LD_JAOTC)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(LD_JAOTC, ld)
|
||||
fi
|
||||
AC_SUBST(LD)
|
||||
AC_SUBST(LD_JAOTC)
|
||||
@@ -762,14 +737,15 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# Setup the assembler (AS)
|
||||
#
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_PATH_PROGS(AS, as)
|
||||
BASIC_FIXUP_EXECUTABLE(AS)
|
||||
UTIL_LOOKUP_PROGS(AS, as)
|
||||
if test "x$AS" = x; then
|
||||
AC_MSG_ERROR([Solaris assembler (as) is required. Please install via "pkg install pkg:/developer/assembler".])
|
||||
fi
|
||||
else
|
||||
# FIXME: is this correct for microsoft?
|
||||
elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
||||
AS="$CC -c"
|
||||
else
|
||||
# On windows, the assember is "ml.exe"
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml)
|
||||
fi
|
||||
AC_SUBST(AS)
|
||||
|
||||
@@ -778,13 +754,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
#
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The corresponding ar tool is lib.exe (used to create static libraries)
|
||||
AC_CHECK_PROG([AR], [lib],[lib],,,)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, lib)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
BASIC_CHECK_TOOLS(AR, ar gcc-ar)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar gcc-ar)
|
||||
else
|
||||
BASIC_CHECK_TOOLS(AR, ar)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar)
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE(AR)
|
||||
])
|
||||
|
||||
# Setup additional tools that is considered a part of the toolchain, but not the
|
||||
@@ -793,49 +768,30 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
BASIC_PATH_PROGS(LIPO, lipo)
|
||||
BASIC_FIXUP_EXECUTABLE(LIPO)
|
||||
BASIC_REQUIRE_PROGS(OTOOL, otool)
|
||||
BASIC_FIXUP_EXECUTABLE(OTOOL)
|
||||
BASIC_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
|
||||
BASIC_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
|
||||
UTIL_LOOKUP_PROGS(LIPO, lipo)
|
||||
UTIL_REQUIRE_PROGS(OTOOL, otool)
|
||||
UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
|
||||
BASIC_FIXUP_EXECUTABLE(MT)
|
||||
# Setup the manifest tool (MT)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(MT, mt)
|
||||
# Setup the resource compiler (RC)
|
||||
AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
|
||||
BASIC_FIXUP_EXECUTABLE(RC)
|
||||
AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
|
||||
BASIC_FIXUP_EXECUTABLE(DUMPBIN)
|
||||
# We need to check for 'msbuild.exe' because at the place where we expect to
|
||||
# find 'msbuild.exe' there's also a directory called 'msbuild' and configure
|
||||
# won't find the 'msbuild.exe' executable in that case (and the
|
||||
# 'ac_executable_extensions' is unusable due to performance reasons).
|
||||
# Notice that we intentionally don't fix up the path to MSBUILD because we
|
||||
# will call it in a DOS shell during freetype detection on Windows (see
|
||||
# 'LIB_SETUP_FREETYPE' in "libraries.m4"
|
||||
AC_CHECK_PROG([MSBUILD], [msbuild.exe], [msbuild.exe],,,)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(RC, rc)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(DUMPBIN, dumpbin)
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_PATH_PROGS(STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
BASIC_PATH_PROGS(NM, nm)
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
BASIC_PATH_PROGS(GNM, gnm)
|
||||
BASIC_FIXUP_EXECUTABLE(GNM)
|
||||
UTIL_LOOKUP_PROGS(STRIP, strip)
|
||||
UTIL_LOOKUP_PROGS(NM, nm)
|
||||
UTIL_LOOKUP_PROGS(GNM, gnm)
|
||||
elif test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
# FIXME: we should unify this with the solaris case above.
|
||||
BASIC_CHECK_TOOLS(STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(STRIP, strip)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
BASIC_CHECK_TOOLS(NM, nm gcc-nm)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm gcc-nm)
|
||||
else
|
||||
BASIC_CHECK_TOOLS(NM, nm)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm)
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
GNM="$NM"
|
||||
AC_SUBST(GNM)
|
||||
fi
|
||||
@@ -843,62 +799,51 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
# objcopy is used for moving debug symbols to separate files when
|
||||
# full debug symbols are enabled.
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
BASIC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
|
||||
# Only call fixup if objcopy was found.
|
||||
if test -n "$OBJCOPY"; then
|
||||
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
# objcopy prior to 2.21.1 on solaris is broken and is not usable.
|
||||
# Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
|
||||
# - version number is last blank separate word on first line
|
||||
# - version number formats that have been seen:
|
||||
# - <major>.<minor>
|
||||
# - <major>.<minor>.<micro>
|
||||
OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
|
||||
# The outer [ ] is to prevent m4 from eating the [] in the sed expression.
|
||||
[ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
|
||||
-e 's/.* //' \
|
||||
-e '/^[01]\./b bad' \
|
||||
-e '/^2\./{' \
|
||||
-e ' s/^2\.//' \
|
||||
-e ' /^[0-9]$/b bad' \
|
||||
-e ' /^[0-9]\./b bad' \
|
||||
-e ' /^1[0-9]$/b bad' \
|
||||
-e ' /^1[0-9]\./b bad' \
|
||||
-e ' /^20\./b bad' \
|
||||
-e ' /^21\.0$/b bad' \
|
||||
-e ' /^21\.0\./b bad' \
|
||||
-e '}' \
|
||||
-e ':good' \
|
||||
-e 's/.*/VALID_VERSION/p' \
|
||||
-e 'q' \
|
||||
-e ':bad' \
|
||||
-e 's/.*/BAD_VERSION/p' \
|
||||
-e 'q'` ]
|
||||
if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
|
||||
OBJCOPY=
|
||||
AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
|
||||
AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
|
||||
AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
|
||||
AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
|
||||
AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
|
||||
fi
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(OBJCOPY, gobjcopy objcopy)
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
# objcopy prior to 2.21.1 on solaris is broken and is not usable.
|
||||
# Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
|
||||
# - version number is last blank separate word on first line
|
||||
# - version number formats that have been seen:
|
||||
# - <major>.<minor>
|
||||
# - <major>.<minor>.<micro>
|
||||
OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
|
||||
# The outer [ ] is to prevent m4 from eating the [] in the sed expression.
|
||||
[ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
|
||||
-e 's/.* //' \
|
||||
-e '/^[01]\./b bad' \
|
||||
-e '/^2\./{' \
|
||||
-e ' s/^2\.//' \
|
||||
-e ' /^[0-9]$/b bad' \
|
||||
-e ' /^[0-9]\./b bad' \
|
||||
-e ' /^1[0-9]$/b bad' \
|
||||
-e ' /^1[0-9]\./b bad' \
|
||||
-e ' /^20\./b bad' \
|
||||
-e ' /^21\.0$/b bad' \
|
||||
-e ' /^21\.0\./b bad' \
|
||||
-e '}' \
|
||||
-e ':good' \
|
||||
-e 's/.*/VALID_VERSION/p' \
|
||||
-e 'q' \
|
||||
-e ':bad' \
|
||||
-e 's/.*/BAD_VERSION/p' \
|
||||
-e 'q'` ]
|
||||
if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
|
||||
OBJCOPY=
|
||||
AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
|
||||
AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
|
||||
AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
|
||||
AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
|
||||
AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
|
||||
if test "x$OBJDUMP" != x; then
|
||||
# Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
|
||||
# bails if argument is missing.
|
||||
BASIC_FIXUP_EXECUTABLE(OBJDUMP)
|
||||
fi
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(OBJDUMP, gobjdump objdump)
|
||||
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc|clang|solstudio)
|
||||
BASIC_CHECK_TOOLS(CXXFILT, [c++filt])
|
||||
BASIC_CHECK_NONEMPTY(CXXFILT)
|
||||
BASIC_FIXUP_EXECUTABLE(CXXFILT)
|
||||
UTIL_REQUIRE_TOOLCHAIN_PROGS(CXXFILT, c++filt)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
@@ -926,7 +871,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
if test ! -d "$with_build_devkit"; then
|
||||
AC_MSG_ERROR([--with-build-devkit points to non existing dir: $with_build_devkit])
|
||||
else
|
||||
BASIC_FIXUP_PATH([with_build_devkit])
|
||||
UTIL_FIXUP_PATH([with_build_devkit])
|
||||
BUILD_DEVKIT_ROOT="$with_build_devkit"
|
||||
# Check for a meta data info file in the root of the devkit
|
||||
if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
|
||||
@@ -972,63 +917,57 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
BUILD_VS_INCLUDE="$BUILD_DEVKIT_VS_INCLUDE"
|
||||
BUILD_VS_LIB="$BUILD_DEVKIT_VS_LIB"
|
||||
# For historical reasons, paths are separated by ; in devkit.info
|
||||
BUILD_VS_INCLUDE="${BUILD_DEVKIT_VS_INCLUDE//;/:}"
|
||||
BUILD_VS_LIB="${BUILD_DEVKIT_VS_LIB//;/:}"
|
||||
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS([BUILD_])
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS(BUILD_, BUILD_)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# FIXME: we should list the discovered compilers as an exclude pattern!
|
||||
# If we do that, we can do this detection before POST_DETECTION, and still
|
||||
# find the build compilers in the tools dir, if needed.
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
BASIC_REQUIRE_PROGS(BUILD_CC, [clang cl cc gcc])
|
||||
BASIC_REQUIRE_PROGS(BUILD_CXX, [clang++ cl CC g++])
|
||||
else
|
||||
BASIC_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
|
||||
BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
|
||||
BASIC_PATH_PROGS(BUILD_NM, nm gcc-nm)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_NM)
|
||||
BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_AR)
|
||||
BASIC_PATH_PROGS(BUILD_OBJCOPY, objcopy)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_OBJCOPY)
|
||||
BASIC_PATH_PROGS(BUILD_STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_STRIP)
|
||||
# Assume the C compiler is the assembler
|
||||
BUILD_AS="$BUILD_CC -c"
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# In the Microsoft toolchain we have a separate LD command "link".
|
||||
# Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
|
||||
# a cygwin program for something completely different.
|
||||
AC_CHECK_PROG([BUILD_LD], [link$EXE_SUFFIX],[link$EXE_SUFFIX],,, [$CYGWIN_LINK])
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_LD)
|
||||
# Verify that we indeed succeeded with this trick.
|
||||
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# If we got no devkit, we need to go hunting for the proper env
|
||||
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE($OPENJDK_BUILD_CPU, [$TOOLCHAIN_VERSION])
|
||||
TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV($OPENJDK_BUILD_CPU, BUILD_)
|
||||
|
||||
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
|
||||
# which, in combination with WSLENV, will make the WSL layer complain
|
||||
old_path="$PATH"
|
||||
PATH=
|
||||
# We cannot currently export the VS_PATH to spec.gmk. This is probably
|
||||
# strictly not correct, but seems to work anyway.
|
||||
|
||||
"$BUILD_LD" --version > /dev/null
|
||||
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
# Convert VS_INCLUDE and VS_LIB into sysroot flags
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS(BUILD_)
|
||||
fi
|
||||
fi
|
||||
|
||||
PATH="$old_path"
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, cl, [$VS_PATH])
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, cl, [$VS_PATH])
|
||||
|
||||
# On windows, the assember is "ml.exe". We currently don't need this so
|
||||
# do not require.
|
||||
UTIL_LOOKUP_PROGS(BUILD_AS, ml, [$VS_PATH])
|
||||
|
||||
# On windows, the ar tool is lib.exe (used to create static libraries).
|
||||
# We currently don't need this so do not require.
|
||||
UTIL_LOOKUP_PROGS(BUILD_AR, lib, [$VS_PATH])
|
||||
|
||||
# In the Microsoft toolchain we have a separate LD command "link".
|
||||
UTIL_REQUIRE_PROGS(BUILD_LD, link, [$VS_PATH])
|
||||
TOOLCHAIN_VERIFY_LINK_BINARY(BUILD_LD)
|
||||
BUILD_LDCXX="$BUILD_LD"
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, clang cc gcc)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, clang++ CC g++)
|
||||
else
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, cc gcc)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, CC g++)
|
||||
fi
|
||||
UTIL_LOOKUP_PROGS(BUILD_NM, nm gcc-nm)
|
||||
UTIL_LOOKUP_PROGS(BUILD_AR, ar gcc-ar lib)
|
||||
UTIL_LOOKUP_PROGS(BUILD_OBJCOPY, objcopy)
|
||||
UTIL_LOOKUP_PROGS(BUILD_STRIP, strip)
|
||||
# Assume the C compiler is the assembler
|
||||
BUILD_AS="$BUILD_CC -c"
|
||||
# Just like for the target compiler, use the compiler as linker
|
||||
BUILD_LD="$BUILD_CC"
|
||||
BUILD_LDCXX="$BUILD_CXX"
|
||||
@@ -1078,7 +1017,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
# Check for extra potential brokenness.
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# On Windows, double-check that we got the right compiler.
|
||||
CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
|
||||
CC_VERSION_OUTPUT=`$CC 2>&1 1>/dev/null | $HEAD -n 1 | $TR -d '\r'`
|
||||
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
|
||||
if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
|
||||
@@ -1132,7 +1071,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
|
||||
# An explicit path is specified, use it.
|
||||
JT_HOME="$with_jtreg"
|
||||
BASIC_FIXUP_PATH([JT_HOME])
|
||||
UTIL_FIXUP_PATH([JT_HOME])
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
|
||||
fi
|
||||
@@ -1172,7 +1111,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
if test "x$JT_HOME" = x; then
|
||||
# JT_HOME is not set in environment, or was deemed invalid.
|
||||
# Try to find jtreg on path
|
||||
BASIC_PATH_PROGS(JTREGEXE, jtreg)
|
||||
UTIL_LOOKUP_PROGS(JTREGEXE, jtreg)
|
||||
if test "x$JTREGEXE" != x; then
|
||||
# That's good, now try to derive JT_HOME
|
||||
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
|
||||
@@ -1198,8 +1137,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_FIXUP_EXECUTABLE(JTREGEXE)
|
||||
BASIC_FIXUP_PATH(JT_HOME)
|
||||
UTIL_FIXUP_EXECUTABLE(JTREGEXE)
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
AC_SUBST(JTREGEXE)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
################################################################################
|
||||
# The order of these defines the priority by which we try to find them.
|
||||
VALID_VS_VERSIONS="2017 2019 2013 2015 2012 2010"
|
||||
VALID_VS_VERSIONS="2017 2019 2022 2013 2015 2012 2010"
|
||||
|
||||
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
|
||||
VS_VERSION_INTERNAL_2010=100
|
||||
@@ -90,8 +90,9 @@ VS_SUPPORTED_2017=true
|
||||
VS_TOOLSET_SUPPORTED_2017=true
|
||||
|
||||
VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
|
||||
VS_VERSION_INTERNAL_2019=141
|
||||
VS_VERSION_INTERNAL_2019=142
|
||||
VS_MSVCR_2019=vcruntime140.dll
|
||||
VS_VCRUNTIME_1_2019=vcruntime140_1.dll
|
||||
VS_MSVCP_2019=msvcp140.dll
|
||||
VS_ENVVAR_2019="VS160COMNTOOLS"
|
||||
VS_USE_UCRT_2019="true"
|
||||
@@ -103,35 +104,52 @@ VS_SDK_PLATFORM_NAME_2019=
|
||||
VS_SUPPORTED_2019=false
|
||||
VS_TOOLSET_SUPPORTED_2019=false
|
||||
|
||||
VS_DESCRIPTION_2022="Microsoft Visual Studio 2022"
|
||||
VS_VERSION_INTERNAL_2022=143
|
||||
VS_MSVCR_2022=vcruntime140.dll
|
||||
VS_VCRUNTIME_1_2022=vcruntime140_1.dll
|
||||
VS_MSVCP_2022=msvcp140.dll
|
||||
VS_ENVVAR_2022="VS170COMNTOOLS"
|
||||
VS_USE_UCRT_2022="true"
|
||||
VS_VS_INSTALLDIR_2022="Microsoft Visual Studio/2022"
|
||||
VS_EDITIONS_2022="BuildTools Community Professional Enterprise"
|
||||
VS_SDK_INSTALLDIR_2022=
|
||||
VS_VS_PLATFORM_NAME_2022="v143"
|
||||
VS_SDK_PLATFORM_NAME_2022=
|
||||
VS_SUPPORTED_2022=true
|
||||
VS_TOOLSET_SUPPORTED_2022=true
|
||||
|
||||
################################################################################
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
[
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
VS_VERSION="$1"
|
||||
VS_BASE="$2"
|
||||
METHOD="$3"
|
||||
TARGET_CPU="$1"
|
||||
VS_VERSION="$2"
|
||||
VS_BASE="$3"
|
||||
METHOD="$4"
|
||||
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
|
||||
# In VS 2017 and VS 2019, 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
|
||||
UTIL_FIXUP_PATH(VS_BASE, NOFAIL)
|
||||
|
||||
if test "x$VS_BASE" != x && test -d "$VS_BASE"; then
|
||||
# In VS 2017 and VS 2019, 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
|
||||
|
||||
if test -d "$VS_BASE"; then
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
if test "x$TARGET_CPU" = xx86; then
|
||||
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
elif test "x$TARGET_CPU" = xx86_64; then
|
||||
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
elif test "x$TARGET_CPU" = xaarch64; then
|
||||
# for host x86-64, target aarch64
|
||||
VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_arm64.bat"
|
||||
@@ -161,24 +179,27 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
[
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
VS_VERSION="$1"
|
||||
WIN_SDK_BASE="$2"
|
||||
METHOD="$3"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
if test -d "$WIN_SDK_BASE"; then
|
||||
TARGET_CPU="$1"
|
||||
VS_VERSION="$2"
|
||||
WIN_SDK_BASE="$3"
|
||||
METHOD="$4"
|
||||
|
||||
UTIL_FIXUP_PATH(WIN_SDK_BASE, NOFAIL)
|
||||
|
||||
if test "x$WIN_SDK_BASE" != x && test -d "$WIN_SDK_BASE"; then
|
||||
# There have been cases of partial or broken SDK installations. A missing
|
||||
# lib dir is not going to work.
|
||||
if test ! -d "$WIN_SDK_BASE/lib"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
|
||||
elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
|
||||
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
|
||||
if test "x$TARGET_CPU" = xx86; then
|
||||
VS_ENV_ARGS="/x86"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
elif test "x$TARGET_CPU" = xx86_64; then
|
||||
VS_ENV_ARGS="/x64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
elif test "x$TARGET_CPU" = xaarch64; then
|
||||
VS_ENV_ARGS="/arm64"
|
||||
fi
|
||||
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
|
||||
@@ -207,7 +228,8 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
|
||||
pass to vcvarsall.bat (Windows only)])])
|
||||
|
||||
VS_VERSION="$1"
|
||||
TARGET_CPU="$1"
|
||||
VS_VERSION="$2"
|
||||
eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
|
||||
eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
|
||||
eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
|
||||
@@ -221,9 +243,9 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
# 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.
|
||||
if test "x$with_tools_dir" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$with_tools_dir/../..], [--with-tools-dir])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$with_tools_dir/../../..], [--with-tools-dir])
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
# Having specified an argument which is incorrect will produce an instant failure;
|
||||
@@ -236,46 +258,46 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
fi
|
||||
|
||||
if test "x$VS_COMNTOOLS" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
|
||||
fi
|
||||
if test "x$PROGRAMFILES" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$PROGRAMFILES/$VS_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
# Work around the insanely named ProgramFiles(x86) env variable
|
||||
PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
|
||||
if test "x$PROGRAMFILES_X86" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$PROGRAMFILES_X86/$VS_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
[C:/Program Files/$VS_INSTALL_DIR], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
|
||||
[C:/Program Files (x86)/$VS_INSTALL_DIR], [well-known name])
|
||||
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[c:/program files/$VS_INSTALL_DIR], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[c:/program files (x86)/$VS_INSTALL_DIR], [well-known name])
|
||||
if test "x$SDK_INSTALL_DIR" != x; then
|
||||
if test "x$ProgramW6432" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$ProgramW6432/$SDK_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
if test "x$PROGRAMW6432" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$PROGRAMW6432/$SDK_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
if test "x$PROGRAMFILES" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[$PROGRAMFILES/$SDK_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||
[C:/Program Files/$SDK_INSTALL_DIR], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||
[C:/Program Files (x86)/$SDK_INSTALL_DIR], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[c:/program files/$SDK_INSTALL_DIR], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
|
||||
[c:/program files (x86)/$SDK_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
|
||||
VCVARS_VER=auto
|
||||
if test "x$VS_TOOLSET_SUPPORTED" != x; then
|
||||
if test "x$with_msvc_toolset_version" != x; then
|
||||
VS_ENV_ARGS="$VS_ENV_ARGS -vcvars_ver=$with_msvc_toolset_version"
|
||||
VCVARS_VER="$with_msvc_toolset_version"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@@ -306,30 +328,15 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
fi
|
||||
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||
eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
|
||||
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
|
||||
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
|
||||
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
|
||||
VS_PATH="$TOOLCHAIN_PATH:$PATH"
|
||||
|
||||
# Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
|
||||
# can still be exported as INCLUDE for compiler invocations without
|
||||
# SYSROOT_CFLAGS
|
||||
OLDIFS="$IFS"
|
||||
IFS=";"
|
||||
for i in $DEVKIT_VS_INCLUDE; do
|
||||
ipath=$i
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
|
||||
VS_INCLUDE="$VS_INCLUDE;$ipath"
|
||||
done
|
||||
# Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
|
||||
# as LIB for compiler invocations without SYSROOT_LDFLAGS
|
||||
for i in $DEVKIT_VS_LIB; do
|
||||
libpath=$i
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
|
||||
VS_LIB="$VS_LIB;$libpath"
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
# For historical reasons, paths are separated by ; in devkit.info
|
||||
VS_INCLUDE=${DEVKIT_VS_INCLUDE//;/:}
|
||||
VS_LIB=${DEVKIT_VS_LIB//;/:}
|
||||
|
||||
AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
|
||||
|
||||
@@ -347,12 +354,13 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
fi
|
||||
|
||||
for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
|
||||
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE([$VS_VERSION])
|
||||
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE($OPENJDK_TARGET_CPU, [$VS_VERSION])
|
||||
if test "x$VS_ENV_CMD" != x; then
|
||||
TOOLCHAIN_VERSION=$VS_VERSION
|
||||
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
|
||||
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||
eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
|
||||
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
|
||||
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
|
||||
@@ -368,146 +376,118 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV],
|
||||
[
|
||||
TARGET_CPU=$1
|
||||
|
||||
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables for $TARGET_CPU])
|
||||
AC_MSG_NOTICE([using $VS_ENV_CMD $VS_ENV_ARGS])
|
||||
|
||||
VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env-$TARGET_CPU"
|
||||
$MKDIR -p $VS_ENV_TMP_DIR
|
||||
|
||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
|
||||
# Instead create a shell script which will set the relevant variables when run.
|
||||
|
||||
OLDPATH="$PATH"
|
||||
# Make sure we only capture additions to PATH needed by VS.
|
||||
# Clear out path, but need system dir present for vsvars cmd file to be able to run
|
||||
export PATH=$WINENV_PREFIX/c/windows/system32
|
||||
# The "| cat" is to stop SetEnv.Cmd to mess with system colors on some systems
|
||||
# We can't pass -vcvars_ver=$VCVARS_VER here because cmd.exe eats all '='
|
||||
# in bat file arguments. :-(
|
||||
$FIXPATH $CMD /c "$TOPDIR/make/scripts/extract-vs-env.cmd" "$VS_ENV_CMD" \
|
||||
"$VS_ENV_TMP_DIR/set-vs-env.sh" $VCVARS_VER $VS_ENV_ARGS \
|
||||
> $VS_ENV_TMP_DIR/extract-vs-env.log | $CAT 2>&1
|
||||
PATH="$OLDPATH"
|
||||
|
||||
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
|
||||
AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
|
||||
AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
|
||||
AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Remove windows line endings
|
||||
$SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
|
||||
|
||||
# Now set all paths and other env variables by executing the generated
|
||||
# shell script. This will allow the rest of the configure script to find
|
||||
# and run the compiler in the proper way.
|
||||
AC_MSG_NOTICE([Setting extracted environment variables for $TARGET_CPU])
|
||||
. $VS_ENV_TMP_DIR/set-vs-env.sh
|
||||
|
||||
# Extract only what VS_ENV_CMD added to the PATH
|
||||
VS_PATH=${PATH_AFTER/"$PATH_BEFORE"}
|
||||
VS_PATH=${VS_PATH//::/:}
|
||||
|
||||
# Remove any paths containing # (typically F#) as that messes up make. This
|
||||
# is needed if visual studio was installed with F# support.
|
||||
[ VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'` ]
|
||||
|
||||
# Sometimes case is off
|
||||
if test -z "$WINDOWSSDKDIR"; then
|
||||
WINDOWSSDKDIR="$WindowsSdkDir"
|
||||
fi
|
||||
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
|
||||
# also define VCINSTALLDIR and WINDOWSSDKDIR. All are in
|
||||
# unix style.
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Check if the VS env variables were setup prior to running configure.
|
||||
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
||||
# the set env variables into the spec file.
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
[
|
||||
# Store path to cygwin link.exe to help excluding it when searching for
|
||||
# VS linker. This must be done before changing the PATH when looking for VS.
|
||||
AC_PATH_PROG(CYGWIN_LINK, link)
|
||||
if test "x$CYGWIN_LINK" != x; then
|
||||
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
|
||||
"$CYGWIN_LINK" --version > /dev/null
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
# This might be the VS linker. Don't exclude it later on.
|
||||
CYGWIN_LINK=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# First-hand choice is to locate and run the vsvars bat file.
|
||||
# Locate the vsvars bat file and save it as VS_ENV_CMD
|
||||
TOOLCHAIN_FIND_VISUAL_STUDIO
|
||||
|
||||
# If we have a devkit, skip all of the below.
|
||||
# If we have a devkit, we don't need to run VS_ENV_CMD
|
||||
if test "x$DEVKIT_VS_VERSION" = x; then
|
||||
if test "x$VS_ENV_CMD" != x; then
|
||||
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
||||
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||
# We have found a Visual Studio environment on disk, let's extract variables
|
||||
# from the vsvars bat file into shell variables in the configure script.
|
||||
TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV($OPENJDK_TARGET_CPU)
|
||||
|
||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
|
||||
|
||||
# We need to create a couple of temporary files.
|
||||
VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
|
||||
$MKDIR -p $VS_ENV_TMP_DIR
|
||||
|
||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
|
||||
# Instead create a shell script which will set the relevant variables when run.
|
||||
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
|
||||
WINPATH_BASH="$BASH"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
|
||||
|
||||
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
|
||||
# script (executable by bash) that will setup the important variables.
|
||||
EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
|
||||
$ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
|
||||
# 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
|
||||
# to trailing \ in the Windows paths. These will be stripped later.
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VCToolsRedistDir="'\"$VCToolsRedistDir \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
|
||||
# Now execute the newly created bat file.
|
||||
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
|
||||
# Change directory so we don't need to mess with Windows paths in redirects.
|
||||
cd $VS_ENV_TMP_DIR
|
||||
cmd /c extract-vs-env.bat | $CAT
|
||||
cd $CONFIGURE_START_DIR
|
||||
|
||||
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
|
||||
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Now set all paths and other env variables. This will allow the rest of
|
||||
# the configure script to find and run the compiler in the proper way.
|
||||
AC_MSG_NOTICE([Setting extracted environment variables])
|
||||
. $VS_ENV_TMP_DIR/set-vs-env.sh
|
||||
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
|
||||
# also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
|
||||
# also define VCINSTALLDIR and WINDOWSSDKDIR. All are in
|
||||
# unix style.
|
||||
else
|
||||
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
|
||||
# We did not find a vsvars bat file.
|
||||
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
|
||||
fi
|
||||
fi
|
||||
|
||||
# At this point, we should have correct variables in the environment, or we can't continue.
|
||||
AC_MSG_CHECKING([for Visual Studio variables])
|
||||
# At this point, we should have correct variables in the environment
|
||||
AC_MSG_CHECKING([that Visual Studio variables have been correctly extracted])
|
||||
|
||||
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
|
||||
|| test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
|
||||
if test "x$VCINSTALLDIR" != x || test "x$WINDOWSSDKDIR" != x \
|
||||
|| test "x$DEVKIT_NAME" != x; then
|
||||
if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
|
||||
AC_MSG_RESULT([present but broken])
|
||||
AC_MSG_RESULT([no; Visual Studio present but broken])
|
||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
# Remove any trailing "\" ";" and " " from the variables.
|
||||
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
|
||||
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
|
||||
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
|
||||
VCToolsRedistDir=`$ECHO "$VCToolsRedistDir" | $SED 's/\\\\* *$//'`
|
||||
WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
|
||||
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
|
||||
if test -z "$WINDOWSSDKDIR"; then
|
||||
WINDOWSSDKDIR="$WindowsSdkDir"
|
||||
fi
|
||||
# Remove any paths containing # (typically F#) as that messes up make. This
|
||||
# is needed if visual studio was installed with F# support.
|
||||
VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
|
||||
|
||||
AC_SUBST(VS_PATH)
|
||||
AC_SUBST(VS_INCLUDE)
|
||||
AC_SUBST(VS_LIB)
|
||||
# Turn VS_PATH into TOOLCHAIN_PATH
|
||||
TOOLCHAIN_PATH="$TOOLCHAIN_PATH:$VS_PATH"
|
||||
|
||||
# Convert VS_INCLUDE and VS_LIB into sysroot flags
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
|
||||
AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk])
|
||||
else
|
||||
AC_MSG_NOTICE([Running the extraction script failed.])
|
||||
AC_MSG_NOTICE([Running the extraction script failed])
|
||||
fi
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
|
||||
AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
|
||||
AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
])
|
||||
@@ -523,25 +503,15 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
|
||||
# Need to check if the found msvcr is correct architecture
|
||||
AC_MSG_CHECKING([found $DLL_NAME architecture])
|
||||
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
||||
# on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH="PE32 executable"
|
||||
else
|
||||
CORRECT_MSVCR_ARCH="PE32+ executable"
|
||||
fi
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
|
||||
# without specifying which architecture it is for specifically. This has been fixed upstream.
|
||||
# https://github.com/file/file/commit/b849b1af098ddd530094bf779b58431395db2e10#diff-ff2eced09e6860de75057dd731d092aeR142
|
||||
CORRECT_MSVCR_ARCH="PE32+ executable"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
|
||||
# without specifying which architecture it is for specifically. This has been fixed upstream.
|
||||
# https://github.com/file/file/commit/b849b1af098ddd530094bf779b58431395db2e10#diff-ff2eced09e6860de75057dd731d092aeR142
|
||||
CORRECT_MSVCR_ARCH="PE32+ executable"
|
||||
fi
|
||||
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
||||
AC_MSG_RESULT([ok])
|
||||
@@ -570,20 +540,15 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
|
||||
BASIC_FIXUP_PATH(CYGWIN_VC_INSTALL_DIR)
|
||||
if test "$VS_VERSION" -lt 2017; then
|
||||
# Probe: Using well-known location from Visual Studio 12.0 and older
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/$vs_target_cpu/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||
POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
|
||||
else
|
||||
CYGWIN_VC_TOOLS_REDIST_DIR="$VCToolsRedistDir"
|
||||
BASIC_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR)
|
||||
# Probe: Using well-known location from VS 2017 and VS 2019
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/$vs_target_cpu/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
|
||||
fi
|
||||
# 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
|
||||
@@ -599,40 +564,44 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
# Probe: Look in the Windows system32 directory
|
||||
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
[well-known location in SYSTEMROOT])
|
||||
WIN_SYSTEMROOT="$SYSTEMROOT"
|
||||
UTIL_FIXUP_PATH(WIN_SYSTEMROOT, NOFAIL)
|
||||
if test "x$WIN_SYSTEMROOT" != x; then
|
||||
POSSIBLE_MSVC_DLL="$WIN_SYSTEMROOT/system32/$DLL_NAME"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
[well-known location in SYSTEMROOT])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
# Probe: If Visual Studio Express is installed, there is usually one with the debugger
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
|
||||
WIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
|
||||
UTIL_FIXUP_PATH(WIN_VS_TOOLS_DIR, NOFAIL)
|
||||
if test "x$WIN_VS_TOOLS_DIR" != x; then
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$WIN_VS_TOOLS_DIR" -name $DLL_NAME \
|
||||
| $GREP -i /$vs_target_cpu/ | $HEAD --lines 1`
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
[search of VS100COMNTOOLS])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
[search of VS100COMNTOOLS])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
|
||||
# (This was the original behaviour; kept since it might turn something up)
|
||||
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
|
||||
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
|
||||
if test "x$POSSIBLE_MSVC_DLL" = x; then
|
||||
# We're grasping at straws now...
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
|
||||
| $HEAD --lines 1`
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
|
||||
| $HEAD --lines 1`
|
||||
fi
|
||||
else
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
|
||||
| $GREP $vs_target_cpu | $HEAD --lines 1`
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
|
||||
| $GREP x64 | $HEAD --lines 1`
|
||||
fi
|
||||
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
@@ -695,10 +664,35 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
AC_SUBST(MSVCP_DLL)
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(vcruntime-1-dll, [AS_HELP_STRING([--with-vcruntime-1-dll],
|
||||
[path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows x64 only) @<:@probed@:>@])])
|
||||
|
||||
if test "x$VCRUNTIME_1_NAME" != "x" && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
if test "x$with_vcruntime_1_dll" != x; then
|
||||
# If given explicitly by user, do not probe. If not present, fail directly.
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$with_vcruntime_1_dll],
|
||||
[--with-vcruntime-1-dll])
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by --with-vcruntime-1-dll])
|
||||
fi
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
elif test "x$DEVKIT_VCRUNTIME_1_DLL" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$DEVKIT_VCRUNTIME_1_DLL], [devkit])
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by devkit])
|
||||
fi
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}])
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(VCRUNTIME_1_DLL)
|
||||
|
||||
AC_ARG_WITH(ucrt-dll-dir, [AS_HELP_STRING([--with-ucrt-dll-dir],
|
||||
[path to Microsoft Windows Kit UCRT DLL dir (Windows only) @<:@probed@:>@])])
|
||||
|
||||
if test "x$USE_UCRT" = "xtrue"; then
|
||||
if test "x$USE_UCRT" = "xtrue" && test "x$OPENJDK_TARGET_CPU" != xaarch64; then
|
||||
AC_MSG_CHECKING([for UCRT DLL dir])
|
||||
if test "x$with_ucrt_dll_dir" != x; then
|
||||
if test -z "$(ls -d "$with_ucrt_dll_dir/"*.dll 2> /dev/null)"; then
|
||||
@@ -707,26 +701,22 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
else
|
||||
AC_MSG_RESULT([$with_ucrt_dll_dir])
|
||||
UCRT_DLL_DIR="$with_ucrt_dll_dir"
|
||||
BASIC_FIXUP_PATH([UCRT_DLL_DIR])
|
||||
UTIL_FIXUP_PATH([UCRT_DLL_DIR])
|
||||
fi
|
||||
elif test "x$DEVKIT_UCRT_DLL_DIR" != "x"; then
|
||||
UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"
|
||||
AC_MSG_RESULT($UCRT_DLL_DIR)
|
||||
else
|
||||
CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}"
|
||||
BASIC_FIXUP_PATH([CYGWIN_WINDOWSSDKDIR])
|
||||
dll_subdir=$OPENJDK_TARGET_CPU
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
if test "x$dll_subdir" = "xaarch64"; then
|
||||
dll_subdir="arm64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
||||
elif test "x$dll_subdir" = "xx86_64"; then
|
||||
dll_subdir="x64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xx86"; then
|
||||
dll_subdir="x86"
|
||||
fi
|
||||
UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
|
||||
UCRT_DLL_DIR="$WINDOWSSDKDIR/redist/ucrt/dlls/$dll_subdir"
|
||||
if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
|
||||
# Try with version subdir
|
||||
UCRT_DLL_DIR="`ls -d $CYGWIN_WINDOWSSDKDIR/Redist/*/ucrt/DLLs/$dll_subdir \
|
||||
UCRT_DLL_DIR="`ls -d $WINDOWSSDKDIR/redist/*/ucrt/dlls/$dll_subdir \
|
||||
2> /dev/null | $SORT -d | $HEAD -n1`"
|
||||
if test -z "$UCRT_DLL_DIR" \
|
||||
|| test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
|
||||
@@ -748,43 +738,24 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
|
||||
# that configure can use them while detecting compilers.
|
||||
# TOOLCHAIN_TYPE is available here.
|
||||
# Param 1 - Optional prefix to all variables. (e.g BUILD_)
|
||||
# Param 1 - Optional prefix to SYSROOT variables. (e.g BUILD_)
|
||||
# Param 2 - Optional prefix to VS variables. (e.g BUILD_)
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS],
|
||||
[
|
||||
# Convert $1VS_INCLUDE into $1SYSROOT_CFLAGS
|
||||
OLDIFS="$IFS"
|
||||
IFS=";"
|
||||
for i in [$]$1VS_INCLUDE; do
|
||||
ipath=$i
|
||||
# Only process non-empty elements
|
||||
if test "x$ipath" != x; then
|
||||
IFS="$OLDIFS"
|
||||
# Check that directory exists before calling fixup_path
|
||||
testpath=$ipath
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
|
||||
if test -d "$testpath"; then
|
||||
BASIC_FIXUP_PATH([ipath])
|
||||
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -I$ipath"
|
||||
fi
|
||||
IFS=";"
|
||||
fi
|
||||
IFS=":"
|
||||
|
||||
# Convert VS_INCLUDE into SYSROOT_CFLAGS
|
||||
for ipath in [$]$2VS_INCLUDE; do
|
||||
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -I$ipath"
|
||||
done
|
||||
# Convert $1VS_LIB into $1SYSROOT_LDFLAGS
|
||||
for i in [$]$1VS_LIB; do
|
||||
libpath=$i
|
||||
# Only process non-empty elements
|
||||
if test "x$libpath" != x; then
|
||||
IFS="$OLDIFS"
|
||||
# Check that directory exists before calling fixup_path
|
||||
testpath=$libpath
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
|
||||
if test -d "$testpath"; then
|
||||
BASIC_FIXUP_PATH([libpath])
|
||||
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -libpath:$libpath"
|
||||
fi
|
||||
IFS=";"
|
||||
fi
|
||||
|
||||
# Convert VS_LIB into SYSROOT_LDFLAGS
|
||||
for libpath in [$]$2VS_LIB; do
|
||||
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -libpath:$libpath"
|
||||
done
|
||||
|
||||
IFS="$OLDIFS"
|
||||
|
||||
AC_SUBST($1SYSROOT_CFLAGS)
|
||||
824
make/autoconf/util.m4
Normal file
824
make/autoconf/util.m4
Normal file
@@ -0,0 +1,824 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
m4_include([util_paths.m4])
|
||||
|
||||
###############################################################################
|
||||
# Create a function/macro that takes a series of named arguments. The call is
|
||||
# similar to AC_DEFUN, but the setup of the function looks like this:
|
||||
# UTIL_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
|
||||
# ... do something
|
||||
# AC_MSG_NOTICE([Value of BAR is ARG_BAR])
|
||||
# ])
|
||||
# A star (*) in front of a named argument means that it is required and it's
|
||||
# presence will be verified. To pass e.g. the first value as a normal indexed
|
||||
# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
|
||||
# arguments are referenced in the function by their name prefixed by ARG_, e.g.
|
||||
# "ARG_FOO".
|
||||
#
|
||||
# The generated function can be called like this:
|
||||
# MYFUNC(FOO: [foo-val],
|
||||
# BAR: [
|
||||
# $ECHO hello world
|
||||
# ])
|
||||
# Note that the argument value must start on the same line as the argument name.
|
||||
#
|
||||
# Argument 1: Name of the function to define
|
||||
# Argument 2: List of legal named arguments, with a * prefix for required arguments
|
||||
# Argument 3: Argument array to treat as named, typically $@
|
||||
# Argument 4: The main function body
|
||||
AC_DEFUN([UTIL_DEFUN_NAMED],
|
||||
[
|
||||
AC_DEFUN($1, [
|
||||
m4_foreach([arg], m4_split(m4_normalize($2)), [
|
||||
m4_if(m4_bregexp(arg, [^\*]), -1,
|
||||
[
|
||||
m4_set_add(legal_named_args, arg)
|
||||
],
|
||||
[
|
||||
m4_set_add(legal_named_args, m4_substr(arg, 1))
|
||||
m4_set_add(required_named_args, m4_substr(arg, 1))
|
||||
]
|
||||
)
|
||||
])
|
||||
|
||||
# Delicate quoting and unquoting sequence to ensure the actual value is passed along unchanged
|
||||
# For details on how this works, see https://git.openjdk.org/jdk/pull/11458#discussion_r1038173051
|
||||
# WARNING: Proceed at the risk of your own sanity, getting this to work has made me completely
|
||||
# incapable of feeling love or any other positive emotion
|
||||
# ~Julian
|
||||
m4_foreach([arg], m4_dquote(m4_dquote_elt($3)), [
|
||||
m4_if(m4_index(arg, [: ]), -1, [m4_define([arg], m4_dquote(m4_bpatsubst(m4_dquote(arg), [:], [: ])))])
|
||||
m4_define(arg_name, m4_substr(arg, 0, m4_index(arg, [: ])))
|
||||
m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: m4_if(arg_name, , arg, arg_name) is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(defined_args, [ ]) m4_set_contents(legal_named_args, [ ])'.])])
|
||||
m4_set_remove(required_named_args, arg_name)
|
||||
m4_set_remove(legal_named_args, arg_name)
|
||||
m4_pushdef([ARG_][]arg_name, m4_bpatsubst(m4_bpatsubst(m4_dquote(m4_dquote(arg)), arg_name[: ]), [^\s*]))
|
||||
m4_set_add(defined_args, arg_name)
|
||||
m4_undefine([arg_name])
|
||||
])
|
||||
m4_set_empty(required_named_args, [], [
|
||||
AC_MSG_ERROR([Internal error: Required named arguments are missing for [$1]. Missing arguments: 'm4_set_contents(required_named_args, [ ])'])
|
||||
])
|
||||
m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([legal_named_args])), [
|
||||
m4_pushdef([ARG_][]arg, [])
|
||||
m4_set_add(defined_args, arg)
|
||||
])
|
||||
m4_set_delete(legal_named_args)
|
||||
m4_set_delete(required_named_args)
|
||||
|
||||
# Execute function body
|
||||
$4
|
||||
|
||||
m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([defined_args])), [
|
||||
m4_popdef([ARG_][]arg)
|
||||
])
|
||||
|
||||
m4_set_delete(defined_args)
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that a shell expression gives return code 0
|
||||
#
|
||||
# $1: The shell expression to evaluate
|
||||
# $2: A message to describe the expression in case of failure
|
||||
# $2: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_SHELL_TEST],
|
||||
[
|
||||
ASSERTION_MSG="m4_normalize([$3])"
|
||||
if $1; then
|
||||
$ECHO Assertion failed: $2
|
||||
if test "x$3" != x; then
|
||||
$ECHO Assertion message: "$3"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that two strings are equal.
|
||||
#
|
||||
# $1: The actual string found
|
||||
# $2: The expected string
|
||||
# $3: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_STRING_EQUALS],
|
||||
[
|
||||
UTIL_ASSERT_SHELL_TEST(
|
||||
[test "x[$1]" != "x[$2]"],
|
||||
[Actual value '[$1]' \("[$1]"\) did not match expected value '[$2]' \("[$2]"\)],
|
||||
$3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that two strings not are equal.
|
||||
#
|
||||
# $1: The actual string found
|
||||
# $2: The expected string
|
||||
# $3: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_STRING_NOT_EQUALS],
|
||||
[
|
||||
UTIL_ASSERT_SHELL_TEST(
|
||||
[test "x[$1]" = "x[$2]"],
|
||||
[Actual value '[$1]' \("[$1]"\) unexpectedly matched '[$2]' \("[$2]"\)],
|
||||
$3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that the given expression evaluates to the string 'true'
|
||||
#
|
||||
# $1: The expression to evaluate
|
||||
# $2: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_TRUE],
|
||||
[
|
||||
UTIL_ASSERT_STRING_EQUALS($1, true, $3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that the given expression does not evaluate to the string 'true'
|
||||
#
|
||||
# $1: The expression to evaluate
|
||||
# $2: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_NOT_TRUE],
|
||||
[
|
||||
UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if a list of space-separated words are selected only from a list of
|
||||
# space-separated legal words. Typical use is to see if a user-specified
|
||||
# set of words is selected from a set of legal words.
|
||||
#
|
||||
# Sets the specified variable to list of non-matching (offending) words, or to
|
||||
# the empty string if all words are matching the legal set.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: list of values to check
|
||||
# $3: list of legal values
|
||||
AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
|
||||
[
|
||||
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
|
||||
# Notice that the original variant fails on SLES 10 and 11
|
||||
# Some grep versions (at least bsd) behaves strangely on the base case with
|
||||
# no legal_values, so make it explicit.
|
||||
values_to_check=`$ECHO $2 | $TR ' ' '\n'`
|
||||
legal_values=`$ECHO $3 | $TR ' ' '\n'`
|
||||
if test -z "$legal_values"; then
|
||||
$1="$2"
|
||||
else
|
||||
result=`$GREP -Fvx "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if a list of space-separated words contains any word(s) from a list of
|
||||
# space-separated illegal words. Typical use is to see if a user-specified
|
||||
# set of words contains any from a set of illegal words.
|
||||
#
|
||||
# Sets the specified variable to list of matching illegal words, or to
|
||||
# the empty string if no words are matching the illegal set.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: list of values to check
|
||||
# $3: list of illegal values
|
||||
AC_DEFUN([UTIL_GET_MATCHING_VALUES],
|
||||
[
|
||||
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
|
||||
# Notice that the original variant fails on SLES 10 and 11
|
||||
# Some grep versions (at least bsd) behaves strangely on the base case with
|
||||
# no legal_values, so make it explicit.
|
||||
values_to_check=`$ECHO $2 | $TR ' ' '\n'`
|
||||
illegal_values=`$ECHO $3 | $TR ' ' '\n'`
|
||||
if test -z "$illegal_values"; then
|
||||
$1=""
|
||||
else
|
||||
result=`$GREP -Fx "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
|
||||
# suitable conversion method was found, an empty string is returned.
|
||||
#
|
||||
# Sets the specified variable to the resulting list.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: input date/time string
|
||||
AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
|
||||
[
|
||||
timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
|
||||
if test "x$timestamp" = x; then
|
||||
# GNU date format did not work, try BSD date options
|
||||
timestamp=$($DATE -j -f "%F %T" "$2" "+%s" 2> /dev/null)
|
||||
if test "x$timestamp" = x; then
|
||||
# Perhaps the time was missing
|
||||
timestamp=$($DATE -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
|
||||
# If this did not work, we give up and return the empty string
|
||||
fi
|
||||
fi
|
||||
$1=$timestamp
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Sort a space-separated list, and remove duplicates.
|
||||
#
|
||||
# Sets the specified variable to the resulting list.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: list of values to sort
|
||||
AC_DEFUN([UTIL_SORT_LIST],
|
||||
[
|
||||
values_to_sort=`$ECHO $2 | $TR ' ' '\n'`
|
||||
result=`$SORT -u <<< "$values_to_sort" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
|
||||
# If so, then append $1 to $2 \
|
||||
# Also set JVM_ARG_OK to true/false depending on outcome.
|
||||
AC_DEFUN([UTIL_ADD_JVM_ARG_IF_OK],
|
||||
[
|
||||
$ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
|
||||
OUTPUT=`$3 $1 $USER_BOOT_JDK_OPTIONS -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
$2="[$]$2 $1"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Register a --with argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --with-
|
||||
AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
|
||||
[
|
||||
AC_ARG_WITH($1, [AS_HELP_STRING([--with-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])],
|
||||
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Register a --enable argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --enable-
|
||||
# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
|
||||
# $3: Messages to user.
|
||||
AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
|
||||
[
|
||||
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])])
|
||||
if test "x$enable_$2" != x; then
|
||||
AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])
|
||||
|
||||
if test "x$3" != x; then
|
||||
AC_MSG_WARN([$3])
|
||||
fi
|
||||
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Register an --enable-* argument as an alias for another argument.
|
||||
# $1: The name of the enable argument for the new alias, not including --enable-
|
||||
# $2: The full name of the argument of which to make this an alias, including
|
||||
# --enable- or --with-.
|
||||
AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
|
||||
[
|
||||
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1], [alias for $2])], [
|
||||
# Use m4 to strip initial -- from target ($2), convert - to _, prefix enable_
|
||||
# to new alias name, and create a shell variable assignment,
|
||||
# e.g.: enable_old_style="$enable_new_alias"
|
||||
translit(patsubst($2, --), -, _)="$[enable_]translit($1, -, _)"
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Creates a command-line option using the --enable-* pattern. Will return a
|
||||
# value of 'true' or 'false' in the RESULT variable, depending on whether the
|
||||
# option was enabled or not by the user. The option can not be turned on if it
|
||||
# is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE.
|
||||
#
|
||||
# Arguments:
|
||||
# NAME: The base name of this option (i.e. what follows --enable-). Required.
|
||||
# RESULT: The name of the variable to set to the result. Defaults to
|
||||
# <NAME in uppercase>_ENABLED.
|
||||
# DEFAULT: The default value for this option. Can be true, false or auto.
|
||||
# Defaults to true.
|
||||
# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
|
||||
# DESC: A description of this option. Defaults to a generic and unhelpful
|
||||
# string.
|
||||
# DEFAULT_DESC: A message describing the default value, for the help. Defaults
|
||||
# to the literal value of DEFAULT.
|
||||
# CHECKING_MSG: The message to present to user when checking this option.
|
||||
# Defaults to a generic message.
|
||||
# CHECK_AVAILABLE: An optional code block to execute to determine if the
|
||||
# option should be available. Must set AVAILABLE to 'false' if not.
|
||||
# IF_GIVEN: An optional code block to execute if the option was given on the
|
||||
# command line (regardless of the value).
|
||||
# IF_NOT_GIVEN: An optional code block to execute if the option was not given
|
||||
# on the command line (regardless of the value).
|
||||
# IF_ENABLED: An optional code block to execute if the option is turned on.
|
||||
# IF_DISABLED: An optional code block to execute if the option is turned off.
|
||||
#
|
||||
UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
[*NAME RESULT DEFAULT AVAILABLE DESC DEFAULT_DESC CHECKING_MSG
|
||||
CHECK_AVAILABLE IF_GIVEN IF_NOT_GIVEN IF_ENABLED IF_DISABLED], [$@],
|
||||
[
|
||||
##########################
|
||||
# Part 1: Set up m4 macros
|
||||
##########################
|
||||
|
||||
# If DEFAULT is not specified, set it to 'true'.
|
||||
m4_define([ARG_DEFAULT], m4_if(ARG_DEFAULT, , true, ARG_DEFAULT))
|
||||
|
||||
# If AVAILABLE is not specified, set it to 'true'.
|
||||
m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE))
|
||||
|
||||
# If DEFAULT_DESC is not specified, calculate it from DEFAULT.
|
||||
m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, true, enabled, m4_if(ARG_DEFAULT, false, disabled, ARG_DEFAULT)), ARG_DEFAULT_DESC))
|
||||
|
||||
# If RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'.
|
||||
m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_RESULT))
|
||||
# Construct shell variable names for the option
|
||||
m4_define(ARG_OPTION, [enable_]m4_translit(ARG_NAME, [-], [_]))
|
||||
m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN])
|
||||
|
||||
# If DESC is not specified, set it to a generic description.
|
||||
m4_define([ARG_DESC], m4_if(m4_quote(ARG_DESC), , [[Enable the ARG_NAME feature]], [m4_normalize(ARG_DESC)]))
|
||||
|
||||
# If CHECKING_MSG is not specified, set it to a generic description.
|
||||
m4_define([ARG_CHECKING_MSG], m4_if(m4_quote(ARG_CHECKING_MSG), , [[for --enable-ARG_NAME]], [m4_normalize(ARG_CHECKING_MSG)]))
|
||||
|
||||
# If the code blocks are not given, set them to the empty statements to avoid
|
||||
# tripping up bash.
|
||||
m4_if(ARG_CHECK_AVAILABLE, , [m4_define([ARG_CHECK_AVAILABLE], [:])])
|
||||
m4_if(ARG_IF_GIVEN, , [m4_define([ARG_IF_GIVEN], [:])])
|
||||
m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])])
|
||||
m4_if(ARG_IF_ENABLED, , [m4_define([ARG_IF_ENABLED], [:])])
|
||||
m4_if(ARG_IF_DISABLED, , [m4_define([ARG_IF_DISABLED], [:])])
|
||||
|
||||
##########################
|
||||
# Part 2: Set up autoconf shell code
|
||||
##########################
|
||||
|
||||
# Check that DEFAULT has a valid value
|
||||
if test "[x]ARG_DEFAULT" != xtrue && test "[x]ARG_DEFAULT" != xfalse && \
|
||||
test "[x]ARG_DEFAULT" != xauto ; then
|
||||
AC_MSG_ERROR([Internal error: Argument DEFAULT to [UTIL_ARG_ENABLE] can only be true, false or auto, was: 'ARG_DEFAULT'])
|
||||
fi
|
||||
|
||||
# Check that AVAILABLE has a valid value
|
||||
if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then
|
||||
AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_ENABLE] can only be true or false, was: 'ARG_AVAILABLE'])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(ARG_NAME, AS_HELP_STRING([--enable-]ARG_NAME,
|
||||
[ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false])
|
||||
|
||||
# Check if the option is available
|
||||
AVAILABLE=ARG_AVAILABLE
|
||||
# Run the available check block (if any), which can overwrite AVAILABLE.
|
||||
ARG_CHECK_AVAILABLE
|
||||
|
||||
# Check if the option should be turned on
|
||||
AC_MSG_CHECKING(ARG_CHECKING_MSG)
|
||||
if test x$ARG_GIVEN = xfalse; then
|
||||
if test ARG_DEFAULT = auto; then
|
||||
# If not given, and default is auto, set it to true iff it's available.
|
||||
ARG_RESULT=$AVAILABLE
|
||||
REASON="from default 'auto'"
|
||||
else
|
||||
ARG_RESULT=ARG_DEFAULT
|
||||
REASON="default"
|
||||
fi
|
||||
else
|
||||
if test x$ARG_OPTION = xyes; then
|
||||
ARG_RESULT=true
|
||||
REASON="from command line"
|
||||
elif test x$ARG_OPTION = xno; then
|
||||
ARG_RESULT=false
|
||||
REASON="from command line"
|
||||
elif test x$ARG_OPTION = xauto; then
|
||||
if test ARG_DEFAULT = auto; then
|
||||
# If both given and default is auto, set it to true iff it's available.
|
||||
ARG_RESULT=$AVAILABLE
|
||||
else
|
||||
ARG_RESULT=ARG_DEFAULT
|
||||
fi
|
||||
REASON="from command line 'auto'"
|
||||
else
|
||||
AC_MSG_ERROR([Option [--enable-]ARG_NAME can only be 'yes', 'no' or 'auto'])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$ARG_RESULT = xtrue; then
|
||||
AC_MSG_RESULT([enabled, $REASON])
|
||||
if test x$AVAILABLE = xfalse; then
|
||||
AC_MSG_ERROR([Option [--enable-]ARG_NAME is not available])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([disabled, $REASON])
|
||||
fi
|
||||
|
||||
# Execute result payloads, if present
|
||||
if test x$ARG_GIVEN = xtrue; then
|
||||
ARG_IF_GIVEN
|
||||
else
|
||||
ARG_IF_NOT_GIVEN
|
||||
fi
|
||||
|
||||
if test x$ARG_RESULT = xtrue; then
|
||||
ARG_IF_ENABLED
|
||||
else
|
||||
ARG_IF_DISABLED
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Helper functions for ARG_WITH, to validate different types of argument
|
||||
|
||||
# Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE
|
||||
AC_DEFUN([UTIL_CHECK_TYPE],
|
||||
[
|
||||
UTIL_CHECK_TYPE_$1($2)
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_string],
|
||||
[
|
||||
# All strings always passes
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_integer],
|
||||
[
|
||||
# Check that the argument is an integer
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ ! "$1" =~ ^[0-9]+$ ]] ; then ]
|
||||
FAILURE="Not an integer: $1"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_file],
|
||||
[
|
||||
# Check that the argument is an existing file
|
||||
if test ! -f "$1" ; then
|
||||
FAILURE="File $1 does not exist or is not readable"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_directory],
|
||||
[
|
||||
# Check that the argument is an existing directory
|
||||
if test ! -d "$1" ; then
|
||||
FAILURE="Directory $1 does not exist or is not readable"
|
||||
fi
|
||||
|
||||
if test "[x]ARG_CHECK_FOR_FILES" != x; then
|
||||
for file in ARG_CHECK_FOR_FILES; do
|
||||
found_files=$($ECHO $(ls $1/$file 2> /dev/null))
|
||||
if test "x$found_files" = x; then
|
||||
FAILURE="Directory $1 does not contain $file"
|
||||
break
|
||||
elif ! test -e "$found_files"; then
|
||||
FAILURE="Directory $1 contains multiple $file: $found_files"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_literal],
|
||||
[
|
||||
# Check if it contains a space between non-space characters
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ "$1" =~ [^' ']' '+[^' '] ]] ; then ]
|
||||
FAILURE="Multiple words: $1"
|
||||
fi
|
||||
|
||||
# Check that the selected variants are valid
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_value, $1, \
|
||||
ARG_VALID_VALUES)
|
||||
if test "x$invalid_value" != x; then
|
||||
FAILURE="Invalid value: $invalid_value. Valid values are: ARG_VALID_VALUES"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_multivalue],
|
||||
[
|
||||
# We accept either space or comma as separator, but use space internally
|
||||
values=`$ECHO $1 | $SED -e 's/,/ /g'`
|
||||
|
||||
# Check that the selected variants are valid
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_value, $values, \
|
||||
ARG_VALID_VALUES)
|
||||
if test "x$invalid_value" != x; then
|
||||
FAILURE="Invalid value(s): $invalid_value. Valid values are: ARG_VALID_VALUES"
|
||||
fi
|
||||
|
||||
# Update to version without comma
|
||||
ARG_RESULT=$($ECHO $values)
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_features],
|
||||
[
|
||||
# We accept either space or comma as separator, but use space internally
|
||||
feature_list=`$ECHO $1 | $SED -e 's/,/ /g'`
|
||||
features_enabled=`$ECHO $feature_list | \
|
||||
$AWK '{ for (i=1; i<=NF; i++) if (!match($i, /^-.*/)) printf("%s ", $i) }'`
|
||||
features_disabled=`$ECHO $feature_list | \
|
||||
$AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'`
|
||||
|
||||
# Check that the selected features are valid
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_features, $features_enabled \
|
||||
$features_disabled, ARG_VALID_VALUES)
|
||||
if test "x$invalid_features" != x; then
|
||||
FAILURE="Invalid feature(s): $invalid_features. Valid values are: ARG_VALID_VALUES"
|
||||
fi
|
||||
|
||||
# Update to version without comma
|
||||
ARG_RESULT=$($ECHO $feature_list)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Creates a command-line option using the --with-* pattern. Will return a
|
||||
# string in the RESULT variable with the option provided by the user, or the
|
||||
# empty string if the --with-* option was not given. The option can not be given
|
||||
# if it is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE.
|
||||
#
|
||||
# Arguments:
|
||||
# NAME: The base name of this option (i.e. what follows --with-). Required.
|
||||
# TYPE: The type of the value. Can be one of "string", "integer", "file",
|
||||
# "directory", "literal", "multivalue" or "features". Required.
|
||||
# DEFAULT: The default value for this option. Can be any valid string.
|
||||
# Required.
|
||||
# OPTIONAL: If this feature can be disabled. Defaults to false. If true,
|
||||
# the feature can be disabled using --without-FOO, --with-FOO=no, or
|
||||
# --with-FOO=. Check the ENABLED_RESULT variable for the enabled/disabled
|
||||
# state.
|
||||
# RESULT: The name of the variable to set to the result. Defaults to
|
||||
# <NAME in uppercase>. Set to empty if ENABLED_RESULT is false.
|
||||
# ENABLED_DEFAULT: If the value is enabled by default. Defaults to false. Only
|
||||
# relevant if OPTIONAL is true.
|
||||
# ENABLED_RESULT: The name of the variable to set to the enabled/disabled
|
||||
# result state. Defaults to <NAME in uppercase>_ENABLED.
|
||||
# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
|
||||
# DESC: A description of this option. Defaults to a generic and unhelpful
|
||||
# string.
|
||||
# DEFAULT_DESC: A message describing the default value, for the help. Defaults
|
||||
# to the literal value of DEFAULT, or "<none>" if DEFAULT is empty.
|
||||
# CHECKING_MSG: The message to present to user when checking this option.
|
||||
# Defaults to a generic message.
|
||||
# CHECK_AVAILABLE: An optional code block to execute to determine if the
|
||||
# option should be available. Must set AVAILABLE to 'false' if not.
|
||||
# VALID_VALUES: A list of literals that are the allowed values. Only valid if
|
||||
# TYPE is "literal", "multivalue" or "features".
|
||||
# CHECK_VALUE: An optional code block to execute to determine if the value
|
||||
# is correct. Must set FAILURE to a non-empty string if not. This string
|
||||
# will be displayed. The value is given in $RESULT.
|
||||
# CHECK_FOR_FILES: A list of files to verify the presence for. Only valid if
|
||||
# TYPE is "directory". Paths are relative the directory given as value.
|
||||
# Wildcards are accepted. Exactly one matching file must be found, for each
|
||||
# listed file, or FAILURE is set.
|
||||
# IF_AUTO: An optional code block to execute if the value is "auto", either by
|
||||
# default or given by the command line. Must set RESULT to the calculated
|
||||
# value.
|
||||
# IF_GIVEN: An optional code block to execute if the option was given on the
|
||||
# command line (regardless of the value).
|
||||
# IF_NOT_GIVEN: An optional code block to execute if the option was not given
|
||||
# on the command line (regardless of the value).
|
||||
#
|
||||
UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
|
||||
[*NAME *TYPE *DEFAULT OPTIONAL RESULT ENABLED_DEFAULT ENABLED_RESULT
|
||||
AVAILABLE DESC DEFAULT_DESC CHECKING_MSG CHECK_AVAILABLE VALID_VALUES
|
||||
CHECK_VALUE CHECK_FOR_FILES IF_AUTO IF_GIVEN IF_NOT_GIVEN], [$@],
|
||||
[
|
||||
##########################
|
||||
# Part 1: Set up m4 macros
|
||||
##########################
|
||||
|
||||
# If ENABLED_DEFAULT is not specified, set it to 'false'.
|
||||
m4_define([ARG_ENABLED_DEFAULT], m4_if(ARG_ENABLED_DEFAULT, , false, ARG_ENABLED_DEFAULT))
|
||||
|
||||
# If AVAILABLE is not specified, set it to 'true'.
|
||||
m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE))
|
||||
|
||||
# If OPTIONAL is not specified, set it to 'false'.
|
||||
m4_define([ARG_OPTIONAL], m4_if(ARG_OPTIONAL, , false, ARG_OPTIONAL))
|
||||
|
||||
# If DEFAULT_DESC is not specified, calculate it from DEFAULT.
|
||||
m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, , <none>, ARG_DEFAULT), ARG_DEFAULT_DESC))
|
||||
|
||||
# If RESULT is not specified, set it to 'ARG_NAME'.
|
||||
m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_]), ARG_RESULT))
|
||||
|
||||
# If ENABLED_RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'.
|
||||
m4_define([ARG_ENABLED_RESULT], m4_if(ARG_ENABLED_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_ENABLED_RESULT))
|
||||
|
||||
# Construct shell variable names for the option
|
||||
m4_define(ARG_OPTION, [with_]m4_translit(ARG_NAME, [-], [_]))
|
||||
m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN])
|
||||
|
||||
# If DESC is not specified, set it to a generic description.
|
||||
m4_define([ARG_DESC], m4_if(m4_quote(ARG_DESC), , [[Give a value for the ARG_NAME feature]], [m4_normalize(ARG_DESC)]))
|
||||
|
||||
# If CHECKING_MSG is not specified, set it to a generic description.
|
||||
m4_define([ARG_CHECKING_MSG], m4_if(m4_quote(ARG_CHECKING_MSG), , [[for --with-ARG_NAME]], [m4_normalize(ARG_CHECKING_MSG)]))
|
||||
|
||||
m4_define([ARG_HAS_AUTO_BLOCK], m4_if(ARG_IF_AUTO, , false, true))
|
||||
|
||||
# If the code blocks are not given, set them to the empty statements to avoid
|
||||
# tripping up bash.
|
||||
m4_if(ARG_CHECK_AVAILABLE, , [m4_define([ARG_CHECK_AVAILABLE], [:])])
|
||||
m4_if(ARG_CHECK_VALUE, , [m4_define([ARG_CHECK_VALUE], [:])])
|
||||
m4_if(ARG_CHECK_FOR_FILES, , [m4_define([ARG_CHECK_FOR_FILES], [:])])
|
||||
m4_if(ARG_IF_AUTO, , [m4_define([ARG_IF_AUTO], [:])])
|
||||
m4_if(ARG_IF_GIVEN, , [m4_define([ARG_IF_GIVEN], [:])])
|
||||
m4_if(ARG_IF_NOT_GIVEN, , [m4_define([ARG_IF_NOT_GIVEN], [:])])
|
||||
|
||||
##########################
|
||||
# Part 2: Set up autoconf shell code
|
||||
##########################
|
||||
|
||||
# Check that OPTIONAL has a valid value
|
||||
if test "[x]ARG_OPTIONAL" != xtrue && test "[x]ARG_OPTIONAL" != xfalse ; then
|
||||
AC_MSG_ERROR([Internal error: Argument OPTIONAL to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_OPTIONAL'])
|
||||
fi
|
||||
|
||||
# Check that ENABLED_DEFAULT has a valid value
|
||||
if test "[x]ARG_ENABLED_DEFAULT" != xtrue && test "[x]ARG_ENABLED_DEFAULT" != xfalse ; then
|
||||
AC_MSG_ERROR([Internal error: Argument ENABLED_DEFAULT to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_ENABLED_DEFAULT'])
|
||||
fi
|
||||
|
||||
# Check that AVAILABLE has a valid value
|
||||
if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then
|
||||
AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_AVAILABLE'])
|
||||
fi
|
||||
|
||||
# Check that TYPE has a valid value
|
||||
# Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement
|
||||
TEST_TYPE="ARG_TYPE"
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ]
|
||||
AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE'])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(ARG_NAME, AS_HELP_STRING([--with-]ARG_NAME,
|
||||
[ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false])
|
||||
|
||||
# Check if the option is available
|
||||
AVAILABLE=ARG_AVAILABLE
|
||||
# Run the available check block (if any), which can overwrite AVAILABLE.
|
||||
ARG_CHECK_AVAILABLE
|
||||
|
||||
# Check if the option should be turned on
|
||||
AC_MSG_CHECKING(ARG_CHECKING_MSG)
|
||||
|
||||
if test x$AVAILABLE = xfalse; then
|
||||
ARG_RESULT="$ARG_OPTION"
|
||||
ARG_ENABLED_RESULT=false
|
||||
REASON="not available"
|
||||
else
|
||||
if test x$ARG_GIVEN = xfalse; then
|
||||
ARG_RESULT="ARG_DEFAULT"
|
||||
if test "[x]ARG_OPTIONAL" = xtrue; then
|
||||
ARG_ENABLED_RESULT=ARG_ENABLED_DEFAULT
|
||||
else
|
||||
ARG_ENABLED_RESULT=true
|
||||
fi
|
||||
REASON="default"
|
||||
|
||||
else # ARG_GIVEN is true
|
||||
# Special treatment of "yes" and "no" for "--with-ARG" and "--without-ARG"
|
||||
if test "x$ARG_OPTION" = xyes || test "x$ARG_OPTION" = xno || test "x$ARG_OPTION" = x ; then
|
||||
if test "[x]ARG_OPTIONAL" = xfalse; then
|
||||
if test "x$ARG_OPTION" = x; then
|
||||
# If not optional, the empty string is a valid value
|
||||
ARG_RESULT=""
|
||||
ARG_ENABLED_RESULT=true
|
||||
REASON="from command line"
|
||||
else
|
||||
AC_MSG_RESULT([invalid])
|
||||
AC_MSG_ERROR([Option [--with-]ARG_NAME must have a specified value])
|
||||
fi
|
||||
else
|
||||
if test "x$ARG_OPTION" = xyes; then
|
||||
ARG_RESULT="ARG_DEFAULT"
|
||||
ARG_ENABLED_RESULT=true
|
||||
REASON="default as enabled from command line"
|
||||
else
|
||||
# For optional values, both --without-FOO and --with-FOO= disables
|
||||
ARG_RESULT=""
|
||||
ARG_ENABLED_RESULT=false
|
||||
REASON="from command line"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# The most common case -- the user gives a value for the option.
|
||||
ARG_RESULT="$ARG_OPTION"
|
||||
ARG_ENABLED_RESULT=true
|
||||
REASON="from command line"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ARG_ENABLED_RESULT" = xfalse; then
|
||||
if test "x$REASON" = "xnot available"; then
|
||||
AC_MSG_RESULT([<invalid>, $REASON])
|
||||
if test "x$ARG_RESULT" != "x" && test "x$ARG_RESULT" != "xno" ; then
|
||||
AC_MSG_WARN([Option [--with-]ARG_NAME is not available for this configuration])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([<disabled>, $REASON])
|
||||
fi
|
||||
ARG_RESULT=""
|
||||
else
|
||||
if test [x]ARG_HAS_AUTO_BLOCK = xtrue && test "x$ARG_RESULT" = xauto; then
|
||||
# Execute "auto" payload
|
||||
ARG_IF_AUTO
|
||||
|
||||
ARG_RESULT="$RESULT"
|
||||
REASON="$REASON (calculated from 'auto')"
|
||||
fi
|
||||
|
||||
if test "x$ARG_RESULT" = x; then
|
||||
AC_MSG_RESULT([<none>, $REASON])
|
||||
else
|
||||
AC_MSG_RESULT([$ARG_RESULT, $REASON])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Verify value
|
||||
# First use our dispatcher to verify that type requirements are satisfied
|
||||
UTIL_CHECK_TYPE(ARG_TYPE, $ARG_RESULT)
|
||||
|
||||
if test "x$FAILURE" = x; then
|
||||
# Execute custom verification payload, if present
|
||||
RESULT="$ARG_RESULT"
|
||||
|
||||
ARG_CHECK_VALUE
|
||||
|
||||
ARG_RESULT="$RESULT"
|
||||
fi
|
||||
|
||||
if test "x$FAILURE" != x; then
|
||||
AC_MSG_NOTICE([Invalid value for [--with-]ARG_NAME: "$ARG_RESULT"])
|
||||
AC_MSG_NOTICE([$FAILURE])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Execute result payloads, if present
|
||||
if test x$ARG_GIVEN = xtrue; then
|
||||
ARG_IF_GIVEN
|
||||
else
|
||||
ARG_IF_NOT_GIVEN
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Helper functions for CHECK_VALUE in ARG_WITH.
|
||||
AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY],
|
||||
[
|
||||
if test "x$RESULT" = "x"; then
|
||||
FAILURE="Value cannot be empty"
|
||||
fi
|
||||
])
|
||||
540
make/autoconf/util_paths.m4
Normal file
540
make/autoconf/util_paths.m4
Normal file
@@ -0,0 +1,540 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Appends a string to a path variable, only adding the : when needed.
|
||||
AC_DEFUN([UTIL_APPEND_TO_PATH],
|
||||
[
|
||||
if test "x$2" != x; then
|
||||
if test "x[$]$1" = x; then
|
||||
$1="$2"
|
||||
else
|
||||
$1="[$]$1:$2"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Prepends a string to a path variable, only adding the : when needed.
|
||||
AC_DEFUN([UTIL_PREPEND_TO_PATH],
|
||||
[
|
||||
if test "x$2" != x; then
|
||||
if test "x[$]$1" = x; then
|
||||
$1="$2"
|
||||
else
|
||||
$1="$2:[$]$1"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# This will make sure the given variable points to a full and proper
|
||||
# path. This means:
|
||||
# 1) There will be no spaces in the path. On unix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# $1: The name of the variable to fix
|
||||
# $2: if NOFAIL, errors will be silently ignored
|
||||
AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
path="[$]$1"
|
||||
if test "x$path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$2" = "xNOFAIL"; then
|
||||
quiet_option="-q"
|
||||
fi
|
||||
imported_path=`$FIXPATH_BASE $quiet_option import "$path"`
|
||||
$FIXPATH_BASE verify "$imported_path"
|
||||
if test $? -ne 0; then
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be imported.])
|
||||
else
|
||||
imported_path=""
|
||||
fi
|
||||
fi
|
||||
if test "x$imported_path" != "x$path"; then
|
||||
$1="$imported_path"
|
||||
fi
|
||||
else
|
||||
[ if [[ "$path" =~ " " ]]; then ]
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
AC_MSG_ERROR([Spaces are not allowed in this path.])
|
||||
else
|
||||
path=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use eval to expand a potential ~.
|
||||
eval new_path="$path"
|
||||
if test ! -e "$new_path"; then
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$new_path", is not found.])
|
||||
else
|
||||
new_path=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make the path absolute
|
||||
if test "x$new_path" != x; then
|
||||
if test -d "$new_path"; then
|
||||
path="`cd "$new_path"; pwd -L`"
|
||||
else
|
||||
dir="`$DIRNAME "$new_path"`"
|
||||
base="`$BASENAME "$new_path"`"
|
||||
path="`cd "$dir"; pwd -L`/$base"
|
||||
fi
|
||||
else
|
||||
path=""
|
||||
fi
|
||||
|
||||
$1="$path"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the given file is a unix-style or windows-style executable, that is,
|
||||
# if it expects paths in unix-style or windows-style.
|
||||
# Returns "windows" or "unix" in $RESULT.
|
||||
AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
|
||||
[
|
||||
# For cygwin and msys2, if it's linked with the correct helper lib, it
|
||||
# accept unix paths
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin" || \
|
||||
test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
|
||||
linked_libs=`$LDD $1 2>&1`
|
||||
if test $? -ne 0; then
|
||||
# Non-binary files (e.g. shell scripts) are unix files
|
||||
RESULT=unix
|
||||
else
|
||||
[ if [[ "$linked_libs" =~ $WINENV_MARKER_DLL ]]; then ]
|
||||
RESULT=unix
|
||||
else
|
||||
RESULT=windows
|
||||
fi
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# On WSL, we can check if it is a PE file
|
||||
file_type=`$FILE -b $1 2>&1`
|
||||
[ if [[ $file_type =~ PE.*Windows ]]; then ]
|
||||
RESULT=windows
|
||||
else
|
||||
RESULT=unix
|
||||
fi
|
||||
else
|
||||
RESULT=unix
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# This will make sure the given variable points to a executable
|
||||
# with a full and proper path. This means:
|
||||
# 1) There will be no spaces in the path. On unix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# Any arguments given to the executable is preserved.
|
||||
# If the input variable does not have a directory specification, then
|
||||
# it need to be in the PATH.
|
||||
# $1: The name of the variable to fix
|
||||
# $2: Where to look for the command (replaces $PATH)
|
||||
# $3: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
[
|
||||
input="[$]$1"
|
||||
|
||||
# Only process if variable expands to non-empty
|
||||
if test "x$input" != x; then
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
[ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then
|
||||
line="${input#$FIXPATH }"
|
||||
fixpath_prefix="$FIXPATH "
|
||||
else
|
||||
line="$input"
|
||||
fixpath_prefix=""
|
||||
fi ]
|
||||
path="${line%% *}"
|
||||
arguments="${line#"$path"}"
|
||||
|
||||
[ if ! [[ "$path" =~ /|\\ ]]; then ]
|
||||
# This is a command without path (e.g. "gcc" or "echo")
|
||||
command_type=`type -t "$path"`
|
||||
if test "x$command_type" = xbuiltin || test "x$command_type" = xkeyword; then
|
||||
# Shell builtin or keyword; we're done here
|
||||
new_path="$path"
|
||||
else
|
||||
# Search in $PATH using bash built-in 'type -p'.
|
||||
saved_path="$PATH"
|
||||
if test "x$2" != x; then
|
||||
PATH="$2"
|
||||
fi
|
||||
new_path=`type -p "$path"`
|
||||
if test "x$new_path" = x && test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# Try again with .exe
|
||||
new_path="`type -p "$path.exe"`"
|
||||
fi
|
||||
PATH="$saved_path"
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not found in the PATH.])
|
||||
AC_MSG_ERROR([Cannot locate $path])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# This is a path with slashes, don't look at $PATH
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# fixpath.sh import will do all heavy lifting for us
|
||||
new_path=`$FIXPATH_BASE import "$path"`
|
||||
|
||||
if test ! -e $new_path; then
|
||||
# It failed, but maybe spaces were part of the path and not separating
|
||||
# the command and argument. Retry using that assumption.
|
||||
new_path=`$FIXPATH_BASE import "$input"`
|
||||
if test ! -e $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which resolves as "$input", can not be found.])
|
||||
AC_MSG_ERROR([Cannot locate $input])
|
||||
fi
|
||||
# It worked, clear all "arguments"
|
||||
arguments=""
|
||||
fi
|
||||
else # on unix
|
||||
# Make absolute
|
||||
$1="$path"
|
||||
UTIL_FIXUP_PATH($1, NOFAIL)
|
||||
new_path="[$]$1"
|
||||
|
||||
if test ! -e $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not found])
|
||||
[ if [[ "$path" =~ " " ]]; then ]
|
||||
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate $path])
|
||||
fi
|
||||
if test ! -x $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not executable.])
|
||||
AC_MSG_ERROR([Cannot execute command at $path])
|
||||
fi
|
||||
fi # end on unix
|
||||
fi # end with or without slashes
|
||||
|
||||
# Now we have a usable command as new_path, with arguments in arguments
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$fixpath_prefix" = x; then
|
||||
# Only mess around if fixpath_prefix was not given
|
||||
UTIL_CHECK_WINENV_EXEC_TYPE("$new_path")
|
||||
if test "x$RESULT" = xwindows; then
|
||||
fixpath_prefix="$FIXPATH "
|
||||
# make sure we have an .exe suffix (but not two)
|
||||
new_path="${new_path%.exe}.exe"
|
||||
else
|
||||
# If we have gotten a .exe suffix, remove it
|
||||
new_path="${new_path%.exe}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$3" = xNOFIXPATH; then
|
||||
fixpath_prefix=""
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
new_complete="$fixpath_prefix$new_path$arguments"
|
||||
$1="$new_complete"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup a tool for the given variable. If correctly specified by the user,
|
||||
# use that value, otherwise search for the tool using the supplied code snippet.
|
||||
# $1: variable to set
|
||||
# $2: code snippet to call to look for the tool
|
||||
# $3: code snippet to call if variable was used to find tool
|
||||
AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
[
|
||||
# Publish this variable in the help.
|
||||
AC_ARG_VAR($1, [Override default value for $1])
|
||||
|
||||
if [[ -z "${$1+x}" ]]; then
|
||||
# The variable is not set by user, try to locate tool using the code snippet
|
||||
$2
|
||||
else
|
||||
# The variable is set, but is it from the command line or the environment?
|
||||
|
||||
# Try to remove the string !$1! from our list.
|
||||
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!$1!/}
|
||||
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
|
||||
# If it failed, the variable was not from the command line. Ignore it,
|
||||
# but warn the user (except for BASH, which is always set by the calling BASH).
|
||||
if test "x$1" != xBASH; then
|
||||
AC_MSG_WARN([Ignoring value of $1 from the environment. Use command line variables instead.])
|
||||
fi
|
||||
# Try to locate tool using the code snippet
|
||||
$2
|
||||
else
|
||||
# If it succeeded, then it was overridden by the user. We will use it
|
||||
# for the tool.
|
||||
|
||||
# First remove it from the list of overridden variables, so we can test
|
||||
# for unknown variables in the end.
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
|
||||
|
||||
tool_override=[$]$1
|
||||
|
||||
# Check if we try to supply an empty value
|
||||
if test "x$tool_override" = x; then
|
||||
AC_MSG_CHECKING([for $1])
|
||||
AC_MSG_RESULT([[[disabled by user]]])
|
||||
else
|
||||
# Split up override in command part and argument part
|
||||
tool_and_args=($tool_override)
|
||||
[ tool_command=${tool_and_args[0]} ]
|
||||
[ unset 'tool_and_args[0]' ]
|
||||
[ tool_args=${tool_and_args[@]} ]
|
||||
|
||||
# Check if the provided tool contains a complete path.
|
||||
tool_basename="${tool_command##*/}"
|
||||
if test "x$tool_basename" = "x$tool_command"; then
|
||||
# A command without a complete path is provided, search $PATH.
|
||||
AC_MSG_NOTICE([Will search for user supplied tool "$tool_basename"])
|
||||
AC_PATH_PROGS($1, $tool_basename ${tool_basename}.exe)
|
||||
tool_command="[$]$1"
|
||||
if test "x$tool_command" = x; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_basename" could not be found in PATH])
|
||||
fi
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
if test ! -x "$tool_command" && test ! -x "${tool_command}.exe"; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
|
||||
fi
|
||||
if test ! -x "$tool_command"; then
|
||||
tool_command="${tool_command}.exe"
|
||||
fi
|
||||
$1="$tool_command"
|
||||
fi
|
||||
if test "x$tool_args" != x; then
|
||||
# If we got arguments, re-append them to the command after the fixup.
|
||||
$1="[$]$1 $tool_args"
|
||||
fi
|
||||
AC_MSG_CHECKING([for $1])
|
||||
AC_MSG_RESULT([[$]$1 [[user supplied]]])
|
||||
fi
|
||||
fi
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Locate a tool using proper methods.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
# $4: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
|
||||
AC_DEFUN([UTIL_LOOKUP_PROGS],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [
|
||||
$1=""
|
||||
|
||||
if test "x$3" != x; then
|
||||
old_path="$PATH"
|
||||
PATH="$3"
|
||||
fi
|
||||
|
||||
for name in $2; do
|
||||
AC_MSG_CHECKING(for $name)
|
||||
|
||||
command_type=`type -t "$name"`
|
||||
if test "x$command_type" = xbuiltin || test "x$command_type" = xkeyword; then
|
||||
# Shell builtin or keyword; we're done here
|
||||
full_path="$name"
|
||||
$1="$full_path"
|
||||
AC_MSG_RESULT([[$full_path [builtin]]])
|
||||
break
|
||||
else
|
||||
# Search in $PATH
|
||||
old_ifs="$IFS"
|
||||
IFS=":"
|
||||
for elem in $PATH; do
|
||||
IFS="$old_ifs"
|
||||
if test "x$elem" = x; then
|
||||
continue
|
||||
fi
|
||||
full_path="$elem/$name"
|
||||
if test ! -e "$full_path" && test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# Try again with .exe
|
||||
full_path="$elem/$name.exe"
|
||||
fi
|
||||
if test -e "$full_path"; then
|
||||
$1="$full_path"
|
||||
UTIL_FIXUP_EXECUTABLE($1, $3, $4)
|
||||
result="[$]$1"
|
||||
|
||||
# If we have FIXPATH enabled, strip all instances of it and prepend
|
||||
# a single one, to avoid double fixpath prefixing.
|
||||
if test "x$4" != xNOFIXPATH; then
|
||||
[ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
|
||||
result="\$FIXPATH ${result#"$FIXPATH "}"
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$result])
|
||||
break 2;
|
||||
fi
|
||||
done
|
||||
IFS="$old_ifs"
|
||||
fi
|
||||
AC_MSG_RESULT([[[not found]]])
|
||||
done
|
||||
|
||||
if test "x$3" != x; then
|
||||
PATH="$old_path"
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
|
||||
# first for cross-compilation tools.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
|
||||
[
|
||||
if test "x$ac_tool_prefix" = x; then
|
||||
UTIL_LOOKUP_PROGS($1, $2, $3)
|
||||
else
|
||||
prefixed_names=$(for name in $2; do echo ${ac_tool_prefix}${name} $name; done)
|
||||
UTIL_LOOKUP_PROGS($1, $prefixed_names, $3)
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
# $1: variable to check
|
||||
AC_DEFUN([UTIL_CHECK_NONEMPTY],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
AC_MSG_ERROR([Could not find required tool for $1])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_REQUIRE_PROGS],
|
||||
[
|
||||
UTIL_LOOKUP_PROGS($1, $2, $3)
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
|
||||
[
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS($1, $2, $3)
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Like UTIL_SETUP_TOOL but fails if no tool was found.
|
||||
# $1: variable to set
|
||||
# $2: autoconf macro to call to look for the special tool
|
||||
AC_DEFUN([UTIL_REQUIRE_SPECIAL],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [$2])
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
# The special macro will return an absolute path, and is only used for
|
||||
# unix tools. No further processing needed.
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Add FIXPATH prefix to variable. Normally this is done by UTIL_LOOKUP_PROGS
|
||||
# or UTIL_FIXUP_EXECUTABLE, but in some circumstances this has to be done
|
||||
# explicitly, such as when the command in question does not exist yet.
|
||||
#
|
||||
# $1: variable to add fixpath to
|
||||
AC_DEFUN([UTIL_ADD_FIXPATH],
|
||||
[
|
||||
if test "x$FIXPATH" != x; then
|
||||
$1="$FIXPATH [$]$1"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
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.
|
||||
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 && test "x$READLINK_ISGNU" != x; then
|
||||
$1=`$READLINK -f [$]$1`
|
||||
else
|
||||
# Save the current directory for restoring afterwards
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
sym_link_dir=`$DIRNAME [$]$1`
|
||||
sym_link_file=`$BASENAME [$]$1`
|
||||
cd $sym_link_dir
|
||||
# Use -P flag to resolve symlinks in directories.
|
||||
cd `pwd -P`
|
||||
sym_link_dir=`pwd -P`
|
||||
# Resolve file symlinks
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# Again resolve directory symlinks since the target of the just found
|
||||
# link could be in a different directory
|
||||
cd `$DIRNAME $ISLINK`
|
||||
sym_link_dir=`pwd -P`
|
||||
sym_link_file=`$BASENAME $ISLINK`
|
||||
let COUNTER=COUNTER+1
|
||||
done
|
||||
cd $STARTDIR
|
||||
$1=$sym_link_dir/$sym_link_file
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, 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
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
DEFAULT_VERSION_FEATURE=11
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=17
|
||||
DEFAULT_VERSION_UPDATE=22
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_EXTRA1=0
|
||||
DEFAULT_VERSION_EXTRA2=0
|
||||
DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2022-10-18
|
||||
DEFAULT_VERSION_DATE=2024-01-16
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11"
|
||||
|
||||
112
make/common/CopyFiles.gmk
Normal file
112
make/common/CopyFiles.gmk
Normal file
@@ -0,0 +1,112 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, 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.
|
||||
#
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Code for handling the SetupCopyFiles macro.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
define AddFileToCopy
|
||||
# Helper macro for SetupCopyFiles
|
||||
# 1 : Source file
|
||||
# 2 : Dest file
|
||||
# 3 : Variable to add targets to
|
||||
# 4 : Macro to call for copy operation
|
||||
# 5 : Action text to log
|
||||
$2: $1
|
||||
$$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
|
||||
$$($$(strip $4))
|
||||
|
||||
$3 += $2
|
||||
$3_SOURCES += $1
|
||||
endef
|
||||
|
||||
# Returns the value of the first argument
|
||||
identity = \
|
||||
$(strip $1)
|
||||
|
||||
# Setup make rules for copying files, with an option to do more complex
|
||||
# processing instead of copying.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The list of all source files is returned in $1_SOURCES.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# SRC : Source root dir (defaults to dir of first file)
|
||||
# DEST : Dest root dir
|
||||
# FILES : List of files to copy with absolute paths, or path relative to SRC.
|
||||
# Must be in SRC.
|
||||
# FLATTEN : Set to flatten the directory structure in the DEST dir.
|
||||
# MACRO : Optionally override the default macro used for making the copy.
|
||||
# Default is 'install-file'
|
||||
# NAME_MACRO : Optionally supply a macro that rewrites the target file name
|
||||
# based on the source file name
|
||||
# LOG_ACTION : Optionally specify a different action text for log messages
|
||||
SetupCopyFiles = $(NamedParamsMacroTemplate)
|
||||
define SetupCopyFilesBody
|
||||
|
||||
ifeq ($$($1_MACRO), )
|
||||
$1_MACRO := install-file
|
||||
endif
|
||||
|
||||
# Default SRC to the dir of the first file.
|
||||
ifeq ($$($1_SRC), )
|
||||
$1_SRC := $$(dir $$(firstword $$($1_FILES)))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_NAME_MACRO), )
|
||||
$1_NAME_MACRO := identity
|
||||
endif
|
||||
|
||||
ifeq ($$($1_LOG_ACTION), )
|
||||
$1_LOG_ACTION := Copying
|
||||
endif
|
||||
|
||||
# Remove any trailing slash from SRC and DEST
|
||||
$1_SRC := $$(patsubst %/,%,$$($1_SRC))
|
||||
$1_DEST := $$(patsubst %/,%,$$($1_DEST))
|
||||
|
||||
# Need to wrap arguments in DoubleDollar because of the eval nested inside an
|
||||
# eval macro body.
|
||||
$$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
|
||||
$$(eval $$(call AddFileToCopy, \
|
||||
$$(call DoubleDollar, $$($1_SRC)/$$f), \
|
||||
$$(call DoubleDollar, \
|
||||
$$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
|
||||
), \
|
||||
$1, \
|
||||
$$($1_MACRO), \
|
||||
$$($1_LOG_ACTION) \
|
||||
)) \
|
||||
)
|
||||
|
||||
endef
|
||||
@@ -53,6 +53,7 @@ define FindJtregGroupsBody
|
||||
-e 's/^groups\w*=//p' $1/TEST.ROOT)
|
||||
$1_JTREG_GROUP_FILES := $$(addprefix $1/, $$($1_JTREG_GROUP_FILENAMES))
|
||||
$1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \
|
||||
-e 's/^\#.*//g' \
|
||||
-e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \
|
||||
| $$(SORT) -u))
|
||||
endif
|
||||
|
||||
@@ -341,8 +341,8 @@ define SetupJavaCompilationBody
|
||||
$1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
|
||||
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
|
||||
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
$1_REMOTE:=--server:portfile=$$(call FixPath,$$($1_SJAVAC_PORTFILE)),id=$1,sjavac=$$(subst \
|
||||
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$(call FixPath, $$($1_SERVER_JVM) $$($1_SJAVAC)))))
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -64,6 +64,9 @@ define NEWLINE
|
||||
|
||||
endef
|
||||
|
||||
# Make sure we have a value (could be overridden on command line by caller)
|
||||
CREATING_BUILDJDK ?= false
|
||||
|
||||
# Certain features only work in newer version of GNU Make. The build will still
|
||||
# function in 3.81, but will be less performant.
|
||||
ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
|
||||
@@ -72,17 +75,17 @@ ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
|
||||
RWILDCARD_WORKS := true
|
||||
endif
|
||||
|
||||
##############################
|
||||
# Functions
|
||||
##############################
|
||||
|
||||
### Debug functions
|
||||
# For convenience, MakeBase.gmk continues to include these separate files, at
|
||||
# least for now.
|
||||
|
||||
# Prints the name and value of a variable
|
||||
PrintVar = \
|
||||
$(info $(strip $1) >$($(strip $1))<)
|
||||
include $(TOPDIR)/make/common/Utils.gmk
|
||||
include $(TOPDIR)/make/common/MakeIO.gmk
|
||||
include $(TOPDIR)/make/common/CopyFiles.gmk
|
||||
|
||||
### Functions for timers
|
||||
################################################################################
|
||||
# Functions for timers
|
||||
################################################################################
|
||||
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times
|
||||
@@ -118,227 +121,6 @@ define TargetExit
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# This macro translates $ into \$ to protect the $ from expansion in the shell.
|
||||
# To make this macro resilient against already escaped strings, first remove
|
||||
# any present escapes before escaping so that no double escapes are added.
|
||||
EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
|
||||
|
||||
################################################################################
|
||||
# This macro works just like EscapeDollar above, but for #.
|
||||
EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
|
||||
|
||||
################################################################################
|
||||
# This macro translates $ into $$ to protect the string from make itself.
|
||||
DoubleDollar = $(subst $$,$$$$,$(strip $1))
|
||||
|
||||
################################################################################
|
||||
# ListPathsSafely can be used to print command parameters to a file. This is
|
||||
# typically done if the command line lenght risk being too long for the
|
||||
# OS/shell. In later make versions, the file function can be used for this
|
||||
# purpose. For earlier versions, a more complex implementation is provided.
|
||||
#
|
||||
# The function ListPathsSafely can be called either directly or, more commonly
|
||||
# from a recipe line. If called from a recipe, it will be executed in the
|
||||
# evaluation phase of that recipe, which means that it will write to the file
|
||||
# before any other line in the recipe has been run.
|
||||
ifeq ($(HAS_FILE_FUNCTION), true)
|
||||
# Param 1 - Name of variable containing paths/arguments to output
|
||||
# Param 2 - File to print to
|
||||
# Param 3 - Set to true to append to file instead of overwriting
|
||||
define ListPathsSafely
|
||||
$$(call MakeDir, $$(dir $$(strip $2)))
|
||||
$$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
|
||||
$$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
|
||||
endef
|
||||
|
||||
else # HAS_FILE_FUNCTION = false
|
||||
|
||||
$(eval compress_paths = \
|
||||
$(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
|
||||
compress_paths += \
|
||||
$(subst $(TOPDIR),X97, \
|
||||
$(subst $(OUTPUTDIR),X98, \
|
||||
$(subst X,X00, \
|
||||
$(subst $(SPACE),\n,$(strip $1)))))
|
||||
$(eval compress_paths += \
|
||||
$(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
|
||||
|
||||
decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
|
||||
-e 's|X99|\\n|g' \
|
||||
-e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
|
||||
-e 's|X00|X|g'
|
||||
|
||||
ListPathsSafely_IfPrintf = \
|
||||
$(if $(word $3,$($(strip $1))), \
|
||||
$(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
|
||||
$(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
|
||||
| $(decompress_paths) >> $2))
|
||||
|
||||
# Param 1 - Name of variable containing paths/arguments to output
|
||||
# Param 2 - File to print to
|
||||
# Param 3 - Set to true to append to file instead of overwriting
|
||||
define ListPathsSafely
|
||||
ifneq (,$$(word 30001,$$($$(strip $1))))
|
||||
$$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
|
||||
endif
|
||||
$$(call MakeDir, $$(dir $2))
|
||||
ifneq ($$(strip $3), true)
|
||||
$$(shell $(RM) $$(strip $2))
|
||||
endif
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
|
||||
endef
|
||||
endif # HAS_FILE_FUNCTION
|
||||
|
||||
################################################################################
|
||||
|
||||
# A file containing a way to uniquely identify the source code revision that
|
||||
@@ -410,21 +192,6 @@ endef
|
||||
# Make sure logging is setup for everyone that includes MakeBase.gmk.
|
||||
$(eval $(call SetupLogging))
|
||||
|
||||
################################################################################
|
||||
# Creates a sequence of increasing numbers (inclusive).
|
||||
# Param 1 - starting number
|
||||
# Param 2 - ending number
|
||||
sequence = \
|
||||
$(wordlist $1, $2, $(strip \
|
||||
$(eval SEQUENCE_COUNT :=) \
|
||||
$(call _sequence-do,$(strip $2))))
|
||||
|
||||
_sequence-do = \
|
||||
$(if $(word $1, $(SEQUENCE_COUNT)),, \
|
||||
$(eval SEQUENCE_COUNT += .) \
|
||||
$(words $(SEQUENCE_COUNT)) \
|
||||
$(call _sequence-do,$1))
|
||||
|
||||
################################################################################
|
||||
|
||||
MAX_PARAMS := 36
|
||||
@@ -466,16 +233,6 @@ define NamedParamsMacroTemplate
|
||||
$(call $(0)Body,$(strip $1))
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Replace question marks with space in string. This macro needs to be called on
|
||||
# files from FindFiles in case any of them contains space in their file name,
|
||||
# since FindFiles replaces space with ?.
|
||||
# Param 1 - String to replace in
|
||||
DecodeSpace = \
|
||||
$(subst ?,$(SPACE),$(strip $1))
|
||||
EncodeSpace = \
|
||||
$(subst $(SPACE),?,$(strip $1))
|
||||
|
||||
################################################################################
|
||||
# Make directory without forking mkdir if not needed.
|
||||
#
|
||||
@@ -503,17 +260,10 @@ MakeDir = \
|
||||
MakeTargetDir = \
|
||||
$(call MakeDir, $(dir $(call EncodeSpace, $@)))
|
||||
|
||||
################################################################################
|
||||
# Assign a variable only if it is empty
|
||||
# Param 1 - Variable to assign
|
||||
# Param 2 - Value to assign
|
||||
SetIfEmpty = \
|
||||
$(if $($(strip $1)),,$(eval $(strip $1) := $2))
|
||||
|
||||
################################################################################
|
||||
# All install-file and related macros automatically call DecodeSpace when needed.
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
||||
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
|
||||
# name of the target file differs from the source file, rename after copy.
|
||||
@@ -539,7 +289,7 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
$(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
|
||||
fi
|
||||
endef
|
||||
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
# On mac, extended attributes sometimes creep into the source files, which may later
|
||||
# cause the creation of ._* files which confuses testing. Clear these with xattr if
|
||||
# set. Some files get their write permissions removed after being copied to the
|
||||
@@ -577,114 +327,41 @@ define install-file-nolink
|
||||
$(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Take two paths and return the path of the last common directory.
|
||||
# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
|
||||
# foo/bar/baz, /foo/bar -> <empty>
|
||||
#
|
||||
# The x prefix is used to preserve the presence of the initial slash
|
||||
#
|
||||
# $1 - Path to compare
|
||||
# $2 - Other path to compare
|
||||
FindCommonPathPrefix = \
|
||||
$(patsubst x%,%,$(subst $(SPACE),/,$(strip \
|
||||
$(call FindCommonPathPrefixHelper, \
|
||||
$(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \
|
||||
)))
|
||||
|
||||
FindCommonPathPrefixHelper = \
|
||||
$(if $(call equals, $(firstword $1), $(firstword $2)), \
|
||||
$(firstword $1) \
|
||||
$(call FindCommonPathPrefixHelper, \
|
||||
$(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \
|
||||
) \
|
||||
)
|
||||
|
||||
# Convert a partial path into as many directory levels of ../, removing
|
||||
# leading and following /.
|
||||
# Ex: foo/bar/baz/ -> ../../..
|
||||
# foo/bar -> ../..
|
||||
# /foo -> ..
|
||||
DirToDotDot = \
|
||||
$(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..))
|
||||
|
||||
# Computes the relative path from a directory to a file
|
||||
# $1 - File to compute the relative path to
|
||||
# $2 - Directory to compute the relative path from
|
||||
RelativePath = \
|
||||
$(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \
|
||||
$(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)%, %, $2))) \
|
||||
$(eval $1_dotdots := $(if $($(strip $1)_dotdots),$($(strip $1)_dotdots),.)) \
|
||||
$(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \
|
||||
$($(strip $1)_dotdots)/$($(strip $1)_suffix)
|
||||
|
||||
################################################################################
|
||||
# link-file-* works similarly to install-file but creates a symlink instead.
|
||||
# There are two versions, either creating a relative or an absolute link. Be
|
||||
# careful when using this on Windows since the symlink created is only valid in
|
||||
# the unix emulation environment.
|
||||
define link-file-relative
|
||||
# In msys2 we use mklink /J because its ln would perform a deep copy of the target.
|
||||
# This inhibits performance and can lead to issues with long paths. With mklink /J
|
||||
# relative linking does not work, so we handle the link as absolute path.
|
||||
ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys2)
|
||||
define link-file-relative
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
cmd //c "mklink /J $(call FixPath, $(call DecodeSpace, $@)) $(call FixPath, $(call DecodeSpace, $<))"
|
||||
endef
|
||||
else
|
||||
define link-file-relative
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
$(LN) -s '$(call DecodeSpace, $(call RelativePath, $<, $(@D)))' '$(call DecodeSpace, $@)'
|
||||
endef
|
||||
endef
|
||||
endif
|
||||
|
||||
define link-file-absolute
|
||||
ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys2)
|
||||
define link-file-absolute
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
cmd //c "mklink /J $(call FixPath, $(call DecodeSpace, $@)) $(call FixPath, $(call DecodeSpace, $<))"
|
||||
endef
|
||||
else
|
||||
define link-file-absolute
|
||||
$(call MakeTargetDir)
|
||||
$(RM) '$(call DecodeSpace, $@)'
|
||||
$(LN) -s '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
|
||||
uniq = \
|
||||
$(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
|
||||
|
||||
# Returns all whitespace-separated words in $2 where at least one of the
|
||||
# whitespace-separated words in $1 is a substring.
|
||||
containing = \
|
||||
$(strip \
|
||||
$(foreach v,$(strip $2),\
|
||||
$(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
|
||||
|
||||
# Returns all whitespace-separated words in $2 where none of the
|
||||
# whitespace-separated words in $1 is a substring.
|
||||
not-containing = \
|
||||
$(strip $(filter-out $(call containing,$1,$2),$2))
|
||||
|
||||
# Return a list of all string elements that are duplicated in $1.
|
||||
dups = \
|
||||
$(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
|
||||
$(words $(filter $v, $1))), $v)))
|
||||
|
||||
# String equals
|
||||
equals = \
|
||||
$(and $(findstring $(strip $1),$(strip $2)),\
|
||||
$(findstring $(strip $2),$(strip $1)))
|
||||
|
||||
# Remove a whole list of prefixes
|
||||
# $1 - List of prefixes
|
||||
# $2 - List of elements to process
|
||||
remove-prefixes = \
|
||||
$(strip $(if $1,$(patsubst $(firstword $1)%,%,\
|
||||
$(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
|
||||
|
||||
# Convert the string given to upper case, without any $(shell)
|
||||
# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html
|
||||
uppercase_table := a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O \
|
||||
p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
|
||||
|
||||
uppercase_internal = \
|
||||
$(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \
|
||||
$(wordlist 2, $(words $1), $1), $2)), $2)
|
||||
|
||||
# Convert a string to upper case. Works only on a-z.
|
||||
# $1 - The string to convert
|
||||
uppercase = \
|
||||
$(strip \
|
||||
$(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \
|
||||
$(uppercase_result) \
|
||||
)
|
||||
endef
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -800,205 +477,24 @@ else
|
||||
FindFiles = $(CacheFindFiles)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
define AddFileToCopy
|
||||
# Helper macro for SetupCopyFiles
|
||||
# 1 : Source file
|
||||
# 2 : Dest file
|
||||
# 3 : Variable to add targets to
|
||||
# 4 : Macro to call for copy operation
|
||||
# 5 : Action text to log
|
||||
$2: $1
|
||||
$$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
|
||||
$$($$(strip $4))
|
||||
|
||||
$3 += $2
|
||||
$3_SOURCES += $1
|
||||
endef
|
||||
|
||||
# Returns the value of the first argument
|
||||
identity = \
|
||||
$(strip $1)
|
||||
|
||||
# Setup make rules for copying files, with an option to do more complex
|
||||
# processing instead of copying.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The list of all source files is returned in $1_SOURCES.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# SRC : Source root dir (defaults to dir of first file)
|
||||
# DEST : Dest root dir
|
||||
# FILES : List of files to copy with absolute paths, or path relative to SRC.
|
||||
# Must be in SRC.
|
||||
# FLATTEN : Set to flatten the directory structure in the DEST dir.
|
||||
# MACRO : Optionally override the default macro used for making the copy.
|
||||
# Default is 'install-file'
|
||||
# NAME_MACRO : Optionally supply a macro that rewrites the target file name
|
||||
# based on the source file name
|
||||
# LOG_ACTION : Optionally specify a different action text for log messages
|
||||
SetupCopyFiles = $(NamedParamsMacroTemplate)
|
||||
define SetupCopyFilesBody
|
||||
|
||||
ifeq ($$($1_MACRO), )
|
||||
$1_MACRO := install-file
|
||||
endif
|
||||
|
||||
# Default SRC to the dir of the first file.
|
||||
ifeq ($$($1_SRC), )
|
||||
$1_SRC := $$(dir $$(firstword $$($1_FILES)))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_NAME_MACRO), )
|
||||
$1_NAME_MACRO := identity
|
||||
endif
|
||||
|
||||
ifeq ($$($1_LOG_ACTION), )
|
||||
$1_LOG_ACTION := Copying
|
||||
endif
|
||||
|
||||
# Remove any trailing slash from SRC and DEST
|
||||
$1_SRC := $$(patsubst %/,%,$$($1_SRC))
|
||||
$1_DEST := $$(patsubst %/,%,$$($1_DEST))
|
||||
|
||||
# Need to wrap arguments in DoubleDollar because of the eval nested inside an
|
||||
# eval macro body.
|
||||
$$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
|
||||
$$(eval $$(call AddFileToCopy, \
|
||||
$$(call DoubleDollar, $$($1_SRC)/$$f), \
|
||||
$$(call DoubleDollar, \
|
||||
$$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
|
||||
), \
|
||||
$1, \
|
||||
$$($1_MACRO), \
|
||||
$$($1_LOG_ACTION) \
|
||||
)) \
|
||||
)
|
||||
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
|
||||
# These will be converted into a series of variables like FOO_KEYWORD1=val1,
|
||||
# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
|
||||
#
|
||||
# Parameter 1 is the name of the rule, and is also the name of the variable.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# SINGLE_KEYWORDS A list of valid keywords with single string values
|
||||
# STRING_KEYWORDS A list of valid keywords, processed as string. This means
|
||||
# that '%20' will be replaced by ' ' to allow for multi-word strings.
|
||||
#
|
||||
ParseKeywordVariable = $(NamedParamsMacroTemplate)
|
||||
define ParseKeywordVariableBody
|
||||
ifneq ($$($1), )
|
||||
# To preserve spaces, substitute them with a hopefully unique pattern
|
||||
# before splitting and then re-substitute spaces back.
|
||||
$1_MANGLED := $$(subst $$(SPACE),||||,$$($1))
|
||||
$$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \
|
||||
$$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
|
||||
$$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
|
||||
$$(eval $1_NO_MATCH := true) \
|
||||
$$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
|
||||
$$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
|
||||
$$(if $$(filter $$(keyword)=%, $$(part)), \
|
||||
$$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \
|
||||
$$(eval $1_NO_MATCH := ) \
|
||||
) \
|
||||
) \
|
||||
$$(foreach keyword, $$($1_STRING_KEYWORDS), \
|
||||
$$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
|
||||
$$(if $$(filter $$(keyword)=%, $$(part)), \
|
||||
$$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \
|
||||
$$(eval $1_NO_MATCH := ) \
|
||||
) \
|
||||
) \
|
||||
$$(if $$($1_NO_MATCH), \
|
||||
$$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \
|
||||
$$(info Keyword $$(part) for $1 needs to be assigned a value.) \
|
||||
, \
|
||||
$$(info $$(part) is not a valid keyword for $1.) \
|
||||
$$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
|
||||
) \
|
||||
$$(error Cannot continue) \
|
||||
) \
|
||||
)
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# ShellQuote
|
||||
#
|
||||
# Quotes a string with single quotes and replaces single quotes with '\'' so
|
||||
# that the contents survives being given to the shell.
|
||||
|
||||
ShellQuote = \
|
||||
$(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE)
|
||||
|
||||
################################################################################
|
||||
# FixPath
|
||||
#
|
||||
# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into
|
||||
# "mixed mode" (e.g. c:/cygwin/bin/foo). On other platforms, return the path
|
||||
# unchanged.
|
||||
# This also converts a colon-separated list of paths to a semicolon-separated
|
||||
# list.
|
||||
# This is normally not needed since we use the FIXPATH prefix for command lines,
|
||||
# but might be needed in certain circumstances.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
FixPath = \
|
||||
$(shell $(CYGPATH) -m $1)
|
||||
$(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
|
||||
else
|
||||
FixPath = \
|
||||
$1
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Write to and read from file
|
||||
|
||||
# Param 1 - File to read
|
||||
ReadFile = \
|
||||
$(shell $(CAT) $1)
|
||||
|
||||
# Param 1 - Text to write
|
||||
# Param 2 - File to write to
|
||||
ifeq ($(HAS_FILE_FUNCTION), true)
|
||||
WriteFile = \
|
||||
$(file >$2,$(strip $1))
|
||||
else
|
||||
# Use printf to get consistent behavior on all platforms.
|
||||
WriteFile = \
|
||||
$(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
|
||||
endif
|
||||
|
||||
# Param 1 - Text to write
|
||||
# Param 2 - File to write to
|
||||
ifeq ($(HAS_FILE_FUNCTION), true)
|
||||
AppendFile = \
|
||||
$(file >>$2,$(strip $1))
|
||||
else
|
||||
# Use printf to get consistent behavior on all platforms.
|
||||
AppendFile = \
|
||||
$(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# FixPathList
|
||||
#
|
||||
# On Windows, converts a cygwin/unix style path list (colon-separated) into
|
||||
# the native format (mixed mode, semicolon-separated). On other platforms,
|
||||
# return the path list unchanged.
|
||||
################################################################################
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
FixPathList = \
|
||||
$(subst @,$(SPACE),$(subst $(SPACE),;,$(foreach entry,$(subst :,$(SPACE),\
|
||||
$(subst $(SPACE),@,$(strip $1))),$(call FixPath, $(entry)))))
|
||||
else
|
||||
FixPathList = \
|
||||
$1
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# DependOnVariable
|
||||
#
|
||||
@@ -1085,75 +581,6 @@ ExecuteWithLog = \
|
||||
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
||||
exit $(DOLLAR)exitcode ) )
|
||||
|
||||
################################################################################
|
||||
# Find lib dir for module
|
||||
# Param 1 - module name
|
||||
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
|
||||
# separate classpath entries. Safe for multiple nested calls.
|
||||
# param 1 : A space separated list of classpath entries
|
||||
# The surrounding strip is needed to keep additional whitespace out
|
||||
PathList = \
|
||||
"$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
|
||||
|
||||
################################################################################
|
||||
# Check if a specified hotspot variant is being built, or at least one of a
|
||||
# list of variants. Will return 'true' or 'false'.
|
||||
# $1 - the variant to test for
|
||||
check-jvm-variant = \
|
||||
$(strip \
|
||||
$(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
|
||||
$(error Internal error: Invalid variant tested: $1)) \
|
||||
$(if $(filter $1, $(JVM_VARIANTS)), true, false))
|
||||
|
||||
################################################################################
|
||||
# Converts a space separated list to a comma separated list.
|
||||
#
|
||||
# Replacing double-comma with a single comma is to workaround the issue with
|
||||
# some version of make on windows that doesn't substitute spaces with one comma
|
||||
# properly.
|
||||
CommaList = \
|
||||
$(strip \
|
||||
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Converts a space separated list to a colon separated list.
|
||||
#
|
||||
# Replacing double-colon with a single colon is to workaround the issue with
|
||||
# some version of make on windows that doesn't substitute spaces with one colon
|
||||
# properly.
|
||||
ColonList = \
|
||||
$(strip \
|
||||
$(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Given a list of files, filters out locale specific files for translations
|
||||
# that should be excluded from this build.
|
||||
# $1 - The list of files to filter
|
||||
# $2 - The suffix of the files that should be considered (.java or .properties)
|
||||
FilterExcludedTranslations = \
|
||||
$(strip $(if $(EXCLUDE_TRANSLATIONS), \
|
||||
$(filter-out \
|
||||
$(foreach suffix, $2, \
|
||||
$(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \
|
||||
), \
|
||||
$1 \
|
||||
), \
|
||||
$1 \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
|
||||
272
make/common/MakeIO.gmk
Normal file
272
make/common/MakeIO.gmk
Normal file
@@ -0,0 +1,272 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, 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.
|
||||
#
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including MakeIO.gmk)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Functions for dealing with reading and writing from makefiles. Prior to GNU
|
||||
# Make 4.0, this was tricky business.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
################################################################################
|
||||
# ListPathsSafely can be used to print command parameters to a file. This is
|
||||
# typically done if the command line lenght risk being too long for the
|
||||
# OS/shell. In later make versions, the file function can be used for this
|
||||
# purpose. For earlier versions, a more complex implementation is provided.
|
||||
#
|
||||
# The function ListPathsSafely can be called either directly or, more commonly
|
||||
# from a recipe line. If called from a recipe, it will be executed in the
|
||||
# evaluation phase of that recipe, which means that it will write to the file
|
||||
# before any other line in the recipe has been run.
|
||||
ifeq ($(HAS_FILE_FUNCTION), true)
|
||||
# Param 1 - Name of variable containing paths/arguments to output
|
||||
# Param 2 - File to print to
|
||||
# Param 3 - Set to true to append to file instead of overwriting
|
||||
define ListPathsSafely
|
||||
$$(call MakeDir, $$(dir $$(strip $2)))
|
||||
$$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
|
||||
$$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
|
||||
endef
|
||||
|
||||
else # HAS_FILE_FUNCTION = false
|
||||
|
||||
$(eval compress_paths = \
|
||||
$(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
|
||||
compress_paths += \
|
||||
$(subst $(TOPDIR),X97, \
|
||||
$(subst $(OUTPUTDIR),X98, \
|
||||
$(subst X,X00, \
|
||||
$(subst $(SPACE),\n,$(strip $1)))))
|
||||
$(eval compress_paths += \
|
||||
$(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
|
||||
|
||||
decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
|
||||
-e 's|X99|\\n|g' \
|
||||
-e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
|
||||
-e 's|X00|X|g'
|
||||
|
||||
ListPathsSafely_IfPrintf = \
|
||||
$(if $(word $3,$($(strip $1))), \
|
||||
$(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
|
||||
$(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
|
||||
| $(decompress_paths) >> $2))
|
||||
|
||||
# Param 1 - Name of variable containing paths/arguments to output
|
||||
# Param 2 - File to print to
|
||||
# Param 3 - Set to true to append to file instead of overwriting
|
||||
define ListPathsSafely
|
||||
ifneq (,$$(word 30001,$$($$(strip $1))))
|
||||
$$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
|
||||
endif
|
||||
$$(call MakeDir, $$(dir $2))
|
||||
ifneq ($$(strip $3), true)
|
||||
$$(shell $(RM) $$(strip $2))
|
||||
endif
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
|
||||
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
|
||||
$$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
|
||||
endef
|
||||
endif # HAS_FILE_FUNCTION
|
||||
|
||||
################################################################################
|
||||
# Write to and read from file
|
||||
|
||||
# Param 1 - File to read
|
||||
ReadFile = \
|
||||
$(shell $(CAT) $1)
|
||||
|
||||
# Param 1 - Text to write
|
||||
# Param 2 - File to write to
|
||||
ifeq ($(HAS_FILE_FUNCTION), true)
|
||||
WriteFile = \
|
||||
$(file >$2,$(strip $1))
|
||||
else
|
||||
# Use printf to get consistent behavior on all platforms.
|
||||
WriteFile = \
|
||||
$(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
|
||||
endif
|
||||
|
||||
# Param 1 - Text to write
|
||||
# Param 2 - File to write to
|
||||
ifeq ($(HAS_FILE_FUNCTION), true)
|
||||
AppendFile = \
|
||||
$(file >>$2,$(strip $1))
|
||||
else
|
||||
# Use printf to get consistent behavior on all platforms.
|
||||
AppendFile = \
|
||||
$(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
|
||||
endif
|
||||
@@ -118,11 +118,11 @@ PLATFORM_MODULES += \
|
||||
jdk.zipfs \
|
||||
#
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
PLATFORM_MODULES += jdk.crypto.mscapi
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
PLATFORM_MODULES += jdk.crypto.ucrypto
|
||||
endif
|
||||
|
||||
@@ -337,6 +337,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
|
||||
sub(/\/\*.*\*\//, ""); \
|
||||
gsub(/^ +\*.*/, ""); \
|
||||
gsub(/ /, ""); \
|
||||
gsub(/\r/, ""); \
|
||||
printf(" %s", $$0) } \
|
||||
END { printf("\n") }' $m && \
|
||||
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \
|
||||
@@ -350,6 +351,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
|
||||
sub(/\/\*.*\*\//, ""); \
|
||||
gsub(/^ +\*.*/, ""); \
|
||||
gsub(/ /, ""); \
|
||||
gsub(/\r/, ""); \
|
||||
printf(" %s", $$0) } \
|
||||
END { printf("\n") }' $m \
|
||||
) >> $@ $(NEWLINE))
|
||||
|
||||
@@ -73,11 +73,11 @@ define WriteCompileCommandsFragment
|
||||
$(call LogInfo, Creating compile commands fragment for $(notdir $3))
|
||||
$(call MakeDir, $(dir $1))
|
||||
$(call WriteFile,{ \
|
||||
"directory": "$(strip $2)"$(COMMA) \
|
||||
"file": "$(strip $3)"$(COMMA) \
|
||||
"directory": "$(strip $(call FixPath, $2))"$(COMMA) \
|
||||
"file": "$(strip $(call FixPath, $3))"$(COMMA) \
|
||||
"command": "$(strip $(subst $(DQUOTE),\$(DQUOTE),$(subst \,\\,\
|
||||
$(subst $(FIXPATH),,$4))))"$(COMMA) \
|
||||
"output": "$(strip $5)" \
|
||||
$(subst $(FIXPATH),,$(call FixPath, $4)))))"$(COMMA) \
|
||||
"output": "$(strip $(call FixPath, $5))" \
|
||||
}$(COMMA), \
|
||||
$1)
|
||||
endef
|
||||
@@ -177,12 +177,6 @@ $(strip \
|
||||
)
|
||||
endef
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
|
||||
UNIX_PATH_PREFIX := /cygdrive
|
||||
else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys)
|
||||
UNIX_PATH_PREFIX :=
|
||||
endif
|
||||
|
||||
# This pattern is used to transform the output of the microsoft CL compiler
|
||||
# into a make syntax dependency file (.d)
|
||||
WINDOWS_SHOWINCLUDE_SED_PATTERN := \
|
||||
@@ -190,7 +184,7 @@ WINDOWS_SHOWINCLUDE_SED_PATTERN := \
|
||||
-e 's|Note: including file: *||' \
|
||||
-e 's|\r||g' \
|
||||
-e 's|\\|/|g' \
|
||||
-e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
|
||||
-e 's|^\([a-zA-Z]\):|$(WINENV_PREFIX)/\1|g' \
|
||||
-e '\|$(TOPDIR)|I !d' \
|
||||
-e 's|$$$$| \\|g' \
|
||||
#
|
||||
@@ -289,10 +283,15 @@ endif
|
||||
# specialized file is found, returns the default file.
|
||||
# $1 Executable to find entitlements file for.
|
||||
ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
CODESIGN_PLIST_SUFFIX := -debug
|
||||
else
|
||||
CODESIGN_PLIST_SUFFIX :=
|
||||
endif
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default$(CODESIGN_PLIST_SUFFIX).plist
|
||||
|
||||
GetEntitlementsFile = \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1))$(CODESIGN_PLIST_SUFFIX).plist, \
|
||||
$(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
|
||||
)
|
||||
|
||||
@@ -360,10 +359,15 @@ define SetupCompileNativeFileBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(DISABLE_WARNING_PREFIX), )
|
||||
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)))
|
||||
endif
|
||||
|
||||
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS)
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
|
||||
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
|
||||
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)
|
||||
|
||||
ifneq ($$(filter %.c, $$($1_FILENAME)), )
|
||||
@@ -558,7 +562,7 @@ define SetupNativeCompilationBody
|
||||
ifeq ($$($1_TYPE), EXECUTABLE)
|
||||
$1_PREFIX :=
|
||||
ifeq ($$($1_SUFFIX), )
|
||||
$1_SUFFIX := $(EXE_SUFFIX)
|
||||
$1_SUFFIX := $(EXECUTABLE_SUFFIX)
|
||||
endif
|
||||
else
|
||||
$1_PREFIX := $(LIBRARY_PREFIX)
|
||||
@@ -915,7 +919,7 @@ define SetupNativeCompilationBody
|
||||
$(TOUCH) $$@
|
||||
|
||||
# On windows we need to create a resource file
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifneq ($$($1_VERSIONINFO_RESOURCE), )
|
||||
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
|
||||
$1_RES_DEPS_FILE := $$($1_RES).d
|
||||
@@ -956,7 +960,7 @@ define SetupNativeCompilationBody
|
||||
|
||||
ifneq ($(DISABLE_MAPFILES), true)
|
||||
$1_REAL_MAPFILE := $$($1_MAPFILE)
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), false)
|
||||
ifneq ($$($1_REORDER), )
|
||||
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
|
||||
|
||||
@@ -990,7 +994,7 @@ define SetupNativeCompilationBody
|
||||
# Only copy debug symbols for dynamic libraries and programs.
|
||||
ifneq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
# Generate debuginfo files.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
|
||||
"-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
@@ -999,7 +1003,7 @@ define SetupNativeCompilationBody
|
||||
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \
|
||||
$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map
|
||||
|
||||
else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
|
||||
else ifeq ($(call isTargetOs, linux solaris), true)
|
||||
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
|
||||
# Setup the command line creating debuginfo files, to be run after linking.
|
||||
# It cannot be run separately since it updates the original target file
|
||||
@@ -1015,13 +1019,13 @@ define SetupNativeCompilationBody
|
||||
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
|
||||
$1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) $$($1_DEBUGINFO_FILES)
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
$1_DEBUGINFO_FILES := \
|
||||
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
|
||||
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
|
||||
$1_CREATE_DEBUGINFO_CMDS := \
|
||||
$(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
|
||||
endif # OPENJDK_TARGET_OS
|
||||
endif
|
||||
|
||||
# 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
|
||||
@@ -1107,7 +1111,7 @@ define SetupNativeCompilationBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($$($1_EMBED_MANIFEST), true)
|
||||
$1_EXTRA_LDFLAGS += -manifest:embed
|
||||
endif
|
||||
@@ -1187,7 +1191,7 @@ define SetupNativeCompilationBody
|
||||
# Keep as much as possible on one execution line for best performance
|
||||
# on Windows
|
||||
$$(call LogInfo, Linking $$($1_BASENAME))
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
|
||||
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
|
||||
@@ -1205,16 +1209,17 @@ define SetupNativeCompilationBody
|
||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
||||
$$($1_STRIP_CMD)
|
||||
endif
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifneq ($$($1_MANIFEST), )
|
||||
$$($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), )
|
||||
# On macosx, optionally run codesign on every binary
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
|
||||
--entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
$(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ $$($1_$2_OUTPUT_FILE): $$($1_SRC)/$2 $$($1_$2_VARDEPS_FILE)
|
||||
$$(call LogInfo, Converting $2 to html)
|
||||
$$(call MakeDir, $$($1_$2_TARGET_DIR) $$(SUPPORT_OUTPUTDIR)/markdown)
|
||||
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \
|
||||
$$(PANDOC) $$($1_OPTIONS) -f markdown -t html5 --standalone \
|
||||
$$(PANDOC) $$($1_OPTIONS) -f $$(PANDOC_MARKDOWN_FLAG) \
|
||||
-t html5 --standalone \
|
||||
$$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS) '$$<' -o '$$@')
|
||||
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
|
||||
TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \
|
||||
|
||||
@@ -62,7 +62,11 @@ define SetupTestFilesCompilationBody
|
||||
$1_OUTPUT_SUBDIR := lib
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
ifeq ($(call isTargetOs, windows), false)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) -pthread
|
||||
else
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
endif
|
||||
$1_COMPILATION_TYPE := LIBRARY
|
||||
else ifeq ($$($1_TYPE), PROGRAM)
|
||||
$1_PREFIX = exe
|
||||
|
||||
365
make/common/Utils.gmk
Normal file
365
make/common/Utils.gmk
Normal file
@@ -0,0 +1,365 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, 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.
|
||||
#
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including Utils.gmk)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Common utility functions
|
||||
#
|
||||
################################################################################
|
||||
|
||||
### Debug functions
|
||||
|
||||
# Prints the name and value of a variable
|
||||
PrintVar = \
|
||||
$(info $(strip $1) >$($(strip $1))<)
|
||||
|
||||
################################################################################
|
||||
# This macro translates $ into \$ to protect the $ from expansion in the shell.
|
||||
# To make this macro resilient against already escaped strings, first remove
|
||||
# any present escapes before escaping so that no double escapes are added.
|
||||
EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
|
||||
|
||||
################################################################################
|
||||
# This macro works just like EscapeDollar above, but for #.
|
||||
EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
|
||||
|
||||
################################################################################
|
||||
# This macro translates $ into $$ to protect the string from make itself.
|
||||
DoubleDollar = $(subst $$,$$$$,$(strip $1))
|
||||
|
||||
################################################################################
|
||||
# Creates a sequence of increasing numbers (inclusive).
|
||||
# Param 1 - starting number
|
||||
# Param 2 - ending number
|
||||
sequence = \
|
||||
$(wordlist $1, $2, $(strip \
|
||||
$(eval SEQUENCE_COUNT :=) \
|
||||
$(call _sequence-do,$(strip $2))))
|
||||
|
||||
_sequence-do = \
|
||||
$(if $(word $1, $(SEQUENCE_COUNT)),, \
|
||||
$(eval SEQUENCE_COUNT += .) \
|
||||
$(words $(SEQUENCE_COUNT)) \
|
||||
$(call _sequence-do,$1))
|
||||
|
||||
################################################################################
|
||||
# Replace question marks with space in string. This macro needs to be called on
|
||||
# files from FindFiles in case any of them contains space in their file name,
|
||||
# since FindFiles replaces space with ?.
|
||||
# Param 1 - String to replace in
|
||||
DecodeSpace = \
|
||||
$(subst ?,$(SPACE),$(strip $1))
|
||||
EncodeSpace = \
|
||||
$(subst $(SPACE),?,$(strip $1))
|
||||
|
||||
################################################################################
|
||||
# Assign a variable only if it is empty
|
||||
# Param 1 - Variable to assign
|
||||
# Param 2 - Value to assign
|
||||
SetIfEmpty = \
|
||||
$(if $($(strip $1)),,$(eval $(strip $1) := $2))
|
||||
|
||||
################################################################################
|
||||
# Take two paths and return the path of the last common directory.
|
||||
# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
|
||||
# foo/bar/baz, /foo/bar -> <empty>
|
||||
#
|
||||
# The x prefix is used to preserve the presence of the initial slash
|
||||
#
|
||||
# $1 - Path to compare
|
||||
# $2 - Other path to compare
|
||||
FindCommonPathPrefix = \
|
||||
$(patsubst x%,%,$(subst $(SPACE),/,$(strip \
|
||||
$(call FindCommonPathPrefixHelper, \
|
||||
$(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \
|
||||
)))
|
||||
|
||||
FindCommonPathPrefixHelper = \
|
||||
$(if $(call equals, $(firstword $1), $(firstword $2)), \
|
||||
$(firstword $1) \
|
||||
$(call FindCommonPathPrefixHelper, \
|
||||
$(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \
|
||||
) \
|
||||
)
|
||||
|
||||
# Convert a partial path into as many directory levels of ../, removing
|
||||
# leading and following /.
|
||||
# Ex: foo/bar/baz/ -> ../../..
|
||||
# foo/bar -> ../..
|
||||
# /foo -> ..
|
||||
DirToDotDot = \
|
||||
$(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..))
|
||||
|
||||
# Computes the relative path from a directory to a file
|
||||
# $1 - File to compute the relative path to
|
||||
# $2 - Directory to compute the relative path from
|
||||
RelativePath = \
|
||||
$(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \
|
||||
$(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)%, %, $2))) \
|
||||
$(eval $1_dotdots := $(if $($(strip $1)_dotdots),$($(strip $1)_dotdots),.)) \
|
||||
$(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \
|
||||
$($(strip $1)_dotdots)/$($(strip $1)_suffix)
|
||||
|
||||
################################################################################
|
||||
# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
|
||||
uniq = \
|
||||
$(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
|
||||
|
||||
# Returns all whitespace-separated words in $2 where at least one of the
|
||||
# whitespace-separated words in $1 is a substring.
|
||||
containing = \
|
||||
$(strip \
|
||||
$(foreach v,$(strip $2),\
|
||||
$(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
|
||||
|
||||
# Returns all whitespace-separated words in $2 where none of the
|
||||
# whitespace-separated words in $1 is a substring.
|
||||
not-containing = \
|
||||
$(strip $(filter-out $(call containing,$1,$2),$2))
|
||||
|
||||
# Return a list of all string elements that are duplicated in $1.
|
||||
dups = \
|
||||
$(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
|
||||
$(words $(filter $v, $1))), $v)))
|
||||
|
||||
# String equals
|
||||
equals = \
|
||||
$(and $(findstring $(strip $1),$(strip $2)),\
|
||||
$(findstring $(strip $2),$(strip $1)))
|
||||
|
||||
# Remove a whole list of prefixes
|
||||
# $1 - List of prefixes
|
||||
# $2 - List of elements to process
|
||||
remove-prefixes = \
|
||||
$(strip $(if $1,$(patsubst $(firstword $1)%,%,\
|
||||
$(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
|
||||
|
||||
# Convert the string given to upper case, without any $(shell)
|
||||
# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html
|
||||
uppercase_table := a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O \
|
||||
p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
|
||||
|
||||
uppercase_internal = \
|
||||
$(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \
|
||||
$(wordlist 2, $(words $1), $1), $2)), $2)
|
||||
|
||||
# Convert a string to upper case. Works only on a-z.
|
||||
# $1 - The string to convert
|
||||
uppercase = \
|
||||
$(strip \
|
||||
$(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \
|
||||
$(uppercase_result) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Boolean operators.
|
||||
|
||||
# Return the word "true" if all the boolean words given as argument is "true",
|
||||
# and returns "false" otherwise. Boolean words must be "true" or "false". It is
|
||||
# an error to supply a non-boolean word. An empty string is considered "true".
|
||||
And = \
|
||||
$(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
|
||||
$(if $(strip $(filter-out true, $1)), false, true))
|
||||
|
||||
# Return the word "false" if all the boolean words given as argument is "false",
|
||||
# and returns "true" otherwise. Boolean words must be "true" or "false". It is
|
||||
# an error to supply a non-boolean word. An empty string is considered "false".
|
||||
Or = \
|
||||
$(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
|
||||
$(if $(strip $(filter-out false, $1)), true, false))
|
||||
|
||||
################################################################################
|
||||
# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
|
||||
# These will be converted into a series of variables like FOO_KEYWORD1=val1,
|
||||
# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
|
||||
#
|
||||
# Parameter 1 is the name of the rule, and is also the name of the variable.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# SINGLE_KEYWORDS A list of valid keywords with single string values
|
||||
# STRING_KEYWORDS A list of valid keywords, processed as string. This means
|
||||
# that '%20' will be replaced by ' ' to allow for multi-word strings.
|
||||
#
|
||||
ParseKeywordVariable = $(NamedParamsMacroTemplate)
|
||||
define ParseKeywordVariableBody
|
||||
ifneq ($$($1), )
|
||||
# To preserve spaces, substitute them with a hopefully unique pattern
|
||||
# before splitting and then re-substitute spaces back.
|
||||
$1_MANGLED := $$(subst $$(SPACE),||||,$$($1))
|
||||
$$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \
|
||||
$$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
|
||||
$$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
|
||||
$$(eval $1_NO_MATCH := true) \
|
||||
$$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
|
||||
$$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
|
||||
$$(if $$(filter $$(keyword)=%, $$(part)), \
|
||||
$$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \
|
||||
$$(eval $1_NO_MATCH := ) \
|
||||
) \
|
||||
) \
|
||||
$$(foreach keyword, $$($1_STRING_KEYWORDS), \
|
||||
$$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
|
||||
$$(if $$(filter $$(keyword)=%, $$(part)), \
|
||||
$$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \
|
||||
$$(eval $1_NO_MATCH := ) \
|
||||
) \
|
||||
) \
|
||||
$$(if $$($1_NO_MATCH), \
|
||||
$$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \
|
||||
$$(info Keyword $$(part) for $1 needs to be assigned a value.) \
|
||||
, \
|
||||
$$(info $$(part) is not a valid keyword for $1.) \
|
||||
$$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
|
||||
) \
|
||||
$$(error Cannot continue) \
|
||||
) \
|
||||
)
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# ShellQuote
|
||||
#
|
||||
# Quotes a string with single quotes and replaces single quotes with '\'' so
|
||||
# that the contents survives being given to the shell.
|
||||
ShellQuote = \
|
||||
$(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE)
|
||||
|
||||
################################################################################
|
||||
# Find lib dir for module
|
||||
# Param 1 - module name
|
||||
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
|
||||
# separate classpath entries. Safe for multiple nested calls.
|
||||
# param 1 : A space separated list of classpath entries
|
||||
# The surrounding strip is needed to keep additional whitespace out
|
||||
PathList = \
|
||||
"$(subst $(SPACE),:,$(strip $(subst $(DQUOTE),,$1)))"
|
||||
|
||||
################################################################################
|
||||
# Check if a specified hotspot variant is being built, or at least one of a
|
||||
# list of variants. Will return 'true' or 'false'.
|
||||
# $1 - the variant to test for
|
||||
check-jvm-variant = \
|
||||
$(strip \
|
||||
$(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
|
||||
$(error Internal error: Invalid variant tested: $1)) \
|
||||
$(if $(filter $1, $(JVM_VARIANTS)), true, false))
|
||||
|
||||
################################################################################
|
||||
# Check if our build or target conforms to certain restrictions. This set of
|
||||
# functions all work in similar ways, testing the property that the name
|
||||
# implies, so e.g. isTargetCpu test the CPU of the target system.
|
||||
#
|
||||
# $1 - A property, or a space separated list of properties to test for.
|
||||
#
|
||||
# Returns true if the actual property matches one of the properties in the list,
|
||||
# and false otherwise.
|
||||
#
|
||||
# Examples: $(call isTargetOs, linux solaris) will return true when executed
|
||||
# on either linux or solaris, and false otherwise.
|
||||
# $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
|
||||
|
||||
isTargetOs = \
|
||||
$(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false))
|
||||
|
||||
isTargetOsType = \
|
||||
$(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false))
|
||||
|
||||
isTargetCpu = \
|
||||
$(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false))
|
||||
|
||||
isTargetCpuArch = \
|
||||
$(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false))
|
||||
|
||||
isTargetCpuBits = \
|
||||
$(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false))
|
||||
|
||||
isBuildOs = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false))
|
||||
|
||||
isBuildOsType = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_OS_TYPE), $1), true, false))
|
||||
|
||||
isBuildOsEnv = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_OS_ENV), $1), true, false))
|
||||
|
||||
isBuildCpu = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_CPU), $1), true, false))
|
||||
|
||||
isBuildCpuArch = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
|
||||
|
||||
################################################################################
|
||||
# Converts a space separated list to a comma separated list.
|
||||
#
|
||||
# Replacing double-comma with a single comma is to workaround the issue with
|
||||
# some version of make on windows that doesn't substitute spaces with one comma
|
||||
# properly.
|
||||
CommaList = \
|
||||
$(strip \
|
||||
$(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Converts a space separated list to a colon separated list.
|
||||
#
|
||||
# Replacing double-colon with a single colon is to workaround the issue with
|
||||
# some version of make on windows that doesn't substitute spaces with one colon
|
||||
# properly.
|
||||
ColonList = \
|
||||
$(strip \
|
||||
$(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Given a list of files, filters out locale specific files for translations
|
||||
# that should be excluded from this build.
|
||||
# $1 - The list of files to filter
|
||||
# $2 - The suffix of the files that should be considered (.java or .properties)
|
||||
FilterExcludedTranslations = \
|
||||
$(strip $(if $(EXCLUDE_TRANSLATIONS), \
|
||||
$(filter-out \
|
||||
$(foreach suffix, $2, \
|
||||
$(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \
|
||||
), \
|
||||
$1 \
|
||||
), \
|
||||
$1 \
|
||||
))
|
||||
@@ -23,21 +23,19 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Versions and download locations for dependencies used by pre-submit testing.
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
BOOT_JDK_VERSION=11
|
||||
JTREG_VERSION=6
|
||||
JTREG_BUILD=1
|
||||
GTEST_VERSION=1.8.1
|
||||
JTREG_VERSION=6.1+3
|
||||
|
||||
LINUX_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14.1_1.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=43fb84f8063ad9bf6b6d694a67b8f64c8827552b920ec5ce794dfe5602edffe7
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.18_10.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=4a29efda1d702b8ff38e554cf932051f40ec70006caed5c4857a8cbc7a0b7db7
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_windows_hotspot_11.0.14.1_1.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=3e7da701aa92e441418299714f0ed6db10c3bb1e2db625c35a2c2cd9cc619731
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_windows_hotspot_11.0.18_10.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=0cfa5991a8e372b3f8eacacbb2a336663ead0cc6ec9c9ab6cd53206602fb0062
|
||||
|
||||
MACOS_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_osx-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.14.1_1.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=8c69808f5d9d209b195575e979de0e43cdf5d0f1acec1853a569601fe2c1f743
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.18%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.18_10.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=75d79315d7265cc4b89fd9e844161ff90798bc6482ace8c1ac75f862a5b3b565
|
||||
@@ -232,7 +232,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
// List of the main profile names used for iteration
|
||||
common.main_profile_names = [
|
||||
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
|
||||
"solaris-sparcv9", "windows-x64", "windows-x86",
|
||||
"solaris-sparcv9", "windows-x64", "windows-x86", "windows-aarch64",
|
||||
"linux-aarch64", "linux-arm32", "linux-arm64", "linux-arm-vfp-hflt",
|
||||
"linux-arm-vfp-hflt-dyn"
|
||||
];
|
||||
@@ -449,6 +449,15 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
configure_args: concat(common.configure_args_32bit),
|
||||
},
|
||||
|
||||
"windows-aarch64": {
|
||||
target_os: "windows",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "build_devkit"],
|
||||
configure_args: [
|
||||
"--openjdk-target=aarch64-unknown-cygwin",
|
||||
],
|
||||
},
|
||||
|
||||
"linux-aarch64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
@@ -624,6 +633,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
platform: "windows-x86",
|
||||
jdk_suffix: "zip",
|
||||
},
|
||||
"windows-aarch64": {
|
||||
platform: "windows-aarch64",
|
||||
jdk_suffix: "zip",
|
||||
},
|
||||
"linux-aarch64": {
|
||||
platform: "linux-aarch64",
|
||||
},
|
||||
@@ -849,18 +862,18 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
var devkit_platform_revisions = {
|
||||
linux_x64: "gcc7.3.0-OEL6.4+1.1",
|
||||
linux_x64: "gcc8.2.0-OL6.4+1.0",
|
||||
macosx_x64: "Xcode11.3.1-MacOSX10.15+1.0",
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
|
||||
windows_x64: "VS2017-15.9.16+1.0",
|
||||
windows_x64: "VS2017-15.9.16+1.1",
|
||||
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.1"),
|
||||
: "gcc8.2.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"
|
||||
: (input.profile != null && input.profile.indexOf("arm32") >= 0
|
||||
? "gcc7.3.0-Fedora27+1.1"
|
||||
? "gcc8.2.0-Fedora27+1.0"
|
||||
: "arm-linaro-4.7+1.0"
|
||||
)
|
||||
)
|
||||
@@ -869,6 +882,21 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
var devkit_platform = (input.target_cpu == "x86"
|
||||
? input.target_os + "_x64"
|
||||
: input.target_platform);
|
||||
if (input.target_platform == "windows_aarch64") {
|
||||
devkit_platform = "windows_x64";
|
||||
}
|
||||
var devkit_cross_prefix = "";
|
||||
if (!(input.target_os == "windows")) {
|
||||
if (input.build_platform != input.target_platform
|
||||
&& input.build_platform != devkit_platform) {
|
||||
devkit_cross_prefix = input.build_platform + "-to-";
|
||||
}
|
||||
}
|
||||
|
||||
var devkit_cross_prefix = "";
|
||||
if (input.target_platform != input.build_platform) {
|
||||
devkit_cross_prefix = input.build_platform + "-to-";
|
||||
}
|
||||
|
||||
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
|
||||
+ "-" + input.build_cpu;
|
||||
@@ -893,7 +921,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
devkit: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
module: "devkit-" + devkit_platform,
|
||||
module: "devkit-" + devkit_cross_prefix + devkit_platform,
|
||||
revision: devkit_platform_revisions[devkit_platform],
|
||||
environment: {
|
||||
"DEVKIT_HOME": input.get("devkit", "home_path"),
|
||||
@@ -1182,13 +1210,17 @@ var versionArgs = function(input, common) {
|
||||
"--with-version-pre=" + version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"),
|
||||
"--without-version-opt");
|
||||
} else if (input.build_type == "ci") {
|
||||
var optString = input.build_id_data.ciBuildNumber;
|
||||
var ciBuildNumber = input.build_id_data.ciBuildNumber;
|
||||
var preString = input.build_id_data.projectName;
|
||||
if (preString == "jdk") {
|
||||
preString = version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE");
|
||||
}
|
||||
args = concat(args, "--with-version-pre=" + preString,
|
||||
"--with-version-opt=" + optString);
|
||||
"--with-version-opt=" + ciBuildNumber);
|
||||
if (input.target_os == "macosx") {
|
||||
args = concat(args, "--with-macosx-bundle-build-version="
|
||||
+ common.build_number + "." + ciBuildNumber);
|
||||
}
|
||||
} else {
|
||||
args = concat(args, "--with-version-opt=" + common.build_id);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
|
||||
TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
|
||||
|
||||
@@ -43,8 +43,11 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Copy the microsoft runtime libraries on windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# Copy the microsoft runtime libraries on windows, but only if we are not
|
||||
# creating a buildjdk. If we are, the provided runtime librareis are made for
|
||||
# the target platform, not the build platform (and we should not need to bundle
|
||||
# anything with the minimalistic, locally-only buildjdk.)
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(CREATING_BUILDJDK), windows+false)
|
||||
|
||||
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
|
||||
define copy-and-chmod
|
||||
@@ -59,12 +62,17 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
FILES := $(MSVCR_DLL), \
|
||||
MACRO := copy-and-chmod))
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_VCRUNTIME_1, \
|
||||
DEST := $(LIB_DST_DIR), \
|
||||
FILES := $(VCRUNTIME_1_DLL), \
|
||||
MACRO := copy-and-chmod))
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_MSVCP, \
|
||||
DEST := $(LIB_DST_DIR), \
|
||||
FILES := $(MSVCP_DLL), \
|
||||
MACRO := copy-and-chmod))
|
||||
|
||||
TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
|
||||
TARGETS += $(COPY_MSVCR) $(COPY_VCRUNTIME_1) $(COPY_MSVCP)
|
||||
|
||||
ifneq ($(UCRT_DLL_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
|
||||
@@ -81,7 +89,7 @@ endif
|
||||
################################################################################
|
||||
# In jvm.cfg, the first listed KNOWN variant is the default. On most build
|
||||
# configurations, that is the server variant.
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86)
|
||||
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
|
||||
DEFAULT_CFG_VARIANT ?= client
|
||||
endif
|
||||
DEFAULT_CFG_VARIANT ?= server
|
||||
@@ -143,7 +151,7 @@ DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy
|
||||
DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
|
||||
DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
|
||||
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )
|
||||
ifeq ($(call isTargetOs, windows solaris), true)
|
||||
DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
|
||||
endif
|
||||
|
||||
@@ -183,7 +191,7 @@ $(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
|
||||
|
||||
TARGETS += $(COPY_NET_PROPERTIES)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
|
||||
FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
|
||||
DEST := $(CONF_DST_DIR)/sdp, \
|
||||
|
||||
@@ -27,7 +27,7 @@ include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
|
||||
SUNPKCS11_CFG_SRC := \
|
||||
$(TOPDIR)/src/jdk.crypto.cryptoki/solaris/conf/security/sunpkcs11-solaris.cfg
|
||||
|
||||
@@ -27,7 +27,7 @@ include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call isTargetOs, solaris), true)
|
||||
|
||||
UCRYPTO_CFG_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
|
||||
UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>@@VERSION@@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@@VERSION@@</string>
|
||||
<string>@@BUILD_VERSION@@</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>The application is requesting access to the microphone.</string>
|
||||
<key>JavaVM</key>
|
||||
@@ -33,9 +33,9 @@
|
||||
<key>JVMMinimumFrameworkVersion</key>
|
||||
<string>13.2.9</string>
|
||||
<key>JVMMinimumSystemVersion</key>
|
||||
<string>10.6.0</string>
|
||||
<string>@@MACOSX_VERSION_MIN@@</string>
|
||||
<key>JVMPlatformVersion</key>
|
||||
<string>@@PLATFORM_VERSION@@</string>
|
||||
<string>@@VERSION@@</string>
|
||||
<key>JVMVendor</key>
|
||||
<string>@@VENDOR@@</string>
|
||||
<key>JVMVersion</key>
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>@@VERSION@@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@@VERSION@@</string>
|
||||
<string>@@BUILD_VERSION@@</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>The application is requesting access to the microphone.</string>
|
||||
<key>JavaVM</key>
|
||||
@@ -29,9 +29,9 @@
|
||||
<key>JVMMinimumFrameworkVersion</key>
|
||||
<string>13.2.9</string>
|
||||
<key>JVMMinimumSystemVersion</key>
|
||||
<string>10.6.0</string>
|
||||
<string>@@MACOSX_VERSION_MIN@@</string>
|
||||
<key>JVMPlatformVersion</key>
|
||||
<string>@@PLATFORM_VERSION@@</string>
|
||||
<string>@@VERSION@@</string>
|
||||
<key>JVMVendor</key>
|
||||
<string>@@VENDOR@@</string>
|
||||
<key>JVMVersion</key>
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@@VERSION@@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@@BUILD_VERSION@@</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>The application is requesting access to the microphone.</string>
|
||||
@@EXTRA@@
|
||||
</dict>
|
||||
</plist>
|
||||
29
make/data/cacerts/certignaca
Normal file
29
make/data/cacerts/certignaca
Normal file
@@ -0,0 +1,29 @@
|
||||
Owner: CN=Certigna, O=Dhimyotis, C=FR
|
||||
Issuer: CN=Certigna, O=Dhimyotis, C=FR
|
||||
Serial number: fedce3010fc948ff
|
||||
Valid from: Fri Jun 29 15:13:05 GMT 2007 until: Tue Jun 29 15:13:05 GMT 2027
|
||||
Signature algorithm name: SHA1withRSA
|
||||
Subject Public Key Algorithm: 2048-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
|
||||
BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
|
||||
DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
|
||||
BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
|
||||
DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
|
||||
QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
|
||||
gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
|
||||
zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
|
||||
130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
|
||||
JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
|
||||
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
|
||||
ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
|
||||
AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
|
||||
AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
|
||||
9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
|
||||
bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
|
||||
fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
|
||||
HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
|
||||
t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
|
||||
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
|
||||
-----END CERTIFICATE-----
|
||||
43
make/data/cacerts/certignarootca
Normal file
43
make/data/cacerts/certignarootca
Normal file
@@ -0,0 +1,43 @@
|
||||
Owner: CN=Certigna Root CA, OU=0002 48146308100036, O=Dhimyotis, C=FR
|
||||
Issuer: CN=Certigna Root CA, OU=0002 48146308100036, O=Dhimyotis, C=FR
|
||||
Serial number: cae91b89f155030da3e6416dc4e3a6e1
|
||||
Valid from: Tue Oct 01 08:32:27 GMT 2013 until: Sat Oct 01 08:32:27 GMT 2033
|
||||
Signature algorithm name: SHA256withRSA
|
||||
Subject Public Key Algorithm: 4096-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAw
|
||||
WjELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAw
|
||||
MiA0ODE0NjMwODEwMDAzNjEZMBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0x
|
||||
MzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjdaMFoxCzAJBgNVBAYTAkZSMRIwEAYD
|
||||
VQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYzMDgxMDAwMzYxGTAX
|
||||
BgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
|
||||
ggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sO
|
||||
ty3tRQgXstmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9M
|
||||
CiBtnyN6tMbaLOQdLNyzKNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPu
|
||||
I9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8JXrJhFwLrN1CTivngqIkicuQstDuI7pm
|
||||
TLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16XdG+RCYyKfHx9WzMfgIh
|
||||
C59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq4NYKpkDf
|
||||
ePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3Yz
|
||||
IoejwpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWT
|
||||
Co/1VTp2lc5ZmIoJlXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1k
|
||||
JWumIWmbat10TWuXekG9qxf5kBdIjzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5
|
||||
hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp//TBt2dzhauH8XwIDAQABo4IB
|
||||
GjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
|
||||
FBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of
|
||||
1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczov
|
||||
L3d3d3cuY2VydGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilo
|
||||
dHRwOi8vY3JsLmNlcnRpZ25hLmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYr
|
||||
aHR0cDovL2NybC5kaGlteW90aXMuY29tL2NlcnRpZ25hcm9vdGNhLmNybDANBgkq
|
||||
hkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOItOoldaDgvUSILSo3L
|
||||
6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxPTGRG
|
||||
HVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH6
|
||||
0BGM+RFq7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncB
|
||||
lA2c5uk5jR+mUYyZDDl34bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdi
|
||||
o2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1
|
||||
gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS6Cvu5zHbugRqh5jnxV/v
|
||||
faci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaYtlu3zM63
|
||||
Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayh
|
||||
jWZSaX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw
|
||||
3kAP+HwV96LOPNdeE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
|
||||
-----END CERTIFICATE-----
|
||||
21
make/data/cacerts/digicertcseccrootg5
Normal file
21
make/data/cacerts/digicertcseccrootg5
Normal file
@@ -0,0 +1,21 @@
|
||||
Owner: CN=DigiCert CS ECC P384 Root G5, O="DigiCert, Inc.", C=US
|
||||
Issuer: CN=DigiCert CS ECC P384 Root G5, O="DigiCert, Inc.", C=US
|
||||
Serial number: 3698fe712d519f3ced0fdb7b1643011
|
||||
Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046
|
||||
Signature algorithm name: SHA384withECDSA
|
||||
Subject Public Key Algorithm: 384-bit EC (secp384r1) key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICFjCCAZ2gAwIBAgIQA2mP5xLVGfPO0P23sWQwETAKBggqhkjOPQQDAzBNMQsw
|
||||
CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERp
|
||||
Z2lDZXJ0IENTIEVDQyBQMzg0IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYw
|
||||
MTE0MjM1OTU5WjBNMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIElu
|
||||
Yy4xJTAjBgNVBAMTHERpZ2lDZXJ0IENTIEVDQyBQMzg0IFJvb3QgRzUwdjAQBgcq
|
||||
hkjOPQIBBgUrgQQAIgNiAAR/FK2Ftpf9AiE1TWDoOJOTmz0FEG2v0/7v+rv7c5nz
|
||||
7DISjcdouIveiaKIVHeNuyF+M5VWlgno1YyhBLibbhkAYuhCKKZYN4QZVSZ7Mzdn
|
||||
8ppyraGurgBCPBx+uHqeIZyjQjBAMB0GA1UdDgQWBBTwjJhxOThlwjobphdmHcjt
|
||||
Zd6SNjAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQD
|
||||
AwNnADBkAjAjb+EAGSZQ5EYgZYs3p8/rBuHMMskqoewyDXOiHgIcNWEqTmmrOXft
|
||||
l4jAfWvqid0CMEPx0VijdT6Gm7ZVEYsX9z3+CmnFf07GdRtalMvqERHGCCKI3tB6
|
||||
oqV56OMhp80Tsw==
|
||||
-----END CERTIFICATE-----
|
||||
38
make/data/cacerts/digicertcsrsarootg5
Normal file
38
make/data/cacerts/digicertcsrsarootg5
Normal file
@@ -0,0 +1,38 @@
|
||||
Owner: CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US
|
||||
Issuer: CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US
|
||||
Serial number: 6cee131be6d55c807f7c0c7fb44e620
|
||||
Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046
|
||||
Signature algorithm name: SHA384withRSA
|
||||
Subject Public Key Algorithm: 4096-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFZDCCA0ygAwIBAgIQBs7hMb5tVcgH98DH+0TmIDANBgkqhkiG9w0BAQwFADBM
|
||||
MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJDAiBgNVBAMT
|
||||
G0RpZ2lDZXJ0IENTIFJTQTQwOTYgUm9vdCBHNTAeFw0yMTAxMTUwMDAwMDBaFw00
|
||||
NjAxMTQyMzU5NTlaMEwxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwg
|
||||
SW5jLjEkMCIGA1UEAxMbRGlnaUNlcnQgQ1MgUlNBNDA5NiBSb290IEc1MIICIjAN
|
||||
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtjNzgNhiA3AULBEcOV58rnyDhh3+
|
||||
Ji9MJK2L6oNfqbw9W/wLmEwCRzDs4v7s6DRbZl6/O9cspiX/jFmz3+rafCnZRlBy
|
||||
CB1u0RsK3R/NmYn6Dw9zxOGcHXUyzW+X2ipqlbJsyQnQ6gt7fRcGSZnv1t7gyFPU
|
||||
rsZ38Ya7Ixy4wN9Z94590e+C5iaLWji1/3XVstlPCfM3iFDaEaSKFBTRUwQAffNq
|
||||
RBj+UHAyBxyomg46HcUKH24LJmm3PKJXcCyG+kxulalYQ7msEtb/P+3XQxdrTM6e
|
||||
xJCr//oQUJqjkFfW54wQrp8WGs81HX/Xdu2KnDWnKLinXSH8MDfd3ggZTxXG56ba
|
||||
kEeO95RTTI5TAr79meXqhtCvAwLTm6qT8asojiAB/0z7zLcpQPWHpBITBR9DbtdR
|
||||
UJ84tCDtFwkSj8y5Ga+fzb5pEdOvVRBtF4Z5llLGsgCd5a84sDX0iGuPDgQ9fO6v
|
||||
zdNqEErGzYbKIj2hSlz7Dv+I31xip8C5HtmsbH44N/53kyXChYpPtTcGWgaBFPHO
|
||||
lJ2ZkeoyWs5nPW4EZq0MTy2jLvee9Xid9wr9fo/jQopVlrzxnzct/J5flf6MGBv8
|
||||
jv1LkK/XA2gSY6zik6eiywTlT2TOA/rGFJ/Zi+jM1GKMa+QALBmfGgbGMYFU+1Mk
|
||||
mq9Vmbqdda64wt0CAwEAAaNCMEAwHQYDVR0OBBYEFGgBk7HSSkBCaZRGLBxaiKkl
|
||||
tEdPMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB
|
||||
DAUAA4ICAQCS/O64AnkXAlF9IcVJZ6ek8agkOOsMaOpaQmuc9HPBaUotszcFUEKY
|
||||
kp4GeSwuBpn2798roM2zkgGDtaDLJ7U8IxqYSaLsLZmlWUOs0rGT1lfXHLyT1sZA
|
||||
4bNvGVW3E9flQzOktavL2sExZA101iztw41u67uvGUdhYS3A9AW5b3jcOvdCQGVT
|
||||
kb2ZDZOSVKapN1krm8uZxrw99wSE8JQzHQ+CWjnLLkXDKBmjspuYyPwxa2CP9umG
|
||||
KLzgPH10XRaJW2kkxxCLxEu7Nk/UWT/DsKSRmfgu0UoBnfWIEu+/WhFqWU9Za1pn
|
||||
84+0Ew/A2C89KHKqGX8RfWpbn5XnX7eUT/E+oVr/Lcyd3yd3jzJzHGcKdvP6XLG/
|
||||
vB29DCibsscXZwszD8O9Ntz7ukILq+2Ew2LWhBapsQdrqW7uxs/msEQpwvCzYYAq
|
||||
i2/SFFwlh1Rk86RMwaH4p2vq/uo6/HnbDo/cxvPJ1Gze6YOhjh0i7Mk6sgB73Dun
|
||||
Qhp/3IupET2Op8Agb10JXUNE5o9mzKlbB/Hvm3oOs1ThlP0OLMaT11X9cZg1uAlK
|
||||
/8YpKCz2Ui3bFBiSJ+IWfozK1GG+goeR65g3P79fXXc/NKwbOEOraHKZMh46Ghml
|
||||
ozhMI9ej58zVKpIXkAtaS70WvfuGauKJmezkoFUYyaMIHxPgMghy0A==
|
||||
-----END CERTIFICATE-----
|
||||
21
make/data/cacerts/digicerttlseccrootg5
Normal file
21
make/data/cacerts/digicerttlseccrootg5
Normal file
@@ -0,0 +1,21 @@
|
||||
Owner: CN=DigiCert TLS ECC P384 Root G5, O="DigiCert, Inc.", C=US
|
||||
Issuer: CN=DigiCert TLS ECC P384 Root G5, O="DigiCert, Inc.", C=US
|
||||
Serial number: 9e09365acf7d9c8b93e1c0b042a2ef3
|
||||
Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046
|
||||
Signature algorithm name: SHA384withECDSA
|
||||
Subject Public Key Algorithm: 384-bit EC (secp384r1) key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQsw
|
||||
CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURp
|
||||
Z2lDZXJ0IFRMUyBFQ0MgUDM4NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2
|
||||
MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJ
|
||||
bmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQgUm9vdCBHNTB2MBAG
|
||||
ByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1TzvdlHJS
|
||||
7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp
|
||||
0zVozptjn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICIS
|
||||
B4CIfBFqMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49
|
||||
BAMDA2gAMGUCMQCJao1H5+z8blUD2WdsJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQ
|
||||
LgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIxAJSdYsiJvRmEFOml+wG4
|
||||
DXZDjC5Ty3zfDBeWUA==
|
||||
-----END CERTIFICATE-----
|
||||
38
make/data/cacerts/digicerttlsrsarootg5
Normal file
38
make/data/cacerts/digicerttlsrsarootg5
Normal file
@@ -0,0 +1,38 @@
|
||||
Owner: CN=DigiCert TLS RSA4096 Root G5, O="DigiCert, Inc.", C=US
|
||||
Issuer: CN=DigiCert TLS RSA4096 Root G5, O="DigiCert, Inc.", C=US
|
||||
Serial number: 8f9b478a8fa7eda6a333789de7ccf8a
|
||||
Valid from: Fri Jan 15 00:00:00 GMT 2021 until: Sun Jan 14 23:59:59 GMT 2046
|
||||
Signature algorithm name: SHA384withRSA
|
||||
Subject Public Key Algorithm: 4096-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBN
|
||||
MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMT
|
||||
HERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcN
|
||||
NDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQs
|
||||
IEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwggIi
|
||||
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS87IE+
|
||||
ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG0
|
||||
2C+JFvuUAT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgp
|
||||
wgscONyfMXdcvyej/Cestyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZM
|
||||
pG2T6T867jp8nVid9E6P/DsjyG244gXazOvswzH016cpVIDPRFtMbzCe88zdH5RD
|
||||
nU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnVDdXifBBiqmvwPXbzP6Po
|
||||
sMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9qTXeXAaDx
|
||||
Zre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cd
|
||||
Lvvyz6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvX
|
||||
KyY//SovcfXWJL5/MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNe
|
||||
XoVPzthwiHvOAbWWl9fNff2C+MIkwcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPL
|
||||
tgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4EFgQUUTMc7TZArxfTJc1paPKv
|
||||
TiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN
|
||||
AQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw
|
||||
GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7H
|
||||
PNtQOa27PShNlnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLF
|
||||
O4uJ+DQtpBflF+aZfTCIITfNMBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQ
|
||||
REtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/u4cnYiWB39yhL/btp/96j1EuMPik
|
||||
AdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9GOUrYU9DzLjtxpdRv
|
||||
/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh47a+
|
||||
p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilw
|
||||
MUc/dNAUFvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WF
|
||||
qUITVuwhd4GTWgzqltlJyqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCK
|
||||
ovfepEWFJqgejF0pW8hL2JpqA15w8oVPbEtoL8pU9ozaMv7Da4M/OMZ+
|
||||
-----END CERTIFICATE-----
|
||||
38
make/data/cacerts/gtsrootcar1
Normal file
38
make/data/cacerts/gtsrootcar1
Normal file
@@ -0,0 +1,38 @@
|
||||
Owner: CN=GTS Root R1, O=Google Trust Services LLC, C=US
|
||||
Issuer: CN=GTS Root R1, O=Google Trust Services LLC, C=US
|
||||
Serial number: 203e5936f31b01349886ba217
|
||||
Valid from: Wed Jun 22 00:00:00 GMT 2016 until: Sun Jun 22 00:00:00 GMT 2036
|
||||
Signature algorithm name: SHA384withRSA
|
||||
Subject Public Key Algorithm: 4096-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQsw
|
||||
CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU
|
||||
MBIGA1UEAxMLR1RTIFJvb3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAw
|
||||
MDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp
|
||||
Y2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUA
|
||||
A4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaMf/vo
|
||||
27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7w
|
||||
Cl7raKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjw
|
||||
TcLCeoiKu7rPWRnWr4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0Pfybl
|
||||
qAj+lug8aJRT7oM6iCsVlgmy4HqMLnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaH
|
||||
szVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk9+aCEI3oncKKiPo4Zor8
|
||||
Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zqkUspzBmk
|
||||
MiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92
|
||||
wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70p
|
||||
aDPvOmbsB4om3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrN
|
||||
VjzRlwW5y0vtOUucxD/SVRNuJLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQID
|
||||
AQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
|
||||
FgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQADggIBAJ+qQibb
|
||||
C5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe
|
||||
QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuy
|
||||
h6f88/qBVRRiClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM4
|
||||
7HLwEXWdyzRSjeZ2axfG34arJ45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8J
|
||||
ZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYciNuaCp+0KueIHoI17eko8cdLiA6Ef
|
||||
MgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5meLMFrUKTX5hgUvYU/
|
||||
Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJFfbdT
|
||||
6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ
|
||||
0E6yove+7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm
|
||||
2tIMPNuzjsmhDYAPexZ3FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bb
|
||||
bP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3gm3c
|
||||
-----END CERTIFICATE-----
|
||||
38
make/data/cacerts/gtsrootcar2
Normal file
38
make/data/cacerts/gtsrootcar2
Normal file
@@ -0,0 +1,38 @@
|
||||
Owner: CN=GTS Root R2, O=Google Trust Services LLC, C=US
|
||||
Issuer: CN=GTS Root R2, O=Google Trust Services LLC, C=US
|
||||
Serial number: 203e5aec58d04251aab1125aa
|
||||
Valid from: Wed Jun 22 00:00:00 GMT 2016 until: Sun Jun 22 00:00:00 GMT 2036
|
||||
Signature algorithm name: SHA384withRSA
|
||||
Subject Public Key Algorithm: 4096-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQsw
|
||||
CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU
|
||||
MBIGA1UEAxMLR1RTIFJvb3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAw
|
||||
MDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp
|
||||
Y2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUA
|
||||
A4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3LvCvpt
|
||||
nfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY
|
||||
6Dlo7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAu
|
||||
MC6C/Pq8tBcKSOWIm8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7k
|
||||
RXuJVfeKH2JShBKzwkCX44ofR5GmdFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWg
|
||||
f9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7MkogwTZq9TwtImoS1mKPV
|
||||
+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJGr61K8Yzo
|
||||
dDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW
|
||||
Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKa
|
||||
G73VululycslaVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCq
|
||||
gc7dGtxRcw1PcOnlthYhGXmy5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwID
|
||||
AQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
|
||||
FgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQADggIBAB/Kzt3H
|
||||
vqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8
|
||||
0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyC
|
||||
B19m3H0Q/gxhswWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2u
|
||||
NmSRXbBoGOqKYcl3qJfEycel/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMg
|
||||
yALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVnjWQye+mew4K6Ki3pHrTgSAai/Gev
|
||||
HyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y59PYjJbigapordwj6
|
||||
xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M7YNR
|
||||
TOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924Sg
|
||||
JPFI/2R80L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV
|
||||
7LXTWtiBmelDGDfrs7vRWGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl
|
||||
6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjWHYbL
|
||||
-----END CERTIFICATE-----
|
||||
20
make/data/cacerts/gtsrootecccar3
Normal file
20
make/data/cacerts/gtsrootecccar3
Normal file
@@ -0,0 +1,20 @@
|
||||
Owner: CN=GTS Root R3, O=Google Trust Services LLC, C=US
|
||||
Issuer: CN=GTS Root R3, O=Google Trust Services LLC, C=US
|
||||
Serial number: 203e5b882eb20f825276d3d66
|
||||
Valid from: Wed Jun 22 00:00:00 GMT 2016 until: Sun Jun 22 00:00:00 GMT 2036
|
||||
Signature algorithm name: SHA384withECDSA
|
||||
Subject Public Key Algorithm: 384-bit EC (secp384r1) key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYD
|
||||
VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG
|
||||
A1UEAxMLR1RTIFJvb3QgUjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAw
|
||||
WjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz
|
||||
IExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjOPQIBBgUrgQQAIgNi
|
||||
AAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout736G
|
||||
jOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL2
|
||||
4CejQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
|
||||
BBTB8Sa6oC2uhYHP0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7
|
||||
VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azTL818+FsuVbu/3ZL3pAzcMeGiAjEA/Jdm
|
||||
ZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV11RZt+cRLInUue4X
|
||||
-----END CERTIFICATE-----
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user