Compare commits
207
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cb1d710e1 | ||
|
|
7cda3728d8 | ||
|
|
dd9811a545 | ||
|
|
505b29b104 | ||
|
|
5aa6e7b924 | ||
|
|
d7e7142569 | ||
|
|
089686c315 | ||
|
|
81b67d8732 | ||
|
|
8c13605b90 | ||
|
|
39986ae6e5 | ||
|
|
c62ca64c67 | ||
|
|
c22e73eed3 | ||
|
|
49dfa5a0a8 | ||
|
|
14a28b2ffe | ||
|
|
74c21ce7e0 | ||
|
|
305a7bb18f | ||
|
|
3b63628f1f | ||
|
|
fe073505a5 | ||
|
|
fa2a7482d2 | ||
|
|
bc7eaf4f9e | ||
|
|
07384c26c1 | ||
|
|
4432b6f54d | ||
|
|
a64120a3d0 | ||
|
|
5c42195870 | ||
|
|
8fad005dd3 | ||
|
|
080cbb2859 | ||
|
|
6f70642442 | ||
|
|
bf8ee63e97 | ||
|
|
5f2eaf2d0c | ||
|
|
96d54421cc | ||
|
|
5591a18949 | ||
|
|
6effb8ba2a | ||
|
|
8d01311416 | ||
|
|
c714397635 | ||
|
|
7ebdc89a44 | ||
|
|
016f726939 | ||
|
|
d09c0558d0 | ||
|
|
d8d1bdd7b8 | ||
|
|
fa0a279146 | ||
|
|
02bc3b6950 | ||
|
|
f1031e95c8 | ||
|
|
3dcc08f4a9 | ||
|
|
3e835b7fc8 | ||
|
|
cda9735b36 | ||
|
|
5f92a24897 | ||
|
|
71b21a4b53 | ||
|
|
0738399936 | ||
|
|
26dd6ff875 | ||
|
|
98a97ea85c | ||
|
|
1e7d937044 | ||
|
|
2942aea548 | ||
|
|
2355af6a59 | ||
|
|
aabfc2ed69 | ||
|
|
9a92478496 | ||
|
|
e61bf69138 | ||
|
|
0c3e1a972f | ||
|
|
51cbd7cedb | ||
|
|
7b9e4fdaa2 | ||
|
|
8ac15569c2 | ||
|
|
442fc42462 | ||
|
|
1ea401f564 | ||
|
|
e4e6a375db | ||
|
|
71e5547ee3 | ||
|
|
dbb2a327eb | ||
|
|
9386e30711 | ||
|
|
fad34c0923 | ||
|
|
44ce859e43 | ||
|
|
1868f41ef5 | ||
|
|
0622be4c83 | ||
|
|
24abf411c1 | ||
|
|
0ce27ef17d | ||
|
|
4ad6ad0b49 | ||
|
|
4ae22faca9 | ||
|
|
f767583830 | ||
|
|
2c73ab30be | ||
|
|
584a6f082e | ||
|
|
329949155e | ||
|
|
60bccf6fe9 | ||
|
|
f424050082 | ||
|
|
f59eac28b0 | ||
|
|
ddffd8de81 | ||
|
|
547a871840 | ||
|
|
26f5809a6c | ||
|
|
94fad16f2f | ||
|
|
0c3acd11f4 | ||
|
|
e336721314 | ||
|
|
fbc404a5ac | ||
|
|
f82ceef9f3 | ||
|
|
0ce247f1b7 | ||
|
|
ce29bce59b | ||
|
|
69f0eb80fd | ||
|
|
8931d7cc27 | ||
|
|
2ca7ef6b75 | ||
|
|
ce5a0f4505 | ||
|
|
cb06d121ce | ||
|
|
a900390374 | ||
|
|
9174ac2f52 | ||
|
|
5e4d96891a | ||
|
|
1b9c7c899d | ||
|
|
95d9990a98 | ||
|
|
902dcc4d52 | ||
|
|
0bc1d4cd0d | ||
|
|
9de81d09eb | ||
|
|
b162a221dc | ||
|
|
adde895b6d | ||
|
|
57562c7597 | ||
|
|
24f152bc80 | ||
|
|
8f87acca7e | ||
|
|
3e102e95db | ||
|
|
02066257eb | ||
|
|
bbbf3a1062 | ||
|
|
7610fe1035 | ||
|
|
f586ca4441 | ||
|
|
f55c9c0d3a | ||
|
|
056e257de3 | ||
|
|
0125e65f90 | ||
|
|
7a9b5a205d | ||
|
|
48f6c9656b | ||
|
|
0b16918fe0 | ||
|
|
bd431d40cc | ||
|
|
9a99823538 | ||
|
|
c2f8ce4f10 | ||
|
|
dfbcebd69e | ||
|
|
8251a6956f | ||
|
|
9a095777ba | ||
|
|
b7a426aedd | ||
|
|
29e3422044 | ||
|
|
17c4a53643 | ||
|
|
4942ec0603 | ||
|
|
57709727ed | ||
|
|
d87b8222b9 | ||
|
|
817ed870e9 | ||
|
|
62440e5f17 | ||
|
|
7b01c66a34 | ||
|
|
439bd8e869 | ||
|
|
6e00f34f61 | ||
|
|
f568f4e2ec | ||
|
|
3b49327237 | ||
|
|
c12b826d6a | ||
|
|
c8ebd2705e | ||
|
|
dfdccbb1ae | ||
|
|
142948a592 | ||
|
|
443fb1a850 | ||
|
|
4dfa2e644e | ||
|
|
a2b2c0ee5a | ||
|
|
ea7eb26fb3 | ||
|
|
bb7b1c4fde | ||
|
|
adfe55c89a | ||
|
|
0bf67c68ec | ||
|
|
d92e2aaa20 | ||
|
|
a36c8a4d3c | ||
|
|
7065039494 | ||
|
|
5c201c359e | ||
|
|
4546b99f5f | ||
|
|
affa4134ca | ||
|
|
cb8414a20d | ||
|
|
1a9eb8973e | ||
|
|
d8530c4144 | ||
|
|
c45d7ec0a5 | ||
|
|
f30cb0d74b | ||
|
|
f58357bebe | ||
|
|
a83466f5fc | ||
|
|
ce3f3240c9 | ||
|
|
d3cf846739 | ||
|
|
d47cdc4186 | ||
|
|
0ca2aeff2c | ||
|
|
b0ce64a2ce | ||
|
|
1275eb848f | ||
|
|
c6e0ce6379 | ||
|
|
378cbbb235 | ||
|
|
a6f188af10 | ||
|
|
4ef0a4e9ad | ||
|
|
a8a4d06fac | ||
|
|
a9ab9a3925 | ||
|
|
66cffd1903 | ||
|
|
36c12f1809 | ||
|
|
5541f19df4 | ||
|
|
da8d31d637 | ||
|
|
a79aaf0136 | ||
|
|
901cb95204 | ||
|
|
ad9a7874a5 | ||
|
|
e729f058ab | ||
|
|
344658db76 | ||
|
|
f37c93ed7e | ||
|
|
e03dc38b5c | ||
|
|
e21859c6e1 | ||
|
|
8e1e107725 | ||
|
|
344a1f9865 | ||
|
|
284c7034e5 | ||
|
|
b6673372f5 | ||
|
|
878e3d7bf7 | ||
|
|
8d7c0d1c84 | ||
|
|
accb6bf0a9 | ||
|
|
10ccdaccc7 | ||
|
|
f7bc9a023b | ||
|
|
71aee6a9c1 | ||
|
|
5da8f081d5 | ||
|
|
822b7ee0d0 | ||
|
|
4a43fc75e0 | ||
|
|
be6b56d467 | ||
|
|
34bc19e3ca | ||
|
|
a604b9068b | ||
|
|
9b55052b58 | ||
|
|
58625e8394 | ||
|
|
31aa6e8a2b | ||
|
|
d3e6de365c | ||
|
|
f0313fc0a2 |
No files matched your search
+1
-8
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# Description: update a list of packages
|
||||
# Options: native slow
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
@@ -14,11 +11,7 @@ fi
|
||||
git config --global --add safe.directory "$CI_PROJECT_DIR"
|
||||
git config --global user.name "postmarketOS CI"
|
||||
# pmaports
|
||||
# The email address is the username of the bot (from the GitLab group members page) @noreply.gitlab.com
|
||||
git config --global user.email "project_8065375_bot_13cf44ca4cd2c938688af6e3d500d9cb@noreply.gitlab.com"
|
||||
|
||||
# For testing with pmaports-autoupdate-test repo
|
||||
# git config --global user.email "project_58002231_bot_be2d4e9e7aba929855726aafe12940d6@noreply.gitlab.com"
|
||||
git config --global user.email "project_226_bot_a365eaa0c380d1bee0af03adf42ebea3@noreply.gitlab.postmarketos.org"
|
||||
|
||||
# Configure SSH key for signing
|
||||
mkdir -p ~/.ssh
|
||||
|
||||
@@ -87,4 +87,11 @@ if grep -qEr 'PMOS_NO_OUTPUT_REDIRECT' -- *; then
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
if grep -qEr '^deviceinfo_kernel_cmdline.*[\"\s]console=null' -- device/; then
|
||||
echo "ERROR: Do not use console=null in the kernel command line."
|
||||
echo "Use these params to quiet console on boot: quiet loglevel=2"
|
||||
echo "For more information, see: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2989"
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
exit "$exit_code"
|
||||
@@ -23,9 +23,4 @@ if __name__ == "__main__":
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True)
|
||||
|
||||
if len(result) > 0:
|
||||
print("Linting issues found:")
|
||||
print(result)
|
||||
sys.exit(1)
|
||||
common.run_pmbootstrap(["-q", "lint"] + packages)
|
||||
@@ -55,14 +55,6 @@ if __name__ == "__main__":
|
||||
# Package count sanity check
|
||||
common.get_changed_packages_sanity_check(len(packages))
|
||||
|
||||
# [ci:skip-build]: verify checksums and stop
|
||||
verify_only = common.commit_message_has_string("[ci:skip-build]")
|
||||
if verify_only:
|
||||
print("WARNING: not building changed packages ([ci:skip-build])!")
|
||||
print("verifying checksums: " + ", ".join(packages))
|
||||
verify_checksums(packages, arch)
|
||||
sys.exit(0)
|
||||
|
||||
# Load context
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
@@ -101,15 +93,31 @@ if __name__ == "__main__":
|
||||
# No packages: skip build
|
||||
if len(packages) == 0:
|
||||
print(f"no packages changed, which can be built for {arch}")
|
||||
sys.exit(0)
|
||||
|
||||
# Build packages
|
||||
print(f"building in strict mode for {arch}: {', '.join(packages)}")
|
||||
build_strict(packages, arch)
|
||||
else:
|
||||
verify_only = common.commit_message_has_string("[ci:skip-build]")
|
||||
if verify_only:
|
||||
# [ci:skip-build]: verify checksums and stop
|
||||
print("WARNING: not building changed packages ([ci:skip-build])!")
|
||||
print("verifying checksums: " + ", ".join(packages))
|
||||
verify_checksums(packages, arch)
|
||||
else:
|
||||
# Build packages
|
||||
print(f"building in strict mode for {arch}: {', '.join(packages)}")
|
||||
build_strict(packages, arch)
|
||||
|
||||
# Build packages in extra-repos/systemd
|
||||
# FIXME: this should probably be more generic, if other repos are added later?
|
||||
if systemd_pkgs:
|
||||
print(f"building in strict mode for {arch}, from extra-repos/systemd: {', '.join(packages)}")
|
||||
common.run_pmbootstrap(["config", "systemd", "always"])
|
||||
build_strict(systemd_pkgs, arch)
|
||||
|
||||
verify_only = common.commit_message_has_string("[ci:skip-build]")
|
||||
if verify_only:
|
||||
# [ci:skip-build]: verify checksums
|
||||
print("WARNING: not building changed packages for extra-repos/systemd: ([ci:skip-build])!")
|
||||
print("verifying checksums: " + ", ".join(systemd_pkgs))
|
||||
verify_checksums(systemd_pkgs, arch)
|
||||
else:
|
||||
# Build packages
|
||||
print(f"building in strict mode for {arch}, from extra-repos/systemd: {', '.join(systemd_pkgs)}")
|
||||
build_strict(systemd_pkgs, arch)
|
||||
+3
-7
@@ -44,14 +44,10 @@ def commit_message_has_string(needle):
|
||||
return needle in run_git(["show", "-s", "--format=full", "HEAD"])
|
||||
|
||||
|
||||
def run_pmbootstrap(parameters, output_return=False):
|
||||
def run_pmbootstrap(parameters):
|
||||
""" Run pmbootstrap with the pmaports dir as --aports """
|
||||
cmd = ["pmbootstrap", "--aports", get_pmaports_dir()] + parameters
|
||||
stdout = subprocess.PIPE if output_return else None
|
||||
result = subprocess.run(cmd, stdout=stdout, universal_newlines=True)
|
||||
result.check_returncode()
|
||||
if output_return:
|
||||
return result.stdout
|
||||
subprocess.run(cmd, universal_newlines=True, check=True)
|
||||
|
||||
|
||||
def get_upstream_branch():
|
||||
@@ -100,7 +96,7 @@ def get_changed_files(removed=True):
|
||||
commit_head = run_git(["rev-parse", "HEAD"])[:-1]
|
||||
commit_upstream = run_git(["rev-parse", branch_upstream])[:-1]
|
||||
print("commit HEAD: " + commit_head)
|
||||
print(f"commit {branch_upstream}: f{commit_upstream}")
|
||||
print(f"commit {branch_upstream}: {commit_upstream}")
|
||||
|
||||
# Check if we are HEAD on the upstream branch
|
||||
if commit_head == commit_upstream:
|
||||
|
||||
+6
-1
@@ -10,7 +10,12 @@ stages:
|
||||
- lint
|
||||
- build
|
||||
- autoupdate
|
||||
|
||||
variables:
|
||||
# Default of 20 is pretty small, sometimes MRs have >20 commits in them. 100
|
||||
# seems like a reasonable balance. If this is too low, git merge-base (from ci/
|
||||
# common.py) can fail
|
||||
GIT_DEPTH: 100
|
||||
|
||||
# This defines the rules for when a pipeline should run.
|
||||
workflow:
|
||||
rules:
|
||||
|
||||
@@ -90,6 +90,7 @@ device/*/device-samsung-lt01/ @knuxify
|
||||
device/*/device-samsung-m0/ @Newbyte
|
||||
device/*/device-samsung-manta/ @jenneron @alexmrqt
|
||||
device/*/device-shift-axolotl/ @amartinz @calebccff @dylanvanassche
|
||||
device/*/device-solidrun-cubox/ @longnoserob
|
||||
device/*/firmware-google-sargo/ @flamingradian
|
||||
device/*/firmware-google-veyron-brcm/ @jenneron
|
||||
device/*/firmware-odroid-xu4/ @Grimler
|
||||
@@ -106,6 +107,7 @@ device/*/linux-postmarketos-exynos4/ @Newbyte @Grimler @knuxify
|
||||
device/*/linux-postmarketos-exynos5/ @jenneron @Grimler
|
||||
device/*/linux-postmarketos-grate/ @clamor-s @jenneron @jethrob
|
||||
device/*/linux-postmarketos-imx-ereader/ @akemnade
|
||||
device/*/linux-postmarketos-marvell-dove/ @longnoserob
|
||||
device/*/linux-postmarketos-mediatek-mt8173/ @jenneron @adamthiede
|
||||
device/*/linux-postmarketos-mediatek-mt8183/ @jenneron @binarycraft
|
||||
device/*/linux-postmarketos-omap/ @MightyM17 @Sicelo
|
||||
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.36.1
|
||||
pkgrel=32
|
||||
pkgver=1.37.0
|
||||
pkgrel=7
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
88f07677919711bb577f60e1861f4fa555168a8703a0a3b904550e24d4045135bb0296e00464899fc6231df07db09bb11f1bc81cdf593a71a8f74dfc3333c29e busybox-static-1.36.1-r32-aarch64-edge.apk
|
||||
9d0fd2ad11f7b2f9fbb3d5e71a2a7f113187648f61c269bee7b6b7ef0976d181d6a7588638382415b7eb2cc3934d0ef62080d4462acfc97c4c7b056003d333d4 busybox-static-1.37.0-r7-aarch64-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.36.1
|
||||
pkgrel=32
|
||||
pkgver=1.37.0
|
||||
pkgrel=7
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b0985e2f62df8f1d4e1b7a1206dc3e462df1e6b2a8aae662e57cc497ca3f474f37cc952de0d3bbaad6532d569bf540f17ad4eccc9cabfdc3c9f95f8feaf08049 busybox-static-1.36.1-r32-armhf-edge.apk
|
||||
c89807c048cd58a5994c8162685669d0e49752f7284adc427d017355bbfd43f5a686617be42abd2b470c15869225a03f31a6231ee4dbb03fc6b27d6c920b5208 busybox-static-1.37.0-r7-armhf-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.36.1
|
||||
pkgrel=32
|
||||
pkgver=1.37.0
|
||||
pkgrel=7
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f383286e58183232b41a0d299528734cb29b11e51112eab1fe513322a269a2cdf90a1341d7e329ed7cd58e2d158e3a80bc3a5290ef93de2b28aaf7a25b78bfd7 busybox-static-1.36.1-r32-armv7-edge.apk
|
||||
56e0b396ced0a0afab2f5b50156b87707e3511a2e24c52c9688a20791fad20f11869b5b06bb6c7d407ffec3e4e06ea3100876e3d32efae678fc5a0fe6b57715a busybox-static-1.37.0-r7-armv7-edge.apk
|
||||
"
|
||||
@@ -19,8 +19,8 @@
|
||||
# version is implemented as simple shell wrappers.
|
||||
|
||||
pkgname=crossdirect
|
||||
pkgver=5.1.0
|
||||
pkgrel=1
|
||||
pkgver=5.2.0
|
||||
pkgrel=0
|
||||
pkgdesc="Wrappers to launch native cross compilers in foreign chroots"
|
||||
url="https://postmarketOS.org"
|
||||
arch="all"
|
||||
@@ -82,7 +82,7 @@ package() {
|
||||
|
||||
sha512sums="
|
||||
0f4b48f250425dc57f63955fc8b38477d23db793bee367c3fbe03c3d2a559ba576434d07518310db4cae9d90d501af4051b80038b10fae94b980e537fc9374ad cargo.sh
|
||||
a1af3d2876dc05bb840e4bfb8b6e1c1dcf5b952375a6644dcb9cf659d82ec8bfc4be5d813064057fe9626104a10907ae7072a9d5fd7ac40f3b87e90dbf535eaf crossdirect.c
|
||||
b2e602b7fc95ed403d29f0d754879d5f773c39ee33e726bb10cff17b3c088406dac84f2ca6d8ad563c64370007d98af805d6ee9cd4a06fe3d4c61c0cb90c5c0c crossdirect.c
|
||||
de2aa6929bbff5db9132673e667f4525b333d062cb1f7a0597dd924de9e5c7215a9f8e2e6263b6fb5ace06f2c4b64f4ebfd0ede9b78add07c2cd08ec8613e98f rustc.sh
|
||||
ea9bf8db3810d03d0a7395057f3d6e57f7127d87c55deaedc171c255288f5f3cc6fbcc680a5a1b92786cf573875d5dc22521173799fe2639acc97d0715ff905b rust-qemu-linker.sh
|
||||
"
|
||||
@@ -44,8 +44,7 @@
|
||||
void exit_userfriendly()
|
||||
{
|
||||
fprintf(stderr, "Please report this at: https://gitlab.postmarketos.org/postmarketOS/pmaports/issues\n");
|
||||
fprintf(stderr, "As a workaround, you can compile without crossdirect.\n");
|
||||
fprintf(stderr, "See 'pmbootstrap -h' for related options.\n");
|
||||
fprintf(stderr, "As a workaround, you can compile without crossdirect with options=\"!pmb:crossdirect\".\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -118,11 +117,17 @@ int main(int argc, char **argv)
|
||||
NULL };
|
||||
char *ldPreload = getenv("LD_PRELOAD");
|
||||
if (ldPreload) {
|
||||
if (strcmp(ldPreload, "/usr/lib/libfakeroot.so") == 0) {
|
||||
env[0] = "LD_PRELOAD=/native/usr/lib/libfakeroot.so";
|
||||
} else {
|
||||
fprintf(stderr, "ERROR: crossdirect: can't handle LD_PRELOAD: %s\n", ldPreload);
|
||||
exit_userfriendly();
|
||||
if (strstr(ldPreload, "libfakeroot.so")) {
|
||||
fprintf(stderr, "============================================================================================\n");
|
||||
fprintf(stderr, "ERROR: crossdirect was called with: LD_PRELOAD=%s\n", ldPreload);
|
||||
fprintf(stderr, "This means your package tried to run a compiler during package().\n");
|
||||
fprintf(stderr, "This is not supported by crossdirect, and usually not a good idea.\n");
|
||||
fprintf(stderr, "* Try to fix your APKBUILD so it does not run the compiler during package(), only in build()\n");
|
||||
fprintf(stderr, " * If you're using 'meson install', try to add '--no-rebuild'\n");
|
||||
fprintf(stderr, "* If this is not possible, you can work around it by setting options=\"!pmb:crossdirect\"\n");
|
||||
fprintf(stderr, " (compilation will be slower!)\n");
|
||||
fprintf(stderr, "============================================================================================\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+84
-162
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -44,9 +44,10 @@ depends="binutils-aarch64 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-aarch64 binutils-aarch64"
|
||||
subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,7 +136,6 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -170,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +233,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -351,15 +328,7 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -388,10 +357,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -412,7 +379,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -420,7 +387,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -430,7 +398,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -446,7 +414,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -461,7 +429,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -505,25 +473,23 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# These are moved into packages with arch=$CTARGET_ARCH so remove
|
||||
# cross prefix
|
||||
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
|
||||
|
||||
# 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
|
||||
@@ -572,8 +538,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -586,8 +551,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -605,15 +569,12 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -632,30 +593,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -663,17 +620,15 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -682,42 +637,26 @@ gdc() {
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
else
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
fi
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -725,31 +664,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -757,8 +690,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -767,38 +699,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -807,12 +731,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
+84
-162
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -44,9 +44,10 @@ depends="binutils-armhf mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
|
||||
subpackages="g++-armhf:gpp libstdc++-dev-armhf:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,7 +136,6 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -170,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +233,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -351,15 +328,7 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -388,10 +357,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -412,7 +379,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -420,7 +387,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -430,7 +398,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -446,7 +414,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -461,7 +429,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -505,25 +473,23 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# These are moved into packages with arch=$CTARGET_ARCH so remove
|
||||
# cross prefix
|
||||
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
|
||||
|
||||
# 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
|
||||
@@ -572,8 +538,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -586,8 +551,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -605,15 +569,12 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -632,30 +593,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -663,17 +620,15 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -682,42 +637,26 @@ gdc() {
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
else
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
fi
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -725,31 +664,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -757,8 +690,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -767,38 +699,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -807,12 +731,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
+84
-162
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armv7
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -44,9 +44,10 @@ depends="binutils-armv7 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-armv7 binutils-armv7"
|
||||
subpackages="g++-armv7:gpp libstdc++-dev-armv7:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,7 +136,6 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -170,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +233,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -351,15 +328,7 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -388,10 +357,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -412,7 +379,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -420,7 +387,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -430,7 +398,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -446,7 +414,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -461,7 +429,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -505,25 +473,23 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# These are moved into packages with arch=$CTARGET_ARCH so remove
|
||||
# cross prefix
|
||||
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
|
||||
|
||||
# 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
|
||||
@@ -572,8 +538,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -586,8 +551,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -605,15 +569,12 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -632,30 +593,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -663,17 +620,15 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -682,42 +637,26 @@ gdc() {
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
else
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
fi
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -725,31 +664,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -757,8 +690,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -767,38 +699,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -807,12 +731,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
+84
-162
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-riscv64
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Stage2 cross-compiler for riscv64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -44,9 +44,10 @@ depends="binutils-riscv64 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-riscv64 binutils-riscv64"
|
||||
subpackages="g++-riscv64:gpp libstdc++-dev-riscv64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,7 +136,6 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -170,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +233,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -351,15 +328,7 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -388,10 +357,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -412,7 +379,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -420,7 +387,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -430,7 +398,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -446,7 +414,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -461,7 +429,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -505,25 +473,23 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# These are moved into packages with arch=$CTARGET_ARCH so remove
|
||||
# cross prefix
|
||||
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
|
||||
|
||||
# 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
|
||||
@@ -572,8 +538,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -586,8 +551,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -605,15 +569,12 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -632,30 +593,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -663,17 +620,15 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -682,42 +637,26 @@ gdc() {
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
else
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
fi
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -725,31 +664,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -757,8 +690,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -767,38 +699,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -807,12 +731,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
+84
-162
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Stage2 cross-compiler for x86"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -44,9 +44,10 @@ depends="binutils-x86 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86 binutils-x86"
|
||||
subpackages="g++-x86:gpp libstdc++-dev-x86:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,7 +136,6 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -170,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +233,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -351,15 +328,7 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -388,10 +357,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -412,7 +379,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -420,7 +387,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -430,7 +398,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -446,7 +414,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -461,7 +429,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -505,25 +473,23 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# These are moved into packages with arch=$CTARGET_ARCH so remove
|
||||
# cross prefix
|
||||
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
|
||||
|
||||
# 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
|
||||
@@ -572,8 +538,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -586,8 +551,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -605,15 +569,12 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -632,30 +593,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -663,17 +620,15 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -682,42 +637,26 @@ gdc() {
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
else
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
fi
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -725,31 +664,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -757,8 +690,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -767,38 +699,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -807,12 +731,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
+85
-161
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86_64
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Stage2 cross-compiler for x86_64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64"
|
||||
@@ -44,9 +44,11 @@ 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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip"
|
||||
options="!strip !tracedeps"
|
||||
depends="$depends so:libc.musl-aarch64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
|
||||
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,7 +137,6 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -170,7 +171,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -218,13 +219,12 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -234,7 +234,7 @@ fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -244,7 +244,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -283,6 +283,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -290,44 +291,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
|
||||
prepare() {
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -351,15 +329,7 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
export libat_cv_have_ifunc=no
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -388,10 +358,8 @@ build() {
|
||||
echo " CHOST=$CHOST"
|
||||
echo " CTARGET=$CTARGET"
|
||||
echo " CTARGET_ARCH=$CTARGET_ARCH"
|
||||
echo " CTARGET_LIBC=$CTARGET_LIBC"
|
||||
echo " languages=$_languages"
|
||||
echo " arch_configure=$_arch_configure"
|
||||
echo " libc_configure=$_libc_configure"
|
||||
echo " cross_configure=$_cross_configure"
|
||||
echo " bootstrap_configure=$_bootstrap_configure"
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
@@ -412,7 +380,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
$_symvers
|
||||
--disable-symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -420,7 +388,8 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -430,7 +399,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -446,7 +415,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -461,7 +430,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -505,25 +474,23 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# These are moved into packages with arch=$CTARGET_ARCH so remove
|
||||
# cross prefix
|
||||
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
|
||||
|
||||
# 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
|
||||
@@ -572,8 +539,7 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libatomic.so.*
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -586,8 +552,7 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libstdc++.so.*
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -605,15 +570,13 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
depends="$depends so:libc.musl-aarch64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -632,30 +595,26 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -663,17 +622,15 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgomp.so.*
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -682,42 +639,26 @@ gdc() {
|
||||
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include/d/ \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
# Copy: The installed '.d' files, the static lib, the binary itself
|
||||
# The shared libs are part of 'libgphobos' so one can run program
|
||||
# without installing the compiler
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
fi
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
else
|
||||
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
|
||||
"$subpkgdir"/usr/$CTARGET/lib/
|
||||
fi
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgo.so.*
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -725,31 +666,25 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/go
|
||||
amove usr/bin/*go
|
||||
amove usr/bin/*gofmt
|
||||
amove $_gcclibexec/go1
|
||||
amove $_gcclibexec/cgo
|
||||
amove $_gcclibexec/buildid
|
||||
amove $_gcclibexec/test2json
|
||||
amove $_gcclibexec/vet
|
||||
amove usr/lib/libgo.a
|
||||
amove usr/lib/libgo.so
|
||||
amove usr/lib/libgobegin.a
|
||||
amove usr/lib/libgolibbegin.a
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgfortran.so.*
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -757,8 +692,7 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.so.*
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -767,38 +701,30 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
if $_libquadmath; then
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
fi
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.so
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
amove usr/lib/libgna*.a
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -807,12 +733,9 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -864,4 +787,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -0,0 +1,149 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-aarch64
|
||||
pkgver=1.2.5
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-aarch64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
30c20d050028bbe9a2203a0db0bb1453d921ac381fc3a7dc2c79c535a7ac25ecf65d7ee367b17178a37aa0e26d028a860d03567e9662c6251171c53bf2562893 musl-1.2.5-r3-aarch64-edge.apk
|
||||
43ef19c8698e98eb473116e7c21dbb9e66d994bd1cd63837d0f0c43ceaf1ce4f1db582e48b22478574ef7fe4bc309aa7bb387af2f99d8d88bcecfaf7763ec82c musl-dev-1.2.5-r3-aarch64-edge.apk
|
||||
5b3c6f1f1d87164a8a72c9d90b6e35ccc256bb2f6e1a12e4a3ff04b6309fff6c438eef60b824e4993958c4348c122fb96ef8f59dc468e10ee5be69aa81e6f4bc musl-1.2.5-r5-aarch64-edge.apk
|
||||
ebbd7300b2102f322633dbc01449b5d4f25374609193359bf5da97e3a6cf34f1288a69ed0638bd5505b4548fdeb1efa481c9cd3a031ae3a98759b36cbf2db46e musl-dev-1.2.5-r5-aarch64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.2.5
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b98e17b30e5968ca8f6c963e8752544112337b641186c269dbc4dd4b0a9496de9f4a549deb1bbf03e419b145b86b0c48fd22db1b8dff188bd3b451632b8c2b3f musl-1.2.5-r3-armhf-edge.apk
|
||||
0e9fa461b75f3a9832e26f8086c9397b9d5dbea9c5821cf7898c0ccf64281f603137265606ee97810cba988fdff967ea7ec240e4e59c1d87da7e001cd4bf719a musl-dev-1.2.5-r3-armhf-edge.apk
|
||||
302f14e5dc60b4c55f5f299be6cd158fe0955549e8b559afb5985c29a5c98432f82586732954c0dc3776104efc072b11ad9e4818842e6592df2e1931ba3590de musl-1.2.5-r5-armhf-edge.apk
|
||||
71fc34ce05c5ed73136e77baa478986ec205f882f02602f54f772498451c70a254c89301e932c1e9d3b48a4b4513ca99f64b54de38bdd95966421c297e81ac5b musl-dev-1.2.5-r5-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armv7
|
||||
pkgver=1.2.5
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armv7:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
05d888f66cb8bb75fcf767327068aff0152c32c97d6de680f7df0b9b11bbf99fefd8f2b7c1b92de8489e0f051d536e0d708faa3c5aaff783565e6c0e05d34c3b musl-1.2.5-r3-armv7-edge.apk
|
||||
2c8775a37f2f7d5730857dcf7a7f038a1b0838a775a03e05ce299807f3608a112e95c61b776b32152434c27ee23b999915357b4e89e6559eb89e820666e36d97 musl-dev-1.2.5-r3-armv7-edge.apk
|
||||
9e2af487860c1a232941a8c5e9833457af1f8c1bd45ce2105dcffcd39879363d4a14928c8670b6e5b8295c97a9fd121d880f8eee2f301df243e1e12dcae1cb69 musl-1.2.5-r5-armv7-edge.apk
|
||||
8de555df4077de3f12bb5a113d2baaa93f403bd829058dd94093e58a0a7cd7b868d76bdc3f5bc0e5953f2bffdac4360cdbbada3be72578a17c7b1118cb2330a0 musl-dev-1.2.5-r5-armv7-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-riscv64
|
||||
pkgver=1.2.5
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-riscv64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d9adef7c000203504c357db8b84008f95f97fa68e3944103c345e0bc511f84bff7175ea1afd029de81dd2acce64795c55f100b7abfed3a5bad464c654e620ac3 musl-1.2.5-r3-riscv64-edge.apk
|
||||
51a20229c477c691429d2fb800ff441f0181e98879996c0fede94a39e37d66fd2bddd50f663c85090837b8cfaf41ed65c2d2142eaa0ce503b2c5bf6fd2d0194e musl-dev-1.2.5-r3-riscv64-edge.apk
|
||||
4234a6980ea7bae2d275537f2c55e6ff1c480fc1ff838341d252ca71f6d098e1e91b60a8341744c91721d0850886f9155de330de7a71b037b9b87ac514582587 musl-1.2.5-r5-riscv64-edge.apk
|
||||
6d10394c2e778699645ed3a65a52bd1fead39aeea13371a83cacae4b301fd577b2cb8cd9779c285d1dafeebef99cbd09807b86013468fe74f45cac1498c400ff musl-dev-1.2.5-r5-riscv64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86
|
||||
pkgver=1.2.5
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-x86:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
68f290b5c1a8e8c1b5b70e34c4be391fa49fc8f91902a6dd432a3c34317788c69d5a31f9fedeec51a4d12509aee735d8875f0c4349d3d9cab1d9789a50a78bf8 musl-1.2.5-r3-x86-edge.apk
|
||||
2115a6da3ac624872a8e4d764aed69c0e729853d3b74643da83bef1083d20147de2f2f181df82d0bb273fad0597d37b719048bd66e23ed072982018ecf07b8fc musl-dev-1.2.5-r3-x86-edge.apk
|
||||
5a556b306c4fe7969318c3af456dfa3b91f4a8563cf21d95154b27864d74baa68e99fc78302ac1b19f7aa3f72febb647959ef6c1c664798bbc8d411f8fe950f3 musl-1.2.5-r5-x86-edge.apk
|
||||
52b49e9789176f47d6c00e0cf5e4ec66a70f1977ae86d4f8cbc33631e0f5586c8d745536aa04fcd612ec4aee9bfca2cc2e5beea0e5108d81a6a8e015a58d1666 musl-dev-1.2.5-r5-x86-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86_64
|
||||
pkgver=1.2.5
|
||||
pkgrel=3
|
||||
pkgrel=5
|
||||
arch="aarch64"
|
||||
subpackages="musl-dev-x86_64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c4667bf824340766c2b6c41e88e4dc76a7e51b7247ece8f85e8e9347769fce6bd4459d94fcdc82ea12e0a67f7160d68cf2a1ed322eee7d6ca9d075036c17e193 musl-1.2.5-r3-x86_64-edge.apk
|
||||
a64220117e1614e585be89fcb00e387b4ea2f4251ce2b6af38c576787093b4ce6a0bed3e4d7bc86517369ee5c4f11db63c6f572e16f336a1178fa99dfa394aff musl-dev-1.2.5-r3-x86_64-edge.apk
|
||||
73c14308a84b80ffefa83e48322869a99c9adede367155493bee7f19e2be0846908cf52f0068748d641df9e19566c2fd49feda56e7848432054674a81c10f85e musl-1.2.5-r5-x86_64-edge.apk
|
||||
8521be7365f75c68752c1527d32bc7c83a9f6670f5aff97752d9708607aaca04bf6afbed437192736f9e1baa85c1ff8f40dc75ce010554ac5ffbc777b9f0a6ac musl-dev-1.2.5-r5-x86_64-edge.apk
|
||||
"
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a5lte-downstream
|
||||
pkgdesc="Samsung Galaxy A5 (SM-A500F)"
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
09f28323fac82a8f8495af89de94449100e0f9233e22e33af807e559803bf3d9114aedc6d21626c7d5d736e93025de812292a0ee47c3639ac704696995c3d675 deviceinfo
|
||||
410b5caac31e2af65ebfe1f3312fc2106c681430b75dfa8f4412f5727cd7db669dc3f46b1b2c20ece1b438052c36cbd3ff7b212ea03d9fea5af0b3c5bb14ff9b deviceinfo
|
||||
"
|
||||
@@ -17,7 +17,7 @@ deviceinfo_screen_height="1280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2 androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a5ulte-downstream
|
||||
pkgdesc="Samsung Galaxy A5 (SM-A500FU)"
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1e7fe5a6788c1b635ab5c63083da5c1f353440567b8f86948092202ce026cbbae000ea047e65fae543f13092f97626ce227bc3f329477fbd7521df1b31f30bc8 deviceinfo
|
||||
8c08854b664866087f3df1dccbe39ee0aba4563e9fc2cb38567bbbb9f54a74e3a9ed7a574bc18930ecf595d8beda32dd301cd757b6788d24cdd819c8c9cc5c52 deviceinfo
|
||||
"
|
||||
@@ -17,7 +17,7 @@ deviceinfo_screen_height="1280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2 androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-coreprimevelte-downstream
|
||||
pkgdesc="Samsung Galaxy Core Prime VE LTE downstream"
|
||||
pkgver=1
|
||||
pkgrel=3
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="mkbootimg linux-samsung-coreprimevelte-downstream postmarketos-base postmarketos-initramfs-minimal pxa-mkbootimg u-boot-tools"
|
||||
depends="mkbootimg linux-samsung-coreprimevelte-downstream postmarketos-base pxa-mkbootimg u-boot-tools"
|
||||
makedepends="devicepkg-dev"
|
||||
_pmb_recommends="firmware-samsung-pxa1908-downstream"
|
||||
source="deviceinfo 90-coreprimevelte.conf"
|
||||
@@ -24,6 +24,6 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
741f46736c2742d4a6f118a924eee89954fb14e5b1dc00f372bda41b63ec975cf960909f915fcb31ad965f136a712905bc8626cd7e530f40e110885f7c861790 deviceinfo
|
||||
ec654952ea328489ced4268a78272977cca1a9356d86ea9794f5a0aa9387d7daeb1125419388a4ade0ea86cc6893178601eb7aa18a5886970a775e5ad78a59ba deviceinfo
|
||||
4854cc57b86e1199dbc165110514e672dabf45044fe9f7ebbde5b2b24768fb5497273b5f38612cf2dfeffc9bf0648c725114b4fa01165bf7fb02f7d741ee5806 90-coreprimevelte.conf
|
||||
"
|
||||
@@ -14,6 +14,7 @@ deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="480"
|
||||
deviceinfo_screen_height="800"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader relate
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-j6lte-downstream
|
||||
pkgdesc="Samsung Galaxy J6 (2018)"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-samsung-j6lte-downstream
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
postmarketos-base-downstream
|
||||
msm-fb-refresher
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="$pkgdesc (WiFi firmware)"
|
||||
depends="firmware-samsung-j6lte-downstream"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5bbe8f6840d75c4d8693fbe62afaf071cddaef750aee2f9cae31187489a2b05873369ee06bf5292ec484a70f6d5ac7aea7862fc27f7fc3057205afda52996d7e deviceinfo
|
||||
"
|
||||
@@ -0,0 +1,32 @@
|
||||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Samsung Galaxy J6"
|
||||
deviceinfo_manufacturer="Samsung"
|
||||
deviceinfo_codename="samsung-j6lte-downstream"
|
||||
deviceinfo_year="2018"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="720"
|
||||
deviceinfo_screen_height="1480"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_kernel_cmdline="androidboot.selinux=permissive androidboot.selinux=permissive"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||
deviceinfo_flash_heimdall_partition_rootfs="SYSTEM"
|
||||
@@ -2,15 +2,14 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-lt01wifi-downstream
|
||||
pkgdesc="Samsung Galaxy Tab 3 8.0"
|
||||
pkgver=1
|
||||
pkgrel=1
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
postmarketos-base
|
||||
postmarketos-initramfs-minimal
|
||||
linux-samsung-lt01wifi-downstream
|
||||
mkbootimg
|
||||
"
|
||||
@@ -35,7 +34,7 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b6d8953f5717b81fd1cb6d34e0f5539480b348a52194bbd3e6d83c3ae9e77bc2d948b05303c93ecbd7121f7affd476a9522c32c1a55fd7cee4ae0ca1bc0b88a0 deviceinfo
|
||||
ea36813341c6843fa3b9c8a4ca330b92beb61e7c62de6a1d095c66f044237be2557bacdcc82912c48290d958128bef1771cd0d8c747758a5a98de759ecbb5778 deviceinfo
|
||||
af036fe35011db078379dbb2e8c16c86546f0a4fcb3d1bcee3502bb1ea5b38f3ec5a9fa8cd1ca8ed8b89592a7f572d6072781289845303e0bf85fc2de4ead9fb modules-load.conf
|
||||
594d6059ba1b06bce65538d26ce80cf2ce840786605b86e993ffaef858837507c033c0f95b7bcd9914ae7ea3cd2a9e43e32ec879db7c908219ad62d38b4e426a modprobe.conf
|
||||
"
|
||||
@@ -14,6 +14,7 @@ deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="800"
|
||||
deviceinfo_screen_height="1280"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-m0-downstream
|
||||
pkgdesc="Samsung Galaxy S III"
|
||||
pkgver=3
|
||||
pkgrel=4
|
||||
pkgver=4
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -12,7 +12,6 @@ depends="
|
||||
linux-samsung-m0-downstream
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
install="$pkgname.post-install"
|
||||
@@ -40,6 +39,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e89b2287780aa94e93ee8cba472ec78b14a0de0089c3ee8c278175ace459d84a58a9278f473d917dd569b114874fb76931b404f810220d328c7e3f6148dac485 deviceinfo
|
||||
8e72ed82c9cfa5e1a95aa480392264a69a9fe5a6e0b3e40dde4fdd7ca157b20ea673d2183fc02d0e98d4971a94fc625c0df6a8065527173d1653b1c90d1ed232 deviceinfo
|
||||
1376f0eb7c6ba459ca5c44b3eb7e9919d9c5f48d71ec30c006d1b4843e31cdade9f980415a166e977b2567b26f4e87d4554ee1143fdc62453d60a93bed129d06 90-android-touch-dev.rules
|
||||
"
|
||||
@@ -14,6 +14,7 @@ deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="720"
|
||||
deviceinfo_screen_height="1280"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
pkgname=device-samsung-on7xelte-downstream
|
||||
pkgdesc="Samsung Galaxy J7 Prime"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-samsung-on7xelte
|
||||
linux-samsung-on7xelte-downstream
|
||||
mkbootimg
|
||||
msm-fb-refresher
|
||||
postmarketos-base
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
pkgname=firmware-samsung-j6lte-downstream
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware files for Samsung Galaxy J6 (2018)"
|
||||
url="https://github.com/samsungexynos7870/android_vendor_samsung_j6lte"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native"
|
||||
|
||||
# Source
|
||||
_commit="0ace47cab223eb50ef39a2725f3974ed43918b29"
|
||||
builddir="$srcdir/android_vendor_samsung_j6lte-$_commit"
|
||||
_raw_wifi_path="$url/raw/$_commit/proprietary/vendor/etc/wifi"
|
||||
_install_wifi_path="/lib/firmware/postmarketos/wifi/"
|
||||
source="
|
||||
bcmdhd_apsta.bin_36::$_raw_wifi_path/bcmdhd_apsta.bin_36
|
||||
bcmdhd_clm.blob::$_raw_wifi_path/bcmdhd_clm.blob
|
||||
bcmdhd_mfg.bin_36::$_raw_wifi_path/bcmdhd_mfg.bin_36
|
||||
bcmdhd_sta.bin_36::$_raw_wifi_path/bcmdhd_sta.bin_36
|
||||
nvram.txt_36::$_raw_wifi_path/nvram.txt_36
|
||||
"
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/bcmdhd_apsta.bin_36" "$pkgdir$_install_wifi_path/bcmdhd_apsta.bin_36"
|
||||
install -Dm644 "$srcdir/bcmdhd_clm.blob" "$pkgdir$_install_wifi_path/bcmdhd_clm.blob"
|
||||
install -Dm644 "$srcdir/bcmdhd_mfg.bin_36" "$pkgdir$_install_wifi_path/bcmdhd_mfg.bin_36"
|
||||
install -Dm644 "$srcdir/bcmdhd_sta.bin_36" "$pkgdir$_install_wifi_path/bcmdhd_sta.bin_36"
|
||||
install -Dm644 "$srcdir/nvram.txt_36" "$pkgdir$_install_wifi_path/nvram.txt_36"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
678c30e5e64ba216fca0e0121eb9b2f6ad22f6e10c19138b3fa4af52bbce91f0a22886e7282062a44a4ded79bb675893556c5a193e56a8bd9979a0b0a679f008 bcmdhd_apsta.bin_36
|
||||
e2d1ca4f6a5f3649c1ab0fc9a7dca34077d5a4c5ea8465c3da92845141145e5f19d06c1bcb5f7d683bdce6c15675f41506bb9fbff0076ec58defa27114b2ad52 bcmdhd_clm.blob
|
||||
fbe0c453088efc5318fc80cdd6b6b9855ea21ce6619ca7f40fdf007d0dd9c8f4f821fe9356dd3492506223bfdb67eb6821347a2d0b420e06a8fadaf9166a947c bcmdhd_mfg.bin_36
|
||||
706cb7f4eda0bba5069cb3635033a34d7155a4e60dc2fd1d5a724c387da77865d5a960f1c8b08546e1715470fe71bebbad29404207c62cdbfd3bbbdce26fa60d bcmdhd_sta.bin_36
|
||||
6ff097c0895d39c576ec70b1e5a6ba37dddef1e2f9a5f22f077033d08c9c94dd62c4e482210105d38f639b45564b54b5919f52af3eecd6961af1fb2eb600fa5f nvram.txt_36
|
||||
"
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
|
||||
pkgname=linux-samsung-j6lte
|
||||
pkgname=linux-samsung-j6lte-downstream
|
||||
pkgver=3.18.14
|
||||
pkgrel=0
|
||||
pkgdesc="Samsung Galaxy J6 kernel fork"
|
||||
@@ -97,7 +97,7 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
44719f2fead8c8419cb0ff2595c5325ade53b8639e13f0fa59d599e4470cf911fd2c442af2fef3529c8875a62d2469ecbfc5ef52ac4c61e1495ff335afea9412 linux-samsung-j6lte-03b26fe4bd3726b2940df395716ffc316cdff5ac.tar.gz
|
||||
44719f2fead8c8419cb0ff2595c5325ade53b8639e13f0fa59d599e4470cf911fd2c442af2fef3529c8875a62d2469ecbfc5ef52ac4c61e1495ff335afea9412 linux-samsung-j6lte-downstream-03b26fe4bd3726b2940df395716ffc316cdff5ac.tar.gz
|
||||
bb230864207ff6788a0db645d62035b51de10c0ed8057f1b61c79e46453f7bbb143c45b2bc879e936b4be0b801d5437d52316bddfc17f11a2d9d12c397a25bb9 config-samsung-j6lte.aarch64
|
||||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
a6b6c781dd23f9a45a1605456d8c9af3ec6b5c389acd2b5d4c32280dcb59118996d794165bea2005dbdd9415297e5060bcac7579f908f7d65406a862b743fed5 replace-Sun-Solaris-style-flag-on-section-xz-supplementation.patch
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Richard Acayan <mailingradian@gmail.com>
|
||||
pkgname=alsa-ucm-conf-qcom-sdm670
|
||||
pkgver=1.2.9_git20240801
|
||||
pkgver=1.2.9_git20241012
|
||||
pkgrel=0
|
||||
pkgdesc="ALSA UCM configuration for SDM670 devices"
|
||||
url="https://gitlab.com/sdm670-mainline/alsa-ucm-conf"
|
||||
@@ -8,7 +8,7 @@ arch="aarch64"
|
||||
license="BSD-3-Clause"
|
||||
provides="alsa-ucm-conf"
|
||||
provider_priority=1
|
||||
_commit="4712327133bcf730a35ce2c80ffb2dfc06b43df1"
|
||||
_commit="437f49545593a3e285feff1820bc1a282213af45"
|
||||
source="https://gitlab.com/sdm670-mainline/alsa-ucm-conf/-/archive/$_commit/alsa-ucm-conf-$_commit.tar.gz"
|
||||
options="!check"
|
||||
|
||||
@@ -19,5 +19,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2401dce746edfef9c025b6e291de42262376839ea0556649b43cce995dbedb71f58574c1654bc05e3b80f19aca4789661f67a5503eb3308fddb6e057fa7c2d2d alsa-ucm-conf-4712327133bcf730a35ce2c80ffb2dfc06b43df1.tar.gz
|
||||
4e0edfaf6451bc0177e2115f21ef00504abf2b974e7f8eb8e5f4089f11ff6d2692ff07965946eb9086b1dce7016ab14bdc998bbf6f72ae9da00d83678ed5c956 alsa-ucm-conf-437f49545593a3e285feff1820bc1a282213af45.tar.gz
|
||||
"
|
||||
@@ -3,7 +3,7 @@
|
||||
pkgname=device-fairphone-fp4
|
||||
pkgdesc="Fairphone 4"
|
||||
pkgver=3
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -39,7 +39,7 @@ depends="
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
install="$pkgname.post-install $pkgname.post-upgrade"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="
|
||||
81-libssc-fairphone-fp4.rules
|
||||
90-feedbackd-aw8695.rules
|
||||
@@ -63,6 +63,13 @@ package() {
|
||||
"$pkgdir"/etc/conf.d/hexagonrpcd-adsp-sensorspd
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
|
||||
mkdir -p "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-fairphone-fp4.rules
|
||||
2974ccc172bf1299daeb0bc746879b3a1db1fbc3a2b163a02a6554fed6ed9f733144bcf976cd2441c5664d496dcce3ae943f4314c653470dc07dda0de5ad632b 90-feedbackd-aw8695.rules
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1 @@
|
||||
device-fairphone-fp4-openrc.post-install
|
||||
@@ -1 +0,0 @@
|
||||
device-fairphone-fp4.post-install
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-gru
|
||||
pkgdesc="Google Gru Chromebooks"
|
||||
pkgver=7
|
||||
pkgver=8
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -53,6 +53,6 @@ nonfree_firmware() {
|
||||
|
||||
|
||||
sha512sums="
|
||||
7815e3a164720b5ad0df7ce8d12b12fe85cc4bb7bf4a09ccc0eb831a58a920026fd92d545f4d6fb459a688e15b9d542e360fd597cd5d3b01a3ea338c3928d2a3 deviceinfo
|
||||
d0d5e47e7bc6f63f92669a315611c36972e2f06a32c1339ac551f23db023331fb6e1cdbbe4dc2022596aaf8083967951c43585a3aa32c4fddc8d8987bc20c092 deviceinfo
|
||||
a750a0c41068082e0b82351d5aec91715e1a5215b09b26fec644dfe259cea2d662e878433a732a8c06dab2a9b420baec2bcc6161d8357cf3ed770239c5165090 modules-initfs
|
||||
"
|
||||
@@ -20,7 +20,7 @@ deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
deviceinfo_cgpt_kpart_size="65536"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-kukui
|
||||
pkgdesc="Google Kukui Chromebooks"
|
||||
pkgver=8
|
||||
pkgver=9
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -73,6 +73,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ecd503069ecf272ddc238bd49dc257a1f3e0f4c20b322238e2da83104b94b331c22886d1591b6fe0b78c986e15ac6251e364ec1b750f9125ea722a6b1a79e2b8 deviceinfo
|
||||
563b0c9ee35c90f2be74e30fa6d490a351e5e114f946c21556f00b621bfd5c756599eef5228dad8cf74c258eb8eb9e12f8012058da285ddff7834820cad5fc7e deviceinfo
|
||||
8e95624610dae7d18684056396c9e82635ddce7303d6770e965f9372ffa101fdfd5f8337bc7368004890e9836798663a98c142c52ed63795877ea37ac8da56af modules-initfs
|
||||
"
|
||||
@@ -19,7 +19,7 @@ deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Co-Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-oak
|
||||
pkgdesc="Google Oak Chromebooks"
|
||||
pkgver=6
|
||||
pkgver=8
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -15,7 +15,6 @@ depends="
|
||||
linux-postmarketos-mediatek-mt8173
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo modules-initfs"
|
||||
@@ -40,6 +39,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d082e6c155347f662403f611f44c3eddb2a0548397bec4f29b882f371a18efa9c2628a88599b19c0c58c1886d0c25035367f02651a60fb6c3293faa1449b83d5 deviceinfo
|
||||
6e4c6704aaca2b157ca437d0c9575a7efb369934facc59d0e43cbfff103f2e98dca42a46ba332069f00cc8f1289355a2177cb2ca4627445d50be7daaad60d817 deviceinfo
|
||||
4b0197eacfeeb4b13f5abc26950f570ee762742547674ce10110ccea63eb46630a2e3b5f87e9c9a1f9deda21baf05bec248ab7a65656687ec94d296b5657dafa modules-initfs
|
||||
"
|
||||
@@ -18,10 +18,11 @@ deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1366"
|
||||
deviceinfo_screen_height="768"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
deviceinfo_cgpt_kpart_size="65536"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-peach-pit
|
||||
pkgdesc="Samsung Chromebook 2 (11.6 inch)"
|
||||
pkgver=7
|
||||
pkgver=8
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -14,7 +14,6 @@ depends="
|
||||
linux-postmarketos-exynos5
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
@@ -58,7 +57,7 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
18e829f0eddcc8a0e64eb5081afa324da060de98478ac17d6199c1cecb4d2e984212c8681e8c75b4552d4dd5bbffff2f60dc8be1884b6ef23daa58319d4274fc deviceinfo
|
||||
896b5fa32413195fe929e3a2e6be2c969b9af597da55bbdc318264c087c86b9754a265461be90e14747e5302a8873861fd3ad3b236b64a942a30edd3169405b2 deviceinfo
|
||||
e12a68f919182cb4e6812a5dd13fce8dc15266d2ac16aa5f0a31034f111cb403c020ebaaa4d94309f4baf2f71379327c57c08029e27c506d152695e9a2b04b2b modules-initfs
|
||||
e53ca475830930ecfc1fd537702e850e2abcb66fbed521cb6c3a2918d762649254bd0244ec93a47b20dfc593ec3afc9bdebdec1759a7bc96dcbe4800f40893da 90-tap-to-click.conf
|
||||
6fe67c8f2e09e3e37297eebaf2a86a32671923a5fd4d18e5aeb10e580fb998e4ddb4a691531a0c8f4b4e70c6f0f7e91008dd836ffca8026d59862c6e829fd996 Peach-Pit-I2S-MAX98090.conf
|
||||
|
||||
@@ -18,6 +18,7 @@ deviceinfo_screen_width="1366"
|
||||
deviceinfo_screen_height="768"
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
pkgname=device-google-sargo
|
||||
pkgdesc="Google Pixel 3a"
|
||||
pkgver=6
|
||||
pkgrel=2
|
||||
pkgrel=5
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -28,7 +28,10 @@ source="
|
||||
no-hexagonrpcd-on-suspend.sh
|
||||
q6voiced.conf
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-nonfree-firmware-openrc:nonfree_firmware_openrc
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
@@ -45,7 +48,6 @@ package() {
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Proprietary firmware blobs for the Google Pixel 3a"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
depends="
|
||||
firmware-google-sargo
|
||||
hexagonrpcd
|
||||
@@ -55,27 +57,27 @@ nonfree_firmware() {
|
||||
soc-qcom-sdm845-modem
|
||||
soc-qcom-sdm845-nonfree-firmware
|
||||
"
|
||||
# Enable HexagonRPCD by default, but not if the user installed this
|
||||
# package then disabled it.
|
||||
install="
|
||||
device-google-sargo-nonfree-firmware.post-install
|
||||
"
|
||||
|
||||
# The q6voiced configuration can only be used if the ADSP is brought up
|
||||
# via non-free firmware.
|
||||
install -Dm644 "$srcdir"/q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
|
||||
# Sensors depend on ADSP firmware and the sensors registry served over FastRPC.
|
||||
install -Dm644 "$srcdir"/hexagonrpcd-adsp-sensorspd.confd \
|
||||
"$subpkgdir"/etc/conf.d/hexagonrpcd-adsp-sensorspd
|
||||
|
||||
# Sensors depend on ADSP firmware and the sensors registry served over FastRPC.
|
||||
install -Dm644 "$srcdir"/81-libssc-google-sargo.rules \
|
||||
"$subpkgdir"/usr/lib/udev/rules.d/81-libssc-google-sargo.rules
|
||||
}
|
||||
|
||||
nonfree_firmware_openrc() {
|
||||
replaces="hexagonrpcd-openrc"
|
||||
install_if="$pkgname-nonfree-firmware=$pkgver-r$pkgrel openrc"
|
||||
# Enable HexagonRPCD by default, but not if the user installed this
|
||||
# package then disabled it.
|
||||
install="$subpkgname.post-install"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
# The FastRPC service is only enabled when non-free firmware is installed.
|
||||
install -Dm755 "$srcdir"/no-hexagonrpcd-on-suspend.sh \
|
||||
"$subpkgdir"/etc/elogind/system-sleep/no-hexagonrpcd-on-suspend.sh
|
||||
# The q6voiced configuration can only be used if the ADSP is brought up
|
||||
# via non-free firmware.
|
||||
install -Dm644 "$srcdir"/q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
# Sensors depend on ADSP firmware and the sensors registry served over FastRPC.
|
||||
install -Dm644 "$srcdir"/hexagonrpcd-adsp-sensorspd.confd \
|
||||
"$subpkgdir"/etc/conf.d/hexagonrpcd-adsp-sensorspd
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
|
||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-snow
|
||||
pkgdesc="Samsung Chromebook"
|
||||
pkgver=7
|
||||
pkgver=9
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -14,7 +14,6 @@ depends="
|
||||
linux-postmarketos-exynos5
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
@@ -56,7 +55,7 @@ sway() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
475bc214db10d233137e8d9a43bfc4ea0c58e8938e9536fddab6c1d57ed133f37aa3a8ffce196df876af17e7817ccf6894947deaaa624bf3c161298196d866f6 deviceinfo
|
||||
1ead9cae78b4e269d0bd54fc8da938171cb294125509049997a844b4769cd2419421f64bbcfa5fc4da991a77ed124155ec6613abe7a2ba8ba9e7e19440a801e5 deviceinfo
|
||||
e12a68f919182cb4e6812a5dd13fce8dc15266d2ac16aa5f0a31034f111cb403c020ebaaa4d94309f4baf2f71379327c57c08029e27c506d152695e9a2b04b2b modules-initfs
|
||||
8a8f593694528a9323ef4a0aff7e9c6ad45608957eb042d425663f682885c2f95eb01db4fe87b7c43a90de48f3e5f8b10cab4b13c547b5b0d31b924fcb083cad HiFi.conf
|
||||
b163535da7626e3866faa45768c3888f69f90c98d694650e16a7594a03eb91391e166931eb487901217d983bb2dc4e49b99a2a5531740a7d87f8f4f5c3d0cf59 Snow-I2S-MAX98090.conf
|
||||
|
||||
@@ -18,13 +18,14 @@ deviceinfo_screen_width="1366"
|
||||
deviceinfo_screen_height="768"
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
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"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_depthcharge_board="snow"
|
||||
deviceinfo_generate_depthcharge_image="true"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-trogdor
|
||||
pkgdesc="Google Trogdor Chromebooks"
|
||||
pkgver=3
|
||||
pkgver=4
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -44,6 +44,6 @@ nonfree_firmware() {
|
||||
|
||||
|
||||
sha512sums="
|
||||
0a40c43eda1dbb159da59c00b3a1e51fff299a29add210de4d9a16c060da523c358b6d821aa1dd16523bb912d00e1a1837193cce52415f329ac2e171d220f6d3 deviceinfo
|
||||
f94dcb175e49cbaadce524586ed1c3e3b0182e414c84c495a5585b49ed40ca6f7fa9c73544d19cbad236333f9fd997f150f836452b47a271f99b7b059972c4bc deviceinfo
|
||||
ef0257928f28aff25e6c625fabfd0942b01d4d86f1b523212ca825cf80f8b7a6c20ff17bfb02cb19f2a5d8787326ba22ad560a957c8d3c38b9ec70f1e16f9117 modules-initfs
|
||||
"
|
||||
@@ -20,7 +20,7 @@ deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_kernel_cmdline="console=null deferred_probe_timeout=30"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2 deferred_probe_timeout=30"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
# 128M kernel partition
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-veyron
|
||||
pkgdesc="Google Veyron Chromebooks"
|
||||
pkgver=6
|
||||
pkgver=7
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -53,6 +53,6 @@ nonfree_firmware() {
|
||||
|
||||
|
||||
sha512sums="
|
||||
851e0eb0b32d81a4aa2a63f7722f92bf221e49c1822a4fd179e997cd0e0231bb6f79c0b67ed12387890193617fd514862ac3aa6efacfc267e142acdd1f96fc1d deviceinfo
|
||||
abeebda841ae33d50008b891b4a29ccf4a7cf7be240b5913b701409e8621aa7210f685543b8ab7a9778b311359a197b4429af2b559716fa130d3af8447bef61d deviceinfo
|
||||
be3e804fa538d9d377c637094dcf95e503e8a156fa71676a9e78abc0e290595dfdaa70b5642df721ebcdd3daa04d14e0c61d9bab6f78cb1dbd669404abc3a56d modules-initfs
|
||||
"
|
||||
@@ -20,7 +20,7 @@ deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="24576"
|
||||
deviceinfo_cgpt_kpart_size="32768"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/lib/firmware/amdgpu
|
||||
@@ -0,0 +1,2 @@
|
||||
# DMC fw is required on newer GPUs to enable lower power states
|
||||
/lib/firmware/i915/*_dmc*
|
||||
@@ -4,8 +4,8 @@
|
||||
# Co-Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-x64cros
|
||||
pkgdesc="Google Chromebooks with x64 CPU"
|
||||
pkgver=8
|
||||
pkgrel=1
|
||||
pkgver=11
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="x86_64"
|
||||
@@ -15,7 +15,6 @@ depends="
|
||||
depthcharge-tools
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
systemd-boot
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
@@ -23,17 +22,27 @@ install="$pkgname.post-install $pkgname.post-upgrade"
|
||||
subpackages="
|
||||
$pkgname-kernel-lts:kernel_lts
|
||||
$pkgname-kernel-edge:kernel_edge
|
||||
$pkgname-firmware-intel:firmware_intel
|
||||
$pkgname-firmware-amd:firmware_amd
|
||||
"
|
||||
source="
|
||||
00-amdgpu-firmware.files
|
||||
00-i915-firmware.files
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
"
|
||||
source="deviceinfo modules-initfs"
|
||||
# TODO: package iwlwifi-7265D-29.ucode separetely, so we don't depend
|
||||
# on linux-firmware-other
|
||||
_pmb_recommends="
|
||||
amd-ucode
|
||||
intel-ucode
|
||||
linux-firmware-amdgpu
|
||||
linux-firmware-i915
|
||||
linux-firmware-intel
|
||||
linux-firmware-other
|
||||
linux-firmware-rtl_nic
|
||||
linux-firmware-rtw88
|
||||
oem-intel
|
||||
oem-amd
|
||||
"
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
@@ -55,7 +64,22 @@ kernel_lts() {
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
firmware_amd() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel linux-firmware-amdgpu"
|
||||
|
||||
install -Dm644 00-amdgpu-firmware.files \
|
||||
-t "$subpkgdir"/usr/share/mkinitfs/files-extra
|
||||
}
|
||||
firmware_intel() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel linux-firmware-i915"
|
||||
|
||||
install -Dm644 00-i915-firmware.files \
|
||||
-t "$subpkgdir"/usr/share/mkinitfs/files-extra
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6ab370ce8de6ce77d255ad347563afa8314bdde1d54ba51970de3b3739bb52098284beead99485e416c9af5c8b53811f5286c1cd561896480526a892f982bdad deviceinfo
|
||||
38c53d91a60d0402d4cc5428d65e1e8c26360c481c70b34593b1812c87241c32e91904a3bd31fbfe507f7fdb8b50c909eaad8c4c3a37ca962760567329f7f6ee 00-amdgpu-firmware.files
|
||||
c17f5c505e0e280a9e51ac1b4264e7703b744fd3831d75ce95f41be4755ae4ccd24b7ca09ba1e236df499a5e748c64a0d2054c9d55d8c8c713fa8c5646ed9a3c 00-i915-firmware.files
|
||||
514ff5c946633dccaa569fed51743c669ea9942af4dd891ad001ba08bba07fca92503e29304f3eb71c16bc2f2436e1879ff0bf56d99666e4dcf9635c8605da2e deviceinfo
|
||||
1b3bbfcdc6642488304653aef996dddf7a354e7279f2c735ac7aec404e598948423630fcaa2cac87e2c0aef033ecfc57a7a91154f9dac9a85411db7bad62e677 modules-initfs
|
||||
"
|
||||
@@ -14,13 +14,14 @@ deviceinfo_chassis="laptop"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_boot_filesystem="fat32"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
deviceinfo_cgpt_kpart_size="32768"
|
||||
deviceinfo_cgpt_kpart_size="65536"
|
||||
deviceinfo_depthcharge_board="amd64-generic"
|
||||
deviceinfo_generate_depthcharge_image="true"
|
||||
deviceinfo_generate_systemd_boot="true"
|
||||
@@ -4,13 +4,14 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-lenovo-21bx
|
||||
pkgdesc="Lenovo ThinkPad X13s"
|
||||
pkgver=10
|
||||
pkgrel=1
|
||||
pkgver=11
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck !strip"
|
||||
depends="
|
||||
alsa-ucm-conf
|
||||
bootmac
|
||||
firmware-lenovo-21bx
|
||||
libmbim-tools
|
||||
@@ -62,7 +63,7 @@ usbguard() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c3570f44cd0134fd7400a5467cfddb3c1877a771fda8006228d1b0fd81536171ece53bf7562fc0e11dcc1fd3c6830e324e0d5ad9fdc4e16b53107fa3a04004fb deviceinfo
|
||||
9cb08de5748b0339005a910cc0475ad344dc6e912e477c5bd6b370784af6309719524f8fa7a39e7565586e47968a35c344ea853cddd716cc3e1e483efaae7ff0 deviceinfo
|
||||
82f7719285434d8c7a5268ddc21d513bb3f3788eb3dd2df099e1c245add9d19719047b003a47edb077e095ebe09d9601b1312c001578e7dfa4ed61d72098ef74 firmware.files
|
||||
27705e998db262602b50004083fe160dbcde88e9fdcaeb43e3d1d79be0b7af371f84855bb93ba16ada3cf5fa8ff8da6ca159cda4b1de08fb54ac451c57169c57 modules-initfs
|
||||
52bbb9564ec713db5d46937701b121afe0c6c644fffe189a05766f491b4997b1bbc4c1f90229efb5764d795df8d40a57d4c840ee4b32d426e7a84520364b8bf5 pipewire.conf
|
||||
|
||||
@@ -15,7 +15,7 @@ deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_chassis="laptop"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_kernel_cmdline="console=null quiet clk_ignore_unused pd_ignore_unused arm64.nopauth"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2 quiet clk_ignore_unused pd_ignore_unused arm64.nopauth"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Sicelo <absicsz@gmail.com>
|
||||
# Co-Maintainer: Danct12 <danct12@disroot.org>
|
||||
pkgname=device-nokia-n900
|
||||
pkgver=29
|
||||
pkgrel=0
|
||||
pkgver=30
|
||||
pkgrel=1
|
||||
pkgdesc="Nokia N900"
|
||||
url="https://postmarketos.org"
|
||||
arch="armv7"
|
||||
@@ -22,13 +22,14 @@ depends="
|
||||
wl1251-cal-openrc
|
||||
"
|
||||
makedepends="devicepkg-dev u-boot-tools kbd kbd-bkeymaps"
|
||||
install="$pkgname.pre-upgrade $pkgname.post-install"
|
||||
install="$pkgname.post-install $pkgname.pre-upgrade"
|
||||
subpackages="
|
||||
$pkgname-x11
|
||||
$pkgname-xkeyboard-config:xkeyboard_config
|
||||
$pkgname-i3wm
|
||||
$pkgname-upower
|
||||
$pkgname-sxmo
|
||||
$pkgname-openrc
|
||||
"
|
||||
source="
|
||||
10-initfs-keymap.files
|
||||
@@ -206,6 +207,13 @@ upower() {
|
||||
"$subpkgdir"/etc/UPower/UPower.conf
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
install="$subpkgname.post-install"
|
||||
|
||||
mkdir -p "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6b475c12eca8563be48c562a1cb4ad8ca6a05d70fc54b21288b2dd7435a80a6f53351aa870db96d5bbecf1b1c5cb00dfe35f5066e6d3fd0ad0369e66aeef5a21 10-initfs-keymap.files
|
||||
4656d3b3ced0a86e2d6315c89322899f646a689e9cb64609aa8ad5a676b23d93706d8a37f3be6f6b12c6b1e8501b7d26ecafecf27322333850513a6805c61910 10-initfs-keymap.sh
|
||||
@@ -215,7 +223,7 @@ ff51909873160c2d4c6f0c0119b6d4a02751df29f571b8596b4bc8b04ce2541913c11a583b0e5dab
|
||||
67acc17a33bc75113300393b4a5bba15319014032407e774d079abf310368e75f4f697dbb4856ba2d2d8ea184b056bb33561f42918de3ee91ab6a77df89a133c asound.state.speakers
|
||||
3d55e34b95791636e44a5f41754f3d0de039dbba41f7a556d43a95c9e64afcfa930046b4b96b40020b6f196096ffba93514682927e32fa4488686fdd19c6da5a backlight-enable.sh
|
||||
e6bbac8de1a198ba716f44ade76606e1e0adcc574156b855ac41be5eb5308389d3277fd89cc34b119fbc33d9801ab9f79a6ff213392596bff40bc17e931c05ef device-nokia-n900.start
|
||||
2463008d270ed09342f15b51f24ea455bd884021f95397991b85616b6840a6608d91cd1fc43186094f5c3d1bd25e88c16aa9ead07b018aea3d93cd2359bba0b1 deviceinfo
|
||||
40aaeb44941a988ab8ec58d331bc6cd42c4a23c6b6e8fc302f9216a38b46baab38d0a0137606a5b7959a51326983c03d684615c5ba9c58b0e36314ec8c49cfbb deviceinfo
|
||||
f48b8dd7297d03008f73e1ecd55b77ace535ecb03f9bdf021123b96fb5f4fb491ff4c532e226b835c8118fa8d505cc4c635a2b604a3e42a162746021552a551c modules-initfs
|
||||
826a3790b49324c1e61c75b6c0ffc043a2a1d7c13a8c554fb5eae4977af47a1ca93d70ef8c783d712b953b70e18ae58fa4c6a49bf97263398a01a0c4f91ebc8f i3blocks.conf
|
||||
506accabcf9fb3e2a270228ea53fdcb57f51092d6e7126a631af8eed697cd882cc805b19cf255422284bec12c928b58219d173a4a790d784db5335a059b6bb4f i3wm.conf
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Enable acpid
|
||||
rc-update add acpid default
|
||||
# hwdrivers is required for acpid to 'see' all devices
|
||||
rc-update add hwdrivers boot
|
||||
# Enable ofono
|
||||
rc-update add ofono default
|
||||
# Disable swclock because rtc is working
|
||||
rc-update -q del swclock boot
|
||||
|
||||
exit 0
|
||||
@@ -5,13 +5,4 @@ for i in $(awk '{if($NF && ($1 !~ /^#/)) print $NF}' /etc/acpi.map); do
|
||||
ln -s /etc/acpi/handler.sh /etc/acpi/$i
|
||||
done
|
||||
|
||||
# Enable acpid
|
||||
rc-update add acpid default
|
||||
# hwdrivers is required for acpid to 'see' all devices
|
||||
rc-update add hwdrivers boot
|
||||
# Enable ofono
|
||||
rc-update add ofono default
|
||||
# Disable swclock because rtc is working
|
||||
rc-update -q del swclock boot
|
||||
|
||||
exit 0
|
||||
@@ -22,3 +22,4 @@ deviceinfo_swap_size_recommended="1024"
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="0xffff"
|
||||
deviceinfo_generate_legacy_uboot_initfs="true"
|
||||
deviceinfo_partition_type="msdos"
|
||||
@@ -4,7 +4,7 @@
|
||||
pkgname=device-oneplus-enchilada
|
||||
pkgdesc="OnePlus 6"
|
||||
pkgver=14
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -27,8 +27,8 @@ source="
|
||||
81-libssc-oneplus-enchilada.rules
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware-openrc:nonfree_firmware_openrc
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-nonfree-firmware-openrc:nonfree_firmware_openrc
|
||||
$pkgname-pmtest
|
||||
"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
pkgname=device-oneplus-fajita
|
||||
pkgdesc="OnePlus 6T"
|
||||
pkgver=14
|
||||
pkgrel=0
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -26,7 +26,11 @@ source="
|
||||
q6voiced.conf
|
||||
81-libssc-oneplus-fajita.rules
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-pmtest"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-nonfree-firmware-openrc:nonfree_firmware_openrc
|
||||
$pkgname-pmtest
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
@@ -47,12 +51,16 @@ nonfree_firmware() {
|
||||
soc-qcom-sdm845-nonfree-firmware
|
||||
soc-qcom-sdm845-modem
|
||||
"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
|
||||
install -Dm644 "$srcdir"/81-libssc-oneplus-fajita.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
||||
}
|
||||
|
||||
nonfree_firmware_openrc() {
|
||||
install_if="$pkgname-nonfree-firmware=$pkgver-r$pkgrel openrc"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
mkdir "$subpkgdir"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
|
||||
install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
install -Dm644 "$srcdir"/81-libssc-oneplus-fajita.rules -t "$subpkgdir"/usr/lib/udev/rules.d/
|
||||
install -Dm644 "$srcdir"/hexagonrpcd.confd "$subpkgdir"/etc/conf.d/hexagonrpcd-sdsp
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
Symlink
+1
@@ -0,0 +1 @@
|
||||
./device-oneplus-fajita-nonfree-firmware-openrc.post-install
|
||||
-1
@@ -1 +0,0 @@
|
||||
device-oneplus-fajita-nonfree-firmware.post-install
|
||||
@@ -3,7 +3,7 @@
|
||||
pkgname=device-pine64-pinebookpro
|
||||
pkgdesc="PINE64 Pinebook Pro"
|
||||
pkgver=16
|
||||
pkgrel=6
|
||||
pkgrel=7
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -19,13 +19,7 @@ depends="
|
||||
iw
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-elogind"
|
||||
install="
|
||||
$pkgname.post-install
|
||||
$pkgname.post-upgrade
|
||||
$pkgname-elogind.post-install
|
||||
$pkgname-elogind.post-upgrade
|
||||
"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-elogind $pkgname-openrc"
|
||||
source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
@@ -50,6 +44,7 @@ package() {
|
||||
|
||||
elogind() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel elogind"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
install -D -m644 "$srcdir"/enable-s2idle.conf \
|
||||
"$subpkgdir"/usr/lib/elogind/sleep.conf.d/enable-s2idle.conf
|
||||
}
|
||||
@@ -59,6 +54,14 @@ nonfree_firmware() {
|
||||
depends="linux-firmware-brcm linux-firmware-rockchip"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
|
||||
mkdir -p "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7b3cd3ff2af954d07e88cca043a9975e74236bb49454bbcff8eaed23d822560ba2200adc88373dc2a0e5f130b8f90fd1c522f7b25171325d8e41e75c4b7bfba5 deviceinfo
|
||||
6e3d97855a1f898db46b87ae1eb190d23d841fcb72332fcac4d11cd27c8f7d50eb8fd73007ed0447f106d19ff2e0fc1f34da1baf890e1465135dd692d65df2ba modules-initfs
|
||||
|
||||
File renamed without changes.
Loaded 100 of 574 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user