Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37059adbe1 | ||
|
|
d78210ca6f | ||
|
|
a18c4703a6 | ||
|
|
46f8bc7593 | ||
|
|
86d6eea8ef | ||
|
|
17d58a59f6 | ||
|
|
281b6d781d | ||
|
|
f5e1b0eac7 | ||
|
|
c40adfab1b | ||
|
|
3f9ad5f597 | ||
|
|
17135ee65a | ||
|
|
b6cefd3370 | ||
|
|
ec1174493f | ||
|
|
19385cb473 | ||
|
|
f01c4bb605 | ||
|
|
6255108caf | ||
|
|
b4a1bab481 | ||
|
|
f55ef00572 | ||
|
|
ff08b8adf9 | ||
|
|
7615bf5f01 | ||
|
|
3f926eefef | ||
|
|
e09952c8b5 | ||
|
|
017ddd388c | ||
|
|
7827bbd020 | ||
|
|
a4dc4fed5f | ||
|
|
427ee9f6a2 | ||
|
|
39f8bd4da2 | ||
|
|
d7bc3fb7e1 | ||
|
|
794fba1218 | ||
|
|
4734c0b694 | ||
|
|
914d69d9dd | ||
|
|
db6ac6bbaa | ||
|
|
f905cf462a | ||
|
|
b1a0788182 | ||
|
|
57ac2e4cf8 | ||
|
|
cb44e191d9 | ||
|
|
9b91e790f4 | ||
|
|
f33f085d14 | ||
|
|
1f4561fabf | ||
|
|
78a4e77840 | ||
|
|
3653a883cc | ||
|
|
16588f5f7e | ||
|
|
e20c85651b | ||
|
|
acd220adf3 | ||
|
|
dad30db28c | ||
|
|
2945c3db12 | ||
|
|
b435c177d6 | ||
|
|
fa9f284495 | ||
|
|
f4a96f44a6 | ||
|
|
e506cbeec3 | ||
|
|
6c7fd48207 | ||
|
|
2b08221aac | ||
|
|
e851acf040 | ||
|
|
9bbe4b877d | ||
|
|
a781cf11f8 | ||
|
|
85d8b17c41 | ||
|
|
7911ca02a0 | ||
|
|
d1108dd369 | ||
|
|
23774f50c8 | ||
|
|
a81b8f9742 | ||
|
|
a1108766f9 | ||
|
|
663259af6f | ||
|
|
e8fb5fea69 | ||
|
|
8b43a5ce0f | ||
|
|
269996880b | ||
|
|
e02fc3a49a | ||
|
|
9a2a9510e4 | ||
|
|
e69fb9d80e | ||
|
|
f5ab362041 | ||
|
|
5fa7c964f3 | ||
|
|
2f1f37a6bf | ||
|
|
c084e40b80 | ||
|
|
0f862d3fe3 | ||
|
|
b8f4433e68 | ||
|
|
943cfe7540 | ||
|
|
e39ec891b8 | ||
|
|
5b9382b742 | ||
|
|
38073a05a4 | ||
|
|
1590be8611 | ||
|
|
c467e17bfc | ||
|
|
bcabeb80a1 | ||
|
|
665dbfd204 | ||
|
|
ed1040e5dc | ||
|
|
2a4320e16e | ||
|
|
2df9debe71 | ||
|
|
63228b7c3c | ||
|
|
aeedc86d67 | ||
|
|
0bbbd50adb | ||
|
|
c43e9f45a8 | ||
|
|
1258df73d7 | ||
|
|
5626781fca | ||
|
|
9d9fc6fa49 | ||
|
|
8833243e8b | ||
|
|
ffd16fa263 | ||
|
|
2dc2b58c26 | ||
|
|
3b85595ff8 | ||
|
|
f193f840cc | ||
|
|
5e01ef5453 | ||
|
|
937c1a8772 | ||
|
|
f578581ad0 | ||
|
|
5abb5574db | ||
|
|
779361ba0a | ||
|
|
d64553214f | ||
|
|
52703cce87 | ||
|
|
b08ff33a33 | ||
|
|
e371bbdb1f | ||
|
|
190f13df1f | ||
|
|
0ccd921802 | ||
|
|
809aa1a627 | ||
|
|
bbb73593be | ||
|
|
3137915ddf | ||
|
|
a56803bc52 | ||
|
|
95e9949260 | ||
|
|
eef37b4d81 | ||
|
|
44c6fba704 | ||
|
|
b441adafe8 | ||
|
|
a7d4668b8d | ||
|
|
24b0744ae4 | ||
|
|
5a2aafd62a | ||
|
|
0443f204c7 | ||
|
|
a44d7fd097 | ||
|
|
1e47f77bc7 | ||
|
|
9dad13d2e6 | ||
|
|
930aa6df78 | ||
|
|
6c2de41538 | ||
|
|
057584931e | ||
|
|
2770d39f10 | ||
|
|
cc3dd7de87 | ||
|
|
c9c4b492e4 | ||
|
|
1c56a8a0d1 | ||
|
|
4adee867e1 | ||
|
|
f8f223fef0 | ||
|
|
f231f88d4d | ||
|
|
fbc3f390fa | ||
|
|
367caeb4fc | ||
|
|
614cbdc5d1 | ||
|
|
c99a360a6e | ||
|
|
6fcc759991 | ||
|
|
570e52d99c | ||
|
|
2204c0a390 | ||
|
|
bcd6fc9c32 | ||
|
|
69832ab121 | ||
|
|
ac1d78a246 | ||
|
|
161711dea3 | ||
|
|
e22f6f684f | ||
|
|
aecda04b22 | ||
|
|
6f3262d477 | ||
|
|
027866c8d4 | ||
|
|
7aa1013087 | ||
|
|
21301644fd | ||
|
|
eb4318d908 | ||
|
|
ab3b6098fe | ||
|
|
c1e4b238b1 | ||
|
|
474a3d2a89 | ||
|
|
19fb4d5362 | ||
|
|
a1a2f1580c | ||
|
|
588f82329f | ||
|
|
33f518f93f | ||
|
|
daabd8fce2 | ||
|
|
1f8c3c240a | ||
|
|
c748048ef3 | ||
|
|
22c6020965 | ||
|
|
93c04ff4a6 | ||
|
|
c5b66e4090 | ||
|
|
5dec8f2c87 | ||
|
|
398cba07b7 | ||
|
|
0480628fe1 | ||
|
|
dd4fc39824 | ||
|
|
db2b912a0a | ||
|
|
08f32ffa4d | ||
|
|
062a26a60d | ||
|
|
78762563c2 | ||
|
|
5c6f2dd0d9 | ||
|
|
2c2aeed034 | ||
|
|
32b9b64c98 | ||
|
|
a0a14ce58d | ||
|
|
0a8069435b | ||
|
|
7cea0a4a7b | ||
|
|
1b86b7b922 | ||
|
|
5462164fad | ||
|
|
2a03913ef4 | ||
|
|
b2c3933136 | ||
|
|
fc69517273 | ||
|
|
0028ae7353 | ||
|
|
c2175703fe | ||
|
|
8d522e2640 | ||
|
|
ac80693307 | ||
|
|
75774e99df | ||
|
|
14e6594cc5 | ||
|
|
4372013494 | ||
|
|
6157a01f0f | ||
|
|
ef663840c4 | ||
|
|
cf8fc87a52 | ||
|
|
4a8b89e750 | ||
|
|
bdaf8ef02f | ||
|
|
9400f43579 | ||
|
|
ca6ff9cd98 | ||
|
|
39b9c33cc0 | ||
|
|
4dc4b0adf6 | ||
|
|
c0fc15d156 | ||
|
|
0b8a2265f8 | ||
|
|
71389586f8 | ||
|
|
72bd769dcb | ||
|
|
160a73321d | ||
|
|
fe066f9731 | ||
|
|
85fca01a25 | ||
|
|
e1dabe77b3 | ||
|
|
5cf775dff9 | ||
|
|
40db4c5962 | ||
|
|
616b3e14bb | ||
|
|
8402710815 | ||
|
|
805b7fa0ee | ||
|
|
ba934f0325 | ||
|
|
6b7c6a73d4 | ||
|
|
cf956551f9 | ||
|
|
2d553c50f0 | ||
|
|
3ffe37e840 | ||
|
|
9afcde0854 | ||
|
|
ca17321f5d | ||
|
|
bb18956a2e | ||
|
|
5fb3d0a42b | ||
|
|
72e55aae91 | ||
|
|
7608d18533 | ||
|
|
ebbbeca49c | ||
|
|
63af482d5e | ||
|
|
5e42745cd5 | ||
|
|
82b139a63c | ||
|
|
49a5704dd4 | ||
|
|
e971cdcb15 | ||
|
|
4bb6542fd8 | ||
|
|
b918f1c5f5 | ||
|
|
e179ba59ea | ||
|
|
1329e4b634 | ||
|
|
655c94f945 | ||
|
|
aa2886ef28 | ||
|
|
6bee3d14ef | ||
|
|
f0c58cea69 | ||
|
|
fa6150b289 | ||
|
|
444a766f3a | ||
|
|
1c3fbc17c6 | ||
|
|
5fc07d61ed | ||
|
|
b286211419 | ||
|
|
94f2b68c80 | ||
|
|
c6591103a2 | ||
|
|
4cfd9d6d9e | ||
|
|
114420bb05 | ||
|
|
828aac0e8b | ||
|
|
52fbd2f26e | ||
|
|
c5aeb452ae | ||
|
|
c64ac9bba0 | ||
|
|
00b7fe46b3 | ||
|
|
e184ed832c | ||
|
|
2b11f2b778 | ||
|
|
c9163b1581 | ||
|
|
d56b851aea | ||
|
|
7d86ad96a5 | ||
|
|
d3fe50c3d1 | ||
|
|
6b537d26d5 | ||
|
|
ae3832e43e | ||
|
|
7a80409e7e | ||
|
|
953e74646c | ||
|
|
c720400e47 | ||
|
|
2470b6b18f | ||
|
|
9234b17dc9 | ||
|
|
83213f3ebc | ||
|
|
6bfd71e1f8 | ||
|
|
39768d9b9d | ||
|
|
8be5f081d2 | ||
|
|
27be25f327 | ||
|
|
83f63d1c1b | ||
|
|
2d43699f91 | ||
|
|
025cb223f8 | ||
|
|
3faffb7b93 | ||
|
|
438471fe4a | ||
|
|
0abbfcd853 | ||
|
|
d2fa55c56d | ||
|
|
d1ae6f9d8c | ||
|
|
e2d8693034 | ||
|
|
cac3c09be3 | ||
|
|
d00425c263 | ||
|
|
9e9d418786 | ||
|
|
d757a36882 | ||
|
|
ea93a6d07f | ||
|
|
870d11322d | ||
|
|
7b2208d292 | ||
|
|
34e2a3ddad | ||
|
|
c5d147be99 | ||
|
|
0b8814d156 | ||
|
|
531dc8123d | ||
|
|
1d748a93dd | ||
|
|
fe40948947 | ||
|
|
bfe9fe8ad6 | ||
|
|
58e41997b5 | ||
|
|
dfc672e76e | ||
|
|
a6e5039865 | ||
|
|
0b5f362f15 | ||
|
|
a2d1c2e97e | ||
|
|
3f9b2bb878 | ||
|
|
ff71fcb59a | ||
|
|
b1c5a66bf7 | ||
|
|
db85f5de87 | ||
|
|
92bb682a94 | ||
|
|
b3964fc1da | ||
|
|
cc697511e1 | ||
|
|
d947491fb7 | ||
|
|
e12d937c6b | ||
|
|
170189393b | ||
|
|
6f0dfe9c96 | ||
|
|
be7b845d17 | ||
|
|
e4e5108c11 | ||
|
|
4f687403e4 | ||
|
|
fef1a94b57 | ||
|
|
9a86da0583 | ||
|
|
b75fbc431f | ||
|
|
b6f5f2c5b3 | ||
|
|
56b3d147d0 | ||
|
|
730292a79b | ||
|
|
39aaadf0dc | ||
|
|
480bf72054 | ||
|
|
930f7d8904 | ||
|
|
fe5b104891 | ||
|
|
1352ee8d6a | ||
|
|
6e11fc2d0c | ||
|
|
31e5d9a344 | ||
|
|
0eb391d23f | ||
|
|
1bd1765f23 | ||
|
|
779959dba7 | ||
|
|
001df983d2 | ||
|
|
a58d134174 | ||
|
|
e49167d029 | ||
|
|
4b54fc7f83 | ||
|
|
c4f8827b78 | ||
|
|
2137c0b12b | ||
|
|
c37967a0ec | ||
|
|
6396dd1188 | ||
|
|
0ab0b555d1 | ||
|
|
39052ac078 | ||
|
|
0348958e8f | ||
|
|
fd80cd21c5 | ||
|
|
3110ade74f | ||
|
|
2ab59a220f | ||
|
|
16bf9c9700 | ||
|
|
9198a2ad6e | ||
|
|
20e4eb495d | ||
|
|
cfed09ca36 | ||
|
|
9fb29079cd | ||
|
|
97727c59cb | ||
|
|
6f44124c1b | ||
|
|
89fba12fbb | ||
|
|
e0fcfb74e2 | ||
|
|
7c79667fe0 | ||
|
|
73e05bf16d | ||
|
|
5f820deefc | ||
|
|
146c6b0f1c | ||
|
|
37610c57f7 | ||
|
|
9e454209e5 | ||
|
|
9b21113f2c | ||
|
|
88f6ce6502 | ||
|
|
f3bfe510fa | ||
|
|
0dfb1219f8 | ||
|
|
5570420cc9 | ||
|
|
7ee361123c | ||
|
|
2150879f9f | ||
|
|
fd62adfe0e | ||
|
|
d9830c6304 | ||
|
|
63c85a7e3c | ||
|
|
c5571fc688 | ||
|
|
3afd25f568 | ||
|
|
6ff0fc82bb | ||
|
|
0cad27f9aa | ||
|
|
e13a0a15c5 | ||
|
|
9751f8b039 | ||
|
|
2cb492a5f4 | ||
|
|
4de739338c | ||
|
|
2e3cd005a4 | ||
|
|
64e1496e73 | ||
|
|
5bc1505ed5 | ||
|
|
a520b35993 | ||
|
|
7bfc8fad09 | ||
|
|
6002e51b70 | ||
|
|
1199feabbd | ||
|
|
b60b9624dc | ||
|
|
e43c52dd58 | ||
|
|
eb7204df91 | ||
|
|
8cbd19f79d | ||
|
|
2fd687a0f2 | ||
|
|
c720abf97c | ||
|
|
7f17509724 | ||
|
|
eca86adbf3 | ||
|
|
5a07413b97 | ||
|
|
a48d4dac62 | ||
|
|
80fff9242a | ||
|
|
037d44ada1 | ||
|
|
a8bf624bb4 | ||
|
|
ff63a9fd60 | ||
|
|
e17b71ffd1 | ||
|
|
53dbcab033 | ||
|
|
4970f08293 | ||
|
|
49c39b35c1 | ||
|
|
6148644a7f | ||
|
|
1dfe7962be | ||
|
|
ab47398d30 | ||
|
|
6c7d0c7b15 | ||
|
|
b567653505 | ||
|
|
40aa8e911f | ||
|
|
09a3c1dc8c | ||
|
|
e72592cd9a | ||
|
|
69bcd3fbf0 | ||
|
|
c002f3e196 | ||
|
|
d663d4d678 | ||
|
|
d2eed81a20 | ||
|
|
5d8dd4d145 | ||
|
|
9c0e8fcc10 | ||
|
|
b117742459 | ||
|
|
6e5122f018 | ||
|
|
66af27a144 | ||
|
|
f9bda9fd4d | ||
|
|
e83778c4df | ||
|
|
e7ec3ae165 | ||
|
|
415714ec4d | ||
|
|
56ad1cd821 | ||
|
|
b6f0cfda68 | ||
|
|
36bdf43fe6 | ||
|
|
9ea3a58735 | ||
|
|
63c6f76327 | ||
|
|
61374468cd | ||
|
|
54672bdca7 | ||
|
|
098b71ba76 | ||
|
|
3e737241ba | ||
|
|
202b6e9435 | ||
|
|
3dae87fc3c | ||
|
|
42f9797845 | ||
|
|
9bba04d366 | ||
|
|
dbbd4e46ec | ||
|
|
61951f08e7 | ||
|
|
e702458223 | ||
|
|
76030e7fa5 | ||
|
|
04abb5b1a7 | ||
|
|
0383bcaa1e | ||
|
|
25b1462207 | ||
|
|
6665328a80 | ||
|
|
b5aecae28b | ||
|
|
2b4a076c5f | ||
|
|
e7f9e9256f | ||
|
|
7e18458bc8 | ||
|
|
9d9027876e | ||
|
|
841214a737 | ||
|
|
7af938a960 | ||
|
|
2fcbd471b0 | ||
|
|
e740f3dccd | ||
|
|
21dc035985 | ||
|
|
9ada84dbf3 | ||
|
|
055c64ed50 | ||
|
|
a2a5539d53 | ||
|
|
14ab70cac7 | ||
|
|
f0843d6b4a | ||
|
|
2146027219 | ||
|
|
0b5fe0017e | ||
|
|
7992f29cf9 | ||
|
|
7e488322cb | ||
|
|
f0cc1edccc | ||
|
|
e60195f8ae | ||
|
|
1a38807594 | ||
|
|
f0d314793d | ||
|
|
9839303dca | ||
|
|
4914067590 | ||
|
|
7213fd54ca | ||
|
|
968d1cb57f | ||
|
|
5ad102151d | ||
|
|
4f842cfd9a | ||
|
|
4ebd1d1a17 | ||
|
|
1c4369e4fc | ||
|
|
acf281069e | ||
|
|
5e35a947d2 | ||
|
|
931bf18591 | ||
|
|
1e4c8238c3 | ||
|
|
73a033328e | ||
|
|
3cd0d57835 | ||
|
|
acccef1297 | ||
|
|
9439f03232 | ||
|
|
7ce2c8645a | ||
|
|
73a9d2e481 | ||
|
|
ac3ccce178 | ||
|
|
ae1fffe8c0 | ||
|
|
3fe3531f47 | ||
|
|
e6073704d3 | ||
|
|
f8bc62c171 | ||
|
|
0ac0f93599 | ||
|
|
0f32828eb1 | ||
|
|
4525d4072b | ||
|
|
53e9209597 | ||
|
|
aba1daa8d3 | ||
|
|
edba36cdb9 | ||
|
|
b39ae43314 | ||
|
|
49680c648d | ||
|
|
bb80cfbc19 | ||
|
|
972c8d16ec | ||
|
|
3aa3758821 | ||
|
|
e9f7e3b423 | ||
|
|
2d648883ef | ||
|
|
346f93cb6e | ||
|
|
bffe5d95ac | ||
|
|
5d4289c416 | ||
|
|
941486b663 | ||
|
|
a025f614bb | ||
|
|
a4bce44ef4 | ||
|
|
2016c069e7 | ||
|
|
7214fb1a74 | ||
|
|
50ca7110d7 | ||
|
|
6ac389d8ae | ||
|
|
d9116005f1 | ||
|
|
591ae745ae | ||
|
|
5d393c43be | ||
|
|
a4f893bfb0 | ||
|
|
557ddf697f | ||
|
|
cc14792377 | ||
|
|
675bd6d68d | ||
|
|
2700b6c52f | ||
|
|
c5c962b6ed | ||
|
|
66aacbe00c | ||
|
|
5837cdd6bf | ||
|
|
8c9854ea92 | ||
|
|
f35a52add9 | ||
|
|
cffc7f1d4c | ||
|
|
3679e238e7 | ||
|
|
e35d367d8a | ||
|
|
b01a87b087 | ||
|
|
38853f6b4b | ||
|
|
f08577c919 | ||
|
|
e8f434e63c | ||
|
|
e2daba5f24 | ||
|
|
338d24e60c | ||
|
|
3c5948e480 | ||
|
|
c2cff799d7 | ||
|
|
5584000463 | ||
|
|
1e415b1ffb | ||
|
|
638c1e2449 | ||
|
|
0fa314e59e | ||
|
|
2d4b04d37a | ||
|
|
a24c091ac6 | ||
|
|
c8988dd747 | ||
|
|
4fda1c33d9 | ||
|
|
40fb66f3c1 | ||
|
|
f457ed3540 | ||
|
|
be532bf682 | ||
|
|
6e4f2c945d | ||
|
|
80e78d417f | ||
|
|
1f06b6f365 | ||
|
|
fe7993e6c9 | ||
|
|
4896bf4e6e | ||
|
|
301baea0ae | ||
|
|
2b7b2ed090 | ||
|
|
d0f40b0b16 | ||
|
|
2ad28222c0 |
No files matched your search
@@ -1 +0,0 @@
|
||||
lib/build_changed_aports.sh
|
||||
@@ -1 +0,0 @@
|
||||
lib/build_changed_aports.sh
|
||||
@@ -1 +0,0 @@
|
||||
lib/build_changed_aports.sh
|
||||
@@ -45,3 +45,10 @@ if grep --exclude='source_deviceinfo' -qEr 'source /etc/deviceinfo|\. /etc/devic
|
||||
grep --color=always --exclude='rootfs-usr-share-misc-source_deviceinfo' -Er 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Removed deviceinfo variable
|
||||
if grep -qr 'deviceinfo_modules_initfs' -- *; then
|
||||
echo 'ERROR: deviceinfo_modules_initfs variable has been removed. Use "modules-initfs" file instead.'
|
||||
grep --color=always -r 'deviceinfo_modules_initfs' -- *
|
||||
exit 1
|
||||
fi
|
||||
+2
-2
@@ -17,12 +17,12 @@ 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-usr-lib-NetworkManager-dispatcher.d-50-dns-filter.sh
|
||||
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-tethering.sh
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./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-debug-shell/setup_usb_storage.sh
|
||||
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
||||
./main/postmarketos-update-kernel/update-kernel.sh
|
||||
./main/ttyescape/*.post-install
|
||||
@@ -48,5 +48,5 @@ sh_files="
|
||||
for file in $sh_files; do
|
||||
echo "Test with shellcheck: $file"
|
||||
cd "$DIR/$(dirname "$file")"
|
||||
shellcheck -e SC1008 -x "$(basename "$file")"
|
||||
shellcheck -e SC1008 -e SC3043 -x "$(basename "$file")"
|
||||
done
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
import os
|
||||
import importlib
|
||||
import importlib.util
|
||||
from distutils.sysconfig import get_python_lib
|
||||
from site import getsitepackages
|
||||
|
||||
|
||||
def path_pmbootstrap():
|
||||
@@ -24,13 +24,14 @@ def path_pmbootstrap():
|
||||
sys.exit(1)
|
||||
|
||||
# Resolve the symlink and verify the folder
|
||||
dir = os.path.dirname(os.path.realpath(bin))
|
||||
if os.path.exists(dir + "/pmb/__init__.py"):
|
||||
return dir
|
||||
directory = os.path.dirname(os.path.realpath(bin))
|
||||
if os.path.exists(directory + "/pmb/__init__.py"):
|
||||
return directory
|
||||
|
||||
dir = get_python_lib()
|
||||
if os.path.exists(dir + "/pmb/__init__.py"):
|
||||
return dir
|
||||
directories = getsitepackages()
|
||||
for directory in directories:
|
||||
if os.path.exists(directory + "/pmb/__init__.py"):
|
||||
return directory
|
||||
|
||||
# Symlink not set up properly
|
||||
print("ERROR: 'pmbootstrap' is not a symlink to pmbootstrap.py")
|
||||
|
||||
@@ -30,7 +30,7 @@ def test_directories():
|
||||
# Ensure no file in pmaports are executable.
|
||||
# see https://gitlab.com/postmarketOS/pmaports/-/issues/593.
|
||||
def test_executable_files():
|
||||
for file in glob.iglob("**/*", recursive=True):
|
||||
for file in glob.iglob("[!temp]**/**/*", recursive=True):
|
||||
if os.path.isdir(file) or os.path.islink(file):
|
||||
continue
|
||||
# still check other less common inode types
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"SpacesAftertabs": true
|
||||
"SpacesAftertabs": true,
|
||||
"Exclude": ["temp"]
|
||||
}
|
||||
+2
-17
@@ -18,7 +18,7 @@ stages:
|
||||
# https://docs.gitlab.com/ee/ci/merge_request_pipelines/index.html#excluding-certain-jobs
|
||||
.only-default: &only-default
|
||||
only:
|
||||
- master
|
||||
- v23.12
|
||||
- merge_requests
|
||||
- tags
|
||||
|
||||
@@ -100,7 +100,7 @@ kernel-kconfig:
|
||||
stage: lint
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- v23.12
|
||||
- merge_requests
|
||||
changes:
|
||||
- device/*/linux-*/config-*
|
||||
@@ -140,11 +140,6 @@ build-x86_64:
|
||||
script:
|
||||
- .ci/build-x86_64.sh
|
||||
|
||||
build-x86:
|
||||
extends: .build
|
||||
script:
|
||||
- .ci/build-x86.sh
|
||||
|
||||
build-aarch64:
|
||||
extends: .build
|
||||
script:
|
||||
@@ -154,13 +149,3 @@ build-armv7:
|
||||
extends: .build
|
||||
script:
|
||||
- .ci/build-armv7.sh
|
||||
|
||||
build-armhf:
|
||||
extends: .build
|
||||
script:
|
||||
- .ci/build-armhf.sh
|
||||
|
||||
build-riscv64:
|
||||
extends: .build
|
||||
script:
|
||||
- .ci/build-riscv64.sh
|
||||
@@ -1,51 +0,0 @@
|
||||
# Reference: https://postmarketos.org/channels.cfg
|
||||
[channels.cfg]
|
||||
recommended=edge
|
||||
|
||||
[edge]
|
||||
description=Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
|
||||
branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v23.06]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v23.06
|
||||
branch_aports=3.18-stable
|
||||
mirrordir_alpine=v3.18
|
||||
|
||||
[v22.12]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v22.12
|
||||
branch_aports=3.17-stable
|
||||
mirrordir_alpine=v3.17
|
||||
|
||||
[v22.06]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v22.06
|
||||
branch_aports=3.16-stable
|
||||
mirrordir_alpine=v3.16
|
||||
|
||||
[v21.12]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v21.12
|
||||
branch_aports=3.15-stable
|
||||
mirrordir_alpine=v3.15
|
||||
|
||||
[v21.06]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v21.06
|
||||
branch_aports=3.14-stable
|
||||
mirrordir_alpine=v3.14
|
||||
|
||||
[v21.03]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v21.03
|
||||
branch_aports=3.13-stable
|
||||
mirrordir_alpine=v3.13
|
||||
|
||||
[v20.05]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v20.05
|
||||
branch_aports=3.12-stable
|
||||
mirrordir_alpine=v3.12
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.36.1
|
||||
pkgrel=4
|
||||
pkgrel=19
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -21,16 +21,16 @@ pkgdesc="Statically linked Busybox for $_arch"
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-v3.19.apk::$_mirror/v3.19/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-v3.19.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c0ea71bcec70e35de3dcb919c22c02afe7e35b3168845209e93bcd15ff380d62dc807848e36e1e5fef22c16adbbdfc1dc3a3559015d0c4a3b2978e0e303d4413 busybox-static-1.36.1-r4-aarch64-edge.apk
|
||||
aa58bb098d78beddc923a58599688b68768b311759d4acf05d75ba26c5969a31b9faed1b65b600688a5670d2d0c97562f2ebad529864a16eb987b9f4b3ec2924 busybox-static-1.36.1-r19-aarch64-v3.19.apk
|
||||
"
|
||||
@@ -1,36 +0,0 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen busybox-static-armhf
|
||||
|
||||
# Stub for apkbuild-lint
|
||||
if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.36.1
|
||||
pkgrel=4
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
arch="x86_64"
|
||||
options="!check !strip"
|
||||
pkgdesc="Statically linked Busybox for $_arch"
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
701ee52541aee37a075563c430b891860afd205e4446379a4686b3eac57ce8443c1203b06fb90f146c88064e00d99101c86d0d8b3a91377e465d46958c942366 busybox-static-1.36.1-r4-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.36.1
|
||||
pkgrel=4
|
||||
pkgrel=19
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -21,16 +21,16 @@ pkgdesc="Statically linked Busybox for $_arch"
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-v3.19.apk::$_mirror/v3.19/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-v3.19.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e01fdc7edfe06b9b8c30acb0df90f026c49982d378724c8afd4e545f5ab7e9d317a9fd8e1e7ae06d3f89e3ddf5e572ad3f7d2d033225f195d5bc7530e6e4bcd2 busybox-static-1.36.1-r4-armv7-edge.apk
|
||||
570dd6f150d74bafec0b4485ced760e815a1550372251cba8b51e1e4193ead71b81c2262a04a6f279fad1ebacc7c792eb825614d2f67f57c4f3b0b33d11033ab busybox-static-1.36.1-r19-armv7-v3.19.apk
|
||||
"
|
||||
@@ -1,3 +1,6 @@
|
||||
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
# https://wiki.postmarketos.org/wiki/Pmbootstrap:_Cross_Compiling
|
||||
#
|
||||
# Wrapper for the "crossdirect" compilation method.
|
||||
# pmbootstrap mounts the native chroot in the foreign arch (e.g. armhf) chroot
|
||||
# as /native. This package gets installed into the native chroot, and creates
|
||||
@@ -16,7 +19,7 @@
|
||||
# version is implemented as simple shell wrappers.
|
||||
|
||||
pkgname=crossdirect
|
||||
pkgver=5
|
||||
pkgver=5.1.0
|
||||
pkgrel=0
|
||||
pkgdesc="Wrappers to launch native cross compilers in foreign chroots"
|
||||
url="https://postmarketOS.org"
|
||||
@@ -76,9 +79,10 @@ package() {
|
||||
ln -s ../rustc.sh rustc
|
||||
done
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
0f4b48f250425dc57f63955fc8b38477d23db793bee367c3fbe03c3d2a559ba576434d07518310db4cae9d90d501af4051b80038b10fae94b980e537fc9374ad cargo.sh
|
||||
500107e5aff8b34e74b54982ebcd447fc41bc8283956d506561b031a055cb30ec12698047c2604918b4b6d8560fe03db427a63dff2b83c907e8494b7f5233f29 crossdirect.c
|
||||
2c41410a9ef2dab31403545e55e2464f2ee4e7056ffbcd3bc5810d582311801496b88d55307f17ce6acf766e9c867d30d05f2b0d8d46bf77a5e8f0495d6bc24e rustc.sh
|
||||
de2aa6929bbff5db9132673e667f4525b333d062cb1f7a0597dd924de9e5c7215a9f8e2e6263b6fb5ace06f2c4b64f4ebfd0ede9b78add07c2cd08ec8613e98f rustc.sh
|
||||
ea9bf8db3810d03d0a7395057f3d6e57f7127d87c55deaedc171c255288f5f3cc6fbcc680a5a1b92786cf573875d5dc22521173799fe2639acc97d0715ff905b rust-qemu-linker.sh
|
||||
"
|
||||
@@ -5,8 +5,15 @@ if [ -n "$CROSSDIRECT_DEBUG" ]; then
|
||||
fi
|
||||
|
||||
# return the correct host architecture when cargo requests it
|
||||
if [ "$*" = "-vV" ]; then
|
||||
exec /usr/bin/rustc -vV
|
||||
if [ "$*" = "-vV" ] || [ "$*" = "-V" ]; then
|
||||
exec /usr/bin/rustc "$*"
|
||||
fi
|
||||
|
||||
# pmbootstrap installs sccache when building a rust program, unless --no-ccache
|
||||
# is set. In that case it also sets CCACHE_DISABLE.
|
||||
SCCACHE=/native/usr/bin/sccache
|
||||
if ! [ -e "$SCCACHE" ] || [ -n "$CCACHE_DISABLE" ]; then
|
||||
SCCACHE=""
|
||||
fi
|
||||
|
||||
# We expect the right target to be set in the arguments if compiling for the
|
||||
@@ -14,12 +21,17 @@ fi
|
||||
# automatically. If no target is provided, this is probably a macro or a
|
||||
# build script, so it should be compiled for the native architecture.
|
||||
if echo "$*" | grep -qFe "--target"; then
|
||||
LD_LIBRARY_PATH=/native/lib:/native/usr/lib /native/usr/bin/rustc \
|
||||
# Not using sccache when building for foreign architecture, as it
|
||||
# doesn't cache the output with "Non-cacheable reasons: --sysroot"
|
||||
LD_LIBRARY_PATH=/native/lib:/native/usr/lib \
|
||||
/native/usr/bin/rustc \
|
||||
-Clinker=/native/usr/lib/crossdirect/rust-qemu-linker \
|
||||
--sysroot=/usr \
|
||||
"$@"
|
||||
else
|
||||
PATH=/native/usr/bin:/native/bin LD_LIBRARY_PATH=/native/lib:/native/usr/lib \
|
||||
PATH=/native/usr/bin:/native/bin \
|
||||
LD_LIBRARY_PATH=/native/lib:/native/usr/lib \
|
||||
$SCCACHE \
|
||||
/native/usr/bin/rustc \
|
||||
-Clink-arg=-Wl,-rpath,/native/lib:/native/usr/lib \
|
||||
"$@"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
From ef740fff300fd9eb8285fb5611f6205705ee54ec Mon Sep 17 00:00:00 2001
|
||||
From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
|
||||
Date: Fri, 23 Jun 2023 15:27:17 +0530
|
||||
Subject: [PATCH 35/35] Fix ICE observed in PR110280.
|
||||
|
||||
gcc/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector
|
||||
using build_vector_from_val with the element of input operand, and
|
||||
mask's type if operand and mask's types don't match.
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* gcc.target/aarch64/sve/pr110280.c: New test.
|
||||
---
|
||||
gcc/match.pd | 9 ++++++++-
|
||||
gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
|
||||
diff --git a/gcc/match.pd b/gcc/match.pd
|
||||
index 91182448250..c3bb4fbc0a7 100644
|
||||
--- a/gcc/match.pd
|
||||
+++ b/gcc/match.pd
|
||||
@@ -8292,7 +8292,14 @@ and,
|
||||
|
||||
(simplify
|
||||
(vec_perm vec_same_elem_p@0 @0 @1)
|
||||
- @0)
|
||||
+ (if (types_match (type, TREE_TYPE (@0)))
|
||||
+ @0
|
||||
+ (with
|
||||
+ {
|
||||
+ tree elem = uniform_vector_p (@0);
|
||||
+ }
|
||||
+ (if (elem)
|
||||
+ { build_vector_from_val (type, elem); }))))
|
||||
|
||||
/* Push VEC_PERM earlier if that may help FMA perception (PR101895). */
|
||||
(simplify
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
new file mode 100644
|
||||
index 00000000000..d3279f38362
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O3 -fdump-tree-optimized" } */
|
||||
+
|
||||
+#include "arm_sve.h"
|
||||
+
|
||||
+svuint32_t l()
|
||||
+{
|
||||
+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0};
|
||||
+ return svld1rq_u32(svptrue_b8(), lanes);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
https://gcc.gnu.org/PR110792
|
||||
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=790c1f60a5662b16eb19eb4b81922995863c7571
|
||||
https://github.com/randombit/botan/issues/3637
|
||||
|
||||
From 85628c5653ff40963158a24c60eeec6a3b5a8e56 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Sayle <roger@nextmovesoftware.com>
|
||||
Date: Thu, 3 Aug 2023 07:12:04 +0100
|
||||
Subject: [PATCH] PR target/110792: Early clobber issues with
|
||||
rot32di2_doubleword on i386.
|
||||
|
||||
This patch is a conservative fix for PR target/110792, a wrong-code
|
||||
regression affecting doubleword rotations by BITS_PER_WORD, which
|
||||
effectively swaps the highpart and lowpart words, when the source to be
|
||||
rotated resides in memory. The issue is that if the register used to
|
||||
hold the lowpart of the destination is mentioned in the address of
|
||||
the memory operand, the current define_insn_and_split unintentionally
|
||||
clobbers it before reading the highpart.
|
||||
|
||||
Hence, for the testcase, the incorrectly generated code looks like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movq WHIRL_S+8(%rdi), %rdi // accidentally clobber addr
|
||||
movq WHIRL_S(%rdi), %rbp // load (wrong) lowpart
|
||||
|
||||
Traditionally, the textbook way to fix this would be to add an
|
||||
explicit early clobber to the instruction's constraints.
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r,&r")
|
||||
(any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
(const_int 32)))]
|
||||
|
||||
but unfortunately this currently generates significantly worse code,
|
||||
due to a strange choice of reloads (effectively memcpy), which ends up
|
||||
looking like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movdqa WHIRL_S(%rdi), %xmm0 // load the double word in SSE reg.
|
||||
movaps %xmm0, -16(%rsp) // store the SSE reg back to the stack
|
||||
movq -8(%rsp), %rdi // load highpart
|
||||
movq -16(%rsp), %rbp // load lowpart
|
||||
|
||||
Note that reload's "&" doesn't distinguish between the memory being
|
||||
early clobbered, vs the registers used in an addressing mode being
|
||||
early clobbered.
|
||||
|
||||
The fix proposed in this patch is to remove the third alternative, that
|
||||
allowed offsetable memory as an operand, forcing reload to place the
|
||||
operand into a register before the rotation. This results in:
|
||||
|
||||
salq $4, %rdi
|
||||
movq WHIRL_S(%rdi), %rax
|
||||
movq WHIRL_S+8(%rdi), %rdi
|
||||
movq %rax, %rbp
|
||||
|
||||
I believe there's a more advanced solution, by swapping the order of
|
||||
the loads (if first destination register is mentioned in the address),
|
||||
or inserting a lea insn (if both destination registers are mentioned
|
||||
in the address), but this fix is a minimal "safe" solution, that
|
||||
should hopefully be suitable for backporting.
|
||||
|
||||
2023-08-03 Roger Sayle <roger@nextmovesoftware.com>
|
||||
|
||||
gcc/ChangeLog
|
||||
PR target/110792
|
||||
* config/i386/i386.md (<any_rotate>ti3): For rotations by 64 bits
|
||||
place operand in a register before gen_<insn>64ti2_doubleword.
|
||||
(<any_rotate>di3): Likewise, for rotations by 32 bits, place
|
||||
operand in a register before gen_<insn>32di2_doubleword.
|
||||
(<any_rotate>32di2_doubleword): Constrain operand to be in register.
|
||||
(<any_rotate>64ti2_doubleword): Likewise.
|
||||
|
||||
gcc/testsuite/ChangeLog
|
||||
PR target/110792
|
||||
* g++.target/i386/pr110792.C: New 32-bit C++ test case.
|
||||
* gcc.target/i386/pr110792.c: New 64-bit C test case.
|
||||
|
||||
(cherry picked from commit 790c1f60a5662b16eb19eb4b81922995863c7571)
|
||||
---
|
||||
gcc/config/i386/i386.md | 18 ++++++++++++------
|
||||
gcc/testsuite/g++.target/i386/pr110792.C | 16 ++++++++++++++++
|
||||
gcc/testsuite/gcc.target/i386/pr110792.c | 18 ++++++++++++++++++
|
||||
3 files changed, 46 insertions(+), 6 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.target/i386/pr110792.C
|
||||
create mode 100644 gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
|
||||
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
|
||||
index f3a3305..a71e837 100644
|
||||
--- a/gcc/config/i386/i386.md
|
||||
+++ b/gcc/config/i386/i386.md
|
||||
@@ -14359,7 +14359,10 @@
|
||||
emit_insn (gen_ix86_<insn>ti3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 64)
|
||||
- emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (TImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
{
|
||||
rtx amount = force_reg (QImode, operands[2]);
|
||||
@@ -14394,7 +14397,10 @@
|
||||
emit_insn (gen_ix86_<insn>di3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 32)
|
||||
- emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (DImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
FAIL;
|
||||
|
||||
@@ -14562,8 +14568,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:DI (match_operand:DI 1 "register_operand" "0,r")
|
||||
(const_int 32)))]
|
||||
"!TARGET_64BIT"
|
||||
"#"
|
||||
@@ -14580,8 +14586,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>64ti2_doubleword"
|
||||
- [(set (match_operand:TI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:TI (match_operand:TI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:TI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:TI (match_operand:TI 1 "register_operand" "0,r")
|
||||
(const_int 64)))]
|
||||
"TARGET_64BIT"
|
||||
"#"
|
||||
diff --git a/gcc/testsuite/g++.target/i386/pr110792.C b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
new file mode 100644
|
||||
index 0000000..ce21a7a
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* { dg-do compile { target ia32 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+template <int ROT, typename T>
|
||||
+inline T rotr(T input)
|
||||
+{
|
||||
+ return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
|
||||
+}
|
||||
+
|
||||
+unsigned long long WHIRL_S[256] = {0x18186018C07830D8};
|
||||
+unsigned long long whirl(unsigned char x0)
|
||||
+{
|
||||
+ const unsigned long long s4 = WHIRL_S[x0&0xFF];
|
||||
+ return rotr<32>(s4);
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movl\tWHIRL_S\\+4\\(,%eax,8\\), %eax" } } */
|
||||
diff --git a/gcc/testsuite/gcc.target/i386/pr110792.c b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
new file mode 100644
|
||||
index 0000000..b65125c
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* { dg-do compile { target int128 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+static inline unsigned __int128 rotr(unsigned __int128 input)
|
||||
+{
|
||||
+ return ((input >> 64) | (input << (64)));
|
||||
+}
|
||||
+
|
||||
+unsigned __int128 WHIRL_S[256] = {((__int128)0x18186018C07830D8) << 64 |0x18186018C07830D8};
|
||||
+unsigned __int128 whirl(unsigned char x0)
|
||||
+{
|
||||
+ register int t __asm("rdi") = x0&0xFF;
|
||||
+ const unsigned __int128 s4 = WHIRL_S[t];
|
||||
+ register unsigned __int128 tt __asm("rdi") = rotr(s4);
|
||||
+ asm("":::"memory");
|
||||
+ return tt;
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movq\tWHIRL_S\\+8\\(%rdi\\), %rdi" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -24,8 +24,8 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgver=13.1.1_git20230722
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
pkgver=13.2.1_git20231014
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
_pkgsnap="${pkgver##*_git}"
|
||||
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=1
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -268,9 +268,13 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-Fix-ICE-observed-in-PR110280.patch
|
||||
0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 13.2.1_git20231014-r0:
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
@@ -428,6 +432,7 @@ package() {
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
make -C "$_builddir"/libgccjit-build/gcc DESTDIR="$pkgdir" jit.install-common
|
||||
@@ -782,7 +787,7 @@ gdb() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
284719308cad4546ebd85934fb9f12112e8f1a4c3e5beea0760da1f73509907c194e7c133e6e755b6148bd1c51a72c071ac0d16b05641d901af7105461686655 gcc-13-20230722.tar.xz
|
||||
406673a62deba759fc0532a801b3f57cabf894ea328587b23e62a707ba5767b0e3ae9b3f86bf3c6fcf13e8a3c30bc470e6598b625c8231efb629034211c162c2 gcc-13-20231014.tar.xz
|
||||
1ecffba1b07d60e1b4422302b032bbea918b674c8e12b30aa6965b544d700ce86b61e9f7b8d402c6caf59257f491a394dd0912f0948565d6eae9335ee54f3b35 0001-posix_memalign.patch
|
||||
163f282455b6a4df33f011bcd8b0440566ba0ffaeeab30d8ac52d39948980a56881ca0eff60687129d59556389a58b9d64e7768750bd70b1fe0fedbc9fc30dc2 0002-gcc-poison-system-directories.patch
|
||||
3f24bb6a50d3c45b71ea05590e32fe3e69b91377ab185352891d5035c76ed193117c6d0b314a4c364bcf136b9a9dd5c926d6c7c30ab436976c121ebfea8d3ddd 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -817,5 +822,5 @@ d47b559075f40d526235f47b91da1d0cf6bfe6c5b7311bbfe08af9dd6e8f27e6c7cd82e3b2d529aa
|
||||
b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95e21c9ffbf2412193f8b9fc89a4c36fa5a6a041661ac7399d 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
048d767f4477c92ee6835850d13063ede21c0be751d0945c94445d04054e134cdc617eeb0b1ac8c892a604d8644580fcfebeccaf537d6b7380558ac6378e445a 0035-Fix-ICE-observed-in-PR110280.patch
|
||||
cc1e10ac6e72db816f09325e301103109cc212a6f3de3ce0b9b038d149233c467319d203941695dbf3d7b9e2dcbbcd17609cdb056e831fcc323cd592423882d8 0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
@@ -1,61 +0,0 @@
|
||||
From ef740fff300fd9eb8285fb5611f6205705ee54ec Mon Sep 17 00:00:00 2001
|
||||
From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
|
||||
Date: Fri, 23 Jun 2023 15:27:17 +0530
|
||||
Subject: [PATCH 35/35] Fix ICE observed in PR110280.
|
||||
|
||||
gcc/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector
|
||||
using build_vector_from_val with the element of input operand, and
|
||||
mask's type if operand and mask's types don't match.
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* gcc.target/aarch64/sve/pr110280.c: New test.
|
||||
---
|
||||
gcc/match.pd | 9 ++++++++-
|
||||
gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
|
||||
diff --git a/gcc/match.pd b/gcc/match.pd
|
||||
index 91182448250..c3bb4fbc0a7 100644
|
||||
--- a/gcc/match.pd
|
||||
+++ b/gcc/match.pd
|
||||
@@ -8292,7 +8292,14 @@ and,
|
||||
|
||||
(simplify
|
||||
(vec_perm vec_same_elem_p@0 @0 @1)
|
||||
- @0)
|
||||
+ (if (types_match (type, TREE_TYPE (@0)))
|
||||
+ @0
|
||||
+ (with
|
||||
+ {
|
||||
+ tree elem = uniform_vector_p (@0);
|
||||
+ }
|
||||
+ (if (elem)
|
||||
+ { build_vector_from_val (type, elem); }))))
|
||||
|
||||
/* Push VEC_PERM earlier if that may help FMA perception (PR101895). */
|
||||
(simplify
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
new file mode 100644
|
||||
index 00000000000..d3279f38362
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O3 -fdump-tree-optimized" } */
|
||||
+
|
||||
+#include "arm_sve.h"
|
||||
+
|
||||
+svuint32_t l()
|
||||
+{
|
||||
+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0};
|
||||
+ return svld1rq_u32(svptrue_b8(), lanes);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
From ef740fff300fd9eb8285fb5611f6205705ee54ec Mon Sep 17 00:00:00 2001
|
||||
From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
|
||||
Date: Fri, 23 Jun 2023 15:27:17 +0530
|
||||
Subject: [PATCH 35/35] Fix ICE observed in PR110280.
|
||||
|
||||
gcc/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector
|
||||
using build_vector_from_val with the element of input operand, and
|
||||
mask's type if operand and mask's types don't match.
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* gcc.target/aarch64/sve/pr110280.c: New test.
|
||||
---
|
||||
gcc/match.pd | 9 ++++++++-
|
||||
gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
|
||||
diff --git a/gcc/match.pd b/gcc/match.pd
|
||||
index 91182448250..c3bb4fbc0a7 100644
|
||||
--- a/gcc/match.pd
|
||||
+++ b/gcc/match.pd
|
||||
@@ -8292,7 +8292,14 @@ and,
|
||||
|
||||
(simplify
|
||||
(vec_perm vec_same_elem_p@0 @0 @1)
|
||||
- @0)
|
||||
+ (if (types_match (type, TREE_TYPE (@0)))
|
||||
+ @0
|
||||
+ (with
|
||||
+ {
|
||||
+ tree elem = uniform_vector_p (@0);
|
||||
+ }
|
||||
+ (if (elem)
|
||||
+ { build_vector_from_val (type, elem); }))))
|
||||
|
||||
/* Push VEC_PERM earlier if that may help FMA perception (PR101895). */
|
||||
(simplify
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
new file mode 100644
|
||||
index 00000000000..d3279f38362
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O3 -fdump-tree-optimized" } */
|
||||
+
|
||||
+#include "arm_sve.h"
|
||||
+
|
||||
+svuint32_t l()
|
||||
+{
|
||||
+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0};
|
||||
+ return svld1rq_u32(svptrue_b8(), lanes);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
https://gcc.gnu.org/PR110792
|
||||
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=790c1f60a5662b16eb19eb4b81922995863c7571
|
||||
https://github.com/randombit/botan/issues/3637
|
||||
|
||||
From 85628c5653ff40963158a24c60eeec6a3b5a8e56 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Sayle <roger@nextmovesoftware.com>
|
||||
Date: Thu, 3 Aug 2023 07:12:04 +0100
|
||||
Subject: [PATCH] PR target/110792: Early clobber issues with
|
||||
rot32di2_doubleword on i386.
|
||||
|
||||
This patch is a conservative fix for PR target/110792, a wrong-code
|
||||
regression affecting doubleword rotations by BITS_PER_WORD, which
|
||||
effectively swaps the highpart and lowpart words, when the source to be
|
||||
rotated resides in memory. The issue is that if the register used to
|
||||
hold the lowpart of the destination is mentioned in the address of
|
||||
the memory operand, the current define_insn_and_split unintentionally
|
||||
clobbers it before reading the highpart.
|
||||
|
||||
Hence, for the testcase, the incorrectly generated code looks like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movq WHIRL_S+8(%rdi), %rdi // accidentally clobber addr
|
||||
movq WHIRL_S(%rdi), %rbp // load (wrong) lowpart
|
||||
|
||||
Traditionally, the textbook way to fix this would be to add an
|
||||
explicit early clobber to the instruction's constraints.
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r,&r")
|
||||
(any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
(const_int 32)))]
|
||||
|
||||
but unfortunately this currently generates significantly worse code,
|
||||
due to a strange choice of reloads (effectively memcpy), which ends up
|
||||
looking like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movdqa WHIRL_S(%rdi), %xmm0 // load the double word in SSE reg.
|
||||
movaps %xmm0, -16(%rsp) // store the SSE reg back to the stack
|
||||
movq -8(%rsp), %rdi // load highpart
|
||||
movq -16(%rsp), %rbp // load lowpart
|
||||
|
||||
Note that reload's "&" doesn't distinguish between the memory being
|
||||
early clobbered, vs the registers used in an addressing mode being
|
||||
early clobbered.
|
||||
|
||||
The fix proposed in this patch is to remove the third alternative, that
|
||||
allowed offsetable memory as an operand, forcing reload to place the
|
||||
operand into a register before the rotation. This results in:
|
||||
|
||||
salq $4, %rdi
|
||||
movq WHIRL_S(%rdi), %rax
|
||||
movq WHIRL_S+8(%rdi), %rdi
|
||||
movq %rax, %rbp
|
||||
|
||||
I believe there's a more advanced solution, by swapping the order of
|
||||
the loads (if first destination register is mentioned in the address),
|
||||
or inserting a lea insn (if both destination registers are mentioned
|
||||
in the address), but this fix is a minimal "safe" solution, that
|
||||
should hopefully be suitable for backporting.
|
||||
|
||||
2023-08-03 Roger Sayle <roger@nextmovesoftware.com>
|
||||
|
||||
gcc/ChangeLog
|
||||
PR target/110792
|
||||
* config/i386/i386.md (<any_rotate>ti3): For rotations by 64 bits
|
||||
place operand in a register before gen_<insn>64ti2_doubleword.
|
||||
(<any_rotate>di3): Likewise, for rotations by 32 bits, place
|
||||
operand in a register before gen_<insn>32di2_doubleword.
|
||||
(<any_rotate>32di2_doubleword): Constrain operand to be in register.
|
||||
(<any_rotate>64ti2_doubleword): Likewise.
|
||||
|
||||
gcc/testsuite/ChangeLog
|
||||
PR target/110792
|
||||
* g++.target/i386/pr110792.C: New 32-bit C++ test case.
|
||||
* gcc.target/i386/pr110792.c: New 64-bit C test case.
|
||||
|
||||
(cherry picked from commit 790c1f60a5662b16eb19eb4b81922995863c7571)
|
||||
---
|
||||
gcc/config/i386/i386.md | 18 ++++++++++++------
|
||||
gcc/testsuite/g++.target/i386/pr110792.C | 16 ++++++++++++++++
|
||||
gcc/testsuite/gcc.target/i386/pr110792.c | 18 ++++++++++++++++++
|
||||
3 files changed, 46 insertions(+), 6 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.target/i386/pr110792.C
|
||||
create mode 100644 gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
|
||||
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
|
||||
index f3a3305..a71e837 100644
|
||||
--- a/gcc/config/i386/i386.md
|
||||
+++ b/gcc/config/i386/i386.md
|
||||
@@ -14359,7 +14359,10 @@
|
||||
emit_insn (gen_ix86_<insn>ti3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 64)
|
||||
- emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (TImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
{
|
||||
rtx amount = force_reg (QImode, operands[2]);
|
||||
@@ -14394,7 +14397,10 @@
|
||||
emit_insn (gen_ix86_<insn>di3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 32)
|
||||
- emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (DImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
FAIL;
|
||||
|
||||
@@ -14562,8 +14568,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:DI (match_operand:DI 1 "register_operand" "0,r")
|
||||
(const_int 32)))]
|
||||
"!TARGET_64BIT"
|
||||
"#"
|
||||
@@ -14580,8 +14586,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>64ti2_doubleword"
|
||||
- [(set (match_operand:TI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:TI (match_operand:TI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:TI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:TI (match_operand:TI 1 "register_operand" "0,r")
|
||||
(const_int 64)))]
|
||||
"TARGET_64BIT"
|
||||
"#"
|
||||
diff --git a/gcc/testsuite/g++.target/i386/pr110792.C b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
new file mode 100644
|
||||
index 0000000..ce21a7a
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* { dg-do compile { target ia32 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+template <int ROT, typename T>
|
||||
+inline T rotr(T input)
|
||||
+{
|
||||
+ return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
|
||||
+}
|
||||
+
|
||||
+unsigned long long WHIRL_S[256] = {0x18186018C07830D8};
|
||||
+unsigned long long whirl(unsigned char x0)
|
||||
+{
|
||||
+ const unsigned long long s4 = WHIRL_S[x0&0xFF];
|
||||
+ return rotr<32>(s4);
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movl\tWHIRL_S\\+4\\(,%eax,8\\), %eax" } } */
|
||||
diff --git a/gcc/testsuite/gcc.target/i386/pr110792.c b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
new file mode 100644
|
||||
index 0000000..b65125c
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* { dg-do compile { target int128 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+static inline unsigned __int128 rotr(unsigned __int128 input)
|
||||
+{
|
||||
+ return ((input >> 64) | (input << (64)));
|
||||
+}
|
||||
+
|
||||
+unsigned __int128 WHIRL_S[256] = {((__int128)0x18186018C07830D8) << 64 |0x18186018C07830D8};
|
||||
+unsigned __int128 whirl(unsigned char x0)
|
||||
+{
|
||||
+ register int t __asm("rdi") = x0&0xFF;
|
||||
+ const unsigned __int128 s4 = WHIRL_S[t];
|
||||
+ register unsigned __int128 tt __asm("rdi") = rotr(s4);
|
||||
+ asm("":::"memory");
|
||||
+ return tt;
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movq\tWHIRL_S\\+8\\(%rdi\\), %rdi" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -24,8 +24,8 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-armv7
|
||||
pkgver=13.1.1_git20230722
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
pkgver=13.2.1_git20231014
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
_pkgsnap="${pkgver##*_git}"
|
||||
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armv7
|
||||
pkgrel=1
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -268,9 +268,13 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-Fix-ICE-observed-in-PR110280.patch
|
||||
0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 13.2.1_git20231014-r0:
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
@@ -428,6 +432,7 @@ package() {
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
make -C "$_builddir"/libgccjit-build/gcc DESTDIR="$pkgdir" jit.install-common
|
||||
@@ -782,7 +787,7 @@ gdb() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
284719308cad4546ebd85934fb9f12112e8f1a4c3e5beea0760da1f73509907c194e7c133e6e755b6148bd1c51a72c071ac0d16b05641d901af7105461686655 gcc-13-20230722.tar.xz
|
||||
406673a62deba759fc0532a801b3f57cabf894ea328587b23e62a707ba5767b0e3ae9b3f86bf3c6fcf13e8a3c30bc470e6598b625c8231efb629034211c162c2 gcc-13-20231014.tar.xz
|
||||
1ecffba1b07d60e1b4422302b032bbea918b674c8e12b30aa6965b544d700ce86b61e9f7b8d402c6caf59257f491a394dd0912f0948565d6eae9335ee54f3b35 0001-posix_memalign.patch
|
||||
163f282455b6a4df33f011bcd8b0440566ba0ffaeeab30d8ac52d39948980a56881ca0eff60687129d59556389a58b9d64e7768750bd70b1fe0fedbc9fc30dc2 0002-gcc-poison-system-directories.patch
|
||||
3f24bb6a50d3c45b71ea05590e32fe3e69b91377ab185352891d5035c76ed193117c6d0b314a4c364bcf136b9a9dd5c926d6c7c30ab436976c121ebfea8d3ddd 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -817,5 +822,5 @@ d47b559075f40d526235f47b91da1d0cf6bfe6c5b7311bbfe08af9dd6e8f27e6c7cd82e3b2d529aa
|
||||
b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95e21c9ffbf2412193f8b9fc89a4c36fa5a6a041661ac7399d 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
048d767f4477c92ee6835850d13063ede21c0be751d0945c94445d04054e134cdc617eeb0b1ac8c892a604d8644580fcfebeccaf537d6b7380558ac6378e445a 0035-Fix-ICE-observed-in-PR110280.patch
|
||||
cc1e10ac6e72db816f09325e301103109cc212a6f3de3ce0b9b038d149233c467319d203941695dbf3d7b9e2dcbbcd17609cdb056e831fcc323cd592423882d8 0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
@@ -1,61 +0,0 @@
|
||||
From ef740fff300fd9eb8285fb5611f6205705ee54ec Mon Sep 17 00:00:00 2001
|
||||
From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
|
||||
Date: Fri, 23 Jun 2023 15:27:17 +0530
|
||||
Subject: [PATCH 35/35] Fix ICE observed in PR110280.
|
||||
|
||||
gcc/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector
|
||||
using build_vector_from_val with the element of input operand, and
|
||||
mask's type if operand and mask's types don't match.
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
PR tree-optimization/110280
|
||||
* gcc.target/aarch64/sve/pr110280.c: New test.
|
||||
---
|
||||
gcc/match.pd | 9 ++++++++-
|
||||
gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++
|
||||
2 files changed, 20 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
|
||||
diff --git a/gcc/match.pd b/gcc/match.pd
|
||||
index 91182448250..c3bb4fbc0a7 100644
|
||||
--- a/gcc/match.pd
|
||||
+++ b/gcc/match.pd
|
||||
@@ -8292,7 +8292,14 @@ and,
|
||||
|
||||
(simplify
|
||||
(vec_perm vec_same_elem_p@0 @0 @1)
|
||||
- @0)
|
||||
+ (if (types_match (type, TREE_TYPE (@0)))
|
||||
+ @0
|
||||
+ (with
|
||||
+ {
|
||||
+ tree elem = uniform_vector_p (@0);
|
||||
+ }
|
||||
+ (if (elem)
|
||||
+ { build_vector_from_val (type, elem); }))))
|
||||
|
||||
/* Push VEC_PERM earlier if that may help FMA perception (PR101895). */
|
||||
(simplify
|
||||
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
new file mode 100644
|
||||
index 00000000000..d3279f38362
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O3 -fdump-tree-optimized" } */
|
||||
+
|
||||
+#include "arm_sve.h"
|
||||
+
|
||||
+svuint32_t l()
|
||||
+{
|
||||
+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0};
|
||||
+ return svld1rq_u32(svptrue_b8(), lanes);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,186 @@
|
||||
https://gcc.gnu.org/PR110792
|
||||
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=790c1f60a5662b16eb19eb4b81922995863c7571
|
||||
https://github.com/randombit/botan/issues/3637
|
||||
|
||||
From 85628c5653ff40963158a24c60eeec6a3b5a8e56 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Sayle <roger@nextmovesoftware.com>
|
||||
Date: Thu, 3 Aug 2023 07:12:04 +0100
|
||||
Subject: [PATCH] PR target/110792: Early clobber issues with
|
||||
rot32di2_doubleword on i386.
|
||||
|
||||
This patch is a conservative fix for PR target/110792, a wrong-code
|
||||
regression affecting doubleword rotations by BITS_PER_WORD, which
|
||||
effectively swaps the highpart and lowpart words, when the source to be
|
||||
rotated resides in memory. The issue is that if the register used to
|
||||
hold the lowpart of the destination is mentioned in the address of
|
||||
the memory operand, the current define_insn_and_split unintentionally
|
||||
clobbers it before reading the highpart.
|
||||
|
||||
Hence, for the testcase, the incorrectly generated code looks like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movq WHIRL_S+8(%rdi), %rdi // accidentally clobber addr
|
||||
movq WHIRL_S(%rdi), %rbp // load (wrong) lowpart
|
||||
|
||||
Traditionally, the textbook way to fix this would be to add an
|
||||
explicit early clobber to the instruction's constraints.
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r,&r")
|
||||
(any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
(const_int 32)))]
|
||||
|
||||
but unfortunately this currently generates significantly worse code,
|
||||
due to a strange choice of reloads (effectively memcpy), which ends up
|
||||
looking like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movdqa WHIRL_S(%rdi), %xmm0 // load the double word in SSE reg.
|
||||
movaps %xmm0, -16(%rsp) // store the SSE reg back to the stack
|
||||
movq -8(%rsp), %rdi // load highpart
|
||||
movq -16(%rsp), %rbp // load lowpart
|
||||
|
||||
Note that reload's "&" doesn't distinguish between the memory being
|
||||
early clobbered, vs the registers used in an addressing mode being
|
||||
early clobbered.
|
||||
|
||||
The fix proposed in this patch is to remove the third alternative, that
|
||||
allowed offsetable memory as an operand, forcing reload to place the
|
||||
operand into a register before the rotation. This results in:
|
||||
|
||||
salq $4, %rdi
|
||||
movq WHIRL_S(%rdi), %rax
|
||||
movq WHIRL_S+8(%rdi), %rdi
|
||||
movq %rax, %rbp
|
||||
|
||||
I believe there's a more advanced solution, by swapping the order of
|
||||
the loads (if first destination register is mentioned in the address),
|
||||
or inserting a lea insn (if both destination registers are mentioned
|
||||
in the address), but this fix is a minimal "safe" solution, that
|
||||
should hopefully be suitable for backporting.
|
||||
|
||||
2023-08-03 Roger Sayle <roger@nextmovesoftware.com>
|
||||
|
||||
gcc/ChangeLog
|
||||
PR target/110792
|
||||
* config/i386/i386.md (<any_rotate>ti3): For rotations by 64 bits
|
||||
place operand in a register before gen_<insn>64ti2_doubleword.
|
||||
(<any_rotate>di3): Likewise, for rotations by 32 bits, place
|
||||
operand in a register before gen_<insn>32di2_doubleword.
|
||||
(<any_rotate>32di2_doubleword): Constrain operand to be in register.
|
||||
(<any_rotate>64ti2_doubleword): Likewise.
|
||||
|
||||
gcc/testsuite/ChangeLog
|
||||
PR target/110792
|
||||
* g++.target/i386/pr110792.C: New 32-bit C++ test case.
|
||||
* gcc.target/i386/pr110792.c: New 64-bit C test case.
|
||||
|
||||
(cherry picked from commit 790c1f60a5662b16eb19eb4b81922995863c7571)
|
||||
---
|
||||
gcc/config/i386/i386.md | 18 ++++++++++++------
|
||||
gcc/testsuite/g++.target/i386/pr110792.C | 16 ++++++++++++++++
|
||||
gcc/testsuite/gcc.target/i386/pr110792.c | 18 ++++++++++++++++++
|
||||
3 files changed, 46 insertions(+), 6 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.target/i386/pr110792.C
|
||||
create mode 100644 gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
|
||||
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
|
||||
index f3a3305..a71e837 100644
|
||||
--- a/gcc/config/i386/i386.md
|
||||
+++ b/gcc/config/i386/i386.md
|
||||
@@ -14359,7 +14359,10 @@
|
||||
emit_insn (gen_ix86_<insn>ti3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 64)
|
||||
- emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (TImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
{
|
||||
rtx amount = force_reg (QImode, operands[2]);
|
||||
@@ -14394,7 +14397,10 @@
|
||||
emit_insn (gen_ix86_<insn>di3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 32)
|
||||
- emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (DImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
FAIL;
|
||||
|
||||
@@ -14562,8 +14568,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:DI (match_operand:DI 1 "register_operand" "0,r")
|
||||
(const_int 32)))]
|
||||
"!TARGET_64BIT"
|
||||
"#"
|
||||
@@ -14580,8 +14586,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>64ti2_doubleword"
|
||||
- [(set (match_operand:TI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:TI (match_operand:TI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:TI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:TI (match_operand:TI 1 "register_operand" "0,r")
|
||||
(const_int 64)))]
|
||||
"TARGET_64BIT"
|
||||
"#"
|
||||
diff --git a/gcc/testsuite/g++.target/i386/pr110792.C b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
new file mode 100644
|
||||
index 0000000..ce21a7a
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* { dg-do compile { target ia32 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+template <int ROT, typename T>
|
||||
+inline T rotr(T input)
|
||||
+{
|
||||
+ return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
|
||||
+}
|
||||
+
|
||||
+unsigned long long WHIRL_S[256] = {0x18186018C07830D8};
|
||||
+unsigned long long whirl(unsigned char x0)
|
||||
+{
|
||||
+ const unsigned long long s4 = WHIRL_S[x0&0xFF];
|
||||
+ return rotr<32>(s4);
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movl\tWHIRL_S\\+4\\(,%eax,8\\), %eax" } } */
|
||||
diff --git a/gcc/testsuite/gcc.target/i386/pr110792.c b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
new file mode 100644
|
||||
index 0000000..b65125c
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* { dg-do compile { target int128 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+static inline unsigned __int128 rotr(unsigned __int128 input)
|
||||
+{
|
||||
+ return ((input >> 64) | (input << (64)));
|
||||
+}
|
||||
+
|
||||
+unsigned __int128 WHIRL_S[256] = {((__int128)0x18186018C07830D8) << 64 |0x18186018C07830D8};
|
||||
+unsigned __int128 whirl(unsigned char x0)
|
||||
+{
|
||||
+ register int t __asm("rdi") = x0&0xFF;
|
||||
+ const unsigned __int128 s4 = WHIRL_S[t];
|
||||
+ register unsigned __int128 tt __asm("rdi") = rotr(s4);
|
||||
+ asm("":::"memory");
|
||||
+ return tt;
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movq\tWHIRL_S\\+8\\(%rdi\\), %rdi" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-armhf
|
||||
# Generator: pmbootstrap aportgen gcc-x86
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=armhf
|
||||
CTARGET_ARCH=x86
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
LANG_OBJC=false
|
||||
@@ -23,9 +23,9 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgver=13.1.1_git20230722
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
pkgname=gcc-x86
|
||||
pkgver=13.2.1_git20231014
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
_pkgsnap="${pkgver##*_git}"
|
||||
@@ -33,17 +33,17 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgrel=1
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
pkgname=gcc-x86
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for x86"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armhf mpc1"
|
||||
depends="binutils-x86 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
|
||||
subpackages="g++-armhf:gpp libstdc++-dev-armhf:libcxx_dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86 binutils-x86"
|
||||
subpackages="g++-x86:gpp libstdc++-dev-x86:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
|
||||
@@ -268,9 +268,13 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-Fix-ICE-observed-in-PR110280.patch
|
||||
0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 13.2.1_git20231014-r0:
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
@@ -428,6 +432,7 @@ package() {
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
make -C "$_builddir"/libgccjit-build/gcc DESTDIR="$pkgdir" jit.install-common
|
||||
@@ -782,7 +787,7 @@ gdb() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
284719308cad4546ebd85934fb9f12112e8f1a4c3e5beea0760da1f73509907c194e7c133e6e755b6148bd1c51a72c071ac0d16b05641d901af7105461686655 gcc-13-20230722.tar.xz
|
||||
406673a62deba759fc0532a801b3f57cabf894ea328587b23e62a707ba5767b0e3ae9b3f86bf3c6fcf13e8a3c30bc470e6598b625c8231efb629034211c162c2 gcc-13-20231014.tar.xz
|
||||
1ecffba1b07d60e1b4422302b032bbea918b674c8e12b30aa6965b544d700ce86b61e9f7b8d402c6caf59257f491a394dd0912f0948565d6eae9335ee54f3b35 0001-posix_memalign.patch
|
||||
163f282455b6a4df33f011bcd8b0440566ba0ffaeeab30d8ac52d39948980a56881ca0eff60687129d59556389a58b9d64e7768750bd70b1fe0fedbc9fc30dc2 0002-gcc-poison-system-directories.patch
|
||||
3f24bb6a50d3c45b71ea05590e32fe3e69b91377ab185352891d5035c76ed193117c6d0b314a4c364bcf136b9a9dd5c926d6c7c30ab436976c121ebfea8d3ddd 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -817,5 +822,5 @@ d47b559075f40d526235f47b91da1d0cf6bfe6c5b7311bbfe08af9dd6e8f27e6c7cd82e3b2d529aa
|
||||
b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95e21c9ffbf2412193f8b9fc89a4c36fa5a6a041661ac7399d 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
048d767f4477c92ee6835850d13063ede21c0be751d0945c94445d04054e134cdc617eeb0b1ac8c892a604d8644580fcfebeccaf537d6b7380558ac6378e445a 0035-Fix-ICE-observed-in-PR110280.patch
|
||||
cc1e10ac6e72db816f09325e301103109cc212a6f3de3ce0b9b038d149233c467319d203941695dbf3d7b9e2dcbbcd17609cdb056e831fcc323cd592423882d8 0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,186 @@
|
||||
https://gcc.gnu.org/PR110792
|
||||
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=790c1f60a5662b16eb19eb4b81922995863c7571
|
||||
https://github.com/randombit/botan/issues/3637
|
||||
|
||||
From 85628c5653ff40963158a24c60eeec6a3b5a8e56 Mon Sep 17 00:00:00 2001
|
||||
From: Roger Sayle <roger@nextmovesoftware.com>
|
||||
Date: Thu, 3 Aug 2023 07:12:04 +0100
|
||||
Subject: [PATCH] PR target/110792: Early clobber issues with
|
||||
rot32di2_doubleword on i386.
|
||||
|
||||
This patch is a conservative fix for PR target/110792, a wrong-code
|
||||
regression affecting doubleword rotations by BITS_PER_WORD, which
|
||||
effectively swaps the highpart and lowpart words, when the source to be
|
||||
rotated resides in memory. The issue is that if the register used to
|
||||
hold the lowpart of the destination is mentioned in the address of
|
||||
the memory operand, the current define_insn_and_split unintentionally
|
||||
clobbers it before reading the highpart.
|
||||
|
||||
Hence, for the testcase, the incorrectly generated code looks like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movq WHIRL_S+8(%rdi), %rdi // accidentally clobber addr
|
||||
movq WHIRL_S(%rdi), %rbp // load (wrong) lowpart
|
||||
|
||||
Traditionally, the textbook way to fix this would be to add an
|
||||
explicit early clobber to the instruction's constraints.
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r,&r")
|
||||
(any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
(const_int 32)))]
|
||||
|
||||
but unfortunately this currently generates significantly worse code,
|
||||
due to a strange choice of reloads (effectively memcpy), which ends up
|
||||
looking like:
|
||||
|
||||
salq $4, %rdi // calculate address
|
||||
movdqa WHIRL_S(%rdi), %xmm0 // load the double word in SSE reg.
|
||||
movaps %xmm0, -16(%rsp) // store the SSE reg back to the stack
|
||||
movq -8(%rsp), %rdi // load highpart
|
||||
movq -16(%rsp), %rbp // load lowpart
|
||||
|
||||
Note that reload's "&" doesn't distinguish between the memory being
|
||||
early clobbered, vs the registers used in an addressing mode being
|
||||
early clobbered.
|
||||
|
||||
The fix proposed in this patch is to remove the third alternative, that
|
||||
allowed offsetable memory as an operand, forcing reload to place the
|
||||
operand into a register before the rotation. This results in:
|
||||
|
||||
salq $4, %rdi
|
||||
movq WHIRL_S(%rdi), %rax
|
||||
movq WHIRL_S+8(%rdi), %rdi
|
||||
movq %rax, %rbp
|
||||
|
||||
I believe there's a more advanced solution, by swapping the order of
|
||||
the loads (if first destination register is mentioned in the address),
|
||||
or inserting a lea insn (if both destination registers are mentioned
|
||||
in the address), but this fix is a minimal "safe" solution, that
|
||||
should hopefully be suitable for backporting.
|
||||
|
||||
2023-08-03 Roger Sayle <roger@nextmovesoftware.com>
|
||||
|
||||
gcc/ChangeLog
|
||||
PR target/110792
|
||||
* config/i386/i386.md (<any_rotate>ti3): For rotations by 64 bits
|
||||
place operand in a register before gen_<insn>64ti2_doubleword.
|
||||
(<any_rotate>di3): Likewise, for rotations by 32 bits, place
|
||||
operand in a register before gen_<insn>32di2_doubleword.
|
||||
(<any_rotate>32di2_doubleword): Constrain operand to be in register.
|
||||
(<any_rotate>64ti2_doubleword): Likewise.
|
||||
|
||||
gcc/testsuite/ChangeLog
|
||||
PR target/110792
|
||||
* g++.target/i386/pr110792.C: New 32-bit C++ test case.
|
||||
* gcc.target/i386/pr110792.c: New 64-bit C test case.
|
||||
|
||||
(cherry picked from commit 790c1f60a5662b16eb19eb4b81922995863c7571)
|
||||
---
|
||||
gcc/config/i386/i386.md | 18 ++++++++++++------
|
||||
gcc/testsuite/g++.target/i386/pr110792.C | 16 ++++++++++++++++
|
||||
gcc/testsuite/gcc.target/i386/pr110792.c | 18 ++++++++++++++++++
|
||||
3 files changed, 46 insertions(+), 6 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.target/i386/pr110792.C
|
||||
create mode 100644 gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
|
||||
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
|
||||
index f3a3305..a71e837 100644
|
||||
--- a/gcc/config/i386/i386.md
|
||||
+++ b/gcc/config/i386/i386.md
|
||||
@@ -14359,7 +14359,10 @@
|
||||
emit_insn (gen_ix86_<insn>ti3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 64)
|
||||
- emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (TImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>64ti2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
{
|
||||
rtx amount = force_reg (QImode, operands[2]);
|
||||
@@ -14394,7 +14397,10 @@
|
||||
emit_insn (gen_ix86_<insn>di3_doubleword
|
||||
(operands[0], operands[1], operands[2]));
|
||||
else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 32)
|
||||
- emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ {
|
||||
+ operands[1] = force_reg (DImode, operands[1]);
|
||||
+ emit_insn (gen_<insn>32di2_doubleword (operands[0], operands[1]));
|
||||
+ }
|
||||
else
|
||||
FAIL;
|
||||
|
||||
@@ -14562,8 +14568,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>32di2_doubleword"
|
||||
- [(set (match_operand:DI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:DI (match_operand:DI 1 "register_operand" "0,r")
|
||||
(const_int 32)))]
|
||||
"!TARGET_64BIT"
|
||||
"#"
|
||||
@@ -14580,8 +14586,8 @@
|
||||
})
|
||||
|
||||
(define_insn_and_split "<insn>64ti2_doubleword"
|
||||
- [(set (match_operand:TI 0 "register_operand" "=r,r,r")
|
||||
- (any_rotate:TI (match_operand:TI 1 "nonimmediate_operand" "0,r,o")
|
||||
+ [(set (match_operand:TI 0 "register_operand" "=r,r")
|
||||
+ (any_rotate:TI (match_operand:TI 1 "register_operand" "0,r")
|
||||
(const_int 64)))]
|
||||
"TARGET_64BIT"
|
||||
"#"
|
||||
diff --git a/gcc/testsuite/g++.target/i386/pr110792.C b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
new file mode 100644
|
||||
index 0000000..ce21a7a
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.target/i386/pr110792.C
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* { dg-do compile { target ia32 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+template <int ROT, typename T>
|
||||
+inline T rotr(T input)
|
||||
+{
|
||||
+ return static_cast<T>((input >> ROT) | (input << (8 * sizeof(T) - ROT)));
|
||||
+}
|
||||
+
|
||||
+unsigned long long WHIRL_S[256] = {0x18186018C07830D8};
|
||||
+unsigned long long whirl(unsigned char x0)
|
||||
+{
|
||||
+ const unsigned long long s4 = WHIRL_S[x0&0xFF];
|
||||
+ return rotr<32>(s4);
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movl\tWHIRL_S\\+4\\(,%eax,8\\), %eax" } } */
|
||||
diff --git a/gcc/testsuite/gcc.target/i386/pr110792.c b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
new file mode 100644
|
||||
index 0000000..b65125c
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/i386/pr110792.c
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* { dg-do compile { target int128 } } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+
|
||||
+static inline unsigned __int128 rotr(unsigned __int128 input)
|
||||
+{
|
||||
+ return ((input >> 64) | (input << (64)));
|
||||
+}
|
||||
+
|
||||
+unsigned __int128 WHIRL_S[256] = {((__int128)0x18186018C07830D8) << 64 |0x18186018C07830D8};
|
||||
+unsigned __int128 whirl(unsigned char x0)
|
||||
+{
|
||||
+ register int t __asm("rdi") = x0&0xFF;
|
||||
+ const unsigned __int128 s4 = WHIRL_S[t];
|
||||
+ register unsigned __int128 tt __asm("rdi") = rotr(s4);
|
||||
+ asm("":::"memory");
|
||||
+ return tt;
|
||||
+}
|
||||
+/* { dg-final { scan-assembler-not "movq\tWHIRL_S\\+8\\(%rdi\\), %rdi" } } */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-riscv64
|
||||
# Generator: pmbootstrap aportgen gcc-x86_64
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=riscv64
|
||||
CTARGET_ARCH=x86_64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
LANG_OBJC=false
|
||||
@@ -23,9 +23,9 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-riscv64
|
||||
pkgver=13.1.1_git20230722
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
pkgname=gcc-x86_64
|
||||
pkgver=13.2.1_git20231014
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
_pkgsnap="${pkgver##*_git}"
|
||||
@@ -33,17 +33,17 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-riscv64
|
||||
pkgrel=1
|
||||
pkgdesc="Stage2 cross-compiler for riscv64"
|
||||
pkgname=gcc-x86_64
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for x86_64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
arch="aarch64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-riscv64 mpc1"
|
||||
depends="binutils-x86_64 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-riscv64 binutils-riscv64"
|
||||
subpackages="g++-riscv64:gpp libstdc++-dev-riscv64:libcxx_dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86_64 binutils-x86_64"
|
||||
subpackages="g++-x86_64:gpp libstdc++-dev-x86_64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
|
||||
@@ -268,9 +268,13 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
0035-Fix-ICE-observed-in-PR110280.patch
|
||||
0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 13.2.1_git20231014-r0:
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
@@ -428,6 +432,7 @@ package() {
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
make -C "$_builddir"/libgccjit-build/gcc DESTDIR="$pkgdir" jit.install-common
|
||||
@@ -782,7 +787,7 @@ gdb() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
284719308cad4546ebd85934fb9f12112e8f1a4c3e5beea0760da1f73509907c194e7c133e6e755b6148bd1c51a72c071ac0d16b05641d901af7105461686655 gcc-13-20230722.tar.xz
|
||||
406673a62deba759fc0532a801b3f57cabf894ea328587b23e62a707ba5767b0e3ae9b3f86bf3c6fcf13e8a3c30bc470e6598b625c8231efb629034211c162c2 gcc-13-20231014.tar.xz
|
||||
1ecffba1b07d60e1b4422302b032bbea918b674c8e12b30aa6965b544d700ce86b61e9f7b8d402c6caf59257f491a394dd0912f0948565d6eae9335ee54f3b35 0001-posix_memalign.patch
|
||||
163f282455b6a4df33f011bcd8b0440566ba0ffaeeab30d8ac52d39948980a56881ca0eff60687129d59556389a58b9d64e7768750bd70b1fe0fedbc9fc30dc2 0002-gcc-poison-system-directories.patch
|
||||
3f24bb6a50d3c45b71ea05590e32fe3e69b91377ab185352891d5035c76ed193117c6d0b314a4c364bcf136b9a9dd5c926d6c7c30ab436976c121ebfea8d3ddd 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -817,5 +822,5 @@ d47b559075f40d526235f47b91da1d0cf6bfe6c5b7311bbfe08af9dd6e8f27e6c7cd82e3b2d529aa
|
||||
b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95e21c9ffbf2412193f8b9fc89a4c36fa5a6a041661ac7399d 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
|
||||
048d767f4477c92ee6835850d13063ede21c0be751d0945c94445d04054e134cdc617eeb0b1ac8c892a604d8644580fcfebeccaf537d6b7380558ac6378e445a 0035-Fix-ICE-observed-in-PR110280.patch
|
||||
cc1e10ac6e72db816f09325e301103109cc212a6f3de3ce0b9b038d149233c467319d203941695dbf3d7b9e2dcbbcd17609cdb056e831fcc323cd592423882d8 0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
File renamed without changes.
@@ -1,156 +0,0 @@
|
||||
2013-12-30 Magnus Granberg <zorry@gentoo.org>
|
||||
|
||||
* gcc/configure.ac Add --enable-esp and define ENABLE_ESP.
|
||||
Check if we support crtbeginP and define ENABLE_CRTBEGINP.
|
||||
* gcc/configure Regenerated
|
||||
|
||||
|
||||
--- a/gcc/configure.ac 2011-11-18 11:52:32.000000000 +0100
|
||||
+++ b/gcc/configure.ac 2012-10-02 17:39:15.649526241 +0200
|
||||
@@ -5130,6 +5237,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th
|
||||
[The linker hash style])
|
||||
fi
|
||||
|
||||
+# --------------
|
||||
+# Esp checks
|
||||
+# --------------
|
||||
+
|
||||
+# Check whether --enable-esp was given and target have the support.
|
||||
+AC_ARG_ENABLE([esp],
|
||||
+[AS_HELP_STRING([--enable-esp],
|
||||
+ [Enable Stack protector and Position independent executable as
|
||||
+ default if we have suppot for it when compiling
|
||||
+ and link with -z now as default.
|
||||
+ Linux targets supported i*86, x86_64, x32,
|
||||
+ powerpc, powerpc64, ia64, arm and mips.])],
|
||||
+ enable_esp=$enableval,
|
||||
+ enable_esp=no)
|
||||
+if test $enable_esp = yes ; then
|
||||
+ AC_MSG_CHECKING(if $target support esp)
|
||||
+ case "$target" in
|
||||
+ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*)
|
||||
+ enable_esp=yes
|
||||
+ AC_DEFINE(ENABLE_ESP, 1,
|
||||
+ [Define if your target support esp and you have enable it.])
|
||||
+ ;;
|
||||
+ *)
|
||||
+ enable_esp=no
|
||||
+ ;;
|
||||
+ esac
|
||||
+AC_MSG_RESULT($enable_esp)
|
||||
+fi
|
||||
+AC_SUBST([enable_esp])
|
||||
+if test $enable_esp = yes ; then
|
||||
+ AC_MSG_CHECKING(checking for crtbeginP.o support)
|
||||
+ if test x$enable_esp = xyes ; then
|
||||
+ case "$target" in
|
||||
+ ia64*-*-linux*)
|
||||
+ enable_crtbeginP=no ;;
|
||||
+ *-*-linux*)
|
||||
+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
|
||||
+ enable_crtbeginP=yes
|
||||
+ AC_DEFINE(ENABLE_CRTBEGINP, 1,
|
||||
+ [Define if your compiler will support crtbeginP.])
|
||||
+ fi
|
||||
+ ;;
|
||||
+ *) enable_crtbeginP=no ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ AC_MSG_RESULT($enable_crtbeginP)
|
||||
+fi
|
||||
+AC_SUBST([enable_crtbeginP])
|
||||
+
|
||||
# Configure the subdirectories
|
||||
# AC_CONFIG_SUBDIRS($subdirs)
|
||||
|
||||
--- a/gcc/configure 2013-02-01 21:26:24.000000000 +0100
|
||||
+++ b/gcc/configure 2013-02-12 01:59:20.000000000 +0100
|
||||
@@ -600,6 +600,8 @@
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
PICFLAG
|
||||
+enable_crtbeginP
|
||||
+enable_esp
|
||||
enable_host_shared
|
||||
enable_plugin
|
||||
pluginlibs
|
||||
@@ -920,6 +922,7 @@
|
||||
enable_plugin
|
||||
enable_libquadmath_support
|
||||
with_linker_hash_style
|
||||
+enable_esp
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
@@ -1633,6 +1636,11 @@
|
||||
--enable-plugin enable plugin support
|
||||
--disable-libquadmath-support
|
||||
disable libquadmath support for Fortran
|
||||
+ --enable-esp Enable Stack protector and Position independent
|
||||
+ executable as default if we have suppot for it when
|
||||
+ compiling and link with -z now as default.
|
||||
+ Linux targets supported i*86, x86_64, x32,
|
||||
+ powerpc, powerpc64, ia64, arm and mips.
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
@@ -27419,6 +27427,59 @@
|
||||
|
||||
fi
|
||||
|
||||
+# --------------
|
||||
+# Esp checks
|
||||
+# --------------
|
||||
+
|
||||
+# Check whether --enable-esp was given and target have the support.
|
||||
+# Check whether --enable-esp was given.
|
||||
+if test "${enable_esp+set}" = set; then :
|
||||
+ enableval=$enable_esp; enable_esp=$enableval
|
||||
+else
|
||||
+ enable_esp=no
|
||||
+fi
|
||||
+
|
||||
+if test $enable_esp = yes ; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5
|
||||
+$as_echo_n "checking if $target support esp... " >&6; }
|
||||
+ case "$target" in
|
||||
+ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*)
|
||||
+ enable_esp=yes
|
||||
+
|
||||
+$as_echo "#define ENABLE_ESP 1" >>confdefs.h
|
||||
+
|
||||
+ ;;
|
||||
+ *)
|
||||
+ enable_esp=no
|
||||
+ ;;
|
||||
+ esac
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5
|
||||
+$as_echo "$enable_esp" >&6; }
|
||||
+fi
|
||||
+
|
||||
+if test $enable_esp = yes ; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o support" >&5
|
||||
+$as_echo_n "checking checking for crtbeginP.o support... " >&6; }
|
||||
+ if test x$enable_esp = xyes ; then
|
||||
+ case "$target" in
|
||||
+ ia64*-*-linux*)
|
||||
+ enable_crtbeginP=no ;;
|
||||
+ *-*-linux*)
|
||||
+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
|
||||
+ enable_crtbeginP=yes
|
||||
+
|
||||
+$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h
|
||||
+
|
||||
+ fi
|
||||
+ ;;
|
||||
+ *) enable_crtbeginP=no ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5
|
||||
+$as_echo "$enable_crtbeginP" >&6; }
|
||||
+fi
|
||||
+
|
||||
+
|
||||
# Configure the subdirectories
|
||||
# AC_CONFIG_SUBDIRS($subdirs)
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
2013-02-13 Magnus Granberg <zorry@gentoo.org>
|
||||
|
||||
* gcc/config.in Add ENABLE_CRTBEGINP, ENABLE_ESP
|
||||
|
||||
--- ./gcc/config.in 2009-04-21 11:08:08.000000000 +0200
|
||||
+++ ./gcc/config.in 2009-05-12 00:10:08.000000000 +0200
|
||||
@@ -46,6 +46,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
+/* Define to 1 to enable crtbeginP.o. */
|
||||
+#ifndef USED_FOR_TARGET
|
||||
+#undef ENABLE_CRTBEGINP
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* Define to 1 to specify that we are using the BID decimal floating point
|
||||
format instead of DPD */
|
||||
#ifndef USED_FOR_TARGET
|
||||
@@ -65,6 +65,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
+/* Define to 1 to enable esp. */
|
||||
+#ifndef USED_FOR_TARGET
|
||||
+#undef ENABLE_ESP
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* Define to 1 to enable fixed-point arithmetic extension to C. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef ENABLE_FIXED_POINT
|
||||
@@ -1,96 +0,0 @@
|
||||
2012-01-17 Magnus Granberg <zorry@gentoo.org>
|
||||
|
||||
* gcc/Makefile.in Add -fno-PIE. to ALL_CFLAGS and
|
||||
ALL_CXXFLAGS if enable_esp yes.
|
||||
Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars.
|
||||
* libgcc/Makefile.in Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes
|
||||
We add new file crtbeginP.o if enable_crtbeginP yes
|
||||
Add -fno-PIE. to CRTSTUFF_CFLAGS.
|
||||
|
||||
--- a/gcc/Makefile.in 2011-11-09 02:20:14.000000000 +0100
|
||||
+++ b/gcc/Makefile.in 2011-12-24 22:28:08.864804375 +0100
|
||||
@@ -247,6 +247,14 @@ LINKER_FLAGS = $(CFLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
+# We don't want to compile the compiler with -fPIE, it make PCH fail.
|
||||
+enable_esp = @enable_esp@
|
||||
+ifeq ($(enable_esp),yes)
|
||||
+ESP_NOPIE_CFLAGS = -fno-PIE
|
||||
+else
|
||||
+ESP_NOPIE_CFLAGS=
|
||||
+endif
|
||||
+
|
||||
# -------------------------------------------
|
||||
# Programs which operate on the build machine
|
||||
# -------------------------------------------
|
||||
@@ -974,12 +982,13 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
|
||||
|
||||
# This is the variable actually used when we compile. If you change this,
|
||||
# you probably want to update BUILD_CFLAGS in configure.ac
|
||||
-ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
|
||||
+ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
|
||||
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
|
||||
|
||||
# The C++ version.
|
||||
-ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
|
||||
- $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@
|
||||
+ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \
|
||||
+ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \
|
||||
+ $(WARN_CXXFLAGS) @DEFS@
|
||||
|
||||
# Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
|
||||
# puts -I options in CPPFLAGS, our include files in the srcdir will always
|
||||
@@ -1814,6 +1823,8 @@ libgcc.mvars: config.status Makefile spe
|
||||
echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars
|
||||
echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars
|
||||
echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
|
||||
+ echo enable_esp = '$(enable_esp)' >> tmp-libgcc.mvars
|
||||
+ echo enable_crtbeginP = '@enable_crtbeginP@' >> tmp-libgcc.mvars
|
||||
|
||||
mv tmp-libgcc.mvars libgcc.mvars
|
||||
|
||||
--- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100
|
||||
+++ b/libgcc/Makefile.in 2011-12-25 15:18:22.449610631 +0100
|
||||
@@ -219,6 +219,17 @@ else
|
||||
DECNUMINC =
|
||||
endif
|
||||
|
||||
+ifeq ($(enable_esp),yes)
|
||||
+ESP_NOPIE_CFLAGS = -fno-PIE
|
||||
+else
|
||||
+ESP_NOPIE_CFLAGS=
|
||||
+endif
|
||||
+
|
||||
+# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes
|
||||
+ifeq ($(enable_crtbeginP),yes)
|
||||
+EXTRA_PARTS += crtbeginP.o
|
||||
+endif
|
||||
+
|
||||
# Options to use when compiling libgcc2.a.
|
||||
#
|
||||
LIBGCC2_DEBUG_CFLAGS = -g
|
||||
@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
|
||||
CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
|
||||
-finhibit-size-directive -fno-inline -fno-exceptions \
|
||||
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
|
||||
- -fno-stack-protector \
|
||||
+ -fno-stack-protector $(ESP_NOPIE_CFLAGS) \
|
||||
$(INHIBIT_LIBC_CFLAGS)
|
||||
|
||||
# Extra flags to use when compiling crt{begin,end}.o.
|
||||
@@ -966,6 +977,13 @@ crtendS$(objext): $(srcdir)/crtstuff.c
|
||||
# This is a version of crtbegin for -static links.
|
||||
crtbeginT$(objext): $(srcdir)/crtstuff.c
|
||||
$(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O
|
||||
+
|
||||
+# This is a version of crtbegin for -static -fPIE links.
|
||||
+ifeq ($(enable_crtbeginP),yes)
|
||||
+crtbeginP$(objext): $(srcdir)/crtstuff.c
|
||||
+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \
|
||||
+ -c $< -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O
|
||||
+endif
|
||||
|
||||
ifeq ($(enable_vtable_verify),yes)
|
||||
# These are used in vtable verification; see comments in source files for
|
||||
|
||||
Loaded 100 of 4953 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user