Compare commits
600
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27c999827f | ||
|
|
80ab66cd2a | ||
|
|
a1b9f90871 | ||
|
|
bd1ee83338 | ||
|
|
5433eecb11 | ||
|
|
b982708186 | ||
|
|
e27bc8a84e | ||
|
|
cb0e167a3c | ||
|
|
0c043b055d | ||
|
|
c025160029 | ||
|
|
a002330b81 | ||
|
|
614ac1835d | ||
|
|
bc6800b368 | ||
|
|
ea7522f44e | ||
|
|
0665493f14 | ||
|
|
35129cb2c7 | ||
|
|
14bc7fe038 | ||
|
|
881dbc6a22 | ||
|
|
96a21ace3f | ||
|
|
d7e56cc7c0 | ||
|
|
be819d7474 | ||
|
|
00e4c6d1b2 | ||
|
|
f757d06824 | ||
|
|
690f9bf67d | ||
|
|
d4d18a0b81 | ||
|
|
8bbc90f097 | ||
|
|
56c96a30e9 | ||
|
|
f5fc3217f0 | ||
|
|
c4886f93c7 | ||
|
|
9291b05b2c | ||
|
|
945a74a9ce | ||
|
|
2a8a57b08e | ||
|
|
bbbc7b7b2d | ||
|
|
5a2178cb5a | ||
|
|
6ab29d06fd | ||
|
|
0806c84144 | ||
|
|
da05e2a230 | ||
|
|
66625efa43 | ||
|
|
997243f6f7 | ||
|
|
bc0ff89fdc | ||
|
|
b2e5ad1670 | ||
|
|
403c33eda6 | ||
|
|
f0b8dceae5 | ||
|
|
68d7792bb9 | ||
|
|
1edbf01dcb | ||
|
|
734d4d1572 | ||
|
|
ca976d487c | ||
|
|
df8b0a6665 | ||
|
|
928fa5b9c5 | ||
|
|
7a9d86bc25 | ||
|
|
5e0a9edcae | ||
|
|
0ccd191d21 | ||
|
|
b8023b44e1 | ||
|
|
3fff515886 | ||
|
|
9ba1d82f6e | ||
|
|
d195f254a2 | ||
|
|
6dc3335119 | ||
|
|
559454de25 | ||
|
|
f427ccd09d | ||
|
|
eeb6fb22eb | ||
|
|
a2e7dc074a | ||
|
|
d595967928 | ||
|
|
4e056b2242 | ||
|
|
1a50b3a49b | ||
|
|
42d8a5abd5 | ||
|
|
8d81c77f05 | ||
|
|
9813033c80 | ||
|
|
a8f0c9268e | ||
|
|
dd80d9b57b | ||
|
|
5aa28ef117 | ||
|
|
e388dbb57d | ||
|
|
5666109a4a | ||
|
|
1db7d64aab | ||
|
|
b6cc5c0e9f | ||
|
|
866b67e772 | ||
|
|
30ff0308a2 | ||
|
|
7926019217 | ||
|
|
6e2077e604 | ||
|
|
fdd5c560e9 | ||
|
|
eee2eaf970 | ||
|
|
b891b8b18b | ||
|
|
4b92e922ef | ||
|
|
a2a4772177 | ||
|
|
853f4ba5a5 | ||
|
|
8dcb873f9b | ||
|
|
a04ca4caff | ||
|
|
9f15da8d46 | ||
|
|
4e1f99160d | ||
|
|
fcf33fccaa | ||
|
|
fc3421e665 | ||
|
|
d69cd81186 | ||
|
|
22df89a1cb | ||
|
|
7f78f74025 | ||
|
|
af2ae7aa4c | ||
|
|
a2faf88238 | ||
|
|
fd0c785eb9 | ||
|
|
36e6a69dd7 | ||
|
|
50d260240b | ||
|
|
e859e47589 | ||
|
|
3ed15d3d19 | ||
|
|
3c20e11910 | ||
|
|
0f4258d37e | ||
|
|
6688808de8 | ||
|
|
07cdab935a | ||
|
|
46304c497c | ||
|
|
486de9b306 | ||
|
|
00261bc123 | ||
|
|
1e59890385 | ||
|
|
5954048db3 | ||
|
|
644439c79f | ||
|
|
e8eb332fa2 | ||
|
|
e9029c9153 | ||
|
|
af105937a2 | ||
|
|
44797d1f4e | ||
|
|
8ff50a82a8 | ||
|
|
f77fb2e610 | ||
|
|
a26ede4de6 | ||
|
|
b1b5f9a8f2 | ||
|
|
7b4bf89443 | ||
|
|
476f7fe6ad | ||
|
|
f3adab7539 | ||
|
|
8e3cc49cfe | ||
|
|
68a3bf8610 | ||
|
|
6d72b33b41 | ||
|
|
9c8ccba142 | ||
|
|
3c629c64e3 | ||
|
|
093611357b | ||
|
|
daea5dade3 | ||
|
|
5ae8060f6d | ||
|
|
670f23f640 | ||
|
|
2c6399db1c | ||
|
|
5bfe3ab5b5 | ||
|
|
08096700f0 | ||
|
|
91adc26f51 | ||
|
|
f47d58a680 | ||
|
|
86601ff415 | ||
|
|
8ada15f062 | ||
|
|
34b1aff3cd | ||
|
|
9c858aad62 | ||
|
|
8a9170d125 | ||
|
|
57b22658a9 | ||
|
|
a3001a0cb0 | ||
|
|
13904bb777 | ||
|
|
6352910769 | ||
|
|
69aea328e5 | ||
|
|
70b7813fee | ||
|
|
741b9caece | ||
|
|
4f6b01db82 | ||
|
|
16696849eb | ||
|
|
5b4df25783 | ||
|
|
ffb351f136 | ||
|
|
76f32fecf3 | ||
|
|
74c7092bbd | ||
|
|
4ded17dc1e | ||
|
|
91b81d92f7 | ||
|
|
5cf259f46e | ||
|
|
047730dfb0 | ||
|
|
9a4a818bde | ||
|
|
f71abed592 | ||
|
|
3c32dbe814 | ||
|
|
3628ed25e8 | ||
|
|
919c24cecb | ||
|
|
f07d122b67 | ||
|
|
b8aca2b914 | ||
|
|
2f1d832d4d | ||
|
|
d1856dad75 | ||
|
|
83d224df2b | ||
|
|
bc8bc00ef9 | ||
|
|
10e5f418a0 | ||
|
|
ec062f4e09 | ||
|
|
088482b579 | ||
|
|
2d2b9bddd8 | ||
|
|
cbb4367c47 | ||
|
|
d820779a10 | ||
|
|
ab87fde2f6 | ||
|
|
6a125a739e | ||
|
|
39f6db50cb | ||
|
|
60fe572b47 | ||
|
|
b2f939943c | ||
|
|
e2169ff59f | ||
|
|
214f898dc5 | ||
|
|
8ddef357b3 | ||
|
|
65e27349d5 | ||
|
|
bec770e995 | ||
|
|
9c894f8a73 | ||
|
|
d40db11c30 | ||
|
|
6c27c1c460 | ||
|
|
01d084c777 | ||
|
|
e6a905c176 | ||
|
|
a1a9836982 | ||
|
|
d17d994693 | ||
|
|
a7ed851ed9 | ||
|
|
c91cd9998e | ||
|
|
4b516916dc | ||
|
|
08b32ff4ba | ||
|
|
8f8c0bb350 | ||
|
|
23d7875f10 | ||
|
|
dc79738ba6 | ||
|
|
ae41229fd4 | ||
|
|
ee13208d07 | ||
|
|
ff12848ae6 | ||
|
|
38659e07ff | ||
|
|
3c3ef48600 | ||
|
|
e192346cb4 | ||
|
|
c47963552a | ||
|
|
b26ba8784c | ||
|
|
beef607a81 | ||
|
|
b3998d167f | ||
|
|
455368dfed | ||
|
|
a5a0b54f40 | ||
|
|
25cc08f1e2 | ||
|
|
880c94220e | ||
|
|
dfe9ada6e8 | ||
|
|
d7e933fbf5 | ||
|
|
daa1c6d8a5 | ||
|
|
a570ee22c2 | ||
|
|
bd280119fe | ||
|
|
46b97c342b | ||
|
|
03b588fc67 | ||
|
|
137d23f938 | ||
|
|
88f58f6a11 | ||
|
|
f81492edab | ||
|
|
d892694d34 | ||
|
|
2d6be776a1 | ||
|
|
560e8b56ee | ||
|
|
8583329551 | ||
|
|
20983e2b50 | ||
|
|
6d8dbf777f | ||
|
|
69a148491c | ||
|
|
65578e8149 | ||
|
|
4ab4c6f8f7 | ||
|
|
ee22fd5eac | ||
|
|
d5fa93bd01 | ||
|
|
db7766d24e | ||
|
|
f8d91ebdfd | ||
|
|
ccb594c646 | ||
|
|
102e0a57f1 | ||
|
|
0d2757b3a4 | ||
|
|
484f587c1f | ||
|
|
3f698640f1 | ||
|
|
a5de8ae21b | ||
|
|
4fa38dd8a8 | ||
|
|
02a4b7cd48 | ||
|
|
8c9b594cd3 | ||
|
|
15cca9eebf | ||
|
|
a91fcca8d4 | ||
|
|
ef69eb7bdb | ||
|
|
c3b0ea0021 | ||
|
|
a6722a5116 | ||
|
|
41afe17856 | ||
|
|
d605627e1a | ||
|
|
7784f0326a | ||
|
|
99553042ad | ||
|
|
048a18ad71 | ||
|
|
2327b6efdb | ||
|
|
73a8aec0cc | ||
|
|
ea980f84f9 | ||
|
|
073e6edbac | ||
|
|
e97f29c725 | ||
|
|
372287e23c | ||
|
|
f5d3a42f1d | ||
|
|
0f05f84507 | ||
|
|
387043b5ce | ||
|
|
707cf18e6a | ||
|
|
7f2935bd2c | ||
|
|
1ac584d5db | ||
|
|
3e09569982 | ||
|
|
72b944c1fc | ||
|
|
c1cc234088 | ||
|
|
8c13dd3d7a | ||
|
|
82a813020b | ||
|
|
d19b34d59f | ||
|
|
507f1149ee | ||
|
|
239aa4da8f | ||
|
|
9b4b663a38 | ||
|
|
2baa079111 | ||
|
|
fe07d7f9f4 | ||
|
|
c34344108f | ||
|
|
dfbf4f1c82 | ||
|
|
ed966495d5 | ||
|
|
6afbb6fcd5 | ||
|
|
c1c1fc4ed0 | ||
|
|
f6426febc1 | ||
|
|
610acd9fb5 | ||
|
|
65e2150e2d | ||
|
|
e5ba7447cf | ||
|
|
8665e8ec1d | ||
|
|
bcd0b35ae0 | ||
|
|
611ead9cf1 | ||
|
|
287e7c4521 | ||
|
|
1bcaffb0fe | ||
|
|
a55d3991d5 | ||
|
|
d59283cbf6 | ||
|
|
ab91dccefa | ||
|
|
f62d882462 | ||
|
|
7517c6cfad | ||
|
|
7c8d8f7752 | ||
|
|
8cd80e0733 | ||
|
|
3194ca834a | ||
|
|
3a6d9e5aa5 | ||
|
|
f34a55dcbc | ||
|
|
cfb582cba0 | ||
|
|
1fc99009af | ||
|
|
ddce692f08 | ||
|
|
3be5d7e2e3 | ||
|
|
f2993c3ad8 | ||
|
|
3ec22cb65e | ||
|
|
eb37732514 | ||
|
|
654d1a4ed7 | ||
|
|
977d4b9d58 | ||
|
|
d7ccebce2a | ||
|
|
647c4233a3 | ||
|
|
cac809dc31 | ||
|
|
d5ed9e0350 | ||
|
|
ac3ad6047d | ||
|
|
b743274522 | ||
|
|
d19b6cf31b | ||
|
|
8f8a85412f | ||
|
|
619bf897d4 | ||
|
|
adf423de58 | ||
|
|
34307bd907 | ||
|
|
aa6c7f1fd6 | ||
|
|
e74ac08673 | ||
|
|
f9bf75ab83 | ||
|
|
ea72fe05b2 | ||
|
|
6bddc23ddb | ||
|
|
7a279b98bc | ||
|
|
69bc23f24d | ||
|
|
da2aa4fa0b | ||
|
|
7a4b53d2af | ||
|
|
615d6f0ebe | ||
|
|
32f7b8dedd | ||
|
|
5ce568cd79 | ||
|
|
53dc6123ef | ||
|
|
6824414c1e | ||
|
|
886c0ab575 | ||
|
|
6460e7c967 | ||
|
|
6b935f02fa | ||
|
|
41e81fe4f0 | ||
|
|
f403330733 | ||
|
|
e8519a8a91 | ||
|
|
d0ce50f7d1 | ||
|
|
505598c09e | ||
|
|
22a8c4a06a | ||
|
|
82c02ea325 | ||
|
|
901d932dba | ||
|
|
d68c069836 | ||
|
|
ab8767a08f | ||
|
|
8e77cdd287 | ||
|
|
d3c63de938 | ||
|
|
08e4a87e58 | ||
|
|
210d1e77bf | ||
|
|
18c5e19f10 | ||
|
|
4889611423 | ||
|
|
b05904dc22 | ||
|
|
bfa85b0c4d | ||
|
|
964b1268f7 | ||
|
|
5adb3352e9 | ||
|
|
b0182951a3 | ||
|
|
f41739e2d1 | ||
|
|
29170afc03 | ||
|
|
ddf128f480 | ||
|
|
46d06756ee | ||
|
|
eaf1313d4d | ||
|
|
eed476097e | ||
|
|
4eda07153a | ||
|
|
536264bac0 | ||
|
|
5a01a67634 | ||
|
|
7d0d8aa2d9 | ||
|
|
3b3a63c0d7 | ||
|
|
55fe24f69d | ||
|
|
d4d53f8b65 | ||
|
|
5a5d290ebd | ||
|
|
6778e7b10b | ||
|
|
576303db06 | ||
|
|
68775d878f | ||
|
|
c371a97c62 | ||
|
|
f27b009cba | ||
|
|
b74130a6ff | ||
|
|
0dd2a38bd5 | ||
|
|
bbf17eb84d | ||
|
|
4818869d28 | ||
|
|
ac6bfcee86 | ||
|
|
f3dfe67a4d | ||
|
|
76f05f28cb | ||
|
|
073e261360 | ||
|
|
6b22647688 | ||
|
|
2999cda28d | ||
|
|
4b6850aa85 | ||
|
|
e049931066 | ||
|
|
f89acb3857 | ||
|
|
b0ba6f346c | ||
|
|
451c2dcbd8 | ||
|
|
1c406191fb | ||
|
|
e6fa3e49c5 | ||
|
|
86b8ea9d90 | ||
|
|
d0f72c92fa | ||
|
|
7457df1b80 | ||
|
|
d75abb96ab | ||
|
|
8c309692a6 | ||
|
|
6b0267e639 | ||
|
|
84ba3891bb | ||
|
|
40ce35bb4b | ||
|
|
8d0e705c2f | ||
|
|
b951132dbf | ||
|
|
1adb2da6d7 | ||
|
|
4c22e1c6ad | ||
|
|
ee2f4db541 | ||
|
|
6873b63803 | ||
|
|
49b553b19b | ||
|
|
6da1f4f646 | ||
|
|
76174f8ff0 | ||
|
|
8b18e0e8d7 | ||
|
|
052d07bd97 | ||
|
|
5417748f16 | ||
|
|
cf1939ad5e | ||
|
|
4f29ea0f7b | ||
|
|
5f82ca96dc | ||
|
|
f23904cb46 | ||
|
|
6e2805898e | ||
|
|
8fd9a765ab | ||
|
|
01c47c5f3a | ||
|
|
81956e2fd2 | ||
|
|
de730c2b56 | ||
|
|
3d84175a0f | ||
|
|
58b014ae88 | ||
|
|
804b97dc20 | ||
|
|
712149558b | ||
|
|
dabdd92e07 | ||
|
|
c61bb698b4 | ||
|
|
3fa300ecdb | ||
|
|
14d50e1c06 | ||
|
|
5e2a8ecb3e | ||
|
|
eb54bbc187 | ||
|
|
bb69fc6a95 | ||
|
|
958fe92914 | ||
|
|
2b97b2267a | ||
|
|
4fc0f7eec6 | ||
|
|
790ab25509 | ||
|
|
4d2a25db53 | ||
|
|
5b1b4ad28b | ||
|
|
9f81f9e3dd | ||
|
|
4067aa54a0 | ||
|
|
a5978b8561 | ||
|
|
597eefcfcd | ||
|
|
74db854263 | ||
|
|
4f790fb8f9 | ||
|
|
d5eb368394 | ||
|
|
d42edaaa65 | ||
|
|
8bac6d45cf | ||
|
|
5e9e19b7a7 | ||
|
|
d49b2087e5 | ||
|
|
ce40d054ce | ||
|
|
a8450a53f2 | ||
|
|
8c29eaed6e | ||
|
|
69773b8cc5 | ||
|
|
c30dd812f2 | ||
|
|
264d171a88 | ||
|
|
c293b03642 | ||
|
|
8b470375a9 | ||
|
|
d4b54d1249 | ||
|
|
e960066058 | ||
|
|
caa285b8d1 | ||
|
|
ad4d27e134 | ||
|
|
45adf82081 | ||
|
|
e1efe18136 | ||
|
|
92efdacfbf | ||
|
|
2affe723e2 | ||
|
|
de591be7d8 | ||
|
|
d43748aa9c | ||
|
|
60821d3a09 | ||
|
|
60fc4a2df5 | ||
|
|
954fd59706 | ||
|
|
e73187d343 | ||
|
|
d08da30b5a | ||
|
|
c3540b4678 | ||
|
|
9678ab7b38 | ||
|
|
8496464c47 | ||
|
|
4e2507c9e5 | ||
|
|
2d100dcbdf | ||
|
|
fe29c9ab34 | ||
|
|
ca5e6cab1b | ||
|
|
f567cebd8f | ||
|
|
2b16e5837a | ||
|
|
5915d1630b | ||
|
|
2c5c22f3e3 | ||
|
|
025105c5a4 | ||
|
|
fa292406df | ||
|
|
ac9bff857c | ||
|
|
624a384a9f | ||
|
|
604a5ee097 | ||
|
|
9769f5a149 | ||
|
|
c32221096a | ||
|
|
66735f8db9 | ||
|
|
05bce12847 | ||
|
|
60ba45e9e2 | ||
|
|
b93203a035 | ||
|
|
80eb55a604 | ||
|
|
f54600e966 | ||
|
|
e97b61b023 | ||
|
|
702088baff | ||
|
|
77ad6199a8 | ||
|
|
10368eb9f2 | ||
|
|
49c9b7cc44 | ||
|
|
4792c3b859 | ||
|
|
49bfabcee0 | ||
|
|
b0e89af26d | ||
|
|
62402d529b | ||
|
|
7af1d8a290 | ||
|
|
8ddb338f41 | ||
|
|
7bcb236407 | ||
|
|
44244a7032 | ||
|
|
7df5a66b17 | ||
|
|
78dffc2dbe | ||
|
|
87d2de88c1 | ||
|
|
2fff60f075 | ||
|
|
327ccd6a54 | ||
|
|
0c27a5d6fe | ||
|
|
80948e3be9 | ||
|
|
d7ec2e46dc | ||
|
|
85d192103c | ||
|
|
2d886ff8eb | ||
|
|
fb4f0c9aaa | ||
|
|
109c7c3d54 | ||
|
|
a21d5bbaa4 | ||
|
|
fecd1c038d | ||
|
|
41a8429257 | ||
|
|
f1ef7e279b | ||
|
|
679ee5364b | ||
|
|
d0e39c1a0b | ||
|
|
3531779ac8 | ||
|
|
181364d08b | ||
|
|
512e7d3e4c | ||
|
|
51d8d6e20f | ||
|
|
b11e24701a | ||
|
|
3a50065ed8 | ||
|
|
279c363323 | ||
|
|
0e1fe15d24 | ||
|
|
3bf4887495 | ||
|
|
3c516c4299 | ||
|
|
727042b3f7 | ||
|
|
99f1489c26 | ||
|
|
a07e4621e8 | ||
|
|
c319a9db70 | ||
|
|
3fd4bf38ee | ||
|
|
3fd7928b97 | ||
|
|
518101fc2f | ||
|
|
ac917294cc | ||
|
|
678fdf53d2 | ||
|
|
c957e4d566 | ||
|
|
fee4c593a0 | ||
|
|
0806bb2487 | ||
|
|
210268fc9b | ||
|
|
4b76e05983 | ||
|
|
b249cab428 | ||
|
|
4aa0aac861 | ||
|
|
5f769995ae | ||
|
|
a08bd157da | ||
|
|
af6cc1f110 | ||
|
|
b51a1907be | ||
|
|
2996901f11 | ||
|
|
e6f1fe7e73 | ||
|
|
e71d96fcb7 | ||
|
|
111862b299 | ||
|
|
9c2be2f772 | ||
|
|
c0df115a7e | ||
|
|
4722c3cce2 | ||
|
|
e3a9b8c61b | ||
|
|
52fd44825a | ||
|
|
93f262d7f1 | ||
|
|
d502d02a0b | ||
|
|
ff9beb4588 | ||
|
|
3154d9162f | ||
|
|
a76fd6f0da | ||
|
|
777d7607b8 | ||
|
|
32fc24cd4a | ||
|
|
452a41a505 | ||
|
|
cd1ddc03b6 | ||
|
|
68defa831e | ||
|
|
eb0896b170 | ||
|
|
b7c3d41b9a | ||
|
|
b658b886b8 | ||
|
|
304b1764ed | ||
|
|
4bbd01460d | ||
|
|
04df7ec06b | ||
|
|
b2a31dbd14 | ||
|
|
1993e0cc24 | ||
|
|
a2820d9c79 | ||
|
|
e84ad270ec | ||
|
|
7ee859f8dd | ||
|
|
c834107e9d | ||
|
|
cce08f092a | ||
|
|
c2d091a3a7 | ||
|
|
631d5eb418 | ||
|
|
ae74e11664 | ||
|
|
d933df7e8f | ||
|
|
c55ddae1ad | ||
|
|
df6c69101b | ||
|
|
73a2ddb8fe | ||
|
|
31a651d0d7 |
No files matched your search
@@ -12,7 +12,7 @@ if [ "$(id -u)" = 0 ]; then
|
||||
fi
|
||||
|
||||
# Wrap pmbootstrap to use this repository for --aports
|
||||
pmaports="$(cd $(dirname $0)/..; pwd -P)"
|
||||
pmaports="$(cd "$(dirname "$0")"/..; pwd -P)"
|
||||
_pmbootstrap="$(command -v pmbootstrap)"
|
||||
pmbootstrap() {
|
||||
"$_pmbootstrap" --aports="$pmaports" "$@"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: check pkgver/pkgrel bumps, amount of changed pkgs etc
|
||||
# Options: native
|
||||
|
||||
+31
-8
@@ -9,16 +9,39 @@ if [ "$(id -u)" = 0 ]; then
|
||||
fi
|
||||
|
||||
# Find CHANGEMEs in APKBUILDs
|
||||
if grep -qr '(CHANGEME!)' *; then
|
||||
if grep -qr '(CHANGEME!)' -- *; then
|
||||
echo "ERROR: Please replace '(CHANGEME!)' in the following files:"
|
||||
grep --color=always -r '(CHANGEME!)' *
|
||||
grep --color=always -r '(CHANGEME!)' -- *
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# DTBs installed to /usr/share/db
|
||||
# FIXME: doesn't pass currently, fix it and enable it afterwards
|
||||
# if grep -r 'INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb'; then
|
||||
# echo 'Please do not install dtbs to /usr/share/dtb!'
|
||||
# echo 'Unless you have a good reason not to, please put them in /boot/dtbs'
|
||||
# exit 1
|
||||
# fi
|
||||
# shellcheck disable=SC2016
|
||||
if grep -qr 'INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb' device/; then
|
||||
echo 'ERROR: Please do not install dtbs to /usr/share/dtb!'
|
||||
echo 'ERROR: Unless you have a good reason not to, please put them in /boot/dtbs'
|
||||
echo 'ERROR: Files that need fixing:'
|
||||
# shellcheck disable=SC2016
|
||||
grep --color=always -r 'INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb' device/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Find old mkinitfs paths (pre mkinitfs 2.0)
|
||||
if grep -qr '/etc/postmarketos-mkinitfs' -- *; then
|
||||
echo "ERROR: Please replace '/etc/postmarketos-mkinitfs' with '/usr/share/mkinitfs' in the following files:"
|
||||
grep --color=always -r '/etc/postmarketos-mkinitfs' -- *
|
||||
exit 1
|
||||
fi
|
||||
if grep -qr '/usr/share/postmarketos-mkinitfs' -- *; then
|
||||
echo "ERROR: Please replace '/usr/share/postmarketos-mkinitfs' with '/usr/share/mkinitfs' in the following files:"
|
||||
grep --color=always -r '/usr/share/postmarketos-mkinitfs' -- *
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Direct sourcing of deviceinfo
|
||||
if grep --exclude='source_deviceinfo' -qEr 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *; then
|
||||
echo 'ERROR: Please source the source_deviceinfo script instead of sourcing deviceinfo directly!'
|
||||
grep --color=always --exclude='rootfs-usr-share-misc-source_deviceinfo' -Er 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *
|
||||
exit 1
|
||||
fi
|
||||
+3
-9
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Description: check all kernel configs with 'pmbootstrap kconfig check'
|
||||
# Description: check modified kernel configs
|
||||
# Options: native
|
||||
# Use 'native' because it requires running pmbootstrap.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
@@ -11,12 +11,6 @@ if [ "$(id -u)" = 0 ]; then
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
# Wrap pmbootstrap to use this repository for --aports
|
||||
pmaports="$(cd $(dirname $0)/..; pwd -P)"
|
||||
_pmbootstrap="$(command -v pmbootstrap)"
|
||||
pmbootstrap() {
|
||||
"$_pmbootstrap" --aports="$pmaports" "$@"
|
||||
}
|
||||
export PYTHONUNBUFFERED=1
|
||||
|
||||
set -x
|
||||
pmbootstrap kconfig check
|
||||
.ci/lib/check_changed_kernels.py
|
||||
Executable
+83
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import tempfile
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
# pmbootstrap
|
||||
import add_pmbootstrap_to_import_path # noqa
|
||||
import pmb.parse
|
||||
import pmb.helpers.logging
|
||||
|
||||
|
||||
def check_kconfig(args, pkgnames):
|
||||
last_failed = None
|
||||
for i in range(len(pkgnames)):
|
||||
pkgname = pkgnames[i]
|
||||
print(f" ({i+1}/{len(pkgnames)}) {pkgname}")
|
||||
|
||||
apkbuild_path = pmb.helpers.pmaports.find(args, pkgname)
|
||||
apkbuild = pmb.parse._apkbuild.apkbuild(f"{apkbuild_path}/APKBUILD")
|
||||
|
||||
options = []
|
||||
|
||||
for opt in apkbuild["options"]:
|
||||
if "pmb:kconfigcheck" in opt:
|
||||
options += [opt]
|
||||
|
||||
if len(options):
|
||||
options.sort()
|
||||
print(f'options="{" ".join(options)}"')
|
||||
|
||||
if "!pmb:kconfigcheck" in apkbuild["options"]:
|
||||
print("skipped (!pmb:kconfigcheck)")
|
||||
continue
|
||||
|
||||
if not pmb.parse.kconfig.check(args, pkgname, details=True):
|
||||
last_failed = pkgname
|
||||
|
||||
return last_failed
|
||||
|
||||
|
||||
def show_error(last_failed):
|
||||
print("")
|
||||
print("Please adjust your kernel config. This is required for getting your"
|
||||
" patch merged.")
|
||||
print("")
|
||||
print("Edit your kernel config:")
|
||||
print(f" pmbootstrap kconfig edit {last_failed}")
|
||||
print("")
|
||||
print("Test this kernel config again:")
|
||||
print(f" pmbootstrap kconfig check {last_failed}")
|
||||
print("")
|
||||
print("Run this check again (on all kernels you modified):")
|
||||
print(" pmbootstrap ci kconfig")
|
||||
print("")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
common.add_upstream_git_remote()
|
||||
pkgnames = common.get_changed_kernels()
|
||||
print(f"Changed kernels: {pkgnames}")
|
||||
|
||||
if len(pkgnames) == 0:
|
||||
print("No kernels changed in this branch")
|
||||
exit(0)
|
||||
|
||||
# Initialize args (so we can use pmbootstrap's kconfig parsing)
|
||||
sys.argv = ["pmbootstrap", "kconfig", "check"]
|
||||
args = pmb.parse.arguments()
|
||||
pmb.helpers.logging.init(args)
|
||||
|
||||
print("Running kconfig check on changed kernels...")
|
||||
last_failed = check_kconfig(args, pkgnames)
|
||||
|
||||
if last_failed:
|
||||
show_error(last_failed)
|
||||
exit(1)
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import argparse
|
||||
|
||||
+9
-1
@@ -134,7 +134,7 @@ def get_changed_packages_sanity_check(count):
|
||||
print("ERROR: Too many packages have changed!")
|
||||
print()
|
||||
print("This is a sanity check, so we don't end up building packages that")
|
||||
print("have not been modified. CI won't run for more than one hour")
|
||||
print("have not been modified. CI won't run for more than three hours")
|
||||
print("anyway.")
|
||||
print()
|
||||
print("Your options:")
|
||||
@@ -190,3 +190,11 @@ def get_changed_packages():
|
||||
ret.add(os.path.basename(dirname))
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def get_changed_kernels():
|
||||
ret = []
|
||||
for pkgname in get_changed_packages():
|
||||
if pkgname.startswith("linux-"):
|
||||
ret += [pkgname]
|
||||
return ret
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if ! mount | grep -q /proc/sys/fs/binfmt_misc; then
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: $(basename $0) \$CI_PROJECT_DIR"
|
||||
echo "usage: $(basename "$0") \$CI_PROJECT_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: lint with various python tests
|
||||
# Options: native
|
||||
@@ -20,7 +20,7 @@ if [ -z "$(command -v pytest)" ]; then
|
||||
fi
|
||||
|
||||
# Wrap pmbootstrap to use this repository for --aports
|
||||
pmaports="$(cd $(dirname $0)/..; pwd -P)"
|
||||
pmaports="$(cd "$(dirname "$0")"/..; pwd -P)"
|
||||
_pmbootstrap="$(command -v pmbootstrap)"
|
||||
pmbootstrap() {
|
||||
"$_pmbootstrap" --aports="$pmaports" "$@"
|
||||
@@ -34,6 +34,7 @@ pmbootstrap -q shutdown
|
||||
# Make sure we have a valid device (pmbootstrap#1128)
|
||||
device="$(pmbootstrap config device)"
|
||||
deviceinfo="$pmaports/device/*/device-$device/deviceinfo"
|
||||
# shellcheck disable=SC2086
|
||||
if ! [ -e $deviceinfo ]; then
|
||||
echo "ERROR: Could not find deviceinfo file for selected device '$device'."
|
||||
echo "Expected path: $deviceinfo"
|
||||
|
||||
+6
-4
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: lint all shell scripts
|
||||
# https://postmarketos.org/pmb-ci
|
||||
@@ -17,9 +17,11 @@ sh_files="
|
||||
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
||||
./main/osk-sdl/unlock.sh
|
||||
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
|
||||
./main/postmarketos-base-ui/rootfs-etc-NetworkManager-dispatcher.d-99-dns-filter.sh
|
||||
./main/postmarketos-base-ui/rootfs-etc-NetworkManager-dispatcher.d-85-tethering
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-mkinitfs/init.sh
|
||||
./main/postmarketos-mkinitfs/init_functions.sh
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
./main/postmarketos-mkinitfs-hook-debug-shell/20-debug-shell.sh
|
||||
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
||||
./main/postmarketos-update-kernel/update-kernel.sh
|
||||
@@ -40,7 +42,7 @@ sh_files="
|
||||
$(find . -path './main/devicepkg-dev/*.sh')
|
||||
$(find . -path './main/postmarketos-mvcfg/*.sh')
|
||||
|
||||
$(find . -path '.ci/*.sh')
|
||||
$(find . -path './.ci/**.sh')
|
||||
"
|
||||
|
||||
for file in $sh_files; do
|
||||
|
||||
@@ -15,8 +15,10 @@ def path_pmbootstrap():
|
||||
code from there.
|
||||
returns: pmbootstrap installation folder
|
||||
"""
|
||||
# Find 'pmbootstrap' executable
|
||||
bin = shutil.which("pmbootstrap")
|
||||
# This variable is set by pmbootstrap 1.52 and later
|
||||
# If it's undefined, try to find 'pmbootstrap' in path
|
||||
bin = os.environ.get("PMBOOTSTRAP_CMD") or shutil.which("pmbootstrap")
|
||||
|
||||
if not bin:
|
||||
print("ERROR: 'pmbootstrap' not found in $PATH")
|
||||
sys.exit(1)
|
||||
|
||||
@@ -38,7 +38,11 @@ def test_aports_device(args):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
|
||||
# Depends: Require "postmarketos-base"
|
||||
if "postmarketos-base" not in apkbuild["depends"]:
|
||||
depend_flag = False
|
||||
for dependency in apkbuild["depends"]:
|
||||
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)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import glob
|
||||
import logging
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2022 Oliver Smith
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Various checks on source= in the APKBUILDs
|
||||
|
||||
|
||||
Executable
+119
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This hook checks that all local sources specified in the staged APKBUILDs
|
||||
# are staged too or already committed and that checksums are correct.
|
||||
#
|
||||
set -eu
|
||||
|
||||
# Maximal allowed size (in bytes) of a file.
|
||||
FILE_SIZE_LIMIT=262144 # 256 kiB
|
||||
|
||||
|
||||
if ! command -v sha512sum >/dev/null; then
|
||||
# macOS / BSDs (?) don't have sha512sum, but shasum.
|
||||
alias sha512sum='shasum -a 512'
|
||||
fi
|
||||
|
||||
error() {
|
||||
printf '\033[0;31mpre-commit:\033[0m %s\n' "$1" >&2 # red
|
||||
}
|
||||
|
||||
# Prints paths of created or modified files being committed.
|
||||
changed_files() {
|
||||
git diff-index \
|
||||
--name-only \
|
||||
--cached \
|
||||
--diff-filter=ACMR HEAD \
|
||||
-- "$@"
|
||||
}
|
||||
|
||||
# Prints file names and checksums (in format <SHA-512>:<filename>) of local
|
||||
# sources specified in the APKBUILD ($1).
|
||||
apkbuild_local_sources() {
|
||||
apkbuild="$1"
|
||||
|
||||
set +eu
|
||||
. "$apkbuild" || {
|
||||
error "$apkbuild is invalid"
|
||||
return 1
|
||||
}
|
||||
set -eu
|
||||
|
||||
status=0
|
||||
: ${source:=""}
|
||||
for src in $source; do
|
||||
# Skip remote sources.
|
||||
case "$src" in */*) continue;; esac
|
||||
|
||||
echo "$sha512sums" | awk -v src="$src" '
|
||||
{ if ($2 == src) { ok=1; print($2 ":" $1) } }
|
||||
END { if (ok != 1) exit 1 }' || {
|
||||
status=1
|
||||
error "${apkbuild%/*}: file \"$src\" is missing in \$sha512sums (hint: run pmbootstrap checksum)"
|
||||
}
|
||||
done
|
||||
|
||||
return $status
|
||||
}
|
||||
|
||||
# check if given object is a symlink
|
||||
is_symlink() {
|
||||
test "$(git ls-files --stage "$1" | awk '{print $1}')" = "120000"
|
||||
}
|
||||
|
||||
# Checks that all local sources specified in the APKBUILD file ($1) are
|
||||
# available in git tree and checksums are correct.
|
||||
check_local_sources() {
|
||||
local apkbuild="$1"
|
||||
local startdir="${apkbuild%/*}"
|
||||
local status=0
|
||||
local checksum_act checksum_exp content filename line sources
|
||||
|
||||
sources=$(apkbuild_local_sources "$apkbuild")
|
||||
for line in $sources; do
|
||||
filename=${line%%:*}
|
||||
checksum_exp=${line#*:}
|
||||
|
||||
if ! git cat-file -e ":$startdir/$filename" 2>/dev/null; then
|
||||
error "$startdir: missing file \"$filename\""
|
||||
status=1
|
||||
continue
|
||||
fi
|
||||
|
||||
if is_symlink ":$startdir/$filename"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
checksum_act=$(git show ":$startdir/$filename" | sha512sum)
|
||||
if [ "$checksum_act" != "$checksum_exp -" ]; then
|
||||
local cmd="pmbootstrap checksum $(basename "$startdir")"
|
||||
error "$startdir: bad checksum for file \"$filename\" (hint: run $cmd)"
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
return $status
|
||||
}
|
||||
|
||||
# Checks if the file ($1) being committed is not bigger than FILE_SIZE_LIMIT.
|
||||
check_file_size() {
|
||||
local path="$1"
|
||||
local size
|
||||
|
||||
size=$(git cat-file -s ":$path")
|
||||
if [ $size -gt $FILE_SIZE_LIMIT ]; then
|
||||
local size_kb=$(( size / 1024 ))
|
||||
|
||||
error "file \"$path\" is quite big ($(( size / 1024 )) kiB), better put a remote url in source="
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
for apkbuild in $(changed_files '**/APKBUILD'); do
|
||||
check_local_sources "$apkbuild"
|
||||
done
|
||||
|
||||
for path in $(changed_files); do
|
||||
check_file_size "$path"
|
||||
done
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This hook adds prefix "<repo>/<pkgname>: " to the commit message when
|
||||
# committing changes of a single package.
|
||||
#
|
||||
MSG_FILE="$1"
|
||||
SOURCE="$2"
|
||||
|
||||
longest_common_prefix() {
|
||||
awk -F/ '
|
||||
(NR == 1) { split($0, prefix); prefix_len = NF }
|
||||
(NR > 1) {
|
||||
for (i = 1; i <= prefix_len; i++) {
|
||||
if (prefix[i] != $i) {
|
||||
prefix_len = i - 1; break
|
||||
}
|
||||
}
|
||||
}
|
||||
(prefix_len == 0) { exit }
|
||||
END {
|
||||
res = prefix[1]
|
||||
for (i = 2; i <= prefix_len; i++) {
|
||||
res = res FS prefix[i]
|
||||
}
|
||||
print(res)
|
||||
}'
|
||||
}
|
||||
|
||||
prepend_msg() {
|
||||
local prefix="$1"
|
||||
|
||||
printf '%s\n%s\n' "$prefix" "$(cat "$MSG_FILE")" > "$MSG_FILE"
|
||||
}
|
||||
|
||||
|
||||
# Do nothing if message has been given using -m, template, merge etc.
|
||||
[ -z "$SOURCE" ] || exit 0
|
||||
|
||||
lcp=$(git diff-index --name-only --cached HEAD | longest_common_prefix)
|
||||
|
||||
case "$lcp" in
|
||||
device/*/*) prepend_msg "$(echo "$lcp" | cut -d/ -f3): ";;
|
||||
# Multiple packages touched for same device category
|
||||
# More logic could be added to detect if they all belong to same device
|
||||
device/*) ;;
|
||||
[^.]*/*) prepend_msg "$(echo "$lcp" | cut -d/ -f1-2): ";;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
Thank you for using postmarketOS! In order to speed up process of resolving your issue,
|
||||
we would like you to fill in the following :
|
||||
-->
|
||||
### Describe your issue
|
||||
#### What's the expected behaviour?
|
||||
|
||||
#### What's the current behaviour?
|
||||
|
||||
#### How to reproduce your issue?
|
||||
|
||||
### What device are you using?
|
||||
<!--
|
||||
Leave name of your device in vendor-codename format.
|
||||
If unsure, check name in the device package or leave full name of device
|
||||
PinePhone: which revision exactly? See https://wiki.pine64.org/index.php/PinePhone#Hardware_revisions
|
||||
-->
|
||||
|
||||
### On what postmarketOS version did you encounter the issue?
|
||||
<!--
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v23.06`
|
||||
* [ ] `v22.12`
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
### On what environment did you encounter the issue?
|
||||
#### Environments
|
||||
* [ ] Phosh
|
||||
* [ ] Plasma Mobile
|
||||
* [ ] Sxmo (Wayland/Sway) **Please post the output of `sxmo_version.sh`**
|
||||
* [ ] Other: **Please fill out**
|
||||
### How did you get postmarketOS image?
|
||||
* [ ] from https://images.postmarketos.org
|
||||
* [ ] I built it using pmbootstrap
|
||||
* [ ] It was preinstalled on my device
|
||||
### What's the build date of the image? (in yyyy-mm-dd format)
|
||||
<!--
|
||||
Notes:
|
||||
can be left empty if unsure
|
||||
If you downloaded image from images.postmarketos.org, date will be in yyyymmdd format
|
||||
-->
|
||||
|
||||
### Additional information
|
||||
<!-- logs, etc. -- make use <details> for long listings -->
|
||||
+1
-6
@@ -1,12 +1,7 @@
|
||||
{
|
||||
"subject_format": {
|
||||
"pass": [
|
||||
"^[a-z]+/[a-z-0-9*{}]+: new aport(s|)( \\(MR \\d+\\)|)$",
|
||||
"^[a-z]+/[a-z-0-9*{}]+: pkgrel bump( \\(MR \\d+\\)|)$",
|
||||
"^[a-z-0-9*{}]+: new device \\([^\\)]+\\)( \\(MR \\d+\\)|)",
|
||||
"^[a-z]+/[a-z-0-9*{}]+: upgrade to [0-9\\.a-z\\-_]+( \\(MR \\d+\\)|)$",
|
||||
"^[a-z]+/[a-z-0-9*{}]+: remove( \\(MR \\d+\\)|)$",
|
||||
"^[a-z]+/[a-z-0-9*{}]+: remove, upstreamed( \\(MR \\d+\\)|)$",
|
||||
"^(([a-z]+\\/[a-z\\-0-9*{}]+),?)+: [A-Za-z\\/\\-0-9*{}\\(\\)\\.,_&:=' ]+( \\(MR \\d+\\)|)$",
|
||||
"^CI: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$",
|
||||
"^mrhlpr.json: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$",
|
||||
"^pmaports.cfg: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$"
|
||||
|
||||
@@ -71,6 +71,8 @@ device/*/device-samsung-klimtlte @Grimler
|
||||
device/*/linux-samsung-klimtlte @Grimler
|
||||
device/*/firmware-odroid-xu4 @Grimler
|
||||
device/*/linux-samsung-chagallwifi @Grimler
|
||||
device/*/device-huawei-plank @gtrxAC
|
||||
device/*/linux-huawei-plank @gtrxAC
|
||||
|
||||
main/postmarketos-update-depthcharge-kernel/ @jenneron
|
||||
main/osk-sdl/ @craftyguy
|
||||
@@ -79,5 +81,8 @@ main/ttyescape @calebccff
|
||||
temp/u-boot-librem5/ @craftyguy @bshah
|
||||
temp/alsa-ucm-conf-google-kukui/ @jenneron @binarycraft
|
||||
temp/alsa-ucm-conf-google-gru/ @jenneron
|
||||
device/*/*-videostrong-kii-pro/ @vitali64yt
|
||||
device/*/*-amlogic-s905* @vitali64yt
|
||||
device/*/linux-postmarketos-amlogic/ @vitali64yt @exkc
|
||||
|
||||
# vim: ts=8 sw=4 et
|
||||
@@ -0,0 +1,89 @@
|
||||
# Policy for commits in pmaports
|
||||
|
||||
This document defines policy for organising and titling commits for
|
||||
inclusion in pmaports.
|
||||
|
||||
## Definitions
|
||||
|
||||
### Device-specific package
|
||||
|
||||
A device-specific package is used to apply configuration and
|
||||
functionality specifically for device support in postmarketOS.
|
||||
This is in contrast to other packages
|
||||
(e.g. main/postmarketos-ui-phosh) in postmarketOS that are used
|
||||
for configuring the distribution without consideration of the
|
||||
target device.
|
||||
|
||||
## General policy
|
||||
|
||||
We follow Alpine's aports commit style with some minor exceptions
|
||||
and additions. Alpine's commit style can be found here:
|
||||
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/COMMITSTYLE.md
|
||||
|
||||
## Exceptions
|
||||
|
||||
### Changes to packages inside of the device directory
|
||||
|
||||
While Alpine has the policy of always prefixing package names with
|
||||
the name of the repository they are in, in the case of pmaports
|
||||
this can lead to excessively long commit titles due to the nested
|
||||
subfolders of the device directory. As such, commits changing
|
||||
packages inside of the device directory should omit the directory
|
||||
prefix, for example:
|
||||
|
||||
device-pine64-pinephone: description of change
|
||||
|
||||
Or:
|
||||
|
||||
soc-qcom-msm8996: description of change
|
||||
|
||||
If the commit only makes device-specific changes, the
|
||||
commit title can opt to use the following format:
|
||||
|
||||
manufacturer-codename: description of change
|
||||
|
||||
### Moving devices between categories
|
||||
|
||||
As we do not include directory prefixes in device-related commits,
|
||||
Alpine's commit style for moving packages does not apply. Instead,
|
||||
we do the following:
|
||||
|
||||
manufacturer-codename: move from category to category
|
||||
|
||||
For example:
|
||||
|
||||
samsung-m0: move from testing to community
|
||||
|
||||
## Additions
|
||||
|
||||
### Forking packages from Alpine
|
||||
|
||||
Run `pmbootstrap aportgen --fork-alpine package` and modify it.
|
||||
|
||||
#### Template
|
||||
|
||||
- temp/package-name: fork from Alpine
|
||||
|
||||
Example: temp/pulseaudio: fork from Alpine
|
||||
|
||||
#### Rules
|
||||
|
||||
One commit per forked package.
|
||||
|
||||
### Adding new devices
|
||||
|
||||
Adding a new device package and optionally also a device-specific
|
||||
Linux and firmware package.
|
||||
|
||||
#### Template
|
||||
|
||||
- manufacturer-codename: new device
|
||||
|
||||
Example: htc-m8qlul: new device
|
||||
|
||||
#### Rules
|
||||
|
||||
If the device has the option of making use of a device-specific
|
||||
kernel and/or firmware package, those packages should be included
|
||||
in the same commit that adds the device package. One device per
|
||||
commit.
|
||||
@@ -6,3 +6,4 @@ Helpful resources:
|
||||
* [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/)
|
||||
* [Alpine Linux package search](https://pkgs.alpinelinux.org/packages)
|
||||
* [postmarketOS package search](https://pkgs.postmarketos.org/packages)
|
||||
* [postmarketOS commit style](./COMMITSTYLE.md)
|
||||
+7
-1
@@ -8,6 +8,12 @@ branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v23.06]
|
||||
description=Upcoming stable release (DO NOT USE)
|
||||
branch_pmaports=v23.06
|
||||
branch_aports=3.18-stable
|
||||
mirrordir_alpine=v3.18
|
||||
|
||||
[v22.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v22.12
|
||||
@@ -15,7 +21,7 @@ branch_aports=3.17-stable
|
||||
mirrordir_alpine=v3.17
|
||||
|
||||
[v22.06]
|
||||
description=Old release (supported until 2023-01-18)
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v22.06
|
||||
branch_aports=3.16-stable
|
||||
mirrordir_alpine=v3.16
|
||||
|
||||
@@ -7,26 +7,28 @@ CTARGET_ARCH=aarch64
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-aarch64
|
||||
pkgver=2.39
|
||||
pkgrel=3
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for aarch64 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
binutils-ld-fix-static-linking.patch
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
CVE-2022-38533.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
@@ -38,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -59,19 +65,6 @@ build() {
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
# binutils creates empty textrels here
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
local no_textrels=""
|
||||
;;
|
||||
*)
|
||||
# set -z text by default
|
||||
# this is the default for linkers such as ld.lld too
|
||||
local no_textrels="--enable-textrel-check=error"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
@@ -90,11 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
mips*) _hash_style_configure="--enable-default-hash-style=sysv" ;;
|
||||
*) _hash_style_configure="--enable-default-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -104,23 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_hash_style_configure \
|
||||
$no_textrels \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
@@ -140,30 +134,19 @@ package() {
|
||||
fi
|
||||
}
|
||||
|
||||
libs() {
|
||||
pkgdesc="Runtime libraries from binutils - libbfd and libopcodes"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/ld.gold "$subpkgdir"/usr/bin
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/bin
|
||||
mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 binutils-2.39.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
631726e557524633ace39c597acbc5ac39bfd25f7b292eee1f0b2a80a503f4ff799f027757d12d5a24b2fa3c07c7e14602d8a86d96e19876d6d0d5d1a02817e7 CVE-2022-38533.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,22 +0,0 @@
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Fcoffcode.h;h=52027981c3f052d98e043cd0c877f0bb5da97c7f;hp=67aaf158ca1829fe63f0065f31a0b1009b227b36;hb=ef186fe54aa6d281a3ff8a9528417e5cc614c797;hpb=80075150727d653c39e9d037e15c6b87dcef08cd
|
||||
|
||||
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
|
||||
index 67aaf158ca1..52027981c3f 100644
|
||||
--- a/bfd/coffcode.h
|
||||
+++ b/bfd/coffcode.h
|
||||
@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd,
|
||||
|
||||
rec = (bfd_byte *) location;
|
||||
recend = rec + count;
|
||||
- while (rec < recend)
|
||||
+ while (recend - rec >= 4)
|
||||
{
|
||||
+ size_t len = bfd_get_32 (abfd, rec);
|
||||
+ if (len == 0 || len > (size_t) (recend - rec) / 4)
|
||||
+ break;
|
||||
+ rec += len * 4;
|
||||
++section->lma;
|
||||
- rec += bfd_get_32 (abfd, rec) * 4;
|
||||
}
|
||||
|
||||
BFD_ASSERT (rec == recend);
|
||||
@@ -0,0 +1,37 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,39 +0,0 @@
|
||||
# DP: Fix gold on mips64 targets.
|
||||
|
||||
gold/
|
||||
|
||||
2016-08-09 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.
|
||||
|
||||
|
||||
--- a/gold/configure.tgt
|
||||
+++ b/gold/configure.tgt
|
||||
@@ -153,6 +153,13 @@ aarch64*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*el*-*-*|mips*64*le*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS_RS3_LE
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=false
|
||||
+ targ_extra_big_endian=true
|
||||
+ ;;
|
||||
mips*el*-*-*|mips*le*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS_RS3_LE
|
||||
@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=true
|
||||
+ targ_extra_big_endian=false
|
||||
+ ;;
|
||||
mips*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ./ld/configure.tgt.orig
|
||||
+++ ./ld/configure.tgt
|
||||
@@ -541,12 +541,12 @@
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
@@ -0,0 +1,103 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -7,26 +7,28 @@ CTARGET_ARCH=armhf
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-armhf
|
||||
pkgver=2.39
|
||||
pkgrel=3
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for armhf targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
binutils-ld-fix-static-linking.patch
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
CVE-2022-38533.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
@@ -38,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -59,19 +65,6 @@ build() {
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
# binutils creates empty textrels here
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
local no_textrels=""
|
||||
;;
|
||||
*)
|
||||
# set -z text by default
|
||||
# this is the default for linkers such as ld.lld too
|
||||
local no_textrels="--enable-textrel-check=error"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
@@ -90,11 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
mips*) _hash_style_configure="--enable-default-hash-style=sysv" ;;
|
||||
*) _hash_style_configure="--enable-default-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -104,23 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_hash_style_configure \
|
||||
$no_textrels \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
@@ -140,30 +134,19 @@ package() {
|
||||
fi
|
||||
}
|
||||
|
||||
libs() {
|
||||
pkgdesc="Runtime libraries from binutils - libbfd and libopcodes"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/ld.gold "$subpkgdir"/usr/bin
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/bin
|
||||
mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 binutils-2.39.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
631726e557524633ace39c597acbc5ac39bfd25f7b292eee1f0b2a80a503f4ff799f027757d12d5a24b2fa3c07c7e14602d8a86d96e19876d6d0d5d1a02817e7 CVE-2022-38533.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,22 +0,0 @@
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Fcoffcode.h;h=52027981c3f052d98e043cd0c877f0bb5da97c7f;hp=67aaf158ca1829fe63f0065f31a0b1009b227b36;hb=ef186fe54aa6d281a3ff8a9528417e5cc614c797;hpb=80075150727d653c39e9d037e15c6b87dcef08cd
|
||||
|
||||
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
|
||||
index 67aaf158ca1..52027981c3f 100644
|
||||
--- a/bfd/coffcode.h
|
||||
+++ b/bfd/coffcode.h
|
||||
@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd,
|
||||
|
||||
rec = (bfd_byte *) location;
|
||||
recend = rec + count;
|
||||
- while (rec < recend)
|
||||
+ while (recend - rec >= 4)
|
||||
{
|
||||
+ size_t len = bfd_get_32 (abfd, rec);
|
||||
+ if (len == 0 || len > (size_t) (recend - rec) / 4)
|
||||
+ break;
|
||||
+ rec += len * 4;
|
||||
++section->lma;
|
||||
- rec += bfd_get_32 (abfd, rec) * 4;
|
||||
}
|
||||
|
||||
BFD_ASSERT (rec == recend);
|
||||
@@ -0,0 +1,37 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,39 +0,0 @@
|
||||
# DP: Fix gold on mips64 targets.
|
||||
|
||||
gold/
|
||||
|
||||
2016-08-09 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.
|
||||
|
||||
|
||||
--- a/gold/configure.tgt
|
||||
+++ b/gold/configure.tgt
|
||||
@@ -153,6 +153,13 @@ aarch64*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*el*-*-*|mips*64*le*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS_RS3_LE
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=false
|
||||
+ targ_extra_big_endian=true
|
||||
+ ;;
|
||||
mips*el*-*-*|mips*le*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS_RS3_LE
|
||||
@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=true
|
||||
+ targ_extra_big_endian=false
|
||||
+ ;;
|
||||
mips*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ./ld/configure.tgt.orig
|
||||
+++ ./ld/configure.tgt
|
||||
@@ -541,12 +541,12 @@
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
@@ -0,0 +1,103 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -7,26 +7,28 @@ CTARGET_ARCH=armv7
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-armv7
|
||||
pkgver=2.39
|
||||
pkgrel=3
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for armv7 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
binutils-ld-fix-static-linking.patch
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
CVE-2022-38533.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
@@ -38,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -59,19 +65,6 @@ build() {
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
# binutils creates empty textrels here
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
local no_textrels=""
|
||||
;;
|
||||
*)
|
||||
# set -z text by default
|
||||
# this is the default for linkers such as ld.lld too
|
||||
local no_textrels="--enable-textrel-check=error"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
@@ -90,11 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
mips*) _hash_style_configure="--enable-default-hash-style=sysv" ;;
|
||||
*) _hash_style_configure="--enable-default-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -104,23 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_hash_style_configure \
|
||||
$no_textrels \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
@@ -140,30 +134,19 @@ package() {
|
||||
fi
|
||||
}
|
||||
|
||||
libs() {
|
||||
pkgdesc="Runtime libraries from binutils - libbfd and libopcodes"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/ld.gold "$subpkgdir"/usr/bin
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/bin
|
||||
mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 binutils-2.39.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
631726e557524633ace39c597acbc5ac39bfd25f7b292eee1f0b2a80a503f4ff799f027757d12d5a24b2fa3c07c7e14602d8a86d96e19876d6d0d5d1a02817e7 CVE-2022-38533.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,22 +0,0 @@
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Fcoffcode.h;h=52027981c3f052d98e043cd0c877f0bb5da97c7f;hp=67aaf158ca1829fe63f0065f31a0b1009b227b36;hb=ef186fe54aa6d281a3ff8a9528417e5cc614c797;hpb=80075150727d653c39e9d037e15c6b87dcef08cd
|
||||
|
||||
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
|
||||
index 67aaf158ca1..52027981c3f 100644
|
||||
--- a/bfd/coffcode.h
|
||||
+++ b/bfd/coffcode.h
|
||||
@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd,
|
||||
|
||||
rec = (bfd_byte *) location;
|
||||
recend = rec + count;
|
||||
- while (rec < recend)
|
||||
+ while (recend - rec >= 4)
|
||||
{
|
||||
+ size_t len = bfd_get_32 (abfd, rec);
|
||||
+ if (len == 0 || len > (size_t) (recend - rec) / 4)
|
||||
+ break;
|
||||
+ rec += len * 4;
|
||||
++section->lma;
|
||||
- rec += bfd_get_32 (abfd, rec) * 4;
|
||||
}
|
||||
|
||||
BFD_ASSERT (rec == recend);
|
||||
@@ -0,0 +1,37 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,39 +0,0 @@
|
||||
# DP: Fix gold on mips64 targets.
|
||||
|
||||
gold/
|
||||
|
||||
2016-08-09 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.
|
||||
|
||||
|
||||
--- a/gold/configure.tgt
|
||||
+++ b/gold/configure.tgt
|
||||
@@ -153,6 +153,13 @@ aarch64*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*el*-*-*|mips*64*le*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS_RS3_LE
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=false
|
||||
+ targ_extra_big_endian=true
|
||||
+ ;;
|
||||
mips*el*-*-*|mips*le*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS_RS3_LE
|
||||
@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=true
|
||||
+ targ_extra_big_endian=false
|
||||
+ ;;
|
||||
mips*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ./ld/configure.tgt.orig
|
||||
+++ ./ld/configure.tgt
|
||||
@@ -541,12 +541,12 @@
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
@@ -0,0 +1,103 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -7,26 +7,28 @@ CTARGET_ARCH=riscv64
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-riscv64
|
||||
pkgver=2.39
|
||||
pkgrel=3
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for riscv64 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
binutils-ld-fix-static-linking.patch
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
CVE-2022-38533.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
@@ -38,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -59,19 +65,6 @@ build() {
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
# binutils creates empty textrels here
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
local no_textrels=""
|
||||
;;
|
||||
*)
|
||||
# set -z text by default
|
||||
# this is the default for linkers such as ld.lld too
|
||||
local no_textrels="--enable-textrel-check=error"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
@@ -90,11 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
mips*) _hash_style_configure="--enable-default-hash-style=sysv" ;;
|
||||
*) _hash_style_configure="--enable-default-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -104,23 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_hash_style_configure \
|
||||
$no_textrels \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
@@ -140,30 +134,19 @@ package() {
|
||||
fi
|
||||
}
|
||||
|
||||
libs() {
|
||||
pkgdesc="Runtime libraries from binutils - libbfd and libopcodes"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/ld.gold "$subpkgdir"/usr/bin
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/bin
|
||||
mv "$pkgdir"/usr/$CTARGET/bin/ld.gold "$subpkgdir"/usr/$CTARGET/bin/ld.gold
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 binutils-2.39.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
631726e557524633ace39c597acbc5ac39bfd25f7b292eee1f0b2a80a503f4ff799f027757d12d5a24b2fa3c07c7e14602d8a86d96e19876d6d0d5d1a02817e7 CVE-2022-38533.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,22 +0,0 @@
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Fcoffcode.h;h=52027981c3f052d98e043cd0c877f0bb5da97c7f;hp=67aaf158ca1829fe63f0065f31a0b1009b227b36;hb=ef186fe54aa6d281a3ff8a9528417e5cc614c797;hpb=80075150727d653c39e9d037e15c6b87dcef08cd
|
||||
|
||||
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
|
||||
index 67aaf158ca1..52027981c3f 100644
|
||||
--- a/bfd/coffcode.h
|
||||
+++ b/bfd/coffcode.h
|
||||
@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd,
|
||||
|
||||
rec = (bfd_byte *) location;
|
||||
recend = rec + count;
|
||||
- while (rec < recend)
|
||||
+ while (recend - rec >= 4)
|
||||
{
|
||||
+ size_t len = bfd_get_32 (abfd, rec);
|
||||
+ if (len == 0 || len > (size_t) (recend - rec) / 4)
|
||||
+ break;
|
||||
+ rec += len * 4;
|
||||
++section->lma;
|
||||
- rec += bfd_get_32 (abfd, rec) * 4;
|
||||
}
|
||||
|
||||
BFD_ASSERT (rec == recend);
|
||||
@@ -0,0 +1,37 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,39 +0,0 @@
|
||||
# DP: Fix gold on mips64 targets.
|
||||
|
||||
gold/
|
||||
|
||||
2016-08-09 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.
|
||||
|
||||
|
||||
--- a/gold/configure.tgt
|
||||
+++ b/gold/configure.tgt
|
||||
@@ -153,6 +153,13 @@ aarch64*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*el*-*-*|mips*64*le*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS_RS3_LE
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=false
|
||||
+ targ_extra_big_endian=true
|
||||
+ ;;
|
||||
mips*el*-*-*|mips*le*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS_RS3_LE
|
||||
@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
|
||||
targ_big_endian=false
|
||||
targ_extra_big_endian=true
|
||||
;;
|
||||
+mips*64*-*-*)
|
||||
+ targ_obj=mips
|
||||
+ targ_machine=EM_MIPS
|
||||
+ targ_size=64
|
||||
+ targ_big_endian=true
|
||||
+ targ_extra_big_endian=false
|
||||
+ ;;
|
||||
mips*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS
|
||||
@@ -1,19 +0,0 @@
|
||||
--- ./ld/configure.tgt.orig
|
||||
+++ ./ld/configure.tgt
|
||||
@@ -541,12 +541,12 @@
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
@@ -0,0 +1,103 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.35.0
|
||||
pkgrel=30
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d34c0d16d77bd18548e4b2764ab4bde59611480aaaab5a47f585158a91fad413ccfb7954d5ebcf4aa6e04fdda4621832f46e8b13e313ce1fd7b4b96b3298d425 busybox-static-1.35.0-r30-aarch64-edge.apk
|
||||
d4977cf4654bb5659d4e6d91785832d3fd418403b70f1619c26aa305839d64c131c6389979793896af0fb0d9e8fc2b99537dbeb65133465d7d983576902dff34 busybox-static-1.36.1-r0-aarch64-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.35.0
|
||||
pkgrel=30
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
805bcf5416d70db8a68a90e85dbf9728213f4e996862ce9d4af3eea35ac25bc1bf6ecddb7dc18d2881dfda59ecfbc64bfbaf148022209f26eb034a10e65494aa busybox-static-1.35.0-r30-armhf-edge.apk
|
||||
eece41953046c99029ec4a0707c1fd4270d43b497f05cf63070deef376fc28f61bcdfa8b9f34e23305ba459a633909eb1682fbe183206b69dea8be3742479ae7 busybox-static-1.36.1-r0-armhf-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.35.0
|
||||
pkgrel=30
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1beffa9f0b7a93d72b793c3ebac99a6243ca1a385064388fe6189753210775ff65bd4be30a540b5e0fa85ea795b7e3ad42cf4f9446c52ca1db285eea59a84c1a busybox-static-1.35.0-r30-armv7-edge.apk
|
||||
29df2ea5d83535632308524064dbb43bf9ed147ab1112bed76b1fc70b519d7dc3e4083c51527e80129a455a001479569641b710f58fdad8538852061d4880660 busybox-static-1.36.1-r0-armv7-edge.apk
|
||||
"
|
||||
@@ -1,14 +1,14 @@
|
||||
From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001
|
||||
From 3e5acbe356124aa5d8dde0635d652c065a553e7d Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH] posix_memalign
|
||||
Subject: [PATCH 01/33] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 3b2e4f47915..20f790904a2 100644
|
||||
index 3527283693b..c4071b64b53 100644
|
||||
--- a/gcc/config/i386/pmm_malloc.h
|
||||
+++ b/gcc/config/i386/pmm_malloc.h
|
||||
@@ -27,12 +27,13 @@
|
||||
@@ -37,3 +37,6 @@ index 3b2e4f47915..20f790904a2 100644
|
||||
return __ptr;
|
||||
else
|
||||
return NULL;
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dd1e75ff4ecda96957465b34681f245e818928bd Mon Sep 17 00:00:00 2001
|
||||
From f986a4a1224fa7d452b415d690aead8d356a7eae Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 29 Mar 2013 08:59:00 +0400
|
||||
Subject: [PATCH] gcc: poison-system-directories
|
||||
Subject: [PATCH 02/33] gcc: poison-system-directories
|
||||
|
||||
Add /sw/include and /opt/include based on the original
|
||||
zecke-no-host-includes.patch patch. The original patch checked for
|
||||
@@ -26,10 +26,10 @@ Upstream-Status: Pending
|
||||
7 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 8a0dafc522d..0357868e22c 100644
|
||||
index 862c474d3c8..64c4277c991 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -710,6 +710,10 @@ Wreturn-local-addr
|
||||
@@ -711,6 +711,10 @@ Wreturn-local-addr
|
||||
Common Var(warn_return_local_addr) Init(1) Warning
|
||||
Warn about returning a pointer/reference to a local or temporary variable.
|
||||
|
||||
@@ -41,10 +41,10 @@ index 8a0dafc522d..0357868e22c 100644
|
||||
Common Var(warn_shadow) Warning
|
||||
Warn when one variable shadows another. Same as -Wshadow=global.
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 64c27c9cfac..f0fbf123aa8 100644
|
||||
index 4cad077bfbe..0679fbbf4c6 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -230,6 +230,12 @@
|
||||
@@ -236,6 +236,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ index 64c27c9cfac..f0fbf123aa8 100644
|
||||
optimizer and back end) to be checked for dynamic type safety at runtime.
|
||||
This is quite expensive. */
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 5ce0557719a..e9060112384 100755
|
||||
index c7b26d1927d..8c46369f73f 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -1023,6 +1023,7 @@ enable_maintainer_mode
|
||||
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
|
||||
enable_link_mutex
|
||||
enable_link_serialization
|
||||
enable_version_specific_runtime_libs
|
||||
@@ -69,7 +69,7 @@ index 5ce0557719a..e9060112384 100755
|
||||
enable_plugin
|
||||
enable_host_shared
|
||||
enable_libquadmath_support
|
||||
@@ -1785,6 +1786,8 @@ Optional Features:
|
||||
@@ -1788,6 +1789,8 @@ Optional Features:
|
||||
--enable-version-specific-runtime-libs
|
||||
specify that runtime libraries should be installed
|
||||
in a compiler-specific directory
|
||||
@@ -78,7 +78,7 @@ index 5ce0557719a..e9060112384 100755
|
||||
--enable-plugin enable plugin support
|
||||
--enable-host-shared build host code as shared libraries
|
||||
--disable-libquadmath-support
|
||||
@@ -31982,6 +31985,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ index 5ce0557719a..e9060112384 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 23bee7010a3..75a7048045c 100644
|
||||
index 09082e8ccae..5504bf6eb01 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7421,6 +7421,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
[specify that runtime libraries should be
|
||||
installed in a compiler-specific directory])])
|
||||
|
||||
@@ -120,37 +120,37 @@ index 23bee7010a3..75a7048045c 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 07b440190c3..b2de464798a 100644
|
||||
index c0c3ad14515..7cdd5bfa952 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
|
||||
-Wparentheses -Wno-pedantic-ms-format @gol
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
|
||||
+-Wno-poison-system-directories @gol
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
|
||||
-Wno-scalar-storage-order -Wsequence-point @gol
|
||||
@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
|
||||
-Wparentheses -Wno-pedantic-ms-format
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
|
||||
+-Wno-poison-system-directories
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type
|
||||
-Wno-scalar-storage-order -Wsequence-point
|
||||
@@ -8424,6 +8425,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
most targets, it is made up of code and thus requires the stack to be
|
||||
made executable in order for the program to work properly.
|
||||
|
||||
+@item -Wno-poison-system-directories
|
||||
+@opindex Wno-poison-system-directories
|
||||
+@item -Wno-poison-system-directories
|
||||
+Do not warn for @option{-I} or @option{-L} options using system
|
||||
+directories such as @file{/usr/include} when cross compiling. This
|
||||
+option is intended for use in chroot environments when such
|
||||
+directories contain the correct headers and libraries for the target
|
||||
+system rather than the host.
|
||||
+
|
||||
@item -Wfloat-equal
|
||||
@opindex Wfloat-equal
|
||||
@opindex Wno-float-equal
|
||||
@item -Wfloat-equal
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index bb07cc244e3..47fb5802194 100644
|
||||
index 16bb07f2cdc..33b56e721d2 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1159,6 +1159,8 @@ proper position among the other output files. */
|
||||
@@ -1146,6 +1146,8 @@ proper position among the other output files. */
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
@@ -160,7 +160,7 @@ index bb07cc244e3..47fb5802194 100644
|
||||
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
|
||||
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
|
||||
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
|
||||
index bd2a97938eb..c80f100f476 100644
|
||||
index 4d44321183f..0f3f071b44c 100644
|
||||
--- a/gcc/incpath.cc
|
||||
+++ b/gcc/incpath.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -198,3 +198,6 @@ index bd2a97938eb..c80f100f476 100644
|
||||
}
|
||||
|
||||
/* Use given -I paths for #include "..." but not #include <...>, and
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001
|
||||
From 31e2b60000e779ef775daa306120eabcf987852a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH 03/33] specs: turn on -Wl,-z,now by default
|
||||
|
||||
Previously, we also used to turn on -z relro here, but we now build
|
||||
binutils with --enable-relro, which is functionally equivalent.
|
||||
@@ -14,24 +14,24 @@ now by default.
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b2de464798a..83bd1bde433 100644
|
||||
index 7cdd5bfa952..158b7bcb81e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
linker. When using the GNU linker, you can also get the same effect with
|
||||
@option{-Wl,-Map=output.map}.
|
||||
|
||||
+NOTE: In Alpine Linux, for LDFLAGS, the option
|
||||
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
|
||||
+
|
||||
@item -u @var{symbol}
|
||||
@opindex u
|
||||
@item -u @var{symbol}
|
||||
Pretend the symbol @var{symbol} is undefined, to force linking of
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 47fb5802194..d18b5d7b59a 100644
|
||||
index 33b56e721d2..f82fae23c22 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1157,6 +1157,7 @@ proper position among the other output files. */
|
||||
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
|
||||
"%{flto|flto=*:%<fcompare-debug*} \
|
||||
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
@@ -39,3 +39,6 @@ index 47fb5802194..d18b5d7b59a 100644
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
%{Wno-poison-system-directories:--no-poison-system-directories} \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001
|
||||
From 3b910da7d1e81bdd953e6d9ec82020e7b120353b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
ObjC++, if the optimization level is > 0
|
||||
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/c-family/c-cppbuiltin.cc | 4 ++++
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
|
||||
index 4672ae8486a..573c021e1e8 100644
|
||||
index 5d64625fcd7..868d69506e4 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.cc
|
||||
+++ b/gcc/c-family/c-cppbuiltin.cc
|
||||
@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
@@ -25,10 +25,10 @@ index 4672ae8486a..573c021e1e8 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 83bd1bde433..dda299a9987 100644
|
||||
index 158b7bcb81e..cc9972f907b 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10896,6 +10896,12 @@ also turns on the following optimization flags:
|
||||
@@ -11866,6 +11866,12 @@ also turns on the following optimization flags:
|
||||
Please note the warning under @option{-fgcse} about
|
||||
invoking @option{-O2} on programs that use computed gotos.
|
||||
|
||||
@@ -38,6 +38,9 @@ index 83bd1bde433..dda299a9987 100644
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@item -O3
|
||||
@opindex O3
|
||||
@item -O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 75d1a35180cf0967f062765314bf091a64032062 Mon Sep 17 00:00:00 2001
|
||||
From 9c3a2882b1932296ccb1d0ed2900cf046f998a26 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
but always link the sanitizer libraries with --no-as-needed.
|
||||
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
gcc/config/aarch64/aarch64-linux.h | 1 +
|
||||
@@ -22,7 +22,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
14 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
|
||||
index 5e4553d79f5..b516f3ef97f 100644
|
||||
index 4277f03da2a..b131983a546 100644
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -34,7 +34,7 @@ index 5e4553d79f5..b516f3ef97f 100644
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
|
||||
index 17f16a55910..9ec667e9a5e 100644
|
||||
index 03f783f2ad1..d946e700dda 100644
|
||||
--- a/gcc/config/alpha/linux-elf.h
|
||||
+++ b/gcc/config/alpha/linux-elf.h
|
||||
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -47,7 +47,7 @@ index 17f16a55910..9ec667e9a5e 100644
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
|
||||
index df3da67c4f0..7532bc29f9b 100644
|
||||
index 7b7b7cbbe14..49c050c6f2c 100644
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -70,6 +70,7 @@
|
||||
@@ -59,7 +59,7 @@ index df3da67c4f0..7532bc29f9b 100644
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 857c0e077bf..8433e56c3e1 100644
|
||||
index eda8010b133..b26b17f2f2a 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -69,9 +69,9 @@ index 857c0e077bf..8433e56c3e1 100644
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#undef LIBHWASAN_EARLY_SPEC
|
||||
#define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \
|
||||
@@ -145,12 +145,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
|
||||
"%{static-libhwasan:%{!shared:" \
|
||||
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
|
||||
"%{static-libtsan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
||||
@@ -87,7 +87,7 @@ index 857c0e077bf..8433e56c3e1 100644
|
||||
|
||||
#undef TARGET_F951_OPTIONS
|
||||
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
|
||||
index 0102b2a6f3b..994414c1845 100644
|
||||
index a79b739089d..e0752673dff 100644
|
||||
--- a/gcc/config/i386/gnu-user.h
|
||||
+++ b/gcc/config/i386/gnu-user.h
|
||||
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -100,7 +100,7 @@ index 0102b2a6f3b..994414c1845 100644
|
||||
%{!static: \
|
||||
%{!static-pie: \
|
||||
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
|
||||
index abc8cf624ca..fe656aeae27 100644
|
||||
index 3b63b99acf6..759bf0db86f 100644
|
||||
--- a/gcc/config/i386/gnu-user64.h
|
||||
+++ b/gcc/config/i386/gnu-user64.h
|
||||
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -112,7 +112,7 @@ index abc8cf624ca..fe656aeae27 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
|
||||
index 93510098ccc..3813e536423 100644
|
||||
index 5dfd428aa17..02656dad7fc 100644
|
||||
--- a/gcc/config/ia64/linux.h
|
||||
+++ b/gcc/config/ia64/linux.h
|
||||
@@ -58,7 +58,7 @@ do { \
|
||||
@@ -125,7 +125,7 @@ index 93510098ccc..3813e536423 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
|
||||
index 6aad7192e69..e1256a55add 100644
|
||||
index a4e5380b589..3cc61bce69f 100644
|
||||
--- a/gcc/config/mips/gnu-user.h
|
||||
+++ b/gcc/config/mips/gnu-user.h
|
||||
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -137,10 +137,10 @@ index 6aad7192e69..e1256a55add 100644
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 38803723ba9..3067ed6eac8 100644
|
||||
index 2fdfd930cf2..16503482ec2 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mabi=ilp32:_ilp32}"
|
||||
|
||||
#define LINK_SPEC "\
|
||||
@@ -149,7 +149,7 @@ index 38803723ba9..3067ed6eac8 100644
|
||||
%{mno-relax:--no-relax} \
|
||||
%{mbig-endian:-EB} \
|
||||
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
|
||||
index b2a7afabc73..34ceb4e4fce 100644
|
||||
index 9e457033d11..08016bf224d 100644
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -377,13 +377,13 @@ extern int dot_symbols;
|
||||
@@ -169,10 +169,10 @@ index b2a7afabc73..34ceb4e4fce 100644
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
|
||||
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
|
||||
index 7e2519de5d4..61215a7a1b3 100644
|
||||
index ae932fc22f0..c8ff0c6dc8e 100644
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -788,7 +788,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
#endif
|
||||
|
||||
@@ -182,7 +182,7 @@ index 7e2519de5d4..61215a7a1b3 100644
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
|
||||
|
||||
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
|
||||
index d7b7e7a7b02..d2287f14f2e 100644
|
||||
index 02aa1edaff8..64df5801134 100644
|
||||
--- a/gcc/config/s390/linux.h
|
||||
+++ b/gcc/config/s390/linux.h
|
||||
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -195,7 +195,7 @@ index d7b7e7a7b02..d2287f14f2e 100644
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
|
||||
index 6a809e9092d..93bfb92d3ff 100644
|
||||
index 0e33b3cac2c..c2f44546e62 100644
|
||||
--- a/gcc/config/sparc/linux.h
|
||||
+++ b/gcc/config/sparc/linux.h
|
||||
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
@@ -208,10 +208,10 @@ index 6a809e9092d..93bfb92d3ff 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index d18b5d7b59a..3b76311b544 100644
|
||||
index f82fae23c22..da6417dd0d1 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -744,8 +744,11 @@ proper position among the other output files. */
|
||||
@@ -754,8 +754,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBASAN_EARLY_SPEC
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -225,7 +225,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -780,8 +783,11 @@ proper position among the other output files. */
|
||||
@@ -790,8 +793,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBTSAN_EARLY_SPEC
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -239,7 +239,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -798,8 +804,11 @@ proper position among the other output files. */
|
||||
@@ -808,8 +814,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBLSAN_EARLY_SPEC
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -253,7 +253,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -814,8 +823,11 @@ proper position among the other output files. */
|
||||
@@ -824,8 +833,11 @@ proper position among the other output files. */
|
||||
#define STATIC_LIBUBSAN_LIBS \
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
@@ -267,3 +267,6 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001
|
||||
From 288cb2be3abe07dcf2737ed3ac07e93573262bc4 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
|
||||
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index 07da40ef43b..8683f706426 100644
|
||||
index a75038930ae..b98726f33ed 100644
|
||||
--- a/gcc/c-family/c.opt
|
||||
+++ b/gcc/c-family/c.opt
|
||||
@@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end
|
||||
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
|
||||
of the destination region. Same as -Wformat-overflow=1.
|
||||
|
||||
Wformat-security
|
||||
@@ -20,7 +20,7 @@ index 07da40ef43b..8683f706426 100644
|
||||
Warn about possible security problems with format functions.
|
||||
|
||||
Wformat-signedness
|
||||
@@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
Warn about zero-length formats.
|
||||
|
||||
Wformat=
|
||||
@@ -29,3 +29,6 @@ index 07da40ef43b..8683f706426 100644
|
||||
Warn about printf/scanf/strftime/strfmon format string anomalies.
|
||||
|
||||
Wformat-overflow=
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From e4d0ec43e772b6dc7c3708aed5309897df26a125 Mon Sep 17 00:00:00 2001
|
||||
From 93e44f7c7b1f11c1f714d6c384b0d39a191ac18a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH] Enable -Wtrampolines by default.
|
||||
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 0357868e22c..6d5e5eebe60 100644
|
||||
index 64c4277c991..c24839d32bc 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -802,7 +802,7 @@ Common Var(warn_system_headers) Warning
|
||||
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers.
|
||||
|
||||
Wtrampolines
|
||||
@@ -20,3 +20,6 @@ index 0357868e22c..6d5e5eebe60 100644
|
||||
Warn whenever a trampoline is generated.
|
||||
|
||||
Wtrivial-auto-var-init
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 27e5d5bd3fed9006a2958d2b09750d15ad07383b Mon Sep 17 00:00:00 2001
|
||||
From 7aa93d6d9a63c7bedf1e033f6d040e95038537e7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
Change the buffer size.
|
||||
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 8 +++++++-
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 3b76311b544..cc99d0b7aa1 100644
|
||||
index da6417dd0d1..b5a6f200635 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -996,6 +996,12 @@ proper position among the other output files. */
|
||||
@@ -983,6 +983,12 @@ proper position among the other output files. */
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ index 3b76311b544..cc99d0b7aa1 100644
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
@@ -1295,7 +1301,7 @@ static const char *cc1_options =
|
||||
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
|
||||
%{-version:--version}\
|
||||
%{-help=*:--help=%*}\
|
||||
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
|
||||
@@ -36,10 +36,10 @@ index 3b76311b544..cc99d0b7aa1 100644
|
||||
%{fprofile-arcs|fprofile-generate*|coverage:\
|
||||
%{!fprofile-update=single:\
|
||||
diff --git a/gcc/params.opt b/gcc/params.opt
|
||||
index b88e1372005..82a7e25dd2f 100644
|
||||
index 823cdb2ff85..5b096899b40 100644
|
||||
--- a/gcc/params.opt
|
||||
+++ b/gcc/params.opt
|
||||
@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
The maximum number of SSA_NAME assignments to follow in determining a value.
|
||||
|
||||
-param=ssp-buffer-size=
|
||||
@@ -48,3 +48,6 @@ index b88e1372005..82a7e25dd2f 100644
|
||||
The lower bound for a buffer to be considered for stack smashing protection.
|
||||
|
||||
-param=stack-clash-protection-guard-size=
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 83bf2a316222e2fe0b72968cadf4e334d41173f6 Mon Sep 17 00:00:00 2001
|
||||
From e44b295b5b0b917c0b47085f60466a37f890e1c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
|
||||
bootstrapping.
|
||||
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
@@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
|
||||
index 8f51544989e..5329804d136 100644
|
||||
index 12d34910830..61b13762b71 100644
|
||||
--- a/libstdc++-v3/po/Makefile.am
|
||||
+++ b/libstdc++-v3/po/Makefile.am
|
||||
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
|
||||
@@ -38,7 +38,7 @@ index 8f51544989e..5329804d136 100644
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
|
||||
index 243f3db7b72..822210781fa 100644
|
||||
index 8e93445acd2..d6ff06e5ddb 100644
|
||||
--- a/libstdc++-v3/po/Makefile.in
|
||||
+++ b/libstdc++-v3/po/Makefile.in
|
||||
@@ -561,6 +561,7 @@ uninstall-am:
|
||||
@@ -49,3 +49,6 @@ index 243f3db7b72..822210781fa 100644
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001
|
||||
From f041dcd8f775e03b85a49e3aeef0870e2333b10e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH] Don't declare asprintf if defined as a macro.
|
||||
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index a65ced9c820..eb20ab0f95f 100644
|
||||
index 1d5c779fcff..19e3cb1e31c 100644
|
||||
--- a/include/libiberty.h
|
||||
+++ b/include/libiberty.h
|
||||
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
|
||||
@@ -23,3 +23,6 @@ index a65ced9c820..eb20ab0f95f 100644
|
||||
|
||||
/* Like asprintf but allocates memory without fail. This works like
|
||||
xmalloc. */
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 838e1daa955d9013c462be3471497cb39641e951 Mon Sep 17 00:00:00 2001
|
||||
From 6fc13fce114648b1a64e658b469a4697382d18bb Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH] libiberty: copy PIC objects during build process
|
||||
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 1b17c2e3a47..8db1176df2e 100644
|
||||
index 72608f3e4a7..58356884728 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
||||
@@ -19,3 +19,6 @@ index 1b17c2e3a47..8db1176df2e 100644
|
||||
cd ..; \
|
||||
else true; fi
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 048c394eb709bfd216e307c1b92ac7f8a7e7758b Mon Sep 17 00:00:00 2001
|
||||
From 6a1955bbf49836ad99b23501f42283842e01761b Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH] libgcc_s
|
||||
Subject: [PATCH 12/33] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.cc | 4 ++--
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] libgcc_s
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
|
||||
index 31780b6daf7..d89898846e1 100644
|
||||
index 0d817fc3f3b..2e99db00db9 100644
|
||||
--- a/gcc/config/i386/i386-expand.cc
|
||||
+++ b/gcc/config/i386/i386-expand.cc
|
||||
@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
{
|
||||
case IX86_BUILTIN_CPU_INIT:
|
||||
{
|
||||
@@ -27,7 +27,7 @@ index 31780b6daf7..d89898846e1 100644
|
||||
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
|
||||
}
|
||||
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
|
||||
index dab1d98060f..cf824b4114a 100644
|
||||
index 50b6d8248a2..724ced402a1 100644
|
||||
--- a/libgcc/config/i386/cpuinfo.c
|
||||
+++ b/libgcc/config/i386/cpuinfo.c
|
||||
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
|
||||
@@ -52,3 +52,6 @@ index 8506a635790..564296f788e 100644
|
||||
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
|
||||
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
|
||||
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 717346fbbd6642ba6b0c3af2deb3771794346507 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:36 +0000
|
||||
Subject: [PATCH] libitm: disable FORTIFY
|
||||
|
||||
---
|
||||
libitm/configure.tgt | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
|
||||
index 06e90973ef3..669e64236c3 100644
|
||||
--- a/libitm/configure.tgt
|
||||
+++ b/libitm/configure.tgt
|
||||
@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
+# FIXME: error: inlining failed in call to always_inline
|
||||
+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’
|
||||
+# : function body can be overwritten at link time
|
||||
+# Disable Fortify in libitm for now. #508852
|
||||
+case "${target}" in
|
||||
+ *-*-linux*)
|
||||
+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
# Map the target cpu to an ARCH sub-directory. At the same time,
|
||||
# work out any special compilation flags as necessary.
|
||||
case "${target_cpu}" in
|
||||
@@ -1,7 +1,7 @@
|
||||
From db28b1e0f3b06325026ec5b5e7cdca4e9992e05c Mon Sep 17 00:00:00 2001
|
||||
From 558e95aa2b0f3bbf416e1bb572e5f47bddc8601c Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH] nopie
|
||||
Subject: [PATCH 13/33] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] nopie
|
||||
2 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index e9060112384..2f6b3265a6c 100755
|
||||
index 8c46369f73f..e59cbee1767 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -32497,6 +32497,33 @@ fi
|
||||
@@ -32268,6 +32268,33 @@ fi
|
||||
$as_echo "$gcc_cv_no_pie" >&6; }
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -47,10 +47,10 @@ index e9060112384..2f6b3265a6c 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 75a7048045c..e683d3a7a5f 100644
|
||||
index 5504bf6eb01..57268319de1 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7681,6 +7681,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
@@ -7552,6 +7552,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
LDFLAGS="$saved_LDFLAGS"])
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -70,3 +70,6 @@ index 75a7048045c..e683d3a7a5f 100644
|
||||
fi
|
||||
AC_SUBST([NO_PIE_FLAG])
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,14 +1,14 @@
|
||||
From fd642f8cd61849a9dc169588be5562ceda96a889 Mon Sep 17 00:00:00 2001
|
||||
From ecad19db42776c536bd4f6033ec1891ffae03720 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH] ada: fix shared linking
|
||||
Subject: [PATCH 14/33] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
|
||||
index a7574efb472..0ad0d66463c 100644
|
||||
index f2126441208..22cfa9c641f 100644
|
||||
--- a/gcc/ada/link.c
|
||||
+++ b/gcc/ada/link.c
|
||||
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|
||||
@@ -37,3 +37,6 @@ index a7574efb472..0ad0d66463c 100644
|
||||
int __gnat_link_max = 8192;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,17 +1,17 @@
|
||||
From a547632f5c7caec4a164e8d5e5b568fb7a461365 Mon Sep 17 00:00:00 2001
|
||||
From 8500b4cdd039c16a02a8acabd124b92865871979 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 593495e1650..b96f60e33e2 100644
|
||||
index 06a9398e172..6ff2b3f9925 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
|
||||
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
|
||||
# built for the build system to override those in BASE_FLAGS_TO_PASS.
|
||||
EXTRA_BUILD_FLAGS = \
|
||||
CFLAGS="$(CFLAGS_FOR_BUILD)" \
|
||||
@@ -19,3 +19,6 @@ index 593495e1650..b96f60e33e2 100644
|
||||
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
|
||||
|
||||
# This is the list of directories to built for the host system.
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 686e85d8a05f9f9e6c983afb13f937bd88fe84dd Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:18:32 +0000
|
||||
Subject: [PATCH] dlang: use libucontext on mips64
|
||||
|
||||
---
|
||||
libphobos/configure.tgt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
|
||||
index 0063dd23249..c5e782a1238 100644
|
||||
--- a/libphobos/configure.tgt
|
||||
+++ b/libphobos/configure.tgt
|
||||
@@ -38,6 +38,7 @@ case "${target}" in
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
|
||||
;;
|
||||
power*-*-freebsd*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+7
-4
@@ -1,17 +1,17 @@
|
||||
From 5bd37f8ee93a0fe1a3f841f48ed6626e7e0aa19d Mon Sep 17 00:00:00 2001
|
||||
From e893ad827215a7c090a835e20a81559f4044fb47 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH] add fortify-headers paths
|
||||
Subject: [PATCH 16/33] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index 74f70793d90..61b07f319f6 100644
|
||||
index e3aca79cccc..b3537b8fbeb 100644
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -172,6 +172,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
@@ -20,3 +20,6 @@ index 74f70793d90..61b07f319f6 100644
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+10
-7
@@ -1,11 +1,11 @@
|
||||
From d2577dc78a1f159e5c41fd0b53e73fa0e264cb52 Mon Sep 17 00:00:00 2001
|
||||
From 064afc74f18f2a00771fc2600029a713b8708845 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
||||
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
it unconditionally, as otherwise we get link failures if some objects are
|
||||
-fstack-protector built and final link happens with -fno-stack-protector.
|
||||
Subject: [PATCH 17/33] Alpine musl package provides libssp_nonshared.a. We
|
||||
link to it unconditionally, as otherwise we get link failures if some objects
|
||||
are -fstack-protector built and final link happens with -fno-stack-protector.
|
||||
This seems to be the common case when bootstrapping gcc, the piepatches do
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
stack-protector flag usage.
|
||||
|
||||
---
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index cc99d0b7aa1..c60a75371f8 100644
|
||||
index b5a6f200635..6cbb726599b 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1004,8 +1004,7 @@ proper position among the other output files. */
|
||||
@@ -991,8 +991,7 @@ proper position among the other output files. */
|
||||
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
@@ -26,3 +26,6 @@ index cc99d0b7aa1..c60a75371f8 100644
|
||||
#else
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
"|fstack-protector-strong|fstack-protector-explicit" \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+10
-7
@@ -1,7 +1,7 @@
|
||||
From bbd5c529ef878c2d6096fd4949616714eb82683a Mon Sep 17 00:00:00 2001
|
||||
From 45a98ce1f1702424aba4271f7f7570e43a354101 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index c60a75371f8..735b2b1bba1 100644
|
||||
index 6cbb726599b..59390fd39d6 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -745,10 +745,10 @@ proper position among the other output files. */
|
||||
@@ -755,10 +755,10 @@ proper position among the other output files. */
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
|
||||
@@ -25,7 +25,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -784,10 +784,10 @@ proper position among the other output files. */
|
||||
@@ -794,10 +794,10 @@ proper position among the other output files. */
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -38,7 +38,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -805,10 +805,10 @@ proper position among the other output files. */
|
||||
@@ -815,10 +815,10 @@ proper position among the other output files. */
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -51,7 +51,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -824,10 +824,10 @@ proper position among the other output files. */
|
||||
@@ -834,10 +834,10 @@ proper position among the other output files. */
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -64,3 +64,6 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From 8fc8d6c26a2a45945182e211bc3ac2eae4d6a11b Mon Sep 17 00:00:00 2001
|
||||
From 6a2e902dc8abcfd44522b9224fd759d038db51f5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH] aarch64: disable multilib support
|
||||
Subject: [PATCH 19/33] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
@@ -9,7 +9,7 @@ multilib is unsupported on Alpine GCC
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
|
||||
index d0cd546002a..b63a77f4969 100644
|
||||
index 57bf4100fcd..172894b57ef 100644
|
||||
--- a/gcc/config/aarch64/t-aarch64-linux
|
||||
+++ b/gcc/config/aarch64/t-aarch64-linux
|
||||
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
|
||||
@@ -21,3 +21,6 @@ index d0cd546002a..b63a77f4969 100644
|
||||
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
|
||||
|
||||
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+5
-2
@@ -1,7 +1,7 @@
|
||||
From 65ad898df141261a1ccd891a99133ad8f9847133 Mon Sep 17 00:00:00 2001
|
||||
From 6e7c72ee05353a284d9c9809035e7ff488b4b8c1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH] s390x: disable multilib support
|
||||
Subject: [PATCH 20/33] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
@@ -20,3 +20,6 @@ index cc6ab367072..7f498ee1cdc 100644
|
||||
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
From 714ed6d9649bf9ed42e34fef9c41169921e63921 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Andreas Svee <me@lochnair.net>
|
||||
Date: Thu, 21 Dec 2017 03:14:33 +0100
|
||||
Subject: [PATCH] mips64: disable multilib support
|
||||
|
||||
multilib is not supported by Alpine GCC
|
||||
---
|
||||
gcc/config/mips/mips.h | 8 ++++----
|
||||
gcc/config/mips/t-linux64 | 6 +++---
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
|
||||
index 858bbba3a36..2d4f553e652 100644
|
||||
--- a/gcc/config/mips/mips.h
|
||||
+++ b/gcc/config/mips/mips.h
|
||||
@@ -3447,11 +3447,11 @@ struct GTY(()) machine_function {
|
||||
/* If we are *not* using multilibs and the default ABI is not ABI_32 we
|
||||
need to change these from /lib and /usr/lib. */
|
||||
#if MIPS_ABI_DEFAULT == ABI_N32
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib32/"
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#elif MIPS_ABI_DEFAULT == ABI_64
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib64/"
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#endif
|
||||
|
||||
/* Load store bonding is not supported by micromips and fix_24k. The
|
||||
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
|
||||
index 2fdd8e00407..406a3676289 100644
|
||||
--- a/gcc/config/mips/t-linux64
|
||||
+++ b/gcc/config/mips/t-linux64
|
||||
@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
|
||||
MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
|
||||
MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
|
||||
MULTILIB_OSDIRNAMES = \
|
||||
- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
|
||||
- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
|
||||
- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
|
||||
+ ../lib \
|
||||
+ ../lib32 \
|
||||
+ ../lib
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From 3263d8634da6d7e1edb1bfd88e1b2627ce0aa1be Mon Sep 17 00:00:00 2001
|
||||
From 44655aa3be8d5354fb82a42317a9ac6ac1b50164 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH] ppc64[le]: disable multilib support
|
||||
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
@@ -36,7 +36,7 @@ index 4e371255533..128c75c7d39 100644
|
||||
endif
|
||||
|
||||
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
|
||||
index 47e0efd5764..f89729af64f 100644
|
||||
index 01a94242308..b3a76379c03 100644
|
||||
--- a/gcc/config/rs6000/t-linux64
|
||||
+++ b/gcc/config/rs6000/t-linux64
|
||||
@@ -28,8 +28,8 @@
|
||||
@@ -76,3 +76,6 @@ index 2e63bdb9fc9..c6e1c5db65d 100644
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From bf63353ea679e0bbf2c2f17bb64c75ebd590c6e7 Mon Sep 17 00:00:00 2001
|
||||
From 5f79236c49bd0c2c36440f0ef83cea02d52fcaaf Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH] x86_64: disable multilib support
|
||||
Subject: [PATCH 22/33] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
@@ -9,7 +9,7 @@ multilib is not presently supported on Alpine GCC
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
|
||||
index 5526ad0e6cc..78866afab36 100644
|
||||
index 138956b0962..bc03dab874f 100644
|
||||
--- a/gcc/config/i386/t-linux64
|
||||
+++ b/gcc/config/i386/t-linux64
|
||||
@@ -33,6 +33,6 @@
|
||||
@@ -21,3 +21,6 @@ index 5526ad0e6cc..78866afab36 100644
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
From 2eed19787020ce52cf07b76a5d167c420ec42b61 Mon Sep 17 00:00:00 2001
|
||||
From 4605e64b3a076411f2f8134256c400eb58bcc1c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 3 Jan 2022 07:14:48 +0100
|
||||
Subject: [PATCH] riscv: disable multilib support
|
||||
Subject: [PATCH 23/33] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -43,10 +43,10 @@ library.
|
||||
2 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 3067ed6eac8..4c8c85e3285 100644
|
||||
index 16503482ec2..8d9881eadeb 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -71,9 +71,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -61,9 +61,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{static:-static}}"
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
@@ -69,3 +69,6 @@ index 216d2776a18..1a8a863853e 100644
|
||||
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
|
||||
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
|
||||
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+9
-6
@@ -1,7 +1,7 @@
|
||||
From 51a35c0fa0e793c6a2c64ae1449c0cfd681d8f8a Mon Sep 17 00:00:00 2001
|
||||
From a178cfeb975d79bb9b9fd877ab4c6e05d10b147e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH] always build libgcc_eh.a
|
||||
Subject: [PATCH 24/33] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
@@ -10,10 +10,10 @@ highly inspired by:
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
index 6c4dc79ab71..023cede18a7 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),)
|
||||
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
|
||||
all: libunwind.a
|
||||
endif
|
||||
|
||||
@@ -24,7 +24,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1160,10 +1161,6 @@ install-libunwind:
|
||||
@@ -1163,10 +1164,6 @@ install-libunwind:
|
||||
install-shared:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||
|
||||
@@ -35,7 +35,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes)
|
||||
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
|
||||
endif
|
||||
|
||||
@@ -46,3 +46,6 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
parts="$(INSTALL_PARTS)"; \
|
||||
for file in $$parts; do \
|
||||
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
From 64a1c5f57e278869f41c43ee56cc5defb3dd55c5 Mon Sep 17 00:00:00 2001
|
||||
From 5bc3deb9bc2679ad4f6f189a65e3643b550587a1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
2 files changed, 3 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
index 7c9e7ca4518..caafc4aa68f 100644
|
||||
index a5e645d334d..32165347071 100644
|
||||
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
@@ -403,12 +403,6 @@ package System.OS_Interface is
|
||||
@@ -38,7 +38,7 @@ index 7c9e7ca4518..caafc4aa68f 100644
|
||||
sched_priority : int; -- scheduling priority
|
||||
end record;
|
||||
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
index 4ff784f0ea7..b34a12802c6 100644
|
||||
index 821ceef30e4..ae95b58e01e 100644
|
||||
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -130,3 +130,6 @@ index 4ff784f0ea7..b34a12802c6 100644
|
||||
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
|
||||
|
||||
pragma Assert (Result in 0 | ENOMEM);
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+23
-20
@@ -1,7 +1,7 @@
|
||||
From 82addb1312f4f58a412a664228944009aa5cb569 Mon Sep 17 00:00:00 2001
|
||||
From e1e6dccc9124e0907c5ae174d20acb3bad87e633 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH] ada: musl support fixes
|
||||
Subject: [PATCH 26/33] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] ada: musl support fixes
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index aaf853e3a2a..e2dd3587ed5 100644
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1633,7 +1633,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1549,7 +1549,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,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2258,7 +2258,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2174,7 +2174,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 +32,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2289,7 +2289,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -41,7 +41,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<libgnarl/a-intnam__linux.ads \
|
||||
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
|
||||
@@ -2504,7 +2504,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2420,7 +2420,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) \
|
||||
@@ -50,7 +50,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2608,7 +2608,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2524,7 +2524,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) \
|
||||
@@ -58,9 +58,9 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 591d033fbca..a485cbf15b9 100644
|
||||
index 8522094164e..92b230a462b 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -75,7 +75,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3446,7 +3451,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -83,7 +83,7 @@ index 591d033fbca..a485cbf15b9 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
|
||||
@@ -3456,7 +3460,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -92,7 +92,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3469,33 +3473,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -134,7 +134,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3505,23 +3509,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -164,10 +164,10 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 2631be5ad3e..d442f4bd6cd 100644
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -321,13 +321,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
|
||||
/* Routines for interface to required CPU set primitives */
|
||||
|
||||
@@ -186,10 +186,10 @@ index 2631be5ad3e..d442f4bd6cd 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index 32d30a49c7e..d960e32e2d0 100644
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1132,7 +1132,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1127,7 +1127,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)
|
||||
@@ -198,7 +198,7 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1146,7 +1146,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -207,7 +207,7 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1195,8 +1195,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -218,3 +218,6 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+26
-33
@@ -1,7 +1,7 @@
|
||||
From 573a66e4146c9a65d895af9081a4d3d49cfc9e7a Mon Sep 17 00:00:00 2001
|
||||
From 9506e729f0e4f66f4018fbfc5340a568e8520264 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 16:07:26 +0000
|
||||
Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH 27/33] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
@@ -9,19 +9,19 @@ This fixes issues with RISC-V.
|
||||
Makefile.in | 1 +
|
||||
gcc/config.in | 6 ++++++
|
||||
gcc/config/gnu-user.h | 12 +++++++++++-
|
||||
gcc/configure | 32 ++++++++++++++++++++++++++++++--
|
||||
gcc/configure.ac | 22 +++++++++++++++++++++-
|
||||
gcc/configure | 31 ++++++++++++++++++++++++++++++-
|
||||
gcc/configure.ac | 21 +++++++++++++++++++++
|
||||
gcc/doc/install.texi | 8 ++++++++
|
||||
gcc/doc/tm.texi | 8 +++++++-
|
||||
gcc/doc/tm.texi.in | 8 +++++++-
|
||||
gcc/gcc.cc | 12 +++++++++++-
|
||||
9 files changed, 102 insertions(+), 7 deletions(-)
|
||||
9 files changed, 102 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b564ddbf792..a95c7407d16 100644
|
||||
index 6ff2b3f9925..394b105b271 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -232,6 +232,7 @@ HOST_EXPORTS = \
|
||||
@@ -235,6 +235,7 @@ HOST_EXPORTS = \
|
||||
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
|
||||
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
|
||||
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
|
||||
@@ -30,7 +30,7 @@ index b564ddbf792..a95c7407d16 100644
|
||||
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
|
||||
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index f0fbf123aa8..af84efc4f9e 100644
|
||||
index 0679fbbf4c6..ee81139b385 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -118,6 +118,12 @@
|
||||
@@ -47,7 +47,7 @@ index f0fbf123aa8..af84efc4f9e 100644
|
||||
format instead of DPD */
|
||||
#ifndef USED_FOR_TARGET
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 8433e56c3e1..0347f10da8b 100644
|
||||
index b26b17f2f2a..3f64ea46180 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -71,10 +71,10 @@ index 8433e56c3e1..0347f10da8b 100644
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
index e59cbee1767..787c35d4e25 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -981,6 +981,7 @@ with_changes_root_url
|
||||
@@ -984,6 +984,7 @@ with_changes_root_url
|
||||
enable_languages
|
||||
with_multilib_list
|
||||
with_multilib_generator
|
||||
@@ -82,7 +82,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
with_zstd
|
||||
with_zstd_include
|
||||
with_zstd_lib
|
||||
@@ -1710,6 +1711,9 @@ Optional Features:
|
||||
@@ -1713,6 +1714,9 @@ Optional Features:
|
||||
--disable-shared don't provide a shared libgcc
|
||||
--disable-gcov don't provide libgcov and related host tools
|
||||
--enable-languages=LIST specify which front-ends to build
|
||||
@@ -92,7 +92,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
--disable-rpath do not hardcode runtime library paths
|
||||
--enable-sjlj-exceptions
|
||||
arrange to use setjmp/longjmp exception handling
|
||||
@@ -8324,7 +8328,6 @@ else
|
||||
@@ -8329,7 +8333,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
# Check whether --with-multilib-generator was given.
|
||||
if test "${with_multilib_generator+set}" = set; then :
|
||||
withval=$with_multilib_generator; :
|
||||
@@ -8332,6 +8335,32 @@ else
|
||||
@@ -8337,6 +8340,32 @@ else
|
||||
with_multilib_generator=default
|
||||
fi
|
||||
|
||||
@@ -133,16 +133,11 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
@@ -34296,4 +34325,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
-
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index e683d3a7a5f..07c81c78336 100644
|
||||
index 57268319de1..56bcaa87620 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -1205,6 +1205,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
:,
|
||||
with_multilib_generator=default)
|
||||
|
||||
@@ -170,16 +165,11 @@ index e683d3a7a5f..07c81c78336 100644
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
@@ -7839,4 +7860,3 @@ done
|
||||
],
|
||||
[subdirs='$subdirs'])
|
||||
AC_OUTPUT
|
||||
-
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index 48408d842db..c90be0ee750 100644
|
||||
index 928fc6b6d4b..81a677014df 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2295,6 +2295,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
@@ -2374,6 +2374,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
environments. Enabled by default, and may be disabled using
|
||||
@option{--disable-canonical-system-headers}.
|
||||
|
||||
@@ -195,7 +185,7 @@ index 48408d842db..c90be0ee750 100644
|
||||
Tell GCC that when the GNU C Library (glibc) is used on the target it
|
||||
will be version @var{major}.@var{minor} or later. Normally this can
|
||||
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
|
||||
index c5006afc00d..56b62c69ae8 100644
|
||||
index a660e33739b..6183c407a2b 100644
|
||||
--- a/gcc/doc/tm.texi
|
||||
+++ b/gcc/doc/tm.texi
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
@@ -214,7 +204,7 @@ index c5006afc00d..56b62c69ae8 100644
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
|
||||
index f869ddd5e5b..57c93f24ac3 100644
|
||||
index f7ab5d48a63..281540aba68 100644
|
||||
--- a/gcc/doc/tm.texi.in
|
||||
+++ b/gcc/doc/tm.texi.in
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
@@ -233,10 +223,10 @@ index f869ddd5e5b..57c93f24ac3 100644
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 735b2b1bba1..f10f3c91aa7 100644
|
||||
index 59390fd39d6..dae1dd4cf79 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -987,13 +987,23 @@ proper position among the other output files. */
|
||||
@@ -974,13 +974,23 @@ proper position among the other output files. */
|
||||
# define ASM_DEBUG_OPTION_SPEC ""
|
||||
#endif
|
||||
|
||||
@@ -261,3 +251,6 @@ index 735b2b1bba1..f10f3c91aa7 100644
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEFAULT_SSP
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,8 +1,8 @@
|
||||
From 4baaeb9661fa4015d9701e3616ce1ad4e8a07fd8 Mon Sep 17 00:00:00 2001
|
||||
From 966da83d0d75482a1489804593ae61f3f8e3b385 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 29 Aug 2021 09:45:27 +0200
|
||||
Subject: [PATCH] configure: fix detection of atomic builtins in libatomic
|
||||
configure script
|
||||
Date: Sun, 29 Aug 2021 12:23:34 +0200
|
||||
Subject: [PATCH 28/33] configure: fix detection of atomic builtins in
|
||||
libatomic configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
default) causes the libatomic configure script to incorrectly detect
|
||||
@@ -22,7 +22,7 @@ See:
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
|
||||
index 33f8c91ce77..3999db2cf8a 100644
|
||||
index a92ae9e8309..90b579ca4d8 100644
|
||||
--- a/libatomic/configure.tgt
|
||||
+++ b/libatomic/configure.tgt
|
||||
@@ -30,6 +30,26 @@
|
||||
@@ -52,3 +52,6 @@ index 33f8c91ce77..3999db2cf8a 100644
|
||||
case "${target_cpu}" in
|
||||
alpha*)
|
||||
# fenv.c needs this option to generate inexact exceptions.
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,15 +1,15 @@
|
||||
From 20c84de53efcb86993f1a1909e65a97240d6123e Mon Sep 17 00:00:00 2001
|
||||
From e74f4b3a10d96f06b15df9d9b61d5b10a84ec084 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Thu, 30 Jun 2022 17:08:36 +0000
|
||||
Subject: [PATCH] libstdc++: do not throw exceptions for non-C locales on musl
|
||||
targets
|
||||
Date: Thu, 30 Jun 2022 16:44:51 +0000
|
||||
Subject: [PATCH 29/33] libstdc++: do not throw exceptions for non-C locales on
|
||||
musl targets
|
||||
|
||||
---
|
||||
libstdc++-v3/config/locale/generic/c_locale.cc | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
index 1e4db8d4415..9b79bc3c5dd 100644
|
||||
index 8849d78fdfa..aff467f98fe 100644
|
||||
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
@@ -242,9 +242,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
@@ -22,3 +22,6 @@ index 1e4db8d4415..9b79bc3c5dd 100644
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+9
-5
@@ -1,7 +1,8 @@
|
||||
From b6554d1207d0f5771c2f5d11316b61787e4dd705 Mon Sep 17 00:00:00 2001
|
||||
From bdc2699f0284e59842e5d3a39fc426550b4ba0e8 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 16:31:09 +0000
|
||||
Subject: [PATCH] gdc: unconditionally link libgphobos against libucontext
|
||||
Date: Mon, 17 Jan 2022 03:49:21 +0000
|
||||
Subject: [PATCH 30/33] gdc: unconditionally link libgphobos against
|
||||
libucontext
|
||||
|
||||
ref: alpine/aports#13422
|
||||
---
|
||||
@@ -9,10 +10,10 @@ ref: alpine/aports#13422
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index a95c7407d16..ea942d60387 100644
|
||||
index 394b105b271..bc4a77fc300 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -53287,7 +53287,7 @@ configure-target-libphobos:
|
||||
@@ -52809,7 +52809,7 @@ configure-target-libphobos:
|
||||
esac; \
|
||||
module_srcdir=libphobos; \
|
||||
rm -f no-such-file || : ; \
|
||||
@@ -21,3 +22,6 @@ index a95c7407d16..ea942d60387 100644
|
||||
$$s/$$module_srcdir/configure \
|
||||
--srcdir=$${topdir}/$$module_srcdir \
|
||||
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,7 +1,7 @@
|
||||
From 39f5c9a850917a3c19630c0115ef0d5b0f151c72 Mon Sep 17 00:00:00 2001
|
||||
From 82780d18bfcb7dabc215d4b89b1187cb253e15f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sat, 16 Jul 2022 13:26:49 +0200
|
||||
Subject: [PATCH] druntime: link against libucontext on all platforms
|
||||
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
||||
Subject: [PATCH 31/33] druntime: link against libucontext on all platforms
|
||||
|
||||
On musl-based Linux distributions, swapcontext etc. are not provided by
|
||||
musl but instead by libucontext. Hence, we _always_ need to link against
|
||||
@@ -12,10 +12,10 @@ an external library for these functions.
|
||||
2 files changed, 16 deletions(-)
|
||||
|
||||
diff --git a/libphobos/configure b/libphobos/configure
|
||||
index 9da06f087d0..0db0acfb9c2 100755
|
||||
index 925c53c5f5e..60c2a0c11c6 100755
|
||||
--- a/libphobos/configure
|
||||
+++ b/libphobos/configure
|
||||
@@ -15192,14 +15192,6 @@ fi
|
||||
@@ -15216,14 +15216,6 @@ fi
|
||||
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
|
||||
# "yes" for targets that have 'version = AsmExternal'.
|
||||
druntime_fiber_asm_external=no
|
||||
@@ -49,3 +49,6 @@ index 45a56f6f76a..fef6e890b1e 100644
|
||||
if test "$druntime_fiber_asm_external" = no; then
|
||||
AC_SEARCH_LIBS([swapcontext], [c ucontext], [],
|
||||
AC_MSG_ERROR([swapcontext required but not found]))
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,14 +1,14 @@
|
||||
From 4b28b8356c7ecf9375a2c07ac6be226a5693f8d2 Mon Sep 17 00:00:00 2001
|
||||
From 32fc6be0b339983e31f6285dbc565b906ec983d4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Tue, 19 Jul 2022 01:05:11 +0200
|
||||
Subject: [PATCH] libgnat: time_t is always 64-bit on musl libc
|
||||
Date: Tue, 19 Jul 2022 14:54:07 +0200
|
||||
Subject: [PATCH 32/33] libgnat: time_t is always 64-bit on musl libc
|
||||
|
||||
---
|
||||
gcc/ada/libgnat/s-parame.ads | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads
|
||||
index 4b8111402ba..b670e78c53b 100644
|
||||
index 3d6e345a1ba..cfe0b4d3ca6 100644
|
||||
--- a/gcc/ada/libgnat/s-parame.ads
|
||||
+++ b/gcc/ada/libgnat/s-parame.ads
|
||||
@@ -102,7 +102,7 @@ package System.Parameters is
|
||||
@@ -20,3 +20,6 @@ index 4b8111402ba..b670e78c53b 100644
|
||||
-- Number of bits in type time_t
|
||||
|
||||
----------------------------------------------
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
From ecc2a2e70e44fa76a75b12d0893bc1702b72a1b4 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Mon, 19 Dec 2022 10:37:06 -0800
|
||||
Subject: [PATCH] libgo: check for makecontext in -lucontext
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Patch from Sören Tempel.
|
||||
|
||||
Change-Id: I74b4052cc7aca19224afd6d9a2739c3fae46b722
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/458396
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/configure | 57 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
libgo/configure.ac | 3 +++
|
||||
2 files changed, 60 insertions(+)
|
||||
|
||||
diff --git a/libgo/configure b/libgo/configure
|
||||
index 460fdad7..a607dbff 100755
|
||||
--- a/libgo/configure
|
||||
+++ b/libgo/configure
|
||||
@@ -14818,6 +14818,63 @@ fi
|
||||
|
||||
|
||||
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing makecontext" >&5
|
||||
+$as_echo_n "checking for library containing makecontext... " >&6; }
|
||||
+if ${ac_cv_search_makecontext+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_func_search_save_LIBS=$LIBS
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char makecontext ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return makecontext ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+for ac_lib in '' ucontext; do
|
||||
+ if test -z "$ac_lib"; then
|
||||
+ ac_res="none required"
|
||||
+ else
|
||||
+ ac_res=-l$ac_lib
|
||||
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
+ fi
|
||||
+ if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_search_makecontext=$ac_res
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext
|
||||
+ if ${ac_cv_search_makecontext+:} false; then :
|
||||
+ break
|
||||
+fi
|
||||
+done
|
||||
+if ${ac_cv_search_makecontext+:} false; then :
|
||||
+
|
||||
+else
|
||||
+ ac_cv_search_makecontext=no
|
||||
+fi
|
||||
+rm conftest.$ac_ext
|
||||
+LIBS=$ac_func_search_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_makecontext" >&5
|
||||
+$as_echo "$ac_cv_search_makecontext" >&6; }
|
||||
+ac_res=$ac_cv_search_makecontext
|
||||
+if test "$ac_res" != no; then :
|
||||
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
|
||||
$as_echo_n "checking for library containing sched_yield... " >&6; }
|
||||
if ${ac_cv_search_sched_yield+:} false; then :
|
||||
diff --git a/libgo/configure.ac b/libgo/configure.ac
|
||||
index 09554a37..a59aa091 100644
|
||||
--- a/libgo/configure.ac
|
||||
+++ b/libgo/configure.ac
|
||||
@@ -570,6 +570,9 @@ PTHREAD_LIBS=
|
||||
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread)
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
|
||||
+dnl Test if -lucontext is required for makecontext.
|
||||
+AC_SEARCH_LIBS([makecontext], [ucontext])
|
||||
+
|
||||
dnl Test if -lrt is required for sched_yield or nanosleep or clock_gettime.
|
||||
AC_SEARCH_LIBS([sched_yield], [rt])
|
||||
AC_SEARCH_LIBS([nanosleep], [rt])
|
||||
@@ -0,0 +1,30 @@
|
||||
From b5e9f810a8a5963104dd1897c3276f60786f9edb Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 29 May 2023 15:33:11 +0000
|
||||
Subject: [PATCH 33/33] libphobos: do not use LFS64 symbols
|
||||
|
||||
musl does not have these since 1.2.4, we can't use the compat interfaces.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
index 0d3d517d69a..323aa0af72d 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
@@ -293,11 +293,7 @@ else version (CRuntime_Bionic)
|
||||
}
|
||||
else version (CRuntime_Musl)
|
||||
{
|
||||
- static if (__USE_LARGEFILE64) void* mmap64(void*, size_t, int, int, int, off_t);
|
||||
- static if (__USE_FILE_OFFSET64)
|
||||
- alias mmap = mmap64;
|
||||
- else
|
||||
- void* mmap(void*, size_t, int, int, int, off_t);
|
||||
+ void* mmap(void*, size_t, int, int, int, off_t);
|
||||
int munmap(void*, size_t);
|
||||
}
|
||||
else version (CRuntime_UClibc)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
From b3840bdcc0eee2a4d099a9af52199944ade7acb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Tue, 29 Nov 2022 17:28:44 -0800
|
||||
Subject: [PATCH] syscall, runtime: always call XSI strerror_r
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This does the right thing for either glibc or musl on GNU/Linux.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: If2969e131f0fae456d58b35d839d8abe191fcc59
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
|
||||
---
|
||||
libgo/Makefile.am | 1 +
|
||||
libgo/Makefile.in | 6 +++++-
|
||||
libgo/go/syscall/errstr.go | 22 ++++++++-----------
|
||||
libgo/go/syscall/errstr_glibc.go | 33 ----------------------------
|
||||
libgo/runtime/go-strerror.c | 37 ++++++++++++++++++++++++++++++++
|
||||
5 files changed, 52 insertions(+), 47 deletions(-)
|
||||
delete mode 100644 libgo/go/syscall/errstr_glibc.go
|
||||
create mode 100644 libgo/runtime/go-strerror.c
|
||||
|
||||
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
|
||||
index e0a1eec5..df568743 100644
|
||||
--- a/libgo/Makefile.am
|
||||
+++ b/libgo/Makefile.am
|
||||
@@ -465,6 +465,7 @@ runtime_files = \
|
||||
runtime/go-nanotime.c \
|
||||
runtime/go-now.c \
|
||||
runtime/go-nosys.c \
|
||||
+ runtime/go-strerror.c \
|
||||
runtime/go-reflect-call.c \
|
||||
runtime/go-setenv.c \
|
||||
runtime/go-signal.c \
|
||||
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
|
||||
index 7bef5df9..f2f3f0fc 100644
|
||||
--- a/libgo/Makefile.in
|
||||
+++ b/libgo/Makefile.in
|
||||
@@ -247,7 +247,7 @@ am__objects_4 = runtime/aeshash.lo runtime/go-assert.lo \
|
||||
runtime/go-fieldtrack.lo runtime/go-matherr.lo \
|
||||
runtime/go-memclr.lo runtime/go-memmove.lo \
|
||||
runtime/go-memequal.lo runtime/go-nanotime.lo \
|
||||
- runtime/go-now.lo runtime/go-nosys.lo \
|
||||
+ runtime/go-now.lo runtime/go-nosys.lo runtime/go-strerror.lo \
|
||||
runtime/go-reflect-call.lo runtime/go-setenv.lo \
|
||||
runtime/go-signal.lo runtime/go-unsafe-pointer.lo \
|
||||
runtime/go-unsetenv.lo runtime/go-unwind.lo \
|
||||
@@ -917,6 +917,7 @@ runtime_files = \
|
||||
runtime/go-nanotime.c \
|
||||
runtime/go-now.c \
|
||||
runtime/go-nosys.c \
|
||||
+ runtime/go-strerror.c \
|
||||
runtime/go-reflect-call.c \
|
||||
runtime/go-setenv.c \
|
||||
runtime/go-signal.c \
|
||||
@@ -1390,6 +1391,8 @@ runtime/go-now.lo: runtime/$(am__dirstamp) \
|
||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
runtime/go-nosys.lo: runtime/$(am__dirstamp) \
|
||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
+runtime/go-strerror.lo: runtime/$(am__dirstamp) \
|
||||
+ runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
runtime/go-reflect-call.lo: runtime/$(am__dirstamp) \
|
||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
runtime/go-setenv.lo: runtime/$(am__dirstamp) \
|
||||
@@ -1457,6 +1460,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-reflect-call.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-strerror.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
|
||||
diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
|
||||
index 6c2441d3..9f688e2a 100644
|
||||
--- a/libgo/go/syscall/errstr.go
|
||||
+++ b/libgo/go/syscall/errstr.go
|
||||
@@ -4,23 +4,19 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-// +build !hurd
|
||||
-// +build !linux
|
||||
-
|
||||
package syscall
|
||||
|
||||
-//sysnb strerror_r(errnum int, buf []byte) (err Errno)
|
||||
-//strerror_r(errnum _C_int, buf *byte, buflen Size_t) _C_int
|
||||
+import "internal/bytealg"
|
||||
+
|
||||
+//extern go_strerror
|
||||
+func go_strerror(_C_int, *byte, Size_t) _C_int
|
||||
|
||||
func Errstr(errnum int) string {
|
||||
- for len := 128; ; len *= 2 {
|
||||
- b := make([]byte, len)
|
||||
- errno := strerror_r(errnum, b)
|
||||
+ for size := 128; ; size *= 2 {
|
||||
+ b := make([]byte, size)
|
||||
+ errno := go_strerror(_C_int(errnum), &b[0], Size_t(len(b)))
|
||||
if errno == 0 {
|
||||
- i := 0
|
||||
- for b[i] != 0 {
|
||||
- i++
|
||||
- }
|
||||
+ i := bytealg.IndexByte(b, 0)
|
||||
// Lowercase first letter: Bad -> bad, but
|
||||
// STREAM -> STREAM.
|
||||
if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
|
||||
@@ -29,7 +25,7 @@ func Errstr(errnum int) string {
|
||||
return string(b[:i])
|
||||
}
|
||||
if errno != ERANGE {
|
||||
- return "errstr failure"
|
||||
+ return "strerror_r failure"
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go
|
||||
deleted file mode 100644
|
||||
index 5b19e6f2..00000000
|
||||
--- a/libgo/go/syscall/errstr_glibc.go
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
|
||||
-
|
||||
-// Copyright 2010 The Go Authors. All rights reserved.
|
||||
-// Use of this source code is governed by a BSD-style
|
||||
-// license that can be found in the LICENSE file.
|
||||
-
|
||||
-// We use this rather than errstr.go because on GNU/Linux sterror_r
|
||||
-// returns a pointer to the error message, and may not use buf at all.
|
||||
-
|
||||
-// +build hurd linux
|
||||
-
|
||||
-package syscall
|
||||
-
|
||||
-import "unsafe"
|
||||
-
|
||||
-//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
|
||||
-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
|
||||
-
|
||||
-func Errstr(errnum int) string {
|
||||
- a := make([]byte, 128)
|
||||
- p := strerror_r(errnum, a)
|
||||
- b := (*[1000]byte)(unsafe.Pointer(p))
|
||||
- i := 0
|
||||
- for b[i] != 0 {
|
||||
- i++
|
||||
- }
|
||||
- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
||||
- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
|
||||
- c := b[0] + 'a' - 'A'
|
||||
- return string(c) + string(b[1:i])
|
||||
- }
|
||||
- return string(b[:i])
|
||||
-}
|
||||
diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c
|
||||
new file mode 100644
|
||||
index 00000000..13d1d91d
|
||||
--- /dev/null
|
||||
+++ b/libgo/runtime/go-strerror.c
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* go-strerror.c -- wrapper around XSI-compliant strerror_r.
|
||||
+
|
||||
+ Copyright 2022 The Go Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style
|
||||
+ license that can be found in the LICENSE file. */
|
||||
+
|
||||
+/* There are two version of strerror_r on GNU/Linux: a GNU-specific
|
||||
+ and an XSI-compliant version. The former version is only available
|
||||
+ on glibc. Since glibc 2.13, the XSI-compliant version is also
|
||||
+ provided by glibc if _GNU_SOURCE is not defined. Since the
|
||||
+ entirety of gofrontend is compiled with _GNU_SOURCE, this file
|
||||
+ exists to selectively undefine it and provides an alias to the
|
||||
+ XSI-compliant version of strerror_r(3). */
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+
|
||||
+/* Force selection of XSI-compliant strerror_r by glibc. */
|
||||
+#undef XOPEN_SOURCE
|
||||
+#define XOPEN_SOURCE 600
|
||||
+#undef _POSIX_C_SOURCE
|
||||
+#define _POSIX_C_SOURCE 200112L
|
||||
+#undef _GNU_SOURCE
|
||||
+
|
||||
+#endif /* __linux__ */
|
||||
+
|
||||
+#include <string.h>
|
||||
+
|
||||
+#ifndef HAVE_STRERROR_R
|
||||
+// Provided by go-nosys.c if not provided by libc itself.
|
||||
+extern int strerror_r (int, char *, size_t);
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+go_strerror (int errnum, char *buf, size_t buflen)
|
||||
+{
|
||||
+ return strerror_r (errnum, buf, buflen);
|
||||
+}
|
||||
@@ -1,199 +0,0 @@
|
||||
From 3b9243b891cc06373639a23ed5717b0d1c2d8ea6 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Tue, 14 Jun 2022 06:13:43 -0700
|
||||
Subject: [PATCH] libgo: permit loff_t and off_t to be macros
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
They are macros in musl libc, rather than typedefs, and -fgo-dump-spec
|
||||
doesn't handle that case.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: Ic9a608fd964a6f78e754aa8e3100aff06ab3dade
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
|
||||
libgo: #include <sys/types.h> when checking for loff_t
|
||||
|
||||
Fixes https://gcc.gnu.org/PR106033
|
||||
Fixes golang/go#53469
|
||||
|
||||
Change-Id: I060021b7bb9334949b567442448abb6822fd6d35
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413214
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/config.h.in | 3 +++
|
||||
libgo/configure | 12 ++++++++++--
|
||||
libgo/configure.ac | 11 +++++++++--
|
||||
libgo/go/syscall/libcall_linux.go | 17 +++++++++--------
|
||||
libgo/mksysinfo.sh | 6 +-----
|
||||
libgo/sysinfo.c | 15 ++++++++++++++-
|
||||
6 files changed, 46 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/libgo/config.h.in b/libgo/config.h.in
|
||||
index 25b8ab8f9ee..2c3c7469675 100644
|
||||
--- a/libgo/config.h.in
|
||||
+++ b/libgo/config.h.in
|
||||
@@ -70,6 +70,9 @@
|
||||
/* Define to 1 if you have the `fchownat' function. */
|
||||
#undef HAVE_FCHOWNAT
|
||||
|
||||
+/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
+#undef HAVE_FCNTL_H
|
||||
+
|
||||
/* Define to 1 if you have the `futimesat' function. */
|
||||
#undef HAVE_FUTIMESAT
|
||||
|
||||
diff --git a/libgo/configure b/libgo/configure
|
||||
index ffe17c9be55..61a49947eb9 100755
|
||||
--- a/libgo/configure
|
||||
+++ b/libgo/configure
|
||||
@@ -15249,7 +15249,7 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
-for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
|
||||
+for ac_header in fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
@@ -15546,7 +15546,14 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
|
||||
+
|
||||
+CFLAGS_hold="$CFLAGS"
|
||||
+CFLAGS="$OSCFLAGS $CFLAGS"
|
||||
+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+
|
||||
+"
|
||||
if test "x$ac_cv_type_loff_t" = xyes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15556,6 +15563,7 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
+CFLAGS="$CFLAGS_hold"
|
||||
|
||||
LIBS_hold="$LIBS"
|
||||
LIBS="$LIBS -lm"
|
||||
diff --git a/libgo/configure.ac b/libgo/configure.ac
|
||||
index 7e2b98ba67c..274fcfc35c7 100644
|
||||
--- a/libgo/configure.ac
|
||||
+++ b/libgo/configure.ac
|
||||
@@ -579,7 +579,7 @@ AC_C_BIGENDIAN
|
||||
|
||||
GCC_CHECK_UNWIND_GETIPINFO
|
||||
|
||||
-AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h)
|
||||
+AC_CHECK_HEADERS(fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h)
|
||||
|
||||
AC_CHECK_HEADERS([netinet/icmp6.h], [], [],
|
||||
[#include <netinet/in.h>
|
||||
@@ -601,7 +601,14 @@ AC_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat open64 openat pipe2 removexattr renameat setxattr sync_file_range splice syscall tee unlinkat unshare utimensat)
|
||||
AC_TYPE_OFF_T
|
||||
-AC_CHECK_TYPES([loff_t])
|
||||
+
|
||||
+CFLAGS_hold="$CFLAGS"
|
||||
+CFLAGS="$OSCFLAGS $CFLAGS"
|
||||
+AC_CHECK_TYPES([loff_t], [], [], [[
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+]])
|
||||
+CFLAGS="$CFLAGS_hold"
|
||||
|
||||
LIBS_hold="$LIBS"
|
||||
LIBS="$LIBS -lm"
|
||||
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
|
||||
index 96974bd3269..65eb1a745f7 100644
|
||||
--- a/libgo/go/syscall/libcall_linux.go
|
||||
+++ b/libgo/go/syscall/libcall_linux.go
|
||||
@@ -209,19 +209,20 @@ func Gettid() (tid int) {
|
||||
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
|
||||
//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
|
||||
|
||||
-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
|
||||
-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
|
||||
+//sys splice(rfd int, roff *_libgo_loff_t_type, wfd int, woff *_libgo_loff_t_type, len int, flags int) (n int64, err error)
|
||||
+//splice(rfd _C_int, roff *_libgo_loff_t_type, wfd _C_int, woff *_libgo_loff_t_type, len Size_t, flags _C_uint) Ssize_t
|
||||
+
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
|
||||
- var lroff _loff_t
|
||||
- var plroff *_loff_t
|
||||
+ var lroff _libgo_loff_t_type
|
||||
+ var plroff *_libgo_loff_t_type
|
||||
if roff != nil {
|
||||
- lroff = _loff_t(*roff)
|
||||
+ lroff = _libgo_loff_t_type(*roff)
|
||||
plroff = &lroff
|
||||
}
|
||||
- var lwoff _loff_t
|
||||
- var plwoff *_loff_t
|
||||
+ var lwoff _libgo_loff_t_type
|
||||
+ var plwoff *_libgo_loff_t_type
|
||||
if woff != nil {
|
||||
- lwoff = _loff_t(*woff)
|
||||
+ lwoff = _libgo_loff_t_type(*woff)
|
||||
plwoff = &lwoff
|
||||
}
|
||||
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index 0c52ea5d71a..5aa309155c3 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -403,11 +403,7 @@ fi
|
||||
# Some basic types.
|
||||
echo 'type Size_t _size_t' >> ${OUT}
|
||||
echo "type Ssize_t _ssize_t" >> ${OUT}
|
||||
-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
|
||||
- echo "type Offset_t _off64_t" >> ${OUT}
|
||||
-else
|
||||
- echo "type Offset_t _off_t" >> ${OUT}
|
||||
-fi
|
||||
+echo "type Offset_t _libgo_off_t_type" >> ${OUT}
|
||||
echo "type Mode_t _mode_t" >> ${OUT}
|
||||
echo "type Pid_t _pid_t" >> ${OUT}
|
||||
echo "type Uid_t _uid_t" >> ${OUT}
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 336a5983750..fc0210992fa 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -354,6 +354,18 @@ enum {
|
||||
};
|
||||
#endif
|
||||
|
||||
+#if defined(HAVE_LOFF_T)
|
||||
+// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
|
||||
+// see a typedef.
|
||||
+typedef loff_t libgo_loff_t_type;
|
||||
+#endif
|
||||
+
|
||||
+#if defined(HAVE_OFF64_T)
|
||||
+typedef off64_t libgo_off_t_type;
|
||||
+#else
|
||||
+typedef off_t libgo_off_t_type;
|
||||
+#endif
|
||||
+
|
||||
// The following section introduces explicit references to types and
|
||||
// constants of interest to support bootstrapping libgo using a
|
||||
// compiler that doesn't support -fdump-go-spec (e.g., clang), via
|
||||
@@ -534,7 +546,8 @@ SREF(timex);
|
||||
// From sys/types.h
|
||||
TREF(pid_t);
|
||||
TREF(off_t);
|
||||
-TREF(loff_t);
|
||||
+TREF(libgo_loff_t_type);
|
||||
+TREF(libgo_off_t_type);
|
||||
TREF(size_t);
|
||||
TREF(ssize_t);
|
||||
TREF(mode_t);
|
||||
@@ -1,59 +0,0 @@
|
||||
From 5e658f4659c551330ea68f5667e4f951b218f32d Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Wed, 26 Oct 2022 17:23:42 -0700
|
||||
Subject: [PATCH] runtime: use _libgo_off_t_type when calling C mmap
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The last argument to the C mmap function is type off_t, not uintptr.
|
||||
On some 32-bit systems, off_t is larger than uintptr.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: Ib6f9d5bcd4734f99a72889e2282b97ec3c8fbd34
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/445735
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/go/runtime/mem_gccgo.go | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
|
||||
index fa3389d8..1e84f4f5 100644
|
||||
--- a/libgo/go/runtime/mem_gccgo.go
|
||||
+++ b/libgo/go/runtime/mem_gccgo.go
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
//go:linkname sysFree
|
||||
|
||||
//extern mmap
|
||||
-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
|
||||
+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off _libgo_off_t_type) unsafe.Pointer
|
||||
|
||||
//extern munmap
|
||||
func munmap(addr unsafe.Pointer, length uintptr) int32
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
}
|
||||
|
||||
func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
|
||||
- p := sysMmap(addr, n, prot, flags, fd, off)
|
||||
+ p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off))
|
||||
if uintptr(p) == _MAP_FAILED {
|
||||
return nil, errno()
|
||||
}
|
||||
@@ -47,6 +47,7 @@ func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (u
|
||||
|
||||
// Don't split the stack as this method may be invoked without a valid G, which
|
||||
// prevents us from allocating more stack.
|
||||
+//
|
||||
//go:nosplit
|
||||
func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer {
|
||||
p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, mmapFD, 0)
|
||||
@@ -165,6 +166,7 @@ func sysHugePage(v unsafe.Pointer, n uintptr) {
|
||||
|
||||
// Don't split the stack as this function may be invoked without a valid G,
|
||||
// which prevents us from allocating more stack.
|
||||
+//
|
||||
//go:nosplit
|
||||
func sysFree(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) {
|
||||
sysStat.add(-int64(n))
|
||||
@@ -1,71 +0,0 @@
|
||||
From c86b726c048eddc1be320c0bf64a897658bee13d Mon Sep 17 00:00:00 2001
|
||||
From: Uros Bizjak <ubizjak@gmail.com>
|
||||
Date: Wed, 18 May 2022 20:03:26 +0200
|
||||
Subject: [PATCH] x86: Fix -fsplit-stack feature detection via
|
||||
TARGET_CAN_SPLIT_STACK
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since commit c163647ffbc9a20c8feb6e079dbecccfe016c82e -fsplit-stack
|
||||
is only supported on glibc targets. However, this original commit
|
||||
required some fixups. As part of the fixup, the changes to the
|
||||
gnu-user-common.h and gnu.h were partially reverted in commit
|
||||
60953a23d57b13a672f751bec0c6eefc059eb1ab thus causing TARGET_CAN_SPLIT_STACK
|
||||
to be defined for non-glibc targets even though -fsplit-stack is
|
||||
actually not supported and attempting to use it causes a runtime error.
|
||||
|
||||
This causes gcc internal code, such as ./gcc/go/gospec.c to not
|
||||
correctly detect that -fsplit-stack is not supported and thus causes
|
||||
gccgo to fail compilation on non-glibc targets.
|
||||
|
||||
This commit ensures that TARGET_CAN_SPLIT_STACK is only set if the
|
||||
default libc is glibc. It is presently unclear to me if there is a
|
||||
better way to detect glibc at pre-processor time.
|
||||
|
||||
The proposed changes have been tested on x86 and x86_64 Alpine Linux
|
||||
(which uses musl libc) and fix compilation of gccgo for this target.
|
||||
|
||||
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* config/i386/gnu-user-common.h (defined): Only define
|
||||
TARGET_CAN_SPLIT_STACK for glibc targets.
|
||||
* config/i386/gnu.h (defined): Ditto.
|
||||
---
|
||||
gcc/config/i386/gnu-user-common.h | 5 +++--
|
||||
gcc/config/i386/gnu.h | 5 +++--
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
|
||||
index 23b54c5be52..cab9be2bfb7 100644
|
||||
--- a/gcc/config/i386/gnu-user-common.h
|
||||
+++ b/gcc/config/i386/gnu-user-common.h
|
||||
@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define STACK_CHECK_STATIC_BUILTIN 1
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives. Also
|
||||
+ we only support -fsplit-stack on glibc targets. */
|
||||
+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
|
||||
index 401e60c9a02..fb8d69a97d8 100644
|
||||
--- a/gcc/config/i386/gnu.h
|
||||
+++ b/gcc/config/i386/gnu.h
|
||||
@@ -41,8 +41,9 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define TARGET_THREAD_SSP_OFFSET 0x14
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives. Also
|
||||
+ we only support -fsplit-stack on glibc targets. */
|
||||
+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
/* We steal the last transactional memory word. */
|
||||
@@ -1,41 +0,0 @@
|
||||
From 548720bca6bff21ebc9aba22249d9ce45bbd90c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Wed, 29 Jun 2022 15:32:04 -0700
|
||||
Subject: [PATCH] libgo: handle stat st_atim32 field and SYS_SECCOMP
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Patches for musl support, from Sören Tempel.
|
||||
|
||||
Fixes https://gcc.gnu.org/PR105225
|
||||
|
||||
Change-Id: If396877d4a4c7d27962226d7a6e3bb91b1344413
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
---
|
||||
libgo/mksysinfo.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index 5aa30915..ea1fa17d 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -127,6 +127,7 @@ fi
|
||||
|
||||
# The syscall numbers. We force the names to upper case.
|
||||
grep '^const _SYS_' gen-sysinfo.go | \
|
||||
+ grep -v '^const _SYS_SECCOMP = ' | \
|
||||
sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
|
||||
while read sys; do
|
||||
sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
@@ -506,7 +507,7 @@ fi
|
||||
|
||||
# For historical reasons Go uses the suffix "timespec" instead of "tim" for
|
||||
# stat_t's time fields on NetBSD.
|
||||
-st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/'
|
||||
+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g'
|
||||
if test "${GOOS}" = "netbsd"; then
|
||||
st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e s/st_ctim/Ctimespec/'
|
||||
fi
|
||||
@@ -1,108 +0,0 @@
|
||||
From 8f1a91aeff400d572857895b7f5e863ec5a4d93e Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Mon, 26 Sep 2022 15:03:53 -0400
|
||||
Subject: [PATCH] runtime: portable access to sigev_notify_thread_id
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Previously, libgo relied on the _sigev_un implementation-specific
|
||||
field in struct sigevent, which is only available on glibc.
|
||||
This patch uses the sigev_notify_thread_id macro instead which is
|
||||
mandated by timer_create(2). In theory, this should work with any libc
|
||||
implementation for Linux. Unfortunately, there is an open glibc bug
|
||||
as glibc does not define this macro. For this reason, a glibc-specific
|
||||
workaround is required. Other libcs (such as musl) define the macro
|
||||
and don't require the workaround.
|
||||
|
||||
See https://sourceware.org/bugzilla/show_bug.cgi?id=27417
|
||||
|
||||
This makes libgo compatible with musl libc.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: I0924a53d5212730ebc395ecf9199f85967be8cc6
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/go/runtime/os_linux.go | 12 +++++++++++-
|
||||
libgo/runtime/go-signal.c | 18 ++++++++++++++++++
|
||||
2 files changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
|
||||
index 96fb1788..2b2d827c 100644
|
||||
--- a/libgo/go/runtime/os_linux.go
|
||||
+++ b/libgo/go/runtime/os_linux.go
|
||||
@@ -22,6 +22,12 @@ type mOS struct {
|
||||
profileTimerValid uint32
|
||||
}
|
||||
|
||||
+// setSigeventTID is written in C to set the sigev_notify_thread_id
|
||||
+// field of a sigevent struct.
|
||||
+//
|
||||
+//go:noescape
|
||||
+func setSigeventTID(*_sigevent, int32)
|
||||
+
|
||||
func getProcID() uint64 {
|
||||
return uint64(gettid())
|
||||
}
|
||||
@@ -52,9 +58,12 @@ const (
|
||||
)
|
||||
|
||||
// Atomically,
|
||||
+//
|
||||
// if(*addr == val) sleep
|
||||
+//
|
||||
// Might be woken up spuriously; that's allowed.
|
||||
// Don't sleep longer than ns; ns < 0 means forever.
|
||||
+//
|
||||
//go:nosplit
|
||||
func futexsleep(addr *uint32, val uint32, ns int64) {
|
||||
// Some Linux kernels have a bug where futex of
|
||||
@@ -73,6 +82,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
|
||||
}
|
||||
|
||||
// If any procs are sleeping on addr, wake up at most cnt.
|
||||
+//
|
||||
//go:nosplit
|
||||
func futexwakeup(addr *uint32, cnt uint32) {
|
||||
ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE_PRIVATE, cnt, nil, nil, 0)
|
||||
@@ -365,7 +375,7 @@ func setThreadCPUProfiler(hz int32) {
|
||||
var sevp _sigevent
|
||||
sevp.sigev_notify = _SIGEV_THREAD_ID
|
||||
sevp.sigev_signo = _SIGPROF
|
||||
- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
|
||||
+ setSigeventTID(&sevp, int32(mp.procid))
|
||||
ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid)
|
||||
if ret != 0 {
|
||||
// If we cannot create a timer for this M, leave profileTimerValid false
|
||||
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
|
||||
index 528d9b6d..aa1b6305 100644
|
||||
--- a/libgo/runtime/go-signal.c
|
||||
+++ b/libgo/runtime/go-signal.c
|
||||
@@ -183,6 +183,24 @@ setSigactionHandler(struct sigaction* sa, uintptr handler)
|
||||
sa->sa_sigaction = (void*)(handler);
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
+
|
||||
+// Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=27417
|
||||
+#ifndef sigev_notify_thread_id
|
||||
+ #define sigev_notify_thread_id _sigev_un._tid
|
||||
+#endif
|
||||
+
|
||||
+void setSigeventTID(struct sigevent*, int32_t)
|
||||
+ __asm__ (GOSYM_PREFIX "runtime.setSigeventTID");
|
||||
+
|
||||
+void
|
||||
+setSigeventTID(struct sigevent *sev, int32_t v)
|
||||
+{
|
||||
+ sev->sigev_notify_thread_id = v;
|
||||
+}
|
||||
+
|
||||
+#endif // defined(__linux__)
|
||||
+
|
||||
// C code to fetch values from the siginfo_t and ucontext_t pointers
|
||||
// passed to a signal handler.
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
From 01be086df55016ad676685c6b0dca6aa11330bfc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 17 Jul 2022 13:38:39 +0200
|
||||
Subject: [PATCH] libphobos: don't define __mode_t twice on musl targets
|
||||
|
||||
For musl targets, __mode_t is already aliased to uint, thus if it
|
||||
aliased in an architecture-specific if-case then it is defined twice
|
||||
which causes a build error.
|
||||
|
||||
To-Do: Report this upstream or revise this patch in a way that is also
|
||||
works with glibc and submit that upstream.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/sys/stat.d | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
|
||||
index 1fb4e44cbbf..ca31bbb7ccf 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
|
||||
@@ -167,7 +167,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = size_t;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -483,7 +482,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -565,7 +563,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = size_t;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -660,7 +657,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -746,7 +742,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -838,7 +833,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -914,7 +908,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = ulong;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -1,36 +0,0 @@
|
||||
From d53e8a0e94e34dc609e34dd5e404debda2640cfb Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Sat, 30 Jul 2022 07:29:28 -0700
|
||||
Subject: [PATCH] libgo: use SYS_timer_settime32
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: I1f3485028d132ceca1aba595325af24b4d72b894
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
---
|
||||
libgo/sysinfo.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index fc021099..180f5c31 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -354,6 +354,11 @@ enum {
|
||||
};
|
||||
#endif
|
||||
|
||||
+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
|
||||
+// musl defines SYS_timer_settim32 on 32-bit systems.
|
||||
+#define SYS_timer_settime SYS_timer_settime32
|
||||
+#endif
|
||||
+
|
||||
#if defined(HAVE_LOFF_T)
|
||||
// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
|
||||
// see a typedef.
|
||||
Loaded 100 of 1071 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user