mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-13 21:09:41 +01:00
Compare commits
839 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
998d0baab0 | ||
|
|
0735c8ab26 | ||
|
|
5fa2bdc6c7 | ||
|
|
be2b92bd8b | ||
|
|
38ad514589 | ||
|
|
b938a5c9ed | ||
|
|
a93605f7fb | ||
|
|
41242cbe5d | ||
|
|
5db50aca69 | ||
|
|
eb4b6fa621 | ||
|
|
e7e8083139 | ||
|
|
e6b3bda2c3 | ||
|
|
1ab6bd434f | ||
|
|
3b90ddfefe | ||
|
|
9b1f1e5294 | ||
|
|
6cad07c23b | ||
|
|
4dd6c44cbd | ||
|
|
33f2382767 | ||
|
|
419191c653 | ||
|
|
349df0a0e5 | ||
|
|
552411f832 | ||
|
|
9f0e7da64e | ||
|
|
81b065a95d | ||
|
|
4fcae1aef5 | ||
|
|
c5c866aafe | ||
|
|
ac3ce2aa15 | ||
|
|
bceaed6d4d | ||
|
|
16d917a85f | ||
|
|
60cbf29250 | ||
|
|
da14aa463b | ||
|
|
d482c1af28 | ||
|
|
e85355ada4 | ||
|
|
5d3d40d962 | ||
|
|
7583419d88 | ||
|
|
c5f1dcccfc | ||
|
|
4d82ea102a | ||
|
|
a48f5966be | ||
|
|
5daf63b717 | ||
|
|
97aca09e58 | ||
|
|
ec9437dbcc | ||
|
|
0901dedefe | ||
|
|
d22d890cac | ||
|
|
93feda3d9a | ||
|
|
fc67c2b4f1 | ||
|
|
b87d9cf2c9 | ||
|
|
0963a4e9a1 | ||
|
|
bf13a4e281 | ||
|
|
f62b5789ad | ||
|
|
9a9cfbe0ba | ||
|
|
3780ad3133 | ||
|
|
2d3c9c5e67 | ||
|
|
20c71ceacd | ||
|
|
c042f08632 | ||
|
|
bb6b04897b | ||
|
|
490825fb91 | ||
|
|
3a00fc732a | ||
|
|
f32f574004 | ||
|
|
09f755a64d | ||
|
|
1799ffeaa9 | ||
|
|
d10f277bd3 | ||
|
|
63f6a563a3 | ||
|
|
27574b384c | ||
|
|
c26c5833cc | ||
|
|
09a78b5da9 | ||
|
|
ef2d5c40c0 | ||
|
|
11fdca0634 | ||
|
|
5d414da504 | ||
|
|
93a2e773a5 | ||
|
|
336bbbe389 | ||
|
|
cb809f8e04 | ||
|
|
c4409eafc4 | ||
|
|
54f09d7345 | ||
|
|
00ffc42cef | ||
|
|
d695af89f6 | ||
|
|
9f9a732c38 | ||
|
|
864cf22241 | ||
|
|
8e5c0ee402 | ||
|
|
724a2a2c4a | ||
|
|
f365d807e5 | ||
|
|
4406915ebc | ||
|
|
cc1e216eb9 | ||
|
|
10eafdc62e | ||
|
|
0f4cd8f1c0 | ||
|
|
8b30503387 | ||
|
|
8e5f6ddb68 | ||
|
|
0bcece9958 | ||
|
|
64f7972a3d | ||
|
|
f0f4d63fa9 | ||
|
|
51e2dde018 | ||
|
|
c022431a00 | ||
|
|
33834b7d14 | ||
|
|
23522682d4 | ||
|
|
492e8bf563 | ||
|
|
5f16f342d9 | ||
|
|
921507c510 | ||
|
|
68eb5a1df5 | ||
|
|
04d43c435d | ||
|
|
d5f3d5c8cc | ||
|
|
d31fd78d96 | ||
|
|
27003b53bb | ||
|
|
36246c975b | ||
|
|
14f9aba921 | ||
|
|
1bd91cdebe | ||
|
|
4d50ee63d6 | ||
|
|
221fbfb436 | ||
|
|
d2590c69b4 | ||
|
|
aa792eabab | ||
|
|
a2d027eaa0 | ||
|
|
b419e95173 | ||
|
|
9538f5d317 | ||
|
|
4957d6a61e | ||
|
|
d60331a21c | ||
|
|
beed4145ec | ||
|
|
56073cd1ea | ||
|
|
bb675afae6 | ||
|
|
5bf859c8e9 | ||
|
|
0d285312a9 | ||
|
|
69a11c7f7e | ||
|
|
9fbcc008cb | ||
|
|
7d32a1a829 | ||
|
|
a3d7f9f242 | ||
|
|
20a25f60ea | ||
|
|
5c5a282f91 | ||
|
|
8668198c26 | ||
|
|
a19314b087 | ||
|
|
f6d7e30b84 | ||
|
|
82609b1ebc | ||
|
|
a776104e21 | ||
|
|
56c50841ee | ||
|
|
aeb6d8c459 | ||
|
|
dc17c268e8 | ||
|
|
b366492761 | ||
|
|
9451677daa | ||
|
|
d422811bb7 | ||
|
|
3742bc626e | ||
|
|
099b744235 | ||
|
|
39627bc429 | ||
|
|
7004c2724d | ||
|
|
c2d9fa26ce | ||
|
|
f50df10591 | ||
|
|
cf13086efe | ||
|
|
3b76372254 | ||
|
|
b5df2f4314 | ||
|
|
267780bf0a | ||
|
|
f3073db42a | ||
|
|
4c7b313e0d | ||
|
|
53102502c3 | ||
|
|
7a76252007 | ||
|
|
00b5c70750 | ||
|
|
4388095cde | ||
|
|
244573e719 | ||
|
|
80b63b6729 | ||
|
|
9f4ec21f47 | ||
|
|
0aaec97527 | ||
|
|
4018b2b196 | ||
|
|
2705ed0a71 | ||
|
|
3d851033e9 | ||
|
|
ba8db1f6d7 | ||
|
|
18cea823a1 | ||
|
|
9029bf644e | ||
|
|
99c9ae127c | ||
|
|
0fdfdf71f2 | ||
|
|
3b1062d45d | ||
|
|
5a988a5087 | ||
|
|
a231706a06 | ||
|
|
2564f0f998 | ||
|
|
9a1b843ff6 | ||
|
|
a0e5e16afb | ||
|
|
0d51b76947 | ||
|
|
2b1a840002 | ||
|
|
b718ae35a8 | ||
|
|
0e2fdc95ae | ||
|
|
8cb9b479c5 | ||
|
|
1aae980c54 | ||
|
|
810daf8206 | ||
|
|
22e81810dd | ||
|
|
b823fa4450 | ||
|
|
09d4936657 | ||
|
|
f6e285103a | ||
|
|
53878eef13 | ||
|
|
130f429c6f | ||
|
|
9c852df6aa | ||
|
|
737b4c515e | ||
|
|
61f249335d | ||
|
|
8dc59763eb | ||
|
|
84965ea1a8 | ||
|
|
0c2def0e3e | ||
|
|
d0039960c4 | ||
|
|
ea98de63f7 | ||
|
|
7f6bb71eb3 | ||
|
|
ea4193222f | ||
|
|
8765b176f9 | ||
|
|
628cd8a489 | ||
|
|
842b895f09 | ||
|
|
243fb46157 | ||
|
|
74b90aa87e | ||
|
|
6dfa7f3941 | ||
|
|
6b7c9718d6 | ||
|
|
13d9e8ff38 | ||
|
|
57b04e1b5d | ||
|
|
7cd25ed605 | ||
|
|
7ec2badd21 | ||
|
|
71ff2d7177 | ||
|
|
c3c1cdd1b0 | ||
|
|
f8d8eecf80 | ||
|
|
088e54f560 | ||
|
|
c266800a3a | ||
|
|
ec20b0aa2e | ||
|
|
618af397b4 | ||
|
|
5dbf13730e | ||
|
|
4513da9496 | ||
|
|
62a4be03cf | ||
|
|
b356fee5d8 | ||
|
|
2ed889b7f2 | ||
|
|
7c6971239d | ||
|
|
482c100646 | ||
|
|
b3e0587ea0 | ||
|
|
d70156d2e2 | ||
|
|
4628763001 | ||
|
|
1e4b701749 | ||
|
|
16b3be0a76 | ||
|
|
1358850aa6 | ||
|
|
6a12362660 | ||
|
|
e5cb78cc88 | ||
|
|
efa071dd06 | ||
|
|
2546afe2aa | ||
|
|
af7eeffddb | ||
|
|
232d136885 | ||
|
|
71d2dbd0b6 | ||
|
|
6c7029ffd4 | ||
|
|
e33d8a2198 | ||
|
|
6303c0e713 | ||
|
|
3ebe6c192a | ||
|
|
d39b7bab27 | ||
|
|
ac4607ed81 | ||
|
|
b42b8886aa | ||
|
|
6944537c3e | ||
|
|
4368437475 | ||
|
|
4a3a38d1b7 | ||
|
|
40708baf7a | ||
|
|
29d89d48cb | ||
|
|
8ef918d667 | ||
|
|
69b2674c68 | ||
|
|
52d497619e | ||
|
|
8b70b8d85a | ||
|
|
5daf622aea | ||
|
|
d165d124b1 | ||
|
|
71b46c38a8 | ||
|
|
e3dc6a7a28 | ||
|
|
cc276ff0df | ||
|
|
8d9ad97c29 | ||
|
|
b797652209 | ||
|
|
9936aeea32 | ||
|
|
d91fb17a80 | ||
|
|
10beb3184e | ||
|
|
0ea75b28d4 | ||
|
|
ab5e94777c | ||
|
|
3c91b59ef9 | ||
|
|
e8ceb7189b | ||
|
|
3d3a8f0ebf | ||
|
|
b58d73b915 | ||
|
|
917838e0a5 | ||
|
|
43089bf006 | ||
|
|
d1099033ac | ||
|
|
1fb9e3d674 | ||
|
|
9cccf0515e | ||
|
|
be7cc1c2b0 | ||
|
|
fbd15b2087 | ||
|
|
299a8ee68d | ||
|
|
3a1f4d0f48 | ||
|
|
18e24d0619 | ||
|
|
a3a2b1fbbf | ||
|
|
a9c6e87c6a | ||
|
|
1ecf74c296 | ||
|
|
c3a632dca7 | ||
|
|
77ee7f0e24 | ||
|
|
4abb10eb0b | ||
|
|
3bffe223a3 | ||
|
|
e0d98dd301 | ||
|
|
f2f634448e | ||
|
|
1797efd68d | ||
|
|
0f5f3c9b97 | ||
|
|
4b1e367eda | ||
|
|
96eb0390d6 | ||
|
|
2d252ee06e | ||
|
|
b814c3184e | ||
|
|
50b17d9846 | ||
|
|
51d7169bd9 | ||
|
|
fd89b334c4 | ||
|
|
d1c82156ba | ||
|
|
f356970b89 | ||
|
|
b75c134fac | ||
|
|
4cd318756d | ||
|
|
b02599d22e | ||
|
|
6d911f68a3 | ||
|
|
542b0b6656 | ||
|
|
9ee9f28849 | ||
|
|
729ae1d787 | ||
|
|
e0fd3f4dab | ||
|
|
f1f93988fb | ||
|
|
ab3b941783 | ||
|
|
f31957e6a1 | ||
|
|
fd3042a04b | ||
|
|
209d87a856 | ||
|
|
7777eb5e15 | ||
|
|
51853f7488 | ||
|
|
c3adc61e6e | ||
|
|
1993652653 | ||
|
|
55c1446b68 | ||
|
|
19e92201b4 | ||
|
|
89e6a02e3b | ||
|
|
d395ac2879 | ||
|
|
51671c0b92 | ||
|
|
cdf918b1d0 | ||
|
|
4da28b40f0 | ||
|
|
0377f1abe1 | ||
|
|
df35462a4e | ||
|
|
af32262c28 | ||
|
|
85e320121e | ||
|
|
8796f43c6c | ||
|
|
80642dd7af | ||
|
|
692c9f8821 | ||
|
|
ed068469f3 | ||
|
|
a18b03b86f | ||
|
|
7476e29053 | ||
|
|
63cb1f8818 | ||
|
|
f613e13397 | ||
|
|
adc3604027 | ||
|
|
1ae851387f | ||
|
|
38c01971ff | ||
|
|
6787c4c3dd | ||
|
|
91d8dac9cf | ||
|
|
783ae56634 | ||
|
|
d3c3194ac3 | ||
|
|
144a08ee50 | ||
|
|
b3ecd55601 | ||
|
|
192349eee4 | ||
|
|
6b09a79d64 | ||
|
|
70e7cdcb9e | ||
|
|
ac1cd31949 | ||
|
|
8e45182357 | ||
|
|
cab74b075e | ||
|
|
6b84f9bb3e | ||
|
|
cd11059f10 | ||
|
|
d9331bfd49 | ||
|
|
68206b533b | ||
|
|
1aba78f272 | ||
|
|
a663248786 | ||
|
|
a2229b18bf | ||
|
|
432756b6e5 | ||
|
|
fe78c0f191 | ||
|
|
5b9b176c67 | ||
|
|
0cc8e5beed | ||
|
|
f2920533e9 | ||
|
|
62c9530c05 | ||
|
|
1f2922ad85 | ||
|
|
2cd1ba6a52 | ||
|
|
1733d2ea24 | ||
|
|
66971600f7 | ||
|
|
725314fb73 | ||
|
|
ec6c35c4ac | ||
|
|
b5c267fc8a | ||
|
|
ec56c72b51 | ||
|
|
f7121de4a0 | ||
|
|
577de17d24 | ||
|
|
83b3c9b3ee | ||
|
|
7d1a48807a | ||
|
|
c3c1d5bd12 | ||
|
|
8892d45b9f | ||
|
|
11e28bd619 | ||
|
|
d51aaf6304 | ||
|
|
f57c7223cf | ||
|
|
f0024f585d | ||
|
|
fd8adf3083 | ||
|
|
a1d65eb6d8 | ||
|
|
b6d364ad88 | ||
|
|
64c3642c57 | ||
|
|
e999dfcb40 | ||
|
|
84deeb6cd5 | ||
|
|
fb07bbe7b2 | ||
|
|
d1e676360d | ||
|
|
c1281e6b45 | ||
|
|
a6bdee48f3 | ||
|
|
951b5f8ecb | ||
|
|
fe0eec7e20 | ||
|
|
4df04f0ec9 | ||
|
|
3066d49cc1 | ||
|
|
7a300b63b5 | ||
|
|
628348d3e9 | ||
|
|
72ba8178a8 | ||
|
|
b39b876493 | ||
|
|
69586e7bdf | ||
|
|
f0bae7939a | ||
|
|
6ad78ca8a5 | ||
|
|
422020c4d6 | ||
|
|
0d5f5e15d4 | ||
|
|
af9cd975ce | ||
|
|
8950d68ddb | ||
|
|
65d6bc1d4c | ||
|
|
525c0cd09f | ||
|
|
2e748c998e | ||
|
|
70f4a4e18e | ||
|
|
ed3272cc44 | ||
|
|
6d1856234f | ||
|
|
91d8ea79d9 | ||
|
|
a65a89522d | ||
|
|
62b3293df0 | ||
|
|
885e9b76d6 | ||
|
|
32ddcf504c | ||
|
|
c313d451a5 | ||
|
|
781f368d42 | ||
|
|
33324a59cc | ||
|
|
10066cd4ef | ||
|
|
bde87895c8 | ||
|
|
b5995a76f7 | ||
|
|
95310eab6c | ||
|
|
39b756a0d1 | ||
|
|
12b89cd2ee | ||
|
|
746a08686b | ||
|
|
ffe3bb6763 | ||
|
|
e709842eae | ||
|
|
7a798d3ceb | ||
|
|
6d36eb78ad | ||
|
|
9d1a6d1484 | ||
|
|
3059c3b69e | ||
|
|
929af9ed03 | ||
|
|
e7fdac9d5c | ||
|
|
3d32c460eb | ||
|
|
2d5cb97288 | ||
|
|
6212264cc6 | ||
|
|
32eb5290c2 | ||
|
|
c702dcabf8 | ||
|
|
c432dc008b | ||
|
|
fb822e49f2 | ||
|
|
00bb6bf509 | ||
|
|
bccd823c8e | ||
|
|
8c003d83c4 | ||
|
|
67f29b16ef | ||
|
|
1c1cb048cd | ||
|
|
b65e5eb14e | ||
|
|
6d2f6408e4 | ||
|
|
c17059dee7 | ||
|
|
96607df7f0 | ||
|
|
edfee7f348 | ||
|
|
8b9bf75880 | ||
|
|
3d8236367d | ||
|
|
2a01c798d3 | ||
|
|
fbaaac63d4 | ||
|
|
791b427f44 | ||
|
|
bcaad515fd | ||
|
|
5acd37fa96 | ||
|
|
f5e6d111b1 | ||
|
|
bcb340da09 | ||
|
|
3696765b7d | ||
|
|
5a74c2a67e | ||
|
|
52523d33dd | ||
|
|
df370d725e | ||
|
|
0d8543d677 | ||
|
|
c9cacfb25d | ||
|
|
bde650f21e | ||
|
|
be943a9fd6 | ||
|
|
d3b2ac1507 | ||
|
|
72f199024d | ||
|
|
c84af49386 | ||
|
|
fd372629f7 | ||
|
|
76afa02dab | ||
|
|
2003610b3b | ||
|
|
a474b37212 | ||
|
|
68b5aab020 | ||
|
|
f54a336cb7 | ||
|
|
f4d08ccf80 | ||
|
|
9049402a1b | ||
|
|
f1b73350c2 | ||
|
|
8700de66e4 | ||
|
|
6c0bebccb0 | ||
|
|
437342b93e | ||
|
|
39005e27d6 | ||
|
|
2865afe759 | ||
|
|
6997bfc68d | ||
|
|
16be38887f | ||
|
|
0081d8c07f | ||
|
|
5f7141982c | ||
|
|
05330227be | ||
|
|
05dad67cc2 | ||
|
|
9efdd242fb | ||
|
|
81df265e41 | ||
|
|
a6c0b10704 | ||
|
|
5c874c19cb | ||
|
|
b6233c3de7 | ||
|
|
bfd2afe5ad | ||
|
|
4c1a0fc58f | ||
|
|
a2b117ae02 | ||
|
|
8e534598b5 | ||
|
|
aeb304b29e | ||
|
|
a22ae909bc | ||
|
|
806ffb1085 | ||
|
|
52f787f675 | ||
|
|
cbfddf4e1d | ||
|
|
57fad67781 | ||
|
|
ff8cc268fd | ||
|
|
dadd9cd1e8 | ||
|
|
de237fb058 | ||
|
|
51dbd36c74 | ||
|
|
ffa33d7b80 | ||
|
|
4e5323538c | ||
|
|
19287eeeb2 | ||
|
|
8b29e127c2 | ||
|
|
7be9f1d054 | ||
|
|
b8dafa642e | ||
|
|
f2a4ed680b | ||
|
|
22642ff0aa | ||
|
|
b89172149d | ||
|
|
bf666bc0c7 | ||
|
|
de97c0eb4b | ||
|
|
f70667ea68 | ||
|
|
2063bb8ffa | ||
|
|
d8b63370f3 | ||
|
|
43d2d68da5 | ||
|
|
b058063c40 | ||
|
|
19c9388c20 | ||
|
|
b533272ecb | ||
|
|
1007618f6f | ||
|
|
790871e908 | ||
|
|
0216f5de55 | ||
|
|
21f647310b | ||
|
|
e2d6023cb9 | ||
|
|
2fd775f69c | ||
|
|
ee4d9aa4c1 | ||
|
|
5045839cb2 | ||
|
|
44a9392eca | ||
|
|
59062402b9 | ||
|
|
e01f6da1b8 | ||
|
|
8abaf11965 | ||
|
|
67204994dc | ||
|
|
bf7bd9a16c | ||
|
|
c1a568c9c4 | ||
|
|
1cc6fbd9b0 | ||
|
|
ed238e8b88 | ||
|
|
fac49b8375 | ||
|
|
fff750c99d | ||
|
|
a2544568f9 | ||
|
|
36f4b34f19 | ||
|
|
b363472265 | ||
|
|
edc0ebb780 | ||
|
|
a03eb6d3f6 | ||
|
|
f5b757ced6 | ||
|
|
1f4474f677 | ||
|
|
dd0694b9cb | ||
|
|
bf813be0f3 | ||
|
|
c84c0ab52d | ||
|
|
f368a0c12e | ||
|
|
a45b5b4921 | ||
|
|
7e0a4ed629 | ||
|
|
34f85ee94e | ||
|
|
62fd26f094 | ||
|
|
8c238eddce | ||
|
|
cd0fe37741 | ||
|
|
45c65e6b1a | ||
|
|
8643cc2133 | ||
|
|
e66a76f524 | ||
|
|
ba3c3bbd87 | ||
|
|
922f8e44ee | ||
|
|
1515bd7c9d | ||
|
|
bdee968e3e | ||
|
|
71d9a83dec | ||
|
|
d83ea92085 | ||
|
|
5cf7947ccd | ||
|
|
dc7d3b182d | ||
|
|
84cf4cb350 | ||
|
|
9e9c05f0ee | ||
|
|
c54bca6f7f | ||
|
|
95a91682c3 | ||
|
|
999e556be4 | ||
|
|
8b6293f6bf | ||
|
|
e33031b850 | ||
|
|
c5e7245096 | ||
|
|
65a0672791 | ||
|
|
e22ab10991 | ||
|
|
be900f1253 | ||
|
|
68c4286026 | ||
|
|
7dc9dd6fdf | ||
|
|
ed18222365 | ||
|
|
3e19bf88d5 | ||
|
|
ba23025cd8 | ||
|
|
7c3a39f400 | ||
|
|
e72723dc5c | ||
|
|
66520be7a7 | ||
|
|
82a63a03c0 | ||
|
|
8d9814a521 | ||
|
|
0ff2deab5d | ||
|
|
8e12053e03 | ||
|
|
e4389d8dc2 | ||
|
|
49e6121347 | ||
|
|
4ea7b36447 | ||
|
|
93bedd7aba | ||
|
|
b78896b9aa | ||
|
|
e10d14004f | ||
|
|
c2e77e2f17 | ||
|
|
9fd855ed47 | ||
|
|
b8ae4a8c09 | ||
|
|
e5aed6be7a | ||
|
|
b922f8d459 | ||
|
|
35e9662767 | ||
|
|
cb1d25fcfa | ||
|
|
2b7fc0506a | ||
|
|
af942a693b | ||
|
|
26de9e247a | ||
|
|
b530c0281b | ||
|
|
e70cb4e6c7 | ||
|
|
d89602a53f | ||
|
|
3bd9042054 | ||
|
|
525063be90 | ||
|
|
c1282b57f5 | ||
|
|
5ba69e1734 | ||
|
|
c96cbe481c | ||
|
|
a7db4feceb | ||
|
|
b86c3b7a68 | ||
|
|
475306b757 | ||
|
|
f016934184 | ||
|
|
2174f6646e | ||
|
|
16170678a7 | ||
|
|
2806adee2d | ||
|
|
ec38505720 | ||
|
|
d2d58dd6a8 | ||
|
|
b2a39c5767 | ||
|
|
679f526d89 | ||
|
|
2e472fe7ea | ||
|
|
88dafe564f | ||
|
|
8d9479910f | ||
|
|
9847086466 | ||
|
|
40861761c2 | ||
|
|
88378ed058 | ||
|
|
8569227473 | ||
|
|
f4ca41ad75 | ||
|
|
376051a9be | ||
|
|
a5071e010b | ||
|
|
28d8149c69 | ||
|
|
e9f7db3045 | ||
|
|
aba19334ea | ||
|
|
f3be138eb8 | ||
|
|
bc05893f82 | ||
|
|
dd8ae61643 | ||
|
|
ee98d26218 | ||
|
|
886386c039 | ||
|
|
438ab7c115 | ||
|
|
52c7ff1d81 | ||
|
|
ff499ef79f | ||
|
|
37a61720b6 | ||
|
|
7d42aa1513 | ||
|
|
6e9671a8a8 | ||
|
|
52a6c37558 | ||
|
|
075fed91bd | ||
|
|
30f93a29c2 | ||
|
|
4cf131a101 | ||
|
|
7286f5291d | ||
|
|
07fce8eff2 | ||
|
|
176606d0cb | ||
|
|
8ae309ebac | ||
|
|
841ab487f8 | ||
|
|
61ebe3b0c4 | ||
|
|
ca9635df33 | ||
|
|
8a4dc79e1a | ||
|
|
d78e8dab93 | ||
|
|
24823ba647 | ||
|
|
d47393bd82 | ||
|
|
387828a3f7 | ||
|
|
c4a83bd6f6 | ||
|
|
827c71dac9 | ||
|
|
2acb5bd992 | ||
|
|
c8fa3e21e6 | ||
|
|
57a65fe436 | ||
|
|
c90768c93b | ||
|
|
29397d29ba | ||
|
|
fc04750817 | ||
|
|
458e563cd9 | ||
|
|
71aac7a5fb | ||
|
|
09c6c4ff02 | ||
|
|
eb9e754b3a | ||
|
|
a40d397d5d | ||
|
|
7edd10e5fa | ||
|
|
d75d876edd | ||
|
|
e44276989f | ||
|
|
3560e680bc | ||
|
|
faa9c6909d | ||
|
|
ace010b38a | ||
|
|
be4614eb5e | ||
|
|
35a1b77da5 | ||
|
|
46965a096c | ||
|
|
700c25f5b4 | ||
|
|
631a9f60f3 | ||
|
|
ed9f3243f0 | ||
|
|
ade21a965f | ||
|
|
f0cfd361bd | ||
|
|
78623c95f2 | ||
|
|
f0e2e4311b | ||
|
|
3dc4bd8581 | ||
|
|
1d1cd32bc3 | ||
|
|
868f8745fa | ||
|
|
2a9c3589d9 | ||
|
|
5235cc987d | ||
|
|
3b1e56a427 | ||
|
|
3fbccb01dc | ||
|
|
ad31ec5c5f | ||
|
|
15cf8f8531 | ||
|
|
ade40741ca | ||
|
|
ea19e9c6aa | ||
|
|
d33dfe5cb2 | ||
|
|
27d5f5c237 | ||
|
|
df22fb322e | ||
|
|
c3cd1f1814 | ||
|
|
dd517c6404 | ||
|
|
83564ea5f3 | ||
|
|
bbe0079d98 | ||
|
|
730663649f | ||
|
|
1369c545ac | ||
|
|
4db7a1c3bb | ||
|
|
755722ced6 | ||
|
|
1cf9335b24 | ||
|
|
13c11487f7 | ||
|
|
028ec7e744 | ||
|
|
54b3ceeca2 | ||
|
|
30a0c61de0 | ||
|
|
409a39ec8d | ||
|
|
296c5b645a | ||
|
|
cc9ab5f197 | ||
|
|
1551928502 | ||
|
|
b67b71cd87 | ||
|
|
7eb25ec7b3 | ||
|
|
539da24863 | ||
|
|
a8e4229852 | ||
|
|
cbe329b90a | ||
|
|
06dd735342 | ||
|
|
9ab29f8dcd | ||
|
|
ba426d6887 | ||
|
|
18cdc903cf | ||
|
|
fcf8368eb1 | ||
|
|
a678416994 | ||
|
|
122bc7770e | ||
|
|
e9e694f4ef | ||
|
|
da1091eed9 | ||
|
|
c2477a5cad | ||
|
|
2cf5f01397 | ||
|
|
38042ad4e9 | ||
|
|
51238c4bdb | ||
|
|
9481d06e62 | ||
|
|
a5cf4210cd | ||
|
|
f9aec02f3c | ||
|
|
7455b1b527 | ||
|
|
d4fb30885b | ||
|
|
d786c49525 | ||
|
|
5852f3eafe | ||
|
|
be0e1c7b14 | ||
|
|
7c1d481d6d | ||
|
|
518ec97114 | ||
|
|
32d80e2caf | ||
|
|
19147f326c | ||
|
|
2a59243cba | ||
|
|
4fc6b0ffa4 | ||
|
|
28c82bf18d | ||
|
|
7263e25d9b | ||
|
|
f695ca5884 | ||
|
|
93fedc12db | ||
|
|
1230853343 | ||
|
|
dce7a5732e | ||
|
|
c53f845ec9 | ||
|
|
84c2379285 | ||
|
|
3b908c4781 | ||
|
|
1802601a12 | ||
|
|
6de23bf36e | ||
|
|
aff659aaf7 | ||
|
|
05745e3f1d | ||
|
|
e8768ae08d | ||
|
|
f6fe39ff11 | ||
|
|
e204242118 | ||
|
|
2d609557ff | ||
|
|
e0bad5153b | ||
|
|
424c58f3e9 | ||
|
|
14dab319a8 | ||
|
|
5fcac7c846 | ||
|
|
2f917bff5c | ||
|
|
7db69e6a12 | ||
|
|
f7dc257a20 | ||
|
|
97db670956 | ||
|
|
51be857f3c | ||
|
|
0f8e4e0a81 | ||
|
|
6313223bcd | ||
|
|
3bc5679cab | ||
|
|
be49dabd0d | ||
|
|
ac968c36d7 | ||
|
|
0ad6c9e3d9 | ||
|
|
fff2e580cd | ||
|
|
7b4d62c794 | ||
|
|
76637c53c5 | ||
|
|
59073fa3eb | ||
|
|
808a03927c | ||
|
|
459957f30a | ||
|
|
b98d13fc3c | ||
|
|
4f3de09672 | ||
|
|
1fde8b868a | ||
|
|
66aeb89469 | ||
|
|
a5122d7f6c | ||
|
|
c0a3b76958 | ||
|
|
7e1d26dd5c | ||
|
|
5584ba36c6 | ||
|
|
75d382d3db | ||
|
|
febf8af4b5 | ||
|
|
10335f60f9 | ||
|
|
ecff9c1ef7 | ||
|
|
a247d0c74b | ||
|
|
341b4e09b7 | ||
|
|
f696796e88 | ||
|
|
413dbf8757 | ||
|
|
f553819502 | ||
|
|
34351b7a79 | ||
|
|
b061b6678f | ||
|
|
dcdcd48d8f | ||
|
|
87ef73329f | ||
|
|
05f7f0ade2 | ||
|
|
6311dabe68 | ||
|
|
bdebf198bb | ||
|
|
20de541b13 | ||
|
|
b31454e362 | ||
|
|
0be0775a76 | ||
|
|
6dfb8120c2 | ||
|
|
a7dde578a8 | ||
|
|
692be57738 | ||
|
|
d02bc873f8 | ||
|
|
8b24851b9d | ||
|
|
c328f9589d | ||
|
|
fde5b16817 | ||
|
|
45a9ade337 | ||
|
|
62b7c5eaed | ||
|
|
69014cd55b | ||
|
|
5a97dbf606 | ||
|
|
2838a916ab | ||
|
|
d2ba3b1ef7 | ||
|
|
d632d743e0 | ||
|
|
ddbbd36e4b | ||
|
|
c8ad7b7f84 |
4
.github/actions/do-build/action.yml
vendored
4
.github/actions/do-build/action.yml
vendored
@@ -66,7 +66,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload build logs'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: failure-logs
|
||||
@@ -74,7 +74,7 @@ runs:
|
||||
|
||||
# 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
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: core.setFailed('Build failed. See summary for details.')
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
|
||||
2
.github/actions/get-bootjdk/action.yml
vendored
2
.github/actions/get-bootjdk/action.yml
vendored
@@ -65,7 +65,7 @@ runs:
|
||||
|
||||
- name: 'Check cache for BootJDK'
|
||||
id: get-cached-bootjdk
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: bootjdk/jdk
|
||||
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
|
||||
|
||||
4
.github/actions/get-bundles/action.yml
vendored
4
.github/actions/get-bundles/action.yml
vendored
@@ -48,14 +48,14 @@ runs:
|
||||
steps:
|
||||
- name: 'Download bundles artifact'
|
||||
id: download-bundles
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
|
||||
- name: 'Download bundles artifact (retry)'
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
|
||||
12
.github/actions/get-jtreg/action.yml
vendored
12
.github/actions/get-jtreg/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2023, 2024, 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
|
||||
@@ -41,7 +41,7 @@ runs:
|
||||
|
||||
- name: 'Check cache for JTReg'
|
||||
id: get-cached-jtreg
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
@@ -56,8 +56,14 @@ runs:
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
|
||||
if [[ '${{ runner.arch }}' == 'X64' ]]; then
|
||||
JDK="$JAVA_HOME_17_X64"
|
||||
else
|
||||
JDK="$JAVA_HOME_17_arm64"
|
||||
fi
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
|
||||
bash make/build.sh --jdk "$JDK"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
|
||||
3
.github/actions/get-msys2/action.yml
vendored
3
.github/actions/get-msys2/action.yml
vendored
@@ -30,8 +30,7 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
|
||||
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
|
||||
uses: msys2/setup-msys2@v2.22.0
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
|
||||
2
.github/actions/upload-bundles/action.yml
vendored
2
.github/actions/upload-bundles/action.yml
vendored
@@ -69,7 +69,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
|
||||
18
.github/scripts/gen-test-results.sh
vendored
18
.github/scripts/gen-test-results.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -44,8 +44,8 @@ for test in $failures $errors; do
|
||||
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)
|
||||
replay_files=$(ls $report_dir/$base_path/replay*.log 2> /dev/null || true)
|
||||
echo "#### <a id="$anchor">$test"
|
||||
|
||||
echo '<details><summary>View test results</summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
@@ -73,6 +73,20 @@ for test in $failures $errors; do
|
||||
echo ''
|
||||
fi
|
||||
|
||||
if [[ "$replay_files" != "" ]]; then
|
||||
echo '<details><summary>View HotSpot replay file</summary>'
|
||||
echo ''
|
||||
for replay in $replay_files; do
|
||||
echo '```'
|
||||
echo "$replay:"
|
||||
echo ''
|
||||
cat "$replay"
|
||||
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
|
||||
|
||||
1
.github/scripts/gen-test-summary.sh
vendored
1
.github/scripts/gen-test-summary.sh
vendored
@@ -42,6 +42,7 @@ error_count=$(echo $errors | wc -w || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# We know something went wrong, but not what
|
||||
echo 'failure=true' >> $GITHUB_OUTPUT
|
||||
echo 'error-message=Unspecified test suite failure. Please see log for job for details.' >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
2
.github/workflows/build-cross-compile.yml
vendored
2
.github/workflows/build-cross-compile.yml
vendored
@@ -120,7 +120,7 @@ jobs:
|
||||
|
||||
- name: 'Check cache for sysroot'
|
||||
id: get-cached-sysroot
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: sysroot
|
||||
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
|
||||
|
||||
11
.github/workflows/build-macos.yml
vendored
11
.github/workflows/build-macos.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2024, 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,9 @@ on:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
@@ -55,7 +58,7 @@ on:
|
||||
jobs:
|
||||
build-macos:
|
||||
name: build
|
||||
runs-on: macos-13
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -74,7 +77,7 @@ jobs:
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: macos-x64
|
||||
platform: ${{ inputs.platform }}
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
@@ -87,7 +90,7 @@ jobs:
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Homebrew installation and xcode-select
|
||||
brew install make
|
||||
brew install autoconf 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
|
||||
|
||||
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2024, 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
|
||||
@@ -228,6 +228,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
runs-on: 'macos-13'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -239,8 +240,8 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
runs-on: 'macos-14'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
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'
|
||||
@@ -321,6 +322,16 @@ jobs:
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-13
|
||||
|
||||
test-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs:
|
||||
- build-macos-aarch64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
bootjdk-platform: macos-aarch64
|
||||
runs-on: macos-14
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
needs:
|
||||
@@ -357,7 +368,7 @@ jobs:
|
||||
# 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
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
|
||||
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@@ -63,6 +63,7 @@ jobs:
|
||||
- 'hs/tier1 compiler part 1'
|
||||
- 'hs/tier1 compiler part 2'
|
||||
- 'hs/tier1 compiler part 3'
|
||||
- 'hs/tier1 compiler not-xcomp'
|
||||
- 'hs/tier1 gc'
|
||||
- 'hs/tier1 runtime'
|
||||
- 'hs/tier1 serviceability'
|
||||
@@ -90,13 +91,17 @@ jobs:
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 2'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2 test/hotspot/jtreg/:tier1_compiler_not_xcomp'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 3'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler not-xcomp'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_not_xcomp'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
@@ -206,7 +211,7 @@ jobs:
|
||||
if: always()
|
||||
|
||||
- name: 'Upload test results'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: results
|
||||
name: ${{ steps.package.outputs.artifact-name }}
|
||||
@@ -214,7 +219,7 @@ jobs:
|
||||
|
||||
# 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
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
|
||||
if: steps.run-tests.outputs.failure == 'true'
|
||||
|
||||
@@ -15,7 +15,7 @@ version=0
|
||||
domain=openjdk.org
|
||||
|
||||
[checks "whitespace"]
|
||||
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.md|.*\.gmk|.*\.m4|.*\.ac|Makefile
|
||||
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.md|.*\.properties|.*\.gmk|.*\.m4|.*\.ac|Makefile
|
||||
ignore-tabs=.*\.gmk|Makefile
|
||||
|
||||
[checks "merge"]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2015 Google, Inc. All Rights Reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
@@ -26,12 +27,17 @@ usage() {
|
||||
echo "$0 DIR ..."
|
||||
echo "Modifies in place all the java source files found"
|
||||
echo "in the given directories so that all java language modifiers"
|
||||
echo "are in the canonical order given by Modifier#toString()."
|
||||
echo "are in the canonical order."
|
||||
echo "Tries to get it right even within javadoc comments,"
|
||||
echo "and even if the list of modifiers spans 2 lines."
|
||||
echo
|
||||
echo "See:"
|
||||
echo "https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#toString-int-"
|
||||
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.1.1"
|
||||
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.3.1"
|
||||
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4.3"
|
||||
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.8.3"
|
||||
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.1.1"
|
||||
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.4"
|
||||
echo
|
||||
echo "Example:"
|
||||
echo "$0 jdk/src/java.base jdk/test/java/{util,io,lang}"
|
||||
@@ -46,7 +52,7 @@ for dir in "${dirs[@]}"; do [[ -d "$dir" ]] || usage; done
|
||||
|
||||
declare -ar modifiers=(
|
||||
public protected private
|
||||
abstract static final transient
|
||||
abstract default static final sealed non-sealed transient
|
||||
volatile synchronized native strictfp
|
||||
)
|
||||
declare -r SAVE_IFS="$IFS"
|
||||
|
||||
@@ -92,6 +92,8 @@ id="toc-build-tools-requirements">Build Tools Requirements</a>
|
||||
<li><a href="#autoconf" id="toc-autoconf">Autoconf</a></li>
|
||||
<li><a href="#gnu-make" id="toc-gnu-make">GNU Make</a></li>
|
||||
<li><a href="#gnu-bash" id="toc-gnu-bash">GNU Bash</a></li>
|
||||
<li><a href="#graphviz-and-pandoc" id="toc-graphviz-and-pandoc">Graphviz
|
||||
and Pandoc</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#running-configure" id="toc-running-configure">Running
|
||||
Configure</a>
|
||||
@@ -524,7 +526,7 @@ header files as provided by your distribution.</p>
|
||||
<p>The basic tooling is provided as part of the core operating system,
|
||||
but you will most likely need to install developer packages.</p>
|
||||
<p>For apt-based distributions (Debian, Ubuntu, etc), try this:</p>
|
||||
<pre><code>sudo apt-get install build-essential</code></pre>
|
||||
<pre><code>sudo apt-get install build-essential autoconf</code></pre>
|
||||
<p>For rpm-based distributions (Fedora, Red Hat, etc), try this:</p>
|
||||
<pre><code>sudo yum groupinstall "Development Tools"</code></pre>
|
||||
<p>For Alpine Linux, aside from basic tooling, install the GNU versions
|
||||
@@ -753,6 +755,8 @@ macOS.</p>
|
||||
<code>sudo apt-get install libfontconfig-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running
|
||||
<code>sudo yum install fontconfig-devel</code>.</li>
|
||||
<li>To install on Alpine Linux, try running
|
||||
<code>sudo apk add fontconfig-dev</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-fontconfig-include=<path></code> and
|
||||
<code>--with-fontconfig=<path></code> if <code>configure</code>
|
||||
@@ -860,6 +864,13 @@ e.g. <code>configure MAKE=/opt/gnu/make</code>.</p>
|
||||
href="https://www.gnu.org/software/bash">GNU Bash</a>. No other shells
|
||||
are supported.</p>
|
||||
<p>At least version 3.2 of GNU Bash must be used.</p>
|
||||
<h3 id="graphviz-and-pandoc">Graphviz and Pandoc</h3>
|
||||
<p>In order to build the full docs (see the
|
||||
<code>--enable-full-docs</code> configure option) <a
|
||||
href="https://www.graphviz.org">Graphviz</a> and <a
|
||||
href="https://pandoc.org">Pandoc</a> are required. Any recent versions
|
||||
should work. For reference, and subject to change, Oracle builds use
|
||||
Graphviz 9.0.0 and Pandoc 2.19.2.</p>
|
||||
<h2 id="running-configure">Running Configure</h2>
|
||||
<p>To build the JDK, you need a "configuration", which consists of a
|
||||
directory where to store the build output, coupled with information
|
||||
@@ -1499,9 +1510,7 @@ like this:</p>
|
||||
--resolve-deps \
|
||||
buster \
|
||||
~/sysroot-arm64 \
|
||||
https://httpredir.debian.org/debian/</code></pre>
|
||||
<p>If the target architecture is <code>riscv64</code>, the path should
|
||||
be <code>debian-ports</code> instead of <code>debian</code>.</p></li>
|
||||
https://httpredir.debian.org/debian/</code></pre></li>
|
||||
<li><p>To create an Ubuntu-based chroot:</p>
|
||||
<pre><code>sudo debootstrap \
|
||||
--arch=arm64 \
|
||||
@@ -2157,15 +2166,26 @@ you can create a directory under <code>build</code> and run
|
||||
<code>configure</code> from there, e.g.
|
||||
<code>mkdir build/<name> && cd build/<name> && bash ../../configure</code>.</p>
|
||||
<p>Then you can build that configuration using
|
||||
<code>make CONF_NAME=<name></code> or
|
||||
<code>make CONF=<pattern></code>, where
|
||||
<code><pattern></code> is a substring matching one or several
|
||||
configurations, e.g. <code>CONF=debug</code>. The special empty pattern
|
||||
(<code>CONF=</code>) will match <em>all</em> available configuration, so
|
||||
<code>make CONF= hotspot</code> will build the <code>hotspot</code>
|
||||
target for all configurations. Alternatively, you can execute
|
||||
<code>make</code> in the configuration directory, e.g.
|
||||
<code>cd build/<name> && make</code>.</p>
|
||||
<code>make CONF=<selector></code>, where
|
||||
<code><selector></code> is interpreted as follows:</p>
|
||||
<ul>
|
||||
<li>If <code><selector></code> exacly matches the name of a
|
||||
configuration, this and only this configuration will be selected.</li>
|
||||
<li>If <code><selector></code> matches (i.e. is a substring of)
|
||||
the names of several configurations, then all these configurations will
|
||||
be selected.</li>
|
||||
<li>If <code><selector></code> is empty (i.e. <code>CONF=</code>),
|
||||
then all configurations will be selected.</li>
|
||||
<li>If <code><selector></code> begins with <code>!</code>, then
|
||||
all configurations <strong>not</strong> matching the string following
|
||||
<code>!</code> will be selected.</li>
|
||||
</ul>
|
||||
<p>A more specialized version, <code>CONF_NAME=<name></code> also
|
||||
exists, which will only match if the given <code><name></code>
|
||||
exactly matches a single configuration.</p>
|
||||
<p>Alternatively, you can execute <code>make</code> in the configuration
|
||||
directory, e.g. <code>cd build/<name> && make</code>.</p>
|
||||
<p><code>make CONF_NAME=<name></code> or</p>
|
||||
<h3 id="handling-reconfigurations">Handling Reconfigurations</h3>
|
||||
<p>If you update the repository and part of the configure script has
|
||||
changed, the build system will force you to re-run
|
||||
|
||||
@@ -349,7 +349,7 @@ will most likely need to install developer packages.
|
||||
For apt-based distributions (Debian, Ubuntu, etc), try this:
|
||||
|
||||
```
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install build-essential autoconf
|
||||
```
|
||||
|
||||
For rpm-based distributions (Fedora, Red Hat, etc), try this:
|
||||
@@ -572,6 +572,7 @@ required on all platforms except Windows and macOS.
|
||||
libfontconfig-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
fontconfig-devel`.
|
||||
* To install on Alpine Linux, try running `sudo apk add fontconfig-dev`.
|
||||
|
||||
Use `--with-fontconfig-include=<path>` and `--with-fontconfig=<path>` if
|
||||
`configure` does not automatically locate the platform Fontconfig files.
|
||||
@@ -684,6 +685,14 @@ shells are supported.
|
||||
|
||||
At least version 3.2 of GNU Bash must be used.
|
||||
|
||||
### Graphviz and Pandoc
|
||||
|
||||
In order to build the full docs (see the `--enable-full-docs`
|
||||
configure option) [Graphviz](https://www.graphviz.org) and
|
||||
[Pandoc](https://pandoc.org) are required. Any recent versions should
|
||||
work. For reference, and subject to change, Oracle builds use Graphviz
|
||||
9.0.0 and Pandoc 2.19.2.
|
||||
|
||||
## Running Configure
|
||||
|
||||
To build the JDK, you need a "configuration", which consists of a directory
|
||||
@@ -1316,9 +1325,6 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
|
||||
https://httpredir.debian.org/debian/
|
||||
```
|
||||
|
||||
If the target architecture is `riscv64`, the path should be `debian-ports`
|
||||
instead of `debian`.
|
||||
|
||||
* To create an Ubuntu-based chroot:
|
||||
|
||||
```
|
||||
@@ -1946,12 +1952,25 @@ configuration with the name `<name>`. Alternatively, you can create a directory
|
||||
under `build` and run `configure` from there, e.g. `mkdir build/<name> && cd
|
||||
build/<name> && bash ../../configure`.
|
||||
|
||||
Then you can build that configuration using `make CONF_NAME=<name>` or `make
|
||||
CONF=<pattern>`, where `<pattern>` is a substring matching one or several
|
||||
configurations, e.g. `CONF=debug`. The special empty pattern (`CONF=`) will
|
||||
match *all* available configuration, so `make CONF= hotspot` will build the
|
||||
`hotspot` target for all configurations. Alternatively, you can execute `make`
|
||||
in the configuration directory, e.g. `cd build/<name> && make`.
|
||||
Then you can build that configuration using `make CONF=<selector>`, where
|
||||
`<selector>` is interpreted as follows:
|
||||
|
||||
* If `<selector>` exacly matches the name of a configuration, this and only
|
||||
this configuration will be selected.
|
||||
* If `<selector>` matches (i.e. is a substring of) the names of several
|
||||
configurations, then all these configurations will be selected.
|
||||
* If `<selector>` is empty (i.e. `CONF=`), then all configurations will be
|
||||
selected.
|
||||
* If `<selector>` begins with `!`, then all configurations **not** matching the
|
||||
string following `!` will be selected.
|
||||
|
||||
A more specialized version, `CONF_NAME=<name>` also exists, which will only
|
||||
match if the given `<name>` exactly matches a single configuration.
|
||||
|
||||
Alternatively, you can execute `make` in the configuration directory, e.g. `cd
|
||||
build/<name> && make`.
|
||||
|
||||
`make CONF_NAME=<name>` or
|
||||
|
||||
### Handling Reconfigurations
|
||||
|
||||
|
||||
@@ -139,11 +139,6 @@ ifeq ($(IS_DRAFT), true)
|
||||
endif
|
||||
DRAFT_TEXT := This specification is not final and is subject to change. \
|
||||
Use is subject to <a href="$(LICENSE_URL)">license terms</a>.
|
||||
|
||||
# Workaround stylesheet bug
|
||||
HEADER_STYLE := style="margin-top: 9px;"
|
||||
else
|
||||
HEADER_STYLE := style="margin-top: 14px;"
|
||||
endif
|
||||
|
||||
# $1 - Relative prefix to COPYRIGHT_URL
|
||||
@@ -339,7 +334,7 @@ define SetupApiDocsGenerationBody
|
||||
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
|
||||
Specification
|
||||
$1_WINDOW_TITLE := $$(subst &,&,$$($1_SHORT_NAME))$$(DRAFT_MARKER_TITLE)
|
||||
$1_HEADER_TITLE := <div $$(HEADER_STYLE)><strong>$$($1_SHORT_NAME)</strong> \
|
||||
$1_HEADER_TITLE := <div><strong>$$($1_SHORT_NAME)</strong> \
|
||||
$$(DRAFT_MARKER_STR)</div>
|
||||
ifneq ($$($1_OTHER_VERSIONS), )
|
||||
$1_JAVADOC_BOTTOM := $$(call JAVADOC_BOTTOM, <a href="$$($1_OTHER_VERSIONS)">Other versions.</a>)
|
||||
@@ -647,7 +642,7 @@ ifeq ($(ENABLE_PANDOC), true)
|
||||
GLOBAL_SPECS_DEFAULT_CSS_FILE := $(DOCS_OUTPUTDIR)/resources/jdk-default.css
|
||||
# Unset the following to suppress the link to the tool guides
|
||||
NAV_LINK_GUIDES := --nav-link-guides
|
||||
HEADER_RIGHT_SIDE_INFO := <strong>$(subst &,&,$(JDK_SHORT_NAME))$(DRAFT_MARKER_STR)</strong>
|
||||
HEADER_RIGHT_SIDE_INFO := <strong>$(subst &,&,$(JDK_SHORT_NAME))</strong>$(DRAFT_MARKER_STR)
|
||||
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
|
||||
|
||||
@@ -87,10 +87,9 @@ help:
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
||||
$(info )
|
||||
$(info Make control variables)
|
||||
$(info $(_) CONF= # Build all configurations (note, assignment is empty))
|
||||
$(info $(_) CONF=<substring> # Build the configuration(s) with a name matching)
|
||||
$(info $(_) # <substring>)
|
||||
$(info $(_) CONF_NAME=<string> # Build the configuration with exactly the <string>)
|
||||
$(info $(_) CONF=<selector> # Select which configuration(s) to build)
|
||||
$(info $(_) CONF= # Select all configurations (note, assignment is empty))
|
||||
$(info $(_) CONF_NAME=<string> # Select the configuration with the name <string>)
|
||||
$(info $(_) SPEC=<spec file> # Build the configuration given by the spec file)
|
||||
$(info $(_) LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
||||
$(info $(_) # Available log levels are:)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -38,7 +38,7 @@ HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
|
||||
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
||||
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
|
||||
|
||||
HSDIS_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
||||
HSDIS_LINK_TYPE := C
|
||||
HSDIS_TOOLCHAIN_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)
|
||||
|
||||
@@ -59,8 +59,8 @@ endif
|
||||
|
||||
ifeq ($(HSDIS_BACKEND), llvm)
|
||||
# Use C++ instead of C
|
||||
HSDIS_LINK_TYPE := C++
|
||||
HSDIS_TOOLCHAIN_CFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
HSDIS_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
LLVM_OS := pc-linux-gnu
|
||||
@@ -91,14 +91,11 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_MINGW, \
|
||||
CC := $(MINGW_BASE)-gcc, \
|
||||
LD := $(MINGW_BASE)-ld, \
|
||||
OBJCOPY := $(MINGW_BASE)-objcopy, \
|
||||
RC := $(RC), \
|
||||
SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
||||
SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
||||
))
|
||||
BUILD_HSDIS_CC := $(MINGW_BASE)-gcc
|
||||
BUILD_HSDIS_LD := $(MINGW_BASE)-ld
|
||||
BUILD_HSDIS_OBJCOPY := $(MINGW_BASE)-objcopy
|
||||
BUILD_HSDIS_SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT)
|
||||
BUILD_HSDIS_SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT)
|
||||
|
||||
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
|
||||
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
||||
@@ -122,8 +119,8 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
||||
|
||||
TOOLCHAIN_TYPE := gcc
|
||||
OPENJDK_TARGET_OS := linux
|
||||
OPENJDK_TARGET_OS_TYPE := unix
|
||||
CC_OUT_OPTION := -o$(SPACE)
|
||||
LD_OUT_OPTION := -o$(SPACE)
|
||||
GENDEPS_FLAGS := -MMD -MF
|
||||
CFLAGS_DEBUG_SYMBOLS := -g
|
||||
DISABLED_WARNINGS :=
|
||||
@@ -131,7 +128,6 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
||||
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
|
||||
SHARED_LIBRARY_FLAGS := -shared
|
||||
|
||||
HSDIS_TOOLCHAIN := TOOLCHAIN_MINGW
|
||||
HSDIS_TOOLCHAIN_CFLAGS :=
|
||||
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
|
||||
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
|
||||
@@ -144,9 +140,9 @@ endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
|
||||
NAME := hsdis, \
|
||||
LINK_TYPE := $(HSDIS_LINK_TYPE), \
|
||||
SRC := $(TOPDIR)/src/utils/hsdis/$(HSDIS_BACKEND), \
|
||||
EXTRA_HEADER_DIRS := $(TOPDIR)/src/utils/hsdis, \
|
||||
TOOLCHAIN := $(HSDIS_TOOLCHAIN), \
|
||||
OUTPUT_DIR := $(HSDIS_OUTPUT_DIR), \
|
||||
OBJECT_DIR := $(HSDIS_OUTPUT_DIR), \
|
||||
DISABLED_WARNINGS_gcc := undef format-nonliteral sign-compare, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -202,8 +202,14 @@ ifeq ($(HAS_SPEC),)
|
||||
matching_confs := $$(strip $$(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
|
||||
ifeq ($$(patsubst !%,,$$(CONF)),)
|
||||
# A CONF starting with ! means we should negate the search term
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
|
||||
else
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
|
||||
endif
|
||||
ifneq ($$(filter $$(CONF), $$(matching_confs)), )
|
||||
# If we found an exact match, use that
|
||||
matching_confs := $$(CONF)
|
||||
@@ -421,8 +427,9 @@ else # $(HAS_SPEC)=true
|
||||
|
||||
# Cleanup after a compare build
|
||||
define CleanupCompareBuild
|
||||
# If running with a COMPARE_BUILD patch, reverse-apply it
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
|
||||
# If running with a COMPARE_BUILD patch, reverse-apply it, but continue
|
||||
# even if that fails (can happen with removed files).
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true)
|
||||
# Move this build away and restore the original build
|
||||
$(MKDIR) -p $(topdir)/build/compare-build
|
||||
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
|
||||
|
||||
@@ -969,20 +969,28 @@ else
|
||||
|
||||
jdk.jdeps-gendata: java
|
||||
|
||||
# The ct.sym generation uses all the moduleinfos as input
|
||||
jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS) $(JAVA_TARGETS)
|
||||
# jdk.compiler-gendata needs the BUILD_JDK. If the BUILD_JDK was supplied
|
||||
# externally, no extra prerequisites are needed.
|
||||
# jdk.compiler gendata generates ct.sym, which requires all generated
|
||||
# java source and compiled classes present.
|
||||
jdk.compiler-gendata: $(JAVA_TARGETS)
|
||||
|
||||
# jdk.javadoc gendata generates element-list, which requires all java sources
|
||||
# but not compiled classes.
|
||||
jdk.javadoc-gendata: $(GENSRC_TARGETS)
|
||||
|
||||
# ct.sym and element-list generation also needs the BUILD_JDK. If the
|
||||
# BUILD_JDK was supplied externally, no extra prerequisites are needed.
|
||||
ifeq ($(CREATE_BUILDJDK), true)
|
||||
ifneq ($(CREATING_BUILDJDK), true)
|
||||
# When cross compiling and an external BUILD_JDK wasn't supplied, it's
|
||||
# produced by the create-buildjdk target.
|
||||
jdk.compiler-gendata: create-buildjdk
|
||||
jdk.javadoc-gendata: create-buildjdk
|
||||
endif
|
||||
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
||||
# When not cross compiling, the BUILD_JDK is the interim jdk image, and
|
||||
# the javac launcher is needed.
|
||||
jdk.compiler-gendata: jdk.compiler-launchers
|
||||
jdk.javadoc-gendata: jdk.compiler-launchers
|
||||
endif
|
||||
|
||||
# Declare dependencies between jmod targets.
|
||||
|
||||
@@ -620,11 +620,16 @@ define SetupRunMicroTestBody
|
||||
$1_MICRO_WARMUP_TIME := -w $$(MICRO_WARMUP_TIME)
|
||||
endif
|
||||
|
||||
# Microbenchmarks are executed from the root of the test image directory.
|
||||
# This enables JMH tests to add dependencies using relative paths such as
|
||||
# -Djava.library.path=micro/native
|
||||
|
||||
run-test-$1: pre-run-test
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, ( \
|
||||
$$(CD) $$(TEST_IMAGE_DIR) && \
|
||||
$$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \
|
||||
-jar $$($1_MICRO_BENCHMARKS_JAR) \
|
||||
$$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -123,6 +123,22 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
|
||||
]
|
||||
)
|
||||
AC_SUBST(BUILD_ENV)
|
||||
|
||||
if test "x$LOCALE" != x; then
|
||||
# Check if we actually have C.UTF-8; if so, use it
|
||||
if $LOCALE -a | $GREP -q -E "^C\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=C.UTF-8
|
||||
else
|
||||
AC_MSG_WARN([C.UTF-8 locale not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([locale command not not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
fi
|
||||
|
||||
export LC_ALL=$LOCALE_USED
|
||||
AC_SUBST(LOCALE_USED)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -54,6 +54,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Tools only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(LOCALE, locale)
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
])
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
#
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -54,18 +54,18 @@ AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
@@ -97,7 +97,7 @@ m4_define([_PKG_CONFIG],
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
@@ -143,14 +143,14 @@ See the pkg-config man page for more details.])
|
||||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
@@ -160,10 +160,10 @@ installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
@@ -171,11 +171,11 @@ path to pkg-config.
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
|
||||
[$4])
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
ifelse([$3], , :, [$3])
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,6 +40,7 @@ LDCXX := @BUILD_LDCXX@
|
||||
AS := @BUILD_AS@
|
||||
NM := @BUILD_NM@
|
||||
AR := @BUILD_AR@
|
||||
LIB := @BUILD_LIB@
|
||||
OBJCOPY := @BUILD_OBJCOPY@
|
||||
STRIP := @BUILD_STRIP@
|
||||
SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,7 +40,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
@@ -49,7 +48,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
|
||||
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# Linking is different on aix
|
||||
@@ -57,14 +55,12 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
|
||||
# arm specific settings
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
|
||||
@@ -80,20 +76,17 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
SHARED_LIBRARY_FLAGS="-dll"
|
||||
SET_EXECUTABLE_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
|
||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||
])
|
||||
|
||||
@@ -117,6 +110,16 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_PREFIX_CFLAGS}],
|
||||
IF_FALSE: [
|
||||
DEBUG_PREFIX_CFLAGS=
|
||||
],
|
||||
IF_TRUE: [
|
||||
# Add debug prefix map gcc system include paths, as they cause
|
||||
# non-deterministic debug paths depending on gcc path location.
|
||||
DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS
|
||||
|
||||
# Add debug prefix map for OUTPUTDIR to handle the scenario when
|
||||
# it is not located within WORKSPACE_ROOT
|
||||
outputdir_slash="${OUTPUTDIR%/}/"
|
||||
DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS -fdebug-prefix-map=${outputdir_slash}="
|
||||
]
|
||||
)
|
||||
fi
|
||||
@@ -158,6 +161,55 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
AC_SUBST(ASFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
# gcc will embed the full system include paths in the debug info
|
||||
# resulting in non-deterministic debug symbol files and thus
|
||||
# non-reproducible native libraries if gcc includes are located
|
||||
# in different paths.
|
||||
# Add -fdebug-prefix-map'ings for root and gcc include paths,
|
||||
# pointing to a common set of folders so that the binaries are deterministic:
|
||||
# root include : /usr/include
|
||||
# gcc include : /usr/local/gcc_include
|
||||
# g++ include : /usr/local/gxx_include
|
||||
AC_DEFUN([DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS],
|
||||
[
|
||||
# Determine gcc system include paths.
|
||||
# Assume default roots to start with:
|
||||
GCC_ROOT_INCLUDE="/usr/include"
|
||||
|
||||
# Determine is sysroot or devkit specified?
|
||||
if test "x$SYSROOT" != "x"; then
|
||||
GCC_ROOT_INCLUDE="${SYSROOT%/}/usr/include"
|
||||
fi
|
||||
|
||||
# Add root include mapping => /usr/include
|
||||
GCC_INCLUDE_DEBUG_MAP_FLAGS="-fdebug-prefix-map=${GCC_ROOT_INCLUDE}/=/usr/include/"
|
||||
|
||||
# Add gcc system include mapping => /usr/local/gcc_include
|
||||
# Find location of stddef.h using build C compiler
|
||||
GCC_SYSTEM_INCLUDE=`$ECHO "#include <stddef.h>" | \
|
||||
$CC $CFLAGS -v -E - 2>&1 | \
|
||||
$GREP stddef | $TAIL -1 | $TR -s " " | $CUT -d'"' -f2`
|
||||
if test "x$GCC_SYSTEM_INCLUDE" != "x"; then
|
||||
GCC_SYSTEM_INCLUDE=`$DIRNAME $GCC_SYSTEM_INCLUDE`
|
||||
GCC_INCLUDE_DEBUG_MAP_FLAGS="$GCC_INCLUDE_DEBUG_MAP_FLAGS \
|
||||
-fdebug-prefix-map=${GCC_SYSTEM_INCLUDE}/=/usr/local/gcc_include/"
|
||||
fi
|
||||
|
||||
# Add g++ system include mapping => /usr/local/gxx_include
|
||||
# Find location of cstddef using build C++ compiler
|
||||
GXX_SYSTEM_INCLUDE=`$ECHO "#include <cstddef>" | \
|
||||
$CXX $CXXFLAGS -v -E -x c++ - 2>&1 | \
|
||||
$GREP cstddef | $TAIL -1 | $TR -s " " | $CUT -d'"' -f2`
|
||||
if test "x$GXX_SYSTEM_INCLUDE" != "x"; then
|
||||
GXX_SYSTEM_INCLUDE=`$DIRNAME $GXX_SYSTEM_INCLUDE`
|
||||
GCC_INCLUDE_DEBUG_MAP_FLAGS="$GCC_INCLUDE_DEBUG_MAP_FLAGS \
|
||||
-fdebug-prefix-map=${GXX_SYSTEM_INCLUDE}/=/usr/local/gxx_include/"
|
||||
fi
|
||||
|
||||
# Add to debug prefix cflags
|
||||
DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS $GCC_INCLUDE_DEBUG_MAP_FLAGS"
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
[
|
||||
# Set default value.
|
||||
@@ -425,13 +477,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
[
|
||||
#### OS DEFINES, these should be independent on toolchain
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CFLAGS_OS_DEF_JVM="-DLINUX"
|
||||
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
CFLAGS_OS_DEF_JVM="-DLINUX -D_FILE_OFFSET_BITS=64"
|
||||
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
CFLAGS_OS_DEF_JVM="-DAIX"
|
||||
CFLAGS_OS_DEF_JVM="-DAIX -D_LARGE_FILES"
|
||||
CFLAGS_OS_DEF_JDK="-D_LARGE_FILES"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
@@ -489,7 +542,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
ALWAYS_DEFINES_JVM="-D_REENTRANT"
|
||||
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -DSTDC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# Access APIs for Windows 8 and above
|
||||
# see https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -93,7 +93,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r -bbigtoc"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
BASIC_LDFLAGS="-nologo -opt:ref"
|
||||
BASIC_LDFLAGS="-opt:ref"
|
||||
BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
|
||||
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -33,9 +33,6 @@ AC_DEFUN([FLAGS_SETUP_ARFLAGS],
|
||||
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
ARFLAGS="-X64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# lib.exe is used as AR to create static libraries.
|
||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
||||
else
|
||||
ARFLAGS=""
|
||||
fi
|
||||
@@ -43,6 +40,18 @@ AC_DEFUN([FLAGS_SETUP_ARFLAGS],
|
||||
AC_SUBST(ARFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_LIBFLAGS],
|
||||
[
|
||||
# LIB is used to create static libraries on Windows
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
LIBFLAGS="-nodefaultlib:msvcrt"
|
||||
else
|
||||
LIBFLAGS=""
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
|
||||
[
|
||||
## Setup strip.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -364,24 +364,12 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CC_OUT_OPTION=-Fo
|
||||
LD_OUT_OPTION=-out:
|
||||
AR_OUT_OPTION=-out:
|
||||
else
|
||||
# The option used to specify the target .o,.a or .so file.
|
||||
# When compiling, how to specify the to be created object file.
|
||||
CC_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the output
|
||||
LD_OUT_OPTION='-o$(SPACE)'
|
||||
# When archiving, how to specify the destination static archive.
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
AR_OUT_OPTION='-r -cs$(SPACE)'
|
||||
else
|
||||
AR_OUT_OPTION='-rcs$(SPACE)'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CC_OUT_OPTION)
|
||||
AC_SUBST(LD_OUT_OPTION)
|
||||
AC_SUBST(AR_OUT_OPTION)
|
||||
|
||||
# Generate make dependency files
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
@@ -423,6 +411,7 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
|
||||
FLAGS_SETUP_LDFLAGS
|
||||
|
||||
FLAGS_SETUP_ARFLAGS
|
||||
FLAGS_SETUP_LIBFLAGS
|
||||
FLAGS_SETUP_STRIPFLAGS
|
||||
FLAGS_SETUP_RCFLAGS
|
||||
FLAGS_SETUP_NMFLAGS
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -56,8 +56,8 @@ COMMA := ,
|
||||
# What make to use for main processing, after bootstrapping top-level Makefile.
|
||||
MAKE := @MAKE@
|
||||
|
||||
# Make sure all shell commands are executed with the C locale
|
||||
export LC_ALL := C
|
||||
# Make sure all shell commands are executed with a proper locale
|
||||
export LC_ALL := @LOCALE_USED@
|
||||
|
||||
# Make sure we override any local CLASSPATH variable
|
||||
export CLASSPATH := @CLASSPATH@
|
||||
@@ -191,7 +191,7 @@ PRODUCT_NAME := @PRODUCT_NAME@
|
||||
PRODUCT_SUFFIX := @PRODUCT_SUFFIX@
|
||||
JDK_RC_PLATFORM_NAME := @JDK_RC_PLATFORM_NAME@
|
||||
JDK_RC_NAME := @JDK_RC_NAME@
|
||||
JDK_RC_COMPANY_NAME:=@JDK_RC_COMPANY_NAME@
|
||||
JDK_RC_COMPANY_NAME := @JDK_RC_COMPANY_NAME@
|
||||
COMPANY_NAME := @COMPANY_NAME@
|
||||
HOTSPOT_VM_DISTRO := @HOTSPOT_VM_DISTRO@
|
||||
MACOSX_BUNDLE_NAME_BASE := @MACOSX_BUNDLE_NAME_BASE@
|
||||
@@ -498,8 +498,6 @@ COMPILER_COMMAND_FILE_FLAG := @COMPILER_COMMAND_FILE_FLAG@
|
||||
COMPILER_BINDCMD_FILE_FLAG := @COMPILER_BINDCMD_FILE_FLAG@
|
||||
|
||||
CC_OUT_OPTION := @CC_OUT_OPTION@
|
||||
LD_OUT_OPTION := @LD_OUT_OPTION@
|
||||
AR_OUT_OPTION := @AR_OUT_OPTION@
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@
|
||||
@@ -604,10 +602,10 @@ BUILD_SYSROOT_LDFLAGS := @BUILD_SYSROOT_LDFLAGS@
|
||||
|
||||
AS := @AS@
|
||||
|
||||
# AR is used to create a static library (is ar in unix, lib.exe in windows)
|
||||
AR := @AR@
|
||||
ARFLAGS := @ARFLAGS@
|
||||
|
||||
LIB := @LIB@
|
||||
LIBFLAGS := @LIBFLAGS@
|
||||
NM := @NM@
|
||||
NMFLAGS := @NMFLAGS@
|
||||
STRIP := @STRIP@
|
||||
@@ -619,10 +617,6 @@ INSTALL_NAME_TOOL := @INSTALL_NAME_TOOL@
|
||||
METAL := @METAL@
|
||||
METALLIB := @METALLIB@
|
||||
|
||||
# Options to linker to specify a mapfile.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_MAPFILE = @SET_SHARED_LIBRARY_MAPFILE@
|
||||
|
||||
#
|
||||
# Options for generating debug symbols
|
||||
COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -389,6 +389,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
|
||||
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
|
||||
CFLAGS="$ORG_CFLAGS"
|
||||
CXXFLAGS="$ORG_CXXFLAGS"
|
||||
|
||||
# filter out some unwanted additions autoconf may add to CXX; we saw this on macOS with autoconf 2.72
|
||||
UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 -std=gnu++11)
|
||||
CXX="$cxx_filtered"
|
||||
])
|
||||
|
||||
# Check if a compiler is of the toolchain type we expect, and save the version
|
||||
@@ -728,11 +732,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
AC_SUBST(AS)
|
||||
|
||||
#
|
||||
# Setup the archiver (AR)
|
||||
# Setup tools for creating static libraries (AR/LIB)
|
||||
#
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The corresponding ar tool is lib.exe (used to create static libraries)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, lib)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(LIB, lib)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar gcc-ar)
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -199,7 +199,7 @@ AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
|
||||
if test -z "$legal_values"; then
|
||||
$1="$2"
|
||||
else
|
||||
result=`$GREP -Fvx "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
result=`$GREP -Fvx -- "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
@@ -226,7 +226,7 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
|
||||
if test -z "$illegal_values"; then
|
||||
$1=""
|
||||
else
|
||||
result=`$GREP -Fx "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
result=`$GREP -Fx -- "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -152,6 +152,10 @@ define SetupLogging
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
|
||||
SHELL := $$(SHELL) -x
|
||||
endif
|
||||
|
||||
ifeq ($$(LOG_LEVEL), trace)
|
||||
SHELL_NO_RECURSE := $$(SHELL)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2024, 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,6 +103,7 @@ define SetupTestFilesCompilationBody
|
||||
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
|
||||
NAME := $$(unprefixed_name), \
|
||||
TYPE := $$($1_COMPILATION_TYPE), \
|
||||
LINK_TYPE := $(if $$(filter %.cpp, $$(file)), C++, C), \
|
||||
EXTRA_FILES := $$(file) $$($1_EXTRA_FILES), \
|
||||
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
|
||||
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
|
||||
@@ -113,7 +114,6 @@ define SetupTestFilesCompilationBody
|
||||
DISABLED_WARNINGS_clang := undef format-nonliteral \
|
||||
missing-field-initializers sometimes-uninitialized, \
|
||||
LIBS := $$($1_LIBS_$$(name)), \
|
||||
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
|
||||
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
|
||||
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
|
||||
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
|
||||
|
||||
351
make/common/native/CompileFile.gmk
Normal file
351
make/common/native/CompileFile.gmk
Normal file
@@ -0,0 +1,351 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file contains functionality related to compiling a single native source
|
||||
# file (C, C++ or Objective-C) into an object file. It also harbours related
|
||||
# functionality for generating PCH (precompiled headers) and Windows resource
|
||||
# files.
|
||||
|
||||
################################################################################
|
||||
# Creates a recipe that creates a compile_commands.json fragment. Remove any
|
||||
# occurrences of FIXPATH programs from the command to show the actual invocation.
|
||||
#
|
||||
# Param 1: Name of file to create
|
||||
# Param 2: Working directory
|
||||
# Param 3: Source file
|
||||
# Param 4: Compile command
|
||||
################################################################################
|
||||
define WriteCompileCommandsFragment
|
||||
$(call LogInfo, Creating compile commands fragment for $(notdir $3))
|
||||
$(call MakeDir, $(dir $1))
|
||||
$(call WriteFile,{ \
|
||||
"directory": "$(strip $(call FixPath, $2))"$(COMMA) \
|
||||
"file": "$(strip $(call FixPath, $3))"$(COMMA) \
|
||||
"command": "$(strip $(subst $(DQUOTE),\$(DQUOTE),$(subst \,\\,\
|
||||
$(subst $(FIXPATH),,$(call FixPath, $4)))))" \
|
||||
}$(COMMA), \
|
||||
$1)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Extensions of files handled by this macro.
|
||||
NATIVE_SOURCE_EXTENSIONS := %.S %.c %.cpp %.cc %.m %.mm
|
||||
|
||||
# Replaces native source extensions with the object file extension in a string.
|
||||
# Param 1: the string containing source file names with extensions
|
||||
# The surrounding strip is needed to keep additional whitespace out
|
||||
define replace_with_obj_extension
|
||||
$(strip \
|
||||
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
|
||||
$(patsubst $(extension),%$(OBJ_SUFFIX), $(filter $(extension), $1))) \
|
||||
)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# This pattern is used to transform the output of the microsoft CL compiler
|
||||
# into a make syntax dependency file (.d)
|
||||
WINDOWS_SHOWINCLUDE_SED_PATTERN := \
|
||||
-e '/^Note: including file:/!d' \
|
||||
-e 's|Note: including file: *||' \
|
||||
-e 's|\r||g' \
|
||||
-e 's|\\|/|g' \
|
||||
-e 's|^\([a-zA-Z]\):|$(WINENV_PREFIX)/\1|g' \
|
||||
-e '\|$(TOPDIR)|I !d' \
|
||||
-e 's|$$$$| \\|g' \
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This pattern is used to transform a dependency file (.d) to a list
|
||||
# of make targets for dependent files (.d.targets)
|
||||
DEPENDENCY_TARGET_SED_PATTERN := \
|
||||
-e 's/\#.*//' \
|
||||
-e 's/^[^:]*: *//' \
|
||||
-e 's/ *\\$$$$//' \
|
||||
-e 's/^[ ]*//' \
|
||||
-e '/^$$$$/ d' \
|
||||
-e 's/$$$$/ :/' \
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Create the recipe needed to compile a single native source file.
|
||||
#
|
||||
# Parameter 1 is the name of the rule, based on the name of the library/
|
||||
# program being build and the name of the source code file, e.g.
|
||||
# BUILD_LIBFOO_fooMain.cpp.
|
||||
#
|
||||
# Remaining parameters are named arguments:
|
||||
# FILE - The full path of the source file to compiler
|
||||
# BASE - The name of the rule for the entire binary to build ($1)
|
||||
#
|
||||
CreateCompiledNativeFile = $(NamedParamsMacroTemplate)
|
||||
define CreateCompiledNativeFileBody
|
||||
$1_FILENAME := $$(notdir $$($1_FILE))
|
||||
|
||||
# The target file to be generated.
|
||||
$1_OBJ := $$($$($1_BASE)_OBJECT_DIR)/$$(call replace_with_obj_extension, \
|
||||
$$($1_FILENAME))
|
||||
|
||||
# Generate the corresponding compile_commands.json fragment.
|
||||
$1_OBJ_JSON = $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$(subst /,_,$$(subst \
|
||||
$$(OUTPUTDIR)/,,$$($1_OBJ))).json
|
||||
$$($1_BASE)_ALL_OBJS_JSON += $$($1_OBJ_JSON)
|
||||
|
||||
# Only continue if this object file hasn't been processed already. This lets
|
||||
# the first found source file override any other with the same name.
|
||||
ifeq ($$($1_OBJ_PROCESSED), )
|
||||
$1_OBJ_PROCESSED := true
|
||||
# This is the definite source file to use for $1_FILENAME.
|
||||
$1_SRC_FILE := $$($1_FILE)
|
||||
|
||||
$$(eval $$(call SetupCompileFileFlags,$1,$$($1_BASE)))
|
||||
|
||||
ifneq ($$(filter %.c, $$($1_FILENAME)), )
|
||||
# Compile as a C file
|
||||
$1_CFLAGS += $$($1_WARNINGS_FLAGS)
|
||||
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
|
||||
$$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CC)
|
||||
else ifneq ($$(filter %.m, $$($1_FILENAME)), )
|
||||
# Compile as an Objective-C file
|
||||
$1_CFLAGS += $$($1_WARNINGS_FLAGS)
|
||||
$1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
|
||||
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CC)
|
||||
else ifneq ($$(filter %.S, $$($1_FILENAME)), )
|
||||
# Compile as preprocessed assembler file
|
||||
$1_FLAGS := $(BASIC_ASFLAGS) $$($1_BASE_ASFLAGS)
|
||||
$1_COMPILER := $(AS)
|
||||
|
||||
# gcc or clang assembly files must contain an appropriate relative .file
|
||||
# path for reproducible builds.
|
||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
# If no absolute paths allowed, work out relative source file path
|
||||
# for assembly .file substitution, otherwise use full file path
|
||||
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), false)
|
||||
$1_REL_ASM_SRC := $$(call RelativePath, $$($1_FILE), $(WORKSPACE_ROOT))
|
||||
else
|
||||
$1_REL_ASM_SRC := $$($1_FILE)
|
||||
endif
|
||||
$1_FLAGS := $$($1_FLAGS) -DASSEMBLY_SRC_FILE='"$$($1_REL_ASM_SRC)"' \
|
||||
-include $(TOPDIR)/make/data/autoheaders/assemblyprefix.h
|
||||
endif
|
||||
else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
|
||||
# Compile as a C++ or Objective-C++ file
|
||||
$1_CXXFLAGS += $$($1_WARNINGS_FLAGS)
|
||||
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
|
||||
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) -c
|
||||
$1_COMPILER := $$($$($1_BASE)_CXX)
|
||||
else
|
||||
$$(error Internal error in NativeCompilation.gmk: no compiler for file $$($1_FILENAME))
|
||||
endif
|
||||
|
||||
# And this is the dependency file for this obj file.
|
||||
$1_DEPS_FILE := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_OBJ))
|
||||
# The dependency target file lists all dependencies as empty targets to
|
||||
# avoid make error "No rule to make target" for removed files
|
||||
$1_DEPS_TARGETS_FILE := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_OBJ))
|
||||
|
||||
# Only try to load individual dependency information files if the global
|
||||
# file hasn't been loaded (could happen if make was interrupted).
|
||||
ifneq ($$($$($1_BASE)_DEPS_FILE_LOADED), true)
|
||||
# Include previously generated dependency information. (if it exists)
|
||||
-include $$($1_DEPS_FILE)
|
||||
-include $$($1_DEPS_TARGETS_FILE)
|
||||
endif
|
||||
|
||||
ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
|
||||
$1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
|
||||
endif
|
||||
|
||||
$1_OBJ_DEPS := $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
|
||||
$$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE)
|
||||
$1_COMPILE_OPTIONS := $$($1_FLAGS) $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)
|
||||
# For reproducible builds with gcc and clang ensure random symbol generation is
|
||||
# seeded deterministically
|
||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
|
||||
endif
|
||||
|
||||
$$($1_OBJ_JSON): $$($1_OBJ_DEPS)
|
||||
$$(call WriteCompileCommandsFragment, $$@, $$(PWD), $$($1_SRC_FILE), \
|
||||
$$($1_COMPILER) $$($1_COMPILE_OPTIONS))
|
||||
|
||||
$$($1_OBJ): $$($1_OBJ_DEPS) | $$($$($1_BASE)_BUILD_INFO)
|
||||
$$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
|
||||
$$(call MakeDir, $$(@D))
|
||||
ifneq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_COMPILER) $$(GENDEPS_FLAGS) \
|
||||
$$(addsuffix .tmp, $$($1_DEPS_FILE)) \
|
||||
$$($1_COMPILE_OPTIONS)))
|
||||
ifneq ($$($1_DEPS_FILE), )
|
||||
$$(call fix-deps-file, $$($1_DEPS_FILE))
|
||||
# Create a dependency target file from the dependency file.
|
||||
# Solution suggested by:
|
||||
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEPS_FILE) \
|
||||
> $$($1_DEPS_TARGETS_FILE)
|
||||
endif
|
||||
else
|
||||
# The Visual Studio compiler lacks a feature for generating make
|
||||
# dependencies, but by setting -showIncludes, all included files are
|
||||
# printed. These are filtered out and parsed into make dependences.
|
||||
#
|
||||
# Keep as much as possible on one execution line for best performance
|
||||
# on Windows. No need to save exit code from compilation since
|
||||
# pipefail is always active on Windows.
|
||||
ifeq ($$(filter %.S, $$($1_FILENAME)), )
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_COMPILER) -showIncludes $$($1_COMPILE_OPTIONS))) \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$($1_FILENAME)$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$@: \\ > $$($1_DEPS_FILE) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_OBJ).log \
|
||||
| $(SORT) -u >> $$($1_DEPS_FILE) ; \
|
||||
$(ECHO) >> $$($1_DEPS_FILE) ; \
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEPS_FILE) > $$($1_DEPS_TARGETS_FILE)
|
||||
else
|
||||
# For assembler calls just create empty dependency lists
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_COMPILER) $$($1_FLAGS) \
|
||||
$(CC_OUT_OPTION)$$($1_OBJ) -Ta $$($1_SRC_FILE))) \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "Assembling:" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) > $$($1_DEPS_FILE) ; \
|
||||
$(ECHO) > $$($1_DEPS_TARGETS_FILE)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreatePrecompiledHeader
|
||||
ifneq ($$($1_PRECOMPILED_HEADER), )
|
||||
ifeq ($(USE_PRECOMPILED_HEADER), true)
|
||||
ifeq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
$1_PCH_FILE := $$($1_OBJECT_DIR)/$1.pch
|
||||
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
|
||||
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch$(OBJ_SUFFIX)
|
||||
|
||||
$$(eval $$(call CreateCompiledNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
|
||||
FILE := $$($1_GENERATED_PCH_SRC), \
|
||||
BASE := $1, \
|
||||
EXTRA_CXXFLAGS := -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
|
||||
))
|
||||
|
||||
$1_USE_PCH_FLAGS := \
|
||||
-Fp$$($1_PCH_FILE) -Yu$$(notdir $$($1_PRECOMPILED_HEADER))
|
||||
|
||||
$$($1_ALL_OBJS): $$($1_GENERATED_PCH_OBJ)
|
||||
|
||||
# Explicitly add the pch obj file first to ease comparing to old
|
||||
# hotspot build.
|
||||
$1_ALL_OBJS := $$($1_GENERATED_PCH_OBJ) $$($1_ALL_OBJS)
|
||||
|
||||
$$($1_GENERATED_PCH_SRC):
|
||||
$(ECHO) "#include \"$$(notdir $$($1_PRECOMPILED_HEADER))\"" > $$@
|
||||
|
||||
else ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
$1_PCH_FILE := $$($1_OBJECT_DIR)/precompiled/$$(notdir $$($1_PRECOMPILED_HEADER)).gch
|
||||
$1_USE_PCH_FLAGS := -I$$($1_OBJECT_DIR)/precompiled
|
||||
else ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
$1_PCH_FILE := $$($1_OBJECT_DIR)/precompiled/$$(notdir $$($1_PRECOMPILED_HEADER)).pch
|
||||
$1_USE_PCH_FLAGS := -include-pch $$($1_PCH_FILE)
|
||||
endif
|
||||
$1_PCH_DEPS_FILE := $$($1_PCH_FILE).d
|
||||
$1_PCH_DEPS_TARGETS_FILE := $$($1_PCH_FILE).d.targets
|
||||
|
||||
-include $$($1_PCH_DEPS_FILE)
|
||||
-include $$($1_PCH_DEPS_TARGETS_FILE)
|
||||
|
||||
$1_PCH_COMMAND := $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
|
||||
$$($1_OPT_CFLAGS) -x c++-header -c $(GENDEPS_FLAGS) \
|
||||
$$(addsuffix .tmp, $$($1_PCH_DEPS_FILE))
|
||||
|
||||
$$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE)
|
||||
$$(call LogInfo, Generating precompiled header)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_PCH_COMMAND) $$< -o $$@))
|
||||
$$(call fix-deps-file, $$($1_PCH_DEPS_FILE))
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_PCH_DEPS_FILE) \
|
||||
> $$($1_PCH_DEPS_TARGETS_FILE)
|
||||
|
||||
$$($1_ALL_OBJS): $$($1_PCH_FILE)
|
||||
|
||||
# Generate the corresponding compile_commands.json fragment.
|
||||
$1_PCH_FILE_JSON := $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$(subst /,_,$$(subst \
|
||||
$$(OUTPUTDIR)/,,$$($1_PCH_FILE))).json
|
||||
$1_ALL_OBJS_JSON += $$($1_PCH_FILE_JSON)
|
||||
|
||||
$$($1_PCH_FILE_JSON): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE)
|
||||
$$(call WriteCompileCommandsFragment, $$@, $$(PWD), $$<, \
|
||||
$$($1_PCH_COMMAND) $$< -o $$($1_PCH_FILE))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreateWindowsResourceFile
|
||||
ifneq ($$($1_VERSIONINFO_RESOURCE), )
|
||||
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
|
||||
$1_RES_DEPS_FILE := $$($1_RES).d
|
||||
$1_RES_DEPS_TARGETS_FILE := $$($1_RES).d.targets
|
||||
-include $$($1_RES_DEPS_FILE)
|
||||
-include $$($1_RES_DEPS_TARGETS_FILE)
|
||||
|
||||
$1_RES_VARDEPS := $$($1_RC) $$($1_RCFLAGS)
|
||||
$1_RES_VARDEPS_FILE := $$(call DependOnVariable, $1_RES_VARDEPS, \
|
||||
$$($1_RES).vardeps)
|
||||
|
||||
$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
|
||||
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
|
||||
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
|
||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||
$$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
|
||||
$$($1_VERSIONINFO_RESOURCE) 2>&1 ))
|
||||
# Windows RC compiler does not support -showIncludes, so we mis-use CL
|
||||
# for this. Filter out RC specific arguments that are unknown to CL.
|
||||
# For some unknown reason, in this case CL actually outputs the show
|
||||
# includes to stderr so need to redirect it to hide the output from the
|
||||
# main log.
|
||||
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX), \
|
||||
$$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
|
||||
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
|
||||
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
|
||||
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEPS_FILE) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX).log \
|
||||
>> $$($1_RES_DEPS_FILE) ; \
|
||||
$(ECHO) >> $$($1_RES_DEPS_FILE) ;\
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEPS_FILE) \
|
||||
> $$($1_RES_DEPS_TARGETS_FILE)
|
||||
endif
|
||||
endef
|
||||
118
make/common/native/DebugSymbols.gmk
Normal file
118
make/common/native/DebugSymbols.gmk
Normal file
@@ -0,0 +1,118 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file contains functionality related to native debug symbol handling.
|
||||
|
||||
################################################################################
|
||||
define CreateDebugSymbols
|
||||
ifneq ($$($1_COPY_DEBUG_SYMBOLS), false)
|
||||
$1_COPY_DEBUG_SYMBOLS := $(COPY_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
|
||||
$1_ZIP_EXTERNAL_DEBUG_SYMBOLS := $(ZIP_EXTERNAL_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
|
||||
ifneq ($$($1_DEBUG_SYMBOLS), false)
|
||||
$$(call SetIfEmpty, $1_SYMBOLS_DIR, $$($1_OUTPUT_DIR))
|
||||
# Only copy debug symbols for dynamic libraries and programs.
|
||||
ifneq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
# Generate debuginfo files.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb" \
|
||||
"-map:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).map"
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
$1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).stripped.pdb"
|
||||
endif
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_BASENAME).map
|
||||
|
||||
else ifeq ($(call isTargetOs, linux), true)
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_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
|
||||
# Creating the debuglink is done in another command rather than all at once
|
||||
# so we can run it after strip is called, since strip can sometimes mangle the
|
||||
# embedded debuglink, which we want to avoid.
|
||||
$1_CREATE_DEBUGINFO_CMDS := \
|
||||
$$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) && \
|
||||
$$(CHMOD) -x $$($1_DEBUGINFO_FILES)
|
||||
$1_CREATE_DEBUGLINK_CMDS := $(CD) $$($1_SYMBOLS_DIR) && \
|
||||
$$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
|
||||
|
||||
else ifeq ($(call isTargetOs, aix), true)
|
||||
# AIX does not provide the equivalent of OBJCOPY to extract debug symbols,
|
||||
# so we copy the compiled object with symbols to the .debuginfo file, which
|
||||
# happens prior to the STRIP_CMD on the original target object file.
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo
|
||||
$1_CREATE_DEBUGINFO_CMDS := $(CP) $$($1_TARGET) $$($1_DEBUGINFO_FILES)
|
||||
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
$1_DEBUGINFO_FILES := \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
|
||||
$1_CREATE_DEBUGINFO_CMDS := \
|
||||
$(DSYMUTIL) --out $$($1_SYMBOLS_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
|
||||
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
|
||||
# trigger downstream dependants of $$($1_DEBUGINFO_FILES), we must have
|
||||
# a recipe in the rule below. To avoid rerunning the recipe every time
|
||||
# have it touch the target. If a debuginfo file is deleted by something
|
||||
# external, explicitly delete the TARGET to trigger a rebuild of both.
|
||||
ifneq ($$(wildcard $$($1_DEBUGINFO_FILES)), $$($1_DEBUGINFO_FILES))
|
||||
$$(call LogDebug, Deleting $$($1_BASENAME) because debuginfo files are missing)
|
||||
$$(shell $(RM) $$($1_TARGET))
|
||||
endif
|
||||
$$($1_DEBUGINFO_FILES): $$($1_TARGET)
|
||||
$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
|
||||
$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
|
||||
)
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_DEBUGINFO_FILES)
|
||||
|
||||
ifeq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$1_DEBUGINFO_ZIP := $$($1_SYMBOLS_DIR)/$$($1_BASENAME).diz
|
||||
else
|
||||
$1_DEBUGINFO_ZIP := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).diz
|
||||
endif
|
||||
$1 += $$($1_DEBUGINFO_ZIP)
|
||||
|
||||
# The dependency on TARGET is needed for debuginfo files
|
||||
# to be rebuilt properly.
|
||||
$$($1_DEBUGINFO_ZIP): $$($1_DEBUGINFO_FILES) $$($1_TARGET)
|
||||
$(CD) $$($1_SYMBOLS_DIR) && \
|
||||
$(ZIPEXE) -q -r $$@ $$(subst $$($1_SYMBOLS_DIR)/,, $$($1_DEBUGINFO_FILES))
|
||||
|
||||
endif
|
||||
endif # !STATIC_LIBRARY
|
||||
endif # $1_DEBUG_SYMBOLS != false
|
||||
endif # COPY_DEBUG_SYMBOLS
|
||||
endef
|
||||
225
make/common/native/Flags.gmk
Normal file
225
make/common/native/Flags.gmk
Normal file
@@ -0,0 +1,225 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file contains functionality related to setting up compiler and linker
|
||||
# flags, based on various more abstract sources of compilation description,
|
||||
# like optimization level.
|
||||
|
||||
################################################################################
|
||||
# $1 is the prefix of the file to be compiled
|
||||
# $2 is the prefix of the library, i.e. $$($1_BASE)
|
||||
define SetupCompileFileFlags
|
||||
ifeq ($$($1_OPTIMIZATION), )
|
||||
$1_OPT_CFLAGS := $$($2_OPT_CFLAGS)
|
||||
$1_OPT_CXXFLAGS := $$($2_OPT_CXXFLAGS)
|
||||
else
|
||||
ifeq ($$($1_OPTIMIZATION), NONE)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_NONE)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
else ifeq ($$($1_OPTIMIZATION), LOW)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_NORM)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
|
||||
else ifeq ($$($1_OPTIMIZATION), HIGH)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HI)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
|
||||
else ifeq ($$($1_OPTIMIZATION), HIGHEST)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
|
||||
else ifeq ($$($1_OPTIMIZATION), HIGHEST_JVM)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
|
||||
else ifeq ($$($1_OPTIMIZATION), SIZE)
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_SIZE)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
|
||||
else
|
||||
$$(error Unknown value for file OPTIMIZATION: $$($1_OPTIMIZATION))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$($2_PRECOMPILED_HEADER), )
|
||||
ifeq ($$(filter $$($1_FILENAME), $$($2_PRECOMPILED_HEADER_EXCLUDE)), )
|
||||
$1_USE_PCH_FLAGS := $$($2_USE_PCH_FLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(DISABLE_WARNING_PREFIX), )
|
||||
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$($2_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)) \
|
||||
$$($2_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)_$$($1_FILENAME)))
|
||||
endif
|
||||
|
||||
$1_BASE_CFLAGS := $$($2_CFLAGS) $$($2_EXTRA_CFLAGS) \
|
||||
$$($2_SYSROOT_CFLAGS)
|
||||
$1_BASE_CXXFLAGS := $$($2_CXXFLAGS) $$($2_EXTRA_CXXFLAGS) \
|
||||
$$($2_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
|
||||
$1_BASE_ASFLAGS := $$($2_ASFLAGS) $$($2_EXTRA_ASFLAGS)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define SetupCompilerFlags
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS, TOOLCHAIN_TYPE and
|
||||
# OPENJDK_TARGET_OS plus OPENJDK_TARGET_CPU pair dependent variables for CFLAGS.
|
||||
$1_EXTRA_CFLAGS := $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_CFLAGS_$(TOOLCHAIN_TYPE)) \
|
||||
$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU))
|
||||
|
||||
ifneq ($(DEBUG_LEVEL), release)
|
||||
# Pickup extra debug dependent variables for CFLAGS
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
|
||||
else
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
|
||||
endif
|
||||
ifeq ($(STATIC_LIBS), true)
|
||||
$1_EXTRA_CFLAGS += $$(STATIC_LIBS_CFLAGS)
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS and/or TOOLCHAIN_TYPE
|
||||
# dependent variables for CXXFLAGS.
|
||||
$1_EXTRA_CXXFLAGS := $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_CXXFLAGS_$(TOOLCHAIN_TYPE))
|
||||
|
||||
ifneq ($(DEBUG_LEVEL), release)
|
||||
# Pickup extra debug dependent variables for CXXFLAGS
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_debug)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
|
||||
else
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_release)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
|
||||
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
endif
|
||||
ifeq ($(STATIC_LIBS), true)
|
||||
$1_EXTRA_CXXFLAGS += $$(STATIC_LIB_CFLAGS)
|
||||
endif
|
||||
|
||||
# If no C++ flags are explicitly set, default to using the C flags.
|
||||
# After that, we can set additional C++ flags that should not interfere
|
||||
# with the mechanism for copying the C flags by default.
|
||||
ifeq ($$($1_CXXFLAGS), )
|
||||
$1_CXXFLAGS := $$($1_CFLAGS)
|
||||
endif
|
||||
ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)), )
|
||||
$1_EXTRA_CXXFLAGS := $$($1_EXTRA_CFLAGS)
|
||||
endif
|
||||
|
||||
$$(call SetIfEmpty, $1_COMPILE_WITH_DEBUG_SYMBOLS, $$(COMPILE_WITH_DEBUG_SYMBOLS))
|
||||
|
||||
ifeq ($(STATIC_LIBS), true)
|
||||
# For release builds where debug symbols are configured to be moved to
|
||||
# separate debuginfo files, disable debug symbols for static libs instead.
|
||||
# We don't currently support this configuration and we don't want symbol
|
||||
# information in release builds unless explicitly asked to provide it.
|
||||
ifeq ($(DEBUG_LEVEL), release)
|
||||
ifeq ($(COPY_DEBUG_SYMBOLS), true)
|
||||
$1_COMPILE_WITH_DEBUG_SYMBOLS := false
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_COMPILE_WITH_DEBUG_SYMBOLS), true)
|
||||
$1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_ASFLAGS += $$(ASFLAGS_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
# Pass the library name for static JNI library naming
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME)
|
||||
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_NAME)
|
||||
endif
|
||||
|
||||
# Pick up disabled warnings, if possible on this platform.
|
||||
ifneq ($(DISABLE_WARNING_PREFIX), )
|
||||
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$(DISABLED_WARNINGS) \
|
||||
$$(DISABLED_WARNINGS_C) \
|
||||
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
|
||||
$$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)) \
|
||||
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)))
|
||||
$1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$(DISABLED_WARNINGS) \
|
||||
$$(DISABLED_WARNINGS_CXX) \
|
||||
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
|
||||
$$($1_DISABLED_WARNINGS_CXX_$(TOOLCHAIN_TYPE)) \
|
||||
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_DISABLED_WARNINGS_CXX_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS)))
|
||||
endif
|
||||
|
||||
# Check if warnings should be considered errors.
|
||||
# Pick first binary and toolchain specific, then binary specific, then general setting.
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), )
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS), )
|
||||
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$(WARNINGS_AS_ERRORS)
|
||||
else
|
||||
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$($1_WARNINGS_AS_ERRORS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true)
|
||||
$1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
$1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
|
||||
endif
|
||||
|
||||
ifeq (NONE, $$($1_OPTIMIZATION))
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_NONE)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
else ifeq (LOW, $$($1_OPTIMIZATION))
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_NORM)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
|
||||
else ifeq (HIGH, $$($1_OPTIMIZATION))
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HI)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
|
||||
else ifeq (HIGHEST, $$($1_OPTIMIZATION))
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
|
||||
else ifeq (HIGHEST_JVM, $$($1_OPTIMIZATION))
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
|
||||
else ifeq (SIZE, $$($1_OPTIMIZATION))
|
||||
$1_OPT_CFLAGS := $(C_O_FLAG_SIZE)
|
||||
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
|
||||
else ifneq (, $$($1_OPTIMIZATION))
|
||||
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define SetupLinkerFlags
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS and TOOLCHAIN_TYPE
|
||||
# dependent variables for LDFLAGS and LIBS, and additionally the pair dependent
|
||||
# TOOLCHAIN_TYPE plus OPENJDK_TARGET_OS
|
||||
$1_EXTRA_LDFLAGS += $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_LDFLAGS_$(TOOLCHAIN_TYPE)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
|
||||
$1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
|
||||
$$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
|
||||
endef
|
||||
182
make/common/native/Link.gmk
Normal file
182
make/common/native/Link.gmk
Normal file
@@ -0,0 +1,182 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file contains functionality related to linking a native binary;
|
||||
# creating either a dynamic library, a static library or an executable.
|
||||
|
||||
################################################################################
|
||||
# GetEntitlementsFile
|
||||
# Find entitlements file for executable when signing on macosx. If no
|
||||
# specialized file is found, returns the default file.
|
||||
# This macro might be called from custom makefiles.
|
||||
# $1 Executable to find entitlements file for.
|
||||
ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
|
||||
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))$(CODESIGN_PLIST_SUFFIX).plist, \
|
||||
$(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
define SetupLinking
|
||||
# Unless specifically set, stripping should only happen if symbols are also
|
||||
# being copied.
|
||||
$$(call SetIfEmpty, $1_STRIP_SYMBOLS, $$($1_COPY_DEBUG_SYMBOLS))
|
||||
|
||||
ifneq ($$($1_STRIP_SYMBOLS), false)
|
||||
# Default to using the global STRIPFLAGS. Allow for overriding with an
|
||||
# empty value
|
||||
$1_STRIPFLAGS ?= $(STRIPFLAGS)
|
||||
$1_STRIP_CMD := $$($1_STRIP) $$($1_STRIPFLAGS) $$($1_TARGET)
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreateLinkedResult
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$$(eval $$(call CreateStaticLibrary,$1))
|
||||
else
|
||||
$$(eval $$(call CreateDynamicLibraryOrExecutable,$1))
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreateStaticLibrary
|
||||
# Include partial linking when building the static library with clang on linux
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), clang), )
|
||||
$1_ENABLE_PARTIAL_LINKING := true
|
||||
endif
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_AR) $$(ARFLAGS) $$($1_ARFLAGS) $$($1_LIBS) \
|
||||
$$($1_EXTRA_LIBS)
|
||||
ifeq ($$($1_ENABLE_PARTIAL_LINKING), true)
|
||||
$1_VARDEPS += $$($1_LD) $$($1_SYSROOT_LDFLAGS)
|
||||
endif
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||
|
||||
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_VARDEPS_FILE)
|
||||
|
||||
$1_AR_OBJ_ARG := $$($1_LD_OBJ_ARG)
|
||||
# With clang on linux, partial linking is enabled and 'AR' takes the output
|
||||
# object from the partial linking step.
|
||||
ifeq ($$($1_ENABLE_PARTIAL_LINKING), true)
|
||||
$1_TARGET_RELOCATABLE := $$($1_OBJECT_DIR)/$$($1_PREFIX)$$($1_NAME)_relocatable$(OBJ_SUFFIX)
|
||||
$1_AR_OBJ_ARG := $$($1_TARGET_RELOCATABLE)
|
||||
endif
|
||||
|
||||
$$($1_TARGET): $$($1_TARGET_DEPS)
|
||||
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||
ifeq ($$($1_LINK_OBJS_RELATIVE), true)
|
||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST)))
|
||||
else
|
||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||
endif
|
||||
endif
|
||||
$$(call LogInfo, Building static library $$($1_BASENAME))
|
||||
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||
# Do partial linking.
|
||||
ifeq ($$($1_ENABLE_PARTIAL_LINKING), true)
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_partial_link, \
|
||||
$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||
$$($1_LD) $(LDFLAGS_CXX_PARTIAL_LINKING) $$($1_SYSROOT_LDFLAGS) \
|
||||
-o $$($1_TARGET_RELOCATABLE) \
|
||||
$$($1_LD_OBJ_ARG))
|
||||
endif
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||
$$($1_AR) $$(ARFLAGS) $$($1_ARFLAGS) -r -cs $$($1_TARGET) \
|
||||
$$($1_AR_OBJ_ARG) $$($1_RES))
|
||||
ifeq ($(STATIC_BUILD), true)
|
||||
$(RM) $$(@D)/$$(basename $$(@F)).symbols; \
|
||||
$(ECHO) "Getting symbols from nm"; \
|
||||
$(NM) $(NMFLAGS) -m $$($1_TARGET) | $(GREP) "__TEXT" | \
|
||||
$(EGREP) -v "non-external|private extern|__TEXT,__eh_frame" | \
|
||||
$(SED) -e 's/.* //' > $$(@D)/$$(basename $$(@F)).symbols
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreateDynamicLibraryOrExecutable
|
||||
# A shared dynamic library or an executable binary has been specified
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
# Generating a dynamic library.
|
||||
$1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
|
||||
|
||||
# Create loadmap on AIX. Helps in diagnosing some problems.
|
||||
ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
|
||||
$1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
|
||||
endif
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) \
|
||||
$$($1_EXTRA_LDFLAGS) $$($1_LIBS) $$($1_EXTRA_LIBS) \
|
||||
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD) $$($1_CREATE_DEBUGLINK_CMDS)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||
|
||||
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_VARDEPS_FILE)
|
||||
|
||||
$$($1_TARGET): $$($1_TARGET_DEPS)
|
||||
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||
ifeq ($$($1_LINK_OBJS_RELATIVE), true)
|
||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST)))
|
||||
else
|
||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||
endif
|
||||
endif
|
||||
$$(call LogInfo, Linking $$($1_BASENAME))
|
||||
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
|
||||
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||
$$($1_SYSROOT_LDFLAGS) -o $$($1_TARGET) $$($1_LD_OBJ_ARG) \
|
||||
$$($1_LIBS) $$($1_EXTRA_LIBS))
|
||||
$$($1_CREATE_DEBUGINFO_CMDS)
|
||||
$$($1_STRIP_CMD)
|
||||
$$($1_CREATE_DEBUGLINK_CMDS)
|
||||
# On macosx, optionally run codesign on every binary.
|
||||
# Remove signature explicitly first to avoid warnings if the linker
|
||||
# added a default adhoc signature.
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
$(CODESIGN) --remove-signature $$@
|
||||
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp \
|
||||
--options runtime --entitlements \
|
||||
$$(call GetEntitlementsFile, $$@) $$@
|
||||
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
$(CODESIGN) --remove-signature $$@
|
||||
$(CODESIGN) -f -s - --entitlements \
|
||||
$$(call GetEntitlementsFile, $$@) $$@
|
||||
endif
|
||||
endef
|
||||
112
make/common/native/LinkMicrosoft.gmk
Normal file
112
make/common/native/LinkMicrosoft.gmk
Normal file
@@ -0,0 +1,112 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file contains functionality related to linking a native binary;
|
||||
# creating either a dynamic library, a static library or an executable.
|
||||
|
||||
################################################################################
|
||||
define CreateLinkedResultMicrosoft
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
$$(eval $$(call CreateStaticLibraryMicrosoft,$1))
|
||||
else
|
||||
$$(eval $$(call CreateDynamicLibraryOrExecutableMicrosoft,$1))
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreateStaticLibraryMicrosoft
|
||||
$1_VARDEPS := $$($1_LIB) $$(LIBFLAGS) $$($1_LIBFLAGS) $$($1_LIBS) \
|
||||
$$($1_EXTRA_LIBS)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||
|
||||
$$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE)
|
||||
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||
endif
|
||||
$$(call LogInfo, Building static library $$($1_BASENAME))
|
||||
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_LIB) -nologo $$(LIBFLAGS) $$($1_LIBFLAGS) -out:$$($1_TARGET) \
|
||||
$$($1_LD_OBJ_ARG) $$($1_RES))
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define CreateDynamicLibraryOrExecutableMicrosoft
|
||||
ifeq ($$($1_EMBED_MANIFEST), true)
|
||||
$1_EXTRA_LDFLAGS += -manifest:embed
|
||||
endif
|
||||
|
||||
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
|
||||
$1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
|
||||
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
# To properly trigger downstream dependants of the import library, just as
|
||||
# for debug files, we must have a recipe in the rule. To avoid rerunning
|
||||
# the recipe every time have it touch the target. If an import library
|
||||
# file is deleted by something external, explicitly delete the target to
|
||||
# trigger a rebuild of both.
|
||||
ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY))
|
||||
$$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing)
|
||||
$$(shell $(RM) $$($1_TARGET))
|
||||
endif
|
||||
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_IMPORT_LIBRARY)
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) \
|
||||
$$($1_EXTRA_LDFLAGS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
|
||||
$$($1_MANIFEST_VERSION)
|
||||
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
|
||||
|
||||
$1_TARGET_DEPS := $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \
|
||||
$$($1_VARDEPS_FILE)
|
||||
|
||||
$$($1_TARGET): $$($1_TARGET_DEPS)
|
||||
ifneq ($$($1_OBJ_FILE_LIST), )
|
||||
$$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
|
||||
endif
|
||||
$$(call LogInfo, Linking $$($1_BASENAME))
|
||||
$$(call MakeDir, $$($1_OUTPUT_DIR) $$($1_SYMBOLS_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
|
||||
$$($1_LD) -nologo $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||
$$($1_SYSROOT_LDFLAGS) -out:$$($1_TARGET) $$($1_LD_OBJ_ARG) \
|
||||
$$($1_RES) $$($1_LIBS) $$($1_EXTRA_LIBS)) \
|
||||
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
|
||||
test "$$$$?" = "1"
|
||||
ifeq ($(call isBuildOsEnv, windows.wsl2), true)
|
||||
$$(CHMOD) +x $$($1_TARGET)
|
||||
endif
|
||||
ifneq ($$($1_MANIFEST), )
|
||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) \
|
||||
-identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" \
|
||||
-outputresource:$$@;#1
|
||||
endif
|
||||
endef
|
||||
247
make/common/native/Paths.gmk
Normal file
247
make/common/native/Paths.gmk
Normal file
@@ -0,0 +1,247 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file contains functionality related to handling paths for source files
|
||||
# and object files. This is complicated by the fact that we usually, but not
|
||||
# always, use absolute instead of relative paths. It is further complicated
|
||||
# by the fact that not all tools allow inputting large lists of files as
|
||||
# "@-files", which we normally use to avoid hitting command line length limits.
|
||||
# Finally this file contains functionality for locating all source code files
|
||||
# that should be included in the compilation.
|
||||
|
||||
################################################################################
|
||||
# When absolute paths are not allowed in the output, and the compiler does not
|
||||
# support any options to avoid it, we need to rewrite compile commands to use
|
||||
# relative paths. By doing this, the __FILE__ macro will resolve to relative
|
||||
# paths. The relevant input paths on the command line are the -I flags and the
|
||||
# path to the source file itself.
|
||||
#
|
||||
# The macro MakeCommandRelative is used to rewrite the command line like this:
|
||||
# 'CD $(WORKSPACE_ROOT) && <cmd>'
|
||||
# and changes all paths in cmd to be relative to the workspace root. This only
|
||||
# works properly if the build dir is inside the workspace root. If it's not,
|
||||
# relative paths are still calculated, but depending on the distance between the
|
||||
# dirs, paths in the build dir may end up as essentially absolute anyway.
|
||||
#
|
||||
# The fix-deps-file macro is used to adjust the contents of the generated make
|
||||
# dependency files to contain paths compatible with make.
|
||||
#
|
||||
REWRITE_PATHS_RELATIVE = false
|
||||
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
|
||||
REWRITE_PATHS_RELATIVE = true
|
||||
endif
|
||||
|
||||
# CCACHE_BASEDIR needs fix-deps-file as makefiles use absolute filenames for
|
||||
# object files while CCACHE_BASEDIR will make ccache relativize all paths for
|
||||
# its compiler. The compiler then produces relative dependency files.
|
||||
# make does not know a relative and absolute filename is the same so it will
|
||||
# ignore such dependencies. This only applies when the OUTPUTDIR is inside
|
||||
# the WORKSPACE_ROOT.
|
||||
ifneq ($(CCACHE), )
|
||||
ifneq ($(filter $(WORKSPACE_ROOT)/%, $(OUTPUTDIR)), )
|
||||
REWRITE_PATHS_RELATIVE = true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(REWRITE_PATHS_RELATIVE), true)
|
||||
# Need to handle -I flags as both '-Ifoo' and '-I foo'.
|
||||
MakeCommandRelative = \
|
||||
$(CD) $(WORKSPACE_ROOT) && \
|
||||
$(foreach o, $1, \
|
||||
$(if $(filter $(WORKSPACE_ROOT)/% $(OUTPUTDIR)/%, $o), \
|
||||
$(call RelativePath, $o, $(WORKSPACE_ROOT)) \
|
||||
, \
|
||||
$(if $(filter -I$(WORKSPACE_ROOT)/%, $o), \
|
||||
-I$(call RelativePath, $(patsubst -I%, %, $o), $(WORKSPACE_ROOT)) \
|
||||
, \
|
||||
$o \
|
||||
) \
|
||||
) \
|
||||
)
|
||||
|
||||
# When compiling with relative paths, the deps file may come out with relative
|
||||
# paths, and that path may start with './'. First remove any leading ./, then
|
||||
# add WORKSPACE_ROOT to any line not starting with /, while allowing for
|
||||
# leading spaces. There may also be multiple entries on the same line, so start
|
||||
# with splitting such lines.
|
||||
# Non GNU sed (BSD on macosx) cannot substitute in literal \n using regex.
|
||||
# Instead use a bash escaped literal newline. To avoid having unmatched quotes
|
||||
# ruin the ability for an editor to properly syntax highlight this file, define
|
||||
# that newline sequence as a separate variable and add the closing quote behind
|
||||
# a comment.
|
||||
sed_newline := \'$$'\n''#'
|
||||
define fix-deps-file
|
||||
$(SED) \
|
||||
-e 's|\([^ ]\) \{1,\}\([^\\:]\)|\1 \\$(sed_newline) \2|g' \
|
||||
$1.tmp \
|
||||
| $(SED) \
|
||||
-e 's|^\([ ]*\)\./|\1|' \
|
||||
-e '/^[ ]*[^/ ]/s|^\([ ]*\)|\1$(WORKSPACE_ROOT)/|' \
|
||||
> $1
|
||||
endef
|
||||
else
|
||||
# By default the MakeCommandRelative macro does nothing.
|
||||
MakeCommandRelative = $1
|
||||
|
||||
# No adjustment is needed.
|
||||
define fix-deps-file
|
||||
$(MV) $1.tmp $1
|
||||
endef
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
define SetupSourceFiles
|
||||
$$(foreach d, $$($1_SRC), $$(if $$(wildcard $$d), , \
|
||||
$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
|
||||
|
||||
$1_SRCS_RAW := $$(call FindFiles, $$($1_SRC))
|
||||
# Order src files according to the order of the src dirs
|
||||
$1_SRCS := $$(foreach d, $$($1_SRC), $$(filter $$d%, $$($1_SRCS_RAW)))
|
||||
$1_SRCS := $$(filter $$(NATIVE_SOURCE_EXTENSIONS), $$($1_SRCS))
|
||||
# Extract the C/C++ files.
|
||||
ifneq ($$($1_EXCLUDE_PATTERNS), )
|
||||
# We must not match the exclude pattern against the src root(s).
|
||||
$1_SRCS_WITHOUT_ROOTS := $$($1_SRCS)
|
||||
$$(foreach i, $$($1_SRC), $$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
|
||||
$$i/%,%, $$($1_SRCS_WITHOUT_ROOTS))))
|
||||
$1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
|
||||
$$($1_SRCS_WITHOUT_ROOTS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDE_FILES), )
|
||||
$1_ALL_EXCLUDE_FILES += $$($1_EXCLUDE_FILES)
|
||||
endif
|
||||
ifneq ($$($1_ALL_EXCLUDE_FILES), )
|
||||
$1_EXCLUDE_FILES_PAT := $$($1_ALL_EXCLUDE_FILES) \
|
||||
$$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_ALL_EXCLUDE_FILES)))
|
||||
$1_EXCLUDE_FILES_PAT := $$(addprefix %, $$($1_EXCLUDE_FILES_PAT))
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT), $$($1_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_INCLUDE_FILES), )
|
||||
$1_INCLUDE_FILES_PAT := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT), $$($1_SRCS))
|
||||
endif
|
||||
# Now we have a list of all c/c++ files to compile: $$($1_SRCS)
|
||||
|
||||
# Prepend the source/bin path to the filter expressions. Then do the filtering.
|
||||
ifneq ($$($1_INCLUDES), )
|
||||
$1_SRC_INCLUDES := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_INCLUDES))))
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES), $$($1_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES), )
|
||||
$1_SRC_EXCLUDES := $$(addsuffix /%, $$($1_EXCLUDES))
|
||||
$1_SRC_EXCLUDES += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_EXCLUDES))))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES), $$($1_SRCS))
|
||||
endif
|
||||
|
||||
$1_SRCS += $$($1_EXTRA_FILES)
|
||||
|
||||
ifeq ($$($1_SRCS), )
|
||||
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_TYPE), EXECUTABLE)
|
||||
ifeq ($(UBSAN_ENABLED), true)
|
||||
# We need to set the default options for UBSan. This needs to be included in every executable.
|
||||
# Rather than copy and paste code to everything with a main function, we add an additional
|
||||
# source file to every executable that exports __ubsan_default_options.
|
||||
ifneq ($$(filter %.cpp %.cc, $$($1_SRCS)), )
|
||||
$1_SRCS += $(TOPDIR)/make/data/ubsan/ubsan_default_options.cpp
|
||||
else
|
||||
$1_SRCS += $(TOPDIR)/make/data/ubsan/ubsan_default_options.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define SetupOutputFiles
|
||||
# Calculate the expected output from compiling the sources
|
||||
$1_EXPECTED_OBJS_FILENAMES := $$(call replace_with_obj_extension, $$(notdir $$($1_SRCS)))
|
||||
$1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/, $$($1_EXPECTED_OBJS_FILENAMES))
|
||||
# Sort to remove duplicates and provide a reproducible order on the input files to the linker.
|
||||
$1_ALL_OBJS := $$(sort $$($1_EXPECTED_OBJS) $$($1_EXTRA_OBJECT_FILES))
|
||||
ifeq ($(STATIC_LIBS), true)
|
||||
# Exclude the object files that match with $1_STATIC_LIB_EXCLUDE_OBJS.
|
||||
ifneq ($$($1_STATIC_LIB_EXCLUDE_OBJS), )
|
||||
$1_ALL_OBJS := $$(call not-containing, $$($1_STATIC_LIB_EXCLUDE_OBJS), $$($1_ALL_OBJS))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define RemoveSuperfluousOutputFiles
|
||||
# Are there too many object files on disk? Perhaps because some source file was removed?
|
||||
$1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
|
||||
$1_SUPERFLOUS_OBJS := $$(sort $$(filter-out $$($1_EXPECTED_OBJS), $$($1_BINS)))
|
||||
# Clean out the superfluous object files.
|
||||
ifneq ($$($1_SUPERFLUOUS_OBJS), )
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
define SetupObjectFileList
|
||||
$1_LD_OBJ_ARG := $$($1_ALL_OBJS)
|
||||
|
||||
# If there are many object files, use an @-file...
|
||||
ifneq ($$(word 17, $$($1_ALL_OBJS)), )
|
||||
$1_OBJ_FILE_LIST := $$($1_OBJECT_DIR)/_$1_objectfilenames.txt
|
||||
ifneq ($(COMPILER_COMMAND_FILE_FLAG), )
|
||||
$1_LD_OBJ_ARG := $(COMPILER_COMMAND_FILE_FLAG)$$($1_OBJ_FILE_LIST)
|
||||
else
|
||||
# ...except for toolchains which don't support them.
|
||||
$1_LD_OBJ_ARG := `cat $$($1_OBJ_FILE_LIST)`
|
||||
endif
|
||||
|
||||
# If we are building static library, 'AR' on macosx/aix may not support @-file.
|
||||
ifeq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
ifeq ($(call isTargetOs, macosx aix), true)
|
||||
$1_LD_OBJ_ARG := `cat $$($1_OBJ_FILE_LIST)`
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Unfortunately the @-file trick does not work reliably when using clang.
|
||||
# Clang does not propagate the @-file parameter to the ld sub process, but
|
||||
# instead puts the full content on the command line. At least the llvm ld
|
||||
# does not even support an @-file.
|
||||
#
|
||||
# When linking a large amount of object files, we risk hitting the limit
|
||||
# of the command line length even on posix systems if the path length of
|
||||
# the output dir is very long due to our use of absolute paths. To
|
||||
# mitigate this, use paths relative to the output dir when linking over
|
||||
# 500 files with clang and the output dir path is deep.
|
||||
ifneq ($$(word 500, $$($1_ALL_OBJS)), )
|
||||
ifeq ($$(TOOLCHAIN_TYPE), clang)
|
||||
# There is no strlen function in make, but checking path depth is a
|
||||
# reasonable approximation.
|
||||
ifneq ($$(word 10, $$(subst /, ,$$(OUTPUTDIR))), )
|
||||
$1_LINK_OBJS_RELATIVE := true
|
||||
$1_ALL_OBJS_RELATIVE := $$(patsubst $$(OUTPUTDIR)/%, %, $$($1_ALL_OBJS))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -36,6 +36,10 @@ MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=af32e84c11009f72f783fdcdc9917efc277893988f097e198e2576875d1e88c1
|
||||
|
||||
MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_macos-aarch64_bin.tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_SHA256=f12e1e0a2dffc847951598f597c8ee60fb0913932f24b2b09c62cfd2f0f4dfb9
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=5434faaf029e66e7ce6e75770ca384de476750984a7d2881ef7686894c4b4944
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2024, 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
|
||||
@@ -441,7 +441,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"macosx-x64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "pandoc"],
|
||||
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
|
||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
||||
"--with-macosx-version-max=11.00.00",
|
||||
"--enable-compatible-cds-alignment",
|
||||
@@ -453,7 +453,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"macosx-aarch64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "pandoc"],
|
||||
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
"--with-macosx-version-max=11.00.00"),
|
||||
},
|
||||
@@ -486,7 +486,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-aarch64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "build_devkit", "pandoc"],
|
||||
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc"],
|
||||
configure_args: [
|
||||
"--with-zlib=system",
|
||||
"--disable-dtrace",
|
||||
@@ -1181,12 +1181,6 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
revision: (input.build_cpu == "x64" ? "Xcode11.3.1-MacOSX10.15+1.2" : devkit_platform_revisions[devkit_platform])
|
||||
},
|
||||
|
||||
cups: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "1.0118+1.0"
|
||||
},
|
||||
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
@@ -1237,7 +1231,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
graphviz: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "2.38.0-1+1.1",
|
||||
revision: "9.0.0+1.0",
|
||||
module: "graphviz-" + input.target_platform,
|
||||
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
|
||||
environment_path: input.get("graphviz", "install_path")
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
JVM_handle_aix_signal
|
||||
numa_error
|
||||
numa_warn
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
JVM_AccessVMBooleanFlag
|
||||
JVM_AccessVMIntFlag
|
||||
JVM_VMBreakPoint
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
JVM_handle_linux_signal
|
||||
JVM_IsUseContainerSupport
|
||||
numa_error
|
||||
numa_warn
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
JVM_handle_bsd_signal
|
||||
@@ -1,35 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
AsyncGetCallTrace
|
||||
jio_fprintf
|
||||
jio_printf
|
||||
jio_snprintf
|
||||
jio_vfprintf
|
||||
jio_vsnprintf
|
||||
JNI_CreateJavaVM
|
||||
JNI_GetCreatedJavaVMs
|
||||
JNI_GetDefaultJavaVMInitArgs
|
||||
JVM_IsForeignLinkerSupported
|
||||
JVM_FindClassFromBootLoader
|
||||
JVM_InitAgentProperties
|
||||
@@ -1,232 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
JVM_ActiveProcessorCount
|
||||
JVM_AreNestMates
|
||||
JVM_ArrayCopy
|
||||
JVM_AssertionStatusDirectives
|
||||
JVM_BeforeHalt
|
||||
JVM_CallStackWalk
|
||||
JVM_Clone
|
||||
JVM_ConstantPoolGetClassAt
|
||||
JVM_ConstantPoolGetClassAtIfLoaded
|
||||
JVM_ConstantPoolGetClassRefIndexAt
|
||||
JVM_ConstantPoolGetDoubleAt
|
||||
JVM_ConstantPoolGetFieldAt
|
||||
JVM_ConstantPoolGetFieldAtIfLoaded
|
||||
JVM_ConstantPoolGetFloatAt
|
||||
JVM_ConstantPoolGetIntAt
|
||||
JVM_ConstantPoolGetLongAt
|
||||
JVM_ConstantPoolGetMemberRefInfoAt
|
||||
JVM_ConstantPoolGetMethodAt
|
||||
JVM_ConstantPoolGetMethodAtIfLoaded
|
||||
JVM_ConstantPoolGetNameAndTypeRefIndexAt
|
||||
JVM_ConstantPoolGetNameAndTypeRefInfoAt
|
||||
JVM_ConstantPoolGetSize
|
||||
JVM_ConstantPoolGetStringAt
|
||||
JVM_ConstantPoolGetTagAt
|
||||
JVM_ConstantPoolGetUTF8At
|
||||
JVM_CurrentCarrierThread
|
||||
JVM_CurrentThread
|
||||
JVM_SetCurrentThread
|
||||
JVM_CurrentTimeMillis
|
||||
JVM_DefineClass
|
||||
JVM_DefineClassWithSource
|
||||
JVM_DesiredAssertionStatus
|
||||
JVM_DumpAllStacks
|
||||
JVM_DumpClassListToFile
|
||||
JVM_DumpDynamicArchive
|
||||
JVM_DumpThreads
|
||||
JVM_ExpandStackFrameInfo
|
||||
JVM_FillInStackTrace
|
||||
JVM_FindClassFromCaller
|
||||
JVM_FindClassFromClass
|
||||
JVM_FindLibraryEntry
|
||||
JVM_FindLoadedClass
|
||||
JVM_FindPrimitiveClass
|
||||
JVM_FindSignal
|
||||
JVM_FreeMemory
|
||||
JVM_GC
|
||||
JVM_GetAllThreads
|
||||
JVM_GetAndClearReferencePendingList
|
||||
JVM_GetArrayElement
|
||||
JVM_GetArrayLength
|
||||
JVM_GetCallerClass
|
||||
JVM_GetClassAccessFlags
|
||||
JVM_GetClassAnnotations
|
||||
JVM_GetClassConstantPool
|
||||
JVM_GetClassContext
|
||||
JVM_GetClassCPEntriesCount
|
||||
JVM_GetClassCPTypes
|
||||
JVM_GetClassDeclaredConstructors
|
||||
JVM_GetClassDeclaredFields
|
||||
JVM_GetClassDeclaredMethods
|
||||
JVM_GetClassFieldsCount
|
||||
JVM_GetClassFileVersion
|
||||
JVM_GetClassInterfaces
|
||||
JVM_GetClassMethodsCount
|
||||
JVM_GetClassModifiers
|
||||
JVM_GetClassNameUTF
|
||||
JVM_GetClassSignature
|
||||
JVM_GetClassSigners
|
||||
JVM_GetClassTypeAnnotations
|
||||
JVM_GetCPClassNameUTF
|
||||
JVM_GetCPFieldClassNameUTF
|
||||
JVM_GetCPFieldModifiers
|
||||
JVM_GetCPFieldNameUTF
|
||||
JVM_GetCPFieldSignatureUTF
|
||||
JVM_GetCPMethodClassNameUTF
|
||||
JVM_GetCPMethodModifiers
|
||||
JVM_GetCPMethodNameUTF
|
||||
JVM_GetCPMethodSignatureUTF
|
||||
JVM_GetDeclaredClasses
|
||||
JVM_GetDeclaringClass
|
||||
JVM_GetEnclosingMethodInfo
|
||||
JVM_GetExtendedNPEMessage
|
||||
JVM_GetFieldIxModifiers
|
||||
JVM_GetFieldTypeAnnotations
|
||||
JVM_GetInheritedAccessControlContext
|
||||
JVM_GetManagement
|
||||
JVM_GetMethodIxArgsSize
|
||||
JVM_GetMethodIxByteCode
|
||||
JVM_GetMethodIxByteCodeLength
|
||||
JVM_GetMethodIxExceptionIndexes
|
||||
JVM_GetMethodIxExceptionsCount
|
||||
JVM_GetMethodIxExceptionTableEntry
|
||||
JVM_GetMethodIxExceptionTableLength
|
||||
JVM_GetMethodIxLocalsCount
|
||||
JVM_GetMethodIxMaxStack
|
||||
JVM_GetMethodIxModifiers
|
||||
JVM_GetMethodIxNameUTF
|
||||
JVM_GetMethodIxSignatureUTF
|
||||
JVM_GetMethodParameters
|
||||
JVM_GetMethodTypeAnnotations
|
||||
JVM_GetNanoTimeAdjustment
|
||||
JVM_GetNestHost
|
||||
JVM_GetNestMembers
|
||||
JVM_GetNextThreadIdOffset
|
||||
JVM_GetPermittedSubclasses
|
||||
JVM_GetPrimitiveArrayElement
|
||||
JVM_GetProperties
|
||||
JVM_GetProtectionDomain
|
||||
JVM_GetRandomSeedForDumping
|
||||
JVM_GetRecordComponents
|
||||
JVM_GetSimpleBinaryName
|
||||
JVM_GetStackAccessControlContext
|
||||
JVM_GetSystemPackage
|
||||
JVM_GetSystemPackages
|
||||
JVM_GetTemporaryDirectory
|
||||
JVM_GetVmArguments
|
||||
JVM_Halt
|
||||
JVM_HasReferencePendingList
|
||||
JVM_HoldsLock
|
||||
JVM_GetStackTrace
|
||||
JVM_IHashCode
|
||||
JVM_InitClassName
|
||||
JVM_InitStackTraceElement
|
||||
JVM_InitStackTraceElementArray
|
||||
JVM_InitializeFromArchive
|
||||
JVM_InternString
|
||||
JVM_Interrupt
|
||||
JVM_InvokeMethod
|
||||
JVM_IsArrayClass
|
||||
JVM_IsCDSDumpingEnabled
|
||||
JVM_IsConstructorIx
|
||||
JVM_IsDumpingClassList
|
||||
JVM_IsFinalizationEnabled
|
||||
JVM_IsHiddenClass
|
||||
JVM_IsInterface
|
||||
JVM_IsPreviewEnabled
|
||||
JVM_IsContinuationsSupported
|
||||
JVM_IsPrimitiveClass
|
||||
JVM_IsRecord
|
||||
JVM_IsSameClassPackage
|
||||
JVM_IsSharingEnabled
|
||||
JVM_IsSupportedJNIVersion
|
||||
JVM_IsVMGeneratedMethodIx
|
||||
JVM_LatestUserDefinedLoader
|
||||
JVM_LoadZipLibrary
|
||||
JVM_LoadLibrary
|
||||
JVM_LookupDefineClass
|
||||
JVM_LookupLambdaProxyClassFromArchive
|
||||
JVM_LogLambdaFormInvoker
|
||||
JVM_MaxMemory
|
||||
JVM_MaxObjectInspectionAge
|
||||
JVM_MonitorNotify
|
||||
JVM_MonitorNotifyAll
|
||||
JVM_MonitorWait
|
||||
JVM_MoreStackWalk
|
||||
JVM_NanoTime
|
||||
JVM_NativePath
|
||||
JVM_NewArray
|
||||
JVM_NewInstanceFromConstructor
|
||||
JVM_NewMultiArray
|
||||
JVM_PhantomReferenceRefersTo
|
||||
JVM_PrintWarningAtDynamicAgentLoad
|
||||
JVM_RaiseSignal
|
||||
JVM_RawMonitorCreate
|
||||
JVM_RawMonitorDestroy
|
||||
JVM_RawMonitorEnter
|
||||
JVM_RawMonitorExit
|
||||
JVM_ReferenceClear
|
||||
JVM_ReferenceRefersTo
|
||||
JVM_RegisterContinuationMethods
|
||||
JVM_RegisterLambdaProxyClassForArchiving
|
||||
JVM_RegisterSignal
|
||||
JVM_ReleaseUTF
|
||||
JVM_ReportFinalizationComplete
|
||||
JVM_SetArrayElement
|
||||
JVM_SetClassSigners
|
||||
JVM_SetNativeThreadName
|
||||
JVM_SetPrimitiveArrayElement
|
||||
JVM_SetStackWalkContinuation
|
||||
JVM_SetThreadPriority
|
||||
JVM_SleepNanos
|
||||
JVM_StartThread
|
||||
JVM_TotalMemory
|
||||
JVM_UnloadLibrary
|
||||
JVM_WaitForReferencePendingList
|
||||
JVM_Yield
|
||||
|
||||
# Module related API's
|
||||
JVM_AddModuleExports
|
||||
JVM_AddModuleExportsToAll
|
||||
JVM_AddModuleExportsToAllUnnamed
|
||||
JVM_AddReadsModule
|
||||
JVM_DefineArchivedModules
|
||||
JVM_DefineModule
|
||||
JVM_SetBootLoaderUnnamedModule
|
||||
|
||||
# Virtual thread notifications for JVMTI
|
||||
JVM_VirtualThreadStart
|
||||
JVM_VirtualThreadEnd
|
||||
JVM_VirtualThreadMount
|
||||
JVM_VirtualThreadUnmount
|
||||
JVM_VirtualThreadHideFrames
|
||||
|
||||
# Scoped values
|
||||
JVM_EnsureMaterializedForStackWalk_func
|
||||
JVM_FindScopedValueBindings
|
||||
JVM_ScopedValueCache
|
||||
JVM_SetScopedValueCache
|
||||
#
|
||||
11
make/data/hotspot-symbols/version-script.txt
Normal file
11
make/data/hotspot-symbols/version-script.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
*;
|
||||
|
||||
local:
|
||||
__bss_start;
|
||||
_edata;
|
||||
_end;
|
||||
_fini;
|
||||
_init;
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2024, 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
|
||||
@@ -548,6 +548,7 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
|
||||
$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--with-debug-prefix-map=$(OUTPUT_ROOT)=devkit \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-shared \
|
||||
--disable-nls \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -26,38 +26,106 @@
|
||||
# Create a bundle in the current directory, containing what's needed to run
|
||||
# the 'dot' program from the graphviz suite by the OpenJDK build.
|
||||
|
||||
TMPDIR=`mktemp -d -t graphvizbundle-XXXX`
|
||||
trap "rm -rf \"$TMPDIR\"" EXIT
|
||||
set -eux
|
||||
|
||||
ORIG_DIR=`pwd`
|
||||
cd "$TMPDIR"
|
||||
GRAPHVIZ_VERSION=2.38.0-1
|
||||
PACKAGE_VERSION=1.1
|
||||
TARGET_PLATFORM=linux_x64
|
||||
BUNDLE_NAME=graphviz-$TARGET_PLATFORM-$GRAPHVIZ_VERSION+$PACKAGE_VERSION.tar.gz
|
||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-libs-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-plugins-core-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-plugins-x-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
||||
wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm
|
||||
mydir="$(cd -- $(dirname ${BASH_SOURCE[0]}) && pwd)"
|
||||
me="${mydir}/$(basename ${BASH_SOURCE[0]})"
|
||||
|
||||
mkdir graphviz
|
||||
cd graphviz
|
||||
for rpm in ../*.rpm; do
|
||||
rpm2cpio $rpm | cpio --extract --make-directories
|
||||
done
|
||||
EXPAT_VERSION="2.6.0"
|
||||
EXPAT_URL="https://github.com/libexpat/libexpat/releases/download/R_${EXPAT_VERSION//./_}/expat-${EXPAT_VERSION}.tar.gz"
|
||||
EXPAT_SHA256="a13447b9aa67d7c860783fdf6820f33ebdea996900d6d8bbc50a628f55f099f7"
|
||||
|
||||
cat > dot << EOF
|
||||
GRAPHVIZ_VERSION="9.0.0"
|
||||
GRAPHVIZ_URL="https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.xz"
|
||||
GRAPHVIZ_SHA256="6c9afda06a732af7658c2619ee713d2545818c3ff19b7b8fd48effcd06d57bf6"
|
||||
|
||||
uname_s="$(uname -s)"
|
||||
case ${uname_s} in
|
||||
Linux)
|
||||
bundle_os="linux"
|
||||
shacmd="sha256sum --strict --check -"
|
||||
lib_path_var="LD_LIBRARY_PATH"
|
||||
;;
|
||||
Darwin)
|
||||
bundle_os="macosx"
|
||||
shacmd="shasum -a 256 --strict --check -"
|
||||
lib_path_var="DYLD_LIBRARY_PATH"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown OS: ${uname_s}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
uname_m="$(uname -m)"
|
||||
case ${uname_m} in
|
||||
aarch64|arm64)
|
||||
bundle_cpu="aarch64"
|
||||
;;
|
||||
x86_64)
|
||||
bundle_cpu="x64"
|
||||
;;
|
||||
esac
|
||||
bundle_platform="${bundle_os}_${bundle_cpu}"
|
||||
|
||||
build_dir="${mydir}/../../build/graphviz"
|
||||
download_dir="${build_dir}/download"
|
||||
install_dir="${build_dir}/result/graphviz-${bundle_platform}-${GRAPHVIZ_VERSION}"
|
||||
bundle_file="${install_dir}.tar.gz"
|
||||
|
||||
expat_dir="${build_dir}/expat"
|
||||
expat_src_dir="${expat_dir}/src"
|
||||
|
||||
graphviz_dir="${build_dir}/graphviz"
|
||||
graphviz_src_dir="${graphviz_dir}/src"
|
||||
graphviz_doc_dir="${install_dir}/doc"
|
||||
|
||||
mkdir -p "${build_dir}"
|
||||
cd "${build_dir}"
|
||||
|
||||
download_and_unpack() {
|
||||
local url="$1"
|
||||
local sha256="$2"
|
||||
local file="$3"
|
||||
local dir="$4"
|
||||
|
||||
mkdir -p "$(dirname "${file}")"
|
||||
if [ ! -f "${file}" ]; then
|
||||
curl -L -o "${file}" "${url}"
|
||||
fi
|
||||
echo "${sha256} ${file}" | ${shacmd}
|
||||
if [ ! -d "${dir}" ]; then
|
||||
mkdir -p "${dir}"
|
||||
tar --extract --file "${file}" --directory "${dir}" --strip-components 1
|
||||
fi
|
||||
}
|
||||
|
||||
download_and_unpack "${EXPAT_URL}" "${EXPAT_SHA256}" "${download_dir}/expat.tar.gz" "${expat_src_dir}"
|
||||
download_and_unpack "${GRAPHVIZ_URL}" "${GRAPHVIZ_SHA256}" "${download_dir}/graphviz.tar.gz" "${graphviz_src_dir}"
|
||||
|
||||
(
|
||||
cd "${expat_src_dir}"
|
||||
./configure --prefix="${install_dir}"
|
||||
make -j install
|
||||
)
|
||||
|
||||
(
|
||||
cd "${graphviz_src_dir}"
|
||||
./configure --prefix="${install_dir}" EXPAT_CFLAGS="-I${install_dir}/include" EXPAT_LIBS="-L${install_dir}/lib -lexpat"
|
||||
make -j install
|
||||
)
|
||||
|
||||
cat > "${install_dir}/dot" << EOF
|
||||
#!/bin/bash
|
||||
# Get an absolute path to this script
|
||||
this_script_dir=\`dirname \$0\`
|
||||
this_script_dir=\`cd \$this_script_dir > /dev/null && pwd\`
|
||||
export LD_LIBRARY_PATH="\$this_script_dir/usr/lib64:\$LD_LIBRARY_PATH"
|
||||
exec \$this_script_dir/usr/bin/dot "\$@"
|
||||
this_script_dir="\$(dirname \$0)"
|
||||
this_script_dir="\$(cd \${this_script_dir} > /dev/null && pwd)"
|
||||
export ${lib_path_var}="\${this_script_dir}/lib:\${this_script_dir}/lib/graphviz"
|
||||
exec "\${this_script_dir}/bin/dot" "\$@"
|
||||
EOF
|
||||
chmod +x dot
|
||||
export LD_LIBRARY_PATH="$TMPDIR/graphviz/usr/lib64:$LD_LIBRARY_PATH"
|
||||
chmod +x "${install_dir}/dot"
|
||||
# create config file
|
||||
./dot -c
|
||||
tar -cvzf ../$BUNDLE_NAME *
|
||||
cp ../$BUNDLE_NAME "$ORIG_DIR"
|
||||
"${install_dir}/dot" -c
|
||||
|
||||
cp "${me}" "${install_dir}"
|
||||
|
||||
tar --create --gzip --file "${bundle_file}" -C "${install_dir}" .
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2024, 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
|
||||
@@ -45,13 +45,12 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
|
||||
endif
|
||||
else ifeq ($(call isBuildOs, windows), true)
|
||||
ADLC_LDFLAGS += -nologo
|
||||
ADLC_CFLAGS := -nologo -EHsc
|
||||
ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
|
||||
endif
|
||||
|
||||
# Set the C++ standard
|
||||
ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAG)
|
||||
ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAGS)
|
||||
|
||||
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
|
||||
# hurt.
|
||||
@@ -72,7 +71,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
|
||||
NAME := adlc, \
|
||||
TYPE := EXECUTABLE, \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
|
||||
TARGET_TYPE := BUILD, \
|
||||
LINK_TYPE := C++, \
|
||||
SRC := $(TOPDIR)/src/hotspot/share/adlc, \
|
||||
EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
|
||||
CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2024, 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
|
||||
@@ -50,7 +50,7 @@ endif
|
||||
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
|
||||
NAME := gtest, \
|
||||
TYPE := STATIC_LIBRARY, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/libgtest, \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/libgtest/objs, \
|
||||
SRC := \
|
||||
@@ -75,25 +75,11 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
|
||||
TARGETS += $(BUILD_GTEST_LIBGTEST)
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
GTEST_JVM_MAPFILE := $(JVM_MAPFILE)
|
||||
else
|
||||
GTEST_JVM_MAPFILE := $(JVM_OUTPUTDIR)/gtest/mapfile
|
||||
|
||||
$(JVM_OUTPUTDIR)/gtest/symbols: $(JVM_OUTPUTDIR)/symbols
|
||||
$(call MakeDir, $(@D))
|
||||
( $(CAT) $< ; echo "runUnitTests" ) > $@
|
||||
|
||||
$(GTEST_JVM_MAPFILE): $(JVM_OUTPUTDIR)/gtest/symbols
|
||||
$(call create-mapfile)
|
||||
endif
|
||||
|
||||
# Additional disabled warnings are due to code in the test source.
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
||||
NAME := jvm, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
|
||||
SRC := $(GTEST_TEST_SRC), \
|
||||
@@ -123,8 +109,6 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
||||
LIBS_unix := -lgtest, \
|
||||
LIBS_windows := $(JVM_OUTPUTDIR)/libgtest/gtest.lib, \
|
||||
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
||||
MAPFILE := $(GTEST_JVM_MAPFILE), \
|
||||
USE_MAPFILE_FOR_SYMBOLS := true, \
|
||||
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS := false, \
|
||||
STRIP_SYMBOLS := false, \
|
||||
@@ -134,14 +118,19 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
||||
|
||||
$(BUILD_GTEST_LIBJVM) : $(BUILD_GTEST_LIBGTEST)
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$(BUILD_GTEST_LIBJVM_TARGET): $(WIN_EXPORT_FILE)
|
||||
endif
|
||||
|
||||
|
||||
TARGETS += $(BUILD_GTEST_LIBJVM)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
NAME := gtestLauncher, \
|
||||
TYPE := EXECUTABLE, \
|
||||
LINK_TYPE := C++, \
|
||||
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
|
||||
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2024, 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
|
||||
@@ -33,7 +33,6 @@ include lib/JvmFlags.gmk
|
||||
# Setup compilation of the main Hotspot native library (libjvm).
|
||||
|
||||
JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
|
||||
JVM_MAPFILE := $(JVM_OUTPUTDIR)/mapfile
|
||||
|
||||
################################################################################
|
||||
# Platform independent setup
|
||||
@@ -85,7 +84,7 @@ CFLAGS_VM_VERSION := \
|
||||
|
||||
DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
|
||||
empty-body implicit-fallthrough int-in-bool-context \
|
||||
maybe-uninitialized missing-field-initializers parentheses \
|
||||
maybe-uninitialized missing-field-initializers \
|
||||
shift-negative-value unknown-pragmas
|
||||
|
||||
DISABLED_WARNINGS_clang := sometimes-uninitialized \
|
||||
@@ -146,12 +145,28 @@ $(call FillFindCache, $(JVM_SRC_DIRS))
|
||||
# operator new.
|
||||
LIBJVM_STATIC_EXCLUDE_OBJS := operator_new.o
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(STATIC_LIBS), true)
|
||||
WIN_EXPORT_FILE := $(JVM_OUTPUTDIR)/static-win-exports.def
|
||||
else
|
||||
WIN_EXPORT_FILE := $(JVM_OUTPUTDIR)/win-exports.def
|
||||
endif
|
||||
|
||||
JVM_LDFLAGS += -def:$(WIN_EXPORT_FILE)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script.txt
|
||||
|
||||
JVM_LDFLAGS += -Wl,--exclude-libs,ALL -Wl,-version-script=$(HOTSPOT_VERSION_SCRIPT)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Now set up the actual compilation of the main hotspot native library
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||
NAME := jvm, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
|
||||
SRC := $(JVM_SRC_DIRS), \
|
||||
EXCLUDES := $(JVM_EXCLUDES), \
|
||||
@@ -169,6 +184,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||
DISABLED_WARNINGS_gcc_jvmciCodeInstaller.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_jvmtiTagMap.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
|
||||
DISABLED_WARNINGS_gcc_shenandoahLock.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
|
||||
@@ -194,8 +210,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||
LIBS := $(JVM_LIBS), \
|
||||
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
|
||||
MAPFILE := $(JVM_MAPFILE), \
|
||||
USE_MAPFILE_FOR_SYMBOLS := true, \
|
||||
STRIPFLAGS := $(JVM_STRIPFLAGS), \
|
||||
EMBED_MANIFEST := true, \
|
||||
RC_FILEDESC := $(HOTSPOT_VM_DISTRO) $(OPENJDK_TARGET_CPU_BITS)-Bit $(JVM_VARIANT) VM, \
|
||||
@@ -204,11 +218,47 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||
STATIC_LIB_EXCLUDE_OBJS := $(LIBJVM_STATIC_EXCLUDE_OBJS), \
|
||||
))
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# The following lines create a list of vftable symbols to be filtered out of
|
||||
# the symbol file. Removing this line causes the linker to complain about too
|
||||
# many (> 64K) symbols, so the _guess_ is that this line is here to keep down
|
||||
# the number of exported symbols below that limit.
|
||||
#
|
||||
# Some usages of C++ lambdas require the vftable symbol of classes that use
|
||||
# the lambda type as a template parameter. The usage of those classes won't
|
||||
# link if their vftable symbols are removed. That's why there's an exception
|
||||
# for vftable symbols containing the string 'lambda'.
|
||||
#
|
||||
# A very simple example of a lambda usage that fails if the lambda vftable
|
||||
# symbols are missing in the symbol file:
|
||||
#
|
||||
# #include <functional>
|
||||
# std::function<void()> f = [](){}
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$7 ~ /\?\?_7.*@@6B@/ && $$7 !~ /type_info/ && $$7 !~ /lambda/) print " " $$7; \
|
||||
}'
|
||||
|
||||
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of
|
||||
# cd && *.obj, but this will result in very long command lines, which could be
|
||||
# problematic.
|
||||
$(WIN_EXPORT_FILE): $(BUILD_LIBJVM_ALL_OBJS)
|
||||
$(call LogInfo, Generating list of symbols to export from object files)
|
||||
$(call MakeDir, $(@D))
|
||||
$(ECHO) "EXPORTS" > $@.tmp
|
||||
$(CD) $(BUILD_LIBJVM_OBJECT_DIR) && \
|
||||
$(DUMPBIN) -symbols *$(OBJ_SUFFIX) | $(AWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u >> $@.tmp
|
||||
$(RM) $@
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
$(BUILD_LIBJVM_TARGET): $(WIN_EXPORT_FILE)
|
||||
endif
|
||||
|
||||
# Always recompile abstract_vm_version.cpp if libjvm needs to be relinked. This ensures
|
||||
# that the internal vm version is updated as it relies on __DATE__ and __TIME__
|
||||
# macros.
|
||||
ABSTRACT_VM_VERSION_OBJ := $(JVM_OUTPUTDIR)/objs/abstract_vm_version$(OBJ_SUFFIX)
|
||||
$(ABSTRACT_VM_VERSION_OBJ): $(filter-out $(ABSTRACT_VM_VERSION_OBJ) $(JVM_MAPFILE), \
|
||||
$(ABSTRACT_VM_VERSION_OBJ): $(filter-out $(ABSTRACT_VM_VERSION_OBJ), \
|
||||
$(BUILD_LIBJVM_TARGET_DEPS))
|
||||
|
||||
ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||
@@ -236,11 +286,6 @@ endif
|
||||
# 1540-1090 : (I) The destructor of "..." might not be called.
|
||||
# 1540-1639 : (I) The behavior of long type bit fields has changed ...
|
||||
|
||||
# Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
|
||||
# defined after the above call to BUILD_LIBJVM. Mapfile will be generated
|
||||
# after all object files are built, but before the jvm library is linked.
|
||||
include lib/JvmMapfile.gmk
|
||||
|
||||
TARGETS += $(BUILD_LIBJVM)
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2013, 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.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot/lib/JvmMapfile.gmk))
|
||||
|
||||
################################################################################
|
||||
# Combine a list of static symbols
|
||||
|
||||
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86_64)), false)
|
||||
# On Windows x86_64, we should not have any symbols at all, since that
|
||||
# results in duplicate warnings from the linker (JDK-8043491).
|
||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-shared
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOsType, unix), true)
|
||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-unix
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)), )
|
||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring debug, $(DEBUG_LEVEL)), )
|
||||
ifneq ($(wildcard $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)-debug), )
|
||||
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-$(OPENJDK_TARGET_OS)-debug
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Create a dynamic list of symbols from the built object files. This is highly
|
||||
# platform dependent.
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) --defined-only *$(OBJ_SUFFIX)
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM|^UseSharedSpaces$$
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^_ZN9Arguments17SharedArchivePathE$$
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
}'
|
||||
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
# nm on macosx prints out "warning: nm: no name list" to stderr for
|
||||
# files without symbols. Hide this, even at the expense of hiding real errors.
|
||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) -Uj *$(OBJ_SUFFIX) 2> /dev/null
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
}'
|
||||
|
||||
# NOTE: The script is from the old build. It is broken and finds no symbols.
|
||||
# The script below might be what was intended, but it fails to link with tons
|
||||
# of 'cannot export hidden symbol vtable for X'.
|
||||
# '{ if ($$1 ~ /^__ZTV/ || $$1 ~ /^_gHotSpotVM/) print substr($$1, 2) }'
|
||||
else ifeq ($(call isTargetOs, aix), true)
|
||||
# NOTE: The old build had the solution below. This should to be fixed in
|
||||
# configure instead.
|
||||
|
||||
# On AIX we have to prevent that we pick up the 'nm' version from the GNU binutils
|
||||
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
|
||||
# NM=/usr/bin/nm
|
||||
|
||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) -B -C *$(OBJ_SUFFIX)
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
|
||||
if ($$3 ~ /^UseSharedSpaces$$/) print $$3; \
|
||||
if ($$3 ~ /^SharedArchivePath__9Arguments$$/) print $$3; \
|
||||
}'
|
||||
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *$(OBJ_SUFFIX)
|
||||
|
||||
# The following lines create a list of vftable symbols to be filtered out of
|
||||
# the mapfile. Removing this line causes the linker to complain about too many
|
||||
# (> 64K) symbols, so the _guess_ is that this line is here to keep down the
|
||||
# number of exported symbols below that limit.
|
||||
#
|
||||
# Some usages of C++ lambdas require the vftable symbol of classes that use
|
||||
# the lambda type as a template parameter. The usage of those classes won't
|
||||
# link if their vftable symbols are removed. That's why there's an exception
|
||||
# for vftable symbols containing the string 'lambda'.
|
||||
#
|
||||
# A very simple example of a lambda usage that fails if the lambda vftable
|
||||
# symbols are missing in the mapfile:
|
||||
#
|
||||
# #include <functional>
|
||||
# std::function<void()> f = [](){}
|
||||
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$7 ~ /\?\?_7.*@@6B@/ && $$7 !~ /type_info/ && $$7 !~ /lambda/) print $$7; \
|
||||
}'
|
||||
|
||||
else
|
||||
$(error Unknown target OS $(OPENJDK_TARGET_OS) in JvmMapfile.gmk)
|
||||
endif
|
||||
|
||||
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of
|
||||
# cd && *.o, but this will result in very long command lines, which is
|
||||
# problematic on some platforms.
|
||||
$(JVM_OUTPUTDIR)/symbols-objects: $(BUILD_LIBJVM_ALL_OBJS)
|
||||
$(call LogInfo, Generating symbol list from object files)
|
||||
$(CD) $(JVM_OUTPUTDIR)/objs && \
|
||||
$(DUMP_SYMBOLS_CMD) | $(AWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u > $@
|
||||
|
||||
SYMBOLS_SRC += $(JVM_OUTPUTDIR)/symbols-objects
|
||||
|
||||
################################################################################
|
||||
# Now concatenate all symbol lists into a single file and remove comments.
|
||||
|
||||
$(JVM_OUTPUTDIR)/symbols: $(SYMBOLS_SRC)
|
||||
$(SED) -e '/^#/d' $^ > $@
|
||||
|
||||
################################################################################
|
||||
# Finally convert the symbol list into a platform-specific mapfile
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
# On macosx, we need to add a leading underscore
|
||||
define create-mapfile-work
|
||||
$(AWK) '{ if ($$0 ~ ".") { print " _" $$0 } }' < $^ > $@.tmp
|
||||
endef
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
# On windows, add an 'EXPORTS' header
|
||||
define create-mapfile-work
|
||||
$(ECHO) "EXPORTS" > $@.tmp
|
||||
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 } }' < $^ >> $@.tmp
|
||||
endef
|
||||
else
|
||||
# Assume standard linker script
|
||||
define create-mapfile-work
|
||||
$(PRINTF) "SUNWprivate_1.1 { \n global: \n" > $@.tmp
|
||||
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 ";" } }' < $^ >> $@.tmp
|
||||
$(PRINTF) " local: \n *; \n }; \n" >> $@.tmp
|
||||
endef
|
||||
endif
|
||||
|
||||
define create-mapfile
|
||||
$(call LogInfo, Creating mapfile)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call create-mapfile-work)
|
||||
$(RM) $@
|
||||
$(MV) $@.tmp $@
|
||||
endef
|
||||
|
||||
$(JVM_MAPFILE): $(JVM_OUTPUTDIR)/symbols
|
||||
$(call create-mapfile)
|
||||
@@ -48,9 +48,6 @@ ifneq ($(FDLIBM_CFLAGS), )
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
|
||||
BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
|
||||
|
||||
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
|
||||
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2024, 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
|
||||
@@ -35,6 +35,7 @@ import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.net.InetAddress;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
@@ -132,6 +133,8 @@ public class HelloClasslist {
|
||||
String oldDate = String.format("%s%n",
|
||||
DateFormat.getDateInstance(DateFormat.DEFAULT, Locale.ROOT)
|
||||
.format(new Date()));
|
||||
StandardCharsets.US_ASCII.encode("");
|
||||
StandardCharsets.UTF_8.encode("");
|
||||
|
||||
// A selection of trivial and common reflection operations
|
||||
var instance = HelloClasslist.class.getConstructor().newInstance();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2024, 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
|
||||
@@ -1289,25 +1289,58 @@ public class CLDRConverter {
|
||||
*/
|
||||
private static void generateTZDBShortNamesMap() throws IOException {
|
||||
Files.walk(Path.of(tzDataDir), 1, FileVisitOption.FOLLOW_LINKS)
|
||||
.filter(p -> p.toFile().isFile())
|
||||
.filter(p -> p.toFile().isFile() && !p.endsWith("jdk11_backward"))
|
||||
.forEach(p -> {
|
||||
try {
|
||||
String zone = null;
|
||||
String rule = null;
|
||||
String format = null;
|
||||
boolean inVanguard = false;
|
||||
boolean inRearguard = false;
|
||||
for (var line : Files.readAllLines(p)) {
|
||||
if (line.contains("#STDOFF")) continue;
|
||||
// Interpret the line in rearguard mode so that STD/DST
|
||||
// correctly handles negative DST cases, such as "GMT/IST"
|
||||
// vs. "IST/GMT" case for Europe/Dublin
|
||||
if (inVanguard) {
|
||||
if (line.startsWith("# Rearguard")) {
|
||||
inVanguard = false;
|
||||
inRearguard = true;
|
||||
}
|
||||
continue;
|
||||
} else if (line.startsWith("# Vanguard")) {
|
||||
inVanguard = true;
|
||||
continue;
|
||||
}
|
||||
if (inRearguard) {
|
||||
if (line.startsWith("# End of rearguard")) {
|
||||
inRearguard = false;
|
||||
continue;
|
||||
} else {
|
||||
if (line.startsWith("#\t")) {
|
||||
line = line.substring(1); // omit #
|
||||
}
|
||||
}
|
||||
}
|
||||
if (line.isBlank() || line.matches("^[ \t]*#.*")) {
|
||||
// ignore blank/comment lines
|
||||
continue;
|
||||
}
|
||||
// remove comments in-line
|
||||
line = line.replaceAll("[ \t]*#.*", "");
|
||||
|
||||
// Zone line
|
||||
if (line.startsWith("Zone")) {
|
||||
if (zone != null) {
|
||||
tzdbShortNamesMap.put(zone, format + NBSP + rule);
|
||||
}
|
||||
var zl = line.split("[ \t]+", -1);
|
||||
zone = zl[1];
|
||||
rule = zl[3];
|
||||
format = zl[4];
|
||||
} else {
|
||||
if (zone != null) {
|
||||
if (line.isBlank()) {
|
||||
if (line.startsWith("Rule") ||
|
||||
line.startsWith("Link")) {
|
||||
tzdbShortNamesMap.put(zone, format + NBSP + rule);
|
||||
zone = null;
|
||||
rule = null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 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
|
||||
@@ -32,6 +32,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
@@ -339,9 +340,15 @@ public class GenerateCurrencyData {
|
||||
validCurrencyCodes.substring(i * 7 + 3, i * 7 + 6));
|
||||
checkCurrencyCode(currencyCode);
|
||||
int tableEntry = mainTable[(currencyCode.charAt(0) - 'A') * A_TO_Z + (currencyCode.charAt(1) - 'A')];
|
||||
if (tableEntry == INVALID_COUNTRY_ENTRY ||
|
||||
(tableEntry & SPECIAL_CASE_COUNTRY_MASK) != 0 ||
|
||||
(tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) != (currencyCode.charAt(2) - 'A')) {
|
||||
|
||||
// Do not allow a future currency to be classified as an otherCurrency,
|
||||
// otherwise it will leak out into Currency:getAvailableCurrencies
|
||||
boolean futureCurrency = Arrays.asList(specialCaseNewCurrencies).contains(currencyCode);
|
||||
boolean simpleCurrency = (tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) == (currencyCode.charAt(2) - 'A');
|
||||
|
||||
// If neither a simple currency, or one defined in the future
|
||||
// then the current currency is applicable to be added to the otherTable
|
||||
if (!futureCurrency && !simpleCurrency) {
|
||||
if (otherCurrenciesCount == maxOtherCurrencies) {
|
||||
throw new RuntimeException("too many other currencies");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,7 +23,11 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
DISABLED_WARNINGS_java += this-escape restricted
|
||||
# The base module should be built with all warnings enabled. When a
|
||||
# new warning is added to javac, it can be temporarily added to the
|
||||
# disabled warnings list.
|
||||
#
|
||||
# DISABLED_WARNINGS_java +=
|
||||
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
@@ -37,7 +41,8 @@ EXCLUDE_FILES += \
|
||||
|
||||
EXCLUDES += java/lang/doc-files \
|
||||
java/lang/classfile/snippet-files \
|
||||
java/lang/classfile/components/snippet-files
|
||||
java/lang/classfile/components/snippet-files \
|
||||
java/lang/foreign/snippet-files
|
||||
|
||||
# Exclude BreakIterator classes that are just used in compile process to generate
|
||||
# data files and shouldn't go in the product
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -242,7 +242,7 @@ endif
|
||||
ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)+$(filter $(TOOLCHAIN_TYPE), gcc), true+true+true+gcc)
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIB_SIMD_SORT, \
|
||||
NAME := simdsort, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) -std=c++17, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -115,7 +115,7 @@ TARGETS += $(BUILD_LIBZIP)
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
|
||||
NAME := jimage, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,6 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# To the extent technically possible, this module should be built with
|
||||
# -Werror and all lint warnings enabled. In particular,
|
||||
# DISABLED_WARNINGS_java should not be augmented.
|
||||
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -51,13 +51,14 @@ ifeq ($(call isTargetOs, aix), false)
|
||||
-DUSE_PLATFORM_MIDI_IN=TRUE \
|
||||
#
|
||||
|
||||
LIBJSOUND_LINK_TYPE := C
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
LIBJSOUND_LINK_TYPE := C++
|
||||
endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \
|
||||
NAME := jsound, \
|
||||
TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
|
||||
LINK_TYPE := $(LIBJSOUND_LINK_TYPE), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBJSOUND_CFLAGS), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -449,7 +449,6 @@ else
|
||||
LIBFREETYPE_LIBS := -lfreetype
|
||||
endif
|
||||
|
||||
# gcc_ftobjs.c := maybe-uninitialized required for GCC 7 builds.
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \
|
||||
NAME := freetype, \
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
@@ -458,7 +457,6 @@ else
|
||||
EXTRA_HEADER_DIRS := $(BUILD_LIBFREETYPE_HEADER_DIRS), \
|
||||
DISABLED_WARNINGS_microsoft := 4267 4244 4996, \
|
||||
DISABLED_WARNINGS_gcc := dangling-pointer stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_ftobjs.c := maybe-uninitialized, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
))
|
||||
@@ -508,8 +506,10 @@ else
|
||||
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
|
||||
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
|
||||
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
|
||||
# calloc-transposed-args required for GCC 14 builds. (fixed upstream in Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
|
||||
expansion-to-defined dangling-reference maybe-uninitialized
|
||||
expansion-to-defined dangling-reference maybe-uninitialized \
|
||||
calloc-transposed-args
|
||||
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
|
||||
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244
|
||||
|
||||
@@ -562,9 +562,9 @@ LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
|
||||
# libawt_xawt). See JDK-8196516 for details.
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
||||
NAME := fontmanager, \
|
||||
LINK_TYPE := C++, \
|
||||
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
|
||||
AccelGlyphCache.c, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
|
||||
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -47,7 +47,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
|
||||
LDFLAGS_macosx := -L$(call FindLibDirForModule, java.base), \
|
||||
LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \
|
||||
LIBS := $(JDKLIB_LIBS), \
|
||||
LIBS_unix := -ljava -ljvm $(LIBZ_LIBS), \
|
||||
LIBS_unix := $(LIBZ_LIBS), \
|
||||
LIBS_linux := -ljli $(LIBDL), \
|
||||
LIBS_aix := -liconv -ljli_static $(LIBDL), \
|
||||
LIBS_macosx := -ljli -liconv -framework Cocoa -framework Security \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,6 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# To the extent technically possible, this module should be built with
|
||||
# -Werror and all lint warnings enabled. In particular,
|
||||
# DISABLED_WARNINGS_java should not be augmented.
|
||||
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*'
|
||||
JAVAC_FLAGS += -XDstringConcat=inline
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2024, 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
|
||||
@@ -27,10 +27,7 @@ include LibCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
SA_CFLAGS := -D_FILE_OFFSET_BITS=64
|
||||
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
SA_CFLAGS := -D_GNU_SOURCE -mno-omit-leaf-frame-pointer \
|
||||
-mstack-alignment=16 -fPIC
|
||||
LIBSA_EXTRA_SRC := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent
|
||||
@@ -48,16 +45,16 @@ else ifeq ($(call isTargetOs, windows), true)
|
||||
endif
|
||||
endif
|
||||
|
||||
SA_TOOLCHAIN := $(TOOLCHAIN_DEFAULT)
|
||||
SA_LINK_TYPE := C
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
SA_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
SA_LINK_TYPE := C++
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
|
||||
NAME := saproc, \
|
||||
TOOLCHAIN := $(SA_TOOLCHAIN), \
|
||||
LINK_TYPE := $(SA_LINK_TYPE), \
|
||||
OPTIMIZATION := HIGH, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
||||
DISABLED_WARNINGS_gcc_ps_core.c := pointer-arith, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2024, 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,7 +31,7 @@ ifeq ($(call isTargetOs, linux macosx windows), true)
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
|
||||
NAME := le, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,6 +23,8 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
DISABLED_WARNINGS_java += this-escape
|
||||
# To the extent technically possible, this module should be built with
|
||||
# -Werror and all lint warnings enabled. In particular,
|
||||
# DISABLED_WARNINGS_java should not be augmented.
|
||||
|
||||
COPY += .xml .css .svg .js .js.template .png .txt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2024, 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,13 +32,13 @@ include LauncherCommon.gmk
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
JPACKAGE_APPLAUNCHER_SRC := \
|
||||
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher)
|
||||
JPACKAGE_APPLAUNCHER_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
||||
JPACKAGE_APPLAUNCHER_LINK_TYPE := C
|
||||
JPACKAGE_APPLAUNCHER_INCLUDE_FILES := %.c
|
||||
else
|
||||
JPACKAGE_APPLAUNCHER_SRC := \
|
||||
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher) \
|
||||
$(call FindSrcDirsForComponent, jdk.jpackage, common)
|
||||
JPACKAGE_APPLAUNCHER_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
JPACKAGE_APPLAUNCHER_LINK_TYPE := C++
|
||||
endif
|
||||
|
||||
|
||||
@@ -59,11 +59,11 @@ JPACKAGE_APPLAUNCHER_INCLUDES := $(addprefix -I, $(JPACKAGE_APPLAUNCHER_SRC))
|
||||
# Output app launcher executable in resources dir, and symbols in the object dir
|
||||
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
|
||||
NAME := jpackageapplauncher, \
|
||||
LINK_TYPE := $(JPACKAGE_APPLAUNCHER_LINK_TYPE), \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
|
||||
SRC := $(JPACKAGE_APPLAUNCHER_SRC), \
|
||||
INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \
|
||||
TOOLCHAIN := $(JPACKAGE_APPLAUNCHER_TOOLCHAIN), \
|
||||
OPTIMIZATION := LOW, \
|
||||
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||
@@ -103,7 +103,7 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncheraux, \
|
||||
SRC := $(JPACKAGE_LIBAPPLAUNCHER_SRC), \
|
||||
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
LINK_TYPE := C++, \
|
||||
OPTIMIZATION := LOW, \
|
||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
|
||||
@@ -177,10 +177,10 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
# Build non-console version of launcher
|
||||
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \
|
||||
NAME := jpackageapplauncherw, \
|
||||
LINK_TYPE := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LINK_TYPE), \
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
|
||||
SRC := $(BUILD_JPACKAGE_APPLAUNCHEREXE_SRC), \
|
||||
TOOLCHAIN := $(BUILD_JPACKAGE_APPLAUNCHEREXE_TOOLCHAIN), \
|
||||
OPTIMIZATION := $(BUILD_JPACKAGE_APPLAUNCHEREXE_OPTIMIZATION), \
|
||||
CXXFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS), \
|
||||
CXXFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS_windows) -DJP_LAUNCHERW, \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2024, 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
|
||||
@@ -60,13 +60,15 @@ else
|
||||
STAT_PRINT_SIZE="-c %s"
|
||||
fi
|
||||
|
||||
COMPARE_EXCEPTIONS_INCLUDE="$TOPDIR/make/scripts/compare_exceptions.sh.incl"
|
||||
if [ ! -e "$COMPARE_EXCEPTIONS_INCLUDE" ]; then
|
||||
echo "Error: Cannot locate the exceptions file, it should have been here: $COMPARE_EXCEPTIONS_INCLUDE"
|
||||
exit 1
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
# We ship a pdb file inside a published zip. Such files can never be built
|
||||
# reproducibly, so ignore it.
|
||||
ACCEPTED_JARZIP_CONTENTS="/modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb"
|
||||
elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
# Due to signing, we can never get a byte-by-byte identical build on macOS
|
||||
STRIP_TESTS_BEFORE_COMPARE="true"
|
||||
fi
|
||||
# Include exception definitions
|
||||
. "$COMPARE_EXCEPTIONS_INCLUDE"
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@@ -117,35 +119,6 @@ diff_text() {
|
||||
|
||||
TMP=$($DIFF $THIS_FILE $OTHER_FILE)
|
||||
|
||||
if test "x$SUFFIX" = "xclass"; then
|
||||
if [ "$NAME" = "SystemModules\$all.class" ] \
|
||||
|| [ "$NAME" = "SystemModules\$default.class" ]; then
|
||||
# The SystemModules\$*.classes are not comparable as they contain the
|
||||
# module hashes which would require a whole other level of
|
||||
# reproducible builds to get reproducible. There is also random
|
||||
# order of map initialization.
|
||||
TMP=""
|
||||
elif [ "$NAME" = "module-info.class" ]; then
|
||||
# The module-info.class have several issues with random ordering of
|
||||
# elements in HashSets.
|
||||
MODULES_CLASS_FILTER="$SED \
|
||||
-e 's/,$//' \
|
||||
-e 's/;$//' \
|
||||
-e 's/^ *[0-9]*://' \
|
||||
-e 's/#[0-9]* */#/' \
|
||||
-e 's/ *\/\// \/\//' \
|
||||
-e 's/aload *[0-9]*/aload X/' \
|
||||
-e 's/ldc_w/ldc /' \
|
||||
| $SORT \
|
||||
"
|
||||
$JAVAP -c -constants -l -p "${OTHER_FILE}" \
|
||||
| eval "$MODULES_CLASS_FILTER" > ${OTHER_FILE}.javap &
|
||||
$JAVAP -c -constants -l -p "${THIS_FILE}" \
|
||||
| eval "$MODULES_CLASS_FILTER" > ${THIS_FILE}.javap &
|
||||
wait
|
||||
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$TMP"; then
|
||||
echo Files $OTHER_FILE and $THIS_FILE differ
|
||||
@@ -312,75 +285,60 @@ compare_file_types() {
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Compare the rest of the files
|
||||
# Find all files to compare and separate them into different categories
|
||||
|
||||
compare_general_files() {
|
||||
locate_files() {
|
||||
THIS_DIR=$1
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
TEMP_DIR=$COMPARE_ROOT/support
|
||||
$MKDIR -p $TEMP_DIR
|
||||
|
||||
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" \
|
||||
! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "modules" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
|
||||
! -name "*.lib" ! -name "*.jmod" ! -name "*.exe" \
|
||||
! -name "*.obj" ! -name "*.o" ! -name "jspawnhelper" ! -name "*.a" \
|
||||
! -name "*.tar.gz" ! -name "gtestLauncher" \
|
||||
! -name "*.map" \
|
||||
| $GREP -v "./bin/" | $SORT | $FILTER)
|
||||
ALL_FILES_PATH=$TEMP_DIR/all_files.txt
|
||||
cd $THIS_DIR && $FIND . -type f | $SORT | $FILTER > $ALL_FILES_PATH
|
||||
|
||||
echo Other files with binary differences...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
# Skip all files in test/*/native
|
||||
if [[ "$f" == */native/* ]]; then
|
||||
continue
|
||||
fi
|
||||
if [ -e $OTHER_DIR/$f ]; then
|
||||
SUFFIX="${f##*.}"
|
||||
if [ "$(basename $f)" = "release" ]; then
|
||||
# In release file, ignore differences in source rev numbers
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE)
|
||||
$MKDIR -p $(dirname $THIS_FILE)
|
||||
RELEASE_FILTER="$SED -e 's/SOURCE=".*"/SOURCE=<src-rev>/g'"
|
||||
$CAT $OTHER_DIR/$f | eval "$RELEASE_FILTER" > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | eval "$RELEASE_FILTER" > $THIS_FILE
|
||||
elif [ "$SUFFIX" = "svg" ]; then
|
||||
# GraphViz has non-determinism when generating svg files
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
|
||||
SVG_FILTER="$SED \
|
||||
-e 's/edge[0-9][0-9]*/edgeX/g'
|
||||
"
|
||||
$CAT $OTHER_DIR/$f | eval "$SVG_FILTER" > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | eval "$SVG_FILTER" > $THIS_FILE
|
||||
elif [ "$SUFFIX" = "jar_contents" ]; then
|
||||
# The jar_contents files may have some lines in random order
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
|
||||
$RM $OTHER_FILE $THIS_FILE
|
||||
$CAT $OTHER_DIR/$f | $SORT > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | $SORT > $THIS_FILE
|
||||
else
|
||||
OTHER_FILE=$OTHER_DIR/$f
|
||||
THIS_FILE=$THIS_DIR/$f
|
||||
fi
|
||||
DIFF_OUT=$($DIFF $OTHER_FILE $THIS_FILE 2>&1)
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
REGRESSIONS=true
|
||||
if [ "$SHOW_DIFFS" = "true" ]; then
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
ZIP_FILES_PATH=$TEMP_DIR/zip_files.txt
|
||||
ZIP_FILTER="-e '\.zip$' -e '\.tar.gz$'"
|
||||
$CAT "$ALL_FILES_PATH" | eval $GREP $ZIP_FILTER > $ZIP_FILES_PATH
|
||||
|
||||
JMOD_FILES_PATH=$TEMP_DIR/jmod_files.txt
|
||||
JMOD_FILTER="-e '\.jmod$'"
|
||||
$CAT "$ALL_FILES_PATH" | eval $GREP $JMOD_FILTER > $JMOD_FILES_PATH
|
||||
|
||||
JAR_FILES_PATH=$TEMP_DIR/jar_files.txt
|
||||
JAR_FILTER="-e '\.jar$' -e '\.war$' -e '/module$'"
|
||||
$CAT "$ALL_FILES_PATH" | eval $GREP $JAR_FILTER > $JAR_FILES_PATH
|
||||
|
||||
LIB_FILES_PATH=$TEMP_DIR/lib_files.txt
|
||||
LIB_FILTER="-e '\.dylib$' -e '/lib.*\.so$' -e '\.dll$' -e '\.obj$' -e '\.o$' -e '\.a$' -e '\.cpl$'"
|
||||
# On macos, filter out the dSYM debug symbols files. They are identically named .dylib files that reside
|
||||
# under a *.dSYM directory
|
||||
LIB_EXCLUDE="-e '/lib.*\.dSYM/'"
|
||||
$CAT "$ALL_FILES_PATH" | eval $GREP $LIB_FILTER | eval $GREP -v $LIB_EXCLUDE > $LIB_FILES_PATH
|
||||
|
||||
DEBUG_FILES_PATH=$TEMP_DIR/debug_files.txt
|
||||
DEBUG_FILTER="-e '\.dSYM/' -e '\.debuginfo$' -e '\.diz$' -e '\.pdb$' -e '\.map$'"
|
||||
$CAT "$ALL_FILES_PATH" | eval $GREP $DEBUG_FILTER > $DEBUG_FILES_PATH
|
||||
|
||||
EXEC_FILES_PATH=$TEMP_DIR/exec_files.txt
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
EXEC_FILTER="-e '\.exe$'"
|
||||
$CAT "$ALL_FILES_PATH" | eval $GREP $EXEC_FILTER > $EXEC_FILES_PATH
|
||||
else
|
||||
# Find all files with the executable bit set
|
||||
cd $THIS_DIR && $FIND . -type f -perm -100 | $SORT | $FILTER > $EXEC_FILES_PATH
|
||||
fi
|
||||
|
||||
OTHER_FILES_PATH=$TEMP_DIR/other_files.txt
|
||||
ACCOUNTED_FILES_PATH=$TEMP_DIR/accounted_files.txt
|
||||
$CAT $ZIP_FILES_PATH $JMOD_FILES_PATH $JAR_FILES_PATH $LIB_FILES_PATH $DEBUG_FILES_PATH $EXEC_FILES_PATH > $ACCOUNTED_FILES_PATH
|
||||
$CAT $ACCOUNTED_FILES_PATH $ALL_FILES_PATH | $SORT | $UNIQ -u > $OTHER_FILES_PATH
|
||||
|
||||
ALL_ZIP_FILES=$($CAT $ZIP_FILES_PATH)
|
||||
ALL_JMOD_FILES=$($CAT $JMOD_FILES_PATH)
|
||||
ALL_JAR_FILES=$($CAT $JAR_FILES_PATH)
|
||||
ALL_LIB_FILES=$($CAT $LIB_FILES_PATH)
|
||||
ALL_DEBUG_FILES=$($CAT $DEBUG_FILES_PATH)
|
||||
ALL_EXEC_FILES=$($CAT $EXEC_FILES_PATH)
|
||||
ALL_OTHER_FILES=$($CAT $OTHER_FILES_PATH)
|
||||
}
|
||||
|
||||
################################################################################
|
||||
@@ -450,12 +408,14 @@ compare_zip_file() {
|
||||
if [ -n "$ONLY_OTHER" ]; then
|
||||
echo " Only OTHER $ZIP_FILE contains:"
|
||||
echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR| |"g | sed 's|: |/|g'
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
|
||||
if [ -n "$ONLY_THIS" ]; then
|
||||
echo " Only THIS $ZIP_FILE contains:"
|
||||
echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR| |"g | sed 's|: |/|g'
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
|
||||
@@ -484,6 +444,7 @@ compare_zip_file() {
|
||||
done
|
||||
|
||||
if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
echo " Differing files in $ZIP_FILE"
|
||||
$CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP 'differ$' | cut -f 2 -d ' ' | \
|
||||
@@ -508,6 +469,7 @@ compare_zip_file() {
|
||||
compare_bin_file $THIS_UNZIPDIR $OTHER_UNZIPDIR $WORK_DIR/$ZIP_FILE.bin \
|
||||
$file
|
||||
if [ "$?" != "0" ]; then
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
done
|
||||
@@ -547,12 +509,14 @@ compare_jmod_file() {
|
||||
if [ -n "$ONLY_OTHER" ]; then
|
||||
echo " Only OTHER $JMOD_FILE contains:"
|
||||
echo "$ONLY_OTHER" | sed "s|^>| |"g | sed 's|: |/|g'
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
|
||||
if [ -n "$ONLY_THIS" ]; then
|
||||
echo " Only THIS $JMOD_FILE contains:"
|
||||
echo "$ONLY_THIS" | sed "s|^<| |"g | sed 's|: |/|g'
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
|
||||
@@ -567,19 +531,18 @@ compare_all_zip_files() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" -o -name "*.tar.gz" \
|
||||
| $SORT | $FILTER )
|
||||
locate_files $THIS_DIR
|
||||
|
||||
if [ -n "$ZIPS" ]; then
|
||||
if [ -n "$ALL_ZIP_FILES" ]; then
|
||||
echo Zip/tar.gz files...
|
||||
|
||||
return_value=0
|
||||
for f in $ZIPS; do
|
||||
for f in $ALL_ZIP_FILES; do
|
||||
if [ -f "$OTHER_DIR/$f" ]; then
|
||||
compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
|
||||
if [ "$?" != "0" ]; then
|
||||
return_value=1
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -596,18 +559,18 @@ compare_all_jmod_files() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
JMODS=$(cd $THIS_DIR && $FIND . -type f -name "*.jmod" | $SORT | $FILTER )
|
||||
locate_files $THIS_DIR
|
||||
|
||||
if [ -n "$JMODS" ]; then
|
||||
if [ -n "$ALL_JMOD_FILES" ]; then
|
||||
echo Jmod files...
|
||||
|
||||
return_value=0
|
||||
for f in $JMODS; do
|
||||
for f in $ALL_JMOD_FILES; do
|
||||
if [ -f "$OTHER_DIR/$f" ]; then
|
||||
compare_jmod_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
|
||||
if [ "$?" != "0" ]; then
|
||||
return_value=1
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -624,20 +587,18 @@ compare_all_jar_files() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
# TODO filter?
|
||||
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" -o -name "*.war" \
|
||||
-o -name "modules" | $SORT | $FILTER)
|
||||
locate_files $THIS_DIR
|
||||
|
||||
if [ -n "$ZIPS" ]; then
|
||||
if [ -n "$ALL_JAR_FILES" ]; then
|
||||
echo Jar files...
|
||||
|
||||
return_value=0
|
||||
for f in $ZIPS; do
|
||||
for f in $ALL_JAR_FILES; do
|
||||
if [ -f "$OTHER_DIR/$f" ]; then
|
||||
compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
|
||||
if [ "$?" != "0" ]; then
|
||||
return_value=1
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -699,14 +660,16 @@ compare_bin_file() {
|
||||
unset _NT_SYMBOL_PATH
|
||||
if [ "$(uname -o)" = "Cygwin" ]; then
|
||||
THIS=$(cygpath -msa $THIS)
|
||||
OTHER=$(cygpath -msa $OTHER)
|
||||
if [ -n "$OTHER" ]; then
|
||||
OTHER=$(cygpath -msa $OTHER)
|
||||
fi
|
||||
fi
|
||||
# Build an _NT_SYMBOL_PATH that contains all known locations for
|
||||
# pdb files.
|
||||
PDB_DIRS="$(ls -d \
|
||||
{$OTHER,$THIS}/support/modules_{cmds,libs}/{*,*/*} \
|
||||
{$OTHER,$THIS}/support/native/jdk.jpackage/* \
|
||||
)"
|
||||
2> /dev/null )"
|
||||
export _NT_SYMBOL_PATH="$(echo $PDB_DIRS | tr ' ' ';')"
|
||||
fi
|
||||
|
||||
@@ -1047,23 +1010,16 @@ compare_all_libs() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \
|
||||
-o -name '*.dll' -o -name '*.obj' -o -name '*.o' -o -name '*.a' \
|
||||
-o -name '*.cpl' \) | $SORT | $FILTER)
|
||||
locate_files $THIS_DIR
|
||||
|
||||
# On macos, filter out the dSYM debug symbols files as they are also
|
||||
# named *.dylib.
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
LIBS=$(echo "$LIBS" | $GREP -v '\.dSYM/')
|
||||
fi
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
if [ -n "$ALL_LIB_FILES" ]; then
|
||||
echo Libraries...
|
||||
print_binary_diff_header
|
||||
for l in $LIBS; do
|
||||
for l in $ALL_LIB_FILES; do
|
||||
if [ -f "$OTHER_DIR/$l" ]; then
|
||||
compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l
|
||||
if [ "$?" != "0" ]; then
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
fi
|
||||
@@ -1081,33 +1037,16 @@ compare_all_execs() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER)
|
||||
else
|
||||
EXECS=$(cd $THIS_DIR && $FIND . -name db -prune -o -type f -perm -100 \! \
|
||||
\( -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.cgi' \
|
||||
-o -name '*.jar' -o -name '*.diz' -o -name 'jcontrol' -o -name '*.properties' \
|
||||
-o -name '*.data' -o -name '*.bfc' -o -name '*.src' -o -name '*.txt' \
|
||||
-o -name '*.cfg' -o -name 'meta-index' -o -name '*.properties.ja' \
|
||||
-o -name '*.xml' -o -name '*.html' -o -name '*.png' -o -name 'README' \
|
||||
-o -name '*.zip' -o -name '*.jimage' -o -name '*.java' -o -name '*.mf' \
|
||||
-o -name '*.jpg' -o -name '*.wsdl' -o -name '*.js' -o -name '*.sh' \
|
||||
-o -name '*.bat' -o -name '*LICENSE' -o -name '*.d' -o -name '*store' \
|
||||
-o -name 'blocked' -o -name '*certs' -o -name '*.ttf' \
|
||||
-o -name '*.jfc' -o -name '*.dat' -o -name 'release' -o -name '*.dir'\
|
||||
-o -name '*.sym' -o -name '*.idl' -o -name '*.h' -o -name '*.access' \
|
||||
-o -name '*.template' -o -name '*.policy' -o -name '*.security' \
|
||||
-o -name 'COPYRIGHT' -o -name '*.1' -o -name '*.debuginfo' \
|
||||
-o -name 'classlist' \) | $SORT | $FILTER)
|
||||
fi
|
||||
locate_files $THIS_DIR
|
||||
|
||||
if [ -n "$EXECS" ]; then
|
||||
if [ -n "$ALL_EXEC_FILES" ]; then
|
||||
echo Executables...
|
||||
print_binary_diff_header
|
||||
for e in $EXECS; do
|
||||
for e in $ALL_EXEC_FILES; do
|
||||
if [ -f "$OTHER_DIR/$e" ]; then
|
||||
compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e
|
||||
if [ "$?" != "0" ]; then
|
||||
REGRESSIONS=true
|
||||
return_value=1
|
||||
fi
|
||||
fi
|
||||
@@ -1117,6 +1056,95 @@ compare_all_execs() {
|
||||
return $return_value
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Compare native debug symbol files
|
||||
|
||||
compare_all_debug_files() {
|
||||
THIS_DIR=$1
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
locate_files $THIS_DIR
|
||||
|
||||
echo Debug symbol files with binary differences...
|
||||
for f in $ALL_DEBUG_FILES
|
||||
do
|
||||
if [ -e $OTHER_DIR/$f ]; then
|
||||
SUFFIX="${f##*.}"
|
||||
if [ "$SUFFIX" = "pdb" ]; then
|
||||
# pdb files are never reproducible
|
||||
DIFF_OUT=""
|
||||
else
|
||||
OTHER_FILE=$OTHER_DIR/$f
|
||||
THIS_FILE=$THIS_DIR/$f
|
||||
DIFF_OUT=$($DIFF $OTHER_FILE $THIS_FILE 2>&1)
|
||||
fi
|
||||
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
REGRESSIONS=true
|
||||
if [ "$SHOW_DIFFS" = "true" ]; then
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Compare the rest of the files
|
||||
|
||||
compare_all_other_files() {
|
||||
THIS_DIR=$1
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
locate_files $THIS_DIR
|
||||
|
||||
echo Other files with binary differences...
|
||||
for f in $ALL_OTHER_FILES
|
||||
do
|
||||
# Skip all files in test/*/native
|
||||
if [[ "$f" == */native/* ]]; then
|
||||
continue
|
||||
fi
|
||||
if [ -e $OTHER_DIR/$f ]; then
|
||||
SUFFIX="${f##*.}"
|
||||
if [ "$(basename $f)" = "release" ]; then
|
||||
# In release file, ignore differences in source rev numbers
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE)
|
||||
$MKDIR -p $(dirname $THIS_FILE)
|
||||
RELEASE_FILTER="$SED -e 's/SOURCE=".*"/SOURCE=<src-rev>/g'"
|
||||
$CAT $OTHER_DIR/$f | eval "$RELEASE_FILTER" > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | eval "$RELEASE_FILTER" > $THIS_FILE
|
||||
elif [ "$SUFFIX" = "jar_contents" ]; then
|
||||
# The jar_contents files are generated by the build and may have
|
||||
# some lines in random order. They are only included for demos,
|
||||
# which they shouldn't really...
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
|
||||
$RM $OTHER_FILE $THIS_FILE
|
||||
$CAT $OTHER_DIR/$f | $SORT > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | $SORT > $THIS_FILE
|
||||
else
|
||||
OTHER_FILE=$OTHER_DIR/$f
|
||||
THIS_FILE=$THIS_DIR/$f
|
||||
fi
|
||||
DIFF_OUT=$($DIFF $OTHER_FILE $THIS_FILE 2>&1)
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
REGRESSIONS=true
|
||||
if [ "$SHOW_DIFFS" = "true" ]; then
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Initiate configuration
|
||||
|
||||
@@ -1515,22 +1543,31 @@ fi
|
||||
if [ "$CMP_GENERAL" = "true" ]; then
|
||||
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
|
||||
echo -n "JDK "
|
||||
compare_general_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
compare_all_other_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
echo -n "JDK "
|
||||
compare_all_debug_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
fi
|
||||
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then
|
||||
echo -n "JDK Bundle "
|
||||
compare_general_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
|
||||
compare_all_other_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
|
||||
echo -n "JDK Bundle "
|
||||
compare_all_debug_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
|
||||
echo -n "Docs "
|
||||
compare_general_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
compare_all_other_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
echo -n "Docs "
|
||||
compare_all_debug_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
compare_general_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
compare_all_other_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
echo -n "Test "
|
||||
compare_all_debug_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
compare_all_other_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
compare_all_debug_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 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.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script is not to be run as stand-alone, it should be included from
|
||||
# compare.sh.
|
||||
|
||||
##########################################################################################
|
||||
# Check that we are run via inclusion from compare.sh and not as stand-alone.
|
||||
if [ -z "$COMPARE_EXCEPTIONS_INCLUDE" ]; then
|
||||
echo "Error: This script should not be run as stand-alone. It is included by compare.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Diff exceptions
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
|
||||
if [ "$USE_PRECOMPILED_HEADER" = "true" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
fi
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
SKIP_BIN_DIFF="true"
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
ACCEPTED_JARZIP_CONTENTS="
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.dll.map
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.dll
|
||||
"
|
||||
elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/libawt_lwawt.dylib
|
||||
./lib/libosxapp.dylib
|
||||
./lib/libosxui.dylib
|
||||
./lib/server/libjvm.dylib
|
||||
./hotspot/gtest/server/libjvm.dylib
|
||||
"
|
||||
STRIP_TESTS_BEFORE_COMPARE="true"
|
||||
fi
|
||||
|
||||
@@ -107,6 +107,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
|
||||
--add-exports java.base/sun.invoke.util=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED \
|
||||
--enable-preview \
|
||||
-XDsuppressNotes \
|
||||
-processor org.openjdk.jmh.generators.BenchmarkProcessor, \
|
||||
JAVA_FLAGS := \
|
||||
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, 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
|
||||
@@ -45,6 +45,10 @@ BUILD_LIBTEST_OUTPUT_DIR := $(OUTPUTDIR)/support/test/lib/native
|
||||
|
||||
BUILD_LIBTEST_IMAGE_DIR := $(TEST_IMAGE_DIR)/lib
|
||||
|
||||
ifeq ($(call isTargetOs, windows), false)
|
||||
BUILD_LIBTEST_LIBRARIES_EXCLUDE += libFileUtils.c
|
||||
endif
|
||||
|
||||
# This evaluation is expensive and should only be done if this target was
|
||||
# explicitly called.
|
||||
ifneq ($(filter build-test-lib-native, $(MAKECMDGOALS)), )
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2024, 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
|
||||
@@ -857,6 +857,11 @@ else
|
||||
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, aarch64)), false)
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libTestSVEWithJNI.c
|
||||
endif
|
||||
|
||||
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
@@ -29,6 +29,23 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
|
||||
ifndef SOURCE
|
||||
export SOURCE := 7
|
||||
endif
|
||||
ifndef TARGET
|
||||
export TARGET := 7
|
||||
endif
|
||||
ifndef JAVAC
|
||||
export JAVAC := javac
|
||||
endif
|
||||
ifndef JAVA
|
||||
export JAVA := java
|
||||
endif
|
||||
ifndef JAR
|
||||
export JAR := jar
|
||||
endif
|
||||
|
||||
SOURCEPATH=src
|
||||
CLASSES=build
|
||||
DIST=dist
|
||||
@@ -80,18 +97,18 @@ SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files
|
||||
all: mkdirs J2DBench.jar J2DAnalyzer.jar
|
||||
|
||||
run: mkdirs J2DBench.jar
|
||||
java -jar $(DIST)/J2DBench.jar
|
||||
$(JAVA) -jar $(DIST)/J2DBench.jar
|
||||
|
||||
analyze: mkdirs J2DAnalyzer.jar
|
||||
java -jar $(DIST)/J2DAnalyzer.jar
|
||||
$(JAVA) -jar $(DIST)/J2DAnalyzer.jar
|
||||
|
||||
J2DBench.jar: \
|
||||
$(J2DBENCH_CLASSES) $(J2DBENCH_RESOURCES) \
|
||||
$(CLASSES)/j2dbench.manifest
|
||||
jar cvmf $(CLASSES)/j2dbench.manifest $(DIST)/J2DBench.jar -C $(CLASSES) j2dbench
|
||||
$(JAR) cvmf $(CLASSES)/j2dbench.manifest $(DIST)/J2DBench.jar -C $(CLASSES) j2dbench
|
||||
|
||||
J2DAnalyzer.jar: $(J2DANALYZER_CLASSES) $(CLASSES)/j2danalyzer.manifest
|
||||
jar cvmf $(CLASSES)/j2danalyzer.manifest \
|
||||
$(JAR) cvmf $(CLASSES)/j2danalyzer.manifest \
|
||||
$(DIST)/J2DAnalyzer.jar -C $(CLASSES) j2dbench/report
|
||||
|
||||
$(CLASSES)/j2dbench/tests/iio/images: $(RESOURCES)/images
|
||||
@@ -120,7 +137,7 @@ $(CLASSES):
|
||||
mkdirs: $(DIST) $(CLASSES)
|
||||
|
||||
$(CLASSES)/j2dbench/%.class: $(SOURCEPATH)/j2dbench/%.java
|
||||
javac -g:none -source 1.7 -target 1.7 -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
|
||||
$(JAVAC) -g:none -source $(SOURCE) -target $(TARGET) -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
|
||||
|
||||
clean:
|
||||
rm -rf $(CLASSES)
|
||||
|
||||
@@ -23,6 +23,9 @@ The benchmark requires at least jdk1.4 to compile and run. Note that
|
||||
source/target is set to 1.7 in the makefile and build.xml, because of
|
||||
support in jdk 14 compiler. To check compatibility with jdk1.4 you can
|
||||
use "-source 1.4 -target 1.4" options and jdk1.7.
|
||||
Yo can use TARGET/SOURCE of makefile and -Dtarget/surce to set them up for your convinience.
|
||||
Similarly you can set JAVA/JAVAC/JAR and -Djava/javac to select diffferent java/javac then is on yoru PATH
|
||||
Unluckily in ant, you can not set jar, but ant should honor JAVA_HOME
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
How To Compile
|
||||
|
||||
@@ -39,6 +39,27 @@
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="resources" location="resources"/>
|
||||
|
||||
<condition property="source" value="7">
|
||||
<not>
|
||||
<isset property="source"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="target" value="7">
|
||||
<not>
|
||||
<isset property="target"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="java" value="java">
|
||||
<not>
|
||||
<isset property="java"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="javac" value="javac">
|
||||
<not>
|
||||
<isset property="javac"/>
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<target name="init">
|
||||
<!-- Create the time stamp -->
|
||||
<tstamp/>
|
||||
@@ -49,13 +70,14 @@
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac debug="off" source="1.7" target="1.7" srcdir="${src}" destdir="${build}"/>
|
||||
<javac debug="off" source="${source}" target="${target}" srcdir="${src}" destdir="${build}" fork="true" executable="${javac}"/>
|
||||
</target>
|
||||
|
||||
<target name="run" depends="dist"
|
||||
description="run J2DBench" >
|
||||
<java jar="${dist}/J2DBench.jar"
|
||||
fork="true"
|
||||
jvm="${java}"
|
||||
>
|
||||
</java>
|
||||
</target>
|
||||
@@ -64,6 +86,7 @@
|
||||
description="run J2DAnalyzer" >
|
||||
<java jar="${dist}/J2DAnalyzer.jar"
|
||||
fork="true"
|
||||
jvm="${java}"
|
||||
>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -1716,7 +1716,7 @@ public class Intro extends JPanel {
|
||||
this.beginning = beg;
|
||||
this.ending = end;
|
||||
fm = surf.getMetrics(font);
|
||||
java.util.Arrays.sort(members);
|
||||
Arrays.sort(members);
|
||||
cast.add("CONTRIBUTORS");
|
||||
cast.add(" ");
|
||||
cast.addAll(Arrays.asList(members));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2014, 2021, Red Hat, Inc. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
@@ -1237,7 +1237,7 @@ source %{
|
||||
|
||||
// r27 is not allocatable when compressed oops is on and heapbase is not
|
||||
// zero, compressed klass pointers doesn't use r27 after JDK-8234794
|
||||
if (UseCompressedOops && (CompressedOops::ptrs_base() != NULL)) {
|
||||
if (UseCompressedOops && (CompressedOops::ptrs_base() != nullptr)) {
|
||||
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
|
||||
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
|
||||
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
|
||||
@@ -1581,7 +1581,7 @@ bool needs_releasing_store(const Node *n)
|
||||
{
|
||||
// assert n->is_Store();
|
||||
StoreNode *st = n->as_Store();
|
||||
return st->trailing_membar() != NULL;
|
||||
return st->trailing_membar() != nullptr;
|
||||
}
|
||||
|
||||
// predicate controlling translation of CAS
|
||||
@@ -1593,9 +1593,9 @@ bool needs_acquiring_load_exclusive(const Node *n)
|
||||
assert(is_CAS(n->Opcode(), true), "expecting a compare and swap");
|
||||
LoadStoreNode* ldst = n->as_LoadStore();
|
||||
if (is_CAS(n->Opcode(), false)) {
|
||||
assert(ldst->trailing_membar() != NULL, "expected trailing membar");
|
||||
assert(ldst->trailing_membar() != nullptr, "expected trailing membar");
|
||||
} else {
|
||||
return ldst->trailing_membar() != NULL;
|
||||
return ldst->trailing_membar() != nullptr;
|
||||
}
|
||||
|
||||
// so we can just return true here
|
||||
@@ -1734,7 +1734,7 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
|
||||
st->print("mov rscratch1, #%d\n\t", framesize - 2 * wordSize);
|
||||
st->print("sub sp, sp, rscratch1");
|
||||
}
|
||||
if (C->stub_function() == NULL && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
|
||||
if (C->stub_function() == nullptr && BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
|
||||
st->print("\n\t");
|
||||
st->print("ldr rscratch1, [guard]\n\t");
|
||||
st->print("dmb ishld\n\t");
|
||||
@@ -1783,9 +1783,9 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
|
||||
|
||||
__ build_frame(framesize);
|
||||
|
||||
if (C->stub_function() == NULL) {
|
||||
if (C->stub_function() == nullptr) {
|
||||
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
if (BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) {
|
||||
if (BarrierSet::barrier_set()->barrier_set_nmethod() != nullptr) {
|
||||
// Dummy labels for just measuring the code size
|
||||
Label dummy_slow_path;
|
||||
Label dummy_continuation;
|
||||
@@ -2153,12 +2153,12 @@ void MachSpillCopyNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
|
||||
if (!ra_)
|
||||
st->print("N%d = SpillCopy(N%d)", _idx, in(1)->_idx);
|
||||
else
|
||||
implementation(NULL, ra_, false, st);
|
||||
implementation(nullptr, ra_, false, st);
|
||||
}
|
||||
#endif
|
||||
|
||||
void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
|
||||
implementation(&cbuf, ra_, false, NULL);
|
||||
implementation(&cbuf, ra_, false, nullptr);
|
||||
}
|
||||
|
||||
uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
|
||||
@@ -2205,14 +2205,14 @@ void MachUEPNode::format(PhaseRegAlloc* ra_, outputStream* st) const
|
||||
{
|
||||
st->print_cr("# MachUEPNode");
|
||||
if (UseCompressedClassPointers) {
|
||||
st->print_cr("\tldrw rscratch1, j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
|
||||
if (CompressedKlassPointers::shift() != 0) {
|
||||
st->print_cr("\tdecode_klass_not_null rscratch1, rscratch1");
|
||||
}
|
||||
st->print_cr("\tldrw rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
|
||||
st->print_cr("\tldrw r10, [rscratch2 + CompiledICData::speculated_klass_offset()]\t# compressed klass");
|
||||
st->print_cr("\tcmpw rscratch1, r10");
|
||||
} else {
|
||||
st->print_cr("\tldr rscratch1, j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
|
||||
st->print_cr("\tldr rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
|
||||
st->print_cr("\tldr r10, [rscratch2 + CompiledICData::speculated_klass_offset()]\t# compressed klass");
|
||||
st->print_cr("\tcmp rscratch1, r10");
|
||||
}
|
||||
st->print_cr("\tcmp r0, rscratch1\t # Inline cache check");
|
||||
st->print_cr("\tbne, SharedRuntime::_ic_miss_stub");
|
||||
}
|
||||
#endif
|
||||
@@ -2221,14 +2221,7 @@ void MachUEPNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const
|
||||
{
|
||||
// This is the unverified entry point.
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
|
||||
__ cmp_klass(j_rarg0, rscratch2, rscratch1);
|
||||
Label skip;
|
||||
// TODO
|
||||
// can we avoid this skip and still use a reloc?
|
||||
__ br(Assembler::EQ, skip);
|
||||
__ far_jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
|
||||
__ bind(skip);
|
||||
__ ic_check(InteriorEntryAlignment);
|
||||
}
|
||||
|
||||
uint MachUEPNode::size(PhaseRegAlloc* ra_) const
|
||||
@@ -2249,7 +2242,7 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf)
|
||||
// That's why we must use the macroassembler to generate a handler.
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
address base = __ start_a_stub(size_exception_handler());
|
||||
if (base == NULL) {
|
||||
if (base == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return 0; // CodeBuffer::expand failed
|
||||
}
|
||||
@@ -2267,7 +2260,7 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf)
|
||||
// That's why we must use the macroassembler to generate a handler.
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
address base = __ start_a_stub(size_deopt_handler());
|
||||
if (base == NULL) {
|
||||
if (base == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return 0; // CodeBuffer::expand failed
|
||||
}
|
||||
@@ -2377,7 +2370,7 @@ int Matcher::min_vector_size(const BasicType bt) {
|
||||
return MIN2(size, max_size);
|
||||
}
|
||||
|
||||
int Matcher::superword_max_vector_size(const BasicType bt) {
|
||||
int Matcher::max_vector_size_auto_vectorization(const BasicType bt) {
|
||||
return Matcher::max_vector_size(bt);
|
||||
}
|
||||
|
||||
@@ -2410,7 +2403,7 @@ MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* generic_opnd,
|
||||
case Op_VecX: return new vecXOper();
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Matcher::is_reg2reg_move(MachNode* m) {
|
||||
@@ -2582,8 +2575,8 @@ Assembler::Condition to_assembler_cond(BoolTest::mask cond) {
|
||||
}
|
||||
|
||||
// Binary src (Replicate con)
|
||||
bool is_valid_sve_arith_imm_pattern(Node* n, Node* m) {
|
||||
if (n == NULL || m == NULL) {
|
||||
static bool is_valid_sve_arith_imm_pattern(Node* n, Node* m) {
|
||||
if (n == nullptr || m == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2623,8 +2616,8 @@ bool is_valid_sve_arith_imm_pattern(Node* n, Node* m) {
|
||||
|
||||
// (XorV src (Replicate m1))
|
||||
// (XorVMask src (MaskAll m1))
|
||||
bool is_vector_bitwise_not_pattern(Node* n, Node* m) {
|
||||
if (n != NULL && m != NULL) {
|
||||
static bool is_vector_bitwise_not_pattern(Node* n, Node* m) {
|
||||
if (n != nullptr && m != nullptr) {
|
||||
return (n->Opcode() == Op_XorV || n->Opcode() == Op_XorVMask) &&
|
||||
VectorNode::is_all_ones_vector(m);
|
||||
}
|
||||
@@ -3430,7 +3423,7 @@ encode %{
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
Register dst_reg = as_Register($dst$$reg);
|
||||
address con = (address)$src$$constant;
|
||||
if (con == NULL || con == (address)1) {
|
||||
if (con == nullptr || con == (address)1) {
|
||||
ShouldNotReachHere();
|
||||
} else {
|
||||
relocInfo::relocType rtype = $src->constant_reloc();
|
||||
@@ -3473,7 +3466,7 @@ encode %{
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
Register dst_reg = as_Register($dst$$reg);
|
||||
address con = (address)$src$$constant;
|
||||
if (con == NULL) {
|
||||
if (con == nullptr) {
|
||||
ShouldNotReachHere();
|
||||
} else {
|
||||
relocInfo::relocType rtype = $src->constant_reloc();
|
||||
@@ -3492,7 +3485,7 @@ encode %{
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
Register dst_reg = as_Register($dst$$reg);
|
||||
address con = (address)$src$$constant;
|
||||
if (con == NULL) {
|
||||
if (con == nullptr) {
|
||||
ShouldNotReachHere();
|
||||
} else {
|
||||
relocInfo::relocType rtype = $src->constant_reloc();
|
||||
@@ -3675,7 +3668,7 @@ encode %{
|
||||
Label miss;
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
__ check_klass_subtype_slow_path(sub_reg, super_reg, temp_reg, result_reg,
|
||||
NULL, &miss,
|
||||
nullptr, &miss,
|
||||
/*set_cond_codes:*/ true);
|
||||
if ($primary) {
|
||||
__ mov(result_reg, zr);
|
||||
@@ -3691,7 +3684,7 @@ encode %{
|
||||
if (!_method) {
|
||||
// A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap.
|
||||
call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type));
|
||||
if (call == NULL) {
|
||||
if (call == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -3705,7 +3698,7 @@ encode %{
|
||||
RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index)
|
||||
: static_call_Relocation::spec(method_index);
|
||||
call = __ trampoline_call(Address(addr, rspec));
|
||||
if (call == NULL) {
|
||||
if (call == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -3715,8 +3708,8 @@ encode %{
|
||||
cbuf.shared_stub_to_interp_for(_method, call - cbuf.insts_begin());
|
||||
} else {
|
||||
// Emit stub for static call
|
||||
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, call);
|
||||
if (stub == NULL) {
|
||||
address stub = CompiledDirectCall::emit_to_interp_stub(cbuf, call);
|
||||
if (stub == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -3735,7 +3728,7 @@ encode %{
|
||||
C2_MacroAssembler _masm(&cbuf);
|
||||
int method_index = resolved_method_index(cbuf);
|
||||
address call = __ ic_call((address)$meth$$method, method_index);
|
||||
if (call == NULL) {
|
||||
if (call == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -3764,7 +3757,7 @@ encode %{
|
||||
CodeBlob *cb = CodeCache::find_blob(entry);
|
||||
if (cb) {
|
||||
address call = __ trampoline_call(Address(entry, relocInfo::runtime_call_type));
|
||||
if (call == NULL) {
|
||||
if (call == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -4663,7 +4656,7 @@ operand immP()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// NULL Pointer Immediate
|
||||
// Null Pointer Immediate
|
||||
operand immP0()
|
||||
%{
|
||||
predicate(n->get_ptr() == 0);
|
||||
@@ -4795,7 +4788,7 @@ operand immN()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// Narrow NULL Pointer Immediate
|
||||
// Narrow Null Pointer Immediate
|
||||
operand immN0()
|
||||
%{
|
||||
predicate(n->get_narrowcon() == 0);
|
||||
@@ -7219,7 +7212,7 @@ instruct loadConP0(iRegPNoSp dst, immP0 con)
|
||||
match(Set dst con);
|
||||
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "mov $dst, $con\t# NULL ptr" %}
|
||||
format %{ "mov $dst, $con\t# null pointer" %}
|
||||
|
||||
ins_encode(aarch64_enc_mov_p0(dst, con));
|
||||
|
||||
@@ -7233,7 +7226,7 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
|
||||
match(Set dst con);
|
||||
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "mov $dst, $con\t# NULL ptr" %}
|
||||
format %{ "mov $dst, $con\t# null pointer" %}
|
||||
|
||||
ins_encode(aarch64_enc_mov_p1(dst, con));
|
||||
|
||||
@@ -7275,7 +7268,7 @@ instruct loadConN0(iRegNNoSp dst, immN0 con)
|
||||
match(Set dst con);
|
||||
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "mov $dst, $con\t# compressed NULL ptr" %}
|
||||
format %{ "mov $dst, $con\t# compressed null pointer" %}
|
||||
|
||||
ins_encode(aarch64_enc_mov_n0(dst, con));
|
||||
|
||||
@@ -8237,6 +8230,24 @@ instruct popCountL_mem(iRegINoSp dst, memory8 mem, vRegD tmp) %{
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
// ============================================================================
|
||||
// VerifyVectorAlignment Instruction
|
||||
|
||||
instruct verify_vector_alignment(iRegP addr, immL_positive_bitmaskI mask, rFlagsReg cr) %{
|
||||
match(Set addr (VerifyVectorAlignment addr mask));
|
||||
effect(KILL cr);
|
||||
format %{ "verify_vector_alignment $addr $mask \t! verify alignment" %}
|
||||
ins_encode %{
|
||||
Label Lskip;
|
||||
// check if masked bits of addr are zero
|
||||
__ tst($addr$$Register, $mask$$constant);
|
||||
__ br(Assembler::EQ, Lskip);
|
||||
__ stop("verify_vector_alignment found a misaligned vector memory access");
|
||||
__ bind(Lskip);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ============================================================================
|
||||
// MemBar Instruction
|
||||
|
||||
@@ -15238,7 +15249,7 @@ instruct clearArray_reg_reg(iRegL_R11 cnt, iRegP_R10 base, Universe dummy, rFlag
|
||||
|
||||
ins_encode %{
|
||||
address tpc = __ zero_words($base$$Register, $cnt$$Register);
|
||||
if (tpc == NULL) {
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -15259,7 +15270,7 @@ instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, iRegL_R11 temp, Universe d
|
||||
|
||||
ins_encode %{
|
||||
address tpc = __ zero_words($base$$Register, (uint64_t)$cnt$$constant);
|
||||
if (tpc == NULL) {
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -16422,13 +16433,12 @@ instruct branchLoopEnd(cmpOp cmp, rFlagsReg cr, label lbl)
|
||||
|
||||
instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2, iRegPNoSp tmp3)
|
||||
%{
|
||||
predicate(LockingMode != LM_LIGHTWEIGHT);
|
||||
match(Set cr (FastLock object box));
|
||||
effect(TEMP tmp, TEMP tmp2, TEMP tmp3);
|
||||
|
||||
// TODO
|
||||
// identify correct cost
|
||||
ins_cost(5 * INSN_COST);
|
||||
format %{ "fastlock $object,$box\t! kills $tmp,$tmp2" %}
|
||||
format %{ "fastlock $object,$box\t! kills $tmp,$tmp2,$tmp3" %}
|
||||
|
||||
ins_encode %{
|
||||
__ fast_lock($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register, $tmp3$$Register);
|
||||
@@ -16439,6 +16449,7 @@ instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegP
|
||||
|
||||
instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2)
|
||||
%{
|
||||
predicate(LockingMode != LM_LIGHTWEIGHT);
|
||||
match(Set cr (FastUnlock object box));
|
||||
effect(TEMP tmp, TEMP tmp2);
|
||||
|
||||
@@ -16452,6 +16463,37 @@ instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRe
|
||||
ins_pipe(pipe_serial);
|
||||
%}
|
||||
|
||||
instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2)
|
||||
%{
|
||||
predicate(LockingMode == LM_LIGHTWEIGHT);
|
||||
match(Set cr (FastLock object box));
|
||||
effect(TEMP tmp, TEMP tmp2);
|
||||
|
||||
ins_cost(5 * INSN_COST);
|
||||
format %{ "fastlock $object,$box\t! kills $tmp,$tmp2" %}
|
||||
|
||||
ins_encode %{
|
||||
__ fast_lock_lightweight($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register);
|
||||
%}
|
||||
|
||||
ins_pipe(pipe_serial);
|
||||
%}
|
||||
|
||||
instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp, iRegPNoSp tmp2)
|
||||
%{
|
||||
predicate(LockingMode == LM_LIGHTWEIGHT);
|
||||
match(Set cr (FastUnlock object box));
|
||||
effect(TEMP tmp, TEMP tmp2);
|
||||
|
||||
ins_cost(5 * INSN_COST);
|
||||
format %{ "fastunlock $object,$box\t! kills $tmp, $tmp2" %}
|
||||
|
||||
ins_encode %{
|
||||
__ fast_unlock_lightweight($object$$Register, $box$$Register, $tmp$$Register, $tmp2$$Register);
|
||||
%}
|
||||
|
||||
ins_pipe(pipe_serial);
|
||||
%}
|
||||
|
||||
// ============================================================================
|
||||
// Safepoint Instructions
|
||||
@@ -17086,23 +17128,7 @@ instruct string_equalsL(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
|
||||
ins_encode %{
|
||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
||||
__ string_equals($str1$$Register, $str2$$Register,
|
||||
$result$$Register, $cnt$$Register, 1);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct string_equalsU(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
|
||||
iRegI_R0 result, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrEqualsNode*)n)->encoding() == StrIntrinsicNode::UU);
|
||||
match(Set result (StrEquals (Binary str1 str2) cnt));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
|
||||
|
||||
format %{ "String Equals $str1,$str2,$cnt -> $result" %}
|
||||
ins_encode %{
|
||||
// Count is in 8-bit bytes; non-Compact chars are 16 bits.
|
||||
__ string_equals($str1$$Register, $str2$$Register,
|
||||
$result$$Register, $cnt$$Register, 2);
|
||||
$result$$Register, $cnt$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
@@ -17124,7 +17150,7 @@ instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
|
||||
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
|
||||
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
|
||||
$result$$Register, $tmp$$Register, 1);
|
||||
if (tpc == NULL) {
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -17149,7 +17175,7 @@ instruct array_equalsC(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
|
||||
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
|
||||
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
|
||||
$result$$Register, $tmp$$Register, 2);
|
||||
if (tpc == NULL) {
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -17164,7 +17190,7 @@ instruct count_positives(iRegP_R1 ary1, iRegI_R2 len, iRegI_R0 result, rFlagsReg
|
||||
format %{ "count positives byte[] $ary1,$len -> $result" %}
|
||||
ins_encode %{
|
||||
address tpc = __ count_positives($ary1$$Register, $len$$Register, $result$$Register);
|
||||
if (tpc == NULL) {
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
@@ -17207,7 +17233,7 @@ instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len
|
||||
address tpc = __ byte_array_inflate($src$$Register, $dst$$Register, $len$$Register,
|
||||
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
|
||||
$vtmp2$$FloatRegister, $tmp$$Register);
|
||||
if (tpc == NULL) {
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2023, Arm Limited. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
@@ -126,7 +126,7 @@ source %{
|
||||
}
|
||||
}
|
||||
|
||||
bool Matcher::match_rule_supported_superword(int opcode, int vlen, BasicType bt) {
|
||||
bool Matcher::match_rule_supported_auto_vectorization(int opcode, int vlen, BasicType bt) {
|
||||
if (UseSVE == 0) {
|
||||
// These operations are not profitable to be vectorized on NEON, because no direct
|
||||
// NEON instructions support them. But the match rule support for them is profitable for
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2023, Arm Limited. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
@@ -116,7 +116,7 @@ source %{
|
||||
}
|
||||
}
|
||||
|
||||
bool Matcher::match_rule_supported_superword(int opcode, int vlen, BasicType bt) {
|
||||
bool Matcher::match_rule_supported_auto_vectorization(int opcode, int vlen, BasicType bt) {
|
||||
if (UseSVE == 0) {
|
||||
// These operations are not profitable to be vectorized on NEON, because no direct
|
||||
// NEON instructions support them. But the match rule support for them is profitable for
|
||||
|
||||
@@ -19,7 +19,7 @@ dnl Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
dnl or visit www.oracle.com if you need additional information or have any
|
||||
dnl questions.
|
||||
dnl
|
||||
dnl
|
||||
dnl
|
||||
dnl Process this file with m4 ad_encode.m4 to generate the load/store
|
||||
dnl patterns used in aarch64.ad.
|
||||
dnl
|
||||
@@ -90,4 +90,3 @@ STORE(vRegD,strd,Float,,8)
|
||||
loadStore(_masm, &MacroAssembler::strb, zr, $mem->opcode(),
|
||||
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 1);
|
||||
%}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020 Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -118,10 +118,6 @@ extern "C" {
|
||||
else
|
||||
Disassembler::decode((address)start, (address)start + len);
|
||||
}
|
||||
|
||||
JNIEXPORT void das1(uintptr_t insn) {
|
||||
das(insn, 1);
|
||||
}
|
||||
}
|
||||
|
||||
#define __ as->
|
||||
@@ -187,6 +183,26 @@ void Address::lea(MacroAssembler *as, Register r) const {
|
||||
zrf(Rd, 0);
|
||||
}
|
||||
|
||||
// This encoding is similar (but not quite identical) to the encoding used
|
||||
// by literal ld/st. see JDK-8324123.
|
||||
// PRFM does not support writeback or pre/post index.
|
||||
void Assembler::prfm(const Address &adr, prfop pfop) {
|
||||
Address::mode mode = adr.getMode();
|
||||
// PRFM does not support pre/post index
|
||||
guarantee((mode != Address::pre) && (mode != Address::post), "prfm does not support pre/post indexing");
|
||||
if (mode == Address::literal) {
|
||||
starti;
|
||||
f(0b11, 31, 30), f(0b011, 29, 27), f(0b000, 26, 24);
|
||||
f(pfop, 4, 0);
|
||||
int64_t offset = (adr.target() - pc()) >> 2;
|
||||
sf(offset, 23, 5);
|
||||
} else {
|
||||
assert((mode == Address::base_plus_offset)
|
||||
|| (mode == Address::base_plus_offset_reg), "must be base_plus_offset/base_plus_offset_reg");
|
||||
ld_st2(as_Register(pfop), adr, 0b11, 0b10);
|
||||
}
|
||||
}
|
||||
|
||||
// An "all-purpose" add/subtract immediate, per ARM documentation:
|
||||
// A "programmer-friendly" assembler may accept a negative immediate
|
||||
// between -(2^24 -1) and -1 inclusive, causing it to convert a
|
||||
|
||||
@@ -797,6 +797,8 @@ public:
|
||||
|
||||
void adrp(Register Rd, const Address &dest, uint64_t &offset) = delete;
|
||||
|
||||
void prfm(const Address &adr, prfop pfop = PLDL1KEEP);
|
||||
|
||||
#undef INSN
|
||||
|
||||
void add_sub_immediate(Instruction_aarch64 ¤t_insn, Register Rd, Register Rn,
|
||||
@@ -1574,17 +1576,6 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, size, op) \
|
||||
void NAME(const Address &adr, prfop pfop = PLDL1KEEP) { \
|
||||
ld_st2(as_Register(pfop), adr, size, op); \
|
||||
}
|
||||
|
||||
INSN(prfm, 0b11, 0b10); // FIXME: PRFM should not be used with
|
||||
// writeback modes, but the assembler
|
||||
// doesn't enfore that.
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, size, op) \
|
||||
void NAME(FloatRegister Rt, const Address &adr) { \
|
||||
ld_st2(as_Register(Rt), adr, size, op, 1); \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -53,7 +53,6 @@
|
||||
#endif
|
||||
|
||||
NEEDS_CLEANUP // remove this definitions ?
|
||||
const Register IC_Klass = rscratch2; // where the IC klass is cached
|
||||
const Register SYNC_header = r0; // synchronization header
|
||||
const Register SHIFT_count = r0; // where count for shift operations must be
|
||||
|
||||
@@ -282,7 +281,8 @@ void LIR_Assembler::osr_entry() {
|
||||
__ bind(L);
|
||||
}
|
||||
#endif
|
||||
__ ldp(r19, r20, Address(OSR_buf, slot_offset));
|
||||
__ ldr(r19, Address(OSR_buf, slot_offset));
|
||||
__ ldr(r20, Address(OSR_buf, slot_offset + BytesPerWord));
|
||||
__ str(r19, frame_map()->address_for_monitor_lock(i));
|
||||
__ str(r20, frame_map()->address_for_monitor_object(i));
|
||||
}
|
||||
@@ -292,27 +292,7 @@ void LIR_Assembler::osr_entry() {
|
||||
|
||||
// inline cache check; done before the frame is built.
|
||||
int LIR_Assembler::check_icache() {
|
||||
Register receiver = FrameMap::receiver_opr->as_register();
|
||||
Register ic_klass = IC_Klass;
|
||||
int start_offset = __ offset();
|
||||
__ inline_cache_check(receiver, ic_klass);
|
||||
|
||||
// if icache check fails, then jump to runtime routine
|
||||
// Note: RECEIVER must still contain the receiver!
|
||||
Label dont;
|
||||
__ br(Assembler::EQ, dont);
|
||||
__ far_jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
|
||||
|
||||
// We align the verified entry point unless the method body
|
||||
// (including its inline cache check) will fit in a single 64-byte
|
||||
// icache line.
|
||||
if (! method()->is_accessor() || __ offset() - start_offset > 4 * 4) {
|
||||
// force alignment after the cache check.
|
||||
__ align(CodeEntryAlignment);
|
||||
}
|
||||
|
||||
__ bind(dont);
|
||||
return start_offset;
|
||||
return __ ic_check(CodeEntryAlignment);
|
||||
}
|
||||
|
||||
void LIR_Assembler::clinit_barrier(ciMethod* method) {
|
||||
@@ -1229,7 +1209,7 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
||||
len,
|
||||
tmp1,
|
||||
tmp2,
|
||||
arrayOopDesc::header_size(op->type()),
|
||||
arrayOopDesc::base_offset_in_bytes(op->type()),
|
||||
array_element_size(op->type()),
|
||||
op->klass()->as_register(),
|
||||
*op->stub()->entry());
|
||||
@@ -2041,7 +2021,7 @@ void LIR_Assembler::emit_static_call_stub() {
|
||||
__ relocate(static_stub_Relocation::spec(call_pc));
|
||||
__ emit_static_call_stub();
|
||||
|
||||
assert(__ offset() - start + CompiledStaticCall::to_trampoline_stub_size()
|
||||
assert(__ offset() - start + CompiledDirectCall::to_trampoline_stub_size()
|
||||
<= call_stub_size(), "stub too big");
|
||||
__ end_a_stub();
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@ friend class ArrayCopyStub;
|
||||
void deoptimize_trap(CodeEmitInfo *info);
|
||||
|
||||
enum {
|
||||
// call stub: CompiledStaticCall::to_interp_stub_size() +
|
||||
// CompiledStaticCall::to_trampoline_stub_size()
|
||||
// call stub: CompiledDirectCall::to_interp_stub_size() +
|
||||
// CompiledDirectCall::to_trampoline_stub_size()
|
||||
_call_stub_size = 13 * NativeInstruction::instruction_size,
|
||||
_exception_handler_size = DEBUG_ONLY(1*K) NOT_DEBUG(175),
|
||||
_deopt_handler_size = 7 * NativeInstruction::instruction_size
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -831,18 +831,12 @@ void LIRGenerator::do_LibmIntrinsic(Intrinsic* x) {
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dlog:
|
||||
if (StubRoutines::dlog() != nullptr) {
|
||||
__ call_runtime_leaf(StubRoutines::dlog(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
// Math.log intrinsic is not implemented on AArch64 (see JDK-8210858),
|
||||
// but we can still call the shared runtime.
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
|
||||
break;
|
||||
case vmIntrinsics::_dlog10:
|
||||
if (StubRoutines::dlog10() != nullptr) {
|
||||
__ call_runtime_leaf(StubRoutines::dlog10(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
|
||||
break;
|
||||
case vmIntrinsics::_dpow:
|
||||
if (StubRoutines::dpow() != nullptr) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -80,12 +80,12 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
|
||||
br(Assembler::NE, slow_case);
|
||||
}
|
||||
|
||||
// Load object header
|
||||
ldr(hdr, Address(obj, hdr_offset));
|
||||
if (LockingMode == LM_LIGHTWEIGHT) {
|
||||
lightweight_lock(obj, hdr, temp, rscratch2, slow_case);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
Label done;
|
||||
// Load object header
|
||||
ldr(hdr, Address(obj, hdr_offset));
|
||||
// and mark it as unlocked
|
||||
orr(hdr, hdr, markWord::unlocked_value);
|
||||
// save unlocked object header into the displaced header location on the stack
|
||||
@@ -144,11 +144,6 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
|
||||
verify_oop(obj);
|
||||
|
||||
if (LockingMode == LM_LIGHTWEIGHT) {
|
||||
ldr(hdr, Address(obj, oopDesc::mark_offset_in_bytes()));
|
||||
// We cannot use tbnz here, the target might be too far away and cannot
|
||||
// be encoded.
|
||||
tst(hdr, markWord::monitor_value);
|
||||
br(Assembler::NE, slow_case);
|
||||
lightweight_unlock(obj, hdr, temp, rscratch2, slow_case);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
// test if object header is pointing to the displaced header, and if so, restore
|
||||
@@ -193,6 +188,12 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
|
||||
|
||||
if (len->is_valid()) {
|
||||
strw(len, Address(obj, arrayOopDesc::length_offset_in_bytes()));
|
||||
int base_offset = arrayOopDesc::length_offset_in_bytes() + BytesPerInt;
|
||||
if (!is_aligned(base_offset, BytesPerWord)) {
|
||||
assert(is_aligned(base_offset, BytesPerInt), "must be 4-byte aligned");
|
||||
// Clear gap/first 4 bytes following the length field.
|
||||
strw(zr, Address(obj, base_offset));
|
||||
}
|
||||
} else if (UseCompressedClassPointers) {
|
||||
store_klass_gap(obj, zr);
|
||||
}
|
||||
@@ -271,7 +272,7 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
|
||||
|
||||
verify_oop(obj);
|
||||
}
|
||||
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int header_size, int f, Register klass, Label& slow_case) {
|
||||
void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int base_offset_in_bytes, int f, Register klass, Label& slow_case) {
|
||||
assert_different_registers(obj, len, t1, t2, klass);
|
||||
|
||||
// determine alignment mask
|
||||
@@ -284,7 +285,7 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
||||
|
||||
const Register arr_size = t2; // okay to be the same
|
||||
// align object end
|
||||
mov(arr_size, (int32_t)header_size * BytesPerWord + MinObjAlignmentInBytesMask);
|
||||
mov(arr_size, (int32_t)base_offset_in_bytes + MinObjAlignmentInBytesMask);
|
||||
add(arr_size, arr_size, len, ext::uxtw, f);
|
||||
andr(arr_size, arr_size, ~MinObjAlignmentInBytesMask);
|
||||
|
||||
@@ -292,8 +293,11 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
||||
|
||||
initialize_header(obj, klass, len, t1, t2);
|
||||
|
||||
// Align-up to word boundary, because we clear the 4 bytes potentially
|
||||
// following the length field in initialize_header().
|
||||
int base_offset = align_up(base_offset_in_bytes, BytesPerWord);
|
||||
// clear rest of allocated space
|
||||
initialize_body(obj, arr_size, header_size * BytesPerWord, t1, t2);
|
||||
initialize_body(obj, arr_size, base_offset, t1, t2);
|
||||
if (Compilation::current()->bailed_out()) {
|
||||
return;
|
||||
}
|
||||
@@ -308,17 +312,6 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
||||
verify_oop(obj);
|
||||
}
|
||||
|
||||
|
||||
void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
|
||||
verify_oop(receiver);
|
||||
// explicit null check not needed since load from [klass_offset] causes a trap
|
||||
// check against inline cache
|
||||
assert(!MacroAssembler::needs_explicit_null_check(oopDesc::klass_offset_in_bytes()), "must add explicit null check");
|
||||
|
||||
cmp_klass(receiver, iCache, rscratch1);
|
||||
}
|
||||
|
||||
|
||||
void C1_MacroAssembler::build_frame(int framesize, int bang_size_in_bytes) {
|
||||
assert(bang_size_in_bytes >= framesize, "stack bang size incorrect");
|
||||
// Make sure there is enough stack space for this method's activation.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -100,7 +100,7 @@ using MacroAssembler::null_check;
|
||||
// header_size: size of object header in words
|
||||
// f : element scale factor
|
||||
// slow_case : exit to slow case implementation if fast allocation fails
|
||||
void allocate_array(Register obj, Register len, Register t, Register t2, int header_size, int f, Register klass, Label& slow_case);
|
||||
void allocate_array(Register obj, Register len, Register t, Register t2, int base_offset_in_bytes, int f, Register klass, Label& slow_case);
|
||||
|
||||
int rsp_offset() const { return _rsp_offset; }
|
||||
void set_rsp_offset(int n) { _rsp_offset = n; }
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "nativeInst_aarch64.hpp"
|
||||
#include "oops/compiledICHolder.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "register_aarch64.hpp"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, 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,6 +32,7 @@
|
||||
#include "opto/output.hpp"
|
||||
#include "opto/subnode.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
@@ -55,6 +56,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
|
||||
Label object_has_monitor;
|
||||
Label count, no_count;
|
||||
|
||||
assert(LockingMode != LM_LIGHTWEIGHT, "lightweight locking should use fast_lock_lightweight");
|
||||
assert_different_registers(oop, box, tmp, disp_hdr);
|
||||
|
||||
// Load markWord from object into displaced_header.
|
||||
@@ -73,7 +75,8 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
|
||||
if (LockingMode == LM_MONITOR) {
|
||||
tst(oop, oop); // Set NE to indicate 'failure' -> take slow-path. We know that oop != 0.
|
||||
b(cont);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
} else {
|
||||
assert(LockingMode == LM_LEGACY, "must be");
|
||||
// Set tmp to be (markWord of object | UNLOCK_VALUE).
|
||||
orr(tmp, disp_hdr, markWord::unlocked_value);
|
||||
|
||||
@@ -102,31 +105,26 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
|
||||
ands(tmp/*==0?*/, disp_hdr, tmp); // Sets flags for result
|
||||
str(tmp/*==0, perhaps*/, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
b(cont);
|
||||
} else {
|
||||
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
|
||||
lightweight_lock(oop, disp_hdr, tmp, tmp3Reg, no_count);
|
||||
b(count);
|
||||
}
|
||||
|
||||
// Handle existing monitor.
|
||||
bind(object_has_monitor);
|
||||
|
||||
// The object's monitor m is unlocked iff m->owner == NULL,
|
||||
// The object's monitor m is unlocked iff m->owner == nullptr,
|
||||
// otherwise m->owner may contain a thread or a stack address.
|
||||
//
|
||||
// Try to CAS m->owner from NULL to current thread.
|
||||
// Try to CAS m->owner from null to current thread.
|
||||
add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset())-markWord::monitor_value));
|
||||
cmpxchg(tmp, zr, rthread, Assembler::xword, /*acquire*/ true,
|
||||
/*release*/ true, /*weak*/ false, tmp3Reg); // Sets flags for result
|
||||
|
||||
if (LockingMode != LM_LIGHTWEIGHT) {
|
||||
// Store a non-null value into the box to avoid looking like a re-entrant
|
||||
// lock. The fast-path monitor unlock code checks for
|
||||
// markWord::monitor_value so use markWord::unused_mark which has the
|
||||
// relevant bit set, and also matches ObjectSynchronizer::enter.
|
||||
mov(tmp, (address)markWord::unused_mark().value());
|
||||
str(tmp, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
}
|
||||
// Store a non-null value into the box to avoid looking like a re-entrant
|
||||
// lock. The fast-path monitor unlock code checks for
|
||||
// markWord::monitor_value so use markWord::unused_mark which has the
|
||||
// relevant bit set, and also matches ObjectSynchronizer::enter.
|
||||
mov(tmp, (address)markWord::unused_mark().value());
|
||||
str(tmp, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
|
||||
br(Assembler::EQ, cont); // CAS success means locking succeeded
|
||||
|
||||
cmp(tmp3Reg, rthread);
|
||||
@@ -157,6 +155,7 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
|
||||
Label object_has_monitor;
|
||||
Label count, no_count;
|
||||
|
||||
assert(LockingMode != LM_LIGHTWEIGHT, "lightweight locking should use fast_unlock_lightweight");
|
||||
assert_different_registers(oop, box, tmp, disp_hdr);
|
||||
|
||||
if (LockingMode == LM_LEGACY) {
|
||||
@@ -175,7 +174,8 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
|
||||
if (LockingMode == LM_MONITOR) {
|
||||
tst(oop, oop); // Set NE to indicate 'failure' -> take slow-path. We know that oop != 0.
|
||||
b(cont);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
} else {
|
||||
assert(LockingMode == LM_LEGACY, "must be");
|
||||
// Check if it is still a light weight lock, this is is true if we
|
||||
// see the stack address of the basicLock in the markWord of the
|
||||
// object.
|
||||
@@ -183,10 +183,6 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
|
||||
cmpxchg(oop, box, disp_hdr, Assembler::xword, /*acquire*/ false,
|
||||
/*release*/ true, /*weak*/ false, tmp);
|
||||
b(cont);
|
||||
} else {
|
||||
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
|
||||
lightweight_unlock(oop, tmp, box, disp_hdr, no_count);
|
||||
b(count);
|
||||
}
|
||||
|
||||
assert(oopDesc::mark_offset_in_bytes() == 0, "offset of _mark is not 0");
|
||||
@@ -196,19 +192,6 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
|
||||
STATIC_ASSERT(markWord::monitor_value <= INT_MAX);
|
||||
add(tmp, tmp, -(int)markWord::monitor_value); // monitor
|
||||
|
||||
if (LockingMode == LM_LIGHTWEIGHT) {
|
||||
// If the owner is anonymous, we need to fix it -- in an outline stub.
|
||||
Register tmp2 = disp_hdr;
|
||||
ldr(tmp2, Address(tmp, ObjectMonitor::owner_offset()));
|
||||
// We cannot use tbnz here, the target might be too far away and cannot
|
||||
// be encoded.
|
||||
tst(tmp2, (uint64_t)ObjectMonitor::ANONYMOUS_OWNER);
|
||||
C2HandleAnonOMOwnerStub* stub = new (Compile::current()->comp_arena()) C2HandleAnonOMOwnerStub(tmp, tmp2);
|
||||
Compile::current()->output()->add_stub(stub);
|
||||
br(Assembler::NE, stub->entry());
|
||||
bind(stub->continuation());
|
||||
}
|
||||
|
||||
ldr(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset()));
|
||||
|
||||
Label notRecursive;
|
||||
@@ -241,6 +224,262 @@ void C2_MacroAssembler::fast_unlock(Register objectReg, Register boxReg, Registe
|
||||
bind(no_count);
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::fast_lock_lightweight(Register obj, Register t1,
|
||||
Register t2, Register t3) {
|
||||
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
|
||||
assert_different_registers(obj, t1, t2, t3);
|
||||
|
||||
// Handle inflated monitor.
|
||||
Label inflated;
|
||||
// Finish fast lock successfully. MUST branch to with flag == EQ
|
||||
Label locked;
|
||||
// Finish fast lock unsuccessfully. MUST branch to with flag == NE
|
||||
Label slow_path;
|
||||
|
||||
if (DiagnoseSyncOnValueBasedClasses != 0) {
|
||||
load_klass(t1, obj);
|
||||
ldrw(t1, Address(t1, Klass::access_flags_offset()));
|
||||
tstw(t1, JVM_ACC_IS_VALUE_BASED_CLASS);
|
||||
br(Assembler::NE, slow_path);
|
||||
}
|
||||
|
||||
const Register t1_mark = t1;
|
||||
|
||||
{ // Lightweight locking
|
||||
|
||||
// Push lock to the lock stack and finish successfully. MUST branch to with flag == EQ
|
||||
Label push;
|
||||
|
||||
const Register t2_top = t2;
|
||||
const Register t3_t = t3;
|
||||
|
||||
// Check if lock-stack is full.
|
||||
ldrw(t2_top, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
cmpw(t2_top, (unsigned)LockStack::end_offset() - 1);
|
||||
br(Assembler::GT, slow_path);
|
||||
|
||||
// Check if recursive.
|
||||
subw(t3_t, t2_top, oopSize);
|
||||
ldr(t3_t, Address(rthread, t3_t));
|
||||
cmp(obj, t3_t);
|
||||
br(Assembler::EQ, push);
|
||||
|
||||
// Relaxed normal load to check for monitor. Optimization for monitor case.
|
||||
ldr(t1_mark, Address(obj, oopDesc::mark_offset_in_bytes()));
|
||||
tbnz(t1_mark, exact_log2(markWord::monitor_value), inflated);
|
||||
|
||||
// Not inflated
|
||||
assert(oopDesc::mark_offset_in_bytes() == 0, "required to avoid a lea");
|
||||
|
||||
// Try to lock. Transition lock-bits 0b01 => 0b00
|
||||
orr(t1_mark, t1_mark, markWord::unlocked_value);
|
||||
eor(t3_t, t1_mark, markWord::unlocked_value);
|
||||
cmpxchg(/*addr*/ obj, /*expected*/ t1_mark, /*new*/ t3_t, Assembler::xword,
|
||||
/*acquire*/ true, /*release*/ false, /*weak*/ false, noreg);
|
||||
br(Assembler::NE, slow_path);
|
||||
|
||||
bind(push);
|
||||
// After successful lock, push object on lock-stack.
|
||||
str(obj, Address(rthread, t2_top));
|
||||
addw(t2_top, t2_top, oopSize);
|
||||
strw(t2_top, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
b(locked);
|
||||
}
|
||||
|
||||
{ // Handle inflated monitor.
|
||||
bind(inflated);
|
||||
|
||||
// mark contains the tagged ObjectMonitor*.
|
||||
const Register t1_tagged_monitor = t1_mark;
|
||||
const uintptr_t monitor_tag = markWord::monitor_value;
|
||||
const Register t2_owner_addr = t2;
|
||||
const Register t3_owner = t3;
|
||||
|
||||
// Compute owner address.
|
||||
lea(t2_owner_addr, Address(t1_tagged_monitor, (in_bytes(ObjectMonitor::owner_offset()) - monitor_tag)));
|
||||
|
||||
// CAS owner (null => current thread).
|
||||
cmpxchg(t2_owner_addr, zr, rthread, Assembler::xword, /*acquire*/ true,
|
||||
/*release*/ false, /*weak*/ false, t3_owner);
|
||||
br(Assembler::EQ, locked);
|
||||
|
||||
// Check if recursive.
|
||||
cmp(t3_owner, rthread);
|
||||
br(Assembler::NE, slow_path);
|
||||
|
||||
// Recursive.
|
||||
increment(Address(t1_tagged_monitor, in_bytes(ObjectMonitor::recursions_offset()) - monitor_tag), 1);
|
||||
}
|
||||
|
||||
bind(locked);
|
||||
increment(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
|
||||
#ifdef ASSERT
|
||||
// Check that locked label is reached with Flags == EQ.
|
||||
Label flag_correct;
|
||||
br(Assembler::EQ, flag_correct);
|
||||
stop("Fast Lock Flag != EQ");
|
||||
#endif
|
||||
|
||||
bind(slow_path);
|
||||
#ifdef ASSERT
|
||||
// Check that slow_path label is reached with Flags == NE.
|
||||
br(Assembler::NE, flag_correct);
|
||||
stop("Fast Lock Flag != NE");
|
||||
bind(flag_correct);
|
||||
#endif
|
||||
// C2 uses the value of Flags (NE vs EQ) to determine the continuation.
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::fast_unlock_lightweight(Register obj, Register t1, Register t2,
|
||||
Register t3) {
|
||||
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
|
||||
assert_different_registers(obj, t1, t2, t3);
|
||||
|
||||
// Handle inflated monitor.
|
||||
Label inflated, inflated_load_monitor;
|
||||
// Finish fast unlock successfully. MUST branch to with flag == EQ
|
||||
Label unlocked;
|
||||
// Finish fast unlock unsuccessfully. MUST branch to with flag == NE
|
||||
Label slow_path;
|
||||
|
||||
const Register t1_mark = t1;
|
||||
const Register t2_top = t2;
|
||||
const Register t3_t = t3;
|
||||
|
||||
{ // Lightweight unlock
|
||||
|
||||
// Check if obj is top of lock-stack.
|
||||
ldrw(t2_top, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
subw(t2_top, t2_top, oopSize);
|
||||
ldr(t3_t, Address(rthread, t2_top));
|
||||
cmp(obj, t3_t);
|
||||
// Top of lock stack was not obj. Must be monitor.
|
||||
br(Assembler::NE, inflated_load_monitor);
|
||||
|
||||
// Pop lock-stack.
|
||||
DEBUG_ONLY(str(zr, Address(rthread, t2_top));)
|
||||
strw(t2_top, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
|
||||
// Check if recursive.
|
||||
subw(t3_t, t2_top, oopSize);
|
||||
ldr(t3_t, Address(rthread, t3_t));
|
||||
cmp(obj, t3_t);
|
||||
br(Assembler::EQ, unlocked);
|
||||
|
||||
// Not recursive.
|
||||
// Load Mark.
|
||||
ldr(t1_mark, Address(obj, oopDesc::mark_offset_in_bytes()));
|
||||
|
||||
// Check header for monitor (0b10).
|
||||
tbnz(t1_mark, exact_log2(markWord::monitor_value), inflated);
|
||||
|
||||
// Try to unlock. Transition lock bits 0b00 => 0b01
|
||||
assert(oopDesc::mark_offset_in_bytes() == 0, "required to avoid lea");
|
||||
orr(t3_t, t1_mark, markWord::unlocked_value);
|
||||
cmpxchg(/*addr*/ obj, /*expected*/ t1_mark, /*new*/ t3_t, Assembler::xword,
|
||||
/*acquire*/ false, /*release*/ true, /*weak*/ false, noreg);
|
||||
br(Assembler::EQ, unlocked);
|
||||
|
||||
// Compare and exchange failed.
|
||||
// Restore lock-stack and handle the unlock in runtime.
|
||||
DEBUG_ONLY(str(obj, Address(rthread, t2_top));)
|
||||
addw(t2_top, t2_top, oopSize);
|
||||
str(t2_top, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
b(slow_path);
|
||||
}
|
||||
|
||||
|
||||
{ // Handle inflated monitor.
|
||||
bind(inflated_load_monitor);
|
||||
ldr(t1_mark, Address(obj, oopDesc::mark_offset_in_bytes()));
|
||||
#ifdef ASSERT
|
||||
tbnz(t1_mark, exact_log2(markWord::monitor_value), inflated);
|
||||
stop("Fast Unlock not monitor");
|
||||
#endif
|
||||
|
||||
bind(inflated);
|
||||
|
||||
#ifdef ASSERT
|
||||
Label check_done;
|
||||
subw(t2_top, t2_top, oopSize);
|
||||
cmpw(t2_top, in_bytes(JavaThread::lock_stack_base_offset()));
|
||||
br(Assembler::LT, check_done);
|
||||
ldr(t3_t, Address(rthread, t2_top));
|
||||
cmp(obj, t3_t);
|
||||
br(Assembler::NE, inflated);
|
||||
stop("Fast Unlock lock on stack");
|
||||
bind(check_done);
|
||||
#endif
|
||||
|
||||
// mark contains the tagged ObjectMonitor*.
|
||||
const Register t1_monitor = t1_mark;
|
||||
const uintptr_t monitor_tag = markWord::monitor_value;
|
||||
|
||||
// Untag the monitor.
|
||||
sub(t1_monitor, t1_mark, monitor_tag);
|
||||
|
||||
const Register t2_recursions = t2;
|
||||
Label not_recursive;
|
||||
|
||||
// Check if recursive.
|
||||
ldr(t2_recursions, Address(t1_monitor, ObjectMonitor::recursions_offset()));
|
||||
cbz(t2_recursions, not_recursive);
|
||||
|
||||
// Recursive unlock.
|
||||
sub(t2_recursions, t2_recursions, 1u);
|
||||
str(t2_recursions, Address(t1_monitor, ObjectMonitor::recursions_offset()));
|
||||
// Set flag == EQ
|
||||
cmp(t2_recursions, t2_recursions);
|
||||
b(unlocked);
|
||||
|
||||
bind(not_recursive);
|
||||
|
||||
Label release;
|
||||
const Register t2_owner_addr = t2;
|
||||
|
||||
// Compute owner address.
|
||||
lea(t2_owner_addr, Address(t1_monitor, ObjectMonitor::owner_offset()));
|
||||
|
||||
// Check if the entry lists are empty.
|
||||
ldr(rscratch1, Address(t1_monitor, ObjectMonitor::EntryList_offset()));
|
||||
ldr(t3_t, Address(t1_monitor, ObjectMonitor::cxq_offset()));
|
||||
orr(rscratch1, rscratch1, t3_t);
|
||||
cmp(rscratch1, zr);
|
||||
br(Assembler::EQ, release);
|
||||
|
||||
// The owner may be anonymous and we removed the last obj entry in
|
||||
// the lock-stack. This loses the information about the owner.
|
||||
// Write the thread to the owner field so the runtime knows the owner.
|
||||
str(rthread, Address(t2_owner_addr));
|
||||
b(slow_path);
|
||||
|
||||
bind(release);
|
||||
// Set owner to null.
|
||||
// Release to satisfy the JMM
|
||||
stlr(zr, t2_owner_addr);
|
||||
}
|
||||
|
||||
bind(unlocked);
|
||||
decrement(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
|
||||
#ifdef ASSERT
|
||||
// Check that unlocked label is reached with Flags == EQ.
|
||||
Label flag_correct;
|
||||
br(Assembler::EQ, flag_correct);
|
||||
stop("Fast Unlock Flag != EQ");
|
||||
#endif
|
||||
|
||||
bind(slow_path);
|
||||
#ifdef ASSERT
|
||||
// Check that slow_path label is reached with Flags == NE.
|
||||
br(Assembler::NE, flag_correct);
|
||||
stop("Fast Unlock Flag != NE");
|
||||
bind(flag_correct);
|
||||
#endif
|
||||
// C2 uses the value of Flags (NE vs EQ) to determine the continuation.
|
||||
}
|
||||
|
||||
// Search for str1 in str2 and return index or -1
|
||||
// Clobbers: rscratch1, rscratch2, rflags. May also clobber v0-v1, when icnt1==-1.
|
||||
void C2_MacroAssembler::string_indexof(Register str2, Register str1,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -36,9 +36,11 @@
|
||||
|
||||
public:
|
||||
// Code used by cmpFastLock and cmpFastUnlock mach instructions in .ad file.
|
||||
// See full description in macroAssembler_aarch64.cpp.
|
||||
void fast_lock(Register object, Register box, Register tmp, Register tmp2, Register tmp3);
|
||||
void fast_unlock(Register object, Register box, Register tmp, Register tmp2);
|
||||
// Code used by cmpFastLockLightweight and cmpFastUnlockLightweight mach instructions in .ad file.
|
||||
void fast_lock_lightweight(Register object, Register t1, Register t2, Register t3);
|
||||
void fast_unlock_lightweight(Register object, Register t1, Register t2, Register t3);
|
||||
|
||||
void string_compare(Register str1, Register str2,
|
||||
Register cnt1, Register cnt2, Register result,
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/compiledIC.hpp"
|
||||
#include "code/icBuffer.hpp"
|
||||
#include "code/nmethod.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/mutexLocker.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
@@ -35,7 +35,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define __ _masm.
|
||||
address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
|
||||
address CompiledDirectCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
|
||||
precond(cbuf.stubs()->start() != badAddress);
|
||||
precond(cbuf.stubs()->end() != badAddress);
|
||||
|
||||
@@ -70,11 +70,11 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark)
|
||||
}
|
||||
#undef __
|
||||
|
||||
int CompiledStaticCall::to_interp_stub_size() {
|
||||
int CompiledDirectCall::to_interp_stub_size() {
|
||||
return MacroAssembler::static_call_stub_size();
|
||||
}
|
||||
|
||||
int CompiledStaticCall::to_trampoline_stub_size() {
|
||||
int CompiledDirectCall::to_trampoline_stub_size() {
|
||||
// Somewhat pessimistically, we count 3 instructions here (although
|
||||
// there are only two) because we sometimes emit an alignment nop.
|
||||
// Trampoline stubs are always word aligned.
|
||||
@@ -82,21 +82,14 @@ int CompiledStaticCall::to_trampoline_stub_size() {
|
||||
}
|
||||
|
||||
// Relocation entries for call stub, compiled java to interpreter.
|
||||
int CompiledStaticCall::reloc_to_interp_stub() {
|
||||
int CompiledDirectCall::reloc_to_interp_stub() {
|
||||
return 4; // 3 in emit_to_interp_stub + 1 in emit_call
|
||||
}
|
||||
|
||||
void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) {
|
||||
void CompiledDirectCall::set_to_interpreted(const methodHandle& callee, address entry) {
|
||||
address stub = find_stub();
|
||||
guarantee(stub != nullptr, "stub not found");
|
||||
|
||||
if (TraceICs) {
|
||||
ResourceMark rm;
|
||||
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
|
||||
p2i(instruction_address()),
|
||||
callee->name_and_sig_as_C_string());
|
||||
}
|
||||
|
||||
// Creation also verifies the object.
|
||||
NativeMovConstReg* method_holder
|
||||
= nativeMovConstReg_at(stub + NativeInstruction::instruction_size);
|
||||
@@ -114,7 +107,7 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
|
||||
set_destination_mt_safe(stub);
|
||||
}
|
||||
|
||||
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
|
||||
void CompiledDirectCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
|
||||
// Reset stub.
|
||||
address stub = static_stub->addr();
|
||||
assert(stub != nullptr, "stub not found");
|
||||
@@ -131,7 +124,7 @@ void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_
|
||||
// Non-product mode code
|
||||
#ifndef PRODUCT
|
||||
|
||||
void CompiledDirectStaticCall::verify() {
|
||||
void CompiledDirectCall::verify() {
|
||||
// Verify call.
|
||||
_call->verify();
|
||||
_call->verify_alignment();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -58,7 +58,7 @@ static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
|
||||
0x7ffc, 0x7ffe, 0x7fff
|
||||
};
|
||||
static constexpr int num_immediates = sizeof(immediates) / sizeof(immediates[0]);
|
||||
const int start_index = aslr ? os::random() : 0;
|
||||
const int start_index = aslr ? os::next_random((int)os::javaTimeNanos()) : 0;
|
||||
constexpr int max_tries = 64;
|
||||
for (int ntry = 0; result == nullptr && ntry < max_tries; ntry ++) {
|
||||
// As in os::attempt_reserve_memory_between, we alternate between higher and lower
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -678,7 +678,7 @@ static void printbc(Method *m, intptr_t bcx) {
|
||||
printf("%s : %s ==> %s\n", m->name_and_sig_as_C_string(), buf, name);
|
||||
}
|
||||
|
||||
void internal_pf(uintptr_t sp, uintptr_t fp, uintptr_t pc, uintptr_t bcx) {
|
||||
static void internal_pf(uintptr_t sp, uintptr_t fp, uintptr_t pc, uintptr_t bcx) {
|
||||
if (! fp)
|
||||
return;
|
||||
|
||||
|
||||
@@ -156,8 +156,6 @@
|
||||
static void verify_deopt_original_pc( CompiledMethod* nm, intptr_t* unextended_sp);
|
||||
#endif
|
||||
|
||||
const ImmutableOopMap* get_oop_map() const;
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user