Compare commits
974
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c8947b099 | ||
|
|
ab7156d367 | ||
|
|
f851c8a374 | ||
|
|
38962fd023 | ||
|
|
b67be8b278 | ||
|
|
91104b55c4 | ||
|
|
81f954402a | ||
|
|
a3ff803df5 | ||
|
|
19b51bbf8f | ||
|
|
7092829258 | ||
|
|
73484dca8b | ||
|
|
6506f73a17 | ||
|
|
26e38e99bc | ||
|
|
cebee6fde3 | ||
|
|
f597a11449 | ||
|
|
1c45f0dcbe | ||
|
|
69a2a9eb55 | ||
|
|
73b1292000 | ||
|
|
27cb596def | ||
|
|
431d0aaa4f | ||
|
|
596dd416ed | ||
|
|
110ba69520 | ||
|
|
b4f5a4d89e | ||
|
|
538f5b3bde | ||
|
|
aaffde4ca7 | ||
|
|
026664491c | ||
|
|
372c85f4ae | ||
|
|
b9ed5f4721 | ||
|
|
55a89d949c | ||
|
|
80cef6602e | ||
|
|
6a318b7b1e | ||
|
|
f51ac64ff4 | ||
|
|
012b718e82 | ||
|
|
cef931df10 | ||
|
|
4e0c698208 | ||
|
|
eed72a258b | ||
|
|
688c6d4241 | ||
|
|
5529523d0c | ||
|
|
cb3a98e52f | ||
|
|
0aadc949f2 | ||
|
|
052b0dc801 | ||
|
|
77807e384e | ||
|
|
3a28a6beb7 | ||
|
|
98f622784a | ||
|
|
ea76cbcc35 | ||
|
|
8b043c21cb | ||
|
|
66d8fa2e48 | ||
|
|
10bd9b248b | ||
|
|
be12b506b9 | ||
|
|
a5e5e3d958 | ||
|
|
8c5c31732c | ||
|
|
8afb6cf81f | ||
|
|
5e8380e394 | ||
|
|
52ab70f110 | ||
|
|
cd221c7092 | ||
|
|
ed17e7224f | ||
|
|
4709a04217 | ||
|
|
32eccf0878 | ||
|
|
b242c181e5 | ||
|
|
e2e646cac5 | ||
|
|
c8790b64e4 | ||
|
|
15b7743279 | ||
|
|
d3545fc941 | ||
|
|
b6429284d9 | ||
|
|
bbd4d52780 | ||
|
|
766c4b0b2d | ||
|
|
d65fab1d87 | ||
|
|
5fa6664045 | ||
|
|
aa7f9531f6 | ||
|
|
ebfa97f3ac | ||
|
|
2807210d02 | ||
|
|
6c2c528e7b | ||
|
|
c6a65bc393 | ||
|
|
a9498ee193 | ||
|
|
6a57b83489 | ||
|
|
b84e52aabd | ||
|
|
6a927cb3f2 | ||
|
|
1ef9e30d7e | ||
|
|
08cfb992d3 | ||
|
|
ae8a27d8cd | ||
|
|
10c68a927b | ||
|
|
35ddc20d25 | ||
|
|
75dac319ea | ||
|
|
39a9c0098d | ||
|
|
845da18e19 | ||
|
|
6aaad5770f | ||
|
|
ff2781e489 | ||
|
|
3ed7c30cc7 | ||
|
|
60f31ad190 | ||
|
|
bc35d9ddaf | ||
|
|
3c41129561 | ||
|
|
ea62919155 | ||
|
|
4203f655ac | ||
|
|
bd478d9307 | ||
|
|
0850de5098 | ||
|
|
dfc186bc9d | ||
|
|
c144c1663f | ||
|
|
a597ad4c8d | ||
|
|
8c67d01795 | ||
|
|
96efb21568 | ||
|
|
7ef5260766 | ||
|
|
5ddca30396 | ||
|
|
a25dbb6f71 | ||
|
|
56dde363be | ||
|
|
3caf2b8cd0 | ||
|
|
4cb3bc64e8 | ||
|
|
3b2bcb676b | ||
|
|
86d38add61 | ||
|
|
495e231c7a | ||
|
|
641cdf3c17 | ||
|
|
90a828bb24 | ||
|
|
95d40be3b8 | ||
|
|
b44c0b4874 | ||
|
|
b579d07193 | ||
|
|
19eedbea6b | ||
|
|
ca7c0be4ad | ||
|
|
f1d059531a | ||
|
|
6616f0b77b | ||
|
|
05c506b631 | ||
|
|
8b0f14d50d | ||
|
|
eca588403e | ||
|
|
35e56724c0 | ||
|
|
5b05ae4b64 | ||
|
|
bb5dca5a42 | ||
|
|
58bdb46ef2 | ||
|
|
aa765f7fd9 | ||
|
|
e1e7792684 | ||
|
|
684b6d8348 | ||
|
|
7488c4a895 | ||
|
|
c0e462df37 | ||
|
|
6bb688aaf2 | ||
|
|
e4cbe6ec9e | ||
|
|
4e6abfcefb | ||
|
|
c61e2f48fe | ||
|
|
f86b3c9a15 | ||
|
|
f62410ba1d | ||
|
|
06413d342f | ||
|
|
76c9415158 | ||
|
|
8da20639b6 | ||
|
|
0e0c81abda | ||
|
|
e67e974c94 | ||
|
|
974c7ee60d | ||
|
|
3cfaacd005 | ||
|
|
d5a13d0149 | ||
|
|
ea65c03d4f | ||
|
|
2f61aacaf7 | ||
|
|
d380065a2b | ||
|
|
2360092bcb | ||
|
|
5f38b943b2 | ||
|
|
e8a7ffb0dc | ||
|
|
2654fa1881 | ||
|
|
22d9a187cb | ||
|
|
d3267304a3 | ||
|
|
2444bb08bc | ||
|
|
c27697890a | ||
|
|
f365fca1b6 | ||
|
|
b7b67ab4f5 | ||
|
|
9ce37b783e | ||
|
|
d0e4e168a6 | ||
|
|
8c07ab2f00 | ||
|
|
69d00bc636 | ||
|
|
afee55196c | ||
|
|
c5cf9351da | ||
|
|
1395649bb2 | ||
|
|
e8ba615854 | ||
|
|
e8dd451530 | ||
|
|
d9d7b8ba96 | ||
|
|
8499909241 | ||
|
|
ac2bf3ad51 | ||
|
|
bc953498e2 | ||
|
|
9c39fea9b0 | ||
|
|
317692350b | ||
|
|
e3f8aa2665 | ||
|
|
5e14944ee5 | ||
|
|
34abd3fcc6 | ||
|
|
28c069faa3 | ||
|
|
e67ae3ef4f | ||
|
|
3a305c47c5 | ||
|
|
771a926587 | ||
|
|
9174703761 | ||
|
|
af660ec0dd | ||
|
|
97917f060f | ||
|
|
25b25d6504 | ||
|
|
77d9deb9fb | ||
|
|
cfe18cf422 | ||
|
|
06d1177575 | ||
|
|
5a94643c99 | ||
|
|
7bf8e741ac | ||
|
|
b6990aa0d7 | ||
|
|
29db09e313 | ||
|
|
4c473428b1 | ||
|
|
56a3ce0d96 | ||
|
|
92004cc6ed | ||
|
|
e3d6bb26eb | ||
|
|
436bbea46d | ||
|
|
110a6d97b3 | ||
|
|
ba85c19be8 | ||
|
|
29262fd5f1 | ||
|
|
6c0121469b | ||
|
|
9ae322da87 | ||
|
|
d7d6d635dc | ||
|
|
88cb968dca | ||
|
|
845c078254 | ||
|
|
a68625db68 | ||
|
|
f89f215516 | ||
|
|
d433dc486d | ||
|
|
78fa9ec4a0 | ||
|
|
faa4d96bf7 | ||
|
|
9ec9df60a1 | ||
|
|
c1160e2271 | ||
|
|
886cca10fd | ||
|
|
4abb213344 | ||
|
|
ab113c2013 | ||
|
|
ad04271709 | ||
|
|
5d56a5da1f | ||
|
|
2b4bfb1b1f | ||
|
|
c5cbc06608 | ||
|
|
c549e46126 | ||
|
|
366f71d365 | ||
|
|
27ba82d874 | ||
|
|
423a48e276 | ||
|
|
c0e8d4c816 | ||
|
|
f23fa7efb0 | ||
|
|
e2743c573a | ||
|
|
22456748d4 | ||
|
|
17f0976e29 | ||
|
|
4fff56942d | ||
|
|
e362b66af2 | ||
|
|
71d0b5d31e | ||
|
|
6ca9e65fb3 | ||
|
|
85503434af | ||
|
|
2306f86373 | ||
|
|
c4733a80f3 | ||
|
|
52ee0146a8 | ||
|
|
54538d207a | ||
|
|
79e0ea8f41 | ||
|
|
fb0be371ef | ||
|
|
5c1d76962b | ||
|
|
ada84d65b8 | ||
|
|
e59a0ad98f | ||
|
|
09b2fb029f | ||
|
|
c3fc4ef89a | ||
|
|
8e0a56fd1d | ||
|
|
725cd09e9d | ||
|
|
609f3a5544 | ||
|
|
a582db9591 | ||
|
|
06bbebcfe6 | ||
|
|
58d05acb35 | ||
|
|
035cdeddc8 | ||
|
|
0682021692 | ||
|
|
7f6f72f7e9 | ||
|
|
691a9b3dc6 | ||
|
|
399121b800 | ||
|
|
749904dd49 | ||
|
|
33a86abe90 | ||
|
|
6815bc8e3b | ||
|
|
0f71ce1308 | ||
|
|
b2a684a49a | ||
|
|
c916869512 | ||
|
|
a09ed3862b | ||
|
|
5c91232144 | ||
|
|
b61da3a499 | ||
|
|
45fcfc14ce | ||
|
|
dcc527966d | ||
|
|
755132f651 | ||
|
|
2965a659c8 | ||
|
|
033d5f7985 | ||
|
|
e5a1370ddd | ||
|
|
0af3cf8732 | ||
|
|
d48e3c3f8c | ||
|
|
848ea1fc81 | ||
|
|
710b9f8499 | ||
|
|
85c25d0c1c | ||
|
|
b18635e940 | ||
|
|
d8eb869d12 | ||
|
|
00ca589beb | ||
|
|
dfdc8d2f9e | ||
|
|
bb7a87b47b | ||
|
|
39830ce2f3 | ||
|
|
58ffcc6bd1 | ||
|
|
a4b2fa217a | ||
|
|
bb5eb76814 | ||
|
|
501db74b86 | ||
|
|
1eab02a18d | ||
|
|
f7416c06d5 | ||
|
|
6587348337 | ||
|
|
6b1f3b752c | ||
|
|
259e574f49 | ||
|
|
cedffcc304 | ||
|
|
9cd58cd988 | ||
|
|
c8b58685f6 | ||
|
|
0bcce70122 | ||
|
|
a667218fa6 | ||
|
|
bfdbb4a3a3 | ||
|
|
d506dbcb30 | ||
|
|
7c7af9e1cd | ||
|
|
671d61e642 | ||
|
|
da2153b244 | ||
|
|
7bf4268dfa | ||
|
|
dbf55cdb9d | ||
|
|
c31bc1a1be | ||
|
|
3d1f84a2c8 | ||
|
|
202d2d2154 | ||
|
|
dc2390e848 | ||
|
|
38f522f798 | ||
|
|
5ee51e105b | ||
|
|
98605bb2d5 | ||
|
|
42560daf68 | ||
|
|
dda11062b5 | ||
|
|
f5b4473346 | ||
|
|
86fb190a34 | ||
|
|
ccb0e43a6f | ||
|
|
ad0d82fbec | ||
|
|
700dd6d775 | ||
|
|
a092ed546a | ||
|
|
8b455932f8 | ||
|
|
ec7a77f764 | ||
|
|
579b65d848 | ||
|
|
8f41b81707 | ||
|
|
35c98d44a8 | ||
|
|
ce05d2d8ff | ||
|
|
854b37b98a | ||
|
|
6ea3a6db14 | ||
|
|
cad5fcbbe3 | ||
|
|
0260dfaa85 | ||
|
|
230d684eee | ||
|
|
aa7eb4ed77 | ||
|
|
f261f55ea7 | ||
|
|
f9174c6d05 | ||
|
|
8e2ce06af5 | ||
|
|
892d5bb14f | ||
|
|
839037e0d6 | ||
|
|
da9d2f95e5 | ||
|
|
3d7ac0d51a | ||
|
|
b4f94a4621 | ||
|
|
1b83a7647e | ||
|
|
3becd343af | ||
|
|
a236a9cce4 | ||
|
|
e195bc11d9 | ||
|
|
22087e93c6 | ||
|
|
ccdf640439 | ||
|
|
38691ceffa | ||
|
|
7f02b78afd | ||
|
|
52f58a9c09 | ||
|
|
c74fd5fd85 | ||
|
|
cd1599baf8 | ||
|
|
948ed6c7b9 | ||
|
|
4059957c69 | ||
|
|
02f54fca6f | ||
|
|
52d5adb068 | ||
|
|
c38afdc20a | ||
|
|
c513182c82 | ||
|
|
0431845a82 | ||
|
|
aec1f74992 | ||
|
|
cd2778a888 | ||
|
|
f0c4755878 | ||
|
|
6a01b409c3 | ||
|
|
e9643f19db | ||
|
|
4de559cf50 | ||
|
|
99a17c5b0f | ||
|
|
6878ac727e | ||
|
|
d1ec0a3ce6 | ||
|
|
e74432fd0e | ||
|
|
dc751d558a | ||
|
|
e90e45cf71 | ||
|
|
954fee6646 | ||
|
|
d51e909387 | ||
|
|
d01b3c760a | ||
|
|
e6b5b4046f | ||
|
|
05d9b25643 | ||
|
|
05958311ee | ||
|
|
ec0a8ecf13 | ||
|
|
b22ec1522a | ||
|
|
660518e165 | ||
|
|
a96584537e | ||
|
|
f4ae4180e2 | ||
|
|
0104485272 | ||
|
|
7eaa286e9c | ||
|
|
04d707acbf | ||
|
|
8d49f8782b | ||
|
|
85e0c1f0ba | ||
|
|
49e70bd5f5 | ||
|
|
1ba238d37e | ||
|
|
278bdcc619 | ||
|
|
ec694630cb | ||
|
|
a56982b79f | ||
|
|
924a78b271 | ||
|
|
eb2b5cd458 | ||
|
|
59b4992428 | ||
|
|
2d4f8429ea | ||
|
|
0420dc57f2 | ||
|
|
cde8d7149a | ||
|
|
5f059f959e | ||
|
|
ea97c08fa6 | ||
|
|
06aaf0abe4 | ||
|
|
64dcfb004a | ||
|
|
fdd064430e | ||
|
|
1c3296a63a | ||
|
|
b76e61f7b4 | ||
|
|
d056729300 | ||
|
|
2ebc5dcbdc | ||
|
|
578bd8f983 | ||
|
|
2c07e2d38f | ||
|
|
8834db0ffb | ||
|
|
e60c77ac7a | ||
|
|
8379700a13 | ||
|
|
15ee5d968a | ||
|
|
bccbfbc90e | ||
|
|
f7f49b3416 | ||
|
|
9b13e1ee5a | ||
|
|
3589a3be15 | ||
|
|
0a49f8ebc1 | ||
|
|
42749e6dc8 | ||
|
|
149033e513 | ||
|
|
dde59c8f50 | ||
|
|
634a87c2f9 | ||
|
|
112e48b348 | ||
|
|
e4e0c10048 | ||
|
|
03d04f20d1 | ||
|
|
412ace8335 | ||
|
|
edefb3dfa0 | ||
|
|
ff1db54205 | ||
|
|
be05b7e3d0 | ||
|
|
9c178c75a0 | ||
|
|
61ebd242c9 | ||
|
|
6d1184c01f | ||
|
|
8423a52017 | ||
|
|
9028e0cf0c | ||
|
|
864873e463 | ||
|
|
ae57a82b67 | ||
|
|
053a486241 | ||
|
|
2602662717 | ||
|
|
c3bac23fd3 | ||
|
|
29e1a5f6c6 | ||
|
|
1c17f832f3 | ||
|
|
f2f1c4f138 | ||
|
|
13947dff65 | ||
|
|
1cb8193d30 | ||
|
|
9c55a40724 | ||
|
|
8969b0159b | ||
|
|
3acdb58155 | ||
|
|
34ad0ba568 | ||
|
|
627e427cab | ||
|
|
207873d698 | ||
|
|
13093eea02 | ||
|
|
e1be115971 | ||
|
|
c017365d9c | ||
|
|
ed7cfa4163 | ||
|
|
22f96f6dba | ||
|
|
c93cbc2c6a | ||
|
|
ecb1c7fa21 | ||
|
|
ea3904055a | ||
|
|
adb58f61f8 | ||
|
|
b607c97b1d | ||
|
|
ce4bc777e0 | ||
|
|
261fb37d58 | ||
|
|
0b78805c8d | ||
|
|
f5d4bef1b2 | ||
|
|
166a0ba7cf | ||
|
|
78a034792b | ||
|
|
7be6be4312 | ||
|
|
319396a6d5 | ||
|
|
0924a7f25b | ||
|
|
345792be08 | ||
|
|
1e52f0a21c | ||
|
|
5c9976f594 | ||
|
|
0acca93062 | ||
|
|
a904211cdb | ||
|
|
4343a28b69 | ||
|
|
2baaa10227 | ||
|
|
eda150d3a8 | ||
|
|
7368bed858 | ||
|
|
5aa6e7b924 | ||
|
|
d7e7142569 | ||
|
|
089686c315 | ||
|
|
81b67d8732 | ||
|
|
8c13605b90 | ||
|
|
39986ae6e5 | ||
|
|
c62ca64c67 | ||
|
|
c22e73eed3 | ||
|
|
49dfa5a0a8 | ||
|
|
14a28b2ffe | ||
|
|
74c21ce7e0 | ||
|
|
305a7bb18f | ||
|
|
3b63628f1f | ||
|
|
fe073505a5 | ||
|
|
fa2a7482d2 | ||
|
|
bc7eaf4f9e | ||
|
|
07384c26c1 | ||
|
|
4432b6f54d | ||
|
|
a64120a3d0 | ||
|
|
5c42195870 | ||
|
|
8fad005dd3 | ||
|
|
080cbb2859 | ||
|
|
6f70642442 | ||
|
|
bf8ee63e97 | ||
|
|
5f2eaf2d0c | ||
|
|
96d54421cc | ||
|
|
5591a18949 | ||
|
|
6effb8ba2a | ||
|
|
8d01311416 | ||
|
|
c714397635 | ||
|
|
7ebdc89a44 | ||
|
|
016f726939 | ||
|
|
d09c0558d0 | ||
|
|
d8d1bdd7b8 | ||
|
|
fa0a279146 | ||
|
|
02bc3b6950 | ||
|
|
f1031e95c8 | ||
|
|
3dcc08f4a9 | ||
|
|
3e835b7fc8 | ||
|
|
cda9735b36 | ||
|
|
5f92a24897 | ||
|
|
71b21a4b53 | ||
|
|
0738399936 | ||
|
|
26dd6ff875 | ||
|
|
98a97ea85c | ||
|
|
1e7d937044 | ||
|
|
2942aea548 | ||
|
|
2355af6a59 | ||
|
|
aabfc2ed69 | ||
|
|
9a92478496 | ||
|
|
e61bf69138 | ||
|
|
0c3e1a972f | ||
|
|
51cbd7cedb | ||
|
|
7b9e4fdaa2 | ||
|
|
8ac15569c2 | ||
|
|
442fc42462 | ||
|
|
1ea401f564 | ||
|
|
e4e6a375db | ||
|
|
71e5547ee3 | ||
|
|
dbb2a327eb | ||
|
|
9386e30711 | ||
|
|
fad34c0923 | ||
|
|
44ce859e43 | ||
|
|
1868f41ef5 | ||
|
|
0622be4c83 | ||
|
|
24abf411c1 | ||
|
|
0ce27ef17d | ||
|
|
4ad6ad0b49 | ||
|
|
4ae22faca9 | ||
|
|
f767583830 | ||
|
|
2c73ab30be | ||
|
|
584a6f082e | ||
|
|
329949155e | ||
|
|
60bccf6fe9 | ||
|
|
f424050082 | ||
|
|
f59eac28b0 | ||
|
|
ddffd8de81 | ||
|
|
547a871840 | ||
|
|
26f5809a6c | ||
|
|
94fad16f2f | ||
|
|
0c3acd11f4 | ||
|
|
e336721314 | ||
|
|
fbc404a5ac | ||
|
|
f82ceef9f3 | ||
|
|
0ce247f1b7 | ||
|
|
ce29bce59b | ||
|
|
69f0eb80fd | ||
|
|
8931d7cc27 | ||
|
|
2ca7ef6b75 | ||
|
|
ce5a0f4505 | ||
|
|
cb06d121ce | ||
|
|
a900390374 | ||
|
|
9174ac2f52 | ||
|
|
5e4d96891a | ||
|
|
1b9c7c899d | ||
|
|
95d9990a98 | ||
|
|
902dcc4d52 | ||
|
|
0bc1d4cd0d | ||
|
|
9de81d09eb | ||
|
|
b162a221dc | ||
|
|
adde895b6d | ||
|
|
57562c7597 | ||
|
|
24f152bc80 | ||
|
|
8f87acca7e | ||
|
|
3e102e95db | ||
|
|
02066257eb | ||
|
|
bbbf3a1062 | ||
|
|
7610fe1035 | ||
|
|
f586ca4441 | ||
|
|
f55c9c0d3a | ||
|
|
056e257de3 | ||
|
|
0125e65f90 | ||
|
|
7a9b5a205d | ||
|
|
48f6c9656b | ||
|
|
0b16918fe0 | ||
|
|
bd431d40cc | ||
|
|
9a99823538 | ||
|
|
c2f8ce4f10 | ||
|
|
dfbcebd69e | ||
|
|
8251a6956f | ||
|
|
9a095777ba | ||
|
|
b7a426aedd | ||
|
|
29e3422044 | ||
|
|
17c4a53643 | ||
|
|
4942ec0603 | ||
|
|
57709727ed | ||
|
|
d87b8222b9 | ||
|
|
817ed870e9 | ||
|
|
62440e5f17 | ||
|
|
7b01c66a34 | ||
|
|
439bd8e869 | ||
|
|
6e00f34f61 | ||
|
|
f568f4e2ec | ||
|
|
3b49327237 | ||
|
|
c12b826d6a | ||
|
|
c8ebd2705e | ||
|
|
dfdccbb1ae | ||
|
|
142948a592 | ||
|
|
443fb1a850 | ||
|
|
4dfa2e644e | ||
|
|
a2b2c0ee5a | ||
|
|
ea7eb26fb3 | ||
|
|
bb7b1c4fde | ||
|
|
adfe55c89a | ||
|
|
0bf67c68ec | ||
|
|
d92e2aaa20 | ||
|
|
a36c8a4d3c | ||
|
|
7065039494 | ||
|
|
5c201c359e | ||
|
|
4546b99f5f | ||
|
|
affa4134ca | ||
|
|
cb8414a20d | ||
|
|
1a9eb8973e | ||
|
|
d8530c4144 | ||
|
|
c45d7ec0a5 | ||
|
|
f30cb0d74b | ||
|
|
f58357bebe | ||
|
|
a83466f5fc | ||
|
|
ce3f3240c9 | ||
|
|
d3cf846739 | ||
|
|
d47cdc4186 | ||
|
|
0ca2aeff2c | ||
|
|
b0ce64a2ce | ||
|
|
1275eb848f | ||
|
|
c6e0ce6379 | ||
|
|
378cbbb235 | ||
|
|
a6f188af10 | ||
|
|
4ef0a4e9ad | ||
|
|
a8a4d06fac | ||
|
|
a9ab9a3925 | ||
|
|
66cffd1903 | ||
|
|
36c12f1809 | ||
|
|
5541f19df4 | ||
|
|
da8d31d637 | ||
|
|
a79aaf0136 | ||
|
|
901cb95204 | ||
|
|
ad9a7874a5 | ||
|
|
e729f058ab | ||
|
|
344658db76 | ||
|
|
f37c93ed7e | ||
|
|
e03dc38b5c | ||
|
|
e21859c6e1 | ||
|
|
8e1e107725 | ||
|
|
344a1f9865 | ||
|
|
284c7034e5 | ||
|
|
b6673372f5 | ||
|
|
878e3d7bf7 | ||
|
|
8d7c0d1c84 | ||
|
|
accb6bf0a9 | ||
|
|
10ccdaccc7 | ||
|
|
f7bc9a023b | ||
|
|
71aee6a9c1 | ||
|
|
5da8f081d5 | ||
|
|
822b7ee0d0 | ||
|
|
4a43fc75e0 | ||
|
|
be6b56d467 | ||
|
|
34bc19e3ca | ||
|
|
a604b9068b | ||
|
|
9b55052b58 | ||
|
|
58625e8394 | ||
|
|
31aa6e8a2b | ||
|
|
d3e6de365c | ||
|
|
f0313fc0a2 | ||
|
|
c1013ea2fd | ||
|
|
8a14c77745 | ||
|
|
fdaee79c61 | ||
|
|
9552b4a781 | ||
|
|
8e1d778ecc | ||
|
|
d47c81e808 | ||
|
|
82a208d1cd | ||
|
|
05b0edca69 | ||
|
|
3043f30d72 | ||
|
|
6bdf450942 | ||
|
|
8018402b15 | ||
|
|
1d04fa02a8 | ||
|
|
dd0e759c19 | ||
|
|
622140965c | ||
|
|
f60eb86dc0 | ||
|
|
8cc91cfebc | ||
|
|
21cde1b137 | ||
|
|
fb2e31c898 | ||
|
|
b0e12a5532 | ||
|
|
2621ad2c48 | ||
|
|
a44590ec47 | ||
|
|
b97a6d30c3 | ||
|
|
3000151e0a | ||
|
|
6d6f286e53 | ||
|
|
008bb8b38d | ||
|
|
6f1aeedba3 | ||
|
|
e806b00884 | ||
|
|
b77fd768e1 | ||
|
|
85d978165a | ||
|
|
deed4aa691 | ||
|
|
f5e579f2d5 | ||
|
|
744ac34b5d | ||
|
|
2e82a5580d | ||
|
|
e5093e14b8 | ||
|
|
1fdfc60c36 | ||
|
|
d175b10ef2 | ||
|
|
fc7a6b020b | ||
|
|
d424c71493 | ||
|
|
b4b9abc4fe | ||
|
|
f97ec6d74a | ||
|
|
878e7179f1 | ||
|
|
2779c51baf | ||
|
|
ca8d40f727 | ||
|
|
5b7d971d3e | ||
|
|
a9e97f5aa6 | ||
|
|
d6344ca124 | ||
|
|
b081572252 | ||
|
|
f92702dc0f | ||
|
|
993b5d1560 | ||
|
|
4b10cbf7e2 | ||
|
|
5454798c05 | ||
|
|
eb14e3b3e6 | ||
|
|
b06f72b690 | ||
|
|
4768f959f8 | ||
|
|
aa5b708a45 | ||
|
|
0781838e30 | ||
|
|
c8023148c8 | ||
|
|
2e15f2ca15 | ||
|
|
9def5ad0da | ||
|
|
2485741b15 | ||
|
|
e97e99e7f4 | ||
|
|
ed6f5f38b3 | ||
|
|
469db05e91 | ||
|
|
ddcd0aedfd | ||
|
|
b9be5c36b3 | ||
|
|
9fbd64fce0 | ||
|
|
1fc9946b1e | ||
|
|
60c0818a8b | ||
|
|
0e2ce959f9 | ||
|
|
f125fbc425 | ||
|
|
43be922dcb | ||
|
|
309ca872ad | ||
|
|
7047fe2172 | ||
|
|
c24f7d2033 | ||
|
|
3b1888a7bf | ||
|
|
5657b17112 | ||
|
|
bbad3f7777 | ||
|
|
86a3bb3908 | ||
|
|
87a596f786 | ||
|
|
7f3e832574 | ||
|
|
ac56b171f2 | ||
|
|
897dd2b832 | ||
|
|
cd3e041ba2 | ||
|
|
fcf8baf52b | ||
|
|
d42c2fa2ba | ||
|
|
5e10812312 | ||
|
|
76ac8980dc | ||
|
|
2509c70a3d | ||
|
|
66d4b727f0 | ||
|
|
15f7845d74 | ||
|
|
f94b2931d2 | ||
|
|
95fdc62169 | ||
|
|
85f745c8f9 | ||
|
|
7f1cec1206 | ||
|
|
0bf40d20e0 | ||
|
|
fbfe596b46 | ||
|
|
3f779fdf93 | ||
|
|
145426f687 | ||
|
|
443ab26d65 | ||
|
|
dc988ad2f3 | ||
|
|
ccd9ea91f0 | ||
|
|
8e99c8fb0f | ||
|
|
f56e60ead0 | ||
|
|
d73f0f2946 | ||
|
|
7333a30ccc | ||
|
|
8777dad955 | ||
|
|
cf0219af1d | ||
|
|
c755175553 | ||
|
|
3ce1ccad4a | ||
|
|
1259d74b09 | ||
|
|
683be8f07e | ||
|
|
f736e1e360 | ||
|
|
6fdd12b650 | ||
|
|
1284be802d | ||
|
|
a8e6924507 | ||
|
|
c14799cb15 | ||
|
|
31b39acf0b | ||
|
|
51640b1322 | ||
|
|
6a290d1c35 | ||
|
|
c28859d2eb | ||
|
|
a1f2a5dcfd | ||
|
|
07abf676aa | ||
|
|
6ac02b55e8 | ||
|
|
f46655bb48 | ||
|
|
e136d90a4b | ||
|
|
6da1435900 | ||
|
|
56f8f6bf38 | ||
|
|
4c5e9de2cf | ||
|
|
b5036f37a6 | ||
|
|
4c88728866 | ||
|
|
31aa545ebb | ||
|
|
d708ebd213 | ||
|
|
177ada9d95 | ||
|
|
3f66281561 | ||
|
|
2c3d40d023 | ||
|
|
303596dc73 | ||
|
|
a82d863656 | ||
|
|
229e59a412 | ||
|
|
e5feee5cc4 | ||
|
|
f5e87b88da | ||
|
|
dd3d96300c | ||
|
|
5fb74a56ac | ||
|
|
39f0a8a01b | ||
|
|
8172b658ec | ||
|
|
3d2384dc24 | ||
|
|
e2320090bb | ||
|
|
e9b5dcd95f | ||
|
|
c056358058 | ||
|
|
5cef499b53 | ||
|
|
fcbd9f0327 | ||
|
|
0760367eec | ||
|
|
bbb6afd7f7 | ||
|
|
5952d07045 | ||
|
|
715245abd8 | ||
|
|
20b8e4f1e3 | ||
|
|
249c49fd1f | ||
|
|
27a5953198 | ||
|
|
06edc589e7 | ||
|
|
f96102ddb7 | ||
|
|
014fdc1d76 | ||
|
|
65ee66bcf2 | ||
|
|
196ece0298 | ||
|
|
d53e8a7ed6 | ||
|
|
a09b2690d6 | ||
|
|
151fc2b052 | ||
|
|
fabc318955 | ||
|
|
0f327af853 | ||
|
|
3c55399f10 | ||
|
|
c15e50080c | ||
|
|
7edcd1586e | ||
|
|
5d550aed01 | ||
|
|
47dd4d1331 | ||
|
|
606d69fc95 | ||
|
|
82c50b2298 | ||
|
|
bb7b69d461 | ||
|
|
26f3fec92b | ||
|
|
eac503842d | ||
|
|
7a930582d7 | ||
|
|
fa99810a08 | ||
|
|
1a203da83c | ||
|
|
906c490fbe | ||
|
|
50b04e8f89 | ||
|
|
f7a8ccfe17 | ||
|
|
cccdf68e82 | ||
|
|
627754a831 | ||
|
|
7789b12cfe | ||
|
|
0945435a1a | ||
|
|
bdc75366a5 | ||
|
|
219cab7318 | ||
|
|
9d4173d2fc | ||
|
|
b11f71d2b9 | ||
|
|
173e6299cf | ||
|
|
1cb7eac5e6 | ||
|
|
b68204254f | ||
|
|
f8882cb4f2 | ||
|
|
168adb6a83 | ||
|
|
91ab340d14 | ||
|
|
75821c767c | ||
|
|
791667184c | ||
|
|
bf681bc787 | ||
|
|
cff0b69922 | ||
|
|
a1375cd0ff | ||
|
|
0c9d3ab487 | ||
|
|
0b0eb5a3f7 | ||
|
|
1a4cb40c1e | ||
|
|
e7a54473b0 | ||
|
|
3ad47f8db5 | ||
|
|
754726acc9 | ||
|
|
a79e8cc24e | ||
|
|
e0e9914639 | ||
|
|
85f2d99d39 | ||
|
|
9f7f179691 | ||
|
|
d7b1c3a87b | ||
|
|
0d7ec1d22b | ||
|
|
7720c5c767 | ||
|
|
8483f59be3 | ||
|
|
9bdaeb324a | ||
|
|
bacd7a8f96 | ||
|
|
7d2ee63679 | ||
|
|
758f32bd56 | ||
|
|
8ce102b6c3 | ||
|
|
a4dcc6ab85 | ||
|
|
66bde68d2b | ||
|
|
f268484b43 | ||
|
|
91eb5ace08 | ||
|
|
e145309671 | ||
|
|
dc430f8a21 | ||
|
|
b384c00f28 | ||
|
|
7c5028d4b5 | ||
|
|
b5b0e29b8f | ||
|
|
707981662d | ||
|
|
82f87b68f6 | ||
|
|
5b495ed3fb | ||
|
|
686a18b5bc | ||
|
|
183b6a2717 | ||
|
|
e3dbfc1682 | ||
|
|
9310fe286d | ||
|
|
73838a8622 | ||
|
|
2ed2e07ac6 | ||
|
|
ceb006f9bd | ||
|
|
b5a4d3282d | ||
|
|
434e012950 | ||
|
|
b527262d2d | ||
|
|
c99f56e384 | ||
|
|
e66b7d1791 | ||
|
|
02e90fec66 | ||
|
|
7ada051cd6 | ||
|
|
c94b307921 | ||
|
|
f865f26a5a | ||
|
|
651b4c5223 | ||
|
|
137eeea9e0 | ||
|
|
05d0d1f5c0 | ||
|
|
85028b2b00 | ||
|
|
b88ee8b1dc | ||
|
|
1d2162677b | ||
|
|
a9ed15f940 | ||
|
|
562fbbe954 | ||
|
|
69a4afc838 | ||
|
|
699763cfb0 | ||
|
|
b186380e30 | ||
|
|
6e172f9821 | ||
|
|
d2dd5355d1 | ||
|
|
3f7be8037d | ||
|
|
183762f3ad | ||
|
|
ceb1e1c6b2 | ||
|
|
e065a3116a | ||
|
|
a46a9ac901 | ||
|
|
e733418bb2 | ||
|
|
6161f370ab | ||
|
|
2ab7cbaf27 | ||
|
|
1b8c9af1c5 | ||
|
|
2c32cc65fb | ||
|
|
fe6558595a | ||
|
|
82c5264d98 | ||
|
|
ce2ab7a168 | ||
|
|
88ace37d67 | ||
|
|
52338f9175 | ||
|
|
f82b659498 | ||
|
|
36bf4eb5fe | ||
|
|
aaef79a7af | ||
|
|
1319b6cfb8 | ||
|
|
0f3da7490d | ||
|
|
a22d0b0e03 | ||
|
|
c5b6e46860 | ||
|
|
9ab02ada2c | ||
|
|
ff89c7327e | ||
|
|
c56b2644ab | ||
|
|
ec55e7b98b | ||
|
|
315d85a71e | ||
|
|
729448922b | ||
|
|
a7f6f00952 | ||
|
|
2b1a26bf25 | ||
|
|
00620d4c50 | ||
|
|
12be680839 | ||
|
|
5c61e13964 | ||
|
|
5233a4fc33 | ||
|
|
2808d5283d | ||
|
|
5eb4bda861 | ||
|
|
fb029ff2d9 |
No files matched your search
@@ -6,7 +6,7 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
+9
-12
@@ -1,24 +1,18 @@
|
||||
#!/bin/sh -e
|
||||
# Description: update a list of packages
|
||||
# Options: native slow
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk add git openssh-keygen grep curl
|
||||
wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0 $*"
|
||||
fi
|
||||
|
||||
git config --global --add safe.directory "$CI_PROJECT_DIR"
|
||||
git config --global user.name "postmarketOS CI"
|
||||
# pmaports
|
||||
# The email address is the username of the bot (from the GitLab group members page) @noreply.gitlab.com
|
||||
git config --global user.email "project_8065375_bot_13cf44ca4cd2c938688af6e3d500d9cb@noreply.gitlab.com"
|
||||
|
||||
# For testing with pmaports-autoupdate-test repo
|
||||
# git config --global user.email "project_58002231_bot_be2d4e9e7aba929855726aafe12940d6@noreply.gitlab.com"
|
||||
# The username for the bot associated with the access token
|
||||
# e.g. project_226_bot_bfa19b84bf7f559c8ff7438a01fd29b9
|
||||
git config --global user.email "$PMAPORTS_TOKEN_BOT@noreply.gitlab.postmarketos.org"
|
||||
|
||||
# Configure SSH key for signing
|
||||
mkdir -p ~/.ssh
|
||||
@@ -81,15 +75,18 @@ update_linux_next() {
|
||||
# Update the checksums
|
||||
pmbootstrap checksum linux-next
|
||||
|
||||
# Ensure it builds
|
||||
pmbootstrap --details-to-stdout build linux-next
|
||||
|
||||
# Commit
|
||||
git add device/testing/linux-next/APKBUILD
|
||||
git commit -S -m "linux-next: upgrade to $latest"
|
||||
}
|
||||
|
||||
# For testing
|
||||
#git remote add gitlab https://pmos-ci:"$PMAPORTS_PUSH_TOKEN"@gitlab.com/postmarketOS/pmaports-autoupdate-test.git
|
||||
#git remote add gitlab https://pmos-ci:"$PMAPORTS_PUSH_TOKEN"@gitlab.postmarketos.org/postmarketOS/pmaports-autoupdate-test.git
|
||||
|
||||
git remote add gitlab https://pmos-ci:"$PMAPORTS_PUSH_TOKEN"@gitlab.com/postmarketOS/pmaports.git
|
||||
git remote add gitlab https://pmos-ci:"$PMAPORTS_PUSH_TOKEN"@gitlab.postmarketos.org/postmarketOS/pmaports.git
|
||||
git fetch gitlab
|
||||
git checkout --track gitlab/master
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ if [ "$(id -u)" = 0 ]; then
|
||||
# In .gitlab-ci.yml currently .ci/pytest.sh runs before this and
|
||||
# already downloads and runs install_pmbootstrap.sh.
|
||||
if ! [ -e install_pmbootstrap.sh ]; then
|
||||
wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
fi
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
|
||||
+8
-1
@@ -57,7 +57,7 @@ fi
|
||||
|
||||
POSTMARKETOS_WALLPAPER_PATH='/usr/share/wallpapers/postmarketos.jpg'
|
||||
# The excluded devices are "grandfathered in". New devices should not be added here.
|
||||
# See https://gitlab.com/postmarketOS/pmaports/-/issues/2529
|
||||
# See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2529
|
||||
if grep -qr $POSTMARKETOS_WALLPAPER_PATH \
|
||||
--exclude-dir='device-pine64-pinetab' \
|
||||
--exclude-dir='device-oneplus-kebab' \
|
||||
@@ -87,4 +87,11 @@ if grep -qEr 'PMOS_NO_OUTPUT_REDIRECT' -- *; then
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
if grep -qEr '^deviceinfo_kernel_cmdline.*[\"\s]console=null' -- device/; then
|
||||
echo "ERROR: Do not use console=null in the kernel command line."
|
||||
echo "Use these params to quiet console on boot: quiet loglevel=2"
|
||||
echo "For more information, see: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2989"
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
exit "$exit_code"
|
||||
+1
-2
@@ -6,8 +6,7 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
export PMBOOTSTRAP_TAG=master
|
||||
wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
@@ -23,9 +23,4 @@ if __name__ == "__main__":
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True)
|
||||
|
||||
if len(result) > 0:
|
||||
print("Linting issues found:")
|
||||
print(result)
|
||||
sys.exit(1)
|
||||
common.run_pmbootstrap(["-q", "lint"] + packages)
|
||||
@@ -2,15 +2,19 @@
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import sys
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
# pmbootstrap
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.core
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
import pmb.helpers.pmaports
|
||||
from pmb.core.context import get_context
|
||||
|
||||
|
||||
def build_strict(packages, arch):
|
||||
@@ -51,23 +55,36 @@ if __name__ == "__main__":
|
||||
# Package count sanity check
|
||||
common.get_changed_packages_sanity_check(len(packages))
|
||||
|
||||
# [ci:skip-build]: verify checksums and stop
|
||||
verify_only = common.commit_message_has_string("[ci:skip-build]")
|
||||
if verify_only:
|
||||
print("WARNING: not building changed packages ([ci:skip-build])!")
|
||||
print("verifying checksums: " + ", ".join(packages))
|
||||
verify_checksums(packages, arch)
|
||||
sys.exit(0)
|
||||
|
||||
# Prepare "args" to use pmbootstrap code
|
||||
sys.argv = ["pmbootstrap", "chroot"]
|
||||
# Load context
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
context = get_context()
|
||||
|
||||
# Filter out packages that can't be built for given arch
|
||||
# Get set of all buildable packages for the enabled repos, for skipping unbuildable
|
||||
# aports later. We might be given a changed aport from e.g. extra-repos/systemd when
|
||||
# that repo is not enabled
|
||||
buildable_pkgs = set()
|
||||
for path in pmb.core.pkgrepo.pkgrepo_iter_package_dirs():
|
||||
buildable_pkgs.add(os.path.basename(path))
|
||||
|
||||
# To store a list of packages from extra-repos/systemd for special handling later:
|
||||
systemd_pkgs = list()
|
||||
|
||||
# Filter out packages that either:
|
||||
# 1. can't be built for given arch
|
||||
# 2. are not found in enabled repos
|
||||
# (Iterate over copy of packages, because we modify it in this loop)
|
||||
for package in packages.copy():
|
||||
apkbuild_path = pmb.helpers.pmaports.find(args, package)
|
||||
apkbuild = pmb.parse._apkbuild.apkbuild(f"{apkbuild_path}/APKBUILD")
|
||||
if package not in buildable_pkgs:
|
||||
print(f"{package}: not in any available repos, skipping")
|
||||
packages.remove(package)
|
||||
# FIXME: this should probably be more generic, if other repos are added later?
|
||||
# This just tosses the package into the list of packages to try building later w/ systemd enabled, and assumes it'll be found there.
|
||||
systemd_pkgs.append(package)
|
||||
continue
|
||||
|
||||
apkbuild_path = pmb.helpers.pmaports.find(package)
|
||||
apkbuild = pmb.parse._apkbuild.apkbuild(pathlib.Path(apkbuild_path, "APKBUILD"))
|
||||
|
||||
if not pmb.helpers.pmaports.check_arches(apkbuild["arch"], arch):
|
||||
print(f"{package}: not enabled for {arch}, skipping")
|
||||
@@ -76,8 +93,31 @@ if __name__ == "__main__":
|
||||
# No packages: skip build
|
||||
if len(packages) == 0:
|
||||
print(f"no packages changed, which can be built for {arch}")
|
||||
sys.exit(0)
|
||||
|
||||
# Build packages
|
||||
print(f"building in strict mode for {arch}: {', '.join(packages)}")
|
||||
build_strict(packages, arch)
|
||||
else:
|
||||
verify_only = common.commit_message_has_string("[ci:skip-build]")
|
||||
if verify_only:
|
||||
# [ci:skip-build]: verify checksums and stop
|
||||
print("WARNING: not building changed packages ([ci:skip-build])!")
|
||||
print("verifying checksums: " + ", ".join(packages))
|
||||
verify_checksums(packages, arch)
|
||||
else:
|
||||
# Build packages
|
||||
print(f"building in strict mode for {arch}: {', '.join(packages)}")
|
||||
build_strict(packages, arch)
|
||||
|
||||
# Build packages in extra-repos/systemd
|
||||
# FIXME: this should probably be more generic, if other repos are added later?
|
||||
if systemd_pkgs:
|
||||
common.run_pmbootstrap(["config", "systemd", "always"])
|
||||
|
||||
verify_only = common.commit_message_has_string("[ci:skip-build]")
|
||||
if verify_only:
|
||||
# [ci:skip-build]: verify checksums
|
||||
print("WARNING: not building changed packages for extra-repos/systemd: ([ci:skip-build])!")
|
||||
print("verifying checksums: " + ", ".join(systemd_pkgs))
|
||||
verify_checksums(systemd_pkgs, arch)
|
||||
else:
|
||||
# Build packages
|
||||
print(f"building in strict mode for {arch}, from extra-repos/systemd: {', '.join(systemd_pkgs)}")
|
||||
build_strict(systemd_pkgs, arch)
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pathlib
|
||||
import tempfile
|
||||
import sys
|
||||
import subprocess
|
||||
@@ -15,8 +16,9 @@ import add_pmbootstrap_to_import_path # noqa
|
||||
import pmb.parse
|
||||
import pmb.parse.version
|
||||
import pmb.helpers.logging
|
||||
from pmb.core.context import get_context
|
||||
|
||||
def get_package_contents(args, package, revision, check=True):
|
||||
def get_package_contents(package, revision, check=True):
|
||||
# Redirect stderr to /dev/null, so git doesn't complain about files not
|
||||
# existing in upstream branch for new packages
|
||||
stderr = None
|
||||
@@ -37,15 +39,16 @@ def get_package_contents(args, package, revision, check=True):
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
with open(tempdir + "/APKBUILD", "w", encoding="utf-8") as handle:
|
||||
handle.write(apkbuild_content)
|
||||
parsed = pmb.parse.apkbuild(tempdir + "/APKBUILD", False, False)
|
||||
parsed = pmb.parse.apkbuild(pathlib.Path(tempdir, "APKBUILD"),
|
||||
False, False)
|
||||
|
||||
return parsed
|
||||
|
||||
|
||||
def get_package_version(args, package, revision, check=True):
|
||||
def get_package_version(package, revision, check=True):
|
||||
""" returns version in the format "{pkgver}-r{pkgrel}", or None if no
|
||||
matching package is found """
|
||||
parsed = get_package_contents(args, package, revision, check)
|
||||
parsed = get_package_contents(package, revision, check)
|
||||
if parsed is None:
|
||||
return None
|
||||
return parsed["pkgver"] + "-r" + parsed["pkgrel"]
|
||||
@@ -91,7 +94,7 @@ def exit_with_error_message():
|
||||
exit(1)
|
||||
|
||||
|
||||
def check_versions(args, packages):
|
||||
def check_versions(packages):
|
||||
error = False
|
||||
|
||||
# Get relevant commits: compare HEAD against upstream branch or HEAD~1
|
||||
@@ -110,8 +113,8 @@ def check_versions(args, packages):
|
||||
|
||||
for package in packages:
|
||||
# Get versions, skip new packages
|
||||
head = get_package_version(args, package, "HEAD")
|
||||
upstream = get_package_version(args, package, commit, False)
|
||||
head = get_package_version(package, "HEAD")
|
||||
upstream = get_package_version(package, commit, False)
|
||||
if not upstream:
|
||||
if head.rpartition('r')[2] != "0":
|
||||
print(f"- {package}: {head} (HEAD) (new package) [ERROR]")
|
||||
@@ -129,8 +132,8 @@ def check_versions(args, packages):
|
||||
|
||||
# Additional checks for device packages
|
||||
if package.startswith('device-'):
|
||||
head_parsed = get_package_contents(args, package, "HEAD", False)
|
||||
upstream_parsed = get_package_contents(args, package, commit, False)
|
||||
head_parsed = get_package_contents(package, "HEAD", False)
|
||||
upstream_parsed = get_package_contents(package, commit, False)
|
||||
|
||||
# checksums did not change
|
||||
if head_parsed["sha512sums"] == upstream_parsed["sha512sums"]:
|
||||
@@ -191,8 +194,12 @@ if __name__ == "__main__":
|
||||
# Initialize args (so we can use pmbootstrap's APKBUILD parsing)
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
pmb.helpers.logging.init(args)
|
||||
context = get_context()
|
||||
|
||||
# pmb.helpers.logging.init(args)
|
||||
pmb.helpers.logging.init(context.log, args.verbose, context.details_to_stdout)
|
||||
|
||||
|
||||
# Verify package versions
|
||||
print("checking changed package versions...")
|
||||
check_versions(args, packages)
|
||||
check_versions(packages)
|
||||
@@ -17,7 +17,7 @@ def check_kconfig(pkgnames):
|
||||
pkgname = pkgnames[i]
|
||||
print(f" ({i+1}/{len(pkgnames)}) {pkgname}")
|
||||
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", pkgname],
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", "--keep-going", pkgname],
|
||||
check=False)
|
||||
|
||||
if p.returncode:
|
||||
@@ -27,7 +27,7 @@ def check_kconfig(pkgnames):
|
||||
|
||||
|
||||
def check_kconfig_all():
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check"], check=False)
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", "--keep-going"], check=False)
|
||||
return p.returncode == 0
|
||||
|
||||
|
||||
|
||||
+4
-8
@@ -36,7 +36,7 @@ def run_git(parameters, check=True, stderr=None):
|
||||
def add_upstream_git_remote():
|
||||
""" Add a remote pointing to postmarketOS/pmaports. """
|
||||
run_git(["remote", "add", "upstream",
|
||||
"https://gitlab.com/postmarketOS/pmaports.git"], False)
|
||||
"https://gitlab.postmarketos.org/postmarketOS/pmaports.git"], False)
|
||||
run_git(["fetch", "-q", "upstream"])
|
||||
|
||||
|
||||
@@ -44,14 +44,10 @@ def commit_message_has_string(needle):
|
||||
return needle in run_git(["show", "-s", "--format=full", "HEAD"])
|
||||
|
||||
|
||||
def run_pmbootstrap(parameters, output_return=False):
|
||||
def run_pmbootstrap(parameters):
|
||||
""" Run pmbootstrap with the pmaports dir as --aports """
|
||||
cmd = ["pmbootstrap", "--aports", get_pmaports_dir()] + parameters
|
||||
stdout = subprocess.PIPE if output_return else None
|
||||
result = subprocess.run(cmd, stdout=stdout, universal_newlines=True)
|
||||
result.check_returncode()
|
||||
if output_return:
|
||||
return result.stdout
|
||||
subprocess.run(cmd, universal_newlines=True, check=True)
|
||||
|
||||
|
||||
def get_upstream_branch():
|
||||
@@ -100,7 +96,7 @@ def get_changed_files(removed=True):
|
||||
commit_head = run_git(["rev-parse", "HEAD"])[:-1]
|
||||
commit_upstream = run_git(["rev-parse", branch_upstream])[:-1]
|
||||
print("commit HEAD: " + commit_head)
|
||||
print(f"commit {branch_upstream}: f{commit_upstream}")
|
||||
print(f"commit {branch_upstream}: {commit_upstream}")
|
||||
|
||||
# Check if we are HEAD on the upstream branch
|
||||
if commit_head == commit_upstream:
|
||||
|
||||
+2
-7
@@ -8,7 +8,7 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh pytest
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
@@ -19,16 +19,11 @@ if [ -z "$(command -v pytest)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wrap pmbootstrap to use this repository for --aports
|
||||
pmaports="$(cd "$(dirname "$0")"/..; pwd -P)"
|
||||
_pmbootstrap="$(command -v pmbootstrap)"
|
||||
pmbootstrap() {
|
||||
"$_pmbootstrap" --aports="$pmaports" "$@"
|
||||
}
|
||||
|
||||
# Make sure that the work folder format is up to date, and that there are no
|
||||
# mounts from aborted test cases (pmbootstrap#1595)
|
||||
pmbootstrap work_migrate
|
||||
pmbootstrap config aports "$pmaports"
|
||||
pmbootstrap -q shutdown
|
||||
|
||||
# Make sure we have a valid device (pmbootstrap#1128)
|
||||
|
||||
@@ -21,11 +21,9 @@ sh_files="
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
./main/postmarketos-mkinitfs-hook-debug-shell/setup_usb_storage.sh
|
||||
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
||||
./main/ttyescape/*.post-install
|
||||
./main/unl0kr/unlock.sh
|
||||
./main/msm-firmware-loader/*.post-install
|
||||
./device/community/soc-qcom-sdm845/call_audio_idle_suspend_workaround.sh
|
||||
|
||||
$(find . -path './main/postmarketos-ui-*/*.sh')
|
||||
|
||||
+19
-10
@@ -2,24 +2,33 @@
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from pathlib import Path
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.helpers.args import init as init_args
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.config
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def args(request):
|
||||
# Initialize args
|
||||
pmaports = os.path.realpath(f"{os.path.dirname(__file__)}/../..")
|
||||
sys.argv = ["pmbootstrap",
|
||||
"--aports", pmaports,
|
||||
"--log", "$WORK/log_testsuite_pmaports.txt"
|
||||
"chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
pmaports = Path(os.path.realpath(f"{os.path.dirname(__file__)}/../.."))
|
||||
args = PmbArgs()
|
||||
args.aports = [pmaports]
|
||||
args.config = pmb.config.defaults["config"]
|
||||
args.timeout = 900
|
||||
args.details_to_stdout = False
|
||||
args.quiet = False
|
||||
args.verbose = True
|
||||
args.offline = False
|
||||
args.action = "init"
|
||||
args.cross = False
|
||||
args.log = None
|
||||
|
||||
# Initialize logging
|
||||
pmb.helpers.logging.init(args)
|
||||
init_args(args)
|
||||
request.addfinalizer(pmb.helpers.logging.logfd.close)
|
||||
return args
|
||||
@@ -11,6 +11,8 @@ import sys
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path, pkgrepo_iglob, pkgrepo_relative_path
|
||||
from pmb.core.arch import Arch
|
||||
|
||||
# Cache for codeowners_parse
|
||||
codeowners_parsed = {}
|
||||
@@ -32,11 +34,11 @@ def device_dependency_check(apkbuild, path):
|
||||
" depends anymore (see pmaports!3478)")
|
||||
|
||||
|
||||
def test_aports_device(args):
|
||||
def test_aports_device():
|
||||
"""
|
||||
Various tests performed on the /device/*/device-* aports.
|
||||
"""
|
||||
for path in glob.iglob(args.aports + "/device/*/device-*/APKBUILD"):
|
||||
for path in pkgrepo_iglob("device/*/device-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
|
||||
# Depends: Require "postmarketos-base"
|
||||
@@ -45,8 +47,7 @@ def test_aports_device(args):
|
||||
if "postmarketos-base" == dependency or "postmarketos-base>" in dependency:
|
||||
depend_flag = True
|
||||
if not depend_flag:
|
||||
raise RuntimeError("Missing 'postmarketos-base' in depends of " +
|
||||
path)
|
||||
raise RuntimeError(f"Missing 'postmarketos-base' in depends of {path}")
|
||||
|
||||
# Depends: Must not have specific packages
|
||||
for depend in apkbuild["depends"]:
|
||||
@@ -54,27 +55,27 @@ def test_aports_device(args):
|
||||
|
||||
# Architecture
|
||||
device = apkbuild["pkgname"][len("device-"):]
|
||||
deviceinfo = pmb.parse.deviceinfo(args, device)
|
||||
if "".join(apkbuild["arch"]) != deviceinfo["arch"]:
|
||||
raise RuntimeError("wrong architecture, please change to arch=\"" +
|
||||
deviceinfo["arch"] + "\": " + path)
|
||||
deviceinfo = pmb.parse.deviceinfo(device)
|
||||
if Arch.from_str("".join(apkbuild["arch"])) != deviceinfo.arch:
|
||||
raise RuntimeError("wrong architecture, please change to arch=\""
|
||||
f"{deviceinfo.arch}\": {path}")
|
||||
if "!archcheck" not in apkbuild["options"]:
|
||||
raise RuntimeError("!archcheck missing in options= line: " + path)
|
||||
raise RuntimeError(f"!archcheck missing in options= line: {path}")
|
||||
|
||||
|
||||
def test_aports_device_kernel(args):
|
||||
def test_aports_device_kernel():
|
||||
"""
|
||||
Verify the kernels specified in the device packages:
|
||||
* Kernel must not be in depends when kernels are in subpackages
|
||||
* Check if only one kernel is defined in depends
|
||||
"""
|
||||
|
||||
aports = pkgrepo_default_path()
|
||||
# Iterate over device aports
|
||||
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
|
||||
for path in aports.glob("device/*/device-*/APKBUILD"):
|
||||
# Parse apkbuild and kernels from subpackages
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
device = apkbuild["pkgname"][len("device-"):]
|
||||
kernels_subpackages = pmb.parse._apkbuild.kernels(args, device)
|
||||
kernels_subpackages = pmb.parse._apkbuild.kernels(device)
|
||||
|
||||
# Parse kernels from depends
|
||||
kernels_depends = []
|
||||
@@ -85,29 +86,29 @@ def test_aports_device_kernel(args):
|
||||
|
||||
# Kernel in subpackages *and* depends
|
||||
if kernels_subpackages:
|
||||
raise RuntimeError("Kernel package '" + depend + "' needs to"
|
||||
raise RuntimeError(f"Kernel package '{depend}' needs to"
|
||||
" be removed when using kernel" +
|
||||
" subpackages: " + path)
|
||||
f" subpackages: {path}")
|
||||
|
||||
# No kernel
|
||||
if not kernels_depends and not kernels_subpackages:
|
||||
raise RuntimeError("Device doesn't have a kernel in depends or"
|
||||
" subpackages: " + path)
|
||||
f" subpackages: {path}")
|
||||
|
||||
# Multiple kernels in depends
|
||||
if len(kernels_depends) > 1:
|
||||
raise RuntimeError("Please use kernel subpackages instead of"
|
||||
" multiple kernels in depends (see"
|
||||
" <https://postmarketos.org/devicepkg>): " +
|
||||
path)
|
||||
f" <https://postmarketos.org/devicepkg>): {path}")
|
||||
|
||||
|
||||
def codeowners_parse(args):
|
||||
def codeowners_parse():
|
||||
global codeowners_parsed
|
||||
|
||||
pattern_prev = None
|
||||
aports = pkgrepo_default_path()
|
||||
|
||||
with open(f"{args.aports}/CODEOWNERS") as h:
|
||||
with open(aports / "CODEOWNERS") as h:
|
||||
for line in h:
|
||||
line = line.rstrip()
|
||||
if not line or line.startswith("#"):
|
||||
@@ -131,12 +132,13 @@ def codeowners_parse(args):
|
||||
pattern_prev = pattern
|
||||
|
||||
|
||||
def require_enough_codeowners_entries(args, path, maintainers):
|
||||
def require_enough_codeowners_entries(path, maintainers):
|
||||
"""
|
||||
:param path: full path to an APKBUILD (e.g. /home/user/…/APKBUILD)
|
||||
:param maintainers: list of one or more maintainers
|
||||
"""
|
||||
path = os.path.relpath(path, args.aports)
|
||||
|
||||
_, path = pkgrepo_relative_path(path)
|
||||
|
||||
nicks = set()
|
||||
for pattern, pattern_nicks in codeowners_parsed.items():
|
||||
@@ -158,36 +160,38 @@ def require_enough_codeowners_entries(args, path, maintainers):
|
||||
f"{path}: make sure that each maintainer is listed in CODEOWNERS!"
|
||||
|
||||
|
||||
def test_aports_maintained(args):
|
||||
# @pytest.mark.xfail # Not all aports have been updated yet
|
||||
def test_aports_maintained():
|
||||
"""
|
||||
Ensure that aports in /device/{main,community} have "Maintainer:" and
|
||||
"Co-Maintainer:" (only required for main) listed in their APKBUILDs. Also
|
||||
check that at least as many are listed in CODEOWNERS.
|
||||
"""
|
||||
codeowners_parse(args)
|
||||
codeowners_parse()
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/device/main/*/APKBUILD"):
|
||||
if '/firmware-' in path:
|
||||
for path in pkgrepo_iglob("device/main/*/APKBUILD"):
|
||||
if 'firmware-' in path.parent.name:
|
||||
continue
|
||||
maintainers = pmb.parse._apkbuild.maintainers(path)
|
||||
assert maintainers and len(maintainers) >= 2, \
|
||||
f"{path} in main needs at least 1 Maintainer and 1 Co-Maintainer"
|
||||
require_enough_codeowners_entries(args, path, maintainers)
|
||||
require_enough_codeowners_entries(path, maintainers)
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/device/community/*/APKBUILD"):
|
||||
if '/firmware-' in path:
|
||||
for path in pkgrepo_iglob("device/community/*/APKBUILD"):
|
||||
if 'firmware-' in path.parent.name:
|
||||
continue
|
||||
maintainers = pmb.parse._apkbuild.maintainers(path)
|
||||
assert maintainers, f"{path} in community needs at least 1 Maintainer"
|
||||
require_enough_codeowners_entries(args, path, maintainers)
|
||||
require_enough_codeowners_entries(path, maintainers)
|
||||
|
||||
|
||||
def test_aports_unmaintained(args):
|
||||
def test_aports_unmaintained():
|
||||
"""
|
||||
Ensure that aports in /device/unmaintained have an "Unmaintained:" comment
|
||||
that describes why the aport is unmaintained.
|
||||
"""
|
||||
for path in glob.iglob(f"{args.aports}/device/unmaintained/*/APKBUILD"):
|
||||
|
||||
for path in pkgrepo_iglob("device/unmaintained/*/APKBUILD"):
|
||||
unmaintained = pmb.parse._apkbuild.unmaintained(path)
|
||||
assert unmaintained, f"{path} should have an Unmaintained: " +\
|
||||
"comment that describes why the package is unmaintained"
|
||||
@@ -10,6 +10,7 @@ import sys
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
|
||||
|
||||
def deviceinfo_obsolete(info):
|
||||
@@ -22,25 +23,25 @@ def deviceinfo_obsolete(info):
|
||||
"weston_pixman_type",
|
||||
]
|
||||
for option in obsolete_options:
|
||||
if option in info and info[option]:
|
||||
if getattr(info, option, None):
|
||||
raise RuntimeError(f"option {option} is obsolete, please rename"
|
||||
" or remove it (see reasons for removal of at"
|
||||
" https://postmarketos.org/deviceinfo)")
|
||||
|
||||
|
||||
def test_deviceinfo(args):
|
||||
def test_deviceinfo():
|
||||
"""
|
||||
Parse all deviceinfo files successfully and run checks on the parsed data.
|
||||
"""
|
||||
# Iterate over all devices
|
||||
last_exception = None
|
||||
count = 0
|
||||
pattern = re.compile("^deviceinfo_[a-zA-Z0-9_]*=\".*\"$")
|
||||
pattern = re.compile("^deviceinfo_[a-zA-Z0-9_]*=\".*\"(\\s*# .*)?$")
|
||||
|
||||
for folder in glob.glob(args.aports + "/device/*/device-*"):
|
||||
device = folder[len(args.aports):].split("-", 1)[1]
|
||||
for folder in pkgrepo_iglob("device/*/device-*"):
|
||||
device = folder.name.split("-", 1)[1]
|
||||
|
||||
f = open(folder[len(args.aports):][1:] + "/deviceinfo")
|
||||
f = open(folder / "deviceinfo")
|
||||
lines = f.read().split("\n")
|
||||
f.close()
|
||||
|
||||
@@ -62,16 +63,16 @@ def test_deviceinfo(args):
|
||||
# Check line against regex (can't use multiple lines etc.)
|
||||
if not pattern.match(line) or line.endswith("\\\""):
|
||||
raise RuntimeError("Line looks invalid, maybe missing"
|
||||
" quotes/multi-line string/comment next"
|
||||
f" to line instead of above? {line}")
|
||||
" quotes/multi-line string/malformed"
|
||||
f" inline comment? {line}")
|
||||
|
||||
# Successful deviceinfo parsing / obsolete options
|
||||
info = pmb.parse.deviceinfo(args, device)
|
||||
info = pmb.parse.deviceinfo(device)
|
||||
deviceinfo_obsolete(info)
|
||||
|
||||
# deviceinfo_name must start with manufacturer
|
||||
name = info["name"]
|
||||
manufacturer = info["manufacturer"]
|
||||
name = info.name
|
||||
manufacturer = info.manufacturer
|
||||
if not name.startswith(manufacturer) and \
|
||||
not name.startswith("Google"):
|
||||
raise RuntimeError("Please add the manufacturer in front of"
|
||||
|
||||
@@ -10,6 +10,7 @@ expected_directories = [
|
||||
"device/community",
|
||||
"device/main",
|
||||
"device/testing",
|
||||
"extra-repos/systemd",
|
||||
"main",
|
||||
"modem",
|
||||
"non-free",
|
||||
@@ -28,7 +29,7 @@ def test_directories():
|
||||
|
||||
|
||||
# Ensure no file in pmaports are executable.
|
||||
# see https://gitlab.com/postmarketOS/pmaports/-/issues/593.
|
||||
# see https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/593.
|
||||
def test_executable_files():
|
||||
for file in glob.iglob("[!temp]**/**/*", recursive=True):
|
||||
if os.path.isdir(file) or os.path.islink(file):
|
||||
|
||||
@@ -7,9 +7,10 @@ import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path, pkgrepo_iglob
|
||||
|
||||
|
||||
def test_aports_firmware(args):
|
||||
def test_aports_firmware():
|
||||
"""
|
||||
Various tests performed on the /**/firmware-* aports.
|
||||
"""
|
||||
@@ -26,9 +27,9 @@ def test_aports_firmware(args):
|
||||
"firmware-xiaomi-willow", # Doesn't build, source link is dead (pma#1212)
|
||||
]
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/**/firmware-*/APKBUILD", recursive=True):
|
||||
for path in pkgrepo_iglob("**/firmware-*/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
aport_name = os.path.basename(os.path.dirname(path))
|
||||
aport_name = os.path.basename(path.parent)
|
||||
|
||||
if aport_name not in excluded:
|
||||
if "pmb:cross-native" not in apkbuild["options"]:
|
||||
|
||||
@@ -15,9 +15,10 @@ import sys
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.config
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs
|
||||
|
||||
|
||||
def get_categorized_packages(args):
|
||||
def get_categorized_packages():
|
||||
"""
|
||||
Parse all aports and categorize them.
|
||||
|
||||
@@ -28,7 +29,7 @@ def get_categorized_packages(args):
|
||||
"""
|
||||
ret = {}
|
||||
|
||||
for path in glob.glob(args.aports + "/*/*/APKBUILD"):
|
||||
for path in pkgrepo_iter_package_dirs():
|
||||
# Parse APKBUILD
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
url = apkbuild["url"]
|
||||
@@ -109,10 +110,10 @@ def check_categories(categories):
|
||||
return ret
|
||||
|
||||
|
||||
def test_framework_versions(args):
|
||||
def test_framework_versions():
|
||||
"""
|
||||
Make sure that packages of the same framework have the same version.
|
||||
"""
|
||||
categories = get_categorized_packages(args)
|
||||
categories = get_categorized_packages()
|
||||
if not check_categories(categories):
|
||||
raise RuntimeError("Framework version check failed!")
|
||||
@@ -11,17 +11,21 @@ from pathlib import Path
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob, pkgrepo_relative_path
|
||||
|
||||
|
||||
def test_aports_kernel(args):
|
||||
def test_aports_kernel():
|
||||
"""
|
||||
Various tests performed on the /**/linux-* aports.
|
||||
"""
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/**/linux-*/APKBUILD", recursive=True):
|
||||
for path in pkgrepo_iglob("**/linux-*/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
aport_name = os.path.basename(os.path.dirname(path))
|
||||
|
||||
if aport_name == "linux-pam":
|
||||
continue # This package isn't a linux kernel!
|
||||
|
||||
if "pmb:cross-native" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"{aport_name}: \"pmb:cross-native\" missing in"
|
||||
" options= line")
|
||||
@@ -37,14 +41,15 @@ def test_aports_kernel(args):
|
||||
" automatically.")
|
||||
|
||||
# check some options only for main and community devices
|
||||
for dir in ["main", "device/main", "device/community"]:
|
||||
if path.startswith(f"{args.aports}/{dir}"):
|
||||
_, relpath = pkgrepo_relative_path(path)
|
||||
for part in ["main", "community"]:
|
||||
if part in relpath.parts:
|
||||
if "pmb:kconfigcheck-community" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"{aport_name}: \"pmb:kconfigcheck-community\" missing in"
|
||||
" options= line, required for all community/main devices.")
|
||||
|
||||
# check for postmarketos-installkernel in makedepends when installing kernel with make
|
||||
if bool(re.search("make z?install", Path(path).read_text(encoding="utf-8"))):
|
||||
if bool(re.search("make z?install", path.read_text(encoding="utf-8"))):
|
||||
if "postmarketos-installkernel" not in apkbuild["makedepends"]:
|
||||
raise RuntimeError(f"{aport_name}: \"postmarketos-installkernel\" missing in"
|
||||
" makedepends, required when using make install/zinstall.")
|
||||
@@ -10,6 +10,7 @@ import sys
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs, pkgrepo_relative_path
|
||||
|
||||
|
||||
def apkbuild_check_provides(path, apkbuild, version, pkgname, subpkgname=None):
|
||||
@@ -65,13 +66,14 @@ def apkbuild_check_provides(path, apkbuild, version, pkgname, subpkgname=None):
|
||||
return ret
|
||||
|
||||
|
||||
def test_provides(args):
|
||||
def test_provides():
|
||||
errors = []
|
||||
for path in glob.iglob(f"{args.aports}/**/APKBUILD", recursive=True):
|
||||
for path in pkgrepo_iter_package_dirs():
|
||||
path = path / "APKBUILD"
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
pkgname = apkbuild["pkgname"]
|
||||
version = f"{apkbuild['pkgver']}-r{apkbuild['pkgrel']}"
|
||||
path_rel = os.path.relpath(path, args.aports)
|
||||
_, path_rel = pkgrepo_relative_path(path)
|
||||
errors += apkbuild_check_provides(path_rel, apkbuild, version, pkgname)
|
||||
|
||||
for subpkg, subpkg_data in apkbuild["subpackages"].items():
|
||||
|
||||
@@ -14,9 +14,10 @@ import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.repo
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs, pkgrepo_relative_path
|
||||
|
||||
|
||||
def parse_source_from_checksums(args, apkbuild_path):
|
||||
def parse_source_from_checksums(apkbuild_path):
|
||||
"""
|
||||
Read the APKBUILD file and parse source files from the checksums at the
|
||||
bottom. This has always the same format, even if $source is built with hard
|
||||
@@ -64,17 +65,20 @@ def parse_source_from_checksums(args, apkbuild_path):
|
||||
return ret
|
||||
|
||||
|
||||
def test_aports_unreferenced_files(args):
|
||||
def test_aports_unreferenced_files():
|
||||
"""
|
||||
Raise an error if an unreferenced file is found
|
||||
"""
|
||||
for apkbuild_path in glob.iglob(args.aports + "/**/APKBUILD", recursive=True):
|
||||
for apkbuild_path in pkgrepo_iter_package_dirs():
|
||||
# pmbootstrap parser has some issues with complicated APKBUILDs, skip those.
|
||||
if apkbuild_path.startswith(args.aports + "/cross/"):
|
||||
_, relpath = pkgrepo_relative_path(apkbuild_path)
|
||||
if relpath.parts[0] == "cross":
|
||||
continue
|
||||
|
||||
apkbuild_path = apkbuild_path / "APKBUILD"
|
||||
|
||||
apkbuild = pmb.parse.apkbuild(apkbuild_path)
|
||||
sources_chk = parse_source_from_checksums(args, apkbuild_path)
|
||||
sources_chk = parse_source_from_checksums(apkbuild_path)
|
||||
|
||||
# Collect files from subpackages
|
||||
subpackage_installs = []
|
||||
@@ -105,7 +109,7 @@ def test_aports_unreferenced_files(args):
|
||||
raise RuntimeError(f"{apkbuild_path}: found unreferenced file: {rel_file_path}")
|
||||
|
||||
|
||||
def test_distfiles_conflict(args):
|
||||
def test_distfiles_conflict():
|
||||
"""
|
||||
Make sure that each filename mentioned in any source= of any APKBUILD
|
||||
always has the same checksum. This is important because apk caches
|
||||
@@ -115,10 +119,11 @@ def test_distfiles_conflict(args):
|
||||
with a checksum error.
|
||||
"""
|
||||
source_all = {}
|
||||
for apkbuild_path in glob.iglob(f"{args.aports}/**/APKBUILD", recursive=True):
|
||||
source = parse_source_from_checksums(args, apkbuild_path)
|
||||
for apkbuild_path in pkgrepo_iter_package_dirs():
|
||||
apkbuild_path = apkbuild_path / "APKBUILD"
|
||||
source = parse_source_from_checksums(apkbuild_path)
|
||||
dir_path = os.path.dirname(apkbuild_path)
|
||||
apkbuild_rel = os.path.relpath(apkbuild_path, args.aports)
|
||||
_, apkbuild_rel = pkgrepo_relative_path(apkbuild_path)
|
||||
for filename, checksum in source.items():
|
||||
# Files bundled with the APKBUILD don't get copied to the distfiles
|
||||
# cache, so not relevant for this check. Use glob.glob here and not
|
||||
|
||||
@@ -9,25 +9,26 @@ import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
|
||||
|
||||
def test_aports_ui(args):
|
||||
def test_aports_ui():
|
||||
"""
|
||||
Raise an error if package in _pmb_recommends is not found
|
||||
"""
|
||||
pmaports_cfg = pmb.config.pmaports.read_config(args)
|
||||
pmaports_cfg = pmb.config.pmaports.read_config()
|
||||
|
||||
for arch in pmaports_cfg["supported_arches"].split(","):
|
||||
for path in glob.iglob(args.aports + "/main/postmarketos-ui-*/APKBUILD"):
|
||||
for path in pkgrepo_iglob("main/postmarketos-ui-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
# Skip if arch isn't enabled
|
||||
if not pmb.helpers.package.check_arch(args, apkbuild["pkgname"], arch, False):
|
||||
if not pmb.helpers.package.check_arch(apkbuild["pkgname"], arch, False):
|
||||
continue
|
||||
|
||||
for package in apkbuild["_pmb_recommends"]:
|
||||
depend = pmb.helpers.package.get(args, package,
|
||||
depend = pmb.helpers.package.get(package,
|
||||
arch, must_exist=False)
|
||||
if depend is None or not pmb.helpers.package.check_arch(args, package, arch):
|
||||
if depend is None or not pmb.helpers.package.check_arch(package, arch):
|
||||
raise RuntimeError(f"{path}: package '{package}' from"
|
||||
f" _pmb_recommends not found for arch '{arch}'")
|
||||
|
||||
@@ -35,8 +36,8 @@ def test_aports_ui(args):
|
||||
if f"{apkbuild['pkgname']}-extras" in apkbuild["subpackages"]:
|
||||
apkbuild = apkbuild["subpackages"][f"{apkbuild['pkgname']}-extras"]
|
||||
for package in apkbuild["_pmb_recommends"]:
|
||||
depend = pmb.helpers.package.get(args, package,
|
||||
depend = pmb.helpers.package.get(package,
|
||||
arch, must_exist=False)
|
||||
if depend is None or not pmb.helpers.package.check_arch(args, package, arch):
|
||||
if depend is None or not pmb.helpers.package.check_arch(package, arch):
|
||||
raise RuntimeError(f"{path}: package '{package}' from _pmb_recommends "
|
||||
f"of -extras subpackage is not found for arch '{arch}'")
|
||||
@@ -12,3 +12,8 @@ indent_style = tab
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
# Forked from Alpine
|
||||
[extra-repos/systemd/networkmanager/networkmanager.rules]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
+12
-2
@@ -65,7 +65,7 @@ is_symlink() {
|
||||
# available in git tree and checksums are correct.
|
||||
check_local_sources() {
|
||||
local apkbuild="$1"
|
||||
local startdir="${apkbuild%/*}"
|
||||
local startdir="$2"
|
||||
local status=0
|
||||
local checksum_act checksum_exp content filename line sources
|
||||
|
||||
@@ -109,11 +109,21 @@ check_file_size() {
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
[ -f "$_staged" ] && rm "$_staged"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
for apkbuild in $(changed_files '**/APKBUILD'); do
|
||||
check_local_sources "$apkbuild"
|
||||
_staged="$(mktemp)"
|
||||
git show ":$apkbuild" >"$_staged"
|
||||
check_local_sources "$_staged" "${apkbuild%/*}"
|
||||
cleanup
|
||||
done
|
||||
|
||||
for path in $(changed_files); do
|
||||
check_file_size "$path"
|
||||
done
|
||||
|
||||
trap - EXIT
|
||||
+18
-15
@@ -10,7 +10,12 @@ stages:
|
||||
- lint
|
||||
- build
|
||||
- autoupdate
|
||||
|
||||
variables:
|
||||
# Default of 20 is pretty small, sometimes MRs have >20 commits in them. 100
|
||||
# seems like a reasonable balance. If this is too low, git merge-base (from ci/
|
||||
# common.py) can fail
|
||||
GIT_DEPTH: 100
|
||||
|
||||
# This defines the rules for when a pipeline should run.
|
||||
workflow:
|
||||
rules:
|
||||
@@ -26,7 +31,7 @@ workflow:
|
||||
wiki:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: &mr_rule $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- .ci/**/*
|
||||
- .gitlab-ci.yml
|
||||
@@ -39,7 +44,7 @@ wiki:
|
||||
ruff:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- .ci/*
|
||||
- .ci/*/*
|
||||
@@ -53,7 +58,7 @@ shellcheck-grep:
|
||||
stage: lint
|
||||
image: alpine:edge
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/shellcheck.sh
|
||||
@@ -64,7 +69,7 @@ editor-config:
|
||||
stage: lint
|
||||
image: alpine:edge
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/ec.sh
|
||||
@@ -73,7 +78,7 @@ editor-config:
|
||||
pytest-commits:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/pytest.sh
|
||||
@@ -90,7 +95,7 @@ pytest-commits:
|
||||
aport-lint:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/apkbuild-lint.sh
|
||||
@@ -100,11 +105,13 @@ aport-lint:
|
||||
kernel-kconfig:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- kconfigcheck.toml
|
||||
allow_failure: true
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- device/*/linux-*/config-*
|
||||
- main/linux-*/config-*
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/kconfig.sh
|
||||
@@ -119,16 +126,14 @@ mr-settings:
|
||||
- *global_before_scripts
|
||||
- apk -q add python3
|
||||
script:
|
||||
- wget -q "https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py"
|
||||
- wget -q "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/check_mr_settings.py"
|
||||
- python3 ./check_mr_settings.py
|
||||
|
||||
# build changed aports
|
||||
.build:
|
||||
stage: build
|
||||
tags:
|
||||
- saas-linux-large-amd64
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
- if: *mr_rule
|
||||
before_script:
|
||||
- *global_before_scripts
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
@@ -152,8 +157,6 @@ build-x86:
|
||||
|
||||
build-aarch64:
|
||||
extends: .build
|
||||
tags:
|
||||
- saas-linux-large-arm64
|
||||
script:
|
||||
- .ci/build-aarch64.sh
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!-- Use this template to kick off the discussion for changing one or more
|
||||
related kernel config options.
|
||||
-->
|
||||
|
||||
### Read the fine manual, please :)
|
||||
|
||||
- [ ] I have read https://postmarketos.org/kconfig-adjust-multiple
|
||||
|
||||
### What benefit does the change have?
|
||||
|
||||
### Which option(s) would you like to change?
|
||||
|
||||
<!-- Make sure to specify if you would like to enable/disable/set a value. -->
|
||||
|
||||
### Did you already test that this works as expected?
|
||||
|
||||
<!-- Not required, but recommended. If you did test it, please list which
|
||||
device you have tested it with. -->
|
||||
|
||||
### For which kernel configs would you do the change?
|
||||
|
||||
<!-- If it makes sense, we encourage to adjust all kernels used by devices in
|
||||
the main and community categories, so devices behave consistently. -->
|
||||
|
||||
- [ ] all in main and community
|
||||
- [ ] certain SoC(s):
|
||||
- [ ] other (please specify):
|
||||
|
||||
|
||||
<!-- leave this, so it applies the correct label in gitlab -->
|
||||
/label ~"change-kernel-config"
|
||||
@@ -27,8 +27,8 @@
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v24.06`
|
||||
* [ ] `v23.12` (supported until 2024-07-16)
|
||||
* [ ] `v24.12`
|
||||
* [ ] `v24.06` (supported until 2025-01-23)
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
* [ ] Plasma Mobile
|
||||
* [ ] Sxmo (Wayland/Sway) **Please post the output of `sxmo_version.sh`**
|
||||
* [ ] Other: **Please fill out**
|
||||
### Which init system are you using?
|
||||
* [ ] OpenRC
|
||||
* [ ] systemd
|
||||
### How did you get postmarketOS image?
|
||||
* [ ] from https://images.postmarketos.org
|
||||
* [ ] I built it using pmbootstrap
|
||||
|
||||
+22
-2
@@ -31,24 +31,34 @@ device/*/*-pine64-pinephonepro/ @PsychoGame
|
||||
device/*/*-pine64-rockpro64/ @PureTryOut
|
||||
device/*/*-purism-librem5/ @craftyguy @alistair23 @Newbyte
|
||||
device/*/*-qcom-msm8916/ @Minecrell @TravMurav
|
||||
device/*/*-qcom-msm8953/ @barni2000 @alikates @vipaoL @jiaxyga
|
||||
device/*/*-qcom-sdm670/ @flamingradian
|
||||
device/*/*-qcom-sdm845/ @sdm845-mainline
|
||||
device/*/*-qcom-sm6350/ @z3ntu
|
||||
device/*/*-qcom-sm8250/ @jianhua
|
||||
device/*/*-samsung-a3/ @Mis012 @TravMurav @Minecrell
|
||||
device/*/*-samsung-a5/ @Minecrell @minlexx
|
||||
device/*/*-samsung-a51/ @manoedinata
|
||||
device/*/*-samsung-e7/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-espresso10/ @MightyM17
|
||||
device/*/*-samsung-espresso7/ @MightyM17 @antoni.aloytorrens
|
||||
device/*/*-samsung-fortuna/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-fortunaltezt/ @bolilingmeng89006
|
||||
device/*/*-samsung-grandmax/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-gt510/ @TravMurav
|
||||
device/*/*-samsung-gt58/ @TravMurav
|
||||
device/*/*-samsung-j3ltetw/ @bolilingmeng89006
|
||||
device/*/*-samsung-j4lte/ @manoedinata
|
||||
device/*/*-samsung-j5/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-j5x/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-rossa/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-serranove/ @Minecrell
|
||||
device/*/*-tolino-shine2hd/ @akemnade
|
||||
device/*/*-videostrong-kii-pro/ @funderscore
|
||||
device/*/*-wileyfox-crackling/ @TravMurav @Minecrell
|
||||
device/*/*-xiaomi-beryllium/ @joelselvaraj
|
||||
device/*/*-xiaomi-daisy/ @joelselvaraj @alikates
|
||||
device/*/*-xiaomi-elish/ @jianhua
|
||||
device/*/*-xiaomi-markw/ @vipaoL
|
||||
device/*/*-xiaomi-mido/ @barni2000
|
||||
device/*/*-xiaomi-scorpio/ @Tooniis
|
||||
@@ -57,12 +67,15 @@ device/*/*-xiaomi-vince/ @M0Rf30
|
||||
device/*/*-xiaomi-wt88047/ @Minecrell
|
||||
device/*/*-xiaomi-ysl/ @barni2000
|
||||
device/*/alsa-ucm-conf-cros/ @WeirdTreeThing
|
||||
device/*/alsa-ucm-conf-qcom-sdm670/ @flamingradian
|
||||
device/*/device-apple-n61/ @JustSoup321
|
||||
device/*/device-fairphone-*/ @z3ntu
|
||||
device/*/device-generic-x86_64/ @craftyguy @ollieparanoid
|
||||
device/*/device-google-nyan-big/ @jenneron
|
||||
device/*/device-google-nyan-blaze/ @jenneron
|
||||
device/*/device-google-peach-pi/ @jenneron
|
||||
device/*/device-google-peach-pit/ @jenneron
|
||||
device/*/device-google-sargo/ @flamingradian
|
||||
device/*/device-google-snow/ @jenneron
|
||||
device/*/device-huawei-plank/ @gtrxAC
|
||||
device/*/device-lg-judyln/ @Newbyte
|
||||
@@ -78,6 +91,7 @@ device/*/device-qemu-aarch64/ @Minecrell @ollieparanoid
|
||||
device/*/device-qemu-amd64/ @Minecrell @ollieparanoid
|
||||
device/*/device-qemu-riscv64/ @Minecrell @z3ntu
|
||||
device/*/device-qualcomm-sdm845/ @calebccff
|
||||
device/*/device-raspberry-pi3/ @fossdd
|
||||
device/*/device-samsung-chagallwifi/ @Grimler
|
||||
device/*/device-samsung-coreprimevelte/ @legolivesmatter @balejk
|
||||
device/*/device-samsung-j5y17lte/ @andrisas
|
||||
@@ -86,7 +100,10 @@ device/*/device-samsung-lt01/ @knuxify
|
||||
device/*/device-samsung-m0/ @Newbyte
|
||||
device/*/device-samsung-manta/ @jenneron @alexmrqt
|
||||
device/*/device-shift-axolotl/ @amartinz @calebccff @dylanvanassche
|
||||
device/*/device-solidrun-cubox/ @longnoserob
|
||||
device/*/firmware-google-sargo/ @flamingradian
|
||||
device/*/firmware-google-veyron-brcm/ @jenneron
|
||||
device/*/firmware-motorola-osprey/ @Minecrell
|
||||
device/*/firmware-odroid-xu4/ @Grimler
|
||||
device/*/firmware-oneplus-sdm845/ @calebccff
|
||||
device/*/firmware-powervr-gx6250/ @jenneron
|
||||
@@ -97,13 +114,16 @@ device/*/linux-huawei-plank/ @gtrxAC
|
||||
device/*/linux-next/ @calebccff
|
||||
device/*/linux-postmarketos-allwinner/ @Arnavion @PsychoGame
|
||||
device/*/linux-postmarketos-amlogic/ @funderscore @exkc
|
||||
device/*/linux-postmarketos-apple/ @JustSoup321
|
||||
device/*/linux-postmarketos-exynos4/ @Newbyte @Grimler @knuxify
|
||||
device/*/linux-postmarketos-exynos5/ @jenneron @Grimler
|
||||
device/*/linux-postmarketos-grate/ @clamor-s @jenneron @jethrob
|
||||
device/*/linux-postmarketos-imx-ereader/ @akemnade
|
||||
device/*/linux-postmarketos-marvell/ @longnoserob @exkc
|
||||
device/*/linux-postmarketos-mediatek-mt8173/ @jenneron @adamthiede
|
||||
device/*/linux-postmarketos-mediatek-mt8183/ @jenneron @binarycraft
|
||||
device/*/linux-postmarketos-omap/ @MightyM17 @Sicelo
|
||||
device/*/linux-postmarketos-qcom-laptop/ @craftyguy @calebccff
|
||||
device/*/linux-postmarketos-qcom-msm8939/ @Newbyte
|
||||
device/*/linux-postmarketos-qcom-msm8953/ @M0Rf30 @Ultra-azu @barni2000
|
||||
device/*/linux-postmarketos-qcom-msm8996/ @Tooniis
|
||||
@@ -127,10 +147,10 @@ device/*/u-boot-librem5/ @craftyguy @alistair23 @Newbyte
|
||||
device/*/u-boot-pinebookpro/ @QC8086
|
||||
device/*/u-boot-pinephone/ @Arnavion @PsychoGame
|
||||
device/*/wl1251-cal/ @Danct12
|
||||
main/postmarketos*gnome*/ @pabloyoyoista @Newbyte
|
||||
main/postmarketos*gnome*/ @pabloyoyoista @Newbyte @fossdd
|
||||
main/postmarketos-initramfs/ @calebccff @craftyguy
|
||||
main/postmarketos-ui-i3wm/ @fossdd
|
||||
main/postmarketos-ui-phosh/ @pabloyoyoista @Newbyte
|
||||
main/postmarketos-ui-phosh/ @pabloyoyoista @Newbyte @fossdd
|
||||
main/postmarketos-ui-plasma-mobile/ @PureTryOut
|
||||
main/shutdown-clear-rtc-wakealarm/ @Arnavion
|
||||
main/ttyescape/ @calebccff
|
||||
@@ -1,4 +1,8 @@
|
||||
# postmarketOS aports
|
||||
# postmarketOS aports repository
|
||||
|
||||
This repository contains the APKBUILD files for postmarketOS-specific packages, along with the required patches and scripts, if any.
|
||||
|
||||
There are many more packages defined in the [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/) on which these packages depend.
|
||||
|
||||
Helpful resources:
|
||||
* [How to create a package](https://wiki.postmarketos.org/wiki/Create_a_package)
|
||||
|
||||
+7
-1
@@ -8,8 +8,14 @@ branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v24.06]
|
||||
[v24.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v24.12
|
||||
branch_aports=3.21-stable
|
||||
mirrordir_alpine=v3.21
|
||||
|
||||
[v24.06]
|
||||
description=Old release (supported until 2025-01-23)
|
||||
branch_pmaports=v24.06
|
||||
branch_aports=3.20-stable
|
||||
mirrordir_alpine=v3.20
|
||||
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.36.1
|
||||
pkgrel=31
|
||||
pkgver=1.37.0
|
||||
pkgrel=10
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c34906bb0a5d7e268ab43ca1e3e2f9c75c06f3f5de8d41671396bcd7d585a79a66e25ad43e80a3e107a1de0ecaf83ac7198163d3e775edbd6d626ef014307ec5 busybox-static-1.36.1-r31-aarch64-edge.apk
|
||||
b71a091d7ae6ee459dd0c51409793214a2285ee83c2621e289e198187ed642222d6f842f08661a8c72f96c9a0dc7271d5a47ab6794e2551f185d68f515bde598 busybox-static-1.37.0-r10-aarch64-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.36.1
|
||||
pkgrel=31
|
||||
pkgver=1.37.0
|
||||
pkgrel=10
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7e6a961a0adcbc2912f5b261ce84a62b9189dce49c5dd3d2bcbdae407645dec72c27af8804c1d5446d50e78ea938a4d812c477db199ed83cac7c647c4b41f3fe busybox-static-1.36.1-r31-armhf-edge.apk
|
||||
88abaead7eace4910199e0cc76bc16bce762d61b2e10e1bc2a631d38e56458f5cb95f98f09d09f346229f9c6c982d3b0b3f907315f54e0e92b83dcc3b839d8bf busybox-static-1.37.0-r10-armhf-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.36.1
|
||||
pkgrel=31
|
||||
pkgver=1.37.0
|
||||
pkgrel=10
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b9736dc7df4230196bf05de3bd76b61fc689c56861bc7c5194cd310e23f513cec649c1b3e3f338266b8d58540468d97e8525948a3efc2d1af53e288cd525e836 busybox-static-1.36.1-r31-armv7-edge.apk
|
||||
5bbeb8a0331f25569acc32d574290ec430f0a2a74190550b3913f3e7366082a76b9755c0d52bec57659a2bbd1af3f4fe5928ec988b283a2e731c902cd5e7aa85 busybox-static-1.37.0-r10-armv7-edge.apk
|
||||
"
|
||||
@@ -19,7 +19,7 @@
|
||||
# version is implemented as simple shell wrappers.
|
||||
|
||||
pkgname=crossdirect
|
||||
pkgver=5.1.0
|
||||
pkgver=5.2.0
|
||||
pkgrel=0
|
||||
pkgdesc="Wrappers to launch native cross compilers in foreign chroots"
|
||||
url="https://postmarketOS.org"
|
||||
@@ -82,7 +82,7 @@ package() {
|
||||
|
||||
sha512sums="
|
||||
0f4b48f250425dc57f63955fc8b38477d23db793bee367c3fbe03c3d2a559ba576434d07518310db4cae9d90d501af4051b80038b10fae94b980e537fc9374ad cargo.sh
|
||||
500107e5aff8b34e74b54982ebcd447fc41bc8283956d506561b031a055cb30ec12698047c2604918b4b6d8560fe03db427a63dff2b83c907e8494b7f5233f29 crossdirect.c
|
||||
b2e602b7fc95ed403d29f0d754879d5f773c39ee33e726bb10cff17b3c088406dac84f2ca6d8ad563c64370007d98af805d6ee9cd4a06fe3d4c61c0cb90c5c0c crossdirect.c
|
||||
de2aa6929bbff5db9132673e667f4525b333d062cb1f7a0597dd924de9e5c7215a9f8e2e6263b6fb5ace06f2c4b64f4ebfd0ede9b78add07c2cd08ec8613e98f rustc.sh
|
||||
ea9bf8db3810d03d0a7395057f3d6e57f7127d87c55deaedc171c255288f5f3cc6fbcc680a5a1b92786cf573875d5dc22521173799fe2639acc97d0715ff905b rust-qemu-linker.sh
|
||||
"
|
||||
@@ -43,9 +43,8 @@
|
||||
|
||||
void exit_userfriendly()
|
||||
{
|
||||
fprintf(stderr, "Please report this at: https://gitlab.com/postmarketOS/pmaports/issues\n");
|
||||
fprintf(stderr, "As a workaround, you can compile without crossdirect.\n");
|
||||
fprintf(stderr, "See 'pmbootstrap -h' for related options.\n");
|
||||
fprintf(stderr, "Please report this at: https://gitlab.postmarketos.org/postmarketOS/pmaports/issues\n");
|
||||
fprintf(stderr, "As a workaround, you can compile without crossdirect with options=\"!pmb:crossdirect\".\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -118,11 +117,17 @@ int main(int argc, char **argv)
|
||||
NULL };
|
||||
char *ldPreload = getenv("LD_PRELOAD");
|
||||
if (ldPreload) {
|
||||
if (strcmp(ldPreload, "/usr/lib/libfakeroot.so") == 0) {
|
||||
env[0] = "LD_PRELOAD=/native/usr/lib/libfakeroot.so";
|
||||
} else {
|
||||
fprintf(stderr, "ERROR: crossdirect: can't handle LD_PRELOAD: %s\n", ldPreload);
|
||||
exit_userfriendly();
|
||||
if (strstr(ldPreload, "libfakeroot.so")) {
|
||||
fprintf(stderr, "============================================================================================\n");
|
||||
fprintf(stderr, "ERROR: crossdirect was called with: LD_PRELOAD=%s\n", ldPreload);
|
||||
fprintf(stderr, "This means your package tried to run a compiler during package().\n");
|
||||
fprintf(stderr, "This is not supported by crossdirect, and usually not a good idea.\n");
|
||||
fprintf(stderr, "* Try to fix your APKBUILD so it does not run the compiler during package(), only in build()\n");
|
||||
fprintf(stderr, " * If you're using 'meson install', try to add '--no-rebuild'\n");
|
||||
fprintf(stderr, "* If this is not possible, you can work around it by setting options=\"!pmb:crossdirect\"\n");
|
||||
fprintf(stderr, " (compilation will be slower!)\n");
|
||||
fprintf(stderr, "============================================================================================\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@ Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/Makefile.rtl | 16 ++++++++--------
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
4 files changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
index 32cbdb692..463028fbe 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
|
||||
g-sercom.adb<libgnat/g-sercom__linux.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-loongarch.ads
|
||||
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +41,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -50,7 +59,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
|
||||
s-osinte.ads<libgnarl/s-osinte__linux.ads \
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -59,7 +68,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -69,10 +87,10 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
index 74aa3c412..ef6118f37 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -94,6 +94,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
@@ -84,7 +102,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -92,7 +110,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -101,7 +119,7 @@ index 8522094164e..92b230a462b 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -143,7 +161,7 @@ index 8522094164e..92b230a462b 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +191,7 @@ index 8522094164e..92b230a462b 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
index 0cbfd0e15..f97ed905b 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -195,10 +213,10 @@ index 987432c9307..4d782f07de9 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
index 05af82c27..626ac35bc 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -207,7 +225,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -216,7 +234,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -227,6 +245,3 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: Celeste <cielesti@protonmail.com>
|
||||
Date: Mon, 2 Sep 2024 02:54:17 +0000
|
||||
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
|
||||
|
||||
Add musl support for these 2 architectures based on fenv.h and signal.h from:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
|
||||
---
|
||||
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
|
||||
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
index a7364c0a..5b327e4a 100644
|
||||
--- a/libphobos/libdruntime/core/stdc/fenv.d
|
||||
+++ b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
|
||||
ushort __cs_selector;
|
||||
ushort __opcode;
|
||||
uint __data_offset;
|
||||
ushort __data_selector;
|
||||
ushort __unused5;
|
||||
version (X86_64)
|
||||
uint __mxcsr;
|
||||
}
|
||||
alias ushort fexcept_t;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ alias uint fenv_t;
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ struct fenv_t
|
||||
+ {
|
||||
+ uint __cw;
|
||||
+ }
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
static assert(false, "Architecture not supported.");
|
||||
}
|
||||
}
|
||||
else version (CRuntime_Newlib)
|
||||
{
|
||||
version (AArch64)
|
||||
{
|
||||
alias fenv_t = ulong;
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
index a8b7f751..78d8b3cd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
|
||||
else version (PPC_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 4096;
|
||||
enum SIGSTKSZ = 10240;
|
||||
}
|
||||
else version (X86_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 2048;
|
||||
enum SIGSTKSZ = 8192;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 2048;
|
||||
+ enum SIGSTKSZ = 8192;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 4096;
|
||||
+ enum SIGSTKSZ = 16384;
|
||||
+ }
|
||||
else
|
||||
static assert(0, "unimplemented");
|
||||
|
||||
//ucontext_t (defined in core.sys.posix.ucontext)
|
||||
//mcontext_t (defined in core.sys.posix.ucontext)
|
||||
|
||||
version (MIPS_Any)
|
||||
{
|
||||
struct stack_t
|
||||
{
|
||||
+126
-178
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=0
|
||||
pkgrel=5
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-aarch64 mpc1"
|
||||
depends="binutils-aarch64 mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-aarch64 binutils-aarch64"
|
||||
subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -64,6 +64,7 @@ _libitm=true
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_D=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
@@ -73,7 +74,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
@@ -115,7 +115,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
@@ -136,15 +135,14 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
case "$CTARGET_ARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64|loongarch64) LANG_D=false ;;
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
@@ -171,7 +169,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -184,13 +182,8 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
loongarch64)
|
||||
riscv64|loongarch64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
@@ -199,9 +192,17 @@ if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
subpackages="$subpackages gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
makedepends_build="$makedepends_build libucontext-dev"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
|
||||
else
|
||||
# shared libgphobos is for D programs to link against, so
|
||||
# skip building that while cross-compiling the GDC compiler
|
||||
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
@@ -216,13 +217,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,7 +242,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -278,6 +278,10 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-loongarch-disable-multilib-support.patch
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -285,44 +289,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -338,7 +319,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -346,33 +327,28 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
*)
|
||||
# cross-bootstrap GDC with a static libphobos: due to GCC's
|
||||
# ./configure not having a --disable-shared=libphobos option,
|
||||
# we have to use --enable-shared with everything else instead.
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
|
||||
else
|
||||
_bootstrap_configure="--enable-shared"
|
||||
fi
|
||||
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
|
||||
;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
if ! $_libquadmath; then
|
||||
_arch_configure="$_arch_configure --disable-libquadmath"
|
||||
# ppc64le needs both --disable-libquadmath{,-support}
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116007
|
||||
[ "$CARCH" = "ppc64le" ] &&
|
||||
_arch_configure="$_arch_configure
|
||||
--disable-libquadmath-support"
|
||||
fi
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
@@ -380,10 +356,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -404,7 +378,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -412,7 +386,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -422,10 +397,14 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
# cross-compiling libphobos with parallel make fails
|
||||
make all-target-libphobos
|
||||
fi
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
@@ -434,7 +413,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -449,7 +428,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -493,25 +472,22 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -560,8 +536,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -574,8 +549,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -593,15 +567,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -620,30 +592,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -651,49 +619,43 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -701,31 +663,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -733,8 +689,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -743,38 +698,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -783,12 +730,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -827,7 +771,7 @@ f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8
|
||||
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
5fd23a506b55c88d4f000e01c539eb25d6da2516949c9d7a1c9ee20f4c6b627e4788541284d9c14c33bafa7cb43ce2e0469dd91006152f00e30815107150320f 0026-ada-musl-support-fixes.patch
|
||||
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
@@ -837,4 +781,8 @@ b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,544 @@
|
||||
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Thu, 13 Jun 2024 12:48:21 +0100
|
||||
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
|
||||
|
||||
The testcase extracts one arm_neon.h vector from a pair (one subreg)
|
||||
and then reinterprets the result as an SVE vector (another subreg).
|
||||
Each subreg makes sense individually, but we can't fold them together
|
||||
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
|
||||
but the interpretation of 32 bytes -> 16*N bytes depends on
|
||||
whether N==1 or N>1.
|
||||
|
||||
Since the second subreg makes sense individually, simplify_subreg
|
||||
should bail out rather than ICE on it. simplify_gen_subreg will
|
||||
then do the same (because it already checks validate_subreg).
|
||||
This leaves simplify_gen_subreg returning null, requiring the
|
||||
caller to take appropriate action.
|
||||
|
||||
I think this is relatively likely to occur elsewhere, so the patch
|
||||
adds a helper for forcing a subreg, allowing a temporary pseudo to
|
||||
be created where necessary.
|
||||
|
||||
I'll follow up by using force_subreg in more places. This patch
|
||||
is intended to be a minimal backportable fix for the PR.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
|
||||
to fold two subregs together if their relationship isn't known
|
||||
at compile time.
|
||||
* explow.h (force_subreg): Declare.
|
||||
* explow.cc (force_subreg): New function.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
|
||||
|
||||
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/explow.cc | 15 +++++++++++++++
|
||||
gcc/explow.h | 2 ++
|
||||
gcc/simplify-rtx.cc | 5 +++++
|
||||
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 0d2edf3f19e..c9182594bc1 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
Advanced SIMD argument as an SVE vector. */
|
||||
if (!BYTES_BIG_ENDIAN
|
||||
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
|
||||
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
|
||||
rtx_vector_builder builder (VNx16BImode, 16, 2);
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index 8e5f6b8e680..f6843398c4b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
|
||||
return temp;
|
||||
}
|
||||
|
||||
+/* Like simplify_gen_subreg, but force OP into a new register if the
|
||||
+ subreg cannot be formed directly. */
|
||||
+
|
||||
+rtx
|
||||
+force_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode, poly_uint64 byte)
|
||||
+{
|
||||
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+ if (x)
|
||||
+ return x;
|
||||
+
|
||||
+ op = copy_to_mode_reg (innermode, op);
|
||||
+ return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index 16aa02cfb68..cbd1fcb7eb3 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
Args are mode (in case value is a constant) and the value. */
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
|
||||
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
|
||||
index dceaa13333c..729d408aa55 100644
|
||||
--- a/gcc/simplify-rtx.cc
|
||||
+++ b/gcc/simplify-rtx.cc
|
||||
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
|
||||
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
|
||||
rtx newx;
|
||||
|
||||
+ /* Make sure that the relationship between the two subregs is
|
||||
+ known at compile time. */
|
||||
+ if (!ordered_p (outersize, innermostsize))
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
if (outermode == innermostmode
|
||||
&& known_eq (byte, 0U)
|
||||
&& known_eq (SUBREG_BYTE (op), 0))
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
new file mode 100644
|
||||
index 00000000000..d728d1325ed
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl)
|
||||
+{
|
||||
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:30 +0100
|
||||
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
|
||||
|
||||
This patch makes the aarch64 code use force_subreg instead of
|
||||
simplify_gen_subreg in more places. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
(3) The offset wasn't a simple lowpart or highpart calculation;
|
||||
a later patch will deal with those.
|
||||
|
||||
gcc/
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
|
||||
Use force_subreg instead of simplify_gen_subreg.
|
||||
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svget_impl::expand): Likewise.
|
||||
(svget_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-functions.h
|
||||
(multireg_permute::expand): Likewise.
|
||||
|
||||
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
|
||||
gcc/config/aarch64/aarch64-simd.md | 4 ++--
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
|
||||
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
|
||||
4 files changed, 10 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index 75d21de1401..b2e46a073a8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
subreg_lowpart_offset (d->mode, quadmode));
|
||||
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
|
||||
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
else
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
|
||||
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
|
||||
/* And recalculate the index. */
|
||||
lane -= nunits / 4;
|
||||
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
|
||||
index 33ab0741e87..5b9efe0b165 100644
|
||||
--- a/gcc/config/aarch64/aarch64-simd.md
|
||||
+++ b/gcc/config/aarch64/aarch64-simd.md
|
||||
@@ -412,8 +412,8 @@
|
||||
"TARGET_SIMD"
|
||||
{
|
||||
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
|
||||
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
|
||||
- <MODE>mode, 0);
|
||||
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
|
||||
+ <MODE>mode, 0);
|
||||
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
|
||||
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
|
||||
DONE;
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index c9182594bc1..2c95da79572 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1121,9 +1121,8 @@ public:
|
||||
expand (function_expander &e) const override
|
||||
{
|
||||
/* Fold the access into a subreg rvalue. */
|
||||
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
|
||||
- GET_MODE (e.args[0]),
|
||||
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
|
||||
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1157,8 +1156,7 @@ public:
|
||||
e.add_fixed_operand (indices);
|
||||
return e.generate_insn (icode);
|
||||
}
|
||||
- return simplify_gen_subreg (e.result_mode (), e.args[0],
|
||||
- GET_MODE (e.args[0]), 0);
|
||||
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
index 3b8e575e98e..7d06a57ff83 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
@@ -639,9 +639,9 @@ public:
|
||||
{
|
||||
machine_mode elt_mode = e.vector_mode (0);
|
||||
rtx arg = e.args[0];
|
||||
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
- GET_MODE_SIZE (elt_mode)));
|
||||
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
+ GET_MODE_SIZE (elt_mode)));
|
||||
}
|
||||
return e.use_exact_insn (icode);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
|
||||
|
||||
This patch makes more use of force_lowpart_subreg, similarly
|
||||
to the recent patch for force_subreg. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
|
||||
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
|
||||
simplify_gen_subreg and lowpart_subreg.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
(add_load_store_slice_operand): Likewise.
|
||||
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
|
||||
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
|
||||
|
||||
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64.cc | 14 +++++---------
|
||||
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
|
||||
5 files changed, 23 insertions(+), 17 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index b2e46a073a8..264b9560709 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
int lane = INTVAL (lane_idx);
|
||||
|
||||
if (lane < nunits / 4)
|
||||
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
else
|
||||
{
|
||||
/* Select the upper 64 bits, either a V2SF or V4HF, this however
|
||||
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
gen_highpart_mode generates code that isn't optimal. */
|
||||
rtx temp1 = gen_reg_rtx (d->mode);
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_WSR64:
|
||||
case AARCH64_WSRF64:
|
||||
case AARCH64_WSR128:
|
||||
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
break;
|
||||
case AARCH64_WSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, input_val);
|
||||
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_RSR64:
|
||||
case AARCH64_RSRF64:
|
||||
case AARCH64_RSR128:
|
||||
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
|
||||
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
|
||||
+ target, sysreg_mode);
|
||||
case AARCH64_RSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, target);
|
||||
return gen_lowpart_SUBREG (SFmode, subreg);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 2c95da79572..3c970e9c5f8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
|
||||
insn_code icode = code_for_vcond_mask (mode, mode);
|
||||
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
e.add_output_operand (icode);
|
||||
e.add_input_operand (icode, e.args[1]);
|
||||
e.add_input_operand (icode, e.args[0]);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
index f4c91bcbb95..b66b35ae60b 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
|
||||
rtx base = e.args[argno];
|
||||
if (e.mode_suffix_id == MODE_vnum)
|
||||
{
|
||||
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
base = simplify_gen_binary (PLUS, SImode, base, vnum);
|
||||
}
|
||||
e.add_input_operand (icode, base);
|
||||
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
||||
index 1beec94629d..a064aeecbc0 100644
|
||||
--- a/gcc/config/aarch64/aarch64.cc
|
||||
+++ b/gcc/config/aarch64/aarch64.cc
|
||||
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
|
||||
/* can_change_mode_class must only return true if subregs and svreinterprets
|
||||
have the same semantics. */
|
||||
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
|
||||
- return lowpart_subreg (mode, x, GET_MODE (x));
|
||||
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
|
||||
|
||||
rtx res = gen_reg_rtx (mode);
|
||||
x = force_reg (GET_MODE (x), x);
|
||||
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = gen_lowpart (DImode, op1);
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
*high_in1 = gen_highpart (DImode, op1);
|
||||
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
-
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
|
||||
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
new file mode 100644
|
||||
index 00000000000..f561c34f732
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
|
||||
+{
|
||||
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 4/4] Add force_lowpart_subreg
|
||||
|
||||
optabs had a local function called lowpart_subreg_maybe_copy
|
||||
that is very similar to the lowpart version of force_subreg.
|
||||
This patch adds a force_lowpart_subreg wrapper around
|
||||
force_subreg and uses it in optabs.cc.
|
||||
|
||||
The only difference between the old and new functions is that
|
||||
the old one asserted success while the new one doesn't.
|
||||
It's common not to assert elsewhere when taking subregs;
|
||||
normally a null result is enough.
|
||||
|
||||
Later patches will make more use of the new function.
|
||||
|
||||
gcc/
|
||||
* explow.h (force_lowpart_subreg): Declare.
|
||||
* explow.cc (force_lowpart_subreg): New function.
|
||||
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
|
||||
(expand_absneg_bit): Use force_lowpart_subreg instead of
|
||||
lowpart_subreg_maybe_copy.
|
||||
(expand_copysign_bit): Likewise.
|
||||
|
||||
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
|
||||
---
|
||||
gcc/explow.cc | 14 ++++++++++++++
|
||||
gcc/explow.h | 1 +
|
||||
gcc/optabs.cc | 24 ++----------------------
|
||||
3 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index f6843398c4b..5fdfa81f69b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
|
||||
return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
}
|
||||
|
||||
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
|
||||
+ which has mode INNERMODE. Allow OP to be forced into a new register
|
||||
+ if necessary.
|
||||
+
|
||||
+ Return null on failure. */
|
||||
+
|
||||
+rtx
|
||||
+force_lowpart_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode)
|
||||
+{
|
||||
+ auto byte = subreg_lowpart_offset (outermode, innermode);
|
||||
+ return force_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index cbd1fcb7eb3..dd654649b06 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
|
||||
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
|
||||
index ce91f94ed43..804c0dc73ba 100644
|
||||
--- a/gcc/optabs.cc
|
||||
+++ b/gcc/optabs.cc
|
||||
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
|
||||
- conditions, VAL may already be a SUBREG against which we cannot generate
|
||||
- a further SUBREG. In this case, we expect forcing the value into a
|
||||
- register will work around the situation. */
|
||||
-
|
||||
-static rtx
|
||||
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
|
||||
- machine_mode imode)
|
||||
-{
|
||||
- rtx ret;
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- if (ret == NULL)
|
||||
- {
|
||||
- val = force_reg (imode, val);
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- gcc_assert (ret != NULL);
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
/* Expand a floating point absolute value or negation operation via a
|
||||
logical operation on the sign bit. */
|
||||
|
||||
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
||||
gen_lowpart (imode, op0),
|
||||
immed_wide_int_const (mask, imode),
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
|
||||
set_dst_reg_note (get_last_insn (), REG_EQUAL,
|
||||
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
|
||||
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
||||
|
||||
temp = expand_binop (imode, ior_optab, op0, op1,
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
}
|
||||
|
||||
return target;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
|
||||
--
|
||||
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Sat, 3 Aug 2024 20:37:54 +0200
|
||||
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
|
||||
some powerpc* configurations [PR116007]
|
||||
|
||||
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
|
||||
Unfortunately, that seems to fail building in some powerpc* configurations, where
|
||||
TFmode isn't available.
|
||||
quad.h has:
|
||||
#ifndef TFtype
|
||||
typedef float TFtype __attribute__ ((mode (TF)));
|
||||
#endif
|
||||
and uses TFtype. quad.h has:
|
||||
/* Define the complex type corresponding to __float128
|
||||
("_Complex __float128" is not allowed) */
|
||||
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
|
||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||
#else
|
||||
typedef _Complex float __attribute__((mode(KC))) __complex128;
|
||||
#endif
|
||||
with the conditional and KCmode use added during porting of libquadmath
|
||||
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
|
||||
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
|
||||
seemed easier to just define it to __float128 which should do the same thing.
|
||||
|
||||
2024-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/116007
|
||||
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
|
||||
define to __float128 before including soft-fp.h and quad.h.
|
||||
|
||||
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
|
||||
---
|
||||
libquadmath/math/sqrtq.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
|
||||
index 8ca2828d42ce..a58998a06670 100644
|
||||
--- a/libquadmath/math/sqrtq.c
|
||||
+++ b/libquadmath/math/sqrtq.c
|
||||
@@ -9,6 +9,9 @@
|
||||
&& defined(FE_TOWARDZERO) \
|
||||
&& defined(FE_INEXACT)
|
||||
#define USE_SOFT_FP 1
|
||||
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
|
||||
+#define TFtype __float128
|
||||
+#endif
|
||||
#include "../../libgcc/soft-fp/soft-fp.h"
|
||||
#include "../../libgcc/soft-fp/quad.h"
|
||||
#endif
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -4,17 +4,17 @@ Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/Makefile.rtl | 16 ++++++++--------
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
4 files changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
index 32cbdb692..463028fbe 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
|
||||
g-sercom.adb<libgnat/g-sercom__linux.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-loongarch.ads
|
||||
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +41,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -50,7 +59,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
|
||||
s-osinte.ads<libgnarl/s-osinte__linux.ads \
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -59,7 +68,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -69,10 +87,10 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
index 74aa3c412..ef6118f37 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -94,6 +94,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
@@ -84,7 +102,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -92,7 +110,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -101,7 +119,7 @@ index 8522094164e..92b230a462b 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -143,7 +161,7 @@ index 8522094164e..92b230a462b 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +191,7 @@ index 8522094164e..92b230a462b 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
index 0cbfd0e15..f97ed905b 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -195,10 +213,10 @@ index 987432c9307..4d782f07de9 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
index 05af82c27..626ac35bc 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -207,7 +225,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -216,7 +234,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -227,6 +245,3 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: Celeste <cielesti@protonmail.com>
|
||||
Date: Mon, 2 Sep 2024 02:54:17 +0000
|
||||
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
|
||||
|
||||
Add musl support for these 2 architectures based on fenv.h and signal.h from:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
|
||||
---
|
||||
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
|
||||
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
index a7364c0a..5b327e4a 100644
|
||||
--- a/libphobos/libdruntime/core/stdc/fenv.d
|
||||
+++ b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
|
||||
ushort __cs_selector;
|
||||
ushort __opcode;
|
||||
uint __data_offset;
|
||||
ushort __data_selector;
|
||||
ushort __unused5;
|
||||
version (X86_64)
|
||||
uint __mxcsr;
|
||||
}
|
||||
alias ushort fexcept_t;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ alias uint fenv_t;
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ struct fenv_t
|
||||
+ {
|
||||
+ uint __cw;
|
||||
+ }
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
static assert(false, "Architecture not supported.");
|
||||
}
|
||||
}
|
||||
else version (CRuntime_Newlib)
|
||||
{
|
||||
version (AArch64)
|
||||
{
|
||||
alias fenv_t = ulong;
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
index a8b7f751..78d8b3cd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
|
||||
else version (PPC_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 4096;
|
||||
enum SIGSTKSZ = 10240;
|
||||
}
|
||||
else version (X86_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 2048;
|
||||
enum SIGSTKSZ = 8192;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 2048;
|
||||
+ enum SIGSTKSZ = 8192;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 4096;
|
||||
+ enum SIGSTKSZ = 16384;
|
||||
+ }
|
||||
else
|
||||
static assert(0, "unimplemented");
|
||||
|
||||
//ucontext_t (defined in core.sys.posix.ucontext)
|
||||
//mcontext_t (defined in core.sys.posix.ucontext)
|
||||
|
||||
version (MIPS_Any)
|
||||
{
|
||||
struct stack_t
|
||||
{
|
||||
+126
-178
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgrel=0
|
||||
pkgrel=5
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armhf mpc1"
|
||||
depends="binutils-armhf mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
|
||||
subpackages="g++-armhf:gpp libstdc++-dev-armhf:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -64,6 +64,7 @@ _libitm=true
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_D=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
@@ -73,7 +74,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
@@ -115,7 +115,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
@@ -136,15 +135,14 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
case "$CTARGET_ARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64|loongarch64) LANG_D=false ;;
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
@@ -171,7 +169,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -184,13 +182,8 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
loongarch64)
|
||||
riscv64|loongarch64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
@@ -199,9 +192,17 @@ if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
subpackages="$subpackages gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
makedepends_build="$makedepends_build libucontext-dev"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
|
||||
else
|
||||
# shared libgphobos is for D programs to link against, so
|
||||
# skip building that while cross-compiling the GDC compiler
|
||||
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
@@ -216,13 +217,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,7 +242,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -278,6 +278,10 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-loongarch-disable-multilib-support.patch
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -285,44 +289,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -338,7 +319,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -346,33 +327,28 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
*)
|
||||
# cross-bootstrap GDC with a static libphobos: due to GCC's
|
||||
# ./configure not having a --disable-shared=libphobos option,
|
||||
# we have to use --enable-shared with everything else instead.
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
|
||||
else
|
||||
_bootstrap_configure="--enable-shared"
|
||||
fi
|
||||
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
|
||||
;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
if ! $_libquadmath; then
|
||||
_arch_configure="$_arch_configure --disable-libquadmath"
|
||||
# ppc64le needs both --disable-libquadmath{,-support}
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116007
|
||||
[ "$CARCH" = "ppc64le" ] &&
|
||||
_arch_configure="$_arch_configure
|
||||
--disable-libquadmath-support"
|
||||
fi
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
@@ -380,10 +356,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -404,7 +378,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -412,7 +386,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -422,10 +397,14 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
# cross-compiling libphobos with parallel make fails
|
||||
make all-target-libphobos
|
||||
fi
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
@@ -434,7 +413,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -449,7 +428,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -493,25 +472,22 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -560,8 +536,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -574,8 +549,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -593,15 +567,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -620,30 +592,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -651,49 +619,43 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -701,31 +663,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -733,8 +689,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -743,38 +698,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -783,12 +730,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -827,7 +771,7 @@ f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8
|
||||
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
5fd23a506b55c88d4f000e01c539eb25d6da2516949c9d7a1c9ee20f4c6b627e4788541284d9c14c33bafa7cb43ce2e0469dd91006152f00e30815107150320f 0026-ada-musl-support-fixes.patch
|
||||
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
@@ -837,4 +781,8 @@ b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,544 @@
|
||||
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Thu, 13 Jun 2024 12:48:21 +0100
|
||||
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
|
||||
|
||||
The testcase extracts one arm_neon.h vector from a pair (one subreg)
|
||||
and then reinterprets the result as an SVE vector (another subreg).
|
||||
Each subreg makes sense individually, but we can't fold them together
|
||||
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
|
||||
but the interpretation of 32 bytes -> 16*N bytes depends on
|
||||
whether N==1 or N>1.
|
||||
|
||||
Since the second subreg makes sense individually, simplify_subreg
|
||||
should bail out rather than ICE on it. simplify_gen_subreg will
|
||||
then do the same (because it already checks validate_subreg).
|
||||
This leaves simplify_gen_subreg returning null, requiring the
|
||||
caller to take appropriate action.
|
||||
|
||||
I think this is relatively likely to occur elsewhere, so the patch
|
||||
adds a helper for forcing a subreg, allowing a temporary pseudo to
|
||||
be created where necessary.
|
||||
|
||||
I'll follow up by using force_subreg in more places. This patch
|
||||
is intended to be a minimal backportable fix for the PR.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
|
||||
to fold two subregs together if their relationship isn't known
|
||||
at compile time.
|
||||
* explow.h (force_subreg): Declare.
|
||||
* explow.cc (force_subreg): New function.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
|
||||
|
||||
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/explow.cc | 15 +++++++++++++++
|
||||
gcc/explow.h | 2 ++
|
||||
gcc/simplify-rtx.cc | 5 +++++
|
||||
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 0d2edf3f19e..c9182594bc1 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
Advanced SIMD argument as an SVE vector. */
|
||||
if (!BYTES_BIG_ENDIAN
|
||||
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
|
||||
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
|
||||
rtx_vector_builder builder (VNx16BImode, 16, 2);
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index 8e5f6b8e680..f6843398c4b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
|
||||
return temp;
|
||||
}
|
||||
|
||||
+/* Like simplify_gen_subreg, but force OP into a new register if the
|
||||
+ subreg cannot be formed directly. */
|
||||
+
|
||||
+rtx
|
||||
+force_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode, poly_uint64 byte)
|
||||
+{
|
||||
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+ if (x)
|
||||
+ return x;
|
||||
+
|
||||
+ op = copy_to_mode_reg (innermode, op);
|
||||
+ return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index 16aa02cfb68..cbd1fcb7eb3 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
Args are mode (in case value is a constant) and the value. */
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
|
||||
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
|
||||
index dceaa13333c..729d408aa55 100644
|
||||
--- a/gcc/simplify-rtx.cc
|
||||
+++ b/gcc/simplify-rtx.cc
|
||||
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
|
||||
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
|
||||
rtx newx;
|
||||
|
||||
+ /* Make sure that the relationship between the two subregs is
|
||||
+ known at compile time. */
|
||||
+ if (!ordered_p (outersize, innermostsize))
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
if (outermode == innermostmode
|
||||
&& known_eq (byte, 0U)
|
||||
&& known_eq (SUBREG_BYTE (op), 0))
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
new file mode 100644
|
||||
index 00000000000..d728d1325ed
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl)
|
||||
+{
|
||||
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:30 +0100
|
||||
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
|
||||
|
||||
This patch makes the aarch64 code use force_subreg instead of
|
||||
simplify_gen_subreg in more places. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
(3) The offset wasn't a simple lowpart or highpart calculation;
|
||||
a later patch will deal with those.
|
||||
|
||||
gcc/
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
|
||||
Use force_subreg instead of simplify_gen_subreg.
|
||||
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svget_impl::expand): Likewise.
|
||||
(svget_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-functions.h
|
||||
(multireg_permute::expand): Likewise.
|
||||
|
||||
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
|
||||
gcc/config/aarch64/aarch64-simd.md | 4 ++--
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
|
||||
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
|
||||
4 files changed, 10 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index 75d21de1401..b2e46a073a8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
subreg_lowpart_offset (d->mode, quadmode));
|
||||
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
|
||||
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
else
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
|
||||
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
|
||||
/* And recalculate the index. */
|
||||
lane -= nunits / 4;
|
||||
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
|
||||
index 33ab0741e87..5b9efe0b165 100644
|
||||
--- a/gcc/config/aarch64/aarch64-simd.md
|
||||
+++ b/gcc/config/aarch64/aarch64-simd.md
|
||||
@@ -412,8 +412,8 @@
|
||||
"TARGET_SIMD"
|
||||
{
|
||||
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
|
||||
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
|
||||
- <MODE>mode, 0);
|
||||
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
|
||||
+ <MODE>mode, 0);
|
||||
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
|
||||
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
|
||||
DONE;
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index c9182594bc1..2c95da79572 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1121,9 +1121,8 @@ public:
|
||||
expand (function_expander &e) const override
|
||||
{
|
||||
/* Fold the access into a subreg rvalue. */
|
||||
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
|
||||
- GET_MODE (e.args[0]),
|
||||
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
|
||||
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1157,8 +1156,7 @@ public:
|
||||
e.add_fixed_operand (indices);
|
||||
return e.generate_insn (icode);
|
||||
}
|
||||
- return simplify_gen_subreg (e.result_mode (), e.args[0],
|
||||
- GET_MODE (e.args[0]), 0);
|
||||
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
index 3b8e575e98e..7d06a57ff83 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
@@ -639,9 +639,9 @@ public:
|
||||
{
|
||||
machine_mode elt_mode = e.vector_mode (0);
|
||||
rtx arg = e.args[0];
|
||||
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
- GET_MODE_SIZE (elt_mode)));
|
||||
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
+ GET_MODE_SIZE (elt_mode)));
|
||||
}
|
||||
return e.use_exact_insn (icode);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
|
||||
|
||||
This patch makes more use of force_lowpart_subreg, similarly
|
||||
to the recent patch for force_subreg. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
|
||||
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
|
||||
simplify_gen_subreg and lowpart_subreg.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
(add_load_store_slice_operand): Likewise.
|
||||
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
|
||||
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
|
||||
|
||||
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64.cc | 14 +++++---------
|
||||
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
|
||||
5 files changed, 23 insertions(+), 17 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index b2e46a073a8..264b9560709 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
int lane = INTVAL (lane_idx);
|
||||
|
||||
if (lane < nunits / 4)
|
||||
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
else
|
||||
{
|
||||
/* Select the upper 64 bits, either a V2SF or V4HF, this however
|
||||
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
gen_highpart_mode generates code that isn't optimal. */
|
||||
rtx temp1 = gen_reg_rtx (d->mode);
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_WSR64:
|
||||
case AARCH64_WSRF64:
|
||||
case AARCH64_WSR128:
|
||||
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
break;
|
||||
case AARCH64_WSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, input_val);
|
||||
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_RSR64:
|
||||
case AARCH64_RSRF64:
|
||||
case AARCH64_RSR128:
|
||||
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
|
||||
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
|
||||
+ target, sysreg_mode);
|
||||
case AARCH64_RSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, target);
|
||||
return gen_lowpart_SUBREG (SFmode, subreg);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 2c95da79572..3c970e9c5f8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
|
||||
insn_code icode = code_for_vcond_mask (mode, mode);
|
||||
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
e.add_output_operand (icode);
|
||||
e.add_input_operand (icode, e.args[1]);
|
||||
e.add_input_operand (icode, e.args[0]);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
index f4c91bcbb95..b66b35ae60b 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
|
||||
rtx base = e.args[argno];
|
||||
if (e.mode_suffix_id == MODE_vnum)
|
||||
{
|
||||
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
base = simplify_gen_binary (PLUS, SImode, base, vnum);
|
||||
}
|
||||
e.add_input_operand (icode, base);
|
||||
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
||||
index 1beec94629d..a064aeecbc0 100644
|
||||
--- a/gcc/config/aarch64/aarch64.cc
|
||||
+++ b/gcc/config/aarch64/aarch64.cc
|
||||
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
|
||||
/* can_change_mode_class must only return true if subregs and svreinterprets
|
||||
have the same semantics. */
|
||||
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
|
||||
- return lowpart_subreg (mode, x, GET_MODE (x));
|
||||
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
|
||||
|
||||
rtx res = gen_reg_rtx (mode);
|
||||
x = force_reg (GET_MODE (x), x);
|
||||
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = gen_lowpart (DImode, op1);
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
*high_in1 = gen_highpart (DImode, op1);
|
||||
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
-
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
|
||||
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
new file mode 100644
|
||||
index 00000000000..f561c34f732
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
|
||||
+{
|
||||
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 4/4] Add force_lowpart_subreg
|
||||
|
||||
optabs had a local function called lowpart_subreg_maybe_copy
|
||||
that is very similar to the lowpart version of force_subreg.
|
||||
This patch adds a force_lowpart_subreg wrapper around
|
||||
force_subreg and uses it in optabs.cc.
|
||||
|
||||
The only difference between the old and new functions is that
|
||||
the old one asserted success while the new one doesn't.
|
||||
It's common not to assert elsewhere when taking subregs;
|
||||
normally a null result is enough.
|
||||
|
||||
Later patches will make more use of the new function.
|
||||
|
||||
gcc/
|
||||
* explow.h (force_lowpart_subreg): Declare.
|
||||
* explow.cc (force_lowpart_subreg): New function.
|
||||
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
|
||||
(expand_absneg_bit): Use force_lowpart_subreg instead of
|
||||
lowpart_subreg_maybe_copy.
|
||||
(expand_copysign_bit): Likewise.
|
||||
|
||||
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
|
||||
---
|
||||
gcc/explow.cc | 14 ++++++++++++++
|
||||
gcc/explow.h | 1 +
|
||||
gcc/optabs.cc | 24 ++----------------------
|
||||
3 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index f6843398c4b..5fdfa81f69b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
|
||||
return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
}
|
||||
|
||||
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
|
||||
+ which has mode INNERMODE. Allow OP to be forced into a new register
|
||||
+ if necessary.
|
||||
+
|
||||
+ Return null on failure. */
|
||||
+
|
||||
+rtx
|
||||
+force_lowpart_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode)
|
||||
+{
|
||||
+ auto byte = subreg_lowpart_offset (outermode, innermode);
|
||||
+ return force_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index cbd1fcb7eb3..dd654649b06 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
|
||||
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
|
||||
index ce91f94ed43..804c0dc73ba 100644
|
||||
--- a/gcc/optabs.cc
|
||||
+++ b/gcc/optabs.cc
|
||||
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
|
||||
- conditions, VAL may already be a SUBREG against which we cannot generate
|
||||
- a further SUBREG. In this case, we expect forcing the value into a
|
||||
- register will work around the situation. */
|
||||
-
|
||||
-static rtx
|
||||
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
|
||||
- machine_mode imode)
|
||||
-{
|
||||
- rtx ret;
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- if (ret == NULL)
|
||||
- {
|
||||
- val = force_reg (imode, val);
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- gcc_assert (ret != NULL);
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
/* Expand a floating point absolute value or negation operation via a
|
||||
logical operation on the sign bit. */
|
||||
|
||||
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
||||
gen_lowpart (imode, op0),
|
||||
immed_wide_int_const (mask, imode),
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
|
||||
set_dst_reg_note (get_last_insn (), REG_EQUAL,
|
||||
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
|
||||
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
||||
|
||||
temp = expand_binop (imode, ior_optab, op0, op1,
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
}
|
||||
|
||||
return target;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
|
||||
--
|
||||
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Sat, 3 Aug 2024 20:37:54 +0200
|
||||
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
|
||||
some powerpc* configurations [PR116007]
|
||||
|
||||
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
|
||||
Unfortunately, that seems to fail building in some powerpc* configurations, where
|
||||
TFmode isn't available.
|
||||
quad.h has:
|
||||
#ifndef TFtype
|
||||
typedef float TFtype __attribute__ ((mode (TF)));
|
||||
#endif
|
||||
and uses TFtype. quad.h has:
|
||||
/* Define the complex type corresponding to __float128
|
||||
("_Complex __float128" is not allowed) */
|
||||
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
|
||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||
#else
|
||||
typedef _Complex float __attribute__((mode(KC))) __complex128;
|
||||
#endif
|
||||
with the conditional and KCmode use added during porting of libquadmath
|
||||
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
|
||||
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
|
||||
seemed easier to just define it to __float128 which should do the same thing.
|
||||
|
||||
2024-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/116007
|
||||
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
|
||||
define to __float128 before including soft-fp.h and quad.h.
|
||||
|
||||
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
|
||||
---
|
||||
libquadmath/math/sqrtq.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
|
||||
index 8ca2828d42ce..a58998a06670 100644
|
||||
--- a/libquadmath/math/sqrtq.c
|
||||
+++ b/libquadmath/math/sqrtq.c
|
||||
@@ -9,6 +9,9 @@
|
||||
&& defined(FE_TOWARDZERO) \
|
||||
&& defined(FE_INEXACT)
|
||||
#define USE_SOFT_FP 1
|
||||
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
|
||||
+#define TFtype __float128
|
||||
+#endif
|
||||
#include "../../libgcc/soft-fp/soft-fp.h"
|
||||
#include "../../libgcc/soft-fp/quad.h"
|
||||
#endif
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -4,17 +4,17 @@ Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/Makefile.rtl | 16 ++++++++--------
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
4 files changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
index 32cbdb692..463028fbe 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
|
||||
g-sercom.adb<libgnat/g-sercom__linux.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-loongarch.ads
|
||||
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +41,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -50,7 +59,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
|
||||
s-osinte.ads<libgnarl/s-osinte__linux.ads \
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -59,7 +68,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -69,10 +87,10 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
index 74aa3c412..ef6118f37 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -94,6 +94,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
@@ -84,7 +102,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -92,7 +110,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -101,7 +119,7 @@ index 8522094164e..92b230a462b 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -143,7 +161,7 @@ index 8522094164e..92b230a462b 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +191,7 @@ index 8522094164e..92b230a462b 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
index 0cbfd0e15..f97ed905b 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -195,10 +213,10 @@ index 987432c9307..4d782f07de9 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
index 05af82c27..626ac35bc 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -207,7 +225,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -216,7 +234,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -227,6 +245,3 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: Celeste <cielesti@protonmail.com>
|
||||
Date: Mon, 2 Sep 2024 02:54:17 +0000
|
||||
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
|
||||
|
||||
Add musl support for these 2 architectures based on fenv.h and signal.h from:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
|
||||
---
|
||||
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
|
||||
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
index a7364c0a..5b327e4a 100644
|
||||
--- a/libphobos/libdruntime/core/stdc/fenv.d
|
||||
+++ b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
|
||||
ushort __cs_selector;
|
||||
ushort __opcode;
|
||||
uint __data_offset;
|
||||
ushort __data_selector;
|
||||
ushort __unused5;
|
||||
version (X86_64)
|
||||
uint __mxcsr;
|
||||
}
|
||||
alias ushort fexcept_t;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ alias uint fenv_t;
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ struct fenv_t
|
||||
+ {
|
||||
+ uint __cw;
|
||||
+ }
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
static assert(false, "Architecture not supported.");
|
||||
}
|
||||
}
|
||||
else version (CRuntime_Newlib)
|
||||
{
|
||||
version (AArch64)
|
||||
{
|
||||
alias fenv_t = ulong;
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
index a8b7f751..78d8b3cd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
|
||||
else version (PPC_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 4096;
|
||||
enum SIGSTKSZ = 10240;
|
||||
}
|
||||
else version (X86_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 2048;
|
||||
enum SIGSTKSZ = 8192;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 2048;
|
||||
+ enum SIGSTKSZ = 8192;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 4096;
|
||||
+ enum SIGSTKSZ = 16384;
|
||||
+ }
|
||||
else
|
||||
static assert(0, "unimplemented");
|
||||
|
||||
//ucontext_t (defined in core.sys.posix.ucontext)
|
||||
//mcontext_t (defined in core.sys.posix.ucontext)
|
||||
|
||||
version (MIPS_Any)
|
||||
{
|
||||
struct stack_t
|
||||
{
|
||||
+126
-178
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armv7
|
||||
pkgrel=0
|
||||
pkgrel=5
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armv7 mpc1"
|
||||
depends="binutils-armv7 mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armv7 binutils-armv7"
|
||||
subpackages="g++-armv7:gpp libstdc++-dev-armv7:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -64,6 +64,7 @@ _libitm=true
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_D=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
@@ -73,7 +74,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
@@ -115,7 +115,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
@@ -136,15 +135,14 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
case "$CTARGET_ARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64|loongarch64) LANG_D=false ;;
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
@@ -171,7 +169,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -184,13 +182,8 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
loongarch64)
|
||||
riscv64|loongarch64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
@@ -199,9 +192,17 @@ if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
subpackages="$subpackages gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
makedepends_build="$makedepends_build libucontext-dev"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
|
||||
else
|
||||
# shared libgphobos is for D programs to link against, so
|
||||
# skip building that while cross-compiling the GDC compiler
|
||||
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
@@ -216,13 +217,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,7 +242,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -278,6 +278,10 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-loongarch-disable-multilib-support.patch
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -285,44 +289,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -338,7 +319,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -346,33 +327,28 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
*)
|
||||
# cross-bootstrap GDC with a static libphobos: due to GCC's
|
||||
# ./configure not having a --disable-shared=libphobos option,
|
||||
# we have to use --enable-shared with everything else instead.
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
|
||||
else
|
||||
_bootstrap_configure="--enable-shared"
|
||||
fi
|
||||
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
|
||||
;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
if ! $_libquadmath; then
|
||||
_arch_configure="$_arch_configure --disable-libquadmath"
|
||||
# ppc64le needs both --disable-libquadmath{,-support}
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116007
|
||||
[ "$CARCH" = "ppc64le" ] &&
|
||||
_arch_configure="$_arch_configure
|
||||
--disable-libquadmath-support"
|
||||
fi
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
@@ -380,10 +356,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -404,7 +378,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -412,7 +386,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -422,10 +397,14 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
# cross-compiling libphobos with parallel make fails
|
||||
make all-target-libphobos
|
||||
fi
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
@@ -434,7 +413,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -449,7 +428,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -493,25 +472,22 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -560,8 +536,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -574,8 +549,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -593,15 +567,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -620,30 +592,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -651,49 +619,43 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -701,31 +663,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -733,8 +689,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -743,38 +698,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -783,12 +730,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -827,7 +771,7 @@ f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8
|
||||
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
5fd23a506b55c88d4f000e01c539eb25d6da2516949c9d7a1c9ee20f4c6b627e4788541284d9c14c33bafa7cb43ce2e0469dd91006152f00e30815107150320f 0026-ada-musl-support-fixes.patch
|
||||
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
@@ -837,4 +781,8 @@ b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,544 @@
|
||||
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Thu, 13 Jun 2024 12:48:21 +0100
|
||||
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
|
||||
|
||||
The testcase extracts one arm_neon.h vector from a pair (one subreg)
|
||||
and then reinterprets the result as an SVE vector (another subreg).
|
||||
Each subreg makes sense individually, but we can't fold them together
|
||||
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
|
||||
but the interpretation of 32 bytes -> 16*N bytes depends on
|
||||
whether N==1 or N>1.
|
||||
|
||||
Since the second subreg makes sense individually, simplify_subreg
|
||||
should bail out rather than ICE on it. simplify_gen_subreg will
|
||||
then do the same (because it already checks validate_subreg).
|
||||
This leaves simplify_gen_subreg returning null, requiring the
|
||||
caller to take appropriate action.
|
||||
|
||||
I think this is relatively likely to occur elsewhere, so the patch
|
||||
adds a helper for forcing a subreg, allowing a temporary pseudo to
|
||||
be created where necessary.
|
||||
|
||||
I'll follow up by using force_subreg in more places. This patch
|
||||
is intended to be a minimal backportable fix for the PR.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
|
||||
to fold two subregs together if their relationship isn't known
|
||||
at compile time.
|
||||
* explow.h (force_subreg): Declare.
|
||||
* explow.cc (force_subreg): New function.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
|
||||
|
||||
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/explow.cc | 15 +++++++++++++++
|
||||
gcc/explow.h | 2 ++
|
||||
gcc/simplify-rtx.cc | 5 +++++
|
||||
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 0d2edf3f19e..c9182594bc1 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
Advanced SIMD argument as an SVE vector. */
|
||||
if (!BYTES_BIG_ENDIAN
|
||||
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
|
||||
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
|
||||
rtx_vector_builder builder (VNx16BImode, 16, 2);
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index 8e5f6b8e680..f6843398c4b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
|
||||
return temp;
|
||||
}
|
||||
|
||||
+/* Like simplify_gen_subreg, but force OP into a new register if the
|
||||
+ subreg cannot be formed directly. */
|
||||
+
|
||||
+rtx
|
||||
+force_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode, poly_uint64 byte)
|
||||
+{
|
||||
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+ if (x)
|
||||
+ return x;
|
||||
+
|
||||
+ op = copy_to_mode_reg (innermode, op);
|
||||
+ return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index 16aa02cfb68..cbd1fcb7eb3 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
Args are mode (in case value is a constant) and the value. */
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
|
||||
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
|
||||
index dceaa13333c..729d408aa55 100644
|
||||
--- a/gcc/simplify-rtx.cc
|
||||
+++ b/gcc/simplify-rtx.cc
|
||||
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
|
||||
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
|
||||
rtx newx;
|
||||
|
||||
+ /* Make sure that the relationship between the two subregs is
|
||||
+ known at compile time. */
|
||||
+ if (!ordered_p (outersize, innermostsize))
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
if (outermode == innermostmode
|
||||
&& known_eq (byte, 0U)
|
||||
&& known_eq (SUBREG_BYTE (op), 0))
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
new file mode 100644
|
||||
index 00000000000..d728d1325ed
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl)
|
||||
+{
|
||||
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:30 +0100
|
||||
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
|
||||
|
||||
This patch makes the aarch64 code use force_subreg instead of
|
||||
simplify_gen_subreg in more places. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
(3) The offset wasn't a simple lowpart or highpart calculation;
|
||||
a later patch will deal with those.
|
||||
|
||||
gcc/
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
|
||||
Use force_subreg instead of simplify_gen_subreg.
|
||||
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svget_impl::expand): Likewise.
|
||||
(svget_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-functions.h
|
||||
(multireg_permute::expand): Likewise.
|
||||
|
||||
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
|
||||
gcc/config/aarch64/aarch64-simd.md | 4 ++--
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
|
||||
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
|
||||
4 files changed, 10 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index 75d21de1401..b2e46a073a8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
subreg_lowpart_offset (d->mode, quadmode));
|
||||
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
|
||||
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
else
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
|
||||
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
|
||||
/* And recalculate the index. */
|
||||
lane -= nunits / 4;
|
||||
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
|
||||
index 33ab0741e87..5b9efe0b165 100644
|
||||
--- a/gcc/config/aarch64/aarch64-simd.md
|
||||
+++ b/gcc/config/aarch64/aarch64-simd.md
|
||||
@@ -412,8 +412,8 @@
|
||||
"TARGET_SIMD"
|
||||
{
|
||||
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
|
||||
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
|
||||
- <MODE>mode, 0);
|
||||
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
|
||||
+ <MODE>mode, 0);
|
||||
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
|
||||
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
|
||||
DONE;
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index c9182594bc1..2c95da79572 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1121,9 +1121,8 @@ public:
|
||||
expand (function_expander &e) const override
|
||||
{
|
||||
/* Fold the access into a subreg rvalue. */
|
||||
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
|
||||
- GET_MODE (e.args[0]),
|
||||
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
|
||||
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1157,8 +1156,7 @@ public:
|
||||
e.add_fixed_operand (indices);
|
||||
return e.generate_insn (icode);
|
||||
}
|
||||
- return simplify_gen_subreg (e.result_mode (), e.args[0],
|
||||
- GET_MODE (e.args[0]), 0);
|
||||
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
index 3b8e575e98e..7d06a57ff83 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
@@ -639,9 +639,9 @@ public:
|
||||
{
|
||||
machine_mode elt_mode = e.vector_mode (0);
|
||||
rtx arg = e.args[0];
|
||||
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
- GET_MODE_SIZE (elt_mode)));
|
||||
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
+ GET_MODE_SIZE (elt_mode)));
|
||||
}
|
||||
return e.use_exact_insn (icode);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
|
||||
|
||||
This patch makes more use of force_lowpart_subreg, similarly
|
||||
to the recent patch for force_subreg. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
|
||||
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
|
||||
simplify_gen_subreg and lowpart_subreg.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
(add_load_store_slice_operand): Likewise.
|
||||
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
|
||||
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
|
||||
|
||||
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64.cc | 14 +++++---------
|
||||
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
|
||||
5 files changed, 23 insertions(+), 17 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index b2e46a073a8..264b9560709 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
int lane = INTVAL (lane_idx);
|
||||
|
||||
if (lane < nunits / 4)
|
||||
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
else
|
||||
{
|
||||
/* Select the upper 64 bits, either a V2SF or V4HF, this however
|
||||
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
gen_highpart_mode generates code that isn't optimal. */
|
||||
rtx temp1 = gen_reg_rtx (d->mode);
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_WSR64:
|
||||
case AARCH64_WSRF64:
|
||||
case AARCH64_WSR128:
|
||||
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
break;
|
||||
case AARCH64_WSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, input_val);
|
||||
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_RSR64:
|
||||
case AARCH64_RSRF64:
|
||||
case AARCH64_RSR128:
|
||||
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
|
||||
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
|
||||
+ target, sysreg_mode);
|
||||
case AARCH64_RSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, target);
|
||||
return gen_lowpart_SUBREG (SFmode, subreg);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 2c95da79572..3c970e9c5f8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
|
||||
insn_code icode = code_for_vcond_mask (mode, mode);
|
||||
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
e.add_output_operand (icode);
|
||||
e.add_input_operand (icode, e.args[1]);
|
||||
e.add_input_operand (icode, e.args[0]);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
index f4c91bcbb95..b66b35ae60b 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
|
||||
rtx base = e.args[argno];
|
||||
if (e.mode_suffix_id == MODE_vnum)
|
||||
{
|
||||
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
base = simplify_gen_binary (PLUS, SImode, base, vnum);
|
||||
}
|
||||
e.add_input_operand (icode, base);
|
||||
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
||||
index 1beec94629d..a064aeecbc0 100644
|
||||
--- a/gcc/config/aarch64/aarch64.cc
|
||||
+++ b/gcc/config/aarch64/aarch64.cc
|
||||
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
|
||||
/* can_change_mode_class must only return true if subregs and svreinterprets
|
||||
have the same semantics. */
|
||||
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
|
||||
- return lowpart_subreg (mode, x, GET_MODE (x));
|
||||
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
|
||||
|
||||
rtx res = gen_reg_rtx (mode);
|
||||
x = force_reg (GET_MODE (x), x);
|
||||
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = gen_lowpart (DImode, op1);
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
*high_in1 = gen_highpart (DImode, op1);
|
||||
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
-
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
|
||||
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
new file mode 100644
|
||||
index 00000000000..f561c34f732
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
|
||||
+{
|
||||
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 4/4] Add force_lowpart_subreg
|
||||
|
||||
optabs had a local function called lowpart_subreg_maybe_copy
|
||||
that is very similar to the lowpart version of force_subreg.
|
||||
This patch adds a force_lowpart_subreg wrapper around
|
||||
force_subreg and uses it in optabs.cc.
|
||||
|
||||
The only difference between the old and new functions is that
|
||||
the old one asserted success while the new one doesn't.
|
||||
It's common not to assert elsewhere when taking subregs;
|
||||
normally a null result is enough.
|
||||
|
||||
Later patches will make more use of the new function.
|
||||
|
||||
gcc/
|
||||
* explow.h (force_lowpart_subreg): Declare.
|
||||
* explow.cc (force_lowpart_subreg): New function.
|
||||
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
|
||||
(expand_absneg_bit): Use force_lowpart_subreg instead of
|
||||
lowpart_subreg_maybe_copy.
|
||||
(expand_copysign_bit): Likewise.
|
||||
|
||||
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
|
||||
---
|
||||
gcc/explow.cc | 14 ++++++++++++++
|
||||
gcc/explow.h | 1 +
|
||||
gcc/optabs.cc | 24 ++----------------------
|
||||
3 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index f6843398c4b..5fdfa81f69b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
|
||||
return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
}
|
||||
|
||||
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
|
||||
+ which has mode INNERMODE. Allow OP to be forced into a new register
|
||||
+ if necessary.
|
||||
+
|
||||
+ Return null on failure. */
|
||||
+
|
||||
+rtx
|
||||
+force_lowpart_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode)
|
||||
+{
|
||||
+ auto byte = subreg_lowpart_offset (outermode, innermode);
|
||||
+ return force_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index cbd1fcb7eb3..dd654649b06 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
|
||||
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
|
||||
index ce91f94ed43..804c0dc73ba 100644
|
||||
--- a/gcc/optabs.cc
|
||||
+++ b/gcc/optabs.cc
|
||||
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
|
||||
- conditions, VAL may already be a SUBREG against which we cannot generate
|
||||
- a further SUBREG. In this case, we expect forcing the value into a
|
||||
- register will work around the situation. */
|
||||
-
|
||||
-static rtx
|
||||
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
|
||||
- machine_mode imode)
|
||||
-{
|
||||
- rtx ret;
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- if (ret == NULL)
|
||||
- {
|
||||
- val = force_reg (imode, val);
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- gcc_assert (ret != NULL);
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
/* Expand a floating point absolute value or negation operation via a
|
||||
logical operation on the sign bit. */
|
||||
|
||||
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
||||
gen_lowpart (imode, op0),
|
||||
immed_wide_int_const (mask, imode),
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
|
||||
set_dst_reg_note (get_last_insn (), REG_EQUAL,
|
||||
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
|
||||
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
||||
|
||||
temp = expand_binop (imode, ior_optab, op0, op1,
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
}
|
||||
|
||||
return target;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
|
||||
--
|
||||
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Sat, 3 Aug 2024 20:37:54 +0200
|
||||
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
|
||||
some powerpc* configurations [PR116007]
|
||||
|
||||
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
|
||||
Unfortunately, that seems to fail building in some powerpc* configurations, where
|
||||
TFmode isn't available.
|
||||
quad.h has:
|
||||
#ifndef TFtype
|
||||
typedef float TFtype __attribute__ ((mode (TF)));
|
||||
#endif
|
||||
and uses TFtype. quad.h has:
|
||||
/* Define the complex type corresponding to __float128
|
||||
("_Complex __float128" is not allowed) */
|
||||
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
|
||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||
#else
|
||||
typedef _Complex float __attribute__((mode(KC))) __complex128;
|
||||
#endif
|
||||
with the conditional and KCmode use added during porting of libquadmath
|
||||
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
|
||||
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
|
||||
seemed easier to just define it to __float128 which should do the same thing.
|
||||
|
||||
2024-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/116007
|
||||
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
|
||||
define to __float128 before including soft-fp.h and quad.h.
|
||||
|
||||
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
|
||||
---
|
||||
libquadmath/math/sqrtq.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
|
||||
index 8ca2828d42ce..a58998a06670 100644
|
||||
--- a/libquadmath/math/sqrtq.c
|
||||
+++ b/libquadmath/math/sqrtq.c
|
||||
@@ -9,6 +9,9 @@
|
||||
&& defined(FE_TOWARDZERO) \
|
||||
&& defined(FE_INEXACT)
|
||||
#define USE_SOFT_FP 1
|
||||
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
|
||||
+#define TFtype __float128
|
||||
+#endif
|
||||
#include "../../libgcc/soft-fp/soft-fp.h"
|
||||
#include "../../libgcc/soft-fp/quad.h"
|
||||
#endif
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -4,17 +4,17 @@ Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/Makefile.rtl | 16 ++++++++--------
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
4 files changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
index 32cbdb692..463028fbe 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
|
||||
g-sercom.adb<libgnat/g-sercom__linux.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-loongarch.ads
|
||||
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +41,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -50,7 +59,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
|
||||
s-osinte.ads<libgnarl/s-osinte__linux.ads \
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -59,7 +68,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -69,10 +87,10 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
index 74aa3c412..ef6118f37 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -94,6 +94,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
@@ -84,7 +102,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -92,7 +110,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -101,7 +119,7 @@ index 8522094164e..92b230a462b 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -143,7 +161,7 @@ index 8522094164e..92b230a462b 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +191,7 @@ index 8522094164e..92b230a462b 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
index 0cbfd0e15..f97ed905b 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -195,10 +213,10 @@ index 987432c9307..4d782f07de9 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
index 05af82c27..626ac35bc 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -207,7 +225,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -216,7 +234,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -227,6 +245,3 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: Celeste <cielesti@protonmail.com>
|
||||
Date: Mon, 2 Sep 2024 02:54:17 +0000
|
||||
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
|
||||
|
||||
Add musl support for these 2 architectures based on fenv.h and signal.h from:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
|
||||
---
|
||||
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
|
||||
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
index a7364c0a..5b327e4a 100644
|
||||
--- a/libphobos/libdruntime/core/stdc/fenv.d
|
||||
+++ b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
|
||||
ushort __cs_selector;
|
||||
ushort __opcode;
|
||||
uint __data_offset;
|
||||
ushort __data_selector;
|
||||
ushort __unused5;
|
||||
version (X86_64)
|
||||
uint __mxcsr;
|
||||
}
|
||||
alias ushort fexcept_t;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ alias uint fenv_t;
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ struct fenv_t
|
||||
+ {
|
||||
+ uint __cw;
|
||||
+ }
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
static assert(false, "Architecture not supported.");
|
||||
}
|
||||
}
|
||||
else version (CRuntime_Newlib)
|
||||
{
|
||||
version (AArch64)
|
||||
{
|
||||
alias fenv_t = ulong;
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
index a8b7f751..78d8b3cd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
|
||||
else version (PPC_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 4096;
|
||||
enum SIGSTKSZ = 10240;
|
||||
}
|
||||
else version (X86_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 2048;
|
||||
enum SIGSTKSZ = 8192;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 2048;
|
||||
+ enum SIGSTKSZ = 8192;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 4096;
|
||||
+ enum SIGSTKSZ = 16384;
|
||||
+ }
|
||||
else
|
||||
static assert(0, "unimplemented");
|
||||
|
||||
//ucontext_t (defined in core.sys.posix.ucontext)
|
||||
//mcontext_t (defined in core.sys.posix.ucontext)
|
||||
|
||||
version (MIPS_Any)
|
||||
{
|
||||
struct stack_t
|
||||
{
|
||||
+126
-178
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-riscv64
|
||||
pkgrel=0
|
||||
pkgrel=5
|
||||
pkgdesc="Stage2 cross-compiler for riscv64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-riscv64 mpc1"
|
||||
depends="binutils-riscv64 mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-riscv64 binutils-riscv64"
|
||||
subpackages="g++-riscv64:gpp libstdc++-dev-riscv64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -64,6 +64,7 @@ _libitm=true
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_D=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
@@ -73,7 +74,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
@@ -115,7 +115,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
@@ -136,15 +135,14 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
case "$CTARGET_ARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64|loongarch64) LANG_D=false ;;
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
@@ -171,7 +169,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -184,13 +182,8 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
loongarch64)
|
||||
riscv64|loongarch64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
@@ -199,9 +192,17 @@ if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
subpackages="$subpackages gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
makedepends_build="$makedepends_build libucontext-dev"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
|
||||
else
|
||||
# shared libgphobos is for D programs to link against, so
|
||||
# skip building that while cross-compiling the GDC compiler
|
||||
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
@@ -216,13 +217,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,7 +242,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -278,6 +278,10 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-loongarch-disable-multilib-support.patch
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -285,44 +289,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -338,7 +319,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -346,33 +327,28 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
*)
|
||||
# cross-bootstrap GDC with a static libphobos: due to GCC's
|
||||
# ./configure not having a --disable-shared=libphobos option,
|
||||
# we have to use --enable-shared with everything else instead.
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
|
||||
else
|
||||
_bootstrap_configure="--enable-shared"
|
||||
fi
|
||||
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
|
||||
;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
if ! $_libquadmath; then
|
||||
_arch_configure="$_arch_configure --disable-libquadmath"
|
||||
# ppc64le needs both --disable-libquadmath{,-support}
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116007
|
||||
[ "$CARCH" = "ppc64le" ] &&
|
||||
_arch_configure="$_arch_configure
|
||||
--disable-libquadmath-support"
|
||||
fi
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
@@ -380,10 +356,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -404,7 +378,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -412,7 +386,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -422,10 +397,14 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
# cross-compiling libphobos with parallel make fails
|
||||
make all-target-libphobos
|
||||
fi
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
@@ -434,7 +413,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -449,7 +428,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -493,25 +472,22 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -560,8 +536,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -574,8 +549,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -593,15 +567,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -620,30 +592,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -651,49 +619,43 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -701,31 +663,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -733,8 +689,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -743,38 +698,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -783,12 +730,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -827,7 +771,7 @@ f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8
|
||||
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
5fd23a506b55c88d4f000e01c539eb25d6da2516949c9d7a1c9ee20f4c6b627e4788541284d9c14c33bafa7cb43ce2e0469dd91006152f00e30815107150320f 0026-ada-musl-support-fixes.patch
|
||||
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
@@ -837,4 +781,8 @@ b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,544 @@
|
||||
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Thu, 13 Jun 2024 12:48:21 +0100
|
||||
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
|
||||
|
||||
The testcase extracts one arm_neon.h vector from a pair (one subreg)
|
||||
and then reinterprets the result as an SVE vector (another subreg).
|
||||
Each subreg makes sense individually, but we can't fold them together
|
||||
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
|
||||
but the interpretation of 32 bytes -> 16*N bytes depends on
|
||||
whether N==1 or N>1.
|
||||
|
||||
Since the second subreg makes sense individually, simplify_subreg
|
||||
should bail out rather than ICE on it. simplify_gen_subreg will
|
||||
then do the same (because it already checks validate_subreg).
|
||||
This leaves simplify_gen_subreg returning null, requiring the
|
||||
caller to take appropriate action.
|
||||
|
||||
I think this is relatively likely to occur elsewhere, so the patch
|
||||
adds a helper for forcing a subreg, allowing a temporary pseudo to
|
||||
be created where necessary.
|
||||
|
||||
I'll follow up by using force_subreg in more places. This patch
|
||||
is intended to be a minimal backportable fix for the PR.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
|
||||
to fold two subregs together if their relationship isn't known
|
||||
at compile time.
|
||||
* explow.h (force_subreg): Declare.
|
||||
* explow.cc (force_subreg): New function.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
|
||||
|
||||
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/explow.cc | 15 +++++++++++++++
|
||||
gcc/explow.h | 2 ++
|
||||
gcc/simplify-rtx.cc | 5 +++++
|
||||
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 0d2edf3f19e..c9182594bc1 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
Advanced SIMD argument as an SVE vector. */
|
||||
if (!BYTES_BIG_ENDIAN
|
||||
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
|
||||
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
|
||||
rtx_vector_builder builder (VNx16BImode, 16, 2);
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index 8e5f6b8e680..f6843398c4b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
|
||||
return temp;
|
||||
}
|
||||
|
||||
+/* Like simplify_gen_subreg, but force OP into a new register if the
|
||||
+ subreg cannot be formed directly. */
|
||||
+
|
||||
+rtx
|
||||
+force_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode, poly_uint64 byte)
|
||||
+{
|
||||
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+ if (x)
|
||||
+ return x;
|
||||
+
|
||||
+ op = copy_to_mode_reg (innermode, op);
|
||||
+ return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index 16aa02cfb68..cbd1fcb7eb3 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
Args are mode (in case value is a constant) and the value. */
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
|
||||
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
|
||||
index dceaa13333c..729d408aa55 100644
|
||||
--- a/gcc/simplify-rtx.cc
|
||||
+++ b/gcc/simplify-rtx.cc
|
||||
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
|
||||
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
|
||||
rtx newx;
|
||||
|
||||
+ /* Make sure that the relationship between the two subregs is
|
||||
+ known at compile time. */
|
||||
+ if (!ordered_p (outersize, innermostsize))
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
if (outermode == innermostmode
|
||||
&& known_eq (byte, 0U)
|
||||
&& known_eq (SUBREG_BYTE (op), 0))
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
new file mode 100644
|
||||
index 00000000000..d728d1325ed
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl)
|
||||
+{
|
||||
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:30 +0100
|
||||
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
|
||||
|
||||
This patch makes the aarch64 code use force_subreg instead of
|
||||
simplify_gen_subreg in more places. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
(3) The offset wasn't a simple lowpart or highpart calculation;
|
||||
a later patch will deal with those.
|
||||
|
||||
gcc/
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
|
||||
Use force_subreg instead of simplify_gen_subreg.
|
||||
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svget_impl::expand): Likewise.
|
||||
(svget_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-functions.h
|
||||
(multireg_permute::expand): Likewise.
|
||||
|
||||
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
|
||||
gcc/config/aarch64/aarch64-simd.md | 4 ++--
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
|
||||
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
|
||||
4 files changed, 10 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index 75d21de1401..b2e46a073a8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
subreg_lowpart_offset (d->mode, quadmode));
|
||||
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
|
||||
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
else
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
|
||||
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
|
||||
/* And recalculate the index. */
|
||||
lane -= nunits / 4;
|
||||
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
|
||||
index 33ab0741e87..5b9efe0b165 100644
|
||||
--- a/gcc/config/aarch64/aarch64-simd.md
|
||||
+++ b/gcc/config/aarch64/aarch64-simd.md
|
||||
@@ -412,8 +412,8 @@
|
||||
"TARGET_SIMD"
|
||||
{
|
||||
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
|
||||
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
|
||||
- <MODE>mode, 0);
|
||||
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
|
||||
+ <MODE>mode, 0);
|
||||
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
|
||||
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
|
||||
DONE;
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index c9182594bc1..2c95da79572 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1121,9 +1121,8 @@ public:
|
||||
expand (function_expander &e) const override
|
||||
{
|
||||
/* Fold the access into a subreg rvalue. */
|
||||
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
|
||||
- GET_MODE (e.args[0]),
|
||||
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
|
||||
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1157,8 +1156,7 @@ public:
|
||||
e.add_fixed_operand (indices);
|
||||
return e.generate_insn (icode);
|
||||
}
|
||||
- return simplify_gen_subreg (e.result_mode (), e.args[0],
|
||||
- GET_MODE (e.args[0]), 0);
|
||||
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
index 3b8e575e98e..7d06a57ff83 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
@@ -639,9 +639,9 @@ public:
|
||||
{
|
||||
machine_mode elt_mode = e.vector_mode (0);
|
||||
rtx arg = e.args[0];
|
||||
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
- GET_MODE_SIZE (elt_mode)));
|
||||
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
+ GET_MODE_SIZE (elt_mode)));
|
||||
}
|
||||
return e.use_exact_insn (icode);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
|
||||
|
||||
This patch makes more use of force_lowpart_subreg, similarly
|
||||
to the recent patch for force_subreg. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
|
||||
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
|
||||
simplify_gen_subreg and lowpart_subreg.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
(add_load_store_slice_operand): Likewise.
|
||||
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
|
||||
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
|
||||
|
||||
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64.cc | 14 +++++---------
|
||||
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
|
||||
5 files changed, 23 insertions(+), 17 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index b2e46a073a8..264b9560709 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
int lane = INTVAL (lane_idx);
|
||||
|
||||
if (lane < nunits / 4)
|
||||
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
else
|
||||
{
|
||||
/* Select the upper 64 bits, either a V2SF or V4HF, this however
|
||||
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
gen_highpart_mode generates code that isn't optimal. */
|
||||
rtx temp1 = gen_reg_rtx (d->mode);
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_WSR64:
|
||||
case AARCH64_WSRF64:
|
||||
case AARCH64_WSR128:
|
||||
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
break;
|
||||
case AARCH64_WSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, input_val);
|
||||
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_RSR64:
|
||||
case AARCH64_RSRF64:
|
||||
case AARCH64_RSR128:
|
||||
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
|
||||
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
|
||||
+ target, sysreg_mode);
|
||||
case AARCH64_RSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, target);
|
||||
return gen_lowpart_SUBREG (SFmode, subreg);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 2c95da79572..3c970e9c5f8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
|
||||
insn_code icode = code_for_vcond_mask (mode, mode);
|
||||
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
e.add_output_operand (icode);
|
||||
e.add_input_operand (icode, e.args[1]);
|
||||
e.add_input_operand (icode, e.args[0]);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
index f4c91bcbb95..b66b35ae60b 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
|
||||
rtx base = e.args[argno];
|
||||
if (e.mode_suffix_id == MODE_vnum)
|
||||
{
|
||||
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
base = simplify_gen_binary (PLUS, SImode, base, vnum);
|
||||
}
|
||||
e.add_input_operand (icode, base);
|
||||
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
||||
index 1beec94629d..a064aeecbc0 100644
|
||||
--- a/gcc/config/aarch64/aarch64.cc
|
||||
+++ b/gcc/config/aarch64/aarch64.cc
|
||||
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
|
||||
/* can_change_mode_class must only return true if subregs and svreinterprets
|
||||
have the same semantics. */
|
||||
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
|
||||
- return lowpart_subreg (mode, x, GET_MODE (x));
|
||||
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
|
||||
|
||||
rtx res = gen_reg_rtx (mode);
|
||||
x = force_reg (GET_MODE (x), x);
|
||||
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = gen_lowpart (DImode, op1);
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
*high_in1 = gen_highpart (DImode, op1);
|
||||
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
-
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
|
||||
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
new file mode 100644
|
||||
index 00000000000..f561c34f732
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
|
||||
+{
|
||||
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 4/4] Add force_lowpart_subreg
|
||||
|
||||
optabs had a local function called lowpart_subreg_maybe_copy
|
||||
that is very similar to the lowpart version of force_subreg.
|
||||
This patch adds a force_lowpart_subreg wrapper around
|
||||
force_subreg and uses it in optabs.cc.
|
||||
|
||||
The only difference between the old and new functions is that
|
||||
the old one asserted success while the new one doesn't.
|
||||
It's common not to assert elsewhere when taking subregs;
|
||||
normally a null result is enough.
|
||||
|
||||
Later patches will make more use of the new function.
|
||||
|
||||
gcc/
|
||||
* explow.h (force_lowpart_subreg): Declare.
|
||||
* explow.cc (force_lowpart_subreg): New function.
|
||||
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
|
||||
(expand_absneg_bit): Use force_lowpart_subreg instead of
|
||||
lowpart_subreg_maybe_copy.
|
||||
(expand_copysign_bit): Likewise.
|
||||
|
||||
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
|
||||
---
|
||||
gcc/explow.cc | 14 ++++++++++++++
|
||||
gcc/explow.h | 1 +
|
||||
gcc/optabs.cc | 24 ++----------------------
|
||||
3 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index f6843398c4b..5fdfa81f69b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
|
||||
return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
}
|
||||
|
||||
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
|
||||
+ which has mode INNERMODE. Allow OP to be forced into a new register
|
||||
+ if necessary.
|
||||
+
|
||||
+ Return null on failure. */
|
||||
+
|
||||
+rtx
|
||||
+force_lowpart_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode)
|
||||
+{
|
||||
+ auto byte = subreg_lowpart_offset (outermode, innermode);
|
||||
+ return force_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index cbd1fcb7eb3..dd654649b06 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
|
||||
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
|
||||
index ce91f94ed43..804c0dc73ba 100644
|
||||
--- a/gcc/optabs.cc
|
||||
+++ b/gcc/optabs.cc
|
||||
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
|
||||
- conditions, VAL may already be a SUBREG against which we cannot generate
|
||||
- a further SUBREG. In this case, we expect forcing the value into a
|
||||
- register will work around the situation. */
|
||||
-
|
||||
-static rtx
|
||||
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
|
||||
- machine_mode imode)
|
||||
-{
|
||||
- rtx ret;
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- if (ret == NULL)
|
||||
- {
|
||||
- val = force_reg (imode, val);
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- gcc_assert (ret != NULL);
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
/* Expand a floating point absolute value or negation operation via a
|
||||
logical operation on the sign bit. */
|
||||
|
||||
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
||||
gen_lowpart (imode, op0),
|
||||
immed_wide_int_const (mask, imode),
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
|
||||
set_dst_reg_note (get_last_insn (), REG_EQUAL,
|
||||
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
|
||||
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
||||
|
||||
temp = expand_binop (imode, ior_optab, op0, op1,
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
}
|
||||
|
||||
return target;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
|
||||
--
|
||||
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Sat, 3 Aug 2024 20:37:54 +0200
|
||||
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
|
||||
some powerpc* configurations [PR116007]
|
||||
|
||||
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
|
||||
Unfortunately, that seems to fail building in some powerpc* configurations, where
|
||||
TFmode isn't available.
|
||||
quad.h has:
|
||||
#ifndef TFtype
|
||||
typedef float TFtype __attribute__ ((mode (TF)));
|
||||
#endif
|
||||
and uses TFtype. quad.h has:
|
||||
/* Define the complex type corresponding to __float128
|
||||
("_Complex __float128" is not allowed) */
|
||||
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
|
||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||
#else
|
||||
typedef _Complex float __attribute__((mode(KC))) __complex128;
|
||||
#endif
|
||||
with the conditional and KCmode use added during porting of libquadmath
|
||||
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
|
||||
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
|
||||
seemed easier to just define it to __float128 which should do the same thing.
|
||||
|
||||
2024-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/116007
|
||||
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
|
||||
define to __float128 before including soft-fp.h and quad.h.
|
||||
|
||||
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
|
||||
---
|
||||
libquadmath/math/sqrtq.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
|
||||
index 8ca2828d42ce..a58998a06670 100644
|
||||
--- a/libquadmath/math/sqrtq.c
|
||||
+++ b/libquadmath/math/sqrtq.c
|
||||
@@ -9,6 +9,9 @@
|
||||
&& defined(FE_TOWARDZERO) \
|
||||
&& defined(FE_INEXACT)
|
||||
#define USE_SOFT_FP 1
|
||||
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
|
||||
+#define TFtype __float128
|
||||
+#endif
|
||||
#include "../../libgcc/soft-fp/soft-fp.h"
|
||||
#include "../../libgcc/soft-fp/quad.h"
|
||||
#endif
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -4,17 +4,17 @@ Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/Makefile.rtl | 16 ++++++++--------
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
4 files changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
index 32cbdb692..463028fbe 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
|
||||
g-sercom.adb<libgnat/g-sercom__linux.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-loongarch.ads
|
||||
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +41,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -50,7 +59,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
|
||||
s-osinte.ads<libgnarl/s-osinte__linux.ads \
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -59,7 +68,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -69,10 +87,10 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
index 74aa3c412..ef6118f37 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -94,6 +94,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
@@ -84,7 +102,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -92,7 +110,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -101,7 +119,7 @@ index 8522094164e..92b230a462b 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -143,7 +161,7 @@ index 8522094164e..92b230a462b 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +191,7 @@ index 8522094164e..92b230a462b 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
index 0cbfd0e15..f97ed905b 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -195,10 +213,10 @@ index 987432c9307..4d782f07de9 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
index 05af82c27..626ac35bc 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -207,7 +225,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -216,7 +234,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -227,6 +245,3 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: Celeste <cielesti@protonmail.com>
|
||||
Date: Mon, 2 Sep 2024 02:54:17 +0000
|
||||
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
|
||||
|
||||
Add musl support for these 2 architectures based on fenv.h and signal.h from:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
|
||||
---
|
||||
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
|
||||
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
index a7364c0a..5b327e4a 100644
|
||||
--- a/libphobos/libdruntime/core/stdc/fenv.d
|
||||
+++ b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
|
||||
ushort __cs_selector;
|
||||
ushort __opcode;
|
||||
uint __data_offset;
|
||||
ushort __data_selector;
|
||||
ushort __unused5;
|
||||
version (X86_64)
|
||||
uint __mxcsr;
|
||||
}
|
||||
alias ushort fexcept_t;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ alias uint fenv_t;
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ struct fenv_t
|
||||
+ {
|
||||
+ uint __cw;
|
||||
+ }
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
static assert(false, "Architecture not supported.");
|
||||
}
|
||||
}
|
||||
else version (CRuntime_Newlib)
|
||||
{
|
||||
version (AArch64)
|
||||
{
|
||||
alias fenv_t = ulong;
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
index a8b7f751..78d8b3cd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
|
||||
else version (PPC_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 4096;
|
||||
enum SIGSTKSZ = 10240;
|
||||
}
|
||||
else version (X86_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 2048;
|
||||
enum SIGSTKSZ = 8192;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 2048;
|
||||
+ enum SIGSTKSZ = 8192;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 4096;
|
||||
+ enum SIGSTKSZ = 16384;
|
||||
+ }
|
||||
else
|
||||
static assert(0, "unimplemented");
|
||||
|
||||
//ucontext_t (defined in core.sys.posix.ucontext)
|
||||
//mcontext_t (defined in core.sys.posix.ucontext)
|
||||
|
||||
version (MIPS_Any)
|
||||
{
|
||||
struct stack_t
|
||||
{
|
||||
+126
-178
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86
|
||||
pkgrel=0
|
||||
pkgrel=5
|
||||
pkgdesc="Stage2 cross-compiler for x86"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-x86 mpc1"
|
||||
depends="binutils-x86 mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86 binutils-x86"
|
||||
subpackages="g++-x86:gpp libstdc++-dev-x86:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -64,6 +64,7 @@ _libitm=true
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_D=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
@@ -73,7 +74,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
@@ -115,7 +115,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
@@ -136,15 +135,14 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
case "$CTARGET_ARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64|loongarch64) LANG_D=false ;;
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
@@ -171,7 +169,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -184,13 +182,8 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
loongarch64)
|
||||
riscv64|loongarch64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
@@ -199,9 +192,17 @@ if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
subpackages="$subpackages gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
makedepends_build="$makedepends_build libucontext-dev"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
|
||||
else
|
||||
# shared libgphobos is for D programs to link against, so
|
||||
# skip building that while cross-compiling the GDC compiler
|
||||
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
@@ -216,13 +217,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,7 +242,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -278,6 +278,10 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-loongarch-disable-multilib-support.patch
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -285,44 +289,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -338,7 +319,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -346,33 +327,28 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
*)
|
||||
# cross-bootstrap GDC with a static libphobos: due to GCC's
|
||||
# ./configure not having a --disable-shared=libphobos option,
|
||||
# we have to use --enable-shared with everything else instead.
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
|
||||
else
|
||||
_bootstrap_configure="--enable-shared"
|
||||
fi
|
||||
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
|
||||
;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
if ! $_libquadmath; then
|
||||
_arch_configure="$_arch_configure --disable-libquadmath"
|
||||
# ppc64le needs both --disable-libquadmath{,-support}
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116007
|
||||
[ "$CARCH" = "ppc64le" ] &&
|
||||
_arch_configure="$_arch_configure
|
||||
--disable-libquadmath-support"
|
||||
fi
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
@@ -380,10 +356,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -404,7 +378,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -412,7 +386,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -422,10 +397,14 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
# cross-compiling libphobos with parallel make fails
|
||||
make all-target-libphobos
|
||||
fi
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
@@ -434,7 +413,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -449,7 +428,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -493,25 +472,22 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -560,8 +536,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -574,8 +549,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -593,15 +567,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -620,30 +592,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -651,49 +619,43 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -701,31 +663,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -733,8 +689,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -743,38 +698,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -783,12 +730,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -827,7 +771,7 @@ f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8
|
||||
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
5fd23a506b55c88d4f000e01c539eb25d6da2516949c9d7a1c9ee20f4c6b627e4788541284d9c14c33bafa7cb43ce2e0469dd91006152f00e30815107150320f 0026-ada-musl-support-fixes.patch
|
||||
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
@@ -837,4 +781,8 @@ b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,544 @@
|
||||
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Thu, 13 Jun 2024 12:48:21 +0100
|
||||
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
|
||||
|
||||
The testcase extracts one arm_neon.h vector from a pair (one subreg)
|
||||
and then reinterprets the result as an SVE vector (another subreg).
|
||||
Each subreg makes sense individually, but we can't fold them together
|
||||
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
|
||||
but the interpretation of 32 bytes -> 16*N bytes depends on
|
||||
whether N==1 or N>1.
|
||||
|
||||
Since the second subreg makes sense individually, simplify_subreg
|
||||
should bail out rather than ICE on it. simplify_gen_subreg will
|
||||
then do the same (because it already checks validate_subreg).
|
||||
This leaves simplify_gen_subreg returning null, requiring the
|
||||
caller to take appropriate action.
|
||||
|
||||
I think this is relatively likely to occur elsewhere, so the patch
|
||||
adds a helper for forcing a subreg, allowing a temporary pseudo to
|
||||
be created where necessary.
|
||||
|
||||
I'll follow up by using force_subreg in more places. This patch
|
||||
is intended to be a minimal backportable fix for the PR.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
|
||||
to fold two subregs together if their relationship isn't known
|
||||
at compile time.
|
||||
* explow.h (force_subreg): Declare.
|
||||
* explow.cc (force_subreg): New function.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
|
||||
|
||||
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/explow.cc | 15 +++++++++++++++
|
||||
gcc/explow.h | 2 ++
|
||||
gcc/simplify-rtx.cc | 5 +++++
|
||||
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 0d2edf3f19e..c9182594bc1 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
Advanced SIMD argument as an SVE vector. */
|
||||
if (!BYTES_BIG_ENDIAN
|
||||
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
|
||||
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
|
||||
rtx_vector_builder builder (VNx16BImode, 16, 2);
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index 8e5f6b8e680..f6843398c4b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
|
||||
return temp;
|
||||
}
|
||||
|
||||
+/* Like simplify_gen_subreg, but force OP into a new register if the
|
||||
+ subreg cannot be formed directly. */
|
||||
+
|
||||
+rtx
|
||||
+force_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode, poly_uint64 byte)
|
||||
+{
|
||||
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+ if (x)
|
||||
+ return x;
|
||||
+
|
||||
+ op = copy_to_mode_reg (innermode, op);
|
||||
+ return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index 16aa02cfb68..cbd1fcb7eb3 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
Args are mode (in case value is a constant) and the value. */
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
|
||||
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
|
||||
index dceaa13333c..729d408aa55 100644
|
||||
--- a/gcc/simplify-rtx.cc
|
||||
+++ b/gcc/simplify-rtx.cc
|
||||
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
|
||||
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
|
||||
rtx newx;
|
||||
|
||||
+ /* Make sure that the relationship between the two subregs is
|
||||
+ known at compile time. */
|
||||
+ if (!ordered_p (outersize, innermostsize))
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
if (outermode == innermostmode
|
||||
&& known_eq (byte, 0U)
|
||||
&& known_eq (SUBREG_BYTE (op), 0))
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
new file mode 100644
|
||||
index 00000000000..d728d1325ed
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl)
|
||||
+{
|
||||
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:30 +0100
|
||||
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
|
||||
|
||||
This patch makes the aarch64 code use force_subreg instead of
|
||||
simplify_gen_subreg in more places. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
(3) The offset wasn't a simple lowpart or highpart calculation;
|
||||
a later patch will deal with those.
|
||||
|
||||
gcc/
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
|
||||
Use force_subreg instead of simplify_gen_subreg.
|
||||
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svget_impl::expand): Likewise.
|
||||
(svget_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-functions.h
|
||||
(multireg_permute::expand): Likewise.
|
||||
|
||||
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
|
||||
gcc/config/aarch64/aarch64-simd.md | 4 ++--
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
|
||||
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
|
||||
4 files changed, 10 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index 75d21de1401..b2e46a073a8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
subreg_lowpart_offset (d->mode, quadmode));
|
||||
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
|
||||
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
else
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
|
||||
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
|
||||
/* And recalculate the index. */
|
||||
lane -= nunits / 4;
|
||||
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
|
||||
index 33ab0741e87..5b9efe0b165 100644
|
||||
--- a/gcc/config/aarch64/aarch64-simd.md
|
||||
+++ b/gcc/config/aarch64/aarch64-simd.md
|
||||
@@ -412,8 +412,8 @@
|
||||
"TARGET_SIMD"
|
||||
{
|
||||
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
|
||||
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
|
||||
- <MODE>mode, 0);
|
||||
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
|
||||
+ <MODE>mode, 0);
|
||||
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
|
||||
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
|
||||
DONE;
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index c9182594bc1..2c95da79572 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1121,9 +1121,8 @@ public:
|
||||
expand (function_expander &e) const override
|
||||
{
|
||||
/* Fold the access into a subreg rvalue. */
|
||||
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
|
||||
- GET_MODE (e.args[0]),
|
||||
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
|
||||
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1157,8 +1156,7 @@ public:
|
||||
e.add_fixed_operand (indices);
|
||||
return e.generate_insn (icode);
|
||||
}
|
||||
- return simplify_gen_subreg (e.result_mode (), e.args[0],
|
||||
- GET_MODE (e.args[0]), 0);
|
||||
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
index 3b8e575e98e..7d06a57ff83 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
@@ -639,9 +639,9 @@ public:
|
||||
{
|
||||
machine_mode elt_mode = e.vector_mode (0);
|
||||
rtx arg = e.args[0];
|
||||
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
- GET_MODE_SIZE (elt_mode)));
|
||||
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
+ GET_MODE_SIZE (elt_mode)));
|
||||
}
|
||||
return e.use_exact_insn (icode);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
|
||||
|
||||
This patch makes more use of force_lowpart_subreg, similarly
|
||||
to the recent patch for force_subreg. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
|
||||
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
|
||||
simplify_gen_subreg and lowpart_subreg.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
(add_load_store_slice_operand): Likewise.
|
||||
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
|
||||
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
|
||||
|
||||
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64.cc | 14 +++++---------
|
||||
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
|
||||
5 files changed, 23 insertions(+), 17 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index b2e46a073a8..264b9560709 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
int lane = INTVAL (lane_idx);
|
||||
|
||||
if (lane < nunits / 4)
|
||||
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
else
|
||||
{
|
||||
/* Select the upper 64 bits, either a V2SF or V4HF, this however
|
||||
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
gen_highpart_mode generates code that isn't optimal. */
|
||||
rtx temp1 = gen_reg_rtx (d->mode);
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_WSR64:
|
||||
case AARCH64_WSRF64:
|
||||
case AARCH64_WSR128:
|
||||
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
break;
|
||||
case AARCH64_WSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, input_val);
|
||||
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_RSR64:
|
||||
case AARCH64_RSRF64:
|
||||
case AARCH64_RSR128:
|
||||
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
|
||||
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
|
||||
+ target, sysreg_mode);
|
||||
case AARCH64_RSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, target);
|
||||
return gen_lowpart_SUBREG (SFmode, subreg);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 2c95da79572..3c970e9c5f8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
|
||||
insn_code icode = code_for_vcond_mask (mode, mode);
|
||||
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
e.add_output_operand (icode);
|
||||
e.add_input_operand (icode, e.args[1]);
|
||||
e.add_input_operand (icode, e.args[0]);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
index f4c91bcbb95..b66b35ae60b 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
|
||||
rtx base = e.args[argno];
|
||||
if (e.mode_suffix_id == MODE_vnum)
|
||||
{
|
||||
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
base = simplify_gen_binary (PLUS, SImode, base, vnum);
|
||||
}
|
||||
e.add_input_operand (icode, base);
|
||||
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
||||
index 1beec94629d..a064aeecbc0 100644
|
||||
--- a/gcc/config/aarch64/aarch64.cc
|
||||
+++ b/gcc/config/aarch64/aarch64.cc
|
||||
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
|
||||
/* can_change_mode_class must only return true if subregs and svreinterprets
|
||||
have the same semantics. */
|
||||
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
|
||||
- return lowpart_subreg (mode, x, GET_MODE (x));
|
||||
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
|
||||
|
||||
rtx res = gen_reg_rtx (mode);
|
||||
x = force_reg (GET_MODE (x), x);
|
||||
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = gen_lowpart (DImode, op1);
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
*high_in1 = gen_highpart (DImode, op1);
|
||||
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
-
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
|
||||
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
new file mode 100644
|
||||
index 00000000000..f561c34f732
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
|
||||
+{
|
||||
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 4/4] Add force_lowpart_subreg
|
||||
|
||||
optabs had a local function called lowpart_subreg_maybe_copy
|
||||
that is very similar to the lowpart version of force_subreg.
|
||||
This patch adds a force_lowpart_subreg wrapper around
|
||||
force_subreg and uses it in optabs.cc.
|
||||
|
||||
The only difference between the old and new functions is that
|
||||
the old one asserted success while the new one doesn't.
|
||||
It's common not to assert elsewhere when taking subregs;
|
||||
normally a null result is enough.
|
||||
|
||||
Later patches will make more use of the new function.
|
||||
|
||||
gcc/
|
||||
* explow.h (force_lowpart_subreg): Declare.
|
||||
* explow.cc (force_lowpart_subreg): New function.
|
||||
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
|
||||
(expand_absneg_bit): Use force_lowpart_subreg instead of
|
||||
lowpart_subreg_maybe_copy.
|
||||
(expand_copysign_bit): Likewise.
|
||||
|
||||
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
|
||||
---
|
||||
gcc/explow.cc | 14 ++++++++++++++
|
||||
gcc/explow.h | 1 +
|
||||
gcc/optabs.cc | 24 ++----------------------
|
||||
3 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index f6843398c4b..5fdfa81f69b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
|
||||
return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
}
|
||||
|
||||
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
|
||||
+ which has mode INNERMODE. Allow OP to be forced into a new register
|
||||
+ if necessary.
|
||||
+
|
||||
+ Return null on failure. */
|
||||
+
|
||||
+rtx
|
||||
+force_lowpart_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode)
|
||||
+{
|
||||
+ auto byte = subreg_lowpart_offset (outermode, innermode);
|
||||
+ return force_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index cbd1fcb7eb3..dd654649b06 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
|
||||
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
|
||||
index ce91f94ed43..804c0dc73ba 100644
|
||||
--- a/gcc/optabs.cc
|
||||
+++ b/gcc/optabs.cc
|
||||
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
|
||||
- conditions, VAL may already be a SUBREG against which we cannot generate
|
||||
- a further SUBREG. In this case, we expect forcing the value into a
|
||||
- register will work around the situation. */
|
||||
-
|
||||
-static rtx
|
||||
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
|
||||
- machine_mode imode)
|
||||
-{
|
||||
- rtx ret;
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- if (ret == NULL)
|
||||
- {
|
||||
- val = force_reg (imode, val);
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- gcc_assert (ret != NULL);
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
/* Expand a floating point absolute value or negation operation via a
|
||||
logical operation on the sign bit. */
|
||||
|
||||
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
||||
gen_lowpart (imode, op0),
|
||||
immed_wide_int_const (mask, imode),
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
|
||||
set_dst_reg_note (get_last_insn (), REG_EQUAL,
|
||||
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
|
||||
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
||||
|
||||
temp = expand_binop (imode, ior_optab, op0, op1,
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
}
|
||||
|
||||
return target;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
|
||||
--
|
||||
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Sat, 3 Aug 2024 20:37:54 +0200
|
||||
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
|
||||
some powerpc* configurations [PR116007]
|
||||
|
||||
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
|
||||
Unfortunately, that seems to fail building in some powerpc* configurations, where
|
||||
TFmode isn't available.
|
||||
quad.h has:
|
||||
#ifndef TFtype
|
||||
typedef float TFtype __attribute__ ((mode (TF)));
|
||||
#endif
|
||||
and uses TFtype. quad.h has:
|
||||
/* Define the complex type corresponding to __float128
|
||||
("_Complex __float128" is not allowed) */
|
||||
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
|
||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||
#else
|
||||
typedef _Complex float __attribute__((mode(KC))) __complex128;
|
||||
#endif
|
||||
with the conditional and KCmode use added during porting of libquadmath
|
||||
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
|
||||
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
|
||||
seemed easier to just define it to __float128 which should do the same thing.
|
||||
|
||||
2024-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/116007
|
||||
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
|
||||
define to __float128 before including soft-fp.h and quad.h.
|
||||
|
||||
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
|
||||
---
|
||||
libquadmath/math/sqrtq.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
|
||||
index 8ca2828d42ce..a58998a06670 100644
|
||||
--- a/libquadmath/math/sqrtq.c
|
||||
+++ b/libquadmath/math/sqrtq.c
|
||||
@@ -9,6 +9,9 @@
|
||||
&& defined(FE_TOWARDZERO) \
|
||||
&& defined(FE_INEXACT)
|
||||
#define USE_SOFT_FP 1
|
||||
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
|
||||
+#define TFtype __float128
|
||||
+#endif
|
||||
#include "../../libgcc/soft-fp/soft-fp.h"
|
||||
#include "../../libgcc/soft-fp/quad.h"
|
||||
#endif
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -4,17 +4,17 @@ Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/Makefile.rtl | 16 ++++++++--------
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
4 files changed, 35 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
index 32cbdb692..463028fbe 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
|
||||
g-sercom.adb<libgnat/g-sercom__linux.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-loongarch.ads
|
||||
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +41,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -50,7 +59,7 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
|
||||
s-osinte.ads<libgnarl/s-osinte__linux.ads \
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -59,7 +68,16 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -69,10 +87,10 @@ index 96306f8cc9a..090b6770ae5 100644
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
index 74aa3c412..ef6118f37 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -94,6 +94,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
@@ -84,7 +102,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -92,7 +110,7 @@ index 8522094164e..92b230a462b 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -101,7 +119,7 @@ index 8522094164e..92b230a462b 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -143,7 +161,7 @@ index 8522094164e..92b230a462b 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -173,7 +191,7 @@ index 8522094164e..92b230a462b 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
index 0cbfd0e15..f97ed905b 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -195,10 +213,10 @@ index 987432c9307..4d782f07de9 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
index 05af82c27..626ac35bc 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -207,7 +225,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -216,7 +234,7 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -227,6 +245,3 @@ index c0ee4a16bb1..ed796a48c1b 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: Celeste <cielesti@protonmail.com>
|
||||
Date: Mon, 2 Sep 2024 02:54:17 +0000
|
||||
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
|
||||
|
||||
Add musl support for these 2 architectures based on fenv.h and signal.h from:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
|
||||
---
|
||||
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
|
||||
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
|
||||
2 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
index a7364c0a..5b327e4a 100644
|
||||
--- a/libphobos/libdruntime/core/stdc/fenv.d
|
||||
+++ b/libphobos/libdruntime/core/stdc/fenv.d
|
||||
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
|
||||
ushort __cs_selector;
|
||||
ushort __opcode;
|
||||
uint __data_offset;
|
||||
ushort __data_selector;
|
||||
ushort __unused5;
|
||||
version (X86_64)
|
||||
uint __mxcsr;
|
||||
}
|
||||
alias ushort fexcept_t;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ alias uint fenv_t;
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ struct fenv_t
|
||||
+ {
|
||||
+ uint __cw;
|
||||
+ }
|
||||
+ alias uint fexcept_t;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
static assert(false, "Architecture not supported.");
|
||||
}
|
||||
}
|
||||
else version (CRuntime_Newlib)
|
||||
{
|
||||
version (AArch64)
|
||||
{
|
||||
alias fenv_t = ulong;
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
index a8b7f751..78d8b3cd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
|
||||
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
|
||||
else version (PPC_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 4096;
|
||||
enum SIGSTKSZ = 10240;
|
||||
}
|
||||
else version (X86_Any)
|
||||
{
|
||||
enum MINSIGSTKSZ = 2048;
|
||||
enum SIGSTKSZ = 8192;
|
||||
}
|
||||
+ else version (RISCV64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 2048;
|
||||
+ enum SIGSTKSZ = 8192;
|
||||
+ }
|
||||
+ else version (LoongArch64)
|
||||
+ {
|
||||
+ enum MINSIGSTKSZ = 4096;
|
||||
+ enum SIGSTKSZ = 16384;
|
||||
+ }
|
||||
else
|
||||
static assert(0, "unimplemented");
|
||||
|
||||
//ucontext_t (defined in core.sys.posix.ucontext)
|
||||
//mcontext_t (defined in core.sys.posix.ucontext)
|
||||
|
||||
version (MIPS_Any)
|
||||
{
|
||||
struct stack_t
|
||||
{
|
||||
+126
-178
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86_64
|
||||
pkgrel=0
|
||||
pkgrel=5
|
||||
pkgdesc="Stage2 cross-compiler for x86_64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-x86_64 mpc1"
|
||||
depends="binutils-x86_64 mpc1 so:libc.musl-aarch64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86_64 binutils-x86_64"
|
||||
subpackages="g++-x86_64:gpp libstdc++-dev-x86_64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -64,6 +64,7 @@ _libitm=true
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_D=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
@@ -73,7 +74,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
@@ -115,7 +115,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
@@ -136,15 +135,14 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
case "$CTARGET_ARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64|loongarch64) LANG_D=false ;;
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
@@ -171,7 +169,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -184,13 +182,8 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
loongarch64)
|
||||
riscv64|loongarch64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
@@ -199,9 +192,17 @@ if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
subpackages="$subpackages gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
makedepends_build="$makedepends_build libucontext-dev"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
|
||||
else
|
||||
# shared libgphobos is for D programs to link against, so
|
||||
# skip building that while cross-compiling the GDC compiler
|
||||
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
@@ -216,13 +217,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,7 +232,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,7 +242,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -278,6 +278,10 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-loongarch-disable-multilib-support.patch
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -285,44 +289,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -338,7 +319,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -346,33 +327,28 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
*)
|
||||
# cross-bootstrap GDC with a static libphobos: due to GCC's
|
||||
# ./configure not having a --disable-shared=libphobos option,
|
||||
# we have to use --enable-shared with everything else instead.
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
|
||||
else
|
||||
_bootstrap_configure="--enable-shared"
|
||||
fi
|
||||
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
|
||||
;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
if ! $_libquadmath; then
|
||||
_arch_configure="$_arch_configure --disable-libquadmath"
|
||||
# ppc64le needs both --disable-libquadmath{,-support}
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116007
|
||||
[ "$CARCH" = "ppc64le" ] &&
|
||||
_arch_configure="$_arch_configure
|
||||
--disable-libquadmath-support"
|
||||
fi
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
@@ -380,10 +356,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -404,7 +378,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -412,7 +386,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -422,10 +397,14 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
|
||||
# cross-compiling libphobos with parallel make fails
|
||||
make all-target-libphobos
|
||||
fi
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
@@ -434,7 +413,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -449,7 +428,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -493,25 +472,22 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -560,8 +536,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -574,8 +549,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -593,15 +567,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
depends="$depends so:libc.musl-aarch64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -620,30 +592,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -651,49 +619,43 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -701,31 +663,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -733,8 +689,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -743,38 +698,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -783,12 +730,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -827,7 +771,7 @@ f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8
|
||||
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
5fd23a506b55c88d4f000e01c539eb25d6da2516949c9d7a1c9ee20f4c6b627e4788541284d9c14c33bafa7cb43ce2e0469dd91006152f00e30815107150320f 0026-ada-musl-support-fixes.patch
|
||||
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
@@ -837,4 +781,8 @@ b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,544 @@
|
||||
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Thu, 13 Jun 2024 12:48:21 +0100
|
||||
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
|
||||
|
||||
The testcase extracts one arm_neon.h vector from a pair (one subreg)
|
||||
and then reinterprets the result as an SVE vector (another subreg).
|
||||
Each subreg makes sense individually, but we can't fold them together
|
||||
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
|
||||
but the interpretation of 32 bytes -> 16*N bytes depends on
|
||||
whether N==1 or N>1.
|
||||
|
||||
Since the second subreg makes sense individually, simplify_subreg
|
||||
should bail out rather than ICE on it. simplify_gen_subreg will
|
||||
then do the same (because it already checks validate_subreg).
|
||||
This leaves simplify_gen_subreg returning null, requiring the
|
||||
caller to take appropriate action.
|
||||
|
||||
I think this is relatively likely to occur elsewhere, so the patch
|
||||
adds a helper for forcing a subreg, allowing a temporary pseudo to
|
||||
be created where necessary.
|
||||
|
||||
I'll follow up by using force_subreg in more places. This patch
|
||||
is intended to be a minimal backportable fix for the PR.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
|
||||
to fold two subregs together if their relationship isn't known
|
||||
at compile time.
|
||||
* explow.h (force_subreg): Declare.
|
||||
* explow.cc (force_subreg): New function.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
|
||||
|
||||
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/explow.cc | 15 +++++++++++++++
|
||||
gcc/explow.h | 2 ++
|
||||
gcc/simplify-rtx.cc | 5 +++++
|
||||
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 0d2edf3f19e..c9182594bc1 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1174,7 +1174,7 @@ public:
|
||||
Advanced SIMD argument as an SVE vector. */
|
||||
if (!BYTES_BIG_ENDIAN
|
||||
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
|
||||
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
|
||||
|
||||
rtx_vector_builder builder (VNx16BImode, 16, 2);
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index 8e5f6b8e680..f6843398c4b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
|
||||
return temp;
|
||||
}
|
||||
|
||||
+/* Like simplify_gen_subreg, but force OP into a new register if the
|
||||
+ subreg cannot be formed directly. */
|
||||
+
|
||||
+rtx
|
||||
+force_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode, poly_uint64 byte)
|
||||
+{
|
||||
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+ if (x)
|
||||
+ return x;
|
||||
+
|
||||
+ op = copy_to_mode_reg (innermode, op);
|
||||
+ return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index 16aa02cfb68..cbd1fcb7eb3 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
Args are mode (in case value is a constant) and the value. */
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
|
||||
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
|
||||
index dceaa13333c..729d408aa55 100644
|
||||
--- a/gcc/simplify-rtx.cc
|
||||
+++ b/gcc/simplify-rtx.cc
|
||||
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
|
||||
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
|
||||
rtx newx;
|
||||
|
||||
+ /* Make sure that the relationship between the two subregs is
|
||||
+ known at compile time. */
|
||||
+ if (!ordered_p (outersize, innermostsize))
|
||||
+ return NULL_RTX;
|
||||
+
|
||||
if (outermode == innermostmode
|
||||
&& known_eq (byte, 0U)
|
||||
&& known_eq (SUBREG_BYTE (op), 0))
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
new file mode 100644
|
||||
index 00000000000..d728d1325ed
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl)
|
||||
+{
|
||||
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:30 +0100
|
||||
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
|
||||
|
||||
This patch makes the aarch64 code use force_subreg instead of
|
||||
simplify_gen_subreg in more places. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
(3) The offset wasn't a simple lowpart or highpart calculation;
|
||||
a later patch will deal with those.
|
||||
|
||||
gcc/
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
|
||||
Use force_subreg instead of simplify_gen_subreg.
|
||||
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svget_impl::expand): Likewise.
|
||||
(svget_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-functions.h
|
||||
(multireg_permute::expand): Likewise.
|
||||
|
||||
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
|
||||
gcc/config/aarch64/aarch64-simd.md | 4 ++--
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
|
||||
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
|
||||
4 files changed, 10 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index 75d21de1401..b2e46a073a8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
subreg_lowpart_offset (d->mode, quadmode));
|
||||
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
|
||||
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
else
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
|
||||
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
|
||||
|
||||
/* And recalculate the index. */
|
||||
lane -= nunits / 4;
|
||||
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
|
||||
index 33ab0741e87..5b9efe0b165 100644
|
||||
--- a/gcc/config/aarch64/aarch64-simd.md
|
||||
+++ b/gcc/config/aarch64/aarch64-simd.md
|
||||
@@ -412,8 +412,8 @@
|
||||
"TARGET_SIMD"
|
||||
{
|
||||
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
|
||||
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
|
||||
- <MODE>mode, 0);
|
||||
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
|
||||
+ <MODE>mode, 0);
|
||||
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
|
||||
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
|
||||
DONE;
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index c9182594bc1..2c95da79572 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1121,9 +1121,8 @@ public:
|
||||
expand (function_expander &e) const override
|
||||
{
|
||||
/* Fold the access into a subreg rvalue. */
|
||||
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
|
||||
- GET_MODE (e.args[0]),
|
||||
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
|
||||
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1157,8 +1156,7 @@ public:
|
||||
e.add_fixed_operand (indices);
|
||||
return e.generate_insn (icode);
|
||||
}
|
||||
- return simplify_gen_subreg (e.result_mode (), e.args[0],
|
||||
- GET_MODE (e.args[0]), 0);
|
||||
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
index 3b8e575e98e..7d06a57ff83 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
|
||||
@@ -639,9 +639,9 @@ public:
|
||||
{
|
||||
machine_mode elt_mode = e.vector_mode (0);
|
||||
rtx arg = e.args[0];
|
||||
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
- GET_MODE_SIZE (elt_mode)));
|
||||
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
|
||||
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
|
||||
+ GET_MODE_SIZE (elt_mode)));
|
||||
}
|
||||
return e.use_exact_insn (icode);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
|
||||
|
||||
This patch makes more use of force_lowpart_subreg, similarly
|
||||
to the recent patch for force_subreg. The criteria were:
|
||||
|
||||
(1) The code is obviously specific to expand (where new pseudos
|
||||
can be created).
|
||||
|
||||
(2) The value is obviously an rvalue rather than an lvalue.
|
||||
|
||||
gcc/
|
||||
PR target/115464
|
||||
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
|
||||
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
|
||||
simplify_gen_subreg and lowpart_subreg.
|
||||
* config/aarch64/aarch64-sve-builtins-base.cc
|
||||
(svset_neonq_impl::expand): Likewise.
|
||||
* config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
(add_load_store_slice_operand): Likewise.
|
||||
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
|
||||
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
|
||||
|
||||
gcc/testsuite/
|
||||
PR target/115464
|
||||
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
|
||||
|
||||
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
|
||||
---
|
||||
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
|
||||
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
|
||||
gcc/config/aarch64/aarch64.cc | 14 +++++---------
|
||||
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
|
||||
5 files changed, 23 insertions(+), 17 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
index b2e46a073a8..264b9560709 100644
|
||||
--- a/gcc/config/aarch64/aarch64-builtins.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-builtins.cc
|
||||
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
int lane = INTVAL (lane_idx);
|
||||
|
||||
if (lane < nunits / 4)
|
||||
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
else
|
||||
{
|
||||
/* Select the upper 64 bits, either a V2SF or V4HF, this however
|
||||
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
|
||||
gen_highpart_mode generates code that isn't optimal. */
|
||||
rtx temp1 = gen_reg_rtx (d->mode);
|
||||
rtx temp2 = gen_reg_rtx (DImode);
|
||||
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
|
||||
- subreg_lowpart_offset (d->mode, quadmode));
|
||||
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
|
||||
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
|
||||
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_WSR64:
|
||||
case AARCH64_WSRF64:
|
||||
case AARCH64_WSR128:
|
||||
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
|
||||
break;
|
||||
case AARCH64_WSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, input_val);
|
||||
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
|
||||
case AARCH64_RSR64:
|
||||
case AARCH64_RSRF64:
|
||||
case AARCH64_RSR128:
|
||||
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
|
||||
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
|
||||
+ target, sysreg_mode);
|
||||
case AARCH64_RSRF:
|
||||
subreg = gen_lowpart_SUBREG (SImode, target);
|
||||
return gen_lowpart_SUBREG (SFmode, subreg);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
index 2c95da79572..3c970e9c5f8 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (BYTES_BIG_ENDIAN)
|
||||
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
|
||||
insn_code icode = code_for_vcond_mask (mode, mode);
|
||||
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
|
||||
e.add_output_operand (icode);
|
||||
e.add_input_operand (icode, e.args[1]);
|
||||
e.add_input_operand (icode, e.args[0]);
|
||||
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
index f4c91bcbb95..b66b35ae60b 100644
|
||||
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
|
||||
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
|
||||
rtx base = e.args[argno];
|
||||
if (e.mode_suffix_id == MODE_vnum)
|
||||
{
|
||||
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
|
||||
base = simplify_gen_binary (PLUS, SImode, base, vnum);
|
||||
}
|
||||
e.add_input_operand (icode, base);
|
||||
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
|
||||
index 1beec94629d..a064aeecbc0 100644
|
||||
--- a/gcc/config/aarch64/aarch64.cc
|
||||
+++ b/gcc/config/aarch64/aarch64.cc
|
||||
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
|
||||
/* can_change_mode_class must only return true if subregs and svreinterprets
|
||||
have the same semantics. */
|
||||
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
|
||||
- return lowpart_subreg (mode, x, GET_MODE (x));
|
||||
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
|
||||
|
||||
rtx res = gen_reg_rtx (mode);
|
||||
x = force_reg (GET_MODE (x), x);
|
||||
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = gen_lowpart (DImode, op1);
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
*high_in1 = gen_highpart (DImode, op1);
|
||||
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
|
||||
rtx *high_in2)
|
||||
{
|
||||
*low_dest = gen_reg_rtx (DImode);
|
||||
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
-
|
||||
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
|
||||
- subreg_lowpart_offset (DImode, TImode));
|
||||
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
|
||||
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
|
||||
*high_dest = gen_reg_rtx (DImode);
|
||||
|
||||
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
new file mode 100644
|
||||
index 00000000000..f561c34f732
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+#include <arm_neon.h>
|
||||
+#include <arm_sve.h>
|
||||
+#include <arm_neon_sve_bridge.h>
|
||||
+
|
||||
+svuint16_t
|
||||
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
|
||||
+{
|
||||
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
|
||||
|
||||
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Sandiford <richard.sandiford@arm.com>
|
||||
Date: Tue, 18 Jun 2024 12:22:31 +0100
|
||||
Subject: [PATCH 4/4] Add force_lowpart_subreg
|
||||
|
||||
optabs had a local function called lowpart_subreg_maybe_copy
|
||||
that is very similar to the lowpart version of force_subreg.
|
||||
This patch adds a force_lowpart_subreg wrapper around
|
||||
force_subreg and uses it in optabs.cc.
|
||||
|
||||
The only difference between the old and new functions is that
|
||||
the old one asserted success while the new one doesn't.
|
||||
It's common not to assert elsewhere when taking subregs;
|
||||
normally a null result is enough.
|
||||
|
||||
Later patches will make more use of the new function.
|
||||
|
||||
gcc/
|
||||
* explow.h (force_lowpart_subreg): Declare.
|
||||
* explow.cc (force_lowpart_subreg): New function.
|
||||
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
|
||||
(expand_absneg_bit): Use force_lowpart_subreg instead of
|
||||
lowpart_subreg_maybe_copy.
|
||||
(expand_copysign_bit): Likewise.
|
||||
|
||||
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
|
||||
---
|
||||
gcc/explow.cc | 14 ++++++++++++++
|
||||
gcc/explow.h | 1 +
|
||||
gcc/optabs.cc | 24 ++----------------------
|
||||
3 files changed, 17 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/gcc/explow.cc b/gcc/explow.cc
|
||||
index f6843398c4b..5fdfa81f69b 100644
|
||||
--- a/gcc/explow.cc
|
||||
+++ b/gcc/explow.cc
|
||||
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
|
||||
return simplify_gen_subreg (outermode, op, innermode, byte);
|
||||
}
|
||||
|
||||
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
|
||||
+ which has mode INNERMODE. Allow OP to be forced into a new register
|
||||
+ if necessary.
|
||||
+
|
||||
+ Return null on failure. */
|
||||
+
|
||||
+rtx
|
||||
+force_lowpart_subreg (machine_mode outermode, rtx op,
|
||||
+ machine_mode innermode)
|
||||
+{
|
||||
+ auto byte = subreg_lowpart_offset (outermode, innermode);
|
||||
+ return force_subreg (outermode, op, innermode, byte);
|
||||
+}
|
||||
+
|
||||
/* If X is a memory ref, copy its contents to a new temp reg and return
|
||||
that reg. Otherwise, return X. */
|
||||
|
||||
diff --git a/gcc/explow.h b/gcc/explow.h
|
||||
index cbd1fcb7eb3..dd654649b06 100644
|
||||
--- a/gcc/explow.h
|
||||
+++ b/gcc/explow.h
|
||||
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
|
||||
extern rtx force_reg (machine_mode, rtx);
|
||||
|
||||
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
|
||||
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
|
||||
|
||||
/* Return given rtx, copied into a new temp reg if it was in memory. */
|
||||
extern rtx force_not_mem (rtx);
|
||||
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
|
||||
index ce91f94ed43..804c0dc73ba 100644
|
||||
--- a/gcc/optabs.cc
|
||||
+++ b/gcc/optabs.cc
|
||||
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
|
||||
- conditions, VAL may already be a SUBREG against which we cannot generate
|
||||
- a further SUBREG. In this case, we expect forcing the value into a
|
||||
- register will work around the situation. */
|
||||
-
|
||||
-static rtx
|
||||
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
|
||||
- machine_mode imode)
|
||||
-{
|
||||
- rtx ret;
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- if (ret == NULL)
|
||||
- {
|
||||
- val = force_reg (imode, val);
|
||||
- ret = lowpart_subreg (omode, val, imode);
|
||||
- gcc_assert (ret != NULL);
|
||||
- }
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
/* Expand a floating point absolute value or negation operation via a
|
||||
logical operation on the sign bit. */
|
||||
|
||||
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
||||
gen_lowpart (imode, op0),
|
||||
immed_wide_int_const (mask, imode),
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
|
||||
set_dst_reg_note (get_last_insn (), REG_EQUAL,
|
||||
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
|
||||
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
||||
|
||||
temp = expand_binop (imode, ior_optab, op0, op1,
|
||||
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
|
||||
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
|
||||
+ target = force_lowpart_subreg (mode, temp, imode);
|
||||
}
|
||||
|
||||
return target;
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
|
||||
--
|
||||
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Sat, 3 Aug 2024 20:37:54 +0200
|
||||
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
|
||||
some powerpc* configurations [PR116007]
|
||||
|
||||
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
|
||||
Unfortunately, that seems to fail building in some powerpc* configurations, where
|
||||
TFmode isn't available.
|
||||
quad.h has:
|
||||
#ifndef TFtype
|
||||
typedef float TFtype __attribute__ ((mode (TF)));
|
||||
#endif
|
||||
and uses TFtype. quad.h has:
|
||||
/* Define the complex type corresponding to __float128
|
||||
("_Complex __float128" is not allowed) */
|
||||
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
|
||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||
#else
|
||||
typedef _Complex float __attribute__((mode(KC))) __complex128;
|
||||
#endif
|
||||
with the conditional and KCmode use added during porting of libquadmath
|
||||
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
|
||||
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
|
||||
seemed easier to just define it to __float128 which should do the same thing.
|
||||
|
||||
2024-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/116007
|
||||
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
|
||||
define to __float128 before including soft-fp.h and quad.h.
|
||||
|
||||
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
|
||||
---
|
||||
libquadmath/math/sqrtq.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
|
||||
index 8ca2828d42ce..a58998a06670 100644
|
||||
--- a/libquadmath/math/sqrtq.c
|
||||
+++ b/libquadmath/math/sqrtq.c
|
||||
@@ -9,6 +9,9 @@
|
||||
&& defined(FE_TOWARDZERO) \
|
||||
&& defined(FE_INEXACT)
|
||||
#define USE_SOFT_FP 1
|
||||
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
|
||||
+#define TFtype __float128
|
||||
+#endif
|
||||
#include "../../libgcc/soft-fp/soft-fp.h"
|
||||
#include "../../libgcc/soft-fp/quad.h"
|
||||
#endif
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
pkgname=grub-efi-x86
|
||||
pkgver=2.12
|
||||
pkgrel=6
|
||||
pkgrel=7
|
||||
|
||||
_arch="x86"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -22,5 +22,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
bad54187b4fbb9f78f2d619ff9a652a4927c557070c2c39334fd9900ae5aeb956144055602ca56295d7966c2d10090ef142a073dd67eb14f7b41ba0d54c78d4d grub-efi-2.12-r6-x86-edge.apk
|
||||
8a44b4d48c804fb2c62c3d75c85f86a108f1446d3b1f194cde3c1b3ce7653825379d5733fdf8e08013afcea0d9c879438556d8cbbfb7d5cd6c41b98ab7216492 grub-efi-2.12-r7-x86-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-aarch64
|
||||
pkgver=1.2.5
|
||||
pkgrel=1
|
||||
pkgrel=9
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-aarch64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5ad546aca584d77f6fcf7d92bc5e6432d8c32b3db2922a4099423649e674b5c149464bd0048021e50b18398a00382bbeb6a0a598148bea4fa6d783f5c4c4445d musl-1.2.5-r1-aarch64-edge.apk
|
||||
b6fed1441c0eacfea0061967915a876ce0af79b83511d9b05ae7e7cf489d88e36a544fa7f7512f390429d7d0217b672c04a83dfceea603ce0e86d2a47c50f4cc musl-dev-1.2.5-r1-aarch64-edge.apk
|
||||
0f874d6c7be3a69a69553d99c4b50ede6e3b92811052c13a36d8dd35955817f437f77e185d624804526d36e8cc6e99be4eedf8c2d3bcf09340068b1e41da5a49 musl-1.2.5-r9-aarch64-edge.apk
|
||||
2b85e131b5b8829a02ca5d6ab9bf3e897468834e6db9e5d54127037b5951f5c3ca06964d225d7d4376637ae77467c4001cbcc7f179705a6a206587ac8d7cd266 musl-dev-1.2.5-r9-aarch64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.2.5
|
||||
pkgrel=1
|
||||
pkgrel=9
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
148883dfd80bb670df4c6a919aaf3334d203a87fac98df8046a920a2e4c1c3439347f5653abc2994e9a9fe2946764395cd83e2f2437ab903e37f8ad3fcc6637a musl-1.2.5-r1-armhf-edge.apk
|
||||
052f4f3ff6974aadbe90c1a69c4b29a1fefc25d2f2f794b3d55ed49b79a94dab900592a65b3c80ae9824580eab4fb99cb2cfdf9399354e74a1804871d97774a0 musl-dev-1.2.5-r1-armhf-edge.apk
|
||||
10f462174d0fa0caaa4e4b767848b2d3a89c70617aca562cf0cd310ee2119eee8638b9eb2909a0756ee8e8952236624c1bacaac314b2d1146cf1c47b4c9b409d musl-1.2.5-r9-armhf-edge.apk
|
||||
b9305bbe13d94de869d354f3657f59f1e08e897c2b6b0d0419a1dc384f00160dbf56df52b75196f238bcee62dd2e7e613755a91ee6e28776f6df38e5e9203de1 musl-dev-1.2.5-r9-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armv7
|
||||
pkgver=1.2.5
|
||||
pkgrel=1
|
||||
pkgrel=9
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armv7:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f3da7602184940c3ca4ddc973fd127fe08eb5e9141cf4c22cf49ccf131ef836b7f697f20dc64c7e18661f88779354c8b93c14521d18fb2e83d10638c3c8ed7d5 musl-1.2.5-r1-armv7-edge.apk
|
||||
b2678887dfc565691d92c1604137d984c5ce68f7c39c1ec2fd7200d4df4f818d4690c323f93b76ca1d4498a5dc36dff61959e06cc749099c706f85601d915d8e musl-dev-1.2.5-r1-armv7-edge.apk
|
||||
874994ef577a9651b444ddab90f8ac248b7b2ef8c4b0b7dda38d4ff2200e76a737e9dc27b63da5e7fd4022d18829badcdf99969cc52752d710ec598460cbe03d musl-1.2.5-r9-armv7-edge.apk
|
||||
945a53e8ac24889bcc1bee2b9235fa743c6f653ca0f1611176797ae242eb26c19d3521ead290e9a759ffff38135073c6d2677879c891499c3a50f7f23ab0cead musl-dev-1.2.5-r9-armv7-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-riscv64
|
||||
pkgver=1.2.5
|
||||
pkgrel=1
|
||||
pkgrel=9
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-riscv64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
822f24faaf2285174742788da0dceef3bada4dbd0db9f67362876b3c0ab6bc647a0f2f0cc70e2e28dbb90121f08b65640a344e7cae8416a84bfb389db32e7d9c musl-1.2.5-r1-riscv64-edge.apk
|
||||
04ac4a81d713f71b68082767ce2afab3ce458730664c140f49a0b33f257666a6b4289c5b53935fe16345f8445a458e5307511773651c4574526cfaaf232c239a musl-dev-1.2.5-r1-riscv64-edge.apk
|
||||
eb1e36d35decc8df6c383845e73a703bb5e0f322ca4ba8c346a54652f6d3c9c46d1eef901031ccfaa3a52a132963a67f35f791480f5918c091f3141775e1b1b9 musl-1.2.5-r9-riscv64-edge.apk
|
||||
0cfa1711bc803674fb6504ed7466d73c2e35b735cbd78a5348bafd48973ed89afb877d966202d822f5e7d1064e99c1cc8452672478e3c6f30bac611328462c57 musl-dev-1.2.5-r9-riscv64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86
|
||||
pkgver=1.2.5
|
||||
pkgrel=1
|
||||
pkgrel=9
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-x86:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
53a30a57f0db29e8d73d7190590fce18a19bcd358f9b0f3d4fa0b8821dad4ed5f1065c3c07dbc373a23cbd98c9a9dc1c2c2d864ac88eefd53dc5f89d8e57ed67 musl-1.2.5-r1-x86-edge.apk
|
||||
e9178fcfe27bdc7568c35889cff8cf20829f67460fd6dc22a6ca0465063a809081ee1267b4275432d23d1e7d457a4b207a0ff11c678233c4e430a1173d4ccea8 musl-dev-1.2.5-r1-x86-edge.apk
|
||||
809a21a20c1c0558c717b566c2fa53af05bb5eab0ca44bc1616b746f89fb4bf9ea05a733a6f4d6b674cd8d531c2734d3d44e38460c4939ac8e24423c91ad8e57 musl-1.2.5-r9-x86-edge.apk
|
||||
be193ac93468095cbecd9fbc84ee16b9fc2f5e7f5181b6759669cb180cdd31daf1b094eb9585e1ddc9b27be7cedc931a51eaca09c1dce191826f8b6f1c15587d musl-dev-1.2.5-r9-x86-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86_64
|
||||
pkgver=1.2.5
|
||||
pkgrel=1
|
||||
pkgrel=9
|
||||
arch="aarch64"
|
||||
subpackages="musl-dev-x86_64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5506970c66b6da294d32961e94cadc6926a7405915a3d4dd519ed8c2aae829f2fbfaab2ccc8d0794f4aa102aa3e8cbd62099aa54668a11ac0c5072f59befece6 musl-1.2.5-r1-x86_64-edge.apk
|
||||
bd2602e59831ba860a548c8281bb62be3382b4035f18c9e36350be644db61a762a413e1d696697d402a57d4bc565faf86c2a212e27c9b9a890d765f794bbe829 musl-dev-1.2.5-r1-x86_64-edge.apk
|
||||
b762a06e161cfbdf3a62c155dd6b0d11d81b81543a2381b7ea0ccd56320f9ed14c52a19dd76033594cfefd3b5da20517a2fda3a7c94d7e43c0f378912237b62f musl-1.2.5-r9-x86_64-edge.apk
|
||||
396a982f454b377df901bc465ec5e5ba8b91c2e9e9b6cd52ae28f83f4b5fbd673e7c79657ffa94d0d164e80d77dac813c5b7c51914fabcae3167d0bbc182b01a musl-dev-1.2.5-r9-x86_64-edge.apk
|
||||
"
|
||||
@@ -0,0 +1,25 @@
|
||||
It seems that newer versions of GNU Make do not allow to use variables before
|
||||
defining it.
|
||||
|
||||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
|
||||
index 844bc9da..911c6ba1 100644
|
||||
--- a/scripts/kconfig/Makefile
|
||||
+++ b/scripts/kconfig/Makefile
|
||||
@@ -192,6 +192,8 @@ clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
|
||||
clean-files += mconf qconf gconf nconf
|
||||
clean-files += config.pot linux.pot
|
||||
|
||||
+HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
|
||||
+
|
||||
# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
|
||||
PHONY += $(obj)/dochecklxdialog
|
||||
$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
|
||||
@@ -217,8 +219,6 @@ HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
|
||||
HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
|
||||
-Wno-missing-prototypes
|
||||
|
||||
-HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
|
||||
-
|
||||
HOSTLOADLIBES_nconf = $(shell \
|
||||
pkg-config --libs menu panel ncurses 2>/dev/null \
|
||||
|| echo "-lmenu -lpanel -lncurses" )
|
||||
@@ -0,0 +1,15 @@
|
||||
Fix pre-ANSI C code in check-lxdialog.sh.
|
||||
|
||||
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
index 9d2a4c58..364eaecb 100644
|
||||
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
@@ -43,7 +43,7 @@ trap "rm -f $tmp" 0 1 2 3 15
|
||||
check() {
|
||||
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
|
||||
#include CURSES_LOC
|
||||
-main() {}
|
||||
+int main() { return 0; }
|
||||
EOF
|
||||
if [ $? != 0 ]; then
|
||||
echo " *** Unable to find the ncurses libraries or the" 1>&2
|
||||
@@ -0,0 +1,51 @@
|
||||
From 4cbffcd4f146ccceafccd9fa9d522640d1f0f519 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
Date: Tue, 10 Dec 2024 08:33:54 +0100
|
||||
Subject: [PATCH] libfdt.i_shipped: use SWIG_AppendOutput
|
||||
|
||||
Fix this build error with modern SWIG:
|
||||
|
||||
scripts/dtc/pylibfdt/libfdt_wrap.c: In function '_wrap_fdt_next_node':
|
||||
scripts/dtc/pylibfdt/libfdt_wrap.c:5578:17: error: too few arguments to function 'SWIG_Python_AppendOutput'
|
||||
5578 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
|
||||
|
||||
Patch is based on:
|
||||
https://github.com/dgibson/dtc/pull/154
|
||||
---
|
||||
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
|
||||
index 27c29ea260..3bbbfb3c9f 100644
|
||||
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
|
||||
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
|
||||
@@ -1033,7 +1033,7 @@ typedef uint32_t fdt32_t;
|
||||
fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
|
||||
buff = PyByteArray_FromStringAndSize(
|
||||
(const char *)($1 + 1), fdt32_to_cpu($1->len));
|
||||
- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
|
||||
+ resultobj = SWIG_AppendOutput(resultobj, buff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1072,7 +1072,7 @@ typedef uint32_t fdt32_t;
|
||||
|
||||
%typemap(argout) int *depth {
|
||||
PyObject *val = Py_BuildValue("i", *arg$argnum);
|
||||
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
|
||||
+ resultobj = SWIG_AppendOutput(resultobj, val);
|
||||
}
|
||||
|
||||
%apply int *depth { int *depth };
|
||||
@@ -1088,7 +1088,7 @@ typedef uint32_t fdt32_t;
|
||||
if (PyTuple_GET_SIZE(resultobj) == 0)
|
||||
resultobj = val;
|
||||
else
|
||||
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
|
||||
+ resultobj = SWIG_AppendOutput(resultobj, val);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-alcatel-idol347-downstream
|
||||
pkgdesc="Alcatel OneTouch Idol 3 (4.7) (Downstream)"
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2b6ba0e6e6d8f90d907a7a8089718c8a1ff8ee3ad0ea17f204e2e9fa2a514a06af9c2b91b7bfb0b8b8362ba2d44b53aad52fd88d506682f1f61b9fe6c19d206e deviceinfo
|
||||
131bddf782050fd8301ebd242a5b19cd70c520f03fe2e8a2f0b7afba60cc3dc0330f3765395de70553fc172a116a02a9512c3fc189303cb09609e4adac76a799 deviceinfo
|
||||
"
|
||||
@@ -20,7 +20,6 @@ deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk androidboot.bootloader=L1BGC0C0BG00"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Archived: unmaintained port, only for testing. Use generic/mainline port (qcom-msm8953)
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-lenovo-kuntao
|
||||
pkgdesc="Lenovo P2"
|
||||
pkgver=4
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
firmware-lenovo-kuntao
|
||||
firmware-qcom-adreno-a530
|
||||
linux-postmarketos-qcom-msm8953
|
||||
lk2nd-msm8953
|
||||
mkbootimg
|
||||
msm-firmware-loader
|
||||
postmarketos-base
|
||||
soc-qcom-msm8953-modem
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo modules-initfs"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5e0a1e6315c1bc85af7bc0c4ae58c817cfe4a373b1f65fe8a133310868e1ccb974d9648d5397a2a1566cf174b935e8b1717f23ede6096e77caa86f8fba29fe3f deviceinfo
|
||||
2ce6911ef54351f46819b3323e361ce60297b30f94e81a77e2d20b1bc294e51e3a0fa859ad8e257fa3fdef404a47dd3b64c247222cb7ca73f03cb4dcd083d1f8 modules-initfs
|
||||
"
|
||||
+3
@@ -34,3 +34,6 @@ deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_sparse="true"
|
||||
|
||||
# lk2nd does not support GPT for subpartitions/SD cards yet
|
||||
deviceinfo_partition_type="msdos"
|
||||
@@ -0,0 +1,2 @@
|
||||
msm
|
||||
panel_lenovo_kuntao_549
|
||||
File renamed without changes.
+3
-3
@@ -1,9 +1,9 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
# Archived: Not actively maintained, hw is very rare/unlikely to be used by anyone, and port is outdated/broken
|
||||
pkgname=device-purism-librem5dev
|
||||
pkgdesc="Purism Librem 5 Devkit"
|
||||
pkgver=2
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -60,7 +60,7 @@ package() {
|
||||
install -D -m644 "$srcdir"/modprobe.d_rsi.conf "$pkgdir"/etc/modprobe.d/rsi.conf
|
||||
install -D -m644 "$srcdir"/00-mesa.sh "$pkgdir"/etc/profile.d/00-mesa.sh
|
||||
install -D -m644 "$srcdir"/flash_script.lst "$pkgdir"/usr/share/uuu/flash_script.lst
|
||||
install -D -m644 "$_confdir"/default/hwdb/80-librem5.hwdb "$pkgdir"/lib/udev/hwdb.d/80-librem5.hwdb
|
||||
install -D -m644 "$_confdir"/default/hwdb/80-librem5.hwdb "$pkgdir"/usr/lib/udev/hwdb.d/80-librem5.hwdb
|
||||
install -D -m644 "$_confdir"/debian/librem5-base-defaults.librem5-devkit-sgtl5000.udev \
|
||||
"$pkgdir"/usr/lib/udev/rules.d/librem5-base-defaults.librem5-devkit-sgtl5000.udev
|
||||
install -D -m644 "$_confdir"/debian/librem5-base-defaults.librem5-pm.udev \
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a5lte-downstream
|
||||
pkgdesc="Samsung Galaxy A5 (SM-A500F)"
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
09f28323fac82a8f8495af89de94449100e0f9233e22e33af807e559803bf3d9114aedc6d21626c7d5d736e93025de812292a0ee47c3639ac704696995c3d675 deviceinfo
|
||||
410b5caac31e2af65ebfe1f3312fc2106c681430b75dfa8f4412f5727cd7db669dc3f46b1b2c20ece1b438052c36cbd3ff7b212ea03d9fea5af0b3c5bb14ff9b deviceinfo
|
||||
"
|
||||
@@ -17,7 +17,7 @@ deviceinfo_screen_height="1280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2 androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a5ulte-downstream
|
||||
pkgdesc="Samsung Galaxy A5 (SM-A500FU)"
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1e7fe5a6788c1b635ab5c63083da5c1f353440567b8f86948092202ce026cbbae000ea047e65fae543f13092f97626ce227bc3f329477fbd7521df1b31f30bc8 deviceinfo
|
||||
8c08854b664866087f3df1dccbe39ee0aba4563e9fc2cb38567bbbb9f54a74e3a9ed7a574bc18930ecf595d8beda32dd301cd757b6788d24cdd819c8c9cc5c52 deviceinfo
|
||||
"
|
||||
@@ -17,7 +17,7 @@ deviceinfo_screen_height="1280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2 androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-coreprimevelte-downstream
|
||||
pkgdesc="Samsung Galaxy Core Prime VE LTE downstream"
|
||||
pkgver=1
|
||||
pkgrel=3
|
||||
pkgver=3
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="mkbootimg linux-samsung-coreprimevelte-downstream postmarketos-base postmarketos-initramfs-minimal pxa-mkbootimg u-boot-tools"
|
||||
depends="mkbootimg linux-samsung-coreprimevelte-downstream postmarketos-base pxa-mkbootimg u-boot-tools"
|
||||
makedepends="devicepkg-dev"
|
||||
_pmb_recommends="firmware-samsung-pxa1908-downstream"
|
||||
source="deviceinfo 90-coreprimevelte.conf"
|
||||
@@ -24,6 +24,6 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
741f46736c2742d4a6f118a924eee89954fb14e5b1dc00f372bda41b63ec975cf960909f915fcb31ad965f136a712905bc8626cd7e530f40e110885f7c861790 deviceinfo
|
||||
00c8780dbc77e62e7d57a2b3e879881076204f3e58d50555778aa68feb0157f5b4207fdabbb4627888eeeda6a35182e8e199e49e4050244a60ce4e9e2d84bd99 deviceinfo
|
||||
4854cc57b86e1199dbc165110514e672dabf45044fe9f7ebbde5b2b24768fb5497273b5f38612cf2dfeffc9bf0648c725114b4fa01165bf7fb02f7d741ee5806 90-coreprimevelte.conf
|
||||
"
|
||||
@@ -14,12 +14,12 @@ deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="480"
|
||||
deviceinfo_screen_height="800"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader relate
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_bootimg_pxa="true"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-j6lte-downstream
|
||||
pkgdesc="Samsung Galaxy J6 (2018)"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-samsung-j6lte-downstream
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
postmarketos-base-downstream
|
||||
msm-fb-refresher
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="$pkgdesc (WiFi firmware)"
|
||||
depends="firmware-samsung-j6lte-downstream"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5bbe8f6840d75c4d8693fbe62afaf071cddaef750aee2f9cae31187489a2b05873369ee06bf5292ec484a70f6d5ac7aea7862fc27f7fc3057205afda52996d7e deviceinfo
|
||||
"
|
||||
Loaded 100 of 1813 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user