Compare commits
316
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
111af9495a | ||
|
|
85b2f83b9d | ||
|
|
74565c5321 | ||
|
|
2ddce77e9b | ||
|
|
8b8c03461b | ||
|
|
753b12a793 | ||
|
|
540c678ad2 | ||
|
|
9b15060d54 | ||
|
|
e9222cb0b6 | ||
|
|
a75a7cf685 | ||
|
|
7806d4f2b6 | ||
|
|
d7dbabe46f | ||
|
|
304b4043b8 | ||
|
|
6dd2396695 | ||
|
|
a27736f599 | ||
|
|
9b1b2a1a32 | ||
|
|
9b34d19498 | ||
|
|
b9ecefbf67 | ||
|
|
16cb5fa1dc | ||
|
|
0722c95c1c | ||
|
|
1fbbc17339 | ||
|
|
93a3a97c95 | ||
|
|
3e4816e2bd | ||
|
|
6c0391deb4 | ||
|
|
fe4254f697 | ||
|
|
57744b984e | ||
|
|
241ade087f | ||
|
|
190860eb5f | ||
|
|
22c3cd1e69 | ||
|
|
856aa1af6d | ||
|
|
f774a11e24 | ||
|
|
36c450994a | ||
|
|
71b23d8d95 | ||
|
|
9d01f154ae | ||
|
|
c332d82f77 | ||
|
|
6c9586a13c | ||
|
|
9b0b8a4585 | ||
|
|
ed3fbbfe23 | ||
|
|
7e92a0cb32 | ||
|
|
30ad206d3e | ||
|
|
780a96aec1 | ||
|
|
83a5b08c2d | ||
|
|
62f75c65ff | ||
|
|
e0ecc07790 | ||
|
|
60485f1d08 | ||
|
|
1c8cb906f4 | ||
|
|
b36b693965 | ||
|
|
c4488f3c36 | ||
|
|
325626bccb | ||
|
|
1b4262607d | ||
|
|
f012b3b37c | ||
|
|
26cd749376 | ||
|
|
9911c9f9de | ||
|
|
93b904420a | ||
|
|
3695e5b98f | ||
|
|
189186cc69 | ||
|
|
e5c26d38f8 | ||
|
|
2cb6b5e645 | ||
|
|
c34ddc658b | ||
|
|
5406944deb | ||
|
|
4a0a5456f1 | ||
|
|
3aba6bf37a | ||
|
|
b8cdb84ba7 | ||
|
|
7cf39b60c3 | ||
|
|
e9ccc5ae23 | ||
|
|
c8edef78a9 | ||
|
|
ae71bd1a3c | ||
|
|
b25070234a | ||
|
|
c5ba3d5c2b | ||
|
|
40b4f1eecf | ||
|
|
ad31f68615 | ||
|
|
1229616e21 | ||
|
|
eb6ce7dfc0 | ||
|
|
479978a716 | ||
|
|
7a4109ae79 | ||
|
|
be110154ba | ||
|
|
d11ae5b790 | ||
|
|
4daab00319 | ||
|
|
865a0c2e54 | ||
|
|
e52a249972 | ||
|
|
7e22978251 | ||
|
|
aed8712bee | ||
|
|
7dcb2b5ff2 | ||
|
|
0aa9524204 | ||
|
|
b2e75201b4 | ||
|
|
dd378d0c77 | ||
|
|
f9251a560a | ||
|
|
5000bf1bc5 | ||
|
|
7efcec020d | ||
|
|
fe4141c113 | ||
|
|
f0023dcf5e | ||
|
|
5b2da79627 | ||
|
|
9410bf5da1 | ||
|
|
bff508cdae | ||
|
|
20e0ff41c5 | ||
|
|
db94f21dc2 | ||
|
|
1844030880 | ||
|
|
6fc890efea | ||
|
|
f9c6d36d33 | ||
|
|
d859c9c908 | ||
|
|
68c805cd55 | ||
|
|
15a7b1b0d3 | ||
|
|
862f11c391 | ||
|
|
745d585a54 | ||
|
|
5684f6e5a8 | ||
|
|
0db3344af5 | ||
|
|
0a25713ceb | ||
|
|
a21e95e7e0 | ||
|
|
d13fa50d0c | ||
|
|
4222a43e67 | ||
|
|
8b75a793af | ||
|
|
281aadfb55 | ||
|
|
caf2b5fec5 | ||
|
|
9731827819 | ||
|
|
fb59233471 | ||
|
|
d7d6129402 | ||
|
|
62a2c66f02 | ||
|
|
1a5e394074 | ||
|
|
5794852bf6 | ||
|
|
f8f7228621 | ||
|
|
c49ac1cc80 | ||
|
|
6a58a985ee | ||
|
|
aaaf815dc4 | ||
|
|
7e55caa84c | ||
|
|
ba87ea6313 | ||
|
|
be7e85bb0e | ||
|
|
1a93aba416 | ||
|
|
f58f45db2d | ||
|
|
23e6297d4a | ||
|
|
58664e65f0 | ||
|
|
87f372cb1f | ||
|
|
79cde07ac9 | ||
|
|
128f2b150b | ||
|
|
3460ae18d4 | ||
|
|
95c6b91d86 | ||
|
|
363446f9da | ||
|
|
a5882ea0ac | ||
|
|
ee7acf9714 | ||
|
|
9ad01f6c9a | ||
|
|
b977cf3128 | ||
|
|
dbd23fb13a | ||
|
|
f6467c52fe | ||
|
|
debb2461d3 | ||
|
|
41f11575de | ||
|
|
9ca0b50688 | ||
|
|
18e44a52ab | ||
|
|
97a6609aae | ||
|
|
2716f690e6 | ||
|
|
cd763b2cb1 | ||
|
|
6c92b6036d | ||
|
|
48f9b081f4 | ||
|
|
8c934b9f74 | ||
|
|
2459e95cd6 | ||
|
|
736715b172 | ||
|
|
08c20a83c7 | ||
|
|
d4a73356c8 | ||
|
|
18135abad5 | ||
|
|
bfa873343a | ||
|
|
12f440a0a1 | ||
|
|
aa289aa350 | ||
|
|
e384812b29 | ||
|
|
48d6f7383c | ||
|
|
3c8f78045a | ||
|
|
04f7c38b2e | ||
|
|
45d4d4b380 | ||
|
|
4f12013a68 | ||
|
|
2465370c52 | ||
|
|
1b9f174924 | ||
|
|
5783346ecb | ||
|
|
eb794e62a8 | ||
|
|
d67268bef9 | ||
|
|
5fa718644e | ||
|
|
b4467f9486 | ||
|
|
7f24a86f5f | ||
|
|
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 |
No files matched your search
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh -e
|
||||
# Description: verify CODEOWNERS file is sane
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
# TODO Future improvements:
|
||||
# * Check that all devices in main/community have someone in CODEOWNERS
|
||||
# * Check that GitLab user actually exists (e.g. deleted account, account with
|
||||
# changed user name)
|
||||
|
||||
if grep -q " " CODEOWNERS; then
|
||||
echo
|
||||
echo "ERROR: Found space indentation in CODEOWNERS."
|
||||
echo "ERROR: Please indent with tab characters."
|
||||
grep " " CODEOWNERS
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fail=0
|
||||
tmppipe=$(mktemp -u)
|
||||
mkfifo "$tmppipe"
|
||||
grep -v "^#" CODEOWNERS | cut -d' ' -f1 > "$tmppipe" &
|
||||
while IFS= read -r line; do
|
||||
[ -z "$line" ] && continue
|
||||
|
||||
# Check if entry generally exists
|
||||
# shellcheck disable=SC2086
|
||||
ls $line >/dev/null 2>&1 || { fail=1; echo "Non-existing: $line"; }
|
||||
|
||||
# Check that directories end with a slash
|
||||
# shellcheck disable=SC2086
|
||||
if test -d "$(ls -d $line)"; then
|
||||
echo "$line" | grep -q '/$' || { fail=1; echo "Missing trailing slash: $line"; }
|
||||
fi
|
||||
done < "$tmppipe"
|
||||
rm "$tmppipe"
|
||||
|
||||
if [ "$fail" = 1 ]; then
|
||||
echo
|
||||
echo "ERROR: Invalid CODEOWNERS entries, see above."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
@@ -23,6 +23,7 @@ sh_files="
|
||||
./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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -60,6 +60,7 @@ shellcheck-grep:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/shellcheck.sh
|
||||
- .ci/grep.sh
|
||||
- .ci/codeowners.sh
|
||||
|
||||
editor-config:
|
||||
stage: lint
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v23.06`
|
||||
* [ ] `v22.12` (Supported until 2023-07-06)
|
||||
* [ ] `v23.12`
|
||||
* [ ] `v23.06` (supported until 2024-01-18)
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
|
||||
+21
-50
@@ -7,82 +7,53 @@ device/*/*-purism-librem5/ @craftyguy @bshah
|
||||
device/*/device-lg-judyln/ @Newbyte
|
||||
device/*/device-samsung-m0/ @Newbyte
|
||||
device/*/linux-postmarketos-exynos4/ @Newbyte
|
||||
device/*/linux-postmarketos-msm8939/ @Newbyte
|
||||
device/*/linux-postmarketos-qcom-msm8939/ @Newbyte
|
||||
device/*/linux-postmarketos-stericsson/ @Newbyte
|
||||
device/*/*-qcom-sdm845/ @sdm845-mainline
|
||||
device/*/*-xiaomi-berrylium/ @joelselvaraj
|
||||
device/*/*-xiaomi-beryllium/ @joelselvaraj
|
||||
device/*/device-oneplus-enchilada/ @calebccff
|
||||
device/*/device-oneplus-fajita/ @calebccff
|
||||
device/*/firmware-oneplus-sdm845/ @calebccff
|
||||
device/*/device-shift-axolotl/ @amartinz @calebccff @dylanvanassche
|
||||
device/*/*-lenovo-21bx/ @craftyguy
|
||||
device/*/*-lenovo-a6010/ @jenneron
|
||||
device/*/*-lenovo-a6000/ @jenneron
|
||||
device/*/device-microsoft-surface-rt/ @jenneron
|
||||
device/*/device-google-fennel/ @jenneron
|
||||
device/*/device-google-veyron-minnie/ @jenneron
|
||||
device/*/device-google-burnet/ @jenneron
|
||||
device/*/device-google-elm/ @jenneron
|
||||
device/*/device-google-nyan-big/ @jenneron
|
||||
device/*/device-google-peach-pi/ @jenneron
|
||||
device/*/device-google-veyron-speedy/ @jenneron
|
||||
device/*/linux-google-veyron/ @jenneron
|
||||
device/*/u-boot-peach-pi/ @jenneron
|
||||
device/*/device-google-cozmo/ @jenneron
|
||||
device/*/u-boot-veyron-speedy/ @jenneron
|
||||
device/*/device-google-juniper/ @jenneron @binarycraft
|
||||
device/*/u-boot-peach-pit/ @jenneron
|
||||
device/*/device-google-damu/ @jenneron
|
||||
device/*/u-boot-nyan-4gb/ @jenneron
|
||||
device/*/device-google-kenzo/ @jenneron
|
||||
device/*/device-google-kodama/ @jenneron
|
||||
device/*/u-boot-snow/ @jenneron
|
||||
device/*/device-google-kevin/ @jenneron
|
||||
device/*/linux-postmarketos-exynos5/ @jenneron @Grimler
|
||||
device/*/device-google-krane/ @jenneron
|
||||
device/*/soc-mediatek-mt8183/ @jenneron
|
||||
device/*/u-boot-veyron-minnie/ @jenneron
|
||||
device/*/device-google-fennel14/ @jenneron
|
||||
device/*/linux-google-nyan/ @jenneron
|
||||
device/*/device-google-willow/ @jenneron
|
||||
device/*/linux-postmarketos-mediatek-mt8173/ @jenneron
|
||||
device/*/linux-postmarketos-mediatek-mt8183/ @jenneron @binarycraft
|
||||
device/*/device-google-nyan-blaze/ @jenneron
|
||||
device/*/firmware-powervr-gx6250/ @jenneron
|
||||
device/*/device-google-hana/ @jenneron
|
||||
device/*/device-google-snow/ @jenneron
|
||||
device/*/device-google-kappa/ @jenneron
|
||||
device/*/u-boot-nyan-2gb/ @jenneron
|
||||
device/*/device-google-veyron-jerry/ @jenneron
|
||||
device/*/device-google-kakadu/ @jenneron
|
||||
device/*/firmware-google-veyron-brcm/ @jenneron
|
||||
device/*/device-google-peach-pit/ @jenneron
|
||||
device/*/device-lg-judyp/ @jenneron
|
||||
device/*/device-asus-tf201/ @clamor95
|
||||
device/*/device-asus-tf300t/ @clamor95
|
||||
device/*/device-asus-tf300tg/ @clamor95
|
||||
device/*/device-asus-tf700t/ @clamor95
|
||||
device/*/device-lg-p895/ @clamor95
|
||||
device/*/firmware-asus-transformer/ @clamor95 @jenneron
|
||||
device/*/firmware-lg-x3/ @clamor95
|
||||
device/*/linux-postmarketos-grate/ @clamor95 @jenneron
|
||||
device/*/device-samsung-chagallwifi @Grimler
|
||||
device/*/device-odroid-xu4 @Grimler
|
||||
device/*/device-samsung-klimtlte @Grimler
|
||||
device/*/linux-samsung-klimtlte @Grimler
|
||||
device/*/firmware-odroid-xu4 @Grimler
|
||||
device/*/linux-samsung-chagallwifi @Grimler
|
||||
device/*/device-huawei-plank @gtrxAC
|
||||
device/*/linux-huawei-plank @gtrxAC
|
||||
device/*/device-samsung-chagallwifi/ @Grimler
|
||||
device/*/device-odroid-xu4/ @Grimler
|
||||
device/*/device-samsung-klimtlte/ @Grimler
|
||||
device/*/linux-samsung-klimtlte/ @Grimler
|
||||
device/*/firmware-odroid-xu4/ @Grimler
|
||||
device/*/linux-samsung-chagallwifi/ @Grimler
|
||||
device/*/device-huawei-plank/ @gtrxAC
|
||||
device/*/linux-huawei-plank/ @gtrxAC
|
||||
device/*/device-samsung-coreprimevelte/ @legolivesmatter @balejk
|
||||
device/*/linux-samsung-coreprimevelte/ @legolivesmatter @balejk
|
||||
|
||||
main/postmarketos-update-depthcharge-kernel/ @jenneron
|
||||
main/osk-sdl/ @craftyguy
|
||||
main/postmarketos-ui-plasma-mobile/ @bshah
|
||||
main/ttyescape @calebccff
|
||||
temp/u-boot-librem5/ @craftyguy @bshah
|
||||
temp/alsa-ucm-conf-google-kukui/ @jenneron @binarycraft
|
||||
temp/alsa-ucm-conf-google-gru/ @jenneron
|
||||
device/*/*-videostrong-kii-pro/ @vitali64yt
|
||||
device/*/*-amlogic-s905* @vitali64yt
|
||||
device/*/linux-postmarketos-amlogic/ @vitali64yt @exkc
|
||||
main/postmarketos-ui-plasma-mobile/ @bshah
|
||||
main/ttyescape/ @calebccff
|
||||
device/*/u-boot-librem5/ @craftyguy @bshah
|
||||
device/*/alsa-ucm-conf-google-kukui/ @jenneron @binarycraft
|
||||
device/*/alsa-ucm-conf-google-gru/ @jenneron
|
||||
device/*/*-videostrong-kii-pro/ @vitali64yt
|
||||
device/*/*-amlogic-s905*/ @vitali64yt
|
||||
device/*/linux-postmarketos-amlogic/ @vitali64yt @exkc
|
||||
|
||||
# vim: ts=8 sw=4 et
|
||||
+7
-1
@@ -8,8 +8,14 @@ branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v23.06]
|
||||
[v23.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v23.12
|
||||
branch_aports=3.19-stable
|
||||
mirrordir_alpine=v3.19
|
||||
|
||||
[v23.06]
|
||||
description=Old release (supported until 2024-01-18)
|
||||
branch_pmaports=v23.06
|
||||
branch_aports=3.18-stable
|
||||
mirrordir_alpine=v3.18
|
||||
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.36.1
|
||||
pkgrel=12
|
||||
pkgrel=18
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d55a5850facdd40b8dd971fc074a4bfb6d6a8fb22e82db32e0de3d24dd889c01f09e420118500298f43dfd3e299e6315454e0a102ccd60e1f0b1a3e20107b04a busybox-static-1.36.1-r12-aarch64-edge.apk
|
||||
08f68b23bd880be12f95c5e1f071891f6b658fe7576f63d54e71d7390e4afc58de01813b2ea628f2b062830a89b0f69e8bd8a2b15fdb08bb9aba9e2a08971b0b busybox-static-1.36.1-r18-aarch64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.36.1
|
||||
pkgrel=12
|
||||
pkgrel=18
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
778c2f5418d571f450e90851f60fb830e866a90e66c58db9e41112dc7e7354e4f514b0c68a447f2f52323a26687db49d4409e5a9d67f75910971d13f61c56968 busybox-static-1.36.1-r12-armhf-edge.apk
|
||||
20b11081b5d1f25298fd4d8dfde51062f5c65060f5b53840eaad6fb69b94d64c5f5e522c9286f9a56cef4a9c88bdf53dcd385f47451b1563faf2058f1ea928cb busybox-static-1.36.1-r18-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.36.1
|
||||
pkgrel=12
|
||||
pkgrel=18
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d9d8921bb8182eeb2e92a7ea5b531429bf51ca0ab1ea676c826e9cc310c7d8e859167b17f49718bfa27f29ff40d50aa0759f9efea032835c293bd8d0ee8cfa8e busybox-static-1.36.1-r12-armv7-edge.apk
|
||||
8f2fa87d979bdbe88eef0b9dece61001998df960e025902854b2af415b96d63ce9831dbe44d5c32b671c313efdfe9e22743a26de73febcc92d8d45d944ad66c0 busybox-static-1.36.1-r18-armv7-edge.apk
|
||||
"
|
||||
@@ -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
|
||||
|
||||
@@ -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=3
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -268,10 +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}"
|
||||
@@ -784,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
|
||||
@@ -819,6 +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
|
||||
|
||||
@@ -24,8 +24,8 @@ 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
|
||||
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-armhf
|
||||
pkgrel=3
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -268,10 +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}"
|
||||
@@ -784,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
|
||||
@@ -819,6 +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
|
||||
|
||||
@@ -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=3
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -268,10 +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}"
|
||||
@@ -784,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
|
||||
@@ -819,6 +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
|
||||
|
||||
@@ -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-riscv64
|
||||
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-riscv64
|
||||
pkgrel=2
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for riscv64"
|
||||
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}"
|
||||
@@ -783,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
|
||||
@@ -818,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
|
||||
|
||||
@@ -24,8 +24,8 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-x86
|
||||
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-x86
|
||||
pkgrel=3
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for x86"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -268,10 +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}"
|
||||
@@ -784,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
|
||||
@@ -819,6 +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
|
||||
"
|
||||
@@ -0,0 +1,42 @@
|
||||
From 47b4bd4deb2c356bb07d2a96f22127aefafec3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH 01/35] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 3527283693b..c4071b64b53 100644
|
||||
--- a/gcc/config/i386/pmm_malloc.h
|
||||
+++ b/gcc/config/i386/pmm_malloc.h
|
||||
@@ -27,12 +27,13 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
/* We can't depend on <stdlib.h> since the prototype of posix_memalign
|
||||
- may not be visible. */
|
||||
+ may not be visible and we can't pollute the namespace either. */
|
||||
#ifndef __cplusplus
|
||||
-extern int posix_memalign (void **, size_t, size_t);
|
||||
+extern int _mm_posix_memalign (void **, size_t, size_t)
|
||||
#else
|
||||
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
|
||||
+extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw ()
|
||||
#endif
|
||||
+__asm__("posix_memalign");
|
||||
|
||||
static __inline void *
|
||||
_mm_malloc (size_t __size, size_t __alignment)
|
||||
@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment)
|
||||
return malloc (__size);
|
||||
if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
|
||||
__alignment = sizeof (void *);
|
||||
- if (posix_memalign (&__ptr, __alignment, __size) == 0)
|
||||
+ if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0)
|
||||
return __ptr;
|
||||
else
|
||||
return NULL;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
From 4fa620d8c3e6730211bfb071eb4c817320491bd0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 29 Mar 2013 08:59:00 +0400
|
||||
Subject: [PATCH 02/35] gcc: poison-system-directories
|
||||
|
||||
Add /sw/include and /opt/include based on the original
|
||||
zecke-no-host-includes.patch patch. The original patch checked for
|
||||
/usr/include, /sw/include and /opt/include and then triggered a failure and
|
||||
aborted.
|
||||
|
||||
Instead, we add the two missing items to the current scan. If the user
|
||||
wants this to be a failure, they can add "-Werror=poison-system-directories".
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
gcc/common.opt | 4 ++++
|
||||
gcc/config.in | 6 ++++++
|
||||
gcc/configure | 16 ++++++++++++++++
|
||||
gcc/configure.ac | 10 ++++++++++
|
||||
gcc/doc/invoke.texi | 9 +++++++++
|
||||
gcc/gcc.cc | 2 ++
|
||||
gcc/incpath.cc | 21 +++++++++++++++++++++
|
||||
7 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 862c474d3c8..64c4277c991 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -711,6 +711,10 @@ Wreturn-local-addr
|
||||
Common Var(warn_return_local_addr) Init(1) Warning
|
||||
Warn about returning a pointer/reference to a local or temporary variable.
|
||||
|
||||
+Wpoison-system-directories
|
||||
+Common Var(flag_poison_system_directories) Init(1) Warning
|
||||
+Warn for -I and -L options using system directories if cross compiling
|
||||
+
|
||||
Wshadow
|
||||
Common Var(warn_shadow) Warning
|
||||
Warn when one variable shadows another. Same as -Wshadow=global.
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 4cad077bfbe..0679fbbf4c6 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -236,6 +236,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
+/* Define to warn for use of native system header directories */
|
||||
+#ifndef USED_FOR_TARGET
|
||||
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* Define if you want all operations on RTL (the basic data structure of the
|
||||
optimizer and back end) to be checked for dynamic type safety at runtime.
|
||||
This is quite expensive. */
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index c7b26d1927d..8c46369f73f 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
|
||||
enable_link_mutex
|
||||
enable_link_serialization
|
||||
enable_version_specific_runtime_libs
|
||||
+enable_poison_system_directories
|
||||
enable_plugin
|
||||
enable_host_shared
|
||||
enable_libquadmath_support
|
||||
@@ -1788,6 +1789,8 @@ Optional Features:
|
||||
--enable-version-specific-runtime-libs
|
||||
specify that runtime libraries should be installed
|
||||
in a compiler-specific directory
|
||||
+ --enable-poison-system-directories
|
||||
+ warn for use of native system header directories
|
||||
--enable-plugin enable plugin support
|
||||
--enable-host-shared build host code as shared libraries
|
||||
--disable-libquadmath-support
|
||||
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-poison-system-directories was given.
|
||||
+if test "${enable_poison_system_directories+set}" = set; then :
|
||||
+ enableval=$enable_poison_system_directories;
|
||||
+else
|
||||
+ enable_poison_system_directories=no
|
||||
+fi
|
||||
+
|
||||
+if test "x${enable_poison_system_directories}" = "xyes"; then
|
||||
+
|
||||
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
# Substitute configuration variables
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 09082e8ccae..5504bf6eb01 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
[specify that runtime libraries should be
|
||||
installed in a compiler-specific directory])])
|
||||
|
||||
+AC_ARG_ENABLE([poison-system-directories],
|
||||
+ AS_HELP_STRING([--enable-poison-system-directories],
|
||||
+ [warn for use of native system header directories]),,
|
||||
+ [enable_poison_system_directories=no])
|
||||
+if test "x${enable_poison_system_directories}" = "xyes"; then
|
||||
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
|
||||
+ [1],
|
||||
+ [Define to warn for use of native system header directories])
|
||||
+fi
|
||||
+
|
||||
# Substitute configuration variables
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index af0e5933fdb..b6731a4673c 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
|
||||
-Wparentheses -Wno-pedantic-ms-format
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
|
||||
+-Wno-poison-system-directories
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type
|
||||
-Wno-scalar-storage-order -Wsequence-point
|
||||
@@ -8426,6 +8427,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
most targets, it is made up of code and thus requires the stack to be
|
||||
made executable in order for the program to work properly.
|
||||
|
||||
+@opindex Wno-poison-system-directories
|
||||
+@item -Wno-poison-system-directories
|
||||
+Do not warn for @option{-I} or @option{-L} options using system
|
||||
+directories such as @file{/usr/include} when cross compiling. This
|
||||
+option is intended for use in chroot environments when such
|
||||
+directories contain the correct headers and libraries for the target
|
||||
+system rather than the host.
|
||||
+
|
||||
@opindex Wfloat-equal
|
||||
@opindex Wno-float-equal
|
||||
@item -Wfloat-equal
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 16bb07f2cdc..33b56e721d2 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1146,6 +1146,8 @@ proper position among the other output files. */
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
+ %{Wno-poison-system-directories:--no-poison-system-directories} \
|
||||
+ %{Werror=poison-system-directories:--error-poison-system-directories} \
|
||||
%{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
|
||||
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
|
||||
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
|
||||
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
|
||||
index 4d44321183f..0f3f071b44c 100644
|
||||
--- a/gcc/incpath.cc
|
||||
+++ b/gcc/incpath.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "intl.h"
|
||||
#include "incpath.h"
|
||||
#include "cppdefault.h"
|
||||
+#include "diagnostic-core.h"
|
||||
|
||||
/* Microsoft Windows does not natively support inodes.
|
||||
VMS has non-numeric inodes. */
|
||||
@@ -399,6 +400,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
|
||||
}
|
||||
fprintf (stderr, _("End of search list.\n"));
|
||||
}
|
||||
+
|
||||
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
|
||||
+ if (flag_poison_system_directories)
|
||||
+ {
|
||||
+ struct cpp_dir *p;
|
||||
+
|
||||
+ for (p = heads[INC_QUOTE]; p; p = p->next)
|
||||
+ {
|
||||
+ if ((!strncmp (p->name, "/usr/include", 12))
|
||||
+ || (!strncmp (p->name, "/usr/local/include", 18))
|
||||
+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
|
||||
+ || (!strncmp (p->name, "/sw/include", 11))
|
||||
+ || (!strncmp (p->name, "/opt/include", 12)))
|
||||
+ warning (OPT_Wpoison_system_directories,
|
||||
+ "include location \"%s\" is unsafe for "
|
||||
+ "cross-compilation",
|
||||
+ p->name);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Use given -I paths for #include "..." but not #include <...>, and
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH 03/35] specs: turn on -Wl,-z,now by default
|
||||
|
||||
Previously, we also used to turn on -z relro here, but we now build
|
||||
binutils with --enable-relro, which is functionally equivalent.
|
||||
|
||||
Binutils does not appear to have a similar option for enabling -z
|
||||
now by default.
|
||||
---
|
||||
gcc/doc/invoke.texi | 3 +++
|
||||
gcc/gcc.cc | 1 +
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b6731a4673c..f393c7846c6 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -17961,6 +17961,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
linker. When using the GNU linker, you can also get the same effect with
|
||||
@option{-Wl,-Map=output.map}.
|
||||
|
||||
+NOTE: In Alpine Linux, for LDFLAGS, the option
|
||||
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
|
||||
+
|
||||
@opindex u
|
||||
@item -u @var{symbol}
|
||||
Pretend the symbol @var{symbol} is undefined, to force linking of
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 33b56e721d2..f82fae23c22 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
|
||||
"%{flto|flto=*:%<fcompare-debug*} \
|
||||
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
+ "-z now " \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
%{Wno-poison-system-directories:--no-poison-system-directories} \
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 1b315235433701e4a974da259b8d651169ddc7ac Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH 04/35] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/c-family/c-cppbuiltin.cc | 4 ++++
|
||||
gcc/doc/invoke.texi | 6 ++++++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
|
||||
index 5d64625fcd7..868d69506e4 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.cc
|
||||
+++ b/gcc/c-family/c-cppbuiltin.cc
|
||||
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default for optimization levels > 0 */
|
||||
+ if (optimize)
|
||||
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index f393c7846c6..ef3c14a189e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -11868,6 +11868,12 @@ also turns on the following optimization flags:
|
||||
Please note the warning under @option{-fgcse} about
|
||||
invoking @option{-O2} on programs that use computed gotos.
|
||||
|
||||
+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
|
||||
+set by default, and is activated when @option{-O} is set to 2 or higher.
|
||||
+This enables additional compile-time and run-time checks for several libc
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@opindex O3
|
||||
@item -O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
From 67c0f5789630b27149f60ff831999ef7c1dba5d5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH 05/35] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
gcc/config/aarch64/aarch64-linux.h | 1 +
|
||||
gcc/config/alpha/linux-elf.h | 2 +-
|
||||
gcc/config/arm/linux-elf.h | 1 +
|
||||
gcc/config/gnu-user.h | 6 +++---
|
||||
gcc/config/i386/gnu-user.h | 2 +-
|
||||
gcc/config/i386/gnu-user64.h | 1 +
|
||||
gcc/config/ia64/linux.h | 2 +-
|
||||
gcc/config/mips/gnu-user.h | 1 +
|
||||
gcc/config/riscv/linux.h | 1 +
|
||||
gcc/config/rs6000/linux64.h | 4 ++--
|
||||
gcc/config/rs6000/sysv4.h | 2 +-
|
||||
gcc/config/s390/linux.h | 2 +-
|
||||
gcc/config/sparc/linux.h | 2 +-
|
||||
gcc/gcc.cc | 28 ++++++++++++++++++++--------
|
||||
14 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
|
||||
index 4277f03da2a..b131983a546 100644
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -35,6 +35,7 @@
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
|
||||
#define LINUX_TARGET_LINK_SPEC "%{h*} \
|
||||
+ --as-needed \
|
||||
%{static:-Bstatic} \
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
|
||||
index 03f783f2ad1..d946e700dda 100644
|
||||
--- a/gcc/config/alpha/linux-elf.h
|
||||
+++ b/gcc/config/alpha/linux-elf.h
|
||||
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
#define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER
|
||||
|
||||
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
+#define LINK_SPEC "-m elf64alpha --as-needed %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
|
||||
index 7b7b7cbbe14..49c050c6f2c 100644
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -70,6 +70,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
|
||||
-X \
|
||||
+ --as-needed \
|
||||
%{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index eda8010b133..b26b17f2f2a 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
|
||||
"%{static-libasan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#undef LIBHWASAN_EARLY_SPEC
|
||||
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
|
||||
"%{static-libhwasan:%{!shared:" \
|
||||
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
|
||||
"%{static-libtsan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#undef LIBLSAN_EARLY_SPEC
|
||||
#define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \
|
||||
"%{static-liblsan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#endif
|
||||
|
||||
#undef TARGET_F951_OPTIONS
|
||||
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
|
||||
index a79b739089d..e0752673dff 100644
|
||||
--- a/gcc/config/i386/gnu-user.h
|
||||
+++ b/gcc/config/i386/gnu-user.h
|
||||
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
{ "link_emulation", GNU_USER_LINK_EMULATION },\
|
||||
{ "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
|
||||
|
||||
-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
|
||||
+#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --as-needed %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{!static-pie: \
|
||||
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
|
||||
index 3b63b99acf6..759bf0db86f 100644
|
||||
--- a/gcc/config/i386/gnu-user64.h
|
||||
+++ b/gcc/config/i386/gnu-user64.h
|
||||
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
"%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
|
||||
%{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
|
||||
%{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
|
||||
+ --as-needed \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
|
||||
index 5dfd428aa17..02656dad7fc 100644
|
||||
--- a/gcc/config/ia64/linux.h
|
||||
+++ b/gcc/config/ia64/linux.h
|
||||
@@ -58,7 +58,7 @@ do { \
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "\
|
||||
+#define LINK_SPEC " --as-needed \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
|
||||
index a4e5380b589..3cc61bce69f 100644
|
||||
--- a/gcc/config/mips/gnu-user.h
|
||||
+++ b/gcc/config/mips/gnu-user.h
|
||||
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#undef GNU_USER_TARGET_LINK_SPEC
|
||||
#define GNU_USER_TARGET_LINK_SPEC "\
|
||||
%{G*} %{EB} %{EL} %{mips*} %{shared} \
|
||||
+ -as-needed \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 3e625e0f867..f8c2c351e5a 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mabi=ilp32:_ilp32}"
|
||||
|
||||
#define LINK_SPEC "\
|
||||
+-as-needed \
|
||||
-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " \
|
||||
%{mno-relax:--no-relax} \
|
||||
%{mbig-endian:-EB} \
|
||||
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
|
||||
index 9e457033d11..08016bf224d 100644
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -377,13 +377,13 @@ extern int dot_symbols;
|
||||
" -m elf64ppc")
|
||||
#endif
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --as-needed %{!shared: %{!static: \
|
||||
%{!static-pie: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \
|
||||
%(link_os_extra_spec32)"
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --as-needed %{!shared: %{!static: \
|
||||
%{!static-pie: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
|
||||
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
|
||||
index ae932fc22f0..c8ff0c6dc8e 100644
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
#endif
|
||||
|
||||
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --as-needed %{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
|
||||
|
||||
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
|
||||
index 02aa1edaff8..64df5801134 100644
|
||||
--- a/gcc/config/s390/linux.h
|
||||
+++ b/gcc/config/s390/linux.h
|
||||
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --as-needed \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
|
||||
index 0e33b3cac2c..c2f44546e62 100644
|
||||
--- a/gcc/config/sparc/linux.h
|
||||
+++ b/gcc/config/sparc/linux.h
|
||||
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
#undef LINK_SPEC
|
||||
-#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
|
||||
+#define LINK_SPEC "-m elf32_sparc --as-needed %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index f82fae23c22..da6417dd0d1 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -754,8 +754,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBASAN_EARLY_SPEC
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
-#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \
|
||||
- "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \
|
||||
+#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
|
||||
+ " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " -lasan " \
|
||||
+ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \
|
||||
+ " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -790,8 +793,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBTSAN_EARLY_SPEC
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
-#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \
|
||||
- "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
|
||||
+#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
|
||||
+ " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " -ltsan " \
|
||||
+ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
|
||||
+ " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -808,8 +814,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBLSAN_EARLY_SPEC
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
-#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION \
|
||||
- "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
|
||||
+#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
|
||||
+ " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " -llsan " \
|
||||
+ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
|
||||
+ " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -824,8 +833,11 @@ proper position among the other output files. */
|
||||
#define STATIC_LIBUBSAN_LIBS \
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
-#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \
|
||||
- "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
|
||||
+#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
|
||||
+ " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " -lubsan " \
|
||||
+ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
|
||||
+ " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH 06/35] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index a75038930ae..b98726f33ed 100644
|
||||
--- a/gcc/c-family/c.opt
|
||||
+++ b/gcc/c-family/c.opt
|
||||
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
|
||||
of the destination region. Same as -Wformat-overflow=1.
|
||||
|
||||
Wformat-security
|
||||
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
|
||||
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
|
||||
Warn about possible security problems with format functions.
|
||||
|
||||
Wformat-signedness
|
||||
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
Warn about zero-length formats.
|
||||
|
||||
Wformat=
|
||||
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
|
||||
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
|
||||
Warn about printf/scanf/strftime/strfmon format string anomalies.
|
||||
|
||||
Wformat-overflow=
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 4a728ad48a7b437cc6f2697e26603bf648149f86 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH 07/35] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 64c4277c991..c24839d32bc 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers.
|
||||
|
||||
Wtrampolines
|
||||
-Common Var(warn_trampolines) Warning
|
||||
+Common Var(warn_trampolines) Init(1) Warning
|
||||
Warn whenever a trampoline is generated.
|
||||
|
||||
Wtrivial-auto-var-init
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 32f24560d0602f7735d5e9efd92fe3151bd72cea Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH 08/35] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 8 +++++++-
|
||||
gcc/params.opt | 2 +-
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index da6417dd0d1..b5a6f200635 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -983,6 +983,12 @@ proper position among the other output files. */
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
#endif
|
||||
|
||||
+#ifdef ENABLE_DEFAULT_SSP
|
||||
+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
|
||||
+#else
|
||||
+#define NO_SSP_SPEC ""
|
||||
+#endif
|
||||
+
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
|
||||
%{-version:--version}\
|
||||
%{-help=*:--help=%*}\
|
||||
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
|
||||
- %{fsyntax-only:-o %j} %{-param*}\
|
||||
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
|
||||
%{coverage:-fprofile-arcs -ftest-coverage}\
|
||||
%{fprofile-arcs|fprofile-generate*|coverage:\
|
||||
%{!fprofile-update=single:\
|
||||
diff --git a/gcc/params.opt b/gcc/params.opt
|
||||
index 823cdb2ff85..5b096899b40 100644
|
||||
--- a/gcc/params.opt
|
||||
+++ b/gcc/params.opt
|
||||
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
The maximum number of SSA_NAME assignments to follow in determining a value.
|
||||
|
||||
-param=ssp-buffer-size=
|
||||
-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
|
||||
+Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
|
||||
The lower bound for a buffer to be considered for stack smashing protection.
|
||||
|
||||
-param=stack-clash-protection-guard-size=
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From c7ec8da7280d7f97f5543eb9ddeca7600aafc43c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH 09/35] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6)
|
||||
|
||||
The libgcc_s.so used during build doesn't satisfy the needs of the
|
||||
libstdc++.so that msgfmt is linked against. On the other hand, msgfmt
|
||||
is used as a stand-alone application here, and what library it uses
|
||||
behind the scenes is of no concern to the gcc build process.
|
||||
Therefore, simply invoking it "as usual", i.e. without any special
|
||||
library path, will make it work as expected here.
|
||||
|
||||
2011-09-19 Martin von Gagern
|
||||
|
||||
References:
|
||||
https://bugs.gentoo.org/372377
|
||||
https://bugs.gentoo.org/295480
|
||||
---
|
||||
libstdc++-v3/po/Makefile.am | 1 +
|
||||
libstdc++-v3/po/Makefile.in | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
|
||||
index 12d34910830..61b13762b71 100644
|
||||
--- a/libstdc++-v3/po/Makefile.am
|
||||
+++ b/libstdc++-v3/po/Makefile.am
|
||||
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
|
||||
EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
|
||||
|
||||
.po.mo:
|
||||
+ env --unset=LD_LIBRARY_PATH \
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
|
||||
index 8e93445acd2..d6ff06e5ddb 100644
|
||||
--- a/libstdc++-v3/po/Makefile.in
|
||||
+++ b/libstdc++-v3/po/Makefile.in
|
||||
@@ -561,6 +561,7 @@ uninstall-am:
|
||||
|
||||
|
||||
.po.mo:
|
||||
+ env --unset=LD_LIBRARY_PATH \
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From aaa029bcee68298695b7c4278c90b6bc320d098c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH 10/35] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index 1d5c779fcff..19e3cb1e31c 100644
|
||||
--- a/include/libiberty.h
|
||||
+++ b/include/libiberty.h
|
||||
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
|
||||
/* Like sprintf but provides a pointer to malloc'd storage, which must
|
||||
be freed by the caller. */
|
||||
|
||||
+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
|
||||
+#ifndef asprintf
|
||||
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Like asprintf but allocates memory without fail. This works like
|
||||
xmalloc. */
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 65e01e749205c9af218b01233cebd0077538d0ee Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH 11/35] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 72608f3e4a7..58356884728 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
||||
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
||||
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
|
||||
$(RANLIB) $(TARGETLIB); \
|
||||
+ cp $(TARGETLIB) ../ ; \
|
||||
cd ..; \
|
||||
else true; fi
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 453a815bf2844971a91eaef800af188d9e86b784 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH 12/35] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.cc | 4 ++--
|
||||
libgcc/config/i386/cpuinfo.c | 6 +++---
|
||||
libgcc/config/i386/t-linux | 2 +-
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
|
||||
index 0d817fc3f3b..2e99db00db9 100644
|
||||
--- a/gcc/config/i386/i386-expand.cc
|
||||
+++ b/gcc/config/i386/i386-expand.cc
|
||||
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
{
|
||||
case IX86_BUILTIN_CPU_INIT:
|
||||
{
|
||||
- /* Make it call __cpu_indicator_init in libgcc. */
|
||||
+ /* Make it call __cpu_indicator_init in libgcc.a. */
|
||||
tree call_expr, fndecl, type;
|
||||
type = build_function_type_list (integer_type_node, NULL_TREE);
|
||||
- fndecl = build_fn_decl ("__cpu_indicator_init", type);
|
||||
+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
|
||||
call_expr = build_call_expr (fndecl, 0);
|
||||
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
|
||||
}
|
||||
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
|
||||
index 50b6d8248a2..724ced402a1 100644
|
||||
--- a/libgcc/config/i386/cpuinfo.c
|
||||
+++ b/libgcc/config/i386/cpuinfo.c
|
||||
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
|
||||
__cpu_features2);
|
||||
}
|
||||
|
||||
-#if defined SHARED && defined USE_ELF_SYMVER
|
||||
-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
|
||||
-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
|
||||
+#ifndef SHARED
|
||||
+int __cpu_indicator_init_local (void)
|
||||
+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
|
||||
#endif
|
||||
diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
|
||||
index 8506a635790..564296f788e 100644
|
||||
--- a/libgcc/config/i386/t-linux
|
||||
+++ b/libgcc/config/i386/t-linux
|
||||
@@ -3,5 +3,5 @@
|
||||
# t-slibgcc-elf-ver and t-linux
|
||||
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
|
||||
|
||||
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
|
||||
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
|
||||
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
From 7d7d12137c666761a8dd61179c9651b85dae9b41 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH 13/35] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
gcc/configure.ac | 13 +++++++++++++
|
||||
2 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 8c46369f73f..e59cbee1767 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -32268,6 +32268,33 @@ fi
|
||||
$as_echo "$gcc_cv_no_pie" >&6; }
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
+else
|
||||
+ # Check if -nopie works.
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -nopie option" >&5
|
||||
+$as_echo_n "checking for -nopie option... " >&6; }
|
||||
+if test "${gcc_cv_nopie+set}" = set; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ saved_LDFLAGS="$LDFLAGS"
|
||||
+ LDFLAGS="$LDFLAGS -nopie"
|
||||
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+int main(void) {return 0;}
|
||||
+_ACEOF
|
||||
+if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
+ gcc_cv_nopie=yes
|
||||
+else
|
||||
+ gcc_cv_nopie=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+ LDFLAGS="$saved_LDFLAGS"
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nopie" >&5
|
||||
+$as_echo "$gcc_cv_nopie" >&6; }
|
||||
+ if test "$gcc_cv_nopie" = "yes"; then
|
||||
+ NO_PIE_FLAG="-nopie"
|
||||
+ fi
|
||||
fi
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 5504bf6eb01..57268319de1 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7552,6 +7552,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
LDFLAGS="$saved_LDFLAGS"])
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
+else
|
||||
+ # Check if -nopie works.
|
||||
+ AC_CACHE_CHECK([for -nopie option],
|
||||
+ [gcc_cv_nopie],
|
||||
+ [saved_LDFLAGS="$LDFLAGS"
|
||||
+ LDFLAGS="$LDFLAGS -nopie"
|
||||
+ AC_LINK_IFELSE([int main(void) {return 0;}],
|
||||
+ [gcc_cv_nopie=yes],
|
||||
+ [gcc_cv_nopie=no])
|
||||
+ LDFLAGS="$saved_LDFLAGS"])
|
||||
+ if test "$gcc_cv_nopie" = "yes"; then
|
||||
+ NO_PIE_FLAG="-nopie"
|
||||
+ fi
|
||||
fi
|
||||
AC_SUBST([NO_PIE_FLAG])
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From dd5bb97c31a9f57034c70a7a18ba6e2e133084c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH 14/35] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
|
||||
index f2126441208..22cfa9c641f 100644
|
||||
--- a/gcc/ada/link.c
|
||||
+++ b/gcc/ada/link.c
|
||||
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|
||||
|| defined (__NetBSD__) || defined (__OpenBSD__) \
|
||||
|| defined (__QNX__)
|
||||
const char *__gnat_object_file_option = "-Wl,@";
|
||||
-const char *__gnat_run_path_option = "-Wl,-rpath,";
|
||||
-char __gnat_shared_libgnat_default = STATIC;
|
||||
-char __gnat_shared_libgcc_default = STATIC;
|
||||
+const char *__gnat_run_path_option = "";
|
||||
+char __gnat_shared_libgnat_default = SHARED;
|
||||
+char __gnat_shared_libgcc_default = SHARED;
|
||||
int __gnat_link_max = 8192;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
||||
@@ -129,9 +129,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|
||||
|
||||
#elif defined (__linux__) || defined (__GLIBC__)
|
||||
const char *__gnat_object_file_option = "-Wl,@";
|
||||
-const char *__gnat_run_path_option = "-Wl,-rpath,";
|
||||
-char __gnat_shared_libgnat_default = STATIC;
|
||||
-char __gnat_shared_libgcc_default = STATIC;
|
||||
+const char *__gnat_run_path_option = "";
|
||||
+char __gnat_shared_libgnat_default = SHARED;
|
||||
+char __gnat_shared_libgcc_default = SHARED;
|
||||
int __gnat_link_max = 8192;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 6bb5b7d9161d05f31b001d8211a9c63caf63fd2f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH 15/35] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 06a9398e172..6ff2b3f9925 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
|
||||
# built for the build system to override those in BASE_FLAGS_TO_PASS.
|
||||
EXTRA_BUILD_FLAGS = \
|
||||
CFLAGS="$(CFLAGS_FOR_BUILD)" \
|
||||
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
|
||||
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
|
||||
|
||||
# This is the list of directories to built for the host system.
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From f0d9e00cac06689f64b214de7aee80d7116ef084 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH 16/35] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index e3aca79cccc..b3537b8fbeb 100644
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 857db04f4f1a06e866551b4172fe8f27363f4a92 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
||||
Subject: [PATCH 17/35] Alpine musl package provides libssp_nonshared.a. We
|
||||
link to it unconditionally, as otherwise we get link failures if some objects
|
||||
are -fstack-protector built and final link happens with -fno-stack-protector.
|
||||
This seems to be the common case when bootstrapping gcc, the piepatches do
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
stack-protector flag usage.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index b5a6f200635..6cbb726599b 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -991,8 +991,7 @@ proper position among the other output files. */
|
||||
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
- "|fstack-protector-strong|fstack-protector-explicit:}"
|
||||
+#define LINK_SSP_SPEC "-lssp_nonshared"
|
||||
#else
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
"|fstack-protector-strong|fstack-protector-explicit" \
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From 5a8347e23ab13912b6edec2c6c6e3a101b017c79 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH 18/35] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 6cbb726599b..59390fd39d6 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -755,10 +755,10 @@ proper position among the other output files. */
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
|
||||
- " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " %{!static-libasan:--push-state --no-as-needed}" \
|
||||
" -lasan " \
|
||||
" %{static-libasan:" LD_DYNAMIC_OPTION "}" \
|
||||
- " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
+ " %{!static-libasan:--pop-state}" \
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -794,10 +794,10 @@ proper position among the other output files. */
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
|
||||
- " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " %{!static-libtsan:--push-state --no-as-needed}" \
|
||||
" -ltsan " \
|
||||
" %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
|
||||
- " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
+ " %{!static-libtsan:--pop-state}" \
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -815,10 +815,10 @@ proper position among the other output files. */
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
|
||||
- " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " %{!static-liblsan:--push-state --no-as-needed}" \
|
||||
" -llsan " \
|
||||
" %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
|
||||
- " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
+ " %{!static-liblsan:--pop-state}" \
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -834,10 +834,10 @@ proper position among the other output files. */
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
|
||||
- " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
|
||||
+ " %{!static-libubsan:--push-state --no-as-needed}" \
|
||||
" -lubsan " \
|
||||
" %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
|
||||
- " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
|
||||
+ " %{!static-libubsan:--pop-state}" \
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 41d00a2eb0754acf71958808bd17dbebeb517b84 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH 19/35] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
gcc/config/aarch64/t-aarch64-linux | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
|
||||
index 57bf4100fcd..172894b57ef 100644
|
||||
--- a/gcc/config/aarch64/t-aarch64-linux
|
||||
+++ b/gcc/config/aarch64/t-aarch64-linux
|
||||
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
|
||||
LIB1ASMFUNCS = _aarch64_sync_cache_range
|
||||
|
||||
AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
|
||||
-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = mabi.lp64=../lib
|
||||
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
|
||||
|
||||
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 85b42bfbba71616831d14360b16998acb28790fd Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH 20/35] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
gcc/config/s390/t-linux64 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64
|
||||
index cc6ab367072..7f498ee1cdc 100644
|
||||
--- a/gcc/config/s390/t-linux64
|
||||
+++ b/gcc/config/s390/t-linux64
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
MULTILIB_OPTIONS = m64/m31
|
||||
MULTILIB_DIRNAMES = 64 32
|
||||
-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
From 7b53df284242638e940c0155b6c21e88cea1f55b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH 21/35] ppc64[le]: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
gcc/config/rs6000/t-linux | 6 ++++--
|
||||
gcc/config/rs6000/t-linux64 | 4 ++--
|
||||
gcc/config/rs6000/t-linux64bele | 4 ++--
|
||||
gcc/config/rs6000/t-linux64lebe | 4 ++--
|
||||
4 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux
|
||||
index 4e371255533..128c75c7d39 100644
|
||||
--- a/gcc/config/rs6000/t-linux
|
||||
+++ b/gcc/config/rs6000/t-linux
|
||||
@@ -2,7 +2,8 @@
|
||||
# or soft-float.
|
||||
ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
|
||||
ifneq (,$(findstring powerpc64,$(target)))
|
||||
-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
else
|
||||
MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
|
||||
endif
|
||||
@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
|
||||
MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
|
||||
endif
|
||||
ifneq (,$(findstring powerpc64le,$(target)))
|
||||
-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
endif
|
||||
endif
|
||||
|
||||
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
|
||||
index 01a94242308..b3a76379c03 100644
|
||||
--- a/gcc/config/rs6000/t-linux64
|
||||
+++ b/gcc/config/rs6000/t-linux64
|
||||
@@ -28,8 +28,8 @@
|
||||
MULTILIB_OPTIONS := m64/m32
|
||||
MULTILIB_DIRNAMES := 64 32
|
||||
MULTILIB_EXTRA_OPTS :=
|
||||
-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
|
||||
rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.cc
|
||||
$(COMPILE) $<
|
||||
diff --git a/gcc/config/rs6000/t-linux64bele b/gcc/config/rs6000/t-linux64bele
|
||||
index 97c1ee6fb4d..08d72639cb6 100644
|
||||
--- a/gcc/config/rs6000/t-linux64bele
|
||||
+++ b/gcc/config/rs6000/t-linux64bele
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
MULTILIB_OPTIONS += mlittle
|
||||
MULTILIB_DIRNAMES += le
|
||||
-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
|
||||
-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
|
||||
diff --git a/gcc/config/rs6000/t-linux64lebe b/gcc/config/rs6000/t-linux64lebe
|
||||
index 2e63bdb9fc9..c6e1c5db65d 100644
|
||||
--- a/gcc/config/rs6000/t-linux64lebe
|
||||
+++ b/gcc/config/rs6000/t-linux64lebe
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
MULTILIB_OPTIONS += mbig
|
||||
MULTILIB_DIRNAMES += be
|
||||
-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
|
||||
-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 96e7e1e9a899d9bb5fcbdf788bd529d0390c626f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH 22/35] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
gcc/config/i386/t-linux64 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
|
||||
index 138956b0962..bc03dab874f 100644
|
||||
--- a/gcc/config/i386/t-linux64
|
||||
+++ b/gcc/config/i386/t-linux64
|
||||
@@ -33,6 +33,6 @@
|
||||
comma=,
|
||||
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
||||
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
||||
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
From b26224acf342eacb33491f6ea0da1faf73d35715 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 3 Jan 2022 07:14:48 +0100
|
||||
Subject: [PATCH 23/35] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From the musl wiki [1]:
|
||||
|
||||
musl does not support sharing an include directory between archs
|
||||
[…], and thus is not compatible with GCC-style multilib. It is
|
||||
recommended that distributions build GCC with multilib disabled,
|
||||
and use library directories named lib, not lib64 or lib32.
|
||||
|
||||
For this reason, we patch existing GCC configuration files (gcc/config)
|
||||
to pin MULTILIB_OSDIRNAMES to lib, there is also a corresponding GCC
|
||||
upstream bug about this issue [2]. Avoiding the use of lib64 and lib32
|
||||
directories is a bit more difficult on the RISC-V architecture. This is
|
||||
due to the fact that the default RISC-V configuration does not only use
|
||||
the lib64 and lib32 directories but also subdirectories within these
|
||||
directories for different RISC-V ABIs (e.g. lp64d, lp64, …) [3].
|
||||
|
||||
This patch aligns the RISC-V configuration with other architectures by
|
||||
pinning MULTILIB_OSDIRNAMES to lib for rv64gc (our default RISC-V
|
||||
-march). Furthermore, this patch removes the ABI-specific startfile
|
||||
prefix spec. Since both of these impact the default LIBRARY_PATH [4]
|
||||
this patch thereby aligns the default RISC-V LIBRARY_PATH with that from
|
||||
other Alpine architectures and thereby fixes #13369 [5].
|
||||
|
||||
Incidentally, this also fixes gccgo on riscv64, as without this patch
|
||||
gccgo is otherwise not able to find the *.gox files for the Go standard
|
||||
library.
|
||||
|
||||
[1]: https://wiki.musl-libc.org/guidelines-for-distributions.html#Multilib/multi_arch
|
||||
[2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90077
|
||||
[3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103889#c14
|
||||
[4]: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.c;h=d4c8746b0aa322286decf92aa72a12f0a393b655;hb=HEAD#l9122
|
||||
[5]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13369
|
||||
---
|
||||
gcc/config/riscv/linux.h | 8 --------
|
||||
gcc/config/riscv/t-linux | 7 +++++--
|
||||
2 files changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index f8c2c351e5a..8d9881eadeb 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -61,11 +61,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{static:-static}}"
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
-
|
||||
-#define STARTFILE_PREFIX_SPEC \
|
||||
- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
|
||||
- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
|
||||
- "/lib/ " \
|
||||
- "/usr/lib/ "
|
||||
-
|
||||
-#define RISCV_USE_CUSTOMISED_MULTI_LIB select_by_abi
|
||||
diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
|
||||
index 216d2776a18..1a8a863853e 100644
|
||||
--- a/gcc/config/riscv/t-linux
|
||||
+++ b/gcc/config/riscv/t-linux
|
||||
@@ -1,3 +1,6 @@
|
||||
-# Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
|
||||
-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
|
||||
+MULTILIB_OPTIONS := march=rv64gc
|
||||
+MULTILIB_DIRNAMES := rv64gc
|
||||
+
|
||||
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
|
||||
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
|
||||
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From a72e0613f79f6b6867819317accb7a714031a08c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH 24/35] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
---
|
||||
libgcc/Makefile.in | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index 6c4dc79ab71..023cede18a7 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
|
||||
all: libunwind.a
|
||||
endif
|
||||
|
||||
+all: libgcc_eh.a
|
||||
ifeq ($(enable_shared),yes)
|
||||
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
|
||||
+all: libgcc_s$(SHLIB_EXT)
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1163,10 +1164,6 @@ install-libunwind:
|
||||
install-shared:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||
|
||||
- $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
|
||||
- chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
- $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
-
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
|
||||
endif
|
||||
|
||||
+ $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
|
||||
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
+
|
||||
parts="$(INSTALL_PARTS)"; \
|
||||
for file in $$parts; do \
|
||||
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
From 3ee8cbc1cad261b30d4a7a66d31496d5f243ce2f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH 25/35] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
gcc/ada/libgnarl/s-taprop__linux.adb | 53 ++--------------------------
|
||||
2 files changed, 3 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
index a5e645d334d..32165347071 100644
|
||||
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
@@ -403,12 +403,6 @@ package System.OS_Interface is
|
||||
PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
|
||||
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
|
||||
|
||||
- function pthread_rwlockattr_setkind_np
|
||||
- (attr : access pthread_rwlockattr_t;
|
||||
- pref : int) return int;
|
||||
- pragma Import
|
||||
- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
|
||||
-
|
||||
function pthread_rwlock_init
|
||||
(mutex : access pthread_rwlock_t;
|
||||
attr : access pthread_rwlockattr_t) return int;
|
||||
@@ -470,11 +464,6 @@ package System.OS_Interface is
|
||||
protocol : int) return int;
|
||||
pragma Import (C, pthread_mutexattr_setprotocol);
|
||||
|
||||
- function pthread_mutexattr_setprioceiling
|
||||
- (attr : access pthread_mutexattr_t;
|
||||
- prioceiling : int) return int;
|
||||
- pragma Import (C, pthread_mutexattr_setprioceiling);
|
||||
-
|
||||
type struct_sched_param is record
|
||||
sched_priority : int; -- scheduling priority
|
||||
end record;
|
||||
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
index 821ceef30e4..ae95b58e01e 100644
|
||||
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
|
||||
pragma Import
|
||||
(C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
|
||||
|
||||
- function GNAT_has_cap_sys_nice return C.int;
|
||||
- pragma Import
|
||||
- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
|
||||
-- We do not have pragma Linker_Options ("-lcap"); here, because this
|
||||
-- library is not present on many Linux systems. 'libcap' is the Linux
|
||||
-- "capabilities" library, called by __gnat_has_cap_sys_nice.
|
||||
@@ -210,38 +207,6 @@ package body System.Task_Primitives.Operations is
|
||||
-- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
|
||||
-- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
|
||||
|
||||
- function Get_Ceiling_Support return Boolean;
|
||||
- -- Get the value of the Ceiling_Support constant (see below).
|
||||
- -- Note well: If this function or related code is modified, it should be
|
||||
- -- tested by hand, because automated testing doesn't exercise it.
|
||||
-
|
||||
- -------------------------
|
||||
- -- Get_Ceiling_Support --
|
||||
- -------------------------
|
||||
-
|
||||
- function Get_Ceiling_Support return Boolean is
|
||||
- Ceiling_Support : Boolean := False;
|
||||
- begin
|
||||
- if Locking_Policy /= 'C' then
|
||||
- return False;
|
||||
- end if;
|
||||
-
|
||||
- declare
|
||||
- function geteuid return Integer;
|
||||
- pragma Import (C, geteuid, "geteuid");
|
||||
- Superuser : constant Boolean := geteuid = 0;
|
||||
- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
|
||||
- pragma Assert (Has_Cap in 0 | 1);
|
||||
- begin
|
||||
- Ceiling_Support := Superuser or else Has_Cap = 1;
|
||||
- end;
|
||||
-
|
||||
- return Ceiling_Support;
|
||||
- end Get_Ceiling_Support;
|
||||
-
|
||||
- pragma Warnings (Off, "non-preelaborable call not allowed*");
|
||||
- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
|
||||
- pragma Warnings (On, "non-preelaborable call not allowed*");
|
||||
-- True if the locking policy is Ceiling_Locking, and the current process
|
||||
-- has permission to use this policy. The process has permission if it is
|
||||
-- running as 'root', or if the capability was set by the setcap command,
|
||||
@@ -344,7 +309,9 @@ package body System.Task_Primitives.Operations is
|
||||
-- Init_Mutex --
|
||||
----------------
|
||||
|
||||
+ pragma Warnings (Off, "formal parameter * is not referenced");
|
||||
function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
|
||||
+ pragma Warnings (On, "formal parameter * is not referenced");
|
||||
Mutex_Attr : aliased pthread_mutexattr_t;
|
||||
Result, Result_2 : C.int;
|
||||
|
||||
@@ -356,16 +323,7 @@ package body System.Task_Primitives.Operations is
|
||||
return Result;
|
||||
end if;
|
||||
|
||||
- if Ceiling_Support then
|
||||
- Result := pthread_mutexattr_setprotocol
|
||||
- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
|
||||
- pragma Assert (Result = 0);
|
||||
-
|
||||
- Result := pthread_mutexattr_setprioceiling
|
||||
- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
|
||||
- pragma Assert (Result = 0);
|
||||
-
|
||||
- elsif Locking_Policy = 'I' then
|
||||
+ if Locking_Policy = 'I' then
|
||||
Result := pthread_mutexattr_setprotocol
|
||||
(Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
|
||||
pragma Assert (Result = 0);
|
||||
@@ -405,11 +363,6 @@ package body System.Task_Primitives.Operations is
|
||||
Result := pthread_rwlockattr_init (RWlock_Attr'Access);
|
||||
pragma Assert (Result = 0);
|
||||
|
||||
- Result := pthread_rwlockattr_setkind_np
|
||||
- (RWlock_Attr'Access,
|
||||
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
|
||||
- pragma Assert (Result = 0);
|
||||
-
|
||||
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
|
||||
|
||||
pragma Assert (Result in 0 | ENOMEM);
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
From 3df4788c79c7429b196c7b284af2b4cf9a4b4f8d Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/35] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
|
||||
gcc/ada/adaint.h | 10 ++++------
|
||||
gcc/ada/terminals.c | 8 ++++----
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
|
||||
+ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<libgnarl/a-intnam__linux.ads \
|
||||
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 8522094164e..92b230a462b 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
+
|
||||
+#if defined (linux) || defined(__linux__)
|
||||
+#define _GNU_SOURCE 1
|
||||
+#include <sched.h>
|
||||
+#endif
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
-#include <sched.h>
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
-cpu_set_t *
|
||||
+void *
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
-__gnat_cpu_free (cpu_set_t *set)
|
||||
+__gnat_cpu_free (void *set)
|
||||
{
|
||||
- CPU_FREE (set);
|
||||
+ CPU_FREE ((cpu_set_t *) set);
|
||||
}
|
||||
|
||||
void
|
||||
-__gnat_cpu_zero (size_t count, cpu_set_t *set)
|
||||
+__gnat_cpu_zero (size_t count, void *set)
|
||||
{
|
||||
- CPU_ZERO_S (count, set);
|
||||
+ CPU_ZERO_S (count, (cpu_set_t *) set);
|
||||
}
|
||||
|
||||
void
|
||||
-__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
|
||||
+__gnat_cpu_set (int cpu, size_t count, void *set)
|
||||
{
|
||||
/* Ada handles CPU numbers starting from 1, while C identifies the first
|
||||
CPU by a 0, so we need to adjust. */
|
||||
- CPU_SET_S (cpu - 1, count, set);
|
||||
+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
|
||||
}
|
||||
|
||||
#else /* !CPU_ALLOC */
|
||||
|
||||
/* Static cpu sets */
|
||||
|
||||
-cpu_set_t *
|
||||
+void *
|
||||
__gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
|
||||
+ return xmalloc (sizeof (cpu_set_t));
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
-__gnat_cpu_free (cpu_set_t *set)
|
||||
+__gnat_cpu_free (void *set)
|
||||
{
|
||||
free (set);
|
||||
}
|
||||
|
||||
void
|
||||
-__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
|
||||
+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
|
||||
{
|
||||
- CPU_ZERO (set);
|
||||
+ CPU_ZERO ((cpu_set_t *) set);
|
||||
}
|
||||
|
||||
void
|
||||
-__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
|
||||
+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
|
||||
{
|
||||
/* Ada handles CPU numbers starting from 1, while C identifies the first
|
||||
CPU by a 0, so we need to adjust. */
|
||||
- CPU_SET (cpu - 1, set);
|
||||
+ CPU_SET (cpu - 1, (cpu_set_t *) set);
|
||||
}
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
|
||||
/* Routines for interface to required CPU set primitives */
|
||||
|
||||
-#include <sched.h>
|
||||
-
|
||||
-extern cpu_set_t *__gnat_cpu_alloc (size_t);
|
||||
+extern void * __gnat_cpu_alloc (size_t);
|
||||
extern size_t __gnat_cpu_alloc_size (size_t);
|
||||
-extern void __gnat_cpu_free (cpu_set_t *);
|
||||
-extern void __gnat_cpu_zero (size_t, cpu_set_t *);
|
||||
-extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
|
||||
+extern void __gnat_cpu_free (void *);
|
||||
+extern void __gnat_cpu_zero (size_t, void *);
|
||||
+extern void __gnat_cpu_set (int, size_t, void *);
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
- 2- getpt (USE_GETPT)
|
||||
+ 2- posix_openpt (USE_POSIX_OPENPT)
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
-#define USE_GETPT
|
||||
+#define USE_POSIX_OPENPT
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
-#ifdef USE_GETPT
|
||||
- master_fd = getpt ();
|
||||
+#if defined(USE_POSIX_OPENPT)
|
||||
+ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
From 7b50823d8a4131e5a55d2499a0f5a52b3d91eed2 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH 27/35] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
gcc/config.in | 6 ++++++
|
||||
gcc/config/gnu-user.h | 12 +++++++++++-
|
||||
gcc/configure | 31 ++++++++++++++++++++++++++++++-
|
||||
gcc/configure.ac | 21 +++++++++++++++++++++
|
||||
gcc/doc/install.texi | 8 ++++++++
|
||||
gcc/doc/tm.texi | 8 +++++++-
|
||||
gcc/doc/tm.texi.in | 8 +++++++-
|
||||
gcc/gcc.cc | 12 +++++++++++-
|
||||
9 files changed, 102 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 6ff2b3f9925..394b105b271 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -235,6 +235,7 @@ HOST_EXPORTS = \
|
||||
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
|
||||
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
|
||||
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
|
||||
+ TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; \
|
||||
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
|
||||
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
|
||||
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 0679fbbf4c6..ee81139b385 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -118,6 +118,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
+/* Define if libatomic should always be linked. */
|
||||
+#ifndef USED_FOR_TARGET
|
||||
+#undef ENABLE_AUTOLINK_LIBATOMIC
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* Define to 1 to specify that we are using the BID decimal floating point
|
||||
format instead of DPD */
|
||||
#ifndef USED_FOR_TARGET
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index b26b17f2f2a..3f64ea46180 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
|
||||
#endif
|
||||
|
||||
+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
|
||||
+# ifdef LD_AS_NEEDED_OPTION
|
||||
+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
|
||||
+# else
|
||||
+# define LINK_LIBATOMIC_SPEC "-latomic"
|
||||
+# endif
|
||||
+#elif !defined(LINK_LIBATOMIC_SPEC)
|
||||
+# define LINK_LIBATOMIC_SPEC ""
|
||||
+#endif
|
||||
+
|
||||
#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
|
||||
- "%{static|static-pie:--start-group} %G %{!nolibc:%L} \
|
||||
+ "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L} \
|
||||
%{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index e59cbee1767..787c35d4e25 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -984,6 +984,7 @@ with_changes_root_url
|
||||
enable_languages
|
||||
with_multilib_list
|
||||
with_multilib_generator
|
||||
+enable_autolink_libatomic
|
||||
with_zstd
|
||||
with_zstd_include
|
||||
with_zstd_lib
|
||||
@@ -1713,6 +1714,9 @@ Optional Features:
|
||||
--disable-shared don't provide a shared libgcc
|
||||
--disable-gcov don't provide libgcov and related host tools
|
||||
--enable-languages=LIST specify which front-ends to build
|
||||
+ --enable-autolink-libatomic
|
||||
+ enable automatic linking of libatomic (ignored if
|
||||
+ not built)
|
||||
--disable-rpath do not hardcode runtime library paths
|
||||
--enable-sjlj-exceptions
|
||||
arrange to use setjmp/longjmp exception handling
|
||||
@@ -8329,7 +8333,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
-
|
||||
# Check whether --with-multilib-generator was given.
|
||||
if test "${with_multilib_generator+set}" = set; then :
|
||||
withval=$with_multilib_generator; :
|
||||
@@ -8337,6 +8340,32 @@ else
|
||||
with_multilib_generator=default
|
||||
fi
|
||||
|
||||
+# If libatomic is available, whether it should be linked automatically
|
||||
+# Check whether --enable-autolink-libatomic was given.
|
||||
+if test "${enable_autolink_libatomic+set}" = set; then :
|
||||
+ enableval=$enable_autolink_libatomic;
|
||||
+ case $enable_autolink_libatomic in
|
||||
+ yes | no) ;;
|
||||
+ *) as_fn_error $? "'$enable_autolink_libatomic' is an invalid value for
|
||||
+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
|
||||
+ esac
|
||||
+
|
||||
+else
|
||||
+ enable_autolink_libatomic=''
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+if test x$enable_autolink_libatomic = xyes; then
|
||||
+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then
|
||||
+
|
||||
+$as_echo "#define ENABLE_AUTOLINK_LIBATOMIC 1" >>confdefs.h
|
||||
+
|
||||
+ else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&5
|
||||
+$as_echo "$as_me: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&2;}
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 57268319de1..56bcaa87620 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
:,
|
||||
with_multilib_generator=default)
|
||||
|
||||
+# If libatomic is available, whether it should be linked automatically
|
||||
+AC_ARG_ENABLE(autolink-libatomic,
|
||||
+[AS_HELP_STRING([--enable-autolink-libatomic],
|
||||
+ [enable automatic linking of libatomic (ignored if not built)])],
|
||||
+[
|
||||
+ case $enable_autolink_libatomic in
|
||||
+ yes | no) ;;
|
||||
+ *) AC_MSG_ERROR(['$enable_autolink_libatomic' is an invalid value for
|
||||
+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'.]) ;;
|
||||
+ esac
|
||||
+], [enable_autolink_libatomic=''])
|
||||
+
|
||||
+if test x$enable_autolink_libatomic = xyes; then
|
||||
+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then
|
||||
+ AC_DEFINE(ENABLE_AUTOLINK_LIBATOMIC, 1,
|
||||
+ [Define if libatomic should always be linked.])
|
||||
+ else
|
||||
+ AC_MSG_WARN([libatomic is not build for this target, --enable-autolink-libatomic ignored])
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index b30d3691fe6..ccc8e5dbb00 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2377,6 +2377,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
environments. Enabled by default, and may be disabled using
|
||||
@option{--disable-canonical-system-headers}.
|
||||
|
||||
+@item --enable-autolink-libatomic
|
||||
+@itemx --disable-autolink-libatomic
|
||||
+Tell GCC that it should automatically link libatomic; if supported by
|
||||
+the linker, the file is only linked as needed. This flag is ignored
|
||||
+when libatomic is not built. Note that this conigure flag is in particular
|
||||
+useful when building an offloading-target compiler; as for those, a
|
||||
+user had to specify @code{-foffload=target=-latomic} otherwise.
|
||||
+
|
||||
@item --with-glibc-version=@var{major}.@var{minor}
|
||||
Tell GCC that when the GNU C Library (glibc) is used on the target it
|
||||
will be version @var{major}.@var{minor} or later. Normally this can
|
||||
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
|
||||
index a660e33739b..6183c407a2b 100644
|
||||
--- a/gcc/doc/tm.texi
|
||||
+++ b/gcc/doc/tm.texi
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
|
||||
@defmac LINK_GCC_C_SEQUENCE_SPEC
|
||||
The sequence in which libgcc and libc are specified to the linker.
|
||||
-By default this is @code{%G %L %G}.
|
||||
+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}.
|
||||
+@end defmac
|
||||
+
|
||||
+@defmac LINK_LIBATOMIC_SPEC
|
||||
+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link
|
||||
+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC}
|
||||
+is set.
|
||||
@end defmac
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
|
||||
index f7ab5d48a63..281540aba68 100644
|
||||
--- a/gcc/doc/tm.texi.in
|
||||
+++ b/gcc/doc/tm.texi.in
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
|
||||
@defmac LINK_GCC_C_SEQUENCE_SPEC
|
||||
The sequence in which libgcc and libc are specified to the linker.
|
||||
-By default this is @code{%G %L %G}.
|
||||
+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}.
|
||||
+@end defmac
|
||||
+
|
||||
+@defmac LINK_LIBATOMIC_SPEC
|
||||
+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link
|
||||
+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC}
|
||||
+is set.
|
||||
@end defmac
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 59390fd39d6..dae1dd4cf79 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -974,13 +974,23 @@ proper position among the other output files. */
|
||||
# define ASM_DEBUG_OPTION_SPEC ""
|
||||
#endif
|
||||
|
||||
+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
|
||||
+# ifdef LD_AS_NEEDED_OPTION
|
||||
+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
|
||||
+# else
|
||||
+# define LINK_LIBATOMIC_SPEC "-latomic"
|
||||
+# endif
|
||||
+#elif !defined(LINK_LIBATOMIC_SPEC)
|
||||
+# define LINK_LIBATOMIC_SPEC ""
|
||||
+#endif
|
||||
+
|
||||
/* Here is the spec for running the linker, after compiling all files. */
|
||||
|
||||
/* This is overridable by the target in case they need to specify the
|
||||
-lgcc and -lc order specially, yet not require them to override all
|
||||
of LINK_COMMAND_SPEC. */
|
||||
#ifndef LINK_GCC_C_SEQUENCE_SPEC
|
||||
-#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
+#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L %G}"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEFAULT_SSP
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 5bbbd320e54ab5341cfba83e8af98685131caba1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 29 Aug 2021 12:23:34 +0200
|
||||
Subject: [PATCH 28/35] configure: fix detection of atomic builtins in
|
||||
libatomic configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
default) causes the libatomic configure script to incorrectly detect
|
||||
which builtins are available on riscv64. This then causes incorrect code
|
||||
generation for libatomic since it assumes compiler builtins to be
|
||||
available which are not actually available on riscv64.
|
||||
|
||||
This commit fixes this issue by disabling linking of libatomic configure
|
||||
test code entirely, thereby preventing linking against libatomic.
|
||||
|
||||
See:
|
||||
|
||||
* https://gitlab.alpinelinux.org/alpine/aports/-/issues/12948
|
||||
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996#c6
|
||||
---
|
||||
libatomic/configure.tgt | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
|
||||
index a92ae9e8309..90b579ca4d8 100644
|
||||
--- a/libatomic/configure.tgt
|
||||
+++ b/libatomic/configure.tgt
|
||||
@@ -30,6 +30,26 @@
|
||||
# on ${target_cpu}. For example to allow proper use of multilibs.
|
||||
configure_tgt_pre_target_cpu_XCFLAGS="${XCFLAGS}"
|
||||
|
||||
+# The libatomic configure script performs several checks to determine
|
||||
+# whether builtins for atomic operations are available. When compiling
|
||||
+# with --enable-autolink-libatomic the test code compiled by the
|
||||
+# configure script is also linked against libatomic. This causes it
|
||||
+# to think that builtins are available, even if there are not, since
|
||||
+# the tested symbols are provided by libatomic.
|
||||
+#
|
||||
+# This is a hack to ensure that we don't link against libatomic by not
|
||||
+# linking any configure test code at all when --enable-autolink-libatomic
|
||||
+# is given.
|
||||
+#
|
||||
+# See:
|
||||
+#
|
||||
+# * https://gitlab.alpinelinux.org/alpine/aports/-/issues/12817
|
||||
+# * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996#c4
|
||||
+#
|
||||
+if test x$enable_autolink_libatomic = xyes; then
|
||||
+ gcc_no_link=yes
|
||||
+fi
|
||||
+
|
||||
case "${target_cpu}" in
|
||||
alpha*)
|
||||
# fenv.c needs this option to generate inexact exceptions.
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 430c701a3cefbe09a9c7c8a2f5bbe957f9b2ecb2 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Thu, 30 Jun 2022 16:44:51 +0000
|
||||
Subject: [PATCH 29/35] libstdc++: do not throw exceptions for non-C locales on
|
||||
musl targets
|
||||
|
||||
---
|
||||
libstdc++-v3/config/locale/generic/c_locale.cc | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
index 8849d78fdfa..aff467f98fe 100644
|
||||
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
@@ -242,9 +242,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
// Currently, the generic model only supports the "C" locale.
|
||||
// See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html
|
||||
__cloc = 0;
|
||||
- if (strcmp(__s, "C"))
|
||||
- __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
|
||||
- "name not valid"));
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 05f0043755f341a2ff4f845379327076b3e0203d Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 03:49:21 +0000
|
||||
Subject: [PATCH 30/35] gdc: unconditionally link libgphobos against
|
||||
libucontext
|
||||
|
||||
ref: alpine/aports#13422
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 394b105b271..bc4a77fc300 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -52809,7 +52809,7 @@ configure-target-libphobos:
|
||||
esac; \
|
||||
module_srcdir=libphobos; \
|
||||
rm -f no-such-file || : ; \
|
||||
- CONFIG_SITE=no-such-file $(SHELL) \
|
||||
+ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
|
||||
$$s/$$module_srcdir/configure \
|
||||
--srcdir=$${topdir}/$$module_srcdir \
|
||||
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From 0b89a74fbf77ae6917f043c79cd03db0d6ef0212 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
||||
Subject: [PATCH 31/35] druntime: link against libucontext on all platforms
|
||||
|
||||
On musl-based Linux distributions, swapcontext etc. are not provided by
|
||||
musl but instead by libucontext. Hence, we _always_ need to link against
|
||||
an external library for these functions.
|
||||
---
|
||||
libphobos/configure | 8 --------
|
||||
libphobos/m4/druntime/libraries.m4 | 8 --------
|
||||
2 files changed, 16 deletions(-)
|
||||
|
||||
diff --git a/libphobos/configure b/libphobos/configure
|
||||
index 925c53c5f5e..60c2a0c11c6 100755
|
||||
--- a/libphobos/configure
|
||||
+++ b/libphobos/configure
|
||||
@@ -15216,14 +15216,6 @@ fi
|
||||
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
|
||||
# "yes" for targets that have 'version = AsmExternal'.
|
||||
druntime_fiber_asm_external=no
|
||||
- case "$target_cpu" in
|
||||
- aarch64* | \
|
||||
- arm* | \
|
||||
- i[34567]86|x86_64 | \
|
||||
- powerpc)
|
||||
- druntime_fiber_asm_external=yes
|
||||
- ;;
|
||||
- esac
|
||||
if test "$druntime_fiber_asm_external" = no; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing swapcontext" >&5
|
||||
$as_echo_n "checking for library containing swapcontext... " >&6; }
|
||||
diff --git a/libphobos/m4/druntime/libraries.m4 b/libphobos/m4/druntime/libraries.m4
|
||||
index 45a56f6f76a..fef6e890b1e 100644
|
||||
--- a/libphobos/m4/druntime/libraries.m4
|
||||
+++ b/libphobos/m4/druntime/libraries.m4
|
||||
@@ -220,14 +220,6 @@ AC_DEFUN([DRUNTIME_LIBRARIES_UCONTEXT],
|
||||
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
|
||||
# "yes" for targets that have 'version = AsmExternal'.
|
||||
druntime_fiber_asm_external=no
|
||||
- case "$target_cpu" in
|
||||
- aarch64* | \
|
||||
- arm* | \
|
||||
- i[[34567]]86|x86_64 | \
|
||||
- powerpc)
|
||||
- druntime_fiber_asm_external=yes
|
||||
- ;;
|
||||
- esac
|
||||
if test "$druntime_fiber_asm_external" = no; then
|
||||
AC_SEARCH_LIBS([swapcontext], [c ucontext], [],
|
||||
AC_MSG_ERROR([swapcontext required but not found]))
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From eeec799f43fbd0bfffc13594585b39d708972511 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Tue, 19 Jul 2022 14:54:07 +0200
|
||||
Subject: [PATCH 32/35] libgnat: time_t is always 64-bit on musl libc
|
||||
|
||||
---
|
||||
gcc/ada/libgnat/s-parame.ads | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads
|
||||
index 3d6e345a1ba..cfe0b4d3ca6 100644
|
||||
--- a/gcc/ada/libgnat/s-parame.ads
|
||||
+++ b/gcc/ada/libgnat/s-parame.ads
|
||||
@@ -102,7 +102,7 @@ package System.Parameters is
|
||||
-- Characteristics of time_t type --
|
||||
------------------------------------
|
||||
|
||||
- time_t_bits : constant := Long_Integer'Size;
|
||||
+ time_t_bits : constant := Long_Long_Integer'Size;
|
||||
-- Number of bits in type time_t
|
||||
|
||||
----------------------------------------------
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From b71d21b87e6946c763edad5e420bf22d8a453077 Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 29 May 2023 15:33:11 +0000
|
||||
Subject: [PATCH 33/35] libphobos: do not use LFS64 symbols
|
||||
|
||||
musl does not have these since 1.2.4, we can't use the compat interfaces.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/config.d | 2 +-
|
||||
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/config.d b/libphobos/libdruntime/core/sys/posix/config.d
|
||||
index ae6752f220e..6b80d1ff0e6 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/config.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/config.d
|
||||
@@ -88,7 +88,7 @@ else version (CRuntime_Musl)
|
||||
enum __REDIRECT = false;
|
||||
|
||||
// Those three are irrelevant for Musl as it always uses 64 bits off_t
|
||||
- enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
|
||||
+ enum __USE_FILE_OFFSET64 = false;
|
||||
enum __USE_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
|
||||
enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
index 0d3d517d69a..323aa0af72d 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
@@ -293,11 +293,7 @@ else version (CRuntime_Bionic)
|
||||
}
|
||||
else version (CRuntime_Musl)
|
||||
{
|
||||
- static if (__USE_LARGEFILE64) void* mmap64(void*, size_t, int, int, int, off_t);
|
||||
- static if (__USE_FILE_OFFSET64)
|
||||
- alias mmap = mmap64;
|
||||
- else
|
||||
- void* mmap(void*, size_t, int, int, int, off_t);
|
||||
+ void* mmap(void*, size_t, int, int, int, off_t);
|
||||
int munmap(void*, size_t);
|
||||
}
|
||||
else version (CRuntime_UClibc)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
From 4bfcb35bc43d3e3b7510620362d7c28d9e4c17ca Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 10 Jul 2023 23:23:29 +0000
|
||||
Subject: [PATCH 34/35] libgo: fix lfs64 use
|
||||
|
||||
---
|
||||
.../go/internal/syscall/unix/at_largefile.go | 2 +-
|
||||
libgo/go/os/dir_largefile.go | 2 +-
|
||||
libgo/go/syscall/libcall_glibc.go | 2 +-
|
||||
libgo/go/syscall/libcall_linux.go | 4 +--
|
||||
libgo/go/syscall/libcall_posix_largefile.go | 26 +++++++++----------
|
||||
libgo/runtime/go-varargs.c | 2 +-
|
||||
libgo/sysinfo.c | 9 +++----
|
||||
7 files changed, 22 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
index 82e0dcfd074..16151ecad1b 100644
|
||||
--- a/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
+++ b/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
@@ -10,5 +10,5 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
-//extern fstatat64
|
||||
+//extern fstatat
|
||||
func fstatat(int32, *byte, *syscall.Stat_t, int32) int32
|
||||
diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go
|
||||
index 1fc5ee0771f..0c6dffe1a75 100644
|
||||
--- a/libgo/go/os/dir_largefile.go
|
||||
+++ b/libgo/go/os/dir_largefile.go
|
||||
@@ -11,5 +11,5 @@ package os
|
||||
|
||||
import "syscall"
|
||||
|
||||
-//extern readdir64
|
||||
+//extern readdir
|
||||
func libc_readdir(*syscall.DIR) *syscall.Dirent
|
||||
diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go
|
||||
index 5c1ec483c75..5a1245ed44b 100644
|
||||
--- a/libgo/go/syscall/libcall_glibc.go
|
||||
+++ b/libgo/go/syscall/libcall_glibc.go
|
||||
@@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
|
||||
-//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
|
||||
+//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if race.Enabled {
|
||||
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
|
||||
index 03ca7261b59..ad21fd0b3ac 100644
|
||||
--- a/libgo/go/syscall/libcall_linux.go
|
||||
+++ b/libgo/go/syscall/libcall_linux.go
|
||||
@@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) {
|
||||
//adjtimex(buf *Timex) _C_int
|
||||
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
-//fstatfs64(fd _C_int, buf *Statfs_t) _C_int
|
||||
+//fstatfs(fd _C_int, buf *Statfs_t) _C_int
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0)
|
||||
@@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
|
||||
}
|
||||
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
-//statfs64(path *byte, buf *Statfs_t) _C_int
|
||||
+//statfs(path *byte, buf *Statfs_t) _C_int
|
||||
|
||||
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
||||
//sysinfo(info *Sysinfo_t) _C_int
|
||||
diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go
|
||||
index f90055bb29a..334212f0af1 100644
|
||||
--- a/libgo/go/syscall/libcall_posix_largefile.go
|
||||
+++ b/libgo/go/syscall/libcall_posix_largefile.go
|
||||
@@ -10,40 +10,40 @@
|
||||
package syscall
|
||||
|
||||
//sys Creat(path string, mode uint32) (fd int, err error)
|
||||
-//creat64(path *byte, mode Mode_t) _C_int
|
||||
+//creat(path *byte, mode Mode_t) _C_int
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
-//fstat64(fd _C_int, stat *Stat_t) _C_int
|
||||
+//fstat(fd _C_int, stat *Stat_t) _C_int
|
||||
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
-//ftruncate64(fd _C_int, length Offset_t) _C_int
|
||||
+//ftruncate(fd _C_int, length Offset_t) _C_int
|
||||
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
-//getrlimit64(resource _C_int, rlim *Rlimit) _C_int
|
||||
+//getrlimit(resource _C_int, rlim *Rlimit) _C_int
|
||||
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
-//lstat64(path *byte, stat *Stat_t) _C_int
|
||||
+//lstat(path *byte, stat *Stat_t) _C_int
|
||||
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
-//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
|
||||
+//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
|
||||
|
||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
-//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int
|
||||
+//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int
|
||||
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
||||
-//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
+//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||
-//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
+//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error)
|
||||
-//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t
|
||||
+//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t
|
||||
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
-//setrlimit64(resource int, rlim *Rlimit) _C_int
|
||||
+//setrlimit(resource int, rlim *Rlimit) _C_int
|
||||
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
-//stat64(path *byte, stat *Stat_t) _C_int
|
||||
+//stat(path *byte, stat *Stat_t) _C_int
|
||||
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
-//truncate64(path *byte, length Offset_t) _C_int
|
||||
+//truncate(path *byte, length Offset_t) _C_int
|
||||
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c
|
||||
index f84860891e6..7efc9615985 100644
|
||||
--- a/libgo/runtime/go-varargs.c
|
||||
+++ b/libgo/runtime/go-varargs.c
|
||||
@@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg)
|
||||
int
|
||||
__go_open64 (char *path, int mode, mode_t perm)
|
||||
{
|
||||
- return open64 (path, mode, perm);
|
||||
+ return open (path, mode, perm);
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 180f5c31d74..1d717d55c0e 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -366,7 +366,7 @@ typedef loff_t libgo_loff_t_type;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OFF64_T)
|
||||
-typedef off64_t libgo_off_t_type;
|
||||
+typedef off_t libgo_off_t_type;
|
||||
#else
|
||||
typedef off_t libgo_off_t_type;
|
||||
#endif
|
||||
@@ -398,13 +398,11 @@ typedef off_t libgo_off_t_type;
|
||||
|
||||
// From dirent.h
|
||||
SREF(dirent);
|
||||
-SREF(dirent64);
|
||||
OTREF(DIR);
|
||||
EREF(DT_UNKNOWN);
|
||||
|
||||
// From fcntl.h
|
||||
SREF(flock);
|
||||
-SREF(flock64);
|
||||
|
||||
// From ffi headers
|
||||
SREF(_ffi_type);
|
||||
@@ -485,11 +483,10 @@ EREF(SS_ONSTACK);
|
||||
EREF(SEGV_MAPERR);
|
||||
|
||||
// From stat.h
|
||||
-SREF(stat64);
|
||||
+SREF(stat);
|
||||
|
||||
// From statfs.h
|
||||
SREF(statfs);
|
||||
-SREF(statfs64);
|
||||
|
||||
// From sysinfo.h
|
||||
SREF(sysinfo);
|
||||
@@ -519,7 +516,7 @@ EREF(PTRACE_PEEKTEXT);
|
||||
|
||||
// From sys/resource.h
|
||||
SREF(rusage);
|
||||
-SREF(rlimit64);
|
||||
+SREF(rlimit);
|
||||
EREF(RLIMIT_NOFILE);
|
||||
EREF(PRIO_USER);
|
||||
EREF(RUSAGE_SELF);
|
||||
--
|
||||
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
|
||||
|
||||
@@ -0,0 +1,826 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-x86_64
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=x86_64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
LANG_OBJC=false
|
||||
LANG_JAVA=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_ADA=false
|
||||
options="!strip"
|
||||
|
||||
# abuild doesn't try to tries to install "build-base-$CTARGET_ARCH"
|
||||
# when this variable matches "no*"
|
||||
BOOTSTRAP="nobuildbase"
|
||||
|
||||
# abuild will only cross compile when this variable is set, but it
|
||||
# needs to find a valid package database in there for dependency
|
||||
# resolving, so we set it to /.
|
||||
CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
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}"
|
||||
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86_64
|
||||
pkgrel=0
|
||||
pkgdesc="Stage2 cross-compiler for x86_64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-x86_64 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86_64 binutils-x86_64"
|
||||
subpackages="g++-x86_64:gpp libstdc++-dev-x86_64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
: "${LANG_OBJC:=true}"
|
||||
: "${LANG_GO:=true}"
|
||||
: "${LANG_FORTRAN:=true}"
|
||||
: "${LANG_ADA:=true}"
|
||||
: "${LANG_JIT:=true}"
|
||||
|
||||
_libgomp=true
|
||||
_libgcc=false
|
||||
_libatomic=true
|
||||
_libitm=true
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
if [ "$BOOTSTRAP" = nolibc ]; then
|
||||
LANG_CXX=false
|
||||
LANG_ADA=false
|
||||
_libgcc=false
|
||||
_builddir="$srcdir/build-cross-pass2"
|
||||
else
|
||||
_builddir="$srcdir/build-cross-final"
|
||||
fi
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
_libitm=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
export LDFLAGS_FOR_TARGET=" "
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
export CC_FOR_BUILD="gcc"
|
||||
export CXX_FOR_BUILD="g++"
|
||||
export CFLAGS_FOR_BUILD=" "
|
||||
export CXXFLAGS_FOR_BUILD=" "
|
||||
export LDFLAGS_FOR_BUILD=" "
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
export LDFLAGS_FOR_TARGET=" "
|
||||
|
||||
# Languages that do not need bootstrapping
|
||||
LANG_OBJC=false
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build-cross-native"
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# pass -g0 by default to bypass -g, since we don't do debug
|
||||
# if -dbg added, the -g is appended and overrides this
|
||||
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/} -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/} -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
# GDC does currently not work on 32-bit musl architectures.
|
||||
# This is a known upstream issue.
|
||||
# See: https://github.com/dlang/druntime/pull/3383
|
||||
armhf|armv7|x86) LANG_D=false ;;
|
||||
esac
|
||||
|
||||
# libitm has TEXTRELs in ARM build, so disable for now
|
||||
case "$CTARGET_ARCH" in
|
||||
arm*) _libitm=false ;;
|
||||
mips*) _libitm=false ;;
|
||||
riscv64) _libitm=false ;;
|
||||
esac
|
||||
|
||||
# Internal libffi fails to build on MIPS at the moment, need to
|
||||
# investigate further. We disable LANG_GO on mips64 as it requires
|
||||
# the internal libffi.
|
||||
case "$CTARGET_ARCH" in
|
||||
mips*) LANG_GO=false ;;
|
||||
esac
|
||||
|
||||
# Fortran uses libquadmath if toolchain has __float128
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
_languages=c
|
||||
if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
fi
|
||||
if $LANG_D; then
|
||||
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
||||
_languages="$_languages,d"
|
||||
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
||||
fi
|
||||
if $LANG_OBJC; then
|
||||
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
|
||||
_languages="$_languages,objc"
|
||||
fi
|
||||
if $LANG_GO; then
|
||||
subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_target:go"
|
||||
_languages="$_languages,go"
|
||||
fi
|
||||
if $LANG_FORTRAN; then
|
||||
subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_target:gfortran"
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
if $LANG_JIT; then
|
||||
subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev"
|
||||
fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
# mirrored on dev.alpinelinux.org. Please ensure that the snapshot Git commit (as stated in the
|
||||
# README) matches the base commit on the version-specific branch in the Git repository below.
|
||||
#
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
0007-Enable-Wtrampolines-by-default.patch
|
||||
0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
0012-libgcc_s.patch
|
||||
0013-nopie.patch
|
||||
0014-ada-fix-shared-linking.patch
|
||||
0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
0016-add-fortify-headers-paths.patch
|
||||
0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
0019-aarch64-disable-multilib-support.patch
|
||||
0020-s390x-disable-multilib-support.patch
|
||||
0021-ppc64-le-disable-multilib-support.patch
|
||||
0022-x86_64-disable-multilib-support.patch
|
||||
0023-riscv-disable-multilib-support.patch
|
||||
0024-always-build-libgcc_eh.a.patch
|
||||
0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
0026-ada-musl-support-fixes.patch
|
||||
0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
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
|
||||
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}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6kz --with-tune=arm1176jzf-s --with-fpu=vfpv2 --with-float=hard --with-abi=aapcs-linux";;
|
||||
armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";;
|
||||
mips-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";;
|
||||
mips64-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";;
|
||||
mips64el-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";;
|
||||
mipsel-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";;
|
||||
powerpc-*-*-*) _arch_configure="--enable-secureplt --enable-decimal-float=no";;
|
||||
powerpc64*-*-*-*) _arch_configure="--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux";;
|
||||
i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";;
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
mips*) _hash_style_configure="--with-linker-hash-style=sysv" ;;
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
esac
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
|
||||
|
||||
msg "Building the following:"
|
||||
echo ""
|
||||
echo " CBUILD=$CBUILD"
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
echo ""
|
||||
|
||||
local version="Alpine $pkgver"
|
||||
local gccconfiguration="
|
||||
--prefix=/usr
|
||||
--mandir=/usr/share/man
|
||||
--infodir=/usr/share/info
|
||||
--build=$CBUILD
|
||||
--host=$CHOST
|
||||
--target=$CTARGET
|
||||
--enable-checking=release
|
||||
--disable-cet
|
||||
--disable-fixed-point
|
||||
--disable-libstdcxx-pch
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
--enable-languages=$_languages
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
--with-system-zlib
|
||||
$_hash_style_configure
|
||||
"
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
make
|
||||
|
||||
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
||||
# as doing so slows it down a few %, so for some quick if's here we gain
|
||||
# free performance
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building libgccjit"
|
||||
make all-gcc
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
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
|
||||
fi
|
||||
|
||||
# we dont support gcj -static
|
||||
# and saving 35MB is not bad.
|
||||
find "$pkgdir" \( -name libgtkpeer.a \
|
||||
-o -name libgjsmalsa.a \
|
||||
-o -name libgij.a \) \
|
||||
-delete
|
||||
|
||||
# strip debug info from some static libs
|
||||
find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \
|
||||
-o -name libgphobos.a -o -name libgdruntime.a \
|
||||
-o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \
|
||||
-o -name libitm.a -o -name libgo.a -o -name libcaf\*.a \
|
||||
-o -name libatomic.a -o -name libasan.a -o -name libtsan.a \) \
|
||||
-a -type f \
|
||||
-exec $STRIP_FOR_TARGET -g {} +
|
||||
|
||||
if $_libgomp; then
|
||||
mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir
|
||||
fi
|
||||
if $_libitm; then
|
||||
mv "$pkgdir"/usr/lib/libitm.spec "$pkgdir"/$_gcclibdir
|
||||
fi
|
||||
|
||||
# remove ffi
|
||||
rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi*
|
||||
find "$pkgdir" -name 'ffi*.h' -delete
|
||||
|
||||
local gdblib=${_target:+$CTARGET/}lib
|
||||
if [ -d "$pkgdir"/usr/$gdblib/ ]; then
|
||||
for i in $(find "$pkgdir"/usr/$gdblib/ -type f -maxdepth 1 -name "*-gdb.py"); do
|
||||
mkdir -p "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib
|
||||
mv "$i" "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib/
|
||||
done
|
||||
fi
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
if [ -h "$so" ]; then
|
||||
local _real=$(basename "$(readlink "$so")")
|
||||
rm -f "$so"
|
||||
echo "GROUP ($_real)" > "$so"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# add c89/c99 wrapper scripts
|
||||
cat >"$pkgdir"/usr/bin/c89 <<'EOF'
|
||||
#!/bin/sh
|
||||
_flavor="-std=c89"
|
||||
for opt; do
|
||||
case "$opt" in
|
||||
-ansi|-std=c89|-std=iso9899:1990) _flavor="";;
|
||||
-std=*) echo "$(basename $0) called with non ANSI/ISO C option $opt" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
exec gcc $_flavor ${1+"$@"}
|
||||
EOF
|
||||
cat >"$pkgdir"/usr/bin/c99 <<'EOF'
|
||||
#!/bin/sh
|
||||
_flavor="-std=c99"
|
||||
for opt; do
|
||||
case "$opt" in
|
||||
-std=c99|-std=iso9899:1999) _flavor="";;
|
||||
-std=*) echo "$(basename $0) called with non ISO C99 option $opt" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
exec gcc $_flavor ${1+"$@"}
|
||||
EOF
|
||||
chmod 755 "$pkgdir"/usr/bin/c?9
|
||||
|
||||
# install lto plugin so regular binutils may use it
|
||||
mkdir -p "$pkgdir"/usr/lib/bfd-plugins
|
||||
ln -s /$_gcclibexec/liblto_plugin.so "$pkgdir/usr/lib/bfd-plugins/"
|
||||
fi
|
||||
}
|
||||
|
||||
libatomic() {
|
||||
pkgdesc="GCC Atomic library"
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
pkgdesc="GNU C++ standard runtime library"
|
||||
depends=
|
||||
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
# verify that we are using clock_gettime rather than doing direct syscalls
|
||||
# so we dont break 32 bit arches due to time64.
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
pkgdesc="GNU C++ standard runtime library (development files)"
|
||||
depends=
|
||||
replaces="g++"
|
||||
|
||||
amove usr/${_target:+$CTARGET/}lib/libstdc++.a \
|
||||
usr/${_target:+$CTARGET/}lib/libstdc++exp.a \
|
||||
usr/${_target:+$CTARGET/}lib/libstdc++.so \
|
||||
usr/${_target:+$CTARGET/}lib/libstdc++fs.a \
|
||||
usr/${_target:+$CTARGET/}lib/libsupc++.a \
|
||||
usr/${_target:+$CTARGET/}include/c++
|
||||
}
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
pkgdesc="GCC JIT Library"
|
||||
depends=
|
||||
amove usr/lib/libgccjit.so*
|
||||
}
|
||||
|
||||
jitdev() {
|
||||
pkgdesc="GCC JIT Library (development files)"
|
||||
depends="libgccjit"
|
||||
amove usr/include/libgccjit*.h
|
||||
}
|
||||
|
||||
libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
pkgdesc="GCC shared-memory parallel programming API library"
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
pkgdesc="GCC-based D language compiler"
|
||||
depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev"
|
||||
depends="$depends libucontext-dev"
|
||||
provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
pkgdesc="GCC Go frontend (intended for bootstrapping community/go)"
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
# See https://lists.alpinelinux.org/~alpine/devel/%3C33KG0XO61I4IL.2Z7RTAZ5J3SY6%408pit.net%3E
|
||||
provides="go-bootstrap"
|
||||
provider_priority=1 # lowest, see community/go
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
replaces="gcc"
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
pkgdesc="GNU Fortran Compiler"
|
||||
depends="gcc=$_gccrel libgfortran=$_gccrel"
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
pkgdesc="Ada support for GCC"
|
||||
depends="gcc=$_gccrel"
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
pkgdesc="$pkgdesc (gdb printers)"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel gdb"
|
||||
|
||||
amove \
|
||||
usr/share/gdb/python/ \
|
||||
usr/share/gcc-*/python/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
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
|
||||
17a2993027d3ddf8595952ebcae425695ddc7b1cf73b384d2e55fddecb9cbf3f6482860a502ff69b14075e12badf27300fd3039f3a9005e851fd8d121d258c2b 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
444550e55491ff89fe8cbbb4b73d017c9c147cdce1ad5c0561fe7d6ab3834515a814c7676c408cfeec18e1aaace27b3c26a2ffe4a75042285df5124976c38672 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
5a5f57e4e45745bb4d9d63d7d410fe9dd56ce12dbd70c376dd45015909307faf02391e75368e4e7404591614a874cee41b20652cf27be234765d6db97ceb4e7e 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
3a2b22388398a93dae7787e794cd580b9c577326f286241e086120c1fcfdd9228c2e00407088ebb163fb1acc21722c199071343551c989a958dc3c845b15132d 0007-Enable-Wtrampolines-by-default.patch
|
||||
7535de1c552544e3a51cbb00b5e08ac59edbf3bdcfce2a63b9f319fada3f3676f47e3a00c75d91bcefd14500555ea0844f18c130ff46b20f416ea76071e5af39 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
93d03afd83dee5f7129c36a7b81fa8fd323476507e2f53a4fbe40a026037e7dfafa23591145d7af5848d9a322d212497947a0f58ef828734552e6a6dabd00cfa 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
da9eaf2f0ddbec5ee14dc26053936587e6c76fbf16846db804a18cf4d318579426ebcc566aed02daf8e34f60c08b61f5d3959305886dca9bbcdc84db057258d9 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
35b9aafe7eee8138cb7aad7164a8f77c15ccdce26843cee78b5871ef91d76cad22ed0871b20f51c4b89b71afd9cfe4ba4227086e158c466558513708fe7d2a1a 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
9d43f844fad0ac6e1c35a2b6f461f9278ae09e468f2c9ae8adc43accbe6934994aa10d3a433644d1393a4a76e3caed69e3191db7f3c0c24b4e7a0a0a0cbac3f1 0012-libgcc_s.patch
|
||||
b2c4921c5eef33ee43a92ab5ec7f09d5d3adb49a2416595001e6376ffdf652ef9d0dc21778c3a86e45334290dbe467a4e891ed34a6522e0c72f746def22e8663 0013-nopie.patch
|
||||
0b50ad15115192699efa9fda3d4fb1c2fa95da06d7880ba34615b40c19a8256e1fe364da39f5c70dc22fbccf21db2de5900932afef68948722eeb25e435262f8 0014-ada-fix-shared-linking.patch
|
||||
00097c7106625ccf02149a757366f434c48f2abe824bb8b4bf067d29308889cb6039a5e5b2d3bd2683617693b47707d549252c56eea6bc3cdc2450a8d14f46a7 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
7f0bc42b93a389b614054e700b851abfbc53db391aa10cbdf6990d41396b293af78980bb39f1cf0967184d3fbf3d46ac7c7f096717b8f193ea34cbf7f37d7e91 0016-add-fortify-headers-paths.patch
|
||||
0841acbce81250f8cb140a75ff62958dfcab3bed792822baf1fe4193dd62633648343f4b66df886c12338eed88a98e591b968131416460f9f0274046019bb8ef 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
589d538bdf692559e475e53c79869734dede0eb15228cab9ca901c9db81b0e78a0e532b20dfb05ca584ea19ff4bedd83e139ddca912a26b446c5eb6905180536 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
2213e07bab6f5d8d3d39c732f5385f46cc8f0c84e35054139fdaf13051252d7bf11f647f54aa8456b532166b008fff0656d8f41278e34ba868dd6fe427427a3a 0019-aarch64-disable-multilib-support.patch
|
||||
a9567947471c3ba8a547a79c55e183974554bf823d9a97a165c966d7b3caad8789980e096e3b78452ece5de062bd9bb006af464bbf0c5a35b689eac3ee21e5c5 0020-s390x-disable-multilib-support.patch
|
||||
f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8b7944fa17487478e73958be45d5782ccb9ef501961fb9a96 0021-ppc64-le-disable-multilib-support.patch
|
||||
44ab86feb8e41e7c2b2e27accdf46194c9b80ee6a39543303dc04824f669d9fad182aabd40c9c7f6c265cf9bb71be830c257be115dc9d701d54eca3aa9ef174e 0022-x86_64-disable-multilib-support.patch
|
||||
e0763083c31485e8ac0b3724376a28af01bb6f50e1a054780b61886e4e3de2a35d127e6e353eb8d8729964ada9b5751bf05bdd51df539667008216db38f228a3 0023-riscv-disable-multilib-support.patch
|
||||
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
|
||||
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
30369bea84020c32d514196ba3adb3d09d2d0359af5550bd3f9719aa357e44b2f695623c1d2a99416e120dc86896c196c5dd4f638183dced4799604137385367 0026-ada-musl-support-fixes.patch
|
||||
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
58e8415612e1042329ad114471852c19f6bf15bf3bfd7cd81ceeafa75778bcc28410a01071a7c8cbf12b8f549acd85723215772813deedb8f266e28b9e01a353 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
d47b559075f40d526235f47b91da1d0cf6bfe6c5b7311bbfe08af9dd6e8f27e6c7cd82e3b2d529aab0536246fc56e2d42c089b22cacb0e7f09ca4a9d07556994 0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
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
|
||||
cc1e10ac6e72db816f09325e301103109cc212a6f3de3ce0b9b038d149233c467319d203941695dbf3d7b9e2dcbbcd17609cdb056e831fcc323cd592423882d8 0036-PR110792-Early-clobber-issues-with-rot32di2-on-i386.patch
|
||||
"
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat 1>&2 <<EOF
|
||||
*
|
||||
* gcc-go is used in Alpine for bootstrapping Go.
|
||||
* It is currently discouraged to use it for other purposes.
|
||||
*
|
||||
EOF
|
||||
@@ -2,8 +2,8 @@
|
||||
# Generator: pmbootstrap aportgen grub-efi-x86
|
||||
|
||||
pkgname=grub-efi-x86
|
||||
pkgver=2.06
|
||||
pkgrel=14
|
||||
pkgver=2.12
|
||||
pkgrel=0
|
||||
|
||||
_arch="x86"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -22,5 +22,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
060ff6d50336911e00d5f1b0267d76a269ebf562dea0b79d6a5502b2453326f49b63af4041748bb13a4db09d6722ec41eceea727cfd9820564e8b6c6900ab442 grub-efi-2.06-r14-x86-edge.apk
|
||||
2958746c0c05271d3bb27912973ddf9180bbf060f9909037f0b9dcf3da2036dd81b69a37e1c43414def0e26942f83bccab04554ae6ddd6b3b9dc94d5e3744ac4 grub-efi-2.12-r0-x86-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-aarch64
|
||||
pkgver=1.2.4_git20230717
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-aarch64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7f450061d9d45902ab90180816592426fe0e5f148a1a3373196b7d0564abe26780223a641006ce7d9808e0258b63646a3d7a551ab686a5590e064f25a63540e8 musl-1.2.4_git20230717-r3-aarch64-edge.apk
|
||||
4a4e255a149ceec21b644bf63a46a324955714154340052771734d5c303779c997ea1be02c4b45c16186ab3c50fdaa26eecfb0ebcfcba5ba8e0bf56d66df461b musl-dev-1.2.4_git20230717-r3-aarch64-edge.apk
|
||||
478704707b55072b9be8747e8c3bf3a20832d0329f63429fae2048e6b9a0674e31e92b4c1b8af87f65f84270711fef6b7ce54653448e580e532fa2c94e3761e1 musl-1.2.4_git20230717-r5-aarch64-edge.apk
|
||||
24471c9d781ce9920d06ab79296afb30ce61563729bb319ee8cd8feb960d1c05e5f96edb9464fcdb95b6c16fde788400408dd2e768e69ce13cc15ad3be54a969 musl-dev-1.2.4_git20230717-r5-aarch64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.2.4_git20230717
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
174208a869df2aa25806a3440b990c789c60609e3f8504ac0cf1068db753a309293994cd3482f28bb4a375ea8c42bddcd136f0eaf0af2bf3a779a80eba86ac49 musl-1.2.4_git20230717-r3-armhf-edge.apk
|
||||
9e76f36edb13bd09f149085c57135b2ced3093f5a617d7a29ea6cb40ca53fb82e141bc950918a55757213364d7ff9d4d83e2545f60686e94bebc1c21b01bcc91 musl-dev-1.2.4_git20230717-r3-armhf-edge.apk
|
||||
c0bdfbfc2c1f475c17850e7462cf286e9d8ce874deb03d536d208fcdeb45b35c761737f693be3be9711c15547cd9d2bbafae45280fc9b0291192c2489da0790f musl-1.2.4_git20230717-r5-armhf-edge.apk
|
||||
1197968b53adca7c482d23ea2ca99d21fe905b554b83c30b960a4e64dda6ff40009745cd18621bd363b4994ccbc8b9b763b6c3105f6f6283dc8ee1305ab7206e musl-dev-1.2.4_git20230717-r5-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armv7
|
||||
pkgver=1.2.4_git20230717
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armv7:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
0115bc654494c59bf0b77ac7118f14dce31cd8f86c3d5a20e3fdd49e66dd1c0d0fc1973b92f236e5845c2cf5395c19344acc4ea24c1f19095d44cc526fbc30c4 musl-1.2.4_git20230717-r3-armv7-edge.apk
|
||||
5a1558325c7a6b02556975ebb2014319657f3f5a721a49eb3b744a18fb7977d91c966d1a1a38f7f5a7c371585d88ebff436a2239e59bb695752167bc4fd7db7d musl-dev-1.2.4_git20230717-r3-armv7-edge.apk
|
||||
5236dadbdb41e9543426592cf7e64e548fec59742e4943a99bb18e3cb93c9ae1287c9ac34c2de7fcb58bd1f94df4313324e8afa1160acc4929fb91f06754c77c musl-1.2.4_git20230717-r5-armv7-edge.apk
|
||||
1877267544198d867752d02cb8cbe6672c4bd1fcd20ac8e5e4c614675b31921f3da9bc2a68f769fbd726ffc0c7125406387e01a9ebf49d0e56d49e1ce257e71d musl-dev-1.2.4_git20230717-r5-armv7-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-riscv64
|
||||
pkgver=1.2.4_git20230717
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-riscv64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1b0ab754d99bcc6216c5c1c49a7337e87268f7c9a8af9ec9c73b75f366672922b53c4b3c8950178419585699a7899d2000a8f9c498c123854f284b2778fdbc7f musl-1.2.4_git20230717-r3-riscv64-edge.apk
|
||||
0ed3a00b5c1072b01cf0573cab70ec9fe2027c804b7f6c046ca00daa7d3d5083ed639e76467b98ffed1d45f938a73aff8b0e7da0ca00a4cbbed107021df52794 musl-dev-1.2.4_git20230717-r3-riscv64-edge.apk
|
||||
3f924270fb0ec0fa8fb5a23f0f9d6d9148affcac89cae413940dc04465d375415fcf0aff734754e2ac0b9ba2113c10f836b186908d75cdccec4d923eacafb961 musl-1.2.4_git20230717-r5-riscv64-edge.apk
|
||||
76ae321a9d3895f8367968226a6a492b268ae582a83e74d4152cf88dd48aaa79814532e8e1a057cba7c29b926f48d2309f2c12a16b991649cb8f713455aa5501 musl-dev-1.2.4_git20230717-r5-riscv64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86
|
||||
pkgver=1.2.4_git20230717
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-x86:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
19a5b95a805f2df590c656828fcde6a9c9c4aefc5ea0e35a5f75767a5eb328636e86ffcfa59b8172e84f0cd214141284c7b051f15440bc9fd087c1b48cb4cd80 musl-1.2.4_git20230717-r3-x86-edge.apk
|
||||
fb3c0011aca00c4528e383b0e0ba95fe01a84a7ef8e69ec808c42ecf0527b4bafa0d4762ce327c281d1ec2cb9b6350c96d7bd04ddee6849b2c6a1c596318ed5e musl-dev-1.2.4_git20230717-r3-x86-edge.apk
|
||||
c93eec26b3bd7b2bc5c8859d71a9dfcfc3c0d346183d97b8600d57270585ce57ac9f84dd633b8d8ae4eae0324aa6f8e98c67a0bdd33e2e8994d721e208e07a3c musl-1.2.4_git20230717-r5-x86-edge.apk
|
||||
77723100d0b2ae558816e4b9eb86c07d9ed64c69a84d6a07904d0806646e800a0f81b3a158948d5681394b9e3304a10bd0ca26445f5d4630f921bb87328d3afe musl-dev-1.2.4_git20230717-r5-x86-edge.apk
|
||||
"
|
||||
@@ -0,0 +1,62 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen musl-x86_64
|
||||
|
||||
# Stub for apkbuild-lint
|
||||
if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
pkgname=musl-x86_64
|
||||
pkgver=1.2.4_git20230717
|
||||
pkgrel=5
|
||||
arch="aarch64"
|
||||
subpackages="musl-dev-x86_64:package_dev"
|
||||
|
||||
_arch="x86_64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
|
||||
url="https://musl-libc.org"
|
||||
license="MIT"
|
||||
options="!check !strip"
|
||||
pkgdesc="the musl library (lib c) implementation for $_arch"
|
||||
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
musl-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/musl-$pkgver-r$pkgrel.apk
|
||||
musl-dev-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/musl-dev-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
# Use 'busybox tar' to avoid 'tar: Child returned status 141'
|
||||
# on some machines (builds.sr.ht, gitlab-ci). See pmaports#26.
|
||||
busybox tar -xf $srcdir/musl-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
package_dev() {
|
||||
mkdir -p "$subpkgdir/usr/$_target"
|
||||
cd "$subpkgdir/usr/$_target"
|
||||
# Use 'busybox tar' to avoid 'tar: Child returned status 141'
|
||||
# on some machines (builds.sr.ht, gitlab-ci). See pmaports#26.
|
||||
busybox tar -xf $srcdir/musl-dev-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
|
||||
# symlink everything from /usr/$_target/usr/*
|
||||
# to /usr/$_target/* so the cross-compiler gcc does not fail
|
||||
# to build.
|
||||
for _dir in include lib; do
|
||||
mkdir -p "$subpkgdir/usr/$_target/$_dir"
|
||||
cd "$subpkgdir/usr/$_target/usr/$_dir"
|
||||
for i in *; do
|
||||
cd "$subpkgdir/usr/$_target/$_dir"
|
||||
ln -s /usr/$_target/usr/$_dir/$i $i
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4ea90456fcff08cb7c9065f4c790c5d0a3b2b17224f2490f6954c2de7ddb64559a6e1f0df1f13629da5d8f619fc1d9737a6982bb438120641bf1d717004e2688 musl-1.2.4_git20230717-r5-x86_64-edge.apk
|
||||
0ce4a260cb8c6fc9d412d5164d848ee6155d4ea4fca9dff89d5b08b8e2c0fcde5e635846ca762be54a6df139aa178902fc2594ffe76f94ae1e5414a67f0707a3 musl-dev-1.2.4_git20230717-r5-x86_64-edge.apk
|
||||
"
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
From 704dfdbbc7df036ed1d5d234dfc67d765804eb4d Mon Sep 17 00:00:00 2001
|
||||
From: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Date: Mon, 4 Nov 2019 19:31:45 +0100
|
||||
Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section
|
||||
directive
|
||||
|
||||
It looks like a section directive was using "Solaris style" to declare
|
||||
the section flags. Replace this with the GNU style so that Clang's
|
||||
integrated assembler can assemble this directive.
|
||||
|
||||
The modified instances were identified via:
|
||||
$ ag \.section | grep #
|
||||
|
||||
Link: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
|
||||
Link: https://github.com/ClangBuiltLinux/linux/issues/744
|
||||
Link: https://bugs.llvm.org/show_bug.cgi?id=43759
|
||||
Link: https://reviews.llvm.org/D69296
|
||||
|
||||
Acked-by: Nicolas Pitre <nico@fluxnic.net>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
Reviewed-by: Stefan Agner <stefan@agner.ch>
|
||||
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Suggested-by: Fangrui Song <maskray@google.com>
|
||||
Suggested-by: Jian Cai <jiancai@google.com>
|
||||
Suggested-by: Peter Smith <peter.smith@linaro.org>
|
||||
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
[ partial backport to 3.4 ]
|
||||
---
|
||||
arch/arm/boot/bootp/init.S | 2 +-
|
||||
arch/arm/boot/compressed/big-endian.S | 2 +-
|
||||
arch/arm/boot/compressed/head.S | 2 +-
|
||||
arch/arm/boot/compressed/piggy.lzma.S | 2 +-
|
||||
arch/arm/boot/compressed/piggy.xzkern.S | 2 +-
|
||||
arch/arm/mm/proc-v7.S | 2 +-
|
||||
6 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/bootp/init.S b/arch/arm/boot/bootp/init.S
|
||||
index 78b508075161..868eeeaaa46e 100644
|
||||
--- a/arch/arm/boot/bootp/init.S
|
||||
+++ b/arch/arm/boot/bootp/init.S
|
||||
@@ -16,7 +16,7 @@
|
||||
* size immediately following the kernel, we could build this into
|
||||
* a binary blob, and concatenate the zImage using the cat command.
|
||||
*/
|
||||
- .section .start,#alloc,#execinstr
|
||||
+ .section .start, "ax"
|
||||
.type _start, #function
|
||||
.globl _start
|
||||
|
||||
diff --git a/arch/arm/boot/compressed/big-endian.S b/arch/arm/boot/compressed/big-endian.S
|
||||
index 25ab26f1c6f0..f22428e275f8 100644
|
||||
--- a/arch/arm/boot/compressed/big-endian.S
|
||||
+++ b/arch/arm/boot/compressed/big-endian.S
|
||||
@@ -5,7 +5,7 @@
|
||||
* Author: Nicolas Pitre
|
||||
*/
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
|
||||
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||
orr r0, r0, #(1 << 7) @ enable big endian mode
|
||||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
|
||||
index 77a716bdf4d3..b70606652d21 100644
|
||||
--- a/arch/arm/boot/compressed/head.S
|
||||
+++ b/arch/arm/boot/compressed/head.S
|
||||
@@ -113,7 +113,7 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
/*
|
||||
* sort out different calling conventions
|
||||
*/
|
||||
diff --git a/arch/arm/boot/compressed/piggy.lzma.S b/arch/arm/boot/compressed/piggy.lzma.S
|
||||
index d7e69cffbc0a..cfea81ae8f4b 100644
|
||||
--- a/arch/arm/boot/compressed/piggy.lzma.S
|
||||
+++ b/arch/arm/boot/compressed/piggy.lzma.S
|
||||
@@ -1,4 +1,4 @@
|
||||
- .section .piggydata,#alloc
|
||||
+ .section .piggydata, "a"
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.lzma"
|
||||
diff --git a/arch/arm/boot/compressed/piggy.xzkern.S b/arch/arm/boot/compressed/piggy.xzkern.S
|
||||
index 5703f300d027..a135d3b549c5 100644
|
||||
--- a/arch/arm/boot/compressed/piggy.xzkern.S
|
||||
+++ b/arch/arm/boot/compressed/piggy.xzkern.S
|
||||
@@ -1,4 +1,4 @@
|
||||
- .section .piggydata,#alloc
|
||||
+ .section .piggydata, "a"
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy.xzkern"
|
||||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
|
||||
index 69363be2f241..321cb1c6a091 100644
|
||||
--- a/arch/arm/mm/proc-v7.S
|
||||
+++ b/arch/arm/mm/proc-v7.S
|
||||
@@ -422,7 +422,7 @@ __v7_setup_stack:
|
||||
string cpu_elf_name, "v7"
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc, #execinstr
|
||||
+ .section ".proc.info.init", "ax"
|
||||
|
||||
/*
|
||||
* Standard v7 proc info content
|
||||
--
|
||||
2.43.0
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
From 3020e3a81b63e05891ef5d40f3acfbd00040ba17 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Date: Mon, 4 Nov 2019 19:31:45 +0100
|
||||
Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section
|
||||
directive
|
||||
|
||||
It looks like a section directive was using "Solaris style" to declare
|
||||
the section flags. Replace this with the GNU style so that Clang's
|
||||
integrated assembler can assemble this directive.
|
||||
|
||||
The modified instances were identified via:
|
||||
$ ag \.section | grep #
|
||||
|
||||
Link: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
|
||||
Link: https://github.com/ClangBuiltLinux/linux/issues/744
|
||||
Link: https://bugs.llvm.org/show_bug.cgi?id=43759
|
||||
Link: https://reviews.llvm.org/D69296
|
||||
|
||||
Acked-by: Nicolas Pitre <nico@fluxnic.net>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
Reviewed-by: Stefan Agner <stefan@agner.ch>
|
||||
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Suggested-by: Fangrui Song <maskray@google.com>
|
||||
Suggested-by: Jian Cai <jiancai@google.com>
|
||||
Suggested-by: Peter Smith <peter.smith@linaro.org>
|
||||
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
[ partial backport to 5.4 ]
|
||||
---
|
||||
arch/arm/boot/bootp/init.S | 2 +-
|
||||
arch/arm/boot/compressed/big-endian.S | 2 +-
|
||||
arch/arm/boot/compressed/head.S | 2 +-
|
||||
arch/arm/boot/compressed/piggy.lzma.S | 2 +-
|
||||
arch/arm/mm/proc-v7.S | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/bootp/init.S b/arch/arm/boot/bootp/init.S
|
||||
index 78b508075161..868eeeaaa46e 100644
|
||||
--- a/arch/arm/boot/bootp/init.S
|
||||
+++ b/arch/arm/boot/bootp/init.S
|
||||
@@ -16,7 +16,7 @@
|
||||
* size immediately following the kernel, we could build this into
|
||||
* a binary blob, and concatenate the zImage using the cat command.
|
||||
*/
|
||||
- .section .start,#alloc,#execinstr
|
||||
+ .section .start, "ax"
|
||||
.type _start, #function
|
||||
.globl _start
|
||||
|
||||
diff --git a/arch/arm/boot/compressed/big-endian.S b/arch/arm/boot/compressed/big-endian.S
|
||||
index 25ab26f1c6f0..f22428e275f8 100644
|
||||
--- a/arch/arm/boot/compressed/big-endian.S
|
||||
+++ b/arch/arm/boot/compressed/big-endian.S
|
||||
@@ -5,7 +5,7 @@
|
||||
* Author: Nicolas Pitre
|
||||
*/
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
|
||||
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||
orr r0, r0, #(1 << 7) @ enable big endian mode
|
||||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
|
||||
index 77a716bdf4d3..b70606652d21 100644
|
||||
--- a/arch/arm/boot/compressed/head.S
|
||||
+++ b/arch/arm/boot/compressed/head.S
|
||||
@@ -113,7 +113,7 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
/*
|
||||
* sort out different calling conventions
|
||||
*/
|
||||
diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S
|
||||
index 0284f84dcf3804..27577644ee721a 100644
|
||||
--- a/arch/arm/boot/compressed/piggy.S
|
||||
+++ b/arch/arm/boot/compressed/piggy.S
|
||||
@@ -1,5 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
- .section .piggydata,#alloc
|
||||
+ .section .piggydata, "a"
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy_data"
|
||||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
|
||||
index c4e8006a1a8cdd..48e0ef6f0dccfe 100644
|
||||
--- a/arch/arm/mm/proc-v7.S
|
||||
+++ b/arch/arm/mm/proc-v7.S
|
||||
@@ -644,7 +644,7 @@ __v7_setup_stack:
|
||||
string cpu_elf_name, "v7"
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
/*
|
||||
* Standard v7 proc info content
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From f00083cae331e5d3eecade6b4fdc35d0825e73ef Mon Sep 17 00:00:00 2001
|
||||
From: Mark Rutland <mark.rutland@arm.com>
|
||||
Date: Fri, 11 Dec 2015 11:04:31 +0000
|
||||
Subject: [PATCH] arm64: mm: place __cpu_setup in .text
|
||||
|
||||
We drop __cpu_setup in .text.init, which ends up being part of .text.
|
||||
The .text.init section was a legacy section name which has been unused
|
||||
elsewhere for a long time.
|
||||
|
||||
The ".text.init" name is misleading if read as a synonym for
|
||||
".init.text". Any CPU may execute __cpu_setup before turning the MMU on,
|
||||
so it should simply live in .text.
|
||||
|
||||
Remove the pointless section assignment. This will leave __cpu_setup in
|
||||
the .text section.
|
||||
|
||||
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
|
||||
Cc: Catalin Marinas <catalin.marinas@arm.com>
|
||||
Cc: Will Deacon <will.deacon@arm.com>
|
||||
Signed-off-by: Will Deacon <will.deacon@arm.com>
|
||||
---
|
||||
arch/arm64/mm/proc.S | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
|
||||
index cacecc4ad3e5..b6f9053ab184 100644
|
||||
--- a/arch/arm64/mm/proc.S
|
||||
+++ b/arch/arm64/mm/proc.S
|
||||
@@ -139,8 +139,6 @@ ENTRY(cpu_do_switch_mm)
|
||||
ret
|
||||
ENDPROC(cpu_do_switch_mm)
|
||||
|
||||
- .section ".text.init", #alloc, #execinstr
|
||||
-
|
||||
/*
|
||||
* __cpu_setup
|
||||
*
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
|
||||
pkgname=device-fairphone-fp4
|
||||
pkgdesc="Fairphone 4"
|
||||
pkgver=1.2
|
||||
pkgrel=2
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
bootmac
|
||||
linux-postmarketos-qcom-sm6350
|
||||
make-dynpart-mappings
|
||||
mesa-vulkan-freedreno
|
||||
@@ -16,6 +17,7 @@ depends="
|
||||
postmarketos-base
|
||||
postmarketos-update-kernel
|
||||
qbootctl
|
||||
qbootctl-openrc
|
||||
swclock-offset
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
@@ -24,12 +26,9 @@ source="
|
||||
90-feedbackd-aw8695.rules
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
gtk.css
|
||||
phoc.ini
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-phosh
|
||||
"
|
||||
|
||||
build() {
|
||||
@@ -63,18 +62,8 @@ nonfree_firmware() {
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
phosh() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel phosh"
|
||||
install -Dm644 "$srcdir"/gtk.css \
|
||||
"$subpkgdir"/etc/skel/.config/gtk-3.0/gtk.css
|
||||
install -Dm644 "$srcdir"/phoc.ini \
|
||||
"$subpkgdir"/etc/phosh/phoc.ini
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2974ccc172bf1299daeb0bc746879b3a1db1fbc3a2b163a02a6554fed6ed9f733144bcf976cd2441c5664d496dcce3ae943f4314c653470dc07dda0de5ad632b 90-feedbackd-aw8695.rules
|
||||
e223df827d1d18507197d64fc409f527514f7f76b68f784811b7b59452260dbd72133c85277b1e7df38b0058e0f16ac0d1174104a193b7f6c8dcf64577863eba deviceinfo
|
||||
285dcb0011a2114e83621811a4204dfae4310ff9312f727d2cbf5d10712fe7fae7a20f636fc02b7794a41af67864a42d04f8c2f7e241f9f5182827d0a0556179 modules-initfs
|
||||
25a93dcbe6dbc6cff24f57cbf5539bc475c5fe0f6bf5e8374c7032b9c38a939bef0aa0cde1707afcc16b1ec2d0859c03c6ee92d80d8048d1c6adc6e25178b85f gtk.css
|
||||
65f74d29ab318b23f7ac8923a3661f2c4130049273a8c6be234ed2c8e00810b6a1254b54cf0932e42850a6d48f821dcd038900fbb836feeddfab2759afffae38 phoc.ini
|
||||
52bb7ed829caa4dcff9728bd6e3cdf118b3c7ee7dfe90df0d4e6422dd67bf3258ae2a4d2dc7599da4182fbd8eb47a0e1d20c58198dc17f2bf178b8f01a8887f7 modules-initfs
|
||||
"
|
||||
@@ -1,11 +0,0 @@
|
||||
/* TWEAKS-START phosh-clock-notch */
|
||||
.phosh-topbar-clock {
|
||||
margin-left: 100.0px;
|
||||
}
|
||||
/* TWEAKS-END phosh-clock-notch */
|
||||
/* TWEAKS-START phosh-panel-btn-space */
|
||||
.phosh-panel-btn {
|
||||
margin-left: 10.0px;
|
||||
margin-right: 10.0px;
|
||||
}
|
||||
/* TWEAKS-END phosh-panel-btn-space */
|
||||
@@ -1,2 +1,2 @@
|
||||
msm
|
||||
panel-hx83112a-auo
|
||||
panel-himax-hx83112a
|
||||
@@ -1,5 +0,0 @@
|
||||
# /etc/phosh/phoc.ini
|
||||
# Overwrites values set in /usr/share/phosh/phoc.ini
|
||||
|
||||
[output:DSI-1]
|
||||
scale = 3.0
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-peach-pit
|
||||
pkgdesc="Samsung Chromebook 2 (11.6 inch)"
|
||||
pkgver=4
|
||||
pkgrel=4
|
||||
pkgver=5
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -58,7 +58,7 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c0bce7063912e13464ad7b4338eea3135b86cf7e946f535c48d4bf180bab58739e97791ada53df5065eb0bec0649b125b6f4f39bf23f1315316e71ce36243a16 deviceinfo
|
||||
cbeb0f1fdf4357763eae7ede0b28923ae39c18aa187894baa778bdb20afa728aa97cad63b957d799ffcd1130ae40c3b796e293a2a1c97d9a68bf132ec6ce6d13 deviceinfo
|
||||
a1fd6b4964b0bd4c66983430528f5906eea5cc9ddbe8485ba17e97496652240d0a93dbd3af34ecd3c273b7172202b8dcb24e0b5fa372512d01affec3914a023d modules-initfs
|
||||
e53ca475830930ecfc1fd537702e850e2abcb66fbed521cb6c3a2918d762649254bd0244ec93a47b20dfc593ec3afc9bdebdec1759a7bc96dcbe4800f40893da 90-tap-to-click.conf
|
||||
6fe67c8f2e09e3e37297eebaf2a86a32671923a5fd4d18e5aeb10e580fb998e4ddb4a691531a0c8f4b4e70c6f0f7e91008dd836ffca8026d59862c6e829fd996 Peach-Pit-I2S-MAX98090.conf
|
||||
|
||||
@@ -23,7 +23,8 @@ deviceinfo_flash_method="none"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
deviceinfo_cgpt_kpart_size="16384"
|
||||
deviceinfo_kernel_cmdline="console=null mem=3523M"
|
||||
deviceinfo_kernel_cmdline="console=/dev/ttySAC3,115200n8 mem=3523M"
|
||||
deviceinfo_depthcharge_board="peach-pit"
|
||||
deviceinfo_generate_depthcharge_image="true"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
deviceinfo_getty="ttySAC3;115200"
|
||||
@@ -0,0 +1,65 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: JustSoup321 <brandonboese@protonmail.com>
|
||||
# Co-Maintainer: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
pkgname=device-google-x64cros
|
||||
pkgdesc="Google Chromebooks with x64 CPU"
|
||||
pkgver=3
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="x86_64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
alsa-ucm-conf
|
||||
depthcharge-tools
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-update-depthcharge-kernel
|
||||
sof-bin
|
||||
systemd-boot
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="
|
||||
$pkgname-libva
|
||||
$pkgname-kernel-lts:kernel_lts
|
||||
$pkgname-kernel-edge:kernel_edge
|
||||
$pkgname-vulkan
|
||||
"
|
||||
source="deviceinfo modules-initfs"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
libva() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel libva"
|
||||
depends="intel-media-driver libva-intel-driver"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
kernel_edge() {
|
||||
pkgdesc="Alpine Edge kernel"
|
||||
depends="linux-edge"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
kernel_lts() {
|
||||
pkgdesc="Alpine LTS kernel"
|
||||
depends="linux-lts"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
vulkan() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel vulkan-loader"
|
||||
depends="mesa-vulkan-intel"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
9260fe8df64e284f137f77844562d2f08e28d72d36a50772b0216cd7d68eeb41d0cdb650d0f0d1ad04c3906991aba0561c36813a2beb62cedf16f616c9ccedb9 deviceinfo
|
||||
9606a2f61bfd9e0a2ea04fbe45e25093b702fd5b5cccf9f4f50768ee3b501251d8d3e1605485e5ec8f485b4bff7e44fe20d488f80736837654a9951391a97789 modules-initfs
|
||||
"
|
||||
+2
-3
@@ -3,7 +3,7 @@
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Google Chromebooks with x86_64 CPU"
|
||||
deviceinfo_name="Google Chromebook with x86_64 CPU"
|
||||
deviceinfo_manufacturer="Google"
|
||||
deviceinfo_codename="google-x64cros"
|
||||
deviceinfo_arch="x86_64"
|
||||
@@ -13,8 +13,6 @@ deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_chassis="laptop"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1366"
|
||||
deviceinfo_screen_height="768"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
@@ -24,3 +22,4 @@ deviceinfo_cgpt_kpart_start="8192"
|
||||
deviceinfo_cgpt_kpart_size="32768"
|
||||
deviceinfo_depthcharge_board="amd64-generic"
|
||||
deviceinfo_generate_depthcharge_image="true"
|
||||
deviceinfo_generate_systemd_boot="true"
|
||||
File renamed without changes.
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Sicelo <absicsz@gmail.com>
|
||||
# Co-Maintainer: Danct12 <danct12@disroot.org>
|
||||
pkgname=device-nokia-n900
|
||||
pkgver=9.2.1
|
||||
pkgrel=1
|
||||
pkgver=10
|
||||
pkgrel=0
|
||||
pkgdesc="Nokia N900"
|
||||
url="https://postmarketos.org"
|
||||
arch="armv7"
|
||||
@@ -39,6 +39,7 @@ source="
|
||||
keymaps/rx51_ch.map
|
||||
keymaps/rx51_fise.map
|
||||
keymaps/rx51_it.map
|
||||
keymaps/rx51_ptes.map
|
||||
keymaps/rx51_us.map
|
||||
lock.sh
|
||||
modem-load.conf
|
||||
@@ -59,18 +60,12 @@ options="!check !archcheck"
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n postmarketos -d "$srcdir"/uboot-script.cmd "$srcdir"/boot.scr
|
||||
mkdir "$srcdir"/keymaps
|
||||
loadkeys -b "$srcdir"/rx51_us.map > "$srcdir"/keymaps/rx51_us.bmap
|
||||
gzip "$srcdir"/keymaps/rx51_us.bmap
|
||||
loadkeys -b "$srcdir"/rx51_ch.map > "$srcdir"/keymaps/rx51_ch.bmap
|
||||
gzip "$srcdir"/keymaps/rx51_ch.bmap
|
||||
loadkeys -b "$srcdir"/rx51_it.map > "$srcdir"/keymaps/rx51_it.bmap
|
||||
gzip "$srcdir"/keymaps/rx51_it.bmap
|
||||
# Finnish and Swedish use the same mapping
|
||||
loadkeys -b "$srcdir"/rx51_fise.map > "$srcdir"/keymaps/rx51_fi.bmap
|
||||
gzip "$srcdir"/keymaps/rx51_fi.bmap
|
||||
loadkeys -b "$srcdir"/rx51_fise.map > "$srcdir"/keymaps/rx51_se.bmap
|
||||
gzip "$srcdir"/keymaps/rx51_se.bmap
|
||||
cd "$srcdir"
|
||||
mkdir keymaps
|
||||
for i in ../keymaps/*.map; do
|
||||
loadkeys -b $i > keymaps/"${i%.*}.bmap"
|
||||
gzip keymaps/"${i%.*}.bmap"
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -113,10 +108,14 @@ package() {
|
||||
"$pkgdir"/usr/share/bkeymaps/ch/rx51_ch.bmap.gz
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_it.bmap.gz \
|
||||
"$pkgdir"/usr/share/bkeymaps/it/rx51_it.bmap.gz
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_fi.bmap.gz \
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_fise.bmap.gz \
|
||||
"$pkgdir"/usr/share/bkeymaps/fi/rx51_fi.bmap.gz
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_se.bmap.gz \
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_fise.bmap.gz \
|
||||
"$pkgdir"/usr/share/bkeymaps/se/rx51_se.bmap.gz
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_ptes.bmap.gz \
|
||||
"$pkgdir"/usr/share/bkeymaps/pt/rx51_pt.bmap.gz
|
||||
install -D -m644 "$srcdir"/keymaps/rx51_ptes.bmap.gz \
|
||||
"$pkgdir"/usr/share/bkeymaps/es/rx51_es.bmap.gz
|
||||
|
||||
# Kernel module management
|
||||
install -D -m644 "$srcdir"/modem-load.conf \
|
||||
@@ -206,6 +205,7 @@ d7f79fa0887110b85dfb676bd426fa76764fbbb8093df89184552838ddb703b62500f61d7cfa8dec
|
||||
dc585e11bf4e06e36c5c62bcc024eaacecc30437d9da5257df14be05e247a2f2bc208874be3058edc6f87cc2877da2ecafd2f627d9b465d4fd24475fc21fdc71 rx51_ch.map
|
||||
0a3e58a3a81c463937caf508a76461b4cc43f593f0817a52b6581fdd132cc894c0960fe7b950b6e6bfac1fad15cd9dd230c103fcf08a30b44ef7d8fbe31cea28 rx51_fise.map
|
||||
082a5166e38296b097e873b0b4aeaf007e594d3bf4470c74e91ee3efedcf28ad25cd55c23dd63e460339898ae08e77e111b0e1092fa5e661db90bb40732103a1 rx51_it.map
|
||||
6e4e8b10a41d0957968736f5d780f14c7070b03913d80859cb07180e9cec9a36bbc9c639748765e48962772640974f5491627520cc36bd3d6c9d01748f9ddaff rx51_ptes.map
|
||||
e440ed7a3070c17e003b86b72dbe6d8194d01b577ca8dd56dd066f216b6dda32bb965c780950f1789a66f7c948290016b048da9f1cf63aba9e11d7e7fd6873ba rx51_us.map
|
||||
caf9f4c45d11c28e1a6681255fafe5a286b0c417737fac1ca0ee37d3f82fd65c1712f5180375d7813fa308dfdca91d96876b5ce5b05b55ac14cfc31303b1ea5f lock.sh
|
||||
157b27feebcfddf800a1ffd8c6e369d2b58e5db25b1a44b4443dada8d9fe74abb91d036b9f0e97769bbafbdc72020b5637313682c6932fe7b0bddb9ebebbad42 modem-load.conf
|
||||
@@ -217,7 +217,7 @@ b50e7f37ffb1fa0bb782b117a4e8bcfdb722b6127c3e5d643e90cd901a1f4e65e77a0773ed418673
|
||||
9e72035c88632d12895534e5aa5746f2c130c7dcdafa8702748d62b71ed0e1b5911b6e1f07f9b9e39b6072bbb662f66aead585baa1dcacb7d8c8953ca89b6762 10-nokia-modem.rules
|
||||
c6012aef28b096141b924fced226ec99fb93eb53b69c064a8887d8fecdf8dc08a3ba3db399e18d88374c6ef4c59013a30699c7e4d76e5cb771040582573a0527 90-touchscreen-dev.rules
|
||||
d46adf47194c02b434cb46751003e67ee008d60978458e69b1f59dc709a7135a70f542918c29e359ba8308bdeda58a21e8efa446d06625511af05403db90e455 upower.conf
|
||||
737d9e57e219a0220c5b1943375f325309323344fdf06973546c7d88ed9aec857657abd6b7861669873574f865e1c99719d411e0564dbfebe028f9e77d308491 x11-keymap
|
||||
c7837e6688f09c7d650ac7479b8881d4bad709480a71a1dea8b5bba4f4215d6b48a3aebd3f58923bbd48813559478d4ef137dcc9838d321722e141f0aa6a6085 x11-keymap
|
||||
19694204f2f370a4132762ac1888eaf5736939bba2f12ec2bccd18dde0645cdb621dda3a0772d2ef6d26a65d14e39a628e0d23321fe3064777ad2b76ce45ed2d xdefaults
|
||||
a91f98daa60efa2beb2ff6b405097f92edca5f1bbb9e7675499139be52ca2570712f8f06f9032ef29f636f99c8f8da8b992f746eab6424aac04260c16158bcc2 xorg.conf
|
||||
"
|
||||
@@ -0,0 +1,116 @@
|
||||
keymaps 0-4
|
||||
#
|
||||
keycode 14 = Delete
|
||||
shift keycode 14 = Remove
|
||||
altgr keycode 14 = Escape
|
||||
shift altgr keycode 14 = F12
|
||||
keycode 16 = q
|
||||
altgr keycode 16 = one
|
||||
shift altgr keycode 16 = F1
|
||||
keycode 17 = w
|
||||
altgr keycode 17 = two
|
||||
shift altgr keycode 17 = F2
|
||||
keycode 18 = e
|
||||
altgr keycode 18 = three
|
||||
shift altgr keycode 18 = F3
|
||||
keycode 19 = r
|
||||
altgr keycode 19 = four
|
||||
shift altgr keycode 19 = F4
|
||||
keycode 20 = t
|
||||
altgr keycode 20 = five
|
||||
shift altgr keycode 20 = F5
|
||||
keycode 21 = y
|
||||
altgr keycode 21 = six
|
||||
shift altgr keycode 21 = F6
|
||||
keycode 22 = u
|
||||
altgr keycode 22 = seven
|
||||
shift altgr keycode 22 = F7
|
||||
keycode 23 = i
|
||||
altgr keycode 23 = eight
|
||||
shift altgr keycode 23 = F8
|
||||
keycode 24 = o
|
||||
altgr keycode 24 = nine
|
||||
shift altgr keycode 24 = F9
|
||||
keycode 25 = p
|
||||
altgr keycode 25 = zero
|
||||
shift altgr keycode 25 = F10
|
||||
keycode 28 = Return
|
||||
altgr keycode 28 = Tab
|
||||
keycode 29 = Control
|
||||
altgr keycode 29 = Compose
|
||||
keycode 30 = a
|
||||
altgr keycode 30 = asterisk
|
||||
keycode 31 = s
|
||||
altgr keycode 31 = plus
|
||||
keycode 32 = d
|
||||
altgr keycode 32 = numbersign
|
||||
shift altgr keycode 32 = percent
|
||||
keycode 33 = f
|
||||
altgr keycode 33 = minus
|
||||
shift altgr keycode 33 = underscore
|
||||
keycode 34 = g
|
||||
altgr keycode 34 = exclamdown
|
||||
shift altgr keycode 34 = bracketleft
|
||||
keycode 35 = h
|
||||
altgr keycode 35 = exclam
|
||||
shift altgr keycode 35 = bracketright
|
||||
keycode 36 = j
|
||||
altgr keycode 36 = questiondown
|
||||
keycode 37 = k
|
||||
altgr keycode 37 = question
|
||||
keycode 38 = l
|
||||
altgr keycode 38 = diaeresis
|
||||
shift altgr keycode 38 = bar
|
||||
keycode 42 = Shift
|
||||
keycode 44 = z
|
||||
altgr keycode 44 = parenleft
|
||||
keycode 45 = x
|
||||
altgr keycode 45 = parenright
|
||||
keycode 46 = c
|
||||
altgr keycode 46 = slash
|
||||
shift altgr keycode 46 = backslash
|
||||
keycode 47 = v
|
||||
altgr keycode 47 = quotedbl
|
||||
shift altgr keycode 47 = less
|
||||
keycode 48 = b
|
||||
altgr keycode 48 = apostrophe
|
||||
shift altgr keycode 48 = greater
|
||||
keycode 49 = n
|
||||
altgr keycode 49 = colon
|
||||
shift altgr keycode 49 = braceleft
|
||||
keycode 50 = m
|
||||
altgr keycode 50 = semicolon
|
||||
shift altgr keycode 50 = braceright
|
||||
keycode 51 = dead_acute
|
||||
altgr keycode 51 = dead_grave
|
||||
shift altgr keycode 51 = F11
|
||||
keycode 52 = ntilde
|
||||
shift keycode 52 = Ntilde
|
||||
altgr keycode 52 = tilde
|
||||
keycode 57 = space
|
||||
shift keycode 57 = Tab
|
||||
altgr keycode 57 = at
|
||||
keycode 65 = Meta_b
|
||||
shift keycode 65 = Meta_y
|
||||
altgr keycode 65 = Decr_Console
|
||||
keycode 66 = Meta_f
|
||||
shift keycode 66 = Meta_r
|
||||
altgr keycode 66 = Incr_Console
|
||||
keycode 100 = AltGr
|
||||
keycode 103 = ccedilla
|
||||
altgr keycode 103 = dead_circumflex
|
||||
shift keycode 103 = Ccedilla
|
||||
shift altgr keycode 103 = Scroll_Backward
|
||||
keycode 105 = period
|
||||
altgr keycode 105 = comma
|
||||
shift altgr keycode 105 = degree
|
||||
keycode 106 = Right
|
||||
shift keycode 106 = End
|
||||
altgr keycode 106 = Down
|
||||
shift altgr keycode 106 = Scroll_Forward
|
||||
keycode 108 = Left
|
||||
shift keycode 108 = Home
|
||||
altgr keycode 108 = Up
|
||||
shift altgr keycode 108 = Scroll_Backward
|
||||
compose '(' '(' to '['
|
||||
compose ')' ')' to ']'
|
||||
@@ -126,6 +126,7 @@ xkb_symbols "ptes" {
|
||||
key <AB08> { [ dead_acute, dead_acute, dead_grave, dead_grave ] };
|
||||
|
||||
// 2. row
|
||||
key <AC04> { [ f, F, minus, underscore ] };
|
||||
key <AC05> { [ g, G, exclamdown, exclamdown ] };
|
||||
key <AC06> { [ h, H, exclam, exclam ] };
|
||||
key <AC07> { [ j, J, questiondown, questiondown ] };
|
||||
@@ -137,7 +138,7 @@ xkb_symbols "ptes" {
|
||||
// 3. row
|
||||
key <AB01> { [ z, Z, parenleft, parenleft ] };
|
||||
key <AB02> { [ x, X, parenright, parenright ] };
|
||||
key <AB03> { [ c, C, slash, slash ] };
|
||||
key <AB03> { [ c, C, slash, backslash ] };
|
||||
key <AB04> { [ v, V, quotedbl, quotedbl ] };
|
||||
key <AB05> { [ b, B, apostrophe, apostrophe ] };
|
||||
key <AB06> { [ n, N, colon, colon ] };
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Svyatoslav Ryhel <clamor95@gmail.com>
|
||||
# Co-Maintainer: David Heidelberg <david@ixit.cz>
|
||||
# Co-Maintainer: Maxim Schwalm <maxim.schwalm@gmail.com>
|
||||
# Co-Maintainer: Raffaele Tranquillini <raffaele.tranquillini@gmail.com>
|
||||
|
||||
pkgname=device-nvidia-tegra-armv7
|
||||
pkgdesc="NVIDIA Tegra ARMv7"
|
||||
pkgver=1.1
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
alsa-ucm-conf
|
||||
linux-postmarketos-grate
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo modules-initfs"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-x11
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Firmware files for Tegra devices supported by GRATE project"
|
||||
depends="firmware-nvidia-tegra-armv7"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
x11() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
|
||||
depends="xf86-video-opentegra libvdpau-tegra"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e8d7c637130642a5ee5438e7f401c1870ecd1dcdca0305ab73fabf3d8548db5f054aeeacaf48abc46189bc1efdcbb5549e8afed263880e07b4932aee418041fc deviceinfo
|
||||
8ea2030fb0c1ae181778b86dc36ed71a904dd51e1fb08114c2a124a693fc7b464cfbb14efa8422db716fb9a647afa367df094abcc14f1ccc51af8b9063de8847 modules-initfs
|
||||
"
|
||||
@@ -0,0 +1,23 @@
|
||||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="NVIDIA Tegra ARMv7"
|
||||
deviceinfo_manufacturer="NVIDIA"
|
||||
deviceinfo_codename="nvidia-tegra-armv7"
|
||||
deviceinfo_year="2011"
|
||||
deviceinfo_dtb="tegra*"
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
# Tablet should fit most of devices
|
||||
deviceinfo_chassis="tablet"
|
||||
deviceinfo_external_storage="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot-bootpart"
|
||||
deviceinfo_flash_fastboot_partition_kernel="system"
|
||||
deviceinfo_flash_fastboot_partition_system="userdata"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
deviceinfo_kernel_cmdline="console=ttyS0,115200n8 rw gpt"
|
||||
@@ -0,0 +1,28 @@
|
||||
acer-a500-battery
|
||||
acer-ec-a500
|
||||
asus-dockram
|
||||
asus-ec
|
||||
asus-ec-battery
|
||||
asus-ec-charger
|
||||
asus-ec-kbc
|
||||
asus-ec-keys
|
||||
atkbd
|
||||
atmel-mxt-ts
|
||||
bq27xxx-battery
|
||||
bq27xxx-battery-i2c
|
||||
chagall-battery
|
||||
elants-i2c
|
||||
hid-generic
|
||||
i2c-hid-of
|
||||
i2c-hotplug-gpio
|
||||
lvds-codec
|
||||
panel-lvds
|
||||
panel-renesas-r61307
|
||||
panel-renesas-r69328
|
||||
panel-simple
|
||||
rmi_core
|
||||
rmi_i2c
|
||||
smb347-charger
|
||||
ssd2825
|
||||
surface-rt-ec
|
||||
tc358768
|
||||
@@ -0,0 +1,3 @@
|
||||
# iio-sensor-proxy with libssc: accelerometer mount matrix
|
||||
|
||||
SUBSYSTEM=="misc", KERNEL=="fastrpc-*", ENV{ACCEL_MOUNT_MATRIX}+="-1, 0, 0; 0, -1, 0; 0, 0, -1"
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
pkgname=device-oneplus-enchilada
|
||||
pkgdesc="OnePlus 6"
|
||||
pkgver=11
|
||||
pkgver=13
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -24,8 +24,9 @@ source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
q6voiced.conf
|
||||
81-libssc-oneplus-enchilada.rules
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-pmtest"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
@@ -40,16 +41,32 @@ package() {
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Modem, WiFi and GPU Firmware, also needed for osk-sdl"
|
||||
depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs
|
||||
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
|
||||
depends="
|
||||
firmware-oneplus-sdm845>=9
|
||||
firmware-oneplus-sdm845-initramfs
|
||||
hexagonrpcd
|
||||
soc-qcom-sdm845-nonfree-firmware
|
||||
soc-qcom-sdm845-modem
|
||||
"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
mkdir "$subpkgdir"
|
||||
|
||||
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
install -Dm644 "$srcdir"/81-libssc-oneplus-enchilada.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
||||
}
|
||||
|
||||
pmtest() {
|
||||
depends="bootrr qrtr firmware-oneplus-sdm845 unl0kr"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-mkinitfs-hook-ci"
|
||||
install="$subpkgname.post-install"
|
||||
|
||||
devicepkg_pmtest_post_install "ttyMSM0,115200" > "$subpkgname.post-install"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e957b7b0ed219eaa56be6c6b976b60886f73970703fdebf045800154ee652affee4e19654b3ac4244b29bcf6760ad3db6cb87143dc9c4673e905800d751103d1 10-unl0kr.conf
|
||||
71b4d74cebe22556b2c819fdb6b279366c9a566cb077f6e6e80c0c0b2e7c7fca48ea23ffbacca5cce4c636d8f3e66ad8f66ce36e954644242f6b5a71c89f9ed6 deviceinfo
|
||||
83fc698ebeda6245abc2a653eeff97b3b996d06dd7731386a07d102937f9b005c7277e0dece05ff359d9ff109a1d9ed7791fc510b146354df179804aadb5642c deviceinfo
|
||||
ea8709aa214cffaefb1d486c0c47044537446faebff16efb3b015623f043f730b7121e401c676e43aa8868bd6c630fc8a2d7dbf5fb082490e9b5493e0405b66d modules-initfs
|
||||
fe9871c325a38c0cadc9631870801ec15ab9f5b786ee854325b93eb3d23e7d8b1ac4f1075572ffcd225d8ec514dec09b986972ddff12a89260c0218af6de7887 q6voiced.conf
|
||||
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-oneplus-enchilada.rules
|
||||
"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
rc-update add hexagonrpcd-sdsp
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
device-oneplus-enchilada-nonfree-firmware.post-install
|
||||
@@ -18,7 +18,9 @@ deviceinfo_screen_height="2280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
# FIXME: Console enabled to workaround a race condition with display initialisation
|
||||
# See https://gitlab.freedesktop.org/drm/msm/-/issues/46
|
||||
deviceinfo_kernel_cmdline="console=ttyMSM0,115200"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# iio-sensor-proxy with libssc: accelerometer mount matrix
|
||||
|
||||
SUBSYSTEM=="misc", KERNEL=="fastrpc-*", ENV{ACCEL_MOUNT_MATRIX}+="-1, 0, 0; 0, 1, 0; 0, 0, -1"
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
pkgname=device-oneplus-fajita
|
||||
pkgdesc="OnePlus 6T"
|
||||
pkgver=11
|
||||
pkgrel=1
|
||||
pkgver=13
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -24,8 +24,9 @@ source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
q6voiced.conf
|
||||
81-libssc-oneplus-fajita.rules
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-pmtest"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
@@ -40,16 +41,32 @@ package() {
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Modem, WiFi and GPU Firmware, also needed for osk-sdl"
|
||||
depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs
|
||||
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
|
||||
depends="
|
||||
firmware-oneplus-sdm845>=9
|
||||
firmware-oneplus-sdm845-initramfs
|
||||
hexagonrpcd
|
||||
soc-qcom-sdm845-nonfree-firmware
|
||||
soc-qcom-sdm845-modem
|
||||
"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
mkdir "$subpkgdir"
|
||||
|
||||
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
install -Dm644 "$srcdir"/81-libssc-oneplus-fajita.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
||||
}
|
||||
|
||||
pmtest() {
|
||||
depends="bootrr qrtr firmware-oneplus-sdm845 unl0kr"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-mkinitfs-hook-ci"
|
||||
install="$subpkgname.post-install"
|
||||
|
||||
devicepkg_pmtest_post_install "ttyMSM0,115200" > "$subpkgname.post-install"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e957b7b0ed219eaa56be6c6b976b60886f73970703fdebf045800154ee652affee4e19654b3ac4244b29bcf6760ad3db6cb87143dc9c4673e905800d751103d1 10-unl0kr.conf
|
||||
53f2c5223fd708990b7642c3c83a5a58388e810d179aa24fae4e9fe0f187008a32511c8294819f8933c3377a0c2ebd5512fb03a3900fde78662bd93d034338df deviceinfo
|
||||
07e3d79715befccd1e7393908c06f88ac8468d1ce6cb96138e3a04e6f8274889db169f5daf05b04b633bcc9e85d11ea5c2017b84bc0ae86a8fad80b05794d0d8 deviceinfo
|
||||
ea8709aa214cffaefb1d486c0c47044537446faebff16efb3b015623f043f730b7121e401c676e43aa8868bd6c630fc8a2d7dbf5fb082490e9b5493e0405b66d modules-initfs
|
||||
fe9871c325a38c0cadc9631870801ec15ab9f5b786ee854325b93eb3d23e7d8b1ac4f1075572ffcd225d8ec514dec09b986972ddff12a89260c0218af6de7887 q6voiced.conf
|
||||
f4961015c920c50182d35767de080f16ec348ff693a8cca91dd2593640cf19c31c1e6eac1e8a12a1d38946755eb21bdacad29c9e972adaec854500ab3a7ad3a0 81-libssc-oneplus-fajita.rules
|
||||
"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
rc-update add hexagonrpcd-sdsp
|
||||
+1
@@ -0,0 +1 @@
|
||||
device-oneplus-fajita-nonfree-firmware.post-install
|
||||
@@ -18,7 +18,9 @@ deviceinfo_screen_height="2340"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
# FIXME: Console enabled to workaround a race condition with display initialisation
|
||||
# See https://gitlab.freedesktop.org/drm/msm/-/issues/46
|
||||
deviceinfo_kernel_cmdline="console=ttyMSM0,115200"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Martijn Braam <martijn@brixit.nl>
|
||||
# Maintainer: Jan Jasper de Kroon <jajadekroon@gmail.com>
|
||||
pkgname=device-pine64-pinephonepro
|
||||
pkgdesc="PINE64 PinePhone Pro"
|
||||
pkgver=3.8
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=device-pine64-rockpro64
|
||||
pkgver=3
|
||||
pkgrel=5
|
||||
pkgrel=6
|
||||
pkgdesc="PINE64 ROCKPro64"
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -28,5 +28,5 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
eda78fea2ccd53b2edb3895919ecaa6831c815509d2324bca8e23a6c901100215f4df5b63aa1a8e0a47a879af258c86cd84f661042088b67b5de566a49afc4a8 deviceinfo
|
||||
75388e8dd877db42b5ffa7148e667487f58785ef1112dda3dd5e34122f24870887de4e38aa9a861ac454e6eaa6b3a3b91583e92548b349c2e7919408565e4a65 deviceinfo
|
||||
"
|
||||
@@ -19,7 +19,7 @@ deviceinfo_screen_height="1080"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_sd_embed_firmware="u-boot/rockpro64-rk3399/idbloader.img:32,u-boot/rockpro64-rk3399/u-boot.itb:8192"
|
||||
deviceinfo_sd_embed_firmware="u-boot/rockpro64-rk3399/u-boot-rockchip.bin:32"
|
||||
deviceinfo_boot_part_start="32768"
|
||||
deviceinfo_kernel_cmdline="console=tty0 console=ttyS2,1500000n8 panic=10 coherent_pool=1M video=HDMI-A-1:1920x1080@60 video=eDP-1:1920x1080@60 loglevel=5 PMOS_NO_OUTPUT_REDIRECT"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
@@ -0,0 +1,4 @@
|
||||
# iio-sensor-proxy with libssc: accelerometer mount matrix
|
||||
|
||||
SUBSYSTEM=="misc", KERNEL=="fastrpc-*", ENV{ACCEL_MOUNT_MATRIX}+="-1, 0, 0; 0, -1, 0; 0, 0, -1"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
pkgname=device-shift-axolotl
|
||||
pkgdesc="SHIFT6mq"
|
||||
pkgver=12
|
||||
pkgrel=1
|
||||
pkgver=14
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -21,13 +21,17 @@ depends="
|
||||
soc-qcom-sdm845-qbootctl
|
||||
fwupd>=1.8.6
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
makedepends="devicepkg-dev postmarketos-test"
|
||||
source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
q6voiced.conf
|
||||
81-libssc-shift-axolotl.rules
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-pmtest
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
@@ -39,15 +43,31 @@ package() {
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Modem, GPU and WiFi Firmware, also needed for osk-sdl"
|
||||
depends="firmware-shift-sdm845 firmware-shift-sdm845-initramfs
|
||||
soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem"
|
||||
depends="
|
||||
firmware-shift-sdm845>=20230815-r2
|
||||
firmware-shift-sdm845-initramfs
|
||||
hexagonrpcd
|
||||
soc-qcom-sdm845-nonfree-firmware
|
||||
soc-qcom-sdm845-modem
|
||||
"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
mkdir "$subpkgdir"
|
||||
|
||||
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
install -Dm644 "$srcdir"/81-libssc-shift-axolotl.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
||||
}
|
||||
|
||||
pmtest() {
|
||||
depends="bootrr qrtr firmware-shift-sdm845 unl0kr"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-mkinitfs-hook-ci"
|
||||
install="$subpkgname.post-install"
|
||||
|
||||
devicepkg_pmtest_post_install "ttyMSM0,115200" > "$subpkgname.post-install"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
88e5a1f014e48c811df46e94e09016f4f65cd99eb7e0baff4f7aaf9ee9cec2f8d9d9849aa23b6a28dac9631eeace530c5d914b538f186acbbd1e907d9041cc7e deviceinfo
|
||||
e3f8a8d556a3c3134791693f2003aa64465b6971f7e353f547d6f1cbe3a0a0225a225e40ee4dbed951c0fa67f5a4636fd15953f6a3fe23d4f098fa1d39baa8f5 deviceinfo
|
||||
4dc84207c5ca84b33b74139c8b0c9ce5baa8bcb1068df9943c478c02abcf8daccb88e06af63f120a434a115e277008e899305bd5239d8669436cb269889040e9 modules-initfs
|
||||
2a3cbdad5aa91181d24a4e56e63986af6accf887c64fa4d1b6ddad1926e29050243c4b1e2fd892d38ca7c16e24dff8545a16552e5749ae31b6d01bf428468e51 q6voiced.conf
|
||||
3bd3a82b88a7aca4e2df2f5522cee7a98d017994f1dc1a965a7e386be9c17632b9cdbe013feb737dec12e99d74f54a9e4599144193bb57ec18e6d6a18c94cf1f 81-libssc-shift-axolotl.rules
|
||||
"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
rc-update add hexagonrpcd-sdsp
|
||||
+1
@@ -0,0 +1 @@
|
||||
device-shift-axolotl-nonfree-firmware.post-install
|
||||
Loaded 100 of 716 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user