Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
234d57d512 | ||
|
|
4ad661057c | ||
|
|
4a46552bd5 | ||
|
|
663e7c3dfc |
No files matched your search
+10
-5
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh -e
|
||||
# Description: update a list of packages
|
||||
# Options: native slow
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
@@ -10,9 +13,12 @@ fi
|
||||
|
||||
git config --global --add safe.directory "$CI_PROJECT_DIR"
|
||||
git config --global user.name "postmarketOS CI"
|
||||
# The username for the bot associated with the access token
|
||||
# e.g. project_226_bot_bfa19b84bf7f559c8ff7438a01fd29b9
|
||||
git config --global user.email "$PMAPORTS_TOKEN_BOT@noreply.gitlab.postmarketos.org"
|
||||
# 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"
|
||||
|
||||
# Configure SSH key for signing
|
||||
mkdir -p ~/.ssh
|
||||
@@ -43,7 +49,7 @@ update_linux_next() {
|
||||
# shellcheck source=/dev/null
|
||||
pkgver=$(. device/testing/linux-next/APKBUILD; echo "$pkgver")
|
||||
|
||||
curl -s https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/refs/tags/ | grep -oE "<a href='.*'>(.*)</a>.*\.tar\.gz</a>" | awk -F'[<>]' '{print $3}' > /tmp/tags
|
||||
curl -s "https://gitlab.com/linux-kernel/linux-next/-/tags?format=atom" | grep -oP "(?<=<title>)[^<]+" | tail -n +2 > /tmp/tags
|
||||
|
||||
latest=$(grep -v "v" < /tmp/tags | head -n1)
|
||||
if [ -z "$latest" ]; then
|
||||
@@ -71,7 +77,6 @@ update_linux_next() {
|
||||
|
||||
echo "Updating linux-next from $pkgver to $new_pkgver..."
|
||||
sed -i -e "s/pkgver=$pkgver/pkgver=$new_pkgver/" device/testing/linux-next/APKBUILD
|
||||
sed -i -e "s/^pkgrel=.*/pkgrel=0/" device/testing/linux-next/APKBUILD
|
||||
|
||||
# Update the checksums
|
||||
pmbootstrap checksum linux-next
|
||||
|
||||
+1
-6
@@ -8,12 +8,7 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
# In .gitlab-ci.yml currently .ci/pytest.sh runs before this and
|
||||
# already downloads and runs install_pmbootstrap.sh.
|
||||
if ! [ -e install_pmbootstrap.sh ]; then
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
fi
|
||||
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
|
||||
@@ -87,11 +87,4 @@ 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,4 +23,9 @@ if __name__ == "__main__":
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
common.run_pmbootstrap(["-q", "lint"] + packages)
|
||||
result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True)
|
||||
|
||||
if len(result) > 0:
|
||||
print("Linting issues found:")
|
||||
print(result)
|
||||
sys.exit(1)
|
||||
@@ -55,6 +55,14 @@ 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()
|
||||
@@ -93,49 +101,15 @@ 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)
|
||||
|
||||
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
|
||||
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"])
|
||||
# To fix the ERROR: Chroot 'native' is for the 'edge' channel, but you are on the
|
||||
# 'systemd-edge' channel. Run 'pmbootstrap zap' to delete your chroots and try again.
|
||||
# To do this automatically, run 'pmbootstrap config auto_zap_misconfigured_chroots yes'.
|
||||
common.run_pmbootstrap(["config", "auto_zap_misconfigured_chroots", "yes"])
|
||||
|
||||
# filter out packages that can't be built for arch
|
||||
# (Iterate over copy of `systemd_pkgs`, because we modify it in this loop)
|
||||
for package in systemd_pkgs.copy():
|
||||
apkbuild_path = pmb.helpers.pmaports.find(package, True, True, with_extra_repos="enabled")
|
||||
apkbuild = pmb.parse._apkbuild.apkbuild(pathlib.Path(apkbuild_path, "APKBUILD"))
|
||||
if not pmb.helpers.pmaports.check_arches(apkbuild["arch"], arch):
|
||||
print(f"(extra-repos/systemd) {package}: not enabled for {arch}, skipping")
|
||||
systemd_pkgs.remove(package)
|
||||
|
||||
# No packages: skip build
|
||||
if len(systemd_pkgs) == 0:
|
||||
print(f"no packages changed, which can be built for {arch}")
|
||||
|
||||
else:
|
||||
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)
|
||||
build_strict(systemd_pkgs, arch)
|
||||
+7
-3
@@ -44,10 +44,14 @@ def commit_message_has_string(needle):
|
||||
return needle in run_git(["show", "-s", "--format=full", "HEAD"])
|
||||
|
||||
|
||||
def run_pmbootstrap(parameters):
|
||||
def run_pmbootstrap(parameters, output_return=False):
|
||||
""" Run pmbootstrap with the pmaports dir as --aports """
|
||||
cmd = ["pmbootstrap", "--aports", get_pmaports_dir()] + parameters
|
||||
subprocess.run(cmd, universal_newlines=True, check=True)
|
||||
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
|
||||
|
||||
|
||||
def get_upstream_branch():
|
||||
@@ -96,7 +100,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}: {commit_upstream}")
|
||||
print(f"commit {branch_upstream}: f{commit_upstream}")
|
||||
|
||||
# Check if we are HEAD on the upstream branch
|
||||
if commit_head == commit_upstream:
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh pytest
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
+3
-1
@@ -21,10 +21,12 @@ sh_files="
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
./main/postmarketos-mkinitfs-hook-debug-shell/setup_usb_storage.sh
|
||||
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
||||
./main/ttyescape/*.post-install
|
||||
./main/unl0kr/unlock.sh
|
||||
./device/community/soc-qcom/call_audio_idle_suspend_workaround.sh
|
||||
./main/msm-firmware-loader/*.post-install
|
||||
./device/community/soc-qcom-sdm845/call_audio_idle_suspend_workaround.sh
|
||||
|
||||
$(find . -path './main/postmarketos-ui-*/*.sh')
|
||||
$(find . -path './main/postmarketos-ui-*/*.pre-install')
|
||||
|
||||
@@ -14,6 +14,9 @@ import pmb.parse._apkbuild
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path, pkgrepo_iglob, pkgrepo_relative_path
|
||||
from pmb.core.arch import Arch
|
||||
|
||||
# Cache for codeowners_parse
|
||||
codeowners_parsed = {}
|
||||
|
||||
# Don't complain if these nicknames are the only maintainers of an APKBUILD,
|
||||
# because they are actually a group of people
|
||||
gitlab_groups = [
|
||||
@@ -44,7 +47,8 @@ def test_aports_device():
|
||||
if "postmarketos-base" == dependency or "postmarketos-base>" in dependency:
|
||||
depend_flag = True
|
||||
if not depend_flag:
|
||||
raise RuntimeError(f"Missing 'postmarketos-base' in depends of {path}")
|
||||
raise RuntimeError("Missing 'postmarketos-base' in depends of " +
|
||||
path)
|
||||
|
||||
# Depends: Must not have specific packages
|
||||
for depend in apkbuild["depends"]:
|
||||
@@ -57,7 +61,7 @@ def test_aports_device():
|
||||
raise RuntimeError("wrong architecture, please change to arch=\""
|
||||
f"{deviceinfo.arch}\": {path}")
|
||||
if "!archcheck" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"!archcheck missing in options= line: {path}")
|
||||
raise RuntimeError("!archcheck missing in options= line: " + path)
|
||||
|
||||
|
||||
def test_aports_device_kernel():
|
||||
@@ -99,12 +103,72 @@ def test_aports_device_kernel():
|
||||
f" <https://postmarketos.org/devicepkg>): {path}")
|
||||
|
||||
|
||||
def codeowners_parse():
|
||||
global codeowners_parsed
|
||||
|
||||
pattern_prev = None
|
||||
aports = pkgrepo_default_path()
|
||||
|
||||
with open(aports / "CODEOWNERS") as h:
|
||||
for line in h:
|
||||
line = line.rstrip()
|
||||
if not line or line.startswith("#"):
|
||||
continue
|
||||
|
||||
pattern_nicks = line.split()
|
||||
assert len(pattern_nicks) > 1, f"CODEOWNERS line without nicks: {line}"
|
||||
|
||||
pattern = pattern_nicks[0]
|
||||
if pattern.endswith("/"):
|
||||
pattern += "*"
|
||||
|
||||
nicks = []
|
||||
for word in pattern_nicks[1:]:
|
||||
if word.startswith("@"):
|
||||
nicks += [word]
|
||||
codeowners_parsed[pattern] = nicks
|
||||
|
||||
if pattern_prev:
|
||||
assert pattern_prev <= pattern, "CODEOWNERS: please order entries alphabetically"
|
||||
pattern_prev = pattern
|
||||
|
||||
|
||||
def require_enough_codeowners_entries(path, maintainers):
|
||||
"""
|
||||
:param path: full path to an APKBUILD (e.g. /home/user/…/APKBUILD)
|
||||
:param maintainers: list of one or more maintainers
|
||||
"""
|
||||
|
||||
_, path = pkgrepo_relative_path(path)
|
||||
|
||||
nicks = set()
|
||||
for pattern, pattern_nicks in codeowners_parsed.items():
|
||||
if fnmatch.fnmatch(path, pattern):
|
||||
for nick in pattern_nicks:
|
||||
nicks.add(nick)
|
||||
|
||||
print(f"{path}:")
|
||||
print(f" APKBUILD: {maintainers}")
|
||||
print(f" CODEOWNERS: {nicks}")
|
||||
|
||||
if len(nicks) < len(maintainers):
|
||||
for nick in nicks:
|
||||
if nick in gitlab_groups:
|
||||
print(f" -> {nick} is a group")
|
||||
return
|
||||
|
||||
assert len(nicks) >= len(maintainers), \
|
||||
f"{path}: make sure that each maintainer is listed in CODEOWNERS!"
|
||||
|
||||
|
||||
# @pytest.mark.xfail # Not all aports have been updated yet
|
||||
def test_aports_maintained():
|
||||
"""
|
||||
Ensure that aports in /device/{main,community} have "Maintainer:" and
|
||||
"Co-Maintainer:" (only required for main) listed in their APKBUILDs.
|
||||
"Co-Maintainer:" (only required for main) listed in their APKBUILDs. Also
|
||||
check that at least as many are listed in CODEOWNERS.
|
||||
"""
|
||||
codeowners_parse()
|
||||
|
||||
for path in pkgrepo_iglob("device/main/*/APKBUILD"):
|
||||
if 'firmware-' in path.parent.name:
|
||||
@@ -112,12 +176,14 @@ def test_aports_maintained():
|
||||
maintainers = pmb.parse._apkbuild.maintainers(path)
|
||||
assert maintainers and len(maintainers) >= 2, \
|
||||
f"{path} in main needs at least 1 Maintainer and 1 Co-Maintainer"
|
||||
require_enough_codeowners_entries(path, maintainers)
|
||||
|
||||
for path in pkgrepo_iglob("device/community/*/APKBUILD"):
|
||||
if 'firmware-' in path.parent.name:
|
||||
continue
|
||||
maintainers = pmb.parse._apkbuild.maintainers(path)
|
||||
assert maintainers, f"{path} in community needs at least 1 Maintainer"
|
||||
require_enough_codeowners_entries(path, maintainers)
|
||||
|
||||
|
||||
def test_aports_unmaintained():
|
||||
|
||||
@@ -36,7 +36,7 @@ def test_deviceinfo():
|
||||
# Iterate over all devices
|
||||
last_exception = None
|
||||
count = 0
|
||||
pattern = re.compile("^deviceinfo_[a-zA-Z0-9_]*=\".*\"(\\s*# .*)?$")
|
||||
pattern = re.compile("^deviceinfo_[a-zA-Z0-9_]*=\".*\"$")
|
||||
|
||||
for folder in pkgrepo_iglob("device/*/device-*"):
|
||||
device = folder.name.split("-", 1)[1]
|
||||
@@ -63,8 +63,8 @@ def test_deviceinfo():
|
||||
# Check line against regex (can't use multiple lines etc.)
|
||||
if not pattern.match(line) or line.endswith("\\\""):
|
||||
raise RuntimeError("Line looks invalid, maybe missing"
|
||||
" quotes/multi-line string/malformed"
|
||||
f" inline comment? {line}")
|
||||
" quotes/multi-line string/comment next"
|
||||
f" to line instead of above? {line}")
|
||||
|
||||
# Successful deviceinfo parsing / obsolete options
|
||||
info = pmb.parse.deviceinfo(device)
|
||||
|
||||
@@ -10,7 +10,6 @@ expected_directories = [
|
||||
"device/community",
|
||||
"device/main",
|
||||
"device/testing",
|
||||
"extra-repos/systemd",
|
||||
"main",
|
||||
"modem",
|
||||
"non-free",
|
||||
|
||||
@@ -25,7 +25,6 @@ def test_aports_firmware():
|
||||
"firmware-samsung-maguro", # Depends on firmware-aosp-broadcom-wlan
|
||||
"firmware-xiaomi-ferrari", # Depends on soc-qcom-msm8916
|
||||
"firmware-xiaomi-willow", # Doesn't build, source link is dead (pma#1212)
|
||||
"firmware-samsung-i9105p", # Depends on firmware-aosp-broadcom-wlan
|
||||
]
|
||||
|
||||
for path in pkgrepo_iglob("**/firmware-*/APKBUILD", recursive=True):
|
||||
|
||||
@@ -23,9 +23,6 @@ def test_aports_kernel():
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
aport_name = os.path.basename(os.path.dirname(path))
|
||||
|
||||
if aport_name == "linux-pam":
|
||||
continue # This package isn't a linux kernel!
|
||||
|
||||
if "pmb:cross-native" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"{aport_name}: \"pmb:cross-native\" missing in"
|
||||
" options= line")
|
||||
|
||||
@@ -12,8 +12,3 @@ indent_style = tab
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
# Forked from Alpine
|
||||
[extra-repos/systemd/networkmanager/networkmanager.rules]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
+2
-12
@@ -65,7 +65,7 @@ is_symlink() {
|
||||
# available in git tree and checksums are correct.
|
||||
check_local_sources() {
|
||||
local apkbuild="$1"
|
||||
local startdir="$2"
|
||||
local startdir="${apkbuild%/*}"
|
||||
local status=0
|
||||
local checksum_act checksum_exp content filename line sources
|
||||
|
||||
@@ -109,21 +109,11 @@ check_file_size() {
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
[ -f "$_staged" ] && rm "$_staged"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
for apkbuild in $(changed_files '**/APKBUILD'); do
|
||||
_staged="$(mktemp)"
|
||||
git show ":$apkbuild" >"$_staged"
|
||||
check_local_sources "$_staged" "${apkbuild%/*}"
|
||||
cleanup
|
||||
check_local_sources "$apkbuild"
|
||||
done
|
||||
|
||||
for path in $(changed_files); do
|
||||
check_file_size "$path"
|
||||
done
|
||||
|
||||
trap - EXIT
|
||||
+4
-164
@@ -8,14 +8,8 @@ after_script:
|
||||
- .ci/lib/move_logs.sh $CI_PROJECT_DIR
|
||||
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:
|
||||
@@ -27,61 +21,14 @@ workflow:
|
||||
# Run scheduled pipeline for autoupdate or manually triggered pipeline
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
|
||||
|
||||
# device documentation
|
||||
wiki:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: &mr_rule $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
changes:
|
||||
- .ci/**/*
|
||||
- .gitlab-ci.yml
|
||||
- device/*/device-*/*
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/wiki.sh
|
||||
|
||||
# testcases linting
|
||||
ruff:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- .ci/*
|
||||
- .ci/*/*
|
||||
- .gitlab-ci.yml
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/ruff.sh
|
||||
|
||||
# shellcheck and various grep checks
|
||||
shellcheck-grep:
|
||||
stage: lint
|
||||
image: alpine:edge
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/shellcheck.sh
|
||||
- .ci/grep.sh
|
||||
- .ci/codeowners.sh
|
||||
|
||||
editor-config:
|
||||
stage: lint
|
||||
image: alpine:edge
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/ec.sh
|
||||
|
||||
# aports checks (generic)
|
||||
pytest-commits:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/pytest.sh
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/commits.sh
|
||||
artifacts:
|
||||
when: on_failure
|
||||
@@ -90,110 +37,3 @@ pytest-commits:
|
||||
- log_testsuite_pmaports.txt
|
||||
- pmbootstrap.cfg
|
||||
expire_in: 1 week
|
||||
|
||||
# APKBUILD linting
|
||||
aport-lint:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/apkbuild-lint.sh
|
||||
allow_failure: true
|
||||
|
||||
# kernel kconfig check
|
||||
kernel-kconfig:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- kconfigcheck.toml
|
||||
allow_failure: true
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- device/*/linux-*/config-*
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/kconfig.sh
|
||||
|
||||
# MR settings
|
||||
# (Checks for "Allow commits from members who can merge to the target branch")
|
||||
mr-settings:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
before_script:
|
||||
- *global_before_scripts
|
||||
- apk -q add python3
|
||||
script:
|
||||
- wget -q "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/check_mr_settings.py"
|
||||
- python3 ./check_mr_settings.py
|
||||
|
||||
# build changed aports
|
||||
.build:
|
||||
stage: build
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
before_script:
|
||||
- *global_before_scripts
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
after_script:
|
||||
- cp -r /home/pmos/.local/var/pmbootstrap/packages/ packages/ || true
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- packages/
|
||||
timeout: 10 h
|
||||
|
||||
build-x86_64:
|
||||
extends: .build
|
||||
script:
|
||||
- .ci/build-x86_64.sh
|
||||
|
||||
build-x86:
|
||||
extends: .build
|
||||
script:
|
||||
- .ci/build-x86.sh
|
||||
|
||||
build-aarch64:
|
||||
extends: .build
|
||||
tags: [arm64]
|
||||
script:
|
||||
- .ci/build-aarch64.sh
|
||||
|
||||
build-armv7:
|
||||
extends: .build
|
||||
tags: [qemu]
|
||||
script:
|
||||
- .ci/build-armv7.sh
|
||||
|
||||
build-armhf:
|
||||
extends: .build
|
||||
tags: [qemu]
|
||||
script:
|
||||
- .ci/build-armhf.sh
|
||||
|
||||
build-riscv64:
|
||||
extends: .build
|
||||
tags: [qemu]
|
||||
script:
|
||||
- .ci/build-riscv64.sh
|
||||
|
||||
auto-update:
|
||||
stage: autoupdate
|
||||
rules:
|
||||
# This variable is set in the scheduled pipeline configuration. It should be a space separated list of
|
||||
# package names to update.
|
||||
- if: $AUTOUPDATE_PACKAGES != null && $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
|
||||
before_script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
script:
|
||||
- .ci/autoupdate.sh "$AUTOUPDATE_PACKAGES"
|
||||
after_script:
|
||||
- .ci/lib/move_logs.sh $CI_PROJECT_DIR
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- log.txt
|
||||
- log_testsuite_pmaports.txt
|
||||
- pmbootstrap.cfg
|
||||
@@ -27,8 +27,7 @@
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v24.12`
|
||||
* [ ] `v24.06` (supported until 2025-01-23)
|
||||
* [ ] `v24.06`
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
@@ -39,9 +38,6 @@
|
||||
* [ ] Plasma Mobile
|
||||
* [ ] Sxmo (Wayland/Sway) **Please post the output of `sxmo_version.sh`**
|
||||
* [ ] Other: **Please fill out**
|
||||
### Which init system are you using?
|
||||
* [ ] OpenRC
|
||||
* [ ] systemd
|
||||
### How did you get postmarketOS image?
|
||||
* [ ] from https://images.postmarketos.org
|
||||
* [ ] I built it using pmbootstrap
|
||||
|
||||
+8
-4
@@ -1,10 +1,14 @@
|
||||
{
|
||||
"subject_format": {
|
||||
"pass": [
|
||||
"^(([a-z]+\\/\\)?\\([a-z\\-0-9*{}]+),?)+: [a-z][A-Za-z\\/\\-0-9*{}\\.,_&:=' ]+( \\(MR \\d+\\)|)$",
|
||||
"^CI: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\.,_ ]+( \\(MR \\d+\\)|)$",
|
||||
"^mrhlpr.json: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\.,_ ]+( \\(MR \\d+\\)|)$",
|
||||
"^pmaports.cfg: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\.,_ ]+( \\(MR \\d+\\)|)$"
|
||||
"^(([a-z]+\\/[a-z\\-0-9*{}]+),?)+: [A-Za-z\\/\\-0-9*{}\\(\\)\\.,_&:=' ]+( \\(MR \\d+\\)|)$",
|
||||
"^CI: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$",
|
||||
"^mrhlpr.json: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$",
|
||||
"^pmaports.cfg: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$"
|
||||
],
|
||||
"unknown": [
|
||||
"^[a-z-0-9_.*{}\\/]+: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\(\\)\\.,_ ]+( \\(MR \\d+\\)|)$"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
https://postmarketos.org/funding.json
|
||||
+7
-26
@@ -31,47 +31,35 @@ device/*/*-pine64-pinephonepro/ @PsychoGame
|
||||
device/*/*-pine64-rockpro64/ @PureTryOut
|
||||
device/*/*-purism-librem5/ @craftyguy @alistair23 @Newbyte
|
||||
device/*/*-qcom-msm8916/ @Minecrell @TravMurav
|
||||
device/*/*-qcom-msm8953/ @barni2000 @alikates @vipaoL @jiaxyga
|
||||
device/*/*-qcom-sdm670/ @flamingradian
|
||||
device/*/*-qcom-sdm845/ @sdm845-mainline
|
||||
device/*/*-qcom-sm7150/ @Adrian @jiaxyga @ungeskriptet
|
||||
device/*/*-qcom-sm8250/ @jianhua
|
||||
device/*/*-qcom/ @calebccff
|
||||
device/*/*-qcom-sm6350/ @z3ntu
|
||||
device/*/*-samsung-a3/ @Mis012 @TravMurav @Minecrell
|
||||
device/*/*-samsung-a5/ @Minecrell @minlexx
|
||||
device/*/*-samsung-a51/ @manoedinata
|
||||
device/*/*-samsung-e7/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-espresso10/ @MightyM17
|
||||
device/*/*-samsung-espresso7/ @MightyM17 @antoni.aloytorrens
|
||||
device/*/*-samsung-fortuna/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-fortunaltezt/ @bolilingmeng89006
|
||||
device/*/*-samsung-grandmax/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-gt510/ @TravMurav
|
||||
device/*/*-samsung-gt58/ @TravMurav
|
||||
device/*/*-samsung-j3ltetw/ @bolilingmeng89006
|
||||
device/*/*-samsung-j4lte/ @manoedinata
|
||||
device/*/*-samsung-j5/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-j5x/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-rossa/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/*-samsung-serranove/ @Minecrell
|
||||
device/*/*-tolino-shine2hd/ @akemnade
|
||||
device/*/*-videostrong-kii-pro/ @funderscore
|
||||
device/*/*-wileyfox-crackling/ @TravMurav @Minecrell
|
||||
device/*/*-xiaomi-beryllium/ @joelselvaraj
|
||||
device/*/*-xiaomi-daisy/ @joelselvaraj @alikates
|
||||
device/*/*-xiaomi-davinci/ @Adrian @ArianK16a
|
||||
device/*/*-xiaomi-elish/ @jianhua
|
||||
device/*/*-xiaomi-markw/ @vipaoL
|
||||
device/*/*-xiaomi-mido/ @barni2000
|
||||
device/*/*-xiaomi-scorpio/ @Tooniis
|
||||
device/*/*-xiaomi-surya/ @jiaxyga @ungeskriptet
|
||||
device/*/*-xiaomi-tissot/ @jiaxyga @barni2000
|
||||
device/*/*-xiaomi-vince/ @M0Rf30
|
||||
device/*/*-xiaomi-wt88047/ @Minecrell
|
||||
device/*/*-xiaomi-ysl/ @barni2000
|
||||
device/*/alsa-ucm-conf-cros/ @WeirdTreeThing
|
||||
device/*/alsa-ucm-conf-qcom-sdm670/ @flamingradian
|
||||
device/*/device-apple-n61/ @JustSoup321
|
||||
device/*/device-fairphone-*/ @z3ntu
|
||||
device/*/device-generic-x86_64/ @craftyguy @ollieparanoid
|
||||
device/*/device-google-nyan-big/ @jenneron
|
||||
device/*/device-google-nyan-blaze/ @jenneron
|
||||
@@ -91,21 +79,19 @@ device/*/device-postmarketos-trailblazer/ @calebccff
|
||||
device/*/device-qcom-msm8909/ @wonderfulShrineMaidenOfParadise
|
||||
device/*/device-qemu-aarch64/ @Minecrell @ollieparanoid
|
||||
device/*/device-qemu-amd64/ @Minecrell @ollieparanoid
|
||||
device/*/device-qemu-riscv64/ @Minecrell
|
||||
device/*/device-qemu-riscv64/ @Minecrell @z3ntu
|
||||
device/*/device-qualcomm-sdm845/ @calebccff
|
||||
device/*/device-raspberry-pi3/ @fossdd
|
||||
device/*/device-samsung-chagallwifi/ @Grimler
|
||||
device/*/device-samsung-coreprimevelte/ @legolivesmatter @balejk
|
||||
device/*/device-samsung-j5y17lte/ @andrisas
|
||||
device/*/device-samsung-j5y17lte/ @andrisas
|
||||
device/*/device-samsung-klimtlte/ @Grimler
|
||||
device/*/device-samsung-lt01/ @knuxify
|
||||
device/*/device-samsung-m0/ @Newbyte
|
||||
device/*/device-samsung-manta/ @jenneron @alexmrqt
|
||||
device/*/device-shift-axolotl/ @amartinz @calebccff @dylanvanassche
|
||||
device/*/device-solidrun-cubox/ @longnoserob
|
||||
device/*/firmware-google-sargo/ @flamingradian
|
||||
device/*/firmware-google-veyron-brcm/ @jenneron
|
||||
device/*/firmware-motorola-osprey/ @Minecrell
|
||||
device/*/firmware-odroid-xu4/ @Grimler
|
||||
device/*/firmware-oneplus-sdm845/ @calebccff
|
||||
device/*/firmware-powervr-gx6250/ @jenneron
|
||||
@@ -116,16 +102,13 @@ device/*/linux-huawei-plank/ @gtrxAC
|
||||
device/*/linux-next/ @calebccff
|
||||
device/*/linux-postmarketos-allwinner/ @Arnavion @PsychoGame
|
||||
device/*/linux-postmarketos-amlogic/ @funderscore @exkc
|
||||
device/*/linux-postmarketos-apple/ @JustSoup321
|
||||
device/*/linux-postmarketos-exynos4/ @Newbyte @Grimler @knuxify
|
||||
device/*/linux-postmarketos-exynos5/ @jenneron @Grimler
|
||||
device/*/linux-postmarketos-grate/ @clamor-s @jenneron @jethrob
|
||||
device/*/linux-postmarketos-imx-ereader/ @akemnade
|
||||
device/*/linux-postmarketos-marvell/ @longnoserob @exkc
|
||||
device/*/linux-postmarketos-mediatek-mt8173/ @jenneron @adamthiede
|
||||
device/*/linux-postmarketos-mediatek-mt8183/ @jenneron @binarycraft
|
||||
device/*/linux-postmarketos-omap/ @MightyM17 @Sicelo
|
||||
device/*/linux-postmarketos-qcom-laptop/ @craftyguy @calebccff
|
||||
device/*/linux-postmarketos-qcom-msm8939/ @Newbyte
|
||||
device/*/linux-postmarketos-qcom-msm8953/ @M0Rf30 @Ultra-azu @barni2000
|
||||
device/*/linux-postmarketos-qcom-msm8996/ @Tooniis
|
||||
@@ -134,7 +117,7 @@ device/*/linux-postmarketos-rockchip/ @QC8086
|
||||
device/*/linux-postmarketos-stericsson/ @Newbyte
|
||||
device/*/linux-samsung-chagallwifi/ @Grimler
|
||||
device/*/linux-samsung-coreprimevelte/ @legolivesmatter @balejk
|
||||
device/*/linux-samsung-j5y17lte/ @andrisas
|
||||
device/*/linux-samsung-j5y17lte/ @andrisas
|
||||
device/*/linux-samsung-klimtlte/ @Grimler
|
||||
device/*/oem-amd/ @craftyguy
|
||||
device/*/oem-intel/ @craftyguy
|
||||
@@ -149,12 +132,10 @@ device/*/u-boot-librem5/ @craftyguy @alistair23 @Newbyte
|
||||
device/*/u-boot-pinebookpro/ @QC8086
|
||||
device/*/u-boot-pinephone/ @Arnavion @PsychoGame
|
||||
device/*/wl1251-cal/ @Danct12
|
||||
main/postmarketos*gnome*/ @pabloyoyoista @Newbyte @fossdd
|
||||
main/postmarketos*gnome*/ @pabloyoyoista @Newbyte
|
||||
main/postmarketos-initramfs/ @calebccff @craftyguy
|
||||
main/postmarketos-ui-i3wm/ @fossdd
|
||||
main/postmarketos-ui-phosh/ @pabloyoyoista @Newbyte @fossdd
|
||||
main/postmarketos-ui-plasma-bigscreen/ @PureTryOut
|
||||
main/postmarketos-ui-plasma-desktop/ @PureTryOut
|
||||
main/postmarketos-ui-phosh/ @pabloyoyoista @Newbyte
|
||||
main/postmarketos-ui-plasma-mobile/ @PureTryOut
|
||||
main/shutdown-clear-rtc-wakealarm/ @Arnavion
|
||||
main/ttyescape/ @calebccff
|
||||
@@ -1,8 +1,4 @@
|
||||
# postmarketOS aports repository
|
||||
|
||||
This repository contains the APKBUILD files for postmarketOS-specific packages, along with the required patches and scripts, if any.
|
||||
|
||||
There are many more packages defined in the [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/) on which these packages depend.
|
||||
# postmarketOS aports
|
||||
|
||||
Helpful resources:
|
||||
* [How to create a package](https://wiki.postmarketos.org/wiki/Create_a_package)
|
||||
|
||||
+1
-7
@@ -8,14 +8,8 @@ branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v24.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v24.12
|
||||
branch_aports=3.21-stable
|
||||
mirrordir_alpine=v3.21
|
||||
|
||||
[v24.06]
|
||||
description=Old release (unsupported)
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v24.06
|
||||
branch_aports=3.20-stable
|
||||
mirrordir_alpine=v3.20
|
||||
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.37.0
|
||||
pkgrel=14
|
||||
pkgver=1.36.1
|
||||
pkgrel=32
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8f1f521eceb24a5f66e18e022b1151e96b40378051aaed911dc22e68dbffc5998c8f2bac3935423371c7e707f8931e97873c91c39d56dc2e34292567b3caceaf busybox-static-1.37.0-r14-aarch64-edge.apk
|
||||
88f07677919711bb577f60e1861f4fa555168a8703a0a3b904550e24d4045135bb0296e00464899fc6231df07db09bb11f1bc81cdf593a71a8f74dfc3333c29e busybox-static-1.36.1-r32-aarch64-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.37.0
|
||||
pkgrel=14
|
||||
pkgver=1.36.1
|
||||
pkgrel=32
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ce7dfd41a149faed98ae5ae08695223b57e8104a47c9c4c0e956a8c7cbd7fbc6b53b247f2c0f0633d72aa0aba8688f6ecfdd9784722b655f3c29dc1a2557f3e1 busybox-static-1.37.0-r14-armhf-edge.apk
|
||||
b0985e2f62df8f1d4e1b7a1206dc3e462df1e6b2a8aae662e57cc497ca3f474f37cc952de0d3bbaad6532d569bf540f17ad4eccc9cabfdc3c9f95f8feaf08049 busybox-static-1.36.1-r32-armhf-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.37.0
|
||||
pkgrel=14
|
||||
pkgver=1.36.1
|
||||
pkgrel=32
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2f7003d0de894299a0260efd97bddfabd8d14d0e4b624445a77367036ad33c7ad65a85ee758969e671599ded5ee5674bda755c570ca4d9e95bba9c02b5788b8f busybox-static-1.37.0-r14-armv7-edge.apk
|
||||
f383286e58183232b41a0d299528734cb29b11e51112eab1fe513322a269a2cdf90a1341d7e329ed7cd58e2d158e3a80bc3a5290ef93de2b28aaf7a25b78bfd7 busybox-static-1.36.1-r32-armv7-edge.apk
|
||||
"
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
pkgname=ccache-cross-symlinks
|
||||
pkgver=3
|
||||
pkgrel=1
|
||||
pkgrel=0
|
||||
pkgdesc="Enable ccache for cross-compilers with symlinks"
|
||||
url="https://ccache.samba.org/"
|
||||
arch="noarch"
|
||||
@@ -15,7 +15,7 @@ options="!check"
|
||||
|
||||
package() {
|
||||
# Keep in sync with pmb.config.build_device_architectures
|
||||
local _archs="armhf armv7 aarch64 x86_64 x86 riscv64"
|
||||
local _archs="armhf armv7 aarch64 x86_64 x86"
|
||||
|
||||
local _bins="c++ cc cpp g++ gcc clang clang++"
|
||||
mkdir -p "$pkgdir/usr/lib/ccache/bin"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# version is implemented as simple shell wrappers.
|
||||
|
||||
pkgname=crossdirect
|
||||
pkgver=5.2.0
|
||||
pkgver=5.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Wrappers to launch native cross compilers in foreign chroots"
|
||||
url="https://postmarketOS.org"
|
||||
@@ -31,7 +31,7 @@ source="cargo.sh crossdirect.c rustc.sh rust-qemu-linker.sh"
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
# Architectures and binaries
|
||||
_archs="x86_64 armhf armv7 aarch64 riscv64"
|
||||
_archs="x86_64 armhf armv7 aarch64"
|
||||
for _arch in $_archs; do
|
||||
[ "$_arch" == "$CARCH" ] && continue
|
||||
_hostspec="$(arch_to_hostspec $_arch)"
|
||||
@@ -48,7 +48,7 @@ build() {
|
||||
|
||||
package() {
|
||||
# Architectures and binaries
|
||||
_archs="x86_64 armhf armv7 aarch64 riscv64"
|
||||
_archs="x86_64 armhf armv7 aarch64"
|
||||
_bins="c++ cc cpp g++ gcc clang clang++"
|
||||
|
||||
# Rust wrappers
|
||||
@@ -82,7 +82,7 @@ package() {
|
||||
|
||||
sha512sums="
|
||||
0f4b48f250425dc57f63955fc8b38477d23db793bee367c3fbe03c3d2a559ba576434d07518310db4cae9d90d501af4051b80038b10fae94b980e537fc9374ad cargo.sh
|
||||
b2e602b7fc95ed403d29f0d754879d5f773c39ee33e726bb10cff17b3c088406dac84f2ca6d8ad563c64370007d98af805d6ee9cd4a06fe3d4c61c0cb90c5c0c crossdirect.c
|
||||
a1af3d2876dc05bb840e4bfb8b6e1c1dcf5b952375a6644dcb9cf659d82ec8bfc4be5d813064057fe9626104a10907ae7072a9d5fd7ac40f3b87e90dbf535eaf crossdirect.c
|
||||
de2aa6929bbff5db9132673e667f4525b333d062cb1f7a0597dd924de9e5c7215a9f8e2e6263b6fb5ace06f2c4b64f4ebfd0ede9b78add07c2cd08ec8613e98f rustc.sh
|
||||
ea9bf8db3810d03d0a7395057f3d6e57f7127d87c55deaedc171c255288f5f3cc6fbcc680a5a1b92786cf573875d5dc22521173799fe2639acc97d0715ff905b rust-qemu-linker.sh
|
||||
"
|
||||
@@ -44,7 +44,8 @@
|
||||
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 with options=\"!pmb:crossdirect\".\n");
|
||||
fprintf(stderr, "As a workaround, you can compile without crossdirect.\n");
|
||||
fprintf(stderr, "See 'pmbootstrap -h' for related options.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -117,17 +118,11 @@ int main(int argc, char **argv)
|
||||
NULL };
|
||||
char *ldPreload = getenv("LD_PRELOAD");
|
||||
if (ldPreload) {
|
||||
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);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+163
-84
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=5
|
||||
pkgrel=3
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-aarch64 mpc1 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"
|
||||
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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps"
|
||||
options="!strip"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,6 +135,7 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -169,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -217,12 +218,13 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,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/gcc-$_pkgbase.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,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/gcc-$_pkgbase.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -281,7 +283,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -289,21 +290,44 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -319,7 +343,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -327,7 +351,15 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -356,8 +388,10 @@ 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"
|
||||
@@ -378,7 +412,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
--disable-symvers
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -386,8 +420,7 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -397,7 +430,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -413,7 +446,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -428,7 +461,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -472,22 +505,25 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -536,7 +572,8 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libatomic.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -549,7 +586,8 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
amove usr/lib/libstdc++.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -567,13 +605,15 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
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="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -592,26 +632,30 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -619,15 +663,17 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libgomp.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -636,26 +682,42 @@ 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
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
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/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgo.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -663,25 +725,31 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
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
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgfortran.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -689,7 +757,8 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libquadmath.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -698,30 +767,38 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.so
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.a
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -730,9 +807,12 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -784,5 +864,4 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -1,149 +0,0 @@
|
||||
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
|
||||
|
||||
+163
-84
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgrel=5
|
||||
pkgrel=3
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armhf mpc1 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"
|
||||
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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps"
|
||||
options="!strip"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,6 +135,7 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -169,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -217,12 +218,13 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,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/gcc-$_pkgbase.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,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/gcc-$_pkgbase.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -281,7 +283,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -289,21 +290,44 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -319,7 +343,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -327,7 +351,15 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -356,8 +388,10 @@ 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"
|
||||
@@ -378,7 +412,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
--disable-symvers
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -386,8 +420,7 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -397,7 +430,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -413,7 +446,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -428,7 +461,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -472,22 +505,25 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -536,7 +572,8 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libatomic.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -549,7 +586,8 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
amove usr/lib/libstdc++.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -567,13 +605,15 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
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="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -592,26 +632,30 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -619,15 +663,17 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libgomp.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -636,26 +682,42 @@ 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
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
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/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgo.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -663,25 +725,31 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
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
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgfortran.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -689,7 +757,8 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libquadmath.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -698,30 +767,38 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.so
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.a
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -730,9 +807,12 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -784,5 +864,4 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -1,149 +0,0 @@
|
||||
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
|
||||
|
||||
+163
-84
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armv7
|
||||
pkgrel=5
|
||||
pkgrel=3
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armv7 mpc1 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"
|
||||
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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps"
|
||||
options="!strip"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,6 +135,7 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -169,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -217,12 +218,13 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,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/gcc-$_pkgbase.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,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/gcc-$_pkgbase.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -281,7 +283,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -289,21 +290,44 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -319,7 +343,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -327,7 +351,15 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -356,8 +388,10 @@ 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"
|
||||
@@ -378,7 +412,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
--disable-symvers
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -386,8 +420,7 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -397,7 +430,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -413,7 +446,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -428,7 +461,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -472,22 +505,25 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -536,7 +572,8 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libatomic.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -549,7 +586,8 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
amove usr/lib/libstdc++.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -567,13 +605,15 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
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="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -592,26 +632,30 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -619,15 +663,17 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libgomp.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -636,26 +682,42 @@ 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
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
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/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgo.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -663,25 +725,31 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
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
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgfortran.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -689,7 +757,8 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libquadmath.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -698,30 +767,38 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.so
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.a
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -730,9 +807,12 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -784,5 +864,4 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -1,149 +0,0 @@
|
||||
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
|
||||
|
||||
+163
-84
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-riscv64
|
||||
pkgrel=5
|
||||
pkgrel=3
|
||||
pkgdesc="Stage2 cross-compiler for riscv64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-riscv64 mpc1 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"
|
||||
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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps"
|
||||
options="!strip"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,6 +135,7 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -169,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -217,12 +218,13 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,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/gcc-$_pkgbase.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,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/gcc-$_pkgbase.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -281,7 +283,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -289,21 +290,44 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -319,7 +343,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -327,7 +351,15 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -356,8 +388,10 @@ 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"
|
||||
@@ -378,7 +412,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
--disable-symvers
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -386,8 +420,7 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -397,7 +430,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -413,7 +446,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -428,7 +461,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -472,22 +505,25 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -536,7 +572,8 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libatomic.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -549,7 +586,8 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
amove usr/lib/libstdc++.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -567,13 +605,15 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
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="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -592,26 +632,30 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -619,15 +663,17 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libgomp.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -636,26 +682,42 @@ 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
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
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/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgo.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -663,25 +725,31 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
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
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgfortran.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -689,7 +757,8 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libquadmath.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -698,30 +767,38 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.so
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.a
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -730,9 +807,12 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -784,5 +864,4 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -1,149 +0,0 @@
|
||||
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
|
||||
|
||||
+163
-84
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86
|
||||
pkgrel=5
|
||||
pkgrel=3
|
||||
pkgdesc="Stage2 cross-compiler for x86"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-x86 mpc1 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"
|
||||
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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps"
|
||||
options="!strip"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,6 +135,7 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -169,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -217,12 +218,13 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,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/gcc-$_pkgbase.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,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/gcc-$_pkgbase.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -281,7 +283,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -289,21 +290,44 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -319,7 +343,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -327,7 +351,15 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -356,8 +388,10 @@ 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"
|
||||
@@ -378,7 +412,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
--disable-symvers
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -386,8 +420,7 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -397,7 +430,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -413,7 +446,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -428,7 +461,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -472,22 +505,25 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -536,7 +572,8 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libatomic.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -549,7 +586,8 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
amove usr/lib/libstdc++.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -567,13 +605,15 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
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="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -592,26 +632,30 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -619,15 +663,17 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libgomp.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -636,26 +682,42 @@ 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
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
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/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgo.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -663,25 +725,31 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
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
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgfortran.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -689,7 +757,8 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libquadmath.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -698,30 +767,38 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.so
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.a
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -730,9 +807,12 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -784,5 +864,4 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -1,149 +0,0 @@
|
||||
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
|
||||
|
||||
+163
-84
@@ -34,19 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86_64
|
||||
pkgrel=5
|
||||
pkgrel=3
|
||||
pkgdesc="Stage2 cross-compiler for x86_64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-x86_64 mpc1 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"
|
||||
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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps"
|
||||
options="!strip"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -135,6 +135,7 @@ else
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -169,7 +170,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64 | ppc64le) ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -217,12 +218,13 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
|
||||
subpackages="$subpackages gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
||||
else
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
||||
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
fi
|
||||
@@ -232,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/gcc-$_pkgbase.tar.xz
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
||||
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
||||
@@ -242,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/gcc-$_pkgbase.tar.xz
|
||||
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
@@ -281,7 +283,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
fix-arm64.patch
|
||||
ppc64le-quadmath.patch
|
||||
riscv64-improve-build-time.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
@@ -289,21 +290,44 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
# - CVE-2023-4039
|
||||
|
||||
# we build out-of-tree
|
||||
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
builddir="$srcdir"/gcc-$_pkgbase
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
|
||||
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
echo $_pkgbase > gcc/BASE-VER
|
||||
cd "$_gccdir"
|
||||
|
||||
_err=
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch)
|
||||
msg "Applying $i"
|
||||
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$_err" ]; then
|
||||
error "The following patches failed:"
|
||||
for i in $_err; do
|
||||
echo " $i"
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
||||
}
|
||||
|
||||
build() {
|
||||
local _arch_configure=
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
@@ -319,7 +343,7 @@ build() {
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
|
||||
loongarch64-*-*-*) _arch_configure="--with-arch=loongarch64 --with-abi=lp64d";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -327,7 +351,15 @@ build() {
|
||||
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
|
||||
esac
|
||||
|
||||
export libat_cv_have_ifunc=no
|
||||
case "$CTARGET_LIBC" in
|
||||
musl)
|
||||
# musl does not support libsanitizer
|
||||
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
||||
_libc_configure="--disable-libssp --disable-libsanitizer"
|
||||
_symvers="--disable-symvers"
|
||||
export libat_cv_have_ifunc=no
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$BOOTSTRAP" in
|
||||
@@ -356,8 +388,10 @@ 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"
|
||||
@@ -378,7 +412,7 @@ build() {
|
||||
--disable-multilib
|
||||
--disable-nls
|
||||
--disable-werror
|
||||
--disable-symvers
|
||||
$_symvers
|
||||
--enable-__cxa_atexit
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
@@ -386,8 +420,7 @@ build() {
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
--disable-libssp
|
||||
--disable-libsanitizer
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
$_bootstrap_configure
|
||||
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
||||
@@ -397,7 +430,7 @@ build() {
|
||||
|
||||
mkdir -p "$_builddir"
|
||||
cd "$_builddir"
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--with-pkgversion="$version"
|
||||
|
||||
msg "building gcc"
|
||||
@@ -413,7 +446,7 @@ build() {
|
||||
if $LANG_JIT; then
|
||||
mkdir -p "$_builddir"/libgccjit-build
|
||||
cd "$_builddir"/libgccjit-build
|
||||
"$builddir"/configure $gccconfiguration \
|
||||
"$_gccdir"/configure $gccconfiguration \
|
||||
--disable-bootstrap \
|
||||
--enable-host-shared \
|
||||
--enable-languages=jit \
|
||||
@@ -428,7 +461,7 @@ package() {
|
||||
cd "$_builddir"
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
|
||||
|
||||
if $LANG_JIT; then
|
||||
@@ -472,22 +505,25 @@ package() {
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
local libgnat_static=
|
||||
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
if [ "$CHOST" = "$CTARGET" ]; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# cross-gcc: remove any files that would conflict with the
|
||||
# native gcc package
|
||||
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
||||
@@ -536,7 +572,8 @@ libatomic() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libatomic.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx() {
|
||||
@@ -549,7 +586,8 @@ libcxx() {
|
||||
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
|
||||
fi
|
||||
|
||||
amove usr/lib/libstdc++.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libcxx_dev() {
|
||||
@@ -567,13 +605,15 @@ libcxx_dev() {
|
||||
|
||||
gpp() {
|
||||
pkgdesc="GNU C++ standard library and compiler"
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
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="$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/"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
@@ -592,26 +632,30 @@ libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libobjc.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
objc() {
|
||||
pkgdesc="GNU Objective-C"
|
||||
replaces="gcc"
|
||||
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/cc1obj
|
||||
amove $_gcclibdir/include/objc
|
||||
amove usr/lib/libobjc.so
|
||||
amove usr/lib/libobjc.a
|
||||
mkdir -p "$subpkgdir/$_gcclibexec" \
|
||||
"$subpkgdir"/$_gcclibdir/include \
|
||||
"$subpkgdir"/usr/lib
|
||||
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
|
||||
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgcc() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -619,15 +663,17 @@ libgomp() {
|
||||
depends=
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/lib/libgomp.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgphobos() {
|
||||
pkgdesc="D programming language standard library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgdruntime.so.*
|
||||
amove usr/lib/libgphobos.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gdc() {
|
||||
@@ -636,26 +682,42 @@ 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
|
||||
amove $_gcclibexec/d21
|
||||
amove $_gcclibdir/include/d
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
if [ "$CBUILD" = "$CTARGET" ]; then
|
||||
amove usr/lib/libgdruntime.so
|
||||
amove usr/lib/libgphobos.so
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
|
||||
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
|
||||
amove usr/bin/*gdc
|
||||
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/
|
||||
}
|
||||
|
||||
libgo() {
|
||||
pkgdesc="Go runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgo.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
go() {
|
||||
@@ -663,25 +725,31 @@ go() {
|
||||
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
||||
install="$pkgname-go.post-install"
|
||||
|
||||
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
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/usr/lib/libgo.a \
|
||||
"$pkgdir"/usr/lib/libgo.so \
|
||||
"$pkgdir"/usr/lib/libgobegin.a \
|
||||
"$pkgdir"/usr/lib/libgolibbegin.a \
|
||||
"$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgfortran() {
|
||||
pkgdesc="Fortran runtime library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgfortran.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libquadmath() {
|
||||
@@ -689,7 +757,8 @@ libquadmath() {
|
||||
pkgdesc="128-bit math library for GCC"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libquadmath.so.*
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gfortran() {
|
||||
@@ -698,30 +767,38 @@ gfortran() {
|
||||
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
||||
replaces="gcc"
|
||||
|
||||
amove usr/bin/*gfortran
|
||||
amove usr/lib/libgfortran.a
|
||||
amove usr/lib/libgfortran.so
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/lib/libgfortran.a \
|
||||
"$pkgdir"/usr/lib/libgfortran.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
if $_libquadmath; then
|
||||
amove usr/lib/libquadmath.a
|
||||
amove usr/lib/libquadmath.so
|
||||
mv "$pkgdir"/usr/lib/libquadmath.a \
|
||||
"$pkgdir"/usr/lib/libquadmath.so \
|
||||
"$subpkgdir"/usr/lib/
|
||||
fi
|
||||
amove $_gcclibdir/finclude
|
||||
amove $_gcclibexec/f951
|
||||
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
|
||||
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
|
||||
}
|
||||
|
||||
libgnat() {
|
||||
pkgdesc="GNU Ada runtime shared libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.so
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgna*.a
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
@@ -730,9 +807,12 @@ gnat() {
|
||||
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
|
||||
|
||||
amove $_gcclibexec/*gnat*
|
||||
amove $_gcclibdir/*ada*
|
||||
amove usr/bin/*gnat*
|
||||
mkdir -p "$subpkgdir"/$_gcclibexec \
|
||||
"$subpkgdir"/$_gcclibdir \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
|
||||
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
@@ -784,5 +864,4 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
|
||||
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
|
||||
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
|
||||
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
|
||||
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
|
||||
"
|
||||
@@ -1,149 +0,0 @@
|
||||
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
|
||||
--
|
||||
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Tue, 6 Aug 2024 14:56:26 +0200
|
||||
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
|
||||
|
||||
Currently the forward threader isn't limited as to the search space
|
||||
it explores and with it now using path-ranger for simplifying
|
||||
conditions it runs into it became pretty slow for degenerate cases
|
||||
like compiling insn-emit.cc for RISC-V esp. when compiling for
|
||||
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
|
||||
|
||||
The following makes the forward threader honor the search space
|
||||
limit I introduced for the backward threader. This reduces
|
||||
compile-time from minutes to seconds for the testcase in PR116166.
|
||||
|
||||
Note this wasn't necessary before we had ranger but with ranger
|
||||
the work we do is quadatic in the length of the threading path
|
||||
we build up (the same is true for the backwards threader).
|
||||
|
||||
PR tree-optimization/116166
|
||||
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
|
||||
Add limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
|
||||
Honor and decrement limit parameter.
|
||||
(jump_threader::thread_through_normal_block): Likewise.
|
||||
(jump_threader::thread_across_edge): Initialize limit from
|
||||
param_max_jump_thread_paths and pass it down to workers.
|
||||
---
|
||||
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
|
||||
gcc/tree-ssa-threadedge.h | 4 ++--
|
||||
2 files changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
|
||||
index 7f82639b8ecc..0aa2aa851430 100644
|
||||
--- a/gcc/tree-ssa-threadedge.cc
|
||||
+++ b/gcc/tree-ssa-threadedge.cc
|
||||
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
|
||||
bool
|
||||
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
edge taken_edge,
|
||||
- bitmap visited)
|
||||
+ bitmap visited, unsigned &limit)
|
||||
{
|
||||
basic_block bb = taken_edge->dest;
|
||||
gimple_stmt_iterator gsi;
|
||||
gimple *stmt;
|
||||
tree cond;
|
||||
|
||||
+ if (limit == 0)
|
||||
+ return false;
|
||||
+ --limit;
|
||||
+
|
||||
/* The key property of these blocks is that they need not be duplicated
|
||||
when threading. Thus they cannot have visible side effects such
|
||||
as PHI nodes. */
|
||||
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
bitmap_set_bit (visited, taken_edge->dest->index);
|
||||
- return thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ return thread_around_empty_blocks (path, taken_edge, visited,
|
||||
+ limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
|
||||
m_state->append_path (taken_edge->dest);
|
||||
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
|
||||
|
||||
int
|
||||
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge e, bitmap visited)
|
||||
+ edge e, bitmap visited,
|
||||
+ unsigned &limit)
|
||||
{
|
||||
+ if (limit == 0)
|
||||
+ return 0;
|
||||
+ limit--;
|
||||
+
|
||||
m_state->register_equivs_edge (e);
|
||||
|
||||
/* PHIs create temporary equivalences.
|
||||
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
visited. This may be overly conservative. */
|
||||
bitmap_set_bit (visited, dest->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
- thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
bitmap_set_bit (visited, e->src->index);
|
||||
bitmap_set_bit (visited, e->dest->index);
|
||||
|
||||
+ /* Limit search space. */
|
||||
+ unsigned limit = param_max_jump_thread_paths;
|
||||
+
|
||||
int threaded = 0;
|
||||
if ((e->flags & EDGE_DFS_BACK) == 0)
|
||||
- threaded = thread_through_normal_block (path, e, visited);
|
||||
+ threaded = thread_through_normal_block (path, e, visited, limit);
|
||||
|
||||
if (threaded > 0)
|
||||
{
|
||||
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
|
||||
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
|
||||
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
|
||||
|
||||
- found = thread_around_empty_blocks (path, taken_edge, visited);
|
||||
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
|
||||
|
||||
if (!found)
|
||||
found = thread_through_normal_block (path,
|
||||
- path->last ()->e, visited) > 0;
|
||||
+ path->last ()->e, visited,
|
||||
+ limit) > 0;
|
||||
|
||||
/* If we were able to thread through a successor of E->dest, then
|
||||
record the jump threading opportunity. */
|
||||
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
|
||||
index 9f6cbfe93307..245b3506a550 100644
|
||||
--- a/gcc/tree-ssa-threadedge.h
|
||||
+++ b/gcc/tree-ssa-threadedge.h
|
||||
@@ -101,9 +101,9 @@ private:
|
||||
unsigned limit);
|
||||
|
||||
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
int thread_through_normal_block (vec<jump_thread_edge *> *path,
|
||||
- edge, bitmap visited);
|
||||
+ edge, bitmap visited, unsigned &limit);
|
||||
void thread_across_edge (edge);
|
||||
bool record_temporary_equivalences_from_phis (edge);
|
||||
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
pkgname=grub-efi-x86
|
||||
pkgver=2.12
|
||||
pkgrel=7
|
||||
pkgrel=6
|
||||
|
||||
_arch="x86"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -22,5 +22,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8a44b4d48c804fb2c62c3d75c85f86a108f1446d3b1f194cde3c1b3ce7653825379d5733fdf8e08013afcea0d9c879438556d8cbbfb7d5cd6c41b98ab7216492 grub-efi-2.12-r7-x86-edge.apk
|
||||
bad54187b4fbb9f78f2d619ff9a652a4927c557070c2c39334fd9900ae5aeb956144055602ca56295d7966c2d10090ef142a073dd67eb14f7b41ba0d54c78d4d grub-efi-2.12-r6-x86-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-aarch64
|
||||
pkgver=1.2.5
|
||||
pkgrel=10
|
||||
pkgrel=3
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-aarch64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8276aa0ce7368b87bf97f37d600639d475c059b984061125c6b648d2fecb838d87c8de9f19af32bad5862845c05368ccec0b328af3beb0fedc89a7ec0fb3babb musl-1.2.5-r10-aarch64-edge.apk
|
||||
2da7a285fee8a1f2386d4a75cbf3c75cfbbaf88c617d50af0e0440fcd5d9825183772bb13f55f885137d6519c606791d3a8c576c5202818b2289f0db4c98720d musl-dev-1.2.5-r10-aarch64-edge.apk
|
||||
30c20d050028bbe9a2203a0db0bb1453d921ac381fc3a7dc2c79c535a7ac25ecf65d7ee367b17178a37aa0e26d028a860d03567e9662c6251171c53bf2562893 musl-1.2.5-r3-aarch64-edge.apk
|
||||
43ef19c8698e98eb473116e7c21dbb9e66d994bd1cd63837d0f0c43ceaf1ce4f1db582e48b22478574ef7fe4bc309aa7bb387af2f99d8d88bcecfaf7763ec82c musl-dev-1.2.5-r3-aarch64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.2.5
|
||||
pkgrel=10
|
||||
pkgrel=3
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
18e90cbe16c8084cbf8d91b36decde0d520778946258d4c84908e639741843d21b7e9e610f007e5126dcc6a3ba2289a862bc18cfd9b21d3bc64161483a5704cf musl-1.2.5-r10-armhf-edge.apk
|
||||
7b46a6eb791beb511d9d40c5de3fc08d9b2fbf82b0538dfb171cdafd16d719687d3bb55e718a0f1eefcd0a8342d81fcb258928a3209ab1a874015054f5ffe501 musl-dev-1.2.5-r10-armhf-edge.apk
|
||||
b98e17b30e5968ca8f6c963e8752544112337b641186c269dbc4dd4b0a9496de9f4a549deb1bbf03e419b145b86b0c48fd22db1b8dff188bd3b451632b8c2b3f musl-1.2.5-r3-armhf-edge.apk
|
||||
0e9fa461b75f3a9832e26f8086c9397b9d5dbea9c5821cf7898c0ccf64281f603137265606ee97810cba988fdff967ea7ec240e4e59c1d87da7e001cd4bf719a musl-dev-1.2.5-r3-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-armv7
|
||||
pkgver=1.2.5
|
||||
pkgrel=10
|
||||
pkgrel=3
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armv7:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
cfd51c4655b612815af1e888228244640a4516dd8edd7a75131d6634c96d8ea6028e780b3c3e870dd22c4f89788f9f12594b4900a8df287161059687f1630857 musl-1.2.5-r10-armv7-edge.apk
|
||||
88f482c389479817700a5b2c8609bae9d152303b92b1a9c7bd464aa990975b7bd0990c7b185d6c66ecd0c3c0c5f7579fc52a618d4393e511e112c8992d682693 musl-dev-1.2.5-r10-armv7-edge.apk
|
||||
05d888f66cb8bb75fcf767327068aff0152c32c97d6de680f7df0b9b11bbf99fefd8f2b7c1b92de8489e0f051d536e0d708faa3c5aaff783565e6c0e05d34c3b musl-1.2.5-r3-armv7-edge.apk
|
||||
2c8775a37f2f7d5730857dcf7a7f038a1b0838a775a03e05ce299807f3608a112e95c61b776b32152434c27ee23b999915357b4e89e6559eb89e820666e36d97 musl-dev-1.2.5-r3-armv7-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-riscv64
|
||||
pkgver=1.2.5
|
||||
pkgrel=10
|
||||
pkgrel=3
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-riscv64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4c76e3c4e94ab96d49c51ad01205e846280f851cff06b8c6ab8269d2ac99bbede29da9600fa60130c266d95da21bccdb00ad4b18123964774835e8014611e53e musl-1.2.5-r10-riscv64-edge.apk
|
||||
27e6923fb43b1cd87b15e42edec6c658b7983b4e8c001bb67f5fc79cb124a46af92440e75676460eb3bed3a7acdd5ad142f03ba7dd040aae056431b8cc56818d musl-dev-1.2.5-r10-riscv64-edge.apk
|
||||
d9adef7c000203504c357db8b84008f95f97fa68e3944103c345e0bc511f84bff7175ea1afd029de81dd2acce64795c55f100b7abfed3a5bad464c654e620ac3 musl-1.2.5-r3-riscv64-edge.apk
|
||||
51a20229c477c691429d2fb800ff441f0181e98879996c0fede94a39e37d66fd2bddd50f663c85090837b8cfaf41ed65c2d2142eaa0ce503b2c5bf6fd2d0194e musl-dev-1.2.5-r3-riscv64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86
|
||||
pkgver=1.2.5
|
||||
pkgrel=10
|
||||
pkgrel=3
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-x86:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7d53c9b8d328860e09e5e5835be9632e9ee6effb6ce4203817b12139a1c4c69ac71495bb575e696b16e9a1dde830729af1b5b4d9308bf2e4be0995f2d7e2843b musl-1.2.5-r10-x86-edge.apk
|
||||
5d048109d3360c526216a6f47446c5e9315fed76ae24bc8238d08dcac80edd22ac3de9ae4fda8fc42fd2c70c676e8673811eddb991bf08ea500bf4ccd10e2a3e musl-dev-1.2.5-r10-x86-edge.apk
|
||||
68f290b5c1a8e8c1b5b70e34c4be391fa49fc8f91902a6dd432a3c34317788c69d5a31f9fedeec51a4d12509aee735d8875f0c4349d3d9cab1d9789a50a78bf8 musl-1.2.5-r3-x86-edge.apk
|
||||
2115a6da3ac624872a8e4d764aed69c0e729853d3b74643da83bef1083d20147de2f2f181df82d0bb273fad0597d37b719048bd66e23ed072982018ecf07b8fc musl-dev-1.2.5-r3-x86-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=musl-x86_64
|
||||
pkgver=1.2.5
|
||||
pkgrel=10
|
||||
pkgrel=3
|
||||
arch="aarch64"
|
||||
subpackages="musl-dev-x86_64:package_dev"
|
||||
|
||||
@@ -57,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5d8ee4ca49019bf728f855cd296e36ac8ba9c16dc85f56c7b8bb6804788656584464ed9828f1eb5a14c1da1ca77906fae9d93174c44d03e003b6e1c2d1f445a6 musl-1.2.5-r10-x86_64-edge.apk
|
||||
788290a474910e15611f8a9165470fd5a633a579ca3a6f89f5f550864303949dedb286c6f0108db5490e8e05d0ce0dcfd749555b63b624ea8fcaffd9a0b201b9 musl-dev-1.2.5-r10-x86_64-edge.apk
|
||||
c4667bf824340766c2b6c41e88e4dc76a7e51b7247ece8f85e8e9347769fce6bd4459d94fcdc82ea12e0a67f7160d68cf2a1ed322eee7d6ca9d075036c17e193 musl-1.2.5-r3-x86_64-edge.apk
|
||||
a64220117e1614e585be89fcb00e387b4ea2f4251ce2b6af38c576787093b4ce6a0bed3e4d7bc86517369ee5c4f11db63c6f572e16f336a1178fa99dfa394aff musl-dev-1.2.5-r3-x86_64-edge.apk
|
||||
"
|
||||
@@ -1,51 +0,0 @@
|
||||
From 4cbffcd4f146ccceafccd9fa9d522640d1f0f519 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
Date: Tue, 10 Dec 2024 08:33:54 +0100
|
||||
Subject: [PATCH] libfdt.i_shipped: use SWIG_AppendOutput
|
||||
|
||||
Fix this build error with modern SWIG:
|
||||
|
||||
scripts/dtc/pylibfdt/libfdt_wrap.c: In function '_wrap_fdt_next_node':
|
||||
scripts/dtc/pylibfdt/libfdt_wrap.c:5578:17: error: too few arguments to function 'SWIG_Python_AppendOutput'
|
||||
5578 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
|
||||
|
||||
Patch is based on:
|
||||
https://github.com/dgibson/dtc/pull/154
|
||||
---
|
||||
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
|
||||
index 27c29ea260..3bbbfb3c9f 100644
|
||||
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
|
||||
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
|
||||
@@ -1033,7 +1033,7 @@ typedef uint32_t fdt32_t;
|
||||
fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
|
||||
buff = PyByteArray_FromStringAndSize(
|
||||
(const char *)($1 + 1), fdt32_to_cpu($1->len));
|
||||
- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
|
||||
+ resultobj = SWIG_AppendOutput(resultobj, buff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1072,7 +1072,7 @@ typedef uint32_t fdt32_t;
|
||||
|
||||
%typemap(argout) int *depth {
|
||||
PyObject *val = Py_BuildValue("i", *arg$argnum);
|
||||
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
|
||||
+ resultobj = SWIG_AppendOutput(resultobj, val);
|
||||
}
|
||||
|
||||
%apply int *depth { int *depth };
|
||||
@@ -1088,7 +1088,7 @@ typedef uint32_t fdt32_t;
|
||||
if (PyTuple_GET_SIZE(resultobj) == 0)
|
||||
resultobj = val;
|
||||
else
|
||||
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
|
||||
+ resultobj = SWIG_AppendOutput(resultobj, val);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-alcatel-idol347-downstream
|
||||
pkgdesc="Alcatel OneTouch Idol 3 (4.7) (Downstream)"
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
131bddf782050fd8301ebd242a5b19cd70c520f03fe2e8a2f0b7afba60cc3dc0330f3765395de70553fc172a116a02a9512c3fc189303cb09609e4adac76a799 deviceinfo
|
||||
2b6ba0e6e6d8f90d907a7a8089718c8a1ff8ee3ad0ea17f204e2e9fa2a514a06af9c2b91b7bfb0b8b8362ba2d44b53aad52fd88d506682f1f61b9fe6c19d206e deviceinfo
|
||||
"
|
||||
@@ -20,6 +20,7 @@ deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk androidboot.bootloader=L1BGC0C0BG00"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
msm
|
||||
panel_lenovo_kuntao_549
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-a5lte-downstream
|
||||
pkgdesc="Samsung Galaxy A5 (SM-A500F)"
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
410b5caac31e2af65ebfe1f3312fc2106c681430b75dfa8f4412f5727cd7db669dc3f46b1b2c20ece1b438052c36cbd3ff7b212ea03d9fea5af0b3c5bb14ff9b deviceinfo
|
||||
09f28323fac82a8f8495af89de94449100e0f9233e22e33af807e559803bf3d9114aedc6d21626c7d5d736e93025de812292a0ee47c3639ac704696995c3d675 deviceinfo
|
||||
"
|
||||
@@ -17,7 +17,7 @@ deviceinfo_screen_height="1280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
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_kernel_cmdline="console=null 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=2
|
||||
pkgrel=0
|
||||
pkgver=1
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8c08854b664866087f3df1dccbe39ee0aba4563e9fc2cb38567bbbb9f54a74e3a9ed7a574bc18930ecf595d8beda32dd301cd757b6788d24cdd819c8c9cc5c52 deviceinfo
|
||||
1e7fe5a6788c1b635ab5c63083da5c1f353440567b8f86948092202ce026cbbae000ea047e65fae543f13092f97626ce227bc3f329477fbd7521df1b31f30bc8 deviceinfo
|
||||
"
|
||||
@@ -17,7 +17,7 @@ deviceinfo_screen_height="1280"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
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_kernel_cmdline="console=null 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=3
|
||||
pkgrel=0
|
||||
pkgver=1
|
||||
pkgrel=3
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="mkbootimg linux-samsung-coreprimevelte-downstream postmarketos-base pxa-mkbootimg u-boot-tools"
|
||||
depends="mkbootimg linux-samsung-coreprimevelte-downstream postmarketos-base postmarketos-initramfs-minimal 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="
|
||||
00c8780dbc77e62e7d57a2b3e879881076204f3e58d50555778aa68feb0157f5b4207fdabbb4627888eeeda6a35182e8e199e49e4050244a60ce4e9e2d84bd99 deviceinfo
|
||||
741f46736c2742d4a6f118a924eee89954fb14e5b1dc00f372bda41b63ec975cf960909f915fcb31ad965f136a712905bc8626cd7e530f40e110885f7c861790 deviceinfo
|
||||
4854cc57b86e1199dbc165110514e672dabf45044fe9f7ebbde5b2b24768fb5497273b5f38612cf2dfeffc9bf0648c725114b4fa01165bf7fb02f7d741ee5806 90-coreprimevelte.conf
|
||||
"
|
||||
@@ -14,12 +14,12 @@ deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="480"
|
||||
deviceinfo_screen_height="800"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader relate
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_bootimg_pxa="true"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# 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
|
||||
"
|
||||
@@ -1,32 +0,0 @@
|
||||
# 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,14 +2,15 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-lt01wifi-downstream
|
||||
pkgdesc="Samsung Galaxy Tab 3 8.0"
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
pkgver=1
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
postmarketos-base
|
||||
postmarketos-initramfs-minimal
|
||||
linux-samsung-lt01wifi-downstream
|
||||
mkbootimg
|
||||
"
|
||||
@@ -34,7 +35,7 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ea36813341c6843fa3b9c8a4ca330b92beb61e7c62de6a1d095c66f044237be2557bacdcc82912c48290d958128bef1771cd0d8c747758a5a98de759ecbb5778 deviceinfo
|
||||
b6d8953f5717b81fd1cb6d34e0f5539480b348a52194bbd3e6d83c3ae9e77bc2d948b05303c93ecbd7121f7affd476a9522c32c1a55fd7cee4ae0ca1bc0b88a0 deviceinfo
|
||||
af036fe35011db078379dbb2e8c16c86546f0a4fcb3d1bcee3502bb1ea5b38f3ec5a9fa8cd1ca8ed8b89592a7f572d6072781289845303e0bf85fc2de4ead9fb modules-load.conf
|
||||
594d6059ba1b06bce65538d26ce80cf2ce840786605b86e993ffaef858837507c033c0f95b7bcd9914ae7ea3cd2a9e43e32ec879db7c908219ad62d38b4e426a modprobe.conf
|
||||
"
|
||||
@@ -14,7 +14,6 @@ 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=5
|
||||
pkgrel=0
|
||||
pkgver=3
|
||||
pkgrel=4
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -12,6 +12,7 @@ depends="
|
||||
linux-samsung-m0-downstream
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
install="$pkgname.post-install"
|
||||
@@ -39,6 +40,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e43ad5a25aa5b0c499a8f7001feb236e428a185df0e51bf0b72f82550965e3050d10f8a4e6b0f92b11feec6f4bee734fac78bcbe8f55d8290d2544bd7ec3e811 deviceinfo
|
||||
e89b2287780aa94e93ee8cba472ec78b14a0de0089c3ee8c278175ace459d84a58a9278f473d917dd569b114874fb76931b404f810220d328c7e3f6148dac485 deviceinfo
|
||||
1376f0eb7c6ba459ca5c44b3eb7e9919d9c5f48d71ec30c006d1b4843e31cdade9f980415a166e977b2567b26f4e87d4554ee1143fdc62453d60a93bed129d06 90-android-touch-dev.rules
|
||||
"
|
||||
@@ -14,13 +14,13 @@ 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"
|
||||
deviceinfo_kernel_cmdline="console=ttySAC2,115200 buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-samsung-on7xelte-downstream
|
||||
pkgdesc="Samsung Galaxy J7 Prime"
|
||||
pkgver=2
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-samsung-on7xelte-downstream
|
||||
linux-samsung-on7xelte
|
||||
mkbootimg
|
||||
msm-fb-refresher
|
||||
postmarketos-base
|
||||
@@ -52,7 +52,7 @@ lightdm() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
eb8a2cfc57044f901b3ce75eda0001b58d5132ea52155d5e4bfa7361c1a19021759c0182c5ac01100145902dbebaaaf7965ded45487c6b4d0860a7d799d4cf94 deviceinfo
|
||||
d342e7d79922d2e4a313e6c0ad20172e841886aa9517522460699da0dc66cd83cfeab986e468b0427ebcd64d54ffbc39cf3ba56c5d839b560e34cbe6e36526f1 deviceinfo
|
||||
baee319b6d2f49a15680b0f322ec3e398a071d73fbf7713d14f26a1d027f8950457a482ac3f019605af3dfcf25bbb33ebaa0ffde181f7f96d911d56251c81eef lightdm.conf
|
||||
efbe3d6217854c0131e61f9f3722100d349cb0673f4923bc3d56dae30a6346b0c33e676a39fc4c080150f6ea9457bf268abf870eea916a7d5daae1a22642a2b8 mount-efs.rc-init
|
||||
3e5bb764529010d2b6b1f2759a7799f665d140aebcee2dd63433e68cd4282e09b5d3b34fb7c21e737595b406501e7f02ece4592651c60e4c2b9419de4aedb438 samsungipcd.rc-conf
|
||||
|
||||
@@ -21,6 +21,7 @@ deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_kernel_cmdline="androidboot.selinux=permissive androidboot.selinux=permissive"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-xiaomi-cepheus-downstream
|
||||
pkgdesc="Xiaomi Mi 9"
|
||||
pkgver=2
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -25,5 +25,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f71fef16c5a10a49b5ff56971a50224bc4a3c59075276ce2c4fc4f94307d3e39e006942d9f5fe4711058b0ce83b1df44e491efb9b67781662e042878556fe03d deviceinfo
|
||||
ee52ac16542a599f397fba5ddbb82028d666dec7f509a4b9298df248ac98a129c7f2eb4452282c5de38f7f97516da6ba70ea027a0fea075881f6a7f5d2ca10c7 deviceinfo
|
||||
"
|
||||
@@ -22,6 +22,7 @@ deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 buildvariant=user"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-xiaomi-wt88047-downstream
|
||||
pkgdesc="Xiaomi Redmi 2 (Downstream)"
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
pkgver=1
|
||||
pkgrel=3
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
@@ -21,5 +21,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2b101a3143cf3201bb20e8896ecf432bb4b7e6127eb82dd598f9e225338f7b510fe6658701656a5eed5969d691ff699424bda5f27b8a112115f3ab7e33439a68 deviceinfo
|
||||
30d1e79a3cafe22a307ace6a4897077e21e93a3433a8c2c636368fb037328d82a22009f6631c8c74481fe030fff9fef846b90a93ecadbc44484558ceb1a4b78f deviceinfo
|
||||
"
|
||||
@@ -21,6 +21,7 @@ deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 loop.max_part=7 phy-msm-usb.floated_charger_enable=1 buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
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
|
||||
"
|
||||
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Richard Acayan <mailingradian@gmail.com>
|
||||
pkgname=alsa-ucm-conf-qcom-sdm670
|
||||
pkgver=1.2.9_git20241211
|
||||
pkgver=1.2.9_git20240801
|
||||
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="80bbe11220dcb5db4f2b3e65f1e1783d4935f902"
|
||||
_commit="4712327133bcf730a35ce2c80ffb2dfc06b43df1"
|
||||
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="
|
||||
489c9807e7667e2246426970009d2dbed0267d797764a8766f37375e6bf2d4d0035ab46d205acb9e96748d2257083ae816639cd559b292e2551ab7481a9040f9 alsa-ucm-conf-80bbe11220dcb5db4f2b3e65f1e1783d4935f902.tar.gz
|
||||
2401dce746edfef9c025b6e291de42262376839ea0556649b43cce995dbedb71f58574c1654bc05e3b80f19aca4789661f67a5503eb3308fddb6e057fa7c2d2d alsa-ucm-conf-4712327133bcf730a35ce2c80ffb2dfc06b43df1.tar.gz
|
||||
"
|
||||
@@ -1,26 +0,0 @@
|
||||
# Maintainer: Danila Tikhonov <danila@jiaxyga.com>
|
||||
# Co-Maintainer: Jens Reidel <adrian@travitia.xyz>
|
||||
|
||||
pkgname=alsa-ucm-conf-qcom-sm7150
|
||||
pkgver=1.2.11_git20240810
|
||||
pkgrel=0
|
||||
pkgdesc="ALSA UCM configuration for SM7150 devices"
|
||||
url="https://github.com/sm7150-mainline/alsa-ucm-conf"
|
||||
arch="aarch64"
|
||||
license="BSD-3-Clause"
|
||||
provides="alsa-ucm-conf"
|
||||
provider_priority=1
|
||||
_commit="dedbb209ed983a869b7aaceb883f8896c82d2296"
|
||||
source="$pkgname-$_commit.tar.gz::https://github.com/sm7150-mainline/alsa-ucm-conf/archive/$_commit.tar.gz"
|
||||
options="!check"
|
||||
builddir="$srcdir/alsa-ucm-conf-$_commit"
|
||||
|
||||
package() {
|
||||
# install audio config files
|
||||
mkdir -p "$pkgdir"/usr/share/alsa
|
||||
cp -r ucm2 "$pkgdir"/usr/share/alsa/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4c873c3e5b372f7075a38b8fd33723b47cf0ed2013b5ddccec64a4edc587d2f121eb80b930fa6d1ce98dd9ad55043eb1e3e152f1451f4491bc667353548acee7 alsa-ucm-conf-qcom-sm7150-dedbb209ed983a869b7aaceb883f8896c82d2296.tar.gz
|
||||
"
|
||||
@@ -1,27 +0,0 @@
|
||||
# Maintainer: Caleb Connolly (kalube) <caleb@connolly.tech>
|
||||
# Co-Maintainer: Joel Selvaraj <joelselvaraj.oss@gmail.com>
|
||||
pkgname=alsa-ucm-conf-sdm845
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="ALSA UCM configuration for Qualcomm SDM845 devices"
|
||||
url="https://postmarketos.org"
|
||||
arch="aarch64"
|
||||
license="BSD-3-Clause"
|
||||
provides="alsa-ucm-conf"
|
||||
provider_priority=1
|
||||
replaces="soc-qcom-sdm845-ucm"
|
||||
_commit="70d89261a7d30273fba9c6e67a072699f9f88151"
|
||||
source="$pkgname-$_commit.tar.gz::https://gitlab.com/sdm845-mainline/alsa-ucm-conf/-/archive/$_commit/alsa-ucm-conf-$_commit.tar.gz"
|
||||
options="!check"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
package() {
|
||||
# install audio config files
|
||||
mkdir -p "$pkgdir"/usr/share/alsa
|
||||
cp -r "$srcdir/alsa-ucm-conf-$_commit"/ucm2 \
|
||||
"$pkgdir"/usr/share/alsa/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f6d03f3b03f944b29b588464e2e26f4f4cc185368714f9e623c1211174ea172efb81a765980c9a289112f5bf8c5c4aafdfd87c0094890069fc3d7c73b29456bc alsa-ucm-conf-sdm845-70d89261a7d30273fba9c6e67a072699f9f88151.tar.gz
|
||||
"
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Minecrell <minecrell@minecrell.net>
|
||||
pkgname=device-arrow-db410c
|
||||
pkgdesc="Arrow DragonBoard 410c"
|
||||
pkgver=5
|
||||
pkgrel=0
|
||||
pkgver=4
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -32,6 +32,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
748f5953d059f6765b041910bc8d7654a9e92d54d1646d8b90a4cdf5a66087f9a1917c7d1bddba994d2cc65d5b2ce422d6fb4650f771819b9f3f9ff33342be99 deviceinfo
|
||||
b7431dcf918509458637442814d6f91f1532c75cd483be65d14dedd7af81f2f565187a190b3e3537474d00eec71cdb4ef6eb7fe3246ecde5a6c7b92593e71207 deviceinfo
|
||||
ccd6758cb4954eb0a96c7fb15e732e8147414f8edc498d9faf7d04ddef85d817733669ec1a6003e623e8392f3f6bb85f71160efe4e82f27e300d58aa6f5c8549 modules-initfs
|
||||
"
|
||||
@@ -33,6 +33,3 @@ deviceinfo_flash_offset_tags="0x01e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_sparse="true"
|
||||
deviceinfo_flash_fastboot_partition_rootfs="rootfs"
|
||||
|
||||
# lk2nd does not support GPT for subpartitions/SD cards yet
|
||||
deviceinfo_partition_type="msdos"
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Minecrell <minecrell@minecrell.net>
|
||||
pkgname=device-bq-paella
|
||||
pkgdesc="BQ Aquaris X5"
|
||||
pkgver=9
|
||||
pkgrel=0
|
||||
pkgver=8
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -38,6 +38,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ec9416137ac7e49f564428bd92811ecc557567d3ee9b73061bab6da4d818fbecbbe70d179b91ef98576244bb6793e64b8add8d82a3a0398c5f542ba18978b58f deviceinfo
|
||||
75e857f36f627d1ef209bfc79bac574b432ecb93a0e0de131675de43c43cef15e455284bab7b635376d21fd908e8cd21e6e918c6bd03c6e711179489f56e39a5 deviceinfo
|
||||
ebf6a40372329116a25df1407e671365bb2bf0613f61f0a572fc77890fb0a1760259ab35ed9f002ef2a5c6ee8836bc7bbeb50bf5ac3de14c11e6d96872ad3644 modules-initfs
|
||||
"
|
||||
@@ -31,6 +31,3 @@ deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x01e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_sparse="true"
|
||||
|
||||
# lk2nd does not support GPT for subpartitions/SD cards yet
|
||||
deviceinfo_partition_type="msdos"
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Luca Weiss <luca@lucaweiss.eu>
|
||||
pkgname=device-fairphone-fp4
|
||||
pkgdesc="Fairphone 4"
|
||||
pkgver=4
|
||||
pkgrel=1
|
||||
pkgver=3
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -19,7 +19,7 @@ depends="
|
||||
firmware-fairphone-fp4-modem
|
||||
firmware-fairphone-fp4-wlan
|
||||
firmware-qcom-adreno-a630
|
||||
hexagonrpcd>=0.3.2-r3
|
||||
hexagonrpcd
|
||||
hexagonrpcd-openrc
|
||||
linux-firmware-ath10k
|
||||
linux-postmarketos-qcom-sm6350
|
||||
@@ -38,7 +38,8 @@ depends="
|
||||
tqftpserv-openrc
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-openrc"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
install="$pkgname.post-install $pkgname.post-upgrade"
|
||||
source="
|
||||
81-libssc-fairphone-fp4.rules
|
||||
90-feedbackd-aw8695.rules
|
||||
@@ -59,21 +60,13 @@ package() {
|
||||
install -Dm644 "$srcdir"/90-feedbackd-aw8695.rules \
|
||||
"$pkgdir"/usr/lib/udev/rules.d/90-feedbackd-aw8695.rules
|
||||
install -Dm644 "$srcdir"/hexagonrpcd.confd \
|
||||
"$pkgdir"/usr/share/hexagonrpcd/hexagonrpcd-adsp-sensorspd.conf
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
depends="hexagonrpcd-openrc"
|
||||
|
||||
mkdir -p "$subpkgdir"
|
||||
"$pkgdir"/etc/conf.d/hexagonrpcd-adsp-sensorspd
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-fairphone-fp4.rules
|
||||
2974ccc172bf1299daeb0bc746879b3a1db1fbc3a2b163a02a6554fed6ed9f733144bcf976cd2441c5664d496dcce3ae943f4314c653470dc07dda0de5ad632b 90-feedbackd-aw8695.rules
|
||||
97629090e9d08391ec9ee9f84cf40b9710c9dffc09609f056a27869acc8f87e176765f6e8f9800ef29872df8f48a2e085eeaaaf69f38f8a97ecb1d19ac9c79eb deviceinfo
|
||||
9549f105f865d230e7b67819c96b7e06a5ed4d5808f083099a408934ffbacdb412984b861f6756fa4fde94b51e6a268b8d2ce9fed6f13ee3e8041bb96492310a deviceinfo
|
||||
6a3d620f2cc60308a62ff651ffb00a5ee1f092131cca9d33b6afd61c8a372a3fd7d46540162213593107e0943b33f3f0119d003d43dcd06dbde757390a6c1729 hexagonrpcd.confd
|
||||
52bb7ed829caa4dcff9728bd6e3cdf118b3c7ee7dfe90df0d4e6422dd67bf3258ae2a4d2dc7599da4182fbd8eb47a0e1d20c58198dc17f2bf178b8f01a8887f7 modules-initfs
|
||||
"
|
||||
@@ -1 +0,0 @@
|
||||
device-fairphone-fp4-openrc.post-install
|
||||
File renamed without changes.
@@ -0,0 +1 @@
|
||||
device-fairphone-fp4.post-install
|
||||
@@ -26,6 +26,7 @@ deviceinfo_flash_method="fastboot"
|
||||
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Co-Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
pkgname=device-generic-x86_64
|
||||
pkgdesc="Generic x86_64 system, with EFI"
|
||||
pkgver=17
|
||||
pkgrel=1
|
||||
pkgver=16
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="x86_64"
|
||||
@@ -12,7 +12,6 @@ depends="
|
||||
alsa-ucm-conf
|
||||
postmarketos-base
|
||||
systemd-boot
|
||||
unl0kr-fbforcerefresh
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
@@ -71,6 +70,6 @@ kernel_lts() {
|
||||
|
||||
sha512sums="
|
||||
e9dfcd70ccfb9a0fdaa0cdc52faf3be96d6de8af8c60a758bb703c515b0648cec4552e0eaf56e5168b0004cd3fc4b28118abb05dad2c581d3579a2e9134862cb deviceinfo
|
||||
7f0e1dab2eaf0616220a06a658245a297f2627f1b6a492ccf3bb9922c5b40aa6fd320c4ec5f909557bfc9b38985ef6bc58a67dd87fc46e0d9d35addbcfb2683d modules-initfs
|
||||
e464ef0ad4a4c34d2d53f69c4612b612ea878a77c9efdef69b0f842edf701036c8218809fd63aac286d6a08ae07f39e568199fc3e38d145e716c1723e7215019 modules-initfs
|
||||
9599a10679a43929e4ed2ea22269a0716219163817574d48db4dc1cb21a0fcf17ea54d77d5fd8efd034905c421ecb3eaa600a72927d683983ce48d1159329881 30-gpu-i915-firmware.files
|
||||
"
|
||||
@@ -12,7 +12,6 @@ mbcache
|
||||
mmc_block
|
||||
mmc_core
|
||||
nvme
|
||||
psmouse
|
||||
scsi_mod
|
||||
sd
|
||||
sd_mod
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-gru
|
||||
pkgdesc="Google Gru Chromebooks"
|
||||
pkgver=8
|
||||
pkgrel=1
|
||||
pkgver=7
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -11,13 +11,14 @@ options="!check !archcheck"
|
||||
depends="
|
||||
alsa-ucm-conf-google-gru
|
||||
depthcharge-tools
|
||||
eudev-hwids>=3.2.12-r0
|
||||
linux-postmarketos-rockchip
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
soc-rockchip-rk3399
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-openrc"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
source="deviceinfo modules-initfs"
|
||||
|
||||
# provides and replaces to switch old installations to this package
|
||||
@@ -50,13 +51,8 @@ nonfree_firmware() {
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgvar-r$pkgrel openrc"
|
||||
depends="eudev-hwids>=3.2.12-r0"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d0d5e47e7bc6f63f92669a315611c36972e2f06a32c1339ac551f23db023331fb6e1cdbbe4dc2022596aaf8083967951c43585a3aa32c4fddc8d8987bc20c092 deviceinfo
|
||||
7815e3a164720b5ad0df7ce8d12b12fe85cc4bb7bf4a09ccc0eb831a58a920026fd92d545f4d6fb459a688e15b9d542e360fd597cd5d3b01a3ea338c3928d2a3 deviceinfo
|
||||
a750a0c41068082e0b82351d5aec91715e1a5215b09b26fec644dfe259cea2d662e878433a732a8c06dab2a9b420baec2bcc6161d8357cf3ed770239c5165090 modules-initfs
|
||||
"
|
||||
@@ -20,7 +20,7 @@ deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
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=9
|
||||
pkgver=8
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -73,6 +73,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
563b0c9ee35c90f2be74e30fa6d490a351e5e114f946c21556f00b621bfd5c756599eef5228dad8cf74c258eb8eb9e12f8012058da285ddff7834820cad5fc7e deviceinfo
|
||||
ecd503069ecf272ddc238bd49dc257a1f3e0f4c20b322238e2da83104b94b331c22886d1591b6fe0b78c986e15ac6251e364ec1b750f9125ea722a6b1a79e2b8 deviceinfo
|
||||
8e95624610dae7d18684056396c9e82635ddce7303d6770e965f9372ffa101fdfd5f8337bc7368004890e9836798663a98c142c52ed63795877ea37ac8da56af modules-initfs
|
||||
"
|
||||
@@ -19,7 +19,7 @@ deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_kernel_cmdline="quiet loglevel=2"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
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=8
|
||||
pkgver=6
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -15,6 +15,7 @@ depends="
|
||||
linux-postmarketos-mediatek-mt8173
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo modules-initfs"
|
||||
@@ -39,6 +40,6 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6e4c6704aaca2b157ca437d0c9575a7efb369934facc59d0e43cbfff103f2e98dca42a46ba332069f00cc8f1289355a2177cb2ca4627445d50be7daaad60d817 deviceinfo
|
||||
d082e6c155347f662403f611f44c3eddb2a0548397bec4f29b882f371a18efa9c2628a88599b19c0c58c1886d0c25035367f02651a60fb6c3293faa1449b83d5 deviceinfo
|
||||
4b0197eacfeeb4b13f5abc26950f570ee762742547674ce10110ccea63eb46630a2e3b5f87e9c9a1f9deda21baf05bec248ab7a65656687ec94d296b5657dafa modules-initfs
|
||||
"
|
||||
@@ -18,11 +18,10 @@ 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="quiet loglevel=2"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
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=8
|
||||
pkgver=7
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -14,6 +14,7 @@ depends="
|
||||
linux-postmarketos-exynos5
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
@@ -57,7 +58,7 @@ nonfree_firmware() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
896b5fa32413195fe929e3a2e6be2c969b9af597da55bbdc318264c087c86b9754a265461be90e14747e5302a8873861fd3ad3b236b64a942a30edd3169405b2 deviceinfo
|
||||
18e829f0eddcc8a0e64eb5081afa324da060de98478ac17d6199c1cecb4d2e984212c8681e8c75b4552d4dd5bbffff2f60dc8be1884b6ef23daa58319d4274fc deviceinfo
|
||||
e12a68f919182cb4e6812a5dd13fce8dc15266d2ac16aa5f0a31034f111cb403c020ebaaa4d94309f4baf2f71379327c57c08029e27c506d152695e9a2b04b2b modules-initfs
|
||||
e53ca475830930ecfc1fd537702e850e2abcb66fbed521cb6c3a2918d762649254bd0244ec93a47b20dfc593ec3afc9bdebdec1759a7bc96dcbe4800f40893da 90-tap-to-click.conf
|
||||
6fe67c8f2e09e3e37297eebaf2a86a32671923a5fd4d18e5aeb10e580fb998e4ddb4a691531a0c8f4b4e70c6f0f7e91008dd836ffca8026d59862c6e829fd996 Peach-Pit-I2S-MAX98090.conf
|
||||
|
||||
@@ -18,7 +18,6 @@ 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"
|
||||
|
||||
File renamed without changes.
@@ -2,67 +2,76 @@
|
||||
# Maintainer: Richard Acayan <mailingradian@gmail.com>
|
||||
pkgname=device-google-sargo
|
||||
pkgdesc="Google Pixel 3a"
|
||||
pkgver=9
|
||||
pkgrel=1
|
||||
pkgver=6
|
||||
pkgrel=2
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
alsa-ucm-conf-qcom-sdm670
|
||||
firmware-google-sargo
|
||||
hexagonrpcd
|
||||
linux-firmware-ath10k
|
||||
linux-firmware-qca
|
||||
linux-firmware-qcom
|
||||
linux-postmarketos-qcom-sdm670
|
||||
make-dynpart-mappings
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
soc-qcom
|
||||
soc-qcom-modem
|
||||
soc-qcom-qbootctl
|
||||
unl0kr-fbforcerefresh
|
||||
soc-qcom-sdm845
|
||||
soc-qcom-sdm845-qbootctl
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
10-unl0kr-msm.conf
|
||||
81-libssc-google-sargo.rules
|
||||
90-feedbackd-drv2624.rules
|
||||
deviceinfo
|
||||
hexagonrpcd.confd
|
||||
hexagonrpcd-adsp-sensorspd.confd
|
||||
modules-initfs
|
||||
no-hexagonrpcd-on-suspend.sh
|
||||
q6voiced.conf
|
||||
"
|
||||
subpackages="$pkgname-openrc"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
replaces="$pkgname-nonfree-firmware"
|
||||
devicepkg_package $startdir $pkgname
|
||||
|
||||
install -Dm644 "$srcdir"/90-feedbackd-drv2624.rules \
|
||||
-t "$pkgdir"/usr/lib/udev/rules.d
|
||||
# Sensors depend on ADSP firmware and the sensors registry served over FastRPC.
|
||||
install -Dm644 "$srcdir"/hexagonrpcd.confd \
|
||||
"$pkgdir"/usr/share/hexagonrpcd/hexagonrpcd-adsp-sensorspd.conf
|
||||
install -Dm644 "$srcdir"/81-libssc-google-sargo.rules \
|
||||
"$pkgdir"/usr/lib/udev/rules.d/81-libssc-google-sargo.rules
|
||||
install -Dm644 "$srcdir"/10-unl0kr-msm.conf \
|
||||
"$pkgdir"/etc/unl0kr.conf.d/10-unl0kr-msm.conf
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Proprietary firmware blobs for the Google Pixel 3a"
|
||||
replaces="hexagonrpcd-openrc"
|
||||
depends="
|
||||
firmware-google-sargo
|
||||
hexagonrpcd
|
||||
linux-firmware-ath10k
|
||||
linux-firmware-qca
|
||||
linux-firmware-qcom
|
||||
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 "$pkgdir"/etc/conf.d/q6voiced
|
||||
}
|
||||
install -Dm644 "$srcdir"/q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
# Enable HexagonRPCD by default, but not if the user installed this
|
||||
# package then disabled it.
|
||||
install="$subpkgname.post-install"
|
||||
depends="hexagonrpcd-openrc"
|
||||
# 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
|
||||
|
||||
# The FastRPC service is only enabled when non-free firmware is installed.
|
||||
install -Dm755 "$srcdir"/no-hexagonrpcd-on-suspend.sh \
|
||||
@@ -70,10 +79,11 @@ openrc() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f700af3145b79d1ef9edfb22982899b25cabfb212f9620dcbd3a2e6f44b5ad591e0a66056c6fcd66c3fde89a2b5f551e8a8fe2e65cf0e2a48adec57c027d7825 10-unl0kr-msm.conf
|
||||
089ce0acba4e1d789e337bedfca7570796a6416e7230ae9b8fc6b625747a40dbb064b1a707877cd6b7bdc73844c6571316e2ec0746a77060f13d98c52fdbfc00 81-libssc-google-sargo.rules
|
||||
016d398155f2344417f5e5649a361719ba6e53e593c501b5df39114cdd284302b9bf8686a39817aee0c08fec95b3ab613c181d6cc9596299aaf7fd05dbe0c3dd 90-feedbackd-drv2624.rules
|
||||
ad032b1a35cfcd4fc0c8df988430ee97b711e785b86cca68b7552b23a9a2e2b6b97c327e3415a575db47ad6c1f86ded18df5553acaae63010057d89b8c16135e deviceinfo
|
||||
b6208c254b6e44ac4f6d748a38cc6b05da0db2c90235ada2011b138b82ccc3372687df2f5ad97e885e9eea135216a3c52266a08a7f4eb323e62e799f6f82ec7b hexagonrpcd.confd
|
||||
8af19da4e4a4a59c49263722065229fae849c3273af313300b7ea1b8fe008c6e55cfd060b91909306dd600134e2494f740adda245707dbcff84b1ab2f37dbde7 deviceinfo
|
||||
b6208c254b6e44ac4f6d748a38cc6b05da0db2c90235ada2011b138b82ccc3372687df2f5ad97e885e9eea135216a3c52266a08a7f4eb323e62e799f6f82ec7b hexagonrpcd-adsp-sensorspd.confd
|
||||
3213a3586c25cef843a47e2446179ff73acad6421826a64bedb6b9800d30673503d0ea6b3fcc8cfbdcdcaf0926755a489323fce9d14d4411799e6988144b3518 modules-initfs
|
||||
2972005a9cf6ca57061965075593dddfa8ee479bc6c21cd41851b1a14768cb1cddbd31a17975ae17adc36d40d294ccbc6bf83defbd69fc7b363f638d8564fbbc no-hexagonrpcd-on-suspend.sh
|
||||
3a4a9322839d4b3ef9d79668a37840a9f444954759ae3c512e694051d2f9a2573db42ad6c4c1a5c75eeb861232a27ba1a8cef9b503decd54ead25a96e3dd6f98 q6voiced.conf
|
||||
|
||||
File renamed without changes.
@@ -22,6 +22,7 @@ deviceinfo_screen_height="2220"
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
|
||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-snow
|
||||
pkgdesc="Samsung Chromebook"
|
||||
pkgver=9
|
||||
pkgver=7
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
@@ -14,6 +14,7 @@ depends="
|
||||
linux-postmarketos-exynos5
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
postmarketos-initramfs-minimal
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
@@ -55,7 +56,7 @@ sway() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1ead9cae78b4e269d0bd54fc8da938171cb294125509049997a844b4769cd2419421f64bbcfa5fc4da991a77ed124155ec6613abe7a2ba8ba9e7e19440a801e5 deviceinfo
|
||||
475bc214db10d233137e8d9a43bfc4ea0c58e8938e9536fddab6c1d57ed133f37aa3a8ffce196df876af17e7817ccf6894947deaaa624bf3c161298196d866f6 deviceinfo
|
||||
e12a68f919182cb4e6812a5dd13fce8dc15266d2ac16aa5f0a31034f111cb403c020ebaaa4d94309f4baf2f71379327c57c08029e27c506d152695e9a2b04b2b modules-initfs
|
||||
8a8f593694528a9323ef4a0aff7e9c6ad45608957eb042d425663f682885c2f95eb01db4fe87b7c43a90de48f3e5f8b10cab4b13c547b5b0d31b924fcb083cad HiFi.conf
|
||||
b163535da7626e3866faa45768c3888f69f90c98d694650e16a7594a03eb91391e166931eb487901217d983bb2dc4e49b99a2a5531740a7d87f8f4f5c3d0cf59 Snow-I2S-MAX98090.conf
|
||||
|
||||
@@ -18,14 +18,13 @@ 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="quiet loglevel=2"
|
||||
deviceinfo_kernel_cmdline="console=null"
|
||||
deviceinfo_depthcharge_board="snow"
|
||||
deviceinfo_generate_depthcharge_image="true"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
@@ -2,8 +2,8 @@
|
||||
# Maintainer: Jenneron <jenneron@protonmail.com>
|
||||
pkgname=device-google-trogdor
|
||||
pkgdesc="Google Trogdor Chromebooks"
|
||||
pkgver=4
|
||||
pkgrel=1
|
||||
pkgver=3
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
@@ -11,6 +11,7 @@ options="!check !archcheck"
|
||||
depends="
|
||||
alsa-ucm-conf
|
||||
depthcharge-tools
|
||||
eudev-hwids
|
||||
linux-postmarketos-qcom-sc7180
|
||||
postmarketos-base
|
||||
postmarketos-cros-common
|
||||
@@ -41,13 +42,8 @@ nonfree_firmware() {
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
depends="eudev-hwids"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f94dcb175e49cbaadce524586ed1c3e3b0182e414c84c495a5585b49ed40ca6f7fa9c73544d19cbad236333f9fd997f150f836452b47a271f99b7b059972c4bc deviceinfo
|
||||
0a40c43eda1dbb159da59c00b3a1e51fff299a29add210de4d9a16c060da523c358b6d821aa1dd16523bb912d00e1a1837193cce52415f329ac2e171d220f6d3 deviceinfo
|
||||
ef0257928f28aff25e6c625fabfd0942b01d4d86f1b523212ca825cf80f8b7a6c20ff17bfb02cb19f2a5d8787326ba22ad560a957c8d3c38b9ec70f1e16f9117 modules-initfs
|
||||
"
|
||||
Loaded 100 of 1939 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user