Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cca148aa31 | ||
|
|
bb1766d55e | ||
|
|
716ba7af3b | ||
|
|
33dd882b22 | ||
|
|
8c7a168b28 |
No files matched your search
+1
-1
@@ -89,7 +89,7 @@ update_linux_next() {
|
||||
|
||||
git remote add gitlab https://pmos-ci:"$PMAPORTS_PUSH_TOKEN"@gitlab.postmarketos.org/postmarketOS/pmaports.git
|
||||
git fetch gitlab
|
||||
git checkout --track gitlab/main
|
||||
git checkout --track gitlab/master
|
||||
|
||||
for pkg in $PKGS; do
|
||||
case "$pkg" in
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add py3-pip make git
|
||||
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/main
|
||||
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/master
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
|
||||
+10
-4
@@ -1,4 +1,4 @@
|
||||
image: registry.alpinelinux.org/img/alpine:3.24
|
||||
image: registry.alpinelinux.org/img/alpine:latest
|
||||
stages:
|
||||
- build
|
||||
- hardware tests
|
||||
@@ -82,13 +82,13 @@ build:
|
||||
|
||||
# Include all the devices that need and can to be tested
|
||||
|
||||
{% for device in devices_under_test %}
|
||||
{% for device in devices_under_test if device.is_present_in_ci %}
|
||||
prepare-{{ device.name }}:
|
||||
stage: hardware tests
|
||||
extends:
|
||||
.pmos-ci-tron-build-boot-artifacts
|
||||
{%- if device.has_kernel_variants %}
|
||||
# Build all the boot artifacts for all the supported kernel variants in
|
||||
# Let's build all the boot artifacts for all the supported kernel variants in
|
||||
# different jobs, but hide them behind a single job name so as not to pollute
|
||||
# the pipeline.
|
||||
parallel:
|
||||
@@ -112,8 +112,10 @@ prepare-{{ device.name }}:
|
||||
|
||||
.test-{{ device.name }}:
|
||||
stage: hardware tests
|
||||
extends:
|
||||
- .pmos-ci-tron-initramfs-test
|
||||
{%- if device.has_kernel_variants %}
|
||||
# Test all the kernels in different jobs, but hide them behind a single
|
||||
# Let's test all the kernels in different jobs, but hide them behind a single
|
||||
# job name so as not to pollute the pipeline.
|
||||
parallel:
|
||||
matrix:
|
||||
@@ -133,6 +135,10 @@ prepare-{{ device.name }}:
|
||||
{%- endif %}
|
||||
variables:
|
||||
CI_TRON__PMB_BUILD_JOB: "prepare-{{ device.name }}{% if device.has_kernel_variants %}: [$KERNEL_VARIANT]{% endif %}"
|
||||
# FIXME: cmdline is hardcoded here, but ideally would be built from
|
||||
# fragments using generate-kernel-cmdline...
|
||||
# See: https://gitlab.freedesktop.org/gfx-ci/ci-tron/-/issues/317
|
||||
CI_TRON_KERNEL_CMDLINE__DEVICEINFO: 'console=tty1 console=ttyS0,115200 PMOS_FORCE_PARTITION_RESIZE psi=1'
|
||||
|
||||
# Include the gitlab ci yml fragment, as found in
|
||||
# `device/$category/device-$devicename/gitlab-ci.yml.j2` which defines the jobs
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
# Description: Ensure that we're not depending on a too new pmbootstrap version.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add coreutils curl jq
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
pmbootstrap_min_age_days="30"
|
||||
pmbootstrap_min_version_field="$(grep pmbootstrap_min_version= pmaports.cfg)"
|
||||
pmbootstrap_min_version="${pmbootstrap_min_version_field#*=}"
|
||||
|
||||
tag_date=$(curl -s "https://gitlab.postmarketos.org/api/v4/projects/postmarketOS%2Fpmbootstrap/repository/tags/$pmbootstrap_min_version" \
|
||||
| jq -r ".created_at")
|
||||
|
||||
tag_age_timestamp=$(date -d "$tag_date" +"%s")
|
||||
acceptable_age_timestamp=$(date -d "$pmbootstrap_min_age_days days ago" +"%s")
|
||||
|
||||
echo "NOTE: pmbootstrap versions must be at least $pmbootstrap_min_age_days days old to be the minimum required version"
|
||||
|
||||
if [ "$tag_age_timestamp" -ge "$acceptable_age_timestamp" ]; then
|
||||
echo "ERROR: pmbootstrap version '$pmbootstrap_min_version' is too new!"
|
||||
exit 1
|
||||
else
|
||||
echo "PASS: pmbootstrap version '$pmbootstrap_min_version' is acceptable"
|
||||
exit 0
|
||||
fi
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk add git python3
|
||||
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/main
|
||||
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/master
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
|
||||
-51
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# shellcheck shell=busybox
|
||||
|
||||
# Description: check various bad patterns with grep
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
@@ -132,54 +129,6 @@ if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Find all moved, added, or generally modified kernel APKBUILDs
|
||||
MODIFIED_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\|downstream\)/linux-.*/APKBUILD" || true)
|
||||
|
||||
if [ -n "$MODIFIED_KERNEL_PACKAGES" ]; then
|
||||
# Disallow installing kernel modules outside /usr/
|
||||
_bad_module_path_packages=""
|
||||
for package in $MODIFIED_KERNEL_PACKAGES; do
|
||||
# Check for INSTALL_MOD_PATH being set
|
||||
if grep -qr 'INSTALL_MOD_PATH="$pkgdir"' "$package"; then
|
||||
# Check if INSTALL_MOD_PATH is set to install to usr
|
||||
if ! grep -qr 'INSTALL_MOD_PATH="$pkgdir"/usr' "$package"; then
|
||||
# If INSTALL_MOD_PATH doesn't include usr, add package to list and
|
||||
# setup failure
|
||||
_bad_module_path_packages="$_bad_module_path_packages $package"
|
||||
_module_error=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# Fail with error and pretty print bad packages for logging
|
||||
if [ -n "$_module_error" ]; then
|
||||
echo "ERROR: Please set INSTALL_MOD_PATH to '\"\$pkgdir\"/usr'."
|
||||
for package in $_bad_module_path_packages; do
|
||||
printf "$package\n"
|
||||
done
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disallow adding packages without a maintainer set
|
||||
NEW_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=A "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true)
|
||||
|
||||
if [ -n "$NEW_APKBUILDS" ]; then
|
||||
if [ -n "$(grep -L '^maintainer="[^"]\+"$' $NEW_APKBUILDS || true)" ]; then
|
||||
echo "ERROR: A new package does not have a maintainer set."
|
||||
grep --color=always -L '^maintainer="[^"]\+"$' $NEW_APKBUILDS
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get latest commit message in MR
|
||||
case "$CI_COMMIT_DESCRIPTION" in
|
||||
*"[ci:skip-grep]"*)
|
||||
echo "WARNING: not checking packages with grep"
|
||||
echo " ([ci:skip-grep])!"
|
||||
exit_code=0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
exit "$exit_code"
|
||||
@@ -38,10 +38,6 @@ def get_kconfigcheck_categories() -> list [str]:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if common.commit_message_has_string("[ci:skip-apkbuild-lint]"):
|
||||
print("WARNING: not linting deviceinfo files ([ci:skip-apkbuild-lint])")
|
||||
exit(0)
|
||||
|
||||
kconfigcheck_categories = get_kconfigcheck_categories()
|
||||
custom_valid_options += kconfigcheck_categories
|
||||
os.environ["CUSTOM_VALID_OPTIONS"] = " ".join(custom_valid_options)
|
||||
@@ -61,20 +57,7 @@ if __name__ == "__main__":
|
||||
if len(apkbuilds_filtered) < 1:
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
print("Running apkbuild-lint...")
|
||||
print("")
|
||||
|
||||
ret = 0
|
||||
for apkbuild in apkbuilds_filtered:
|
||||
try:
|
||||
cmd = ["apkbuild-lint", apkbuild]
|
||||
subprocess.run(cmd, text=True, check=True)
|
||||
except subprocess.CalledProcessError as exception:
|
||||
ret = exception.returncode
|
||||
|
||||
print("")
|
||||
if ret == 0:
|
||||
print("Success")
|
||||
|
||||
sys.exit(ret)
|
||||
try:
|
||||
subprocess.run(["apkbuild-lint", *apkbuilds_filtered], text=True, check=True)
|
||||
except subprocess.CalledProcessError as exception:
|
||||
sys.exit(exception.returncode)
|
||||
@@ -24,7 +24,7 @@ def get_package_contents(package, revision, check=True):
|
||||
if not check:
|
||||
stderr = subprocess.DEVNULL
|
||||
|
||||
# Run something like "git show upstream/main:main/hello-world/APKBUILD"
|
||||
# Run something like "git show upstream/master:main/hello-world/APKBUILD"
|
||||
pmaports_dir = common.get_pmaports_dir()
|
||||
pattern = pmaports_dir + "/**/" + package + "/APKBUILD"
|
||||
path = glob.glob(pattern, recursive=True)[0][len(pmaports_dir + "/"):]
|
||||
@@ -137,7 +137,7 @@ def check_versions(packages):
|
||||
pkgver = head.rpartition('-r')[0]
|
||||
if package.startswith('device-') and not pkgver.isdigit():
|
||||
print(f" - {package}: invalid pkgver \"{pkgver}\""
|
||||
"See: https://docs.postmarketos.org/pmaports/main/packaging-guidelines.html#package-versioning-pkgver-pkgrel")
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
|
||||
# Additional checks for device packages
|
||||
@@ -145,11 +145,27 @@ def check_versions(packages):
|
||||
head_parsed = get_package_contents(package, "HEAD", False)
|
||||
upstream_parsed = get_package_contents(package, commit, False)
|
||||
|
||||
# Check that pkgrel was reset to 0 when pkgver was changed
|
||||
if head_parsed["pkgver"] != upstream_parsed["pkgver"] and head_parsed["pkgrel"] != "0":
|
||||
print(f" - {package}: pkgrel should be 0 when pkgver changes."
|
||||
"See: https://docs.postmarketos.org/pmaports/main/packaging-guidelines.html#package-versioning-pkgver-pkgrel")
|
||||
error = True
|
||||
# checksums did not change
|
||||
if head_parsed["sha512sums"] == upstream_parsed["sha512sums"]:
|
||||
# Check that pkgver did not change
|
||||
if head_parsed["pkgver"] != upstream_parsed["pkgver"]:
|
||||
print(f" - {package}: pkgver should not change when package source checksums did not change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
# We do not check for a bumped pkgrel, because not everything
|
||||
# needs it, e.g: pmb_recommends
|
||||
# checksums changed
|
||||
else:
|
||||
# Check that pkgrel was reset to 0
|
||||
if head_parsed["pkgrel"] != "0":
|
||||
print(f" - {package}: pkgrel should be 0 when package source checksums change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
# Check that pkgver was changed
|
||||
if head_parsed["pkgver"] == upstream_parsed["pkgver"]:
|
||||
print(f" - {package}: pkgver should change when package source checksums change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
|
||||
# Compare head and upstream versions
|
||||
result = pmb.parse.version.compare(head, upstream)
|
||||
|
||||
@@ -90,7 +90,7 @@ def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--booting", help="devices must be in the upper table,"
|
||||
" being in the 'not booting' table below is not"
|
||||
" enough (all devices in pmaports main and stable"
|
||||
" enough (all devices in pmaports master and stable"
|
||||
" branches and should be in the upper table)",
|
||||
action="store_true")
|
||||
parser.add_argument("--path", help="instead of downloading the devices"
|
||||
|
||||
+3
-10
@@ -48,7 +48,7 @@ def run_pmbootstrap(parameters):
|
||||
@cache
|
||||
def get_upstream_branch():
|
||||
""" Use pmaports.cfg from current branch (e.g. "v20.05_fix-ci") and
|
||||
channels.cfg from main to retrieve the upstream branch.
|
||||
channels.cfg from master to retrieve the upstream branch.
|
||||
|
||||
:returns: branch name, e.g. "v20.05" """
|
||||
|
||||
@@ -65,7 +65,7 @@ def get_upstream_branch():
|
||||
|
||||
# Get branch_pmaports (e.g. "v20.05") from channels.cfg
|
||||
# https://postmarketos.org/channels.cfg
|
||||
channels_cfg_str = run_git(["show", "upstream/main:channels.cfg"])
|
||||
channels_cfg_str = run_git(["show", "upstream/master:channels.cfg"])
|
||||
channels_cfg = configparser.ConfigParser()
|
||||
channels_cfg.read_string(channels_cfg_str)
|
||||
assert channel in channels_cfg, \
|
||||
@@ -139,14 +139,7 @@ def get_changed_packages(skip_archived: bool = False):
|
||||
# Skip files:
|
||||
# * in the root dir of pmaports (e.g. README.md)
|
||||
# * path with a dot (e.g. .ci/, device/.shared-patches/)
|
||||
# * documentation
|
||||
if (
|
||||
not dirname
|
||||
or file.startswith(".")
|
||||
or "/." in file
|
||||
or skip_archived and dirname.startswith("device/archived")
|
||||
or dirname == "docs"
|
||||
):
|
||||
if not dirname or file.startswith(".") or "/." in file or skip_archived and dirname.startswith("device/archived"):
|
||||
continue
|
||||
|
||||
if filename != "APKBUILD":
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import common
|
||||
import glob
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -12,15 +11,9 @@ if __name__ == "__main__":
|
||||
if common.commit_message_has_string("[ci:skip-dint]"):
|
||||
print("WARNING: not linting deviceinfo files ([ci:skip-dint])")
|
||||
exit(0)
|
||||
|
||||
if "deviceinfo_schema.toml" in common.get_changed_files():
|
||||
print("deviceinfo_schema.toml changed -> checking all deviceinfo files")
|
||||
pmaports_dir = common.get_pmaports_dir()
|
||||
deviceinfo_files = set(glob.glob(pmaports_dir + "/device/*/*/deviceinfo"))
|
||||
else:
|
||||
# only lint deviceinfo files in the devices repo
|
||||
deviceinfo_files = {file for file in common.get_changed_files()
|
||||
if os.path.basename(file) == "deviceinfo" and file.startswith("device/")}
|
||||
# only lint deviceinfo files in the devices repo
|
||||
deviceinfo_files = {file for file in common.get_changed_files()
|
||||
if os.path.basename(file) == "deviceinfo" and file.startswith("device/")}
|
||||
|
||||
try:
|
||||
subprocess.run(["dint", "check", *deviceinfo_files], text=True, check=True)
|
||||
|
||||
@@ -44,6 +44,10 @@ class Device:
|
||||
|
||||
return Template(fragment_tmpl).render(device=self)
|
||||
|
||||
@property
|
||||
def is_present_in_ci(self):
|
||||
return bool(self.gitlab_ci_fragment)
|
||||
|
||||
@cached_property
|
||||
def pmaports_path(self) -> Path:
|
||||
# Find the root of pmaports
|
||||
@@ -73,7 +77,7 @@ class Device:
|
||||
return {"postmarketos-mkinitfs-hook-ci"}
|
||||
|
||||
@cached_property
|
||||
def package_dependencies(self) -> set[str]:
|
||||
def package_dependencies(self) -> list[str]:
|
||||
# HACK: Work around a bug in depends_recurse which prevents listing all the dependencies
|
||||
# Bug: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2623
|
||||
return {"postmarketos-initramfs"}
|
||||
@@ -125,7 +129,7 @@ class Device:
|
||||
dev = cls(device.codename)
|
||||
|
||||
# Ignore devices that do not have a gitlab ci fragment,
|
||||
# since adding that fragment is how we mark them as DUTs
|
||||
# since we won't be able to make use of them
|
||||
if not dev.gitlab_ci_fragment:
|
||||
continue
|
||||
|
||||
@@ -211,9 +215,9 @@ if __name__ == "__main__":
|
||||
archtag={
|
||||
Arch.x86_64: "shared",
|
||||
Arch.x86: "shared",
|
||||
Arch.aarch64: "aarch64",
|
||||
Arch.armv7: "armv7",
|
||||
Arch.armhf: "armhf",
|
||||
Arch.aarch64: "arm64",
|
||||
Arch.armv7: "qemu",
|
||||
Arch.armhf: "qemu",
|
||||
Arch.riscv64: "qemu",
|
||||
Arch.ppc64le: "ppc64le",
|
||||
Arch.loongarch64: "loongarch64",
|
||||
|
||||
@@ -36,28 +36,17 @@ if __name__ == "__main__":
|
||||
# aports later. We might be given a changed aport from e.g. extra-repos/systemd when
|
||||
# that repo is not enabled
|
||||
buildable_pkgs = set()
|
||||
archived = set()
|
||||
for path in pmb.core.pkgrepo.pkgrepo_iter_package_dirs():
|
||||
# Store archived packages for matching later
|
||||
if os.path.split(os.path.split(path)[0])[1] == 'archived':
|
||||
archived.add(os.path.basename(path))
|
||||
continue
|
||||
buildable_pkgs.add(os.path.basename(path))
|
||||
|
||||
# To store a list of packages from extra-repos/systemd for special handling
|
||||
# later:
|
||||
systemd_pkgs = list()
|
||||
|
||||
# Filter out packages are not found in enabled repos or are in archived
|
||||
# Filter out packages are not found in enabled repos
|
||||
# (Iterate over copy of packages, because we modify it in this loop)
|
||||
for package in packages.copy():
|
||||
if package not in buildable_pkgs:
|
||||
# Specifically handle archived since it could include packages
|
||||
# who's sources are dead
|
||||
if package in archived:
|
||||
print(f"{package}: archived, skipping")
|
||||
packages.remove(package)
|
||||
continue
|
||||
print(f"{package}: not in current repo, skipping")
|
||||
packages.remove(package)
|
||||
# FIXME: this should probably be more generic, if other repos are added
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
# Description: static type checking for python scripts
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add py3-argcomplete py3-pip py3-pytest
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
pip install --break-system-packages --no-warn-script-location mypy
|
||||
# Need to change directory for pyproject.toml to be picked up.
|
||||
cd .ci
|
||||
python -m mypy .
|
||||
@@ -1,2 +0,0 @@
|
||||
[tool.mypy]
|
||||
disable_error_code = ["import-not-found"]
|
||||
@@ -16,9 +16,6 @@ fi
|
||||
sh_files="
|
||||
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
||||
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-dns-filter.sh
|
||||
./main/postmarketos-duranium/rootfs-usr-bin-duranium-set-channel
|
||||
./main/postmarketos-duranium/rootfs-usr-libexec-duranium-first-boot
|
||||
./main/postmarketos-duranium/rootfs-usr-libexec-duranium-usb-gadget-setup
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ instance/
|
||||
|
||||
# Documentation
|
||||
public
|
||||
docs/packaging/device-packages/deviceinfo-reference.md
|
||||
docs/deviceinfo-reference.md
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
@@ -62,18 +62,6 @@ ruff:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/ruff.sh
|
||||
|
||||
# testcases typechecking
|
||||
mypy:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- .ci/**/*
|
||||
- .gitlab-ci.yml
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/mypy.sh
|
||||
|
||||
# shellcheck and various grep checks
|
||||
shellcheck-grep:
|
||||
stage: lint
|
||||
@@ -111,9 +99,6 @@ pytest-commits:
|
||||
|
||||
# APKBUILD linting
|
||||
aport-lint:
|
||||
# alpine:latest doesn't have the most recent atools-go, which means we would
|
||||
# miss some linting rules that were added upstream. Use alpine:edge instead.
|
||||
image: alpine:edge
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
@@ -131,7 +116,6 @@ dint:
|
||||
- .ci/**/*
|
||||
- .gitlab-ci.yml
|
||||
- device/*/device-*/deviceinfo
|
||||
- deviceinfo_schema.toml
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/dint.sh
|
||||
@@ -175,18 +159,6 @@ mr-settings:
|
||||
- wget -q "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/check_mr_settings.py"
|
||||
- python3 ./check_mr_settings.py
|
||||
|
||||
pmbootstrap minimum version:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- .ci/check-pmbootstrap-min-version.sh
|
||||
- .gitlab-ci.yml
|
||||
- pmaports.cfg
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/check-pmbootstrap-min-version.sh
|
||||
|
||||
# Calculate build of changed aports using a dynamic downstream pipelines:
|
||||
# https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#dynamic-child-pipelines
|
||||
# For those to work, we need two jobs:
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
<!--
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`main` branch)
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v25.12`
|
||||
* [ ] `v26.06`
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
@@ -36,7 +35,7 @@
|
||||
#### Environments
|
||||
* [ ] COSMIC
|
||||
* [ ] GNOME Shell on Mobile
|
||||
* [ ] Phosh (*Please attach the debug information of the Mobile settings app, see [this video](https://peertube.debian.social/w/4GwDjCJNcAmp8cb7dqXz1T) or use `phosh-mobile-settings -d`*)
|
||||
* [ ] Phosh
|
||||
* [ ] Plasma Mobile
|
||||
* [ ] Sxmo (Wayland/Sway) **Please post the output of `sxmo_version.sh`**
|
||||
* [ ] Other: **Please fill out**
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<!-- Use this template to kick off the discussion for a package with (presumably)
|
||||
inactive maintainers and the future for the maintainership of the package.
|
||||
-->
|
||||
|
||||
### Information
|
||||
|
||||
* Package name:
|
||||
* Maintainers of the package:
|
||||
* MR that had no maintainer response, if applicable:
|
||||
|
||||
If the maintainers don't reply within two weeks of opening this issue, the
|
||||
package is considered orphaned and, in the case of device packages, the devices
|
||||
will be moved to the archived category.
|
||||
|
||||
/label ~maintainership-status
|
||||
@@ -1,25 +0,0 @@
|
||||
<!-- Use this template to notify community kernel maintainers that their
|
||||
kernels are out-of-date and start the timer for moving them to testing.
|
||||
|
||||
Please title the issue:
|
||||
Current community kernels not meeting version requirement (yyyy-mm-dd)
|
||||
-->
|
||||
|
||||
Hi, as per our
|
||||
[device categorization requirements for the community category](https://docs.postmarketos.org/pmaports/main/device-categorization.html#community),
|
||||
devices in the community category may not use a kernel version older than 6
|
||||
months.
|
||||
|
||||
As of today (yyyy-mm-dd), the following kernels do not meet this requirement:
|
||||
|
||||
* kernel-pkgname: kernel-pkgver, version-release-date (maintainers: @ ...)
|
||||
|
||||
This issue is an attempt to notify you (the maintainers) of the situation so
|
||||
that you can update the packages. As per the rules, you have two weeks to
|
||||
update the packages or reply with a request for more time, up to one month
|
||||
of time from the moment this issue is opened. If that time passes and the
|
||||
devices still no longer meet the requirements, they will be moved to testing.
|
||||
|
||||
/label ~"device-category::community"
|
||||
/label ~kernel
|
||||
/label ~"type::policy"
|
||||
@@ -1,29 +0,0 @@
|
||||
<!--
|
||||
This template is for marking a postmarketOS stable release as EOL.
|
||||
|
||||
Name this issue "vYY.MM EOL".
|
||||
-->
|
||||
|
||||
When the release has reached its EOL date:
|
||||
|
||||
- [ ] `postmarketos-base-ui`: let it depend on
|
||||
`postmarketos-release-upgrade-notification` and bump pkgrel
|
||||
- [ ] ensure it builds locally with pmbootstrap
|
||||
- [ ] push it to the branch
|
||||
- [ ] make sure bpo built and released the updated packages
|
||||
- [ ] drop the old release from
|
||||
[monitoring](https://gitlab.postmarketos.org/postmarketOS/monitoring)
|
||||
- [ ] drop the "oldold -> old" release check from
|
||||
[postmarketos-release-upgrade](https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/)
|
||||
CI
|
||||
- [ ] bpo: configure images so they don't get built for the old release anymore
|
||||
- [ ] bpo: configure branches so we don't try to build packages for old
|
||||
branches anymore
|
||||
- e.g. on startup all branches are checked for new packages, we should keep
|
||||
the amount of branches that get checked minimal
|
||||
- [ ] pmaports.git channels.cfg: change description:
|
||||
- "Old release (unsupported)"
|
||||
- [ ] Update the [Releases](https://docs.postmarketos.org/pmaports/main/releases.html) page
|
||||
- Move the release from active to old
|
||||
- [ ] Consider removing images for the previous releases to save disk space
|
||||
(people can build their own images with pmbootstrap if needed)
|
||||
@@ -1,234 +0,0 @@
|
||||
<!--
|
||||
This template is for creating a new postmarketOS stable release.
|
||||
|
||||
Name this issue "vYY.MM Infrastructure".
|
||||
-->
|
||||
|
||||
Person in charge of the release (doesn't have to do all the work, but has to
|
||||
push it forward):
|
||||
<!-- Put your usename here and assign yourself to this issue -->
|
||||
|
||||
### 0. Preparation
|
||||
- [ ] Create the gitlab milestone for the release
|
||||
- [ ] Add this infrastructure issue to the milestone
|
||||
- [ ] Update the
|
||||
[timeline](https://docs.postmarketos.org/policies-and-processes/development/releases/current-timeline.html)
|
||||
for the next release
|
||||
|
||||
### 1. Pre-Build phase
|
||||
|
||||
This phase is to get some extra time for building packages. The branch will be rebased once in the branch phase.
|
||||
|
||||
#### Requirements
|
||||
|
||||
- [ ] Alpine's main repository must be built and published
|
||||
- [ ] Alpine's community repository must be built and published
|
||||
<small>Without this, bpo won't be able to build packages but steps before
|
||||
that can be done already.</small>
|
||||
|
||||
#### pmbootstrap: adjust config
|
||||
- [ ] Update `pmb/config/__init__.py:apk_tools_min_version`. This should be a
|
||||
trivial change, push it directly to main.
|
||||
- [ ] (can be done later, at start of test phase) make a new [pmbootstrap
|
||||
release](https://wiki.postmarketos.org/wiki/Pmbootstrap_release) <small>bpo
|
||||
uses the main branch, so it will be fine without a release, however users
|
||||
will want to try out the new release and may not run main.</small>
|
||||
|
||||
#### pmaports: create branch and initial changes
|
||||
- [ ] `git checkout -b vYY.MM main`
|
||||
- [ ] Create a `=== Branch vYY.MM from main ===` commit
|
||||
- Remove channels.cfg (should only be in main)
|
||||
- Adjust `pmaports.cfg`: Change `channel=edge` to `channel=vYY.MM`
|
||||
- Adjust `pmaports.cfg`: Change `supported_arches` to `x86_64,aarch64,armv7`
|
||||
- Delete `.ci/build-*` scripts for other arches
|
||||
<small>`pmbootstrap ci` reads these</small>
|
||||
- [ ] `git push`
|
||||
- [ ] Ensure the branch is protected in the
|
||||
[repository settings](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/settings/repository)
|
||||
|
||||
#### pmaports: update main branch
|
||||
- [ ] `git checkout main`
|
||||
- [ ] Add the new branch to
|
||||
[channels.cfg](https://wiki.postmarketos.org/wiki/Channels.cfg_reference):
|
||||
- [Example](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/c43571ceaf9b8155519bc9fb760bdeccd96e7e9c)
|
||||
- Check if you need to set `branch_aports=master` initially if the stable
|
||||
branch does not exist yet.
|
||||
- [ ] `git push`
|
||||
|
||||
#### pmaports: update os-release / remove packages / aportgen
|
||||
- [ ] `git checkout vYY.MM`
|
||||
- [ ] Update `postmarketos-base`:
|
||||
- [ ] Set version info for `/usr/lib/os-release` in
|
||||
`main/postmarketos-base/rootfs-usr-lib-os-release`
|
||||
(`PRETTY_NAME="postmarketOS vYY.MM"`, `VERSION_ID="vYY.MM"`,
|
||||
`VERSION="vYY.MM"`)
|
||||
- `pmbootstrap pkgrel_bump postmarketos-base`
|
||||
- `pmbootstrap config mirrors.pmaports none`
|
||||
- `pmbootstrap config mirrors.systemd none`
|
||||
- `pmbootstrap checksum postmarketos-base`
|
||||
- `git commit -s` (`Remove packages that we don't have in stable`)
|
||||
- [ ] Remove packages:
|
||||
- `cross/*-armhf` and other unsupported arches in cross dir (keep `gcc-x86` and `musl-dev-x86`, `systemd-boot-x86`)
|
||||
- `gcc4*` and `gcc6*` from main and cross dirs
|
||||
- `device/downstream`, `device/archived`
|
||||
- `extra-repos/systemd/postmarketos-repo-nightly`
|
||||
- [ ] Run `pmbootstrap aportgen` for packages in cross:
|
||||
- `cd cross; PMB_APK_FORCE_MISSING_REPOSITORIES=1 pmbootstrap aportgen musl-* grub-efi-x86`
|
||||
- `git commit -s` (`cross: regenerate for vYY.MM`)
|
||||
- [ ] `git push`
|
||||
|
||||
#### bpo: adjust config
|
||||
- [ ] Add the branch to the
|
||||
[build.postmarketos.org](https://gitlab.postmarketos.org/postmarketOS/build.postmarketos.org)
|
||||
config in `bpo/config/const/__init__.py:branches` below `branches["main"]`,
|
||||
so it builds with lower priority than main until it's released. Set `ignore_errors` to `True`.
|
||||
- [ ] Make a merge request, wait until CI passes, merge it (or if you can directly push to main that's also fine since it's a trivial change)
|
||||
- [ ] Roll it out/ask somebody who can do that
|
||||
- [ ] Restart bpo, it will start building `x86_64` packages
|
||||
|
||||
#### Bootstrap of binary packages
|
||||
- [ ] Fix all failing `x86_64` packages (Remember: patches need to go through
|
||||
edge first, then get backported to the stable branch!)
|
||||
- Try to get build fixes merged to edge quickly, ask for reviews in
|
||||
#postmarketos-devel, and consider merging trivial fixes right after they
|
||||
pass CI.
|
||||
- Devices in testing and archived categories that don't build: consider
|
||||
trying to fix them, or just delete them from the branch
|
||||
- [ ] Wait until all packages for `x86_64` (main repository, we don't need to
|
||||
wait for the systemd repository before continuing) are built and
|
||||
published
|
||||
- [ ] Enable arm repositories in the BPO config
|
||||
- [ ] Get all packages to build without errors
|
||||
|
||||
#### Wallpaper poll
|
||||
- [ ] Team meeting: make a short list of 4 wallpapers from [the
|
||||
pool](https://gitlab.postmarketos.org/postmarketOS/artwork/-/tree/main/wallpapers/2024)
|
||||
- [ ] Make a poll on the wallpapers on mastodon
|
||||
([example](https://fosstodon.org/@postmarketOS/113624366198561582))
|
||||
- Make sure to thank the wallpaper authors (usually dikasp) for the amazing
|
||||
work on the wallpapers
|
||||
- Put the names of the wallpapers on top of the wallpapers for easier voting
|
||||
and as alt text
|
||||
- Create a comment with poll options
|
||||
|
||||
#### Adjust CI
|
||||
- [ ] Make sure pmaports.git CI runs through on the new branch (run
|
||||
`pmbootstrap ci`). Examples of why it might fail:
|
||||
- One postmarketos-ui package has a package from alpine testing in their
|
||||
_pmb_recommends.
|
||||
- Remove the UI if it is not used much (can bring it back on demand) or
|
||||
fork the package to the new branch
|
||||
- Consider fixing it in edge, so we don't run into this with the next
|
||||
release
|
||||
- [ ] Adjust
|
||||
[upstream-compat](https://gitlab.postmarketos.org/postmarketOS/continuous-testing/upstream-compat)
|
||||
to run on the new release and make sure it passes
|
||||
([example](https://gitlab.postmarketos.org/postmarketOS/continuous-testing/upstream-compat/-/merge_requests/10))
|
||||
|
||||
#### Adjust release upgrade script
|
||||
- [ ] Add the new release to `upgrade.sh` in [postmarketos-release-upgrade](https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/)
|
||||
- [ ] Bump `SCRIPT_VERSION`, tag a new release
|
||||
- [ ] Package it for edge (make MR), backport it to the new release, but NOT to
|
||||
the old release yet (otherwise users may upgrade by accident, without
|
||||
realizing that the new version is not out yet!)
|
||||
- [ ] Adjust CI of postmarketos-release-upgrade to test the new release too
|
||||
(`git grep` for the previous release to see what needs to be adjusted)
|
||||
|
||||
#### Update the wallpaper
|
||||
- [ ] Set the wallpaper that won in the poll in edge, backport this change to
|
||||
the stable release branch
|
||||
|
||||
### 2. Branch phase
|
||||
|
||||
#### Rebase on main
|
||||
- [ ] `git checkout vYY.MM`
|
||||
- [ ] `git rebase -i origin/main`
|
||||
- [ ] Temporarily enable force-push for the `vYY.MM` branch
|
||||
- [ ] `git push --force-with-lease`
|
||||
- [ ] Disable force-push for the `vYY.MM` branch again
|
||||
|
||||
#### Update BPO config
|
||||
- [ ] Update bpo's images config to build images for the new branch for all
|
||||
devices in community and main
|
||||
- [ ] bpo: configure the new branch to be not WIP anymore
|
||||
- [ ] Roll-out bpo changes
|
||||
|
||||
#### pmb release done?
|
||||
- [ ] Ensure that a pmbootstrap release been made with the apk-tools min
|
||||
version change
|
||||
|
||||
#### aports stable branch set?
|
||||
* [ ] Check if a stable branch exists in `aports` for the new release, and that
|
||||
it is being used in `channels.cfg` (might still be set to `master` if it
|
||||
did not exist during the Pre-Branch phase).
|
||||
|
||||
### 3. Test phase
|
||||
- [ ] Create an issue in pmaports with a checklist of devices and UIs in main
|
||||
and community (see previous issue for reference)
|
||||
- Tag the testers of each device and UI
|
||||
- Ask to verify that the images work as expected
|
||||
- Release upgrade script: when coming from the previous release, grab it from
|
||||
main: `wget https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/-/raw/main/upgrade.sh`
|
||||
- [ ] Announce the new phase in the testing chat - and ask them to do the
|
||||
testing within one week, as in the timeline.
|
||||
- Prioritize merging fixes from maintainers (they do the heavy lifting in the
|
||||
testing and fixing phase, see timetable)
|
||||
- Make sure to properly cherry pick fixes from MRs to edge, if they are
|
||||
intended for the upcoming release
|
||||
- [ ] Add new version to the pmaports gitlab issue template (.gitlab dir)
|
||||
|
||||
### 4. Release phase
|
||||
- [ ] Did a reasonable amount of devices get tested? (we may consider dropping
|
||||
devices that were not tested)
|
||||
- [ ] Make sure all fixes are in
|
||||
- [ ] Make sure new images are generated *with* the fixes (unless it's a fix
|
||||
for something that doesn't impact the experience much and is fine to get with
|
||||
the first update after installing)
|
||||
- [ ] Announce the new phase in the testing chat, together with the planned
|
||||
date of blog post release (and testing)
|
||||
|
||||
#### Write blog post
|
||||
- [ ] Write a blog post for the new release in `postmarketos.org.git`:
|
||||
- Look at the previous release blog post and try to make the new one
|
||||
consistent with it
|
||||
- Highlight major changes since the last release
|
||||
(see the release notes issue)
|
||||
- Mention new devices, and total list of devices
|
||||
- Count devices that have their own wiki page as separate device
|
||||
- E.g. OnePlus 6, 6T are two devices (two wiki pages), but variants of
|
||||
"Samsung Galaxy A3 (2015)" are one device (one wiki page)
|
||||
- Don't count/list devices for which we don't build images (e.g.
|
||||
qemu-amd64)
|
||||
- Adjust the homepage config to point to the new release in the downloads
|
||||
page
|
||||
- update `config/download.py`:
|
||||
- `latest_release`
|
||||
- update devices and categories. only list the ones where we actually build images.
|
||||
- Add some cool photos
|
||||
- Submit the blog post as MR to postmarketos.org.git.
|
||||
- Let the blog post MR close the current release notes issue.
|
||||
- Ask for reviews.
|
||||
|
||||
#### Release!
|
||||
- [ ] Backport the new postmarketos-release-upgrade version that allows
|
||||
upgrading to the new release, to the previous release (don't do this before
|
||||
the release is tested and ready! During the testing phase, we can use
|
||||
postmarketos-release-upgrade from main directly: `wget
|
||||
https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/-/raw/main/upgrade.sh`)
|
||||
- [ ] Add the branch to pkgs.postmarketos.org
|
||||
- [ ] Merge the blog post
|
||||
- [ ] Edit channels.cfg, change descriptions:
|
||||
- New release: "Latest release / Recommended for best stability"
|
||||
- Old release: "Old release (supported until YYYY-MM-DD)" (one month from date of the release)
|
||||
- [ ] Create a milestone for the next release
|
||||
- [ ] Create an issue for the next release notes and attach it to that milestone
|
||||
- [ ] Update the [Releases](https://docs.postmarketos.org/pmaports/main/releases.html) page
|
||||
- Move the new release to the list of active releases, link to the blog post
|
||||
- Update the announcement and title for the release
|
||||
- Add a new upcoming release below
|
||||
- [ ] Update [Template:Latest stable release](https://wiki.postmarketos.org/wiki/Template:Latest_stable_release) on the wiki with the new version
|
||||
- [ ] Update "Default description template for issues" in pmaports (.gitlab dir)
|
||||
- In "On what postmarketOS version did you encounter the issue?", change:
|
||||
- previous release: add " (supported until YYYY-MM-DD)"
|
||||
- add the new release
|
||||
- [ ] Put a reminder in recurring-admin-tasks to drop support for the old release
|
||||
@@ -3,5 +3,3 @@ Casey Connolly <kcxt@postmarketos.org> <caleb@postmarketos.org>
|
||||
Achill Gilgenast <achill@achill.org> <fossdd@pwned.life>
|
||||
Aelin <aelin@postmarketos.org> <adrian@postmarketos.org>
|
||||
Aelin <aelin@postmarketos.org> <adrian@travitia.xyz>
|
||||
Stefan Hansson <newbyte@postmarketos.org> <newbie13xd@gmail.com>
|
||||
Stefan Hansson <newbyte@postmarketos.org> <newbyte@postmarketos.org>
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
# Commit Style
|
||||
# Policy for commits in pmaports
|
||||
|
||||
This document defines policy for organising and titling commits for
|
||||
inclusion in pmaports.
|
||||
@@ -16,9 +16,9 @@ target device.
|
||||
|
||||
## General policy
|
||||
|
||||
We follow
|
||||
[Alpine's aports commit style](https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/COMMITSTYLE.md)
|
||||
with some minor exceptions and additions.
|
||||
We follow Alpine's aports commit style with some minor exceptions
|
||||
and additions. Alpine's commit style can be found here:
|
||||
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/COMMITSTYLE.md
|
||||
|
||||
## Exceptions
|
||||
|
||||
|
||||
@@ -5,12 +5,10 @@ This repository contains the APKBUILD files for postmarketOS-specific packages,
|
||||
There are many more packages defined in the [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/) on which these packages depend.
|
||||
|
||||
Helpful resources:
|
||||
|
||||
* [Issues](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items)
|
||||
* [How to create a package](https://wiki.postmarketos.org/wiki/Create_a_package)
|
||||
* [APKBUILD reference](https://wiki.alpinelinux.org/wiki/APKBUILD_Reference)
|
||||
* [pmaports commit style](./COMMITSTYLE.md)
|
||||
* [Approval rules](docs/merge-requests/approval-rules.md)
|
||||
* [Review and merging guidelines](./docs/modules/ROOT/pages/merging-rules.adoc)
|
||||
* [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/)
|
||||
* [Alpine Linux package search](https://pkgs.alpinelinux.org/packages)
|
||||
* [postmarketOS package search](https://pkgs.postmarketos.org/packages)
|
||||
|
||||
+1
-7
@@ -4,16 +4,10 @@ recommended=edge
|
||||
|
||||
[edge]
|
||||
description=Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
|
||||
branch_pmaports=main
|
||||
branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v26.06]
|
||||
description=Upcoming stable release (DO NOT USE)
|
||||
branch_pmaports=v26.06
|
||||
branch_aports=3.24-stable
|
||||
mirrordir_alpine=v3.24
|
||||
|
||||
[v25.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v25.12
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# This package gets installed in the native and foreign arch chroots.
|
||||
# It creates files like /usr/lib/arch-bin-masquerade/armhf/gcc, which
|
||||
# point in the native chroot to the armhf-cross-compiler, and in the
|
||||
# armhf chroot to /usr/bin/gcc. That way compilation works fine, even
|
||||
# when distcc gets the absolute path to the compiler passed (ccache does
|
||||
# that).
|
||||
maintainer=""
|
||||
pkgname=arch-bin-masquerade
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
pkgdesc="Wrappers for ccache + distcc (native and foreign chroots)"
|
||||
url="https://postmarketOS.org"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
options="!check !tracedeps pmb:cross-native"
|
||||
|
||||
package() {
|
||||
# Architectures and binaries
|
||||
_archs="x86_64 armhf armv7 aarch64"
|
||||
_bins="c++ cc cpp g++ gcc"
|
||||
|
||||
# Iterate over architectures
|
||||
for _arch in $_archs; do
|
||||
# Create the arch-specific bin folder
|
||||
_hostspec="$(arch_to_hostspec $_arch)"
|
||||
_bindir="$pkgdir/usr/lib/arch-bin-masquerade/$_arch"
|
||||
mkdir -p "$_bindir"
|
||||
cd "$_bindir"
|
||||
|
||||
# Iterate over binaries and create wrappers
|
||||
for _bin in $_bins; do
|
||||
{
|
||||
echo "#!/bin/sh"
|
||||
if [ "$_arch" == "$CARCH" ]; then
|
||||
echo "exec /usr/bin/${_bin} \"\$@\""
|
||||
else
|
||||
echo "exec /usr/bin/${_hostspec}-${_bin} \"\$@\""
|
||||
fi
|
||||
} > "$_bin"
|
||||
chmod +x "$_bin"
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-aarch64
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=aarch64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-aarch64
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,23 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
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: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"
|
||||
|
||||
case "$CARCH" in
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
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"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -179,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -286,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -588,11 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -634,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -822,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-armhf
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=armhf
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-armhf
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,24 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64 x86_64"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armhf mpc1 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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
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"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -180,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -287,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -589,12 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -636,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -824,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-armv7
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=armv7
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-armv7
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,24 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armv7
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64 x86_64"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-armv7 mpc1 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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
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"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -180,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -287,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -589,12 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -636,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -824,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-loongarch64
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=loongarch64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-loongarch64
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,24 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-loongarch64
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for loongarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64 x86_64"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-loongarch64 mpc1 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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
depends="binutils-loongarch64 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"
|
||||
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-loongarch64 binutils-loongarch64"
|
||||
subpackages="g++-loongarch64:gpp libstdc++-dev-loongarch64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -180,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -287,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -589,12 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -636,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -824,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-ppc64le
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=ppc64le
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-ppc64le
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,24 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-ppc64le
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for ppc64le"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64 x86_64"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-ppc64le mpc1 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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
depends="binutils-ppc64le 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"
|
||||
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-ppc64le binutils-ppc64le"
|
||||
subpackages="g++-ppc64le:gpp libstdc++-dev-ppc64le:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -180,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -287,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -589,12 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -636,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -824,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-riscv64
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=riscv64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-riscv64
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,24 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-riscv64
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for riscv64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64 x86_64"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-riscv64 mpc1 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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
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"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -180,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -287,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -589,12 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -636,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -824,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
+7
-36
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-x86
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=x86
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-x86
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,24 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for x86"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="aarch64 x86_64"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-x86 mpc1 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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
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"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -180,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -287,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -589,12 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -636,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -824,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -1,31 +0,0 @@
|
||||
Provide struct_sock_fprog_sz on Linux, rather than on Linux+glibc.
|
||||
|
||||
With `#include <linux/filter.h>` `struct sock_fprog` is available when
|
||||
linux headers are available. It seems that glibc is just including that header
|
||||
as an implementation detail, while musl does not.
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2025-08-08 08:51:45.621434001 +0200
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp 2026-02-25 20:29:28.519492722 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#include <linux/filter.h>
|
||||
#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
@@ -507,6 +508,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
|
||||
unsigned struct_synth_info_sz = sizeof(struct synth_info);
|
||||
unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
|
||||
+ unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
#endif // SANITIZER_LINUX
|
||||
|
||||
#if SANITIZER_GLIBC
|
||||
@@ -534,7 +536,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
|
||||
|
||||
unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
|
||||
unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
|
||||
- unsigned struct_sock_fprog_sz = sizeof(struct sock_fprog);
|
||||
# endif // SANITIZER_GLIBC
|
||||
|
||||
# if !SANITIZER_ANDROID && !SANITIZER_APPLE
|
||||
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc-x86_64
|
||||
# Based on: main/gcc (from Alpine)
|
||||
|
||||
CTARGET_ARCH=x86_64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,7 +23,6 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
pkgname=gcc-x86_64
|
||||
pkgver=15.2.0
|
||||
# i.e. 13.2.1, must match gcc/BASE-VER
|
||||
@@ -34,23 +34,19 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-x86_64
|
||||
pkgrel=6
|
||||
pkgrel=2
|
||||
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: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"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
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"
|
||||
replaces="libstdc++ binutils"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip !tracedeps"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
: "${LANG_D:=true}"
|
||||
@@ -179,10 +175,7 @@ esac
|
||||
|
||||
# libatomic is a dependency for openvswitch
|
||||
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
||||
if $_libgcc; then
|
||||
depends="$depends libgcc-static$_target"
|
||||
subpackages="$subpackages libgcc::$CTARGET_ARCH libgcc-static$_target:libgccstatic:$CTARGET_ARCH"
|
||||
fi
|
||||
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
||||
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
||||
if $_libgomp; then
|
||||
depends="$depends libgomp=$_gccrel"
|
||||
@@ -286,7 +279,6 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
|
||||
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
|
||||
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
@@ -588,11 +580,7 @@ gpp() {
|
||||
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
|
||||
|
||||
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
|
||||
|
||||
case "$CARCH" in
|
||||
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
|
||||
esac
|
||||
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"
|
||||
|
||||
amove $_gcclibexec/cc1plus
|
||||
amove usr/bin/*++
|
||||
@@ -634,20 +622,6 @@ libgcc() {
|
||||
depends=
|
||||
|
||||
amove usr/lib/libgcc_s.so.*
|
||||
# Symlink for Clang to find the library. Gets overwritten by the real
|
||||
# library if gcc is installed.
|
||||
ln -s /usr/lib/libgcc_s.so.1 \
|
||||
"$subpkgdir"/usr/lib/libgcc_s.so
|
||||
}
|
||||
|
||||
libgccstatic() {
|
||||
pkgdesc="GNU C compiler runtime libraries"
|
||||
depends=
|
||||
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbegin.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtbeginS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/crtendS.o
|
||||
amove usr/lib/gcc/"$CTARGET"/"$pkgver"/libgcc.a
|
||||
}
|
||||
|
||||
libgomp() {
|
||||
@@ -822,7 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
|
||||
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
|
||||
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
|
||||
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
|
||||
5dd452a80c496a587a8826b04a4917045e4028631606e85cabd8e87e0460642d188a2156c4e0cf37a5d88e66ebd08a08393d48a6065045178c69eaba2edd063e 0042-libsanitizer-struct_sock_fprog_sz.patch
|
||||
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
|
||||
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
|
||||
"
|
||||
@@ -0,0 +1,31 @@
|
||||
Enable -D_FORTIFY_SOURCE=2 by default.
|
||||
|
||||
Original patch from:
|
||||
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch
|
||||
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -951,6 +951,9 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default w/optimization. */
|
||||
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
--- a/gcc/doc/gcc.info
|
||||
+++ b/gcc/doc/gcc.info
|
||||
@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level.
|
||||
Please note the warning under '-fgcse' about invoking '-O2' on
|
||||
programs that use computed gotos.
|
||||
|
||||
+ NOTE: In Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is
|
||||
+ activated when `-Os' or `-O1' or higher is used. This enables additional
|
||||
+ compile-time and run-time checks for several libc functions. To disable,
|
||||
+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'.
|
||||
+
|
||||
'-O3'
|
||||
Optimize yet more. '-O3' turns on all optimizations specified by
|
||||
'-O2' and also turns on the '-finline-functions',
|
||||
+17
-63
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc4-aarch64
|
||||
# Based on: main/gcc4 (from postmarketOS)
|
||||
|
||||
CTARGET_ARCH=aarch64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,22 +23,19 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer=""
|
||||
pkgname=gcc4-aarch64
|
||||
pkgver=9999
|
||||
_pkgver=4.9.4
|
||||
pkgrel=10
|
||||
_pkgver=4.9.2
|
||||
pkgrel=7
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="http://gcc.gnu.org"
|
||||
# loongarch64: not supported
|
||||
# ppc64le, riscv64: doesn't build
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
license="GPL LGPL"
|
||||
_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"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip"
|
||||
|
||||
# We only care about C, so we can compile old Linux kernels
|
||||
LANG_CXX=false
|
||||
@@ -69,23 +67,11 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LIBATOMIC=false
|
||||
LIBITM=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -93,23 +79,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -133,31 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
# Go needs {set,make,swap}context, unimplemented in musl
|
||||
@@ -228,6 +176,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
40_all_gcc49_config_esp.patch
|
||||
41_all_gcc49_config_esp_alpine.patch
|
||||
|
||||
10_all_default-fortify-source.patch
|
||||
12_all_default-warn-trampolines.patch
|
||||
15_all_libgfortran-Werror.patch
|
||||
16_all_libgomp-Werror.patch
|
||||
@@ -244,6 +193,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
gcc-4.9-musl.patch
|
||||
gcc-4.8-musl-fix-iteratephdr.patch
|
||||
gcc-4.8-musl-libssp.patch
|
||||
gcc-4.9-musl-fortify.patch
|
||||
boehm-gc-uclibc.patch
|
||||
boehm-gc-musl.patch
|
||||
gcc-pure64.patch
|
||||
@@ -251,6 +201,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
fix-gcj-iconv-musl.patch
|
||||
musl-posix_memalign-c++.patch
|
||||
pr63740.patch
|
||||
pr64037.patch
|
||||
|
||||
gcc-4.8-build-args.patch
|
||||
fix-cxxflags-passing.patch
|
||||
@@ -484,7 +435,7 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ca0f589f33987755195e81a9c7a83f797cfe5775fca908d025eb3ddbe8857edd666d272c2e97088c1808b268c5785326b72f2a340a277f6aa2c9bfe22c02ad69 gcc-4.9.4.tar.gz
|
||||
35a1386ae2b8629cd464383fbb3c61e94a07f3691f48b8029b97cc62a60c792ffb870aad2343b2ad8185bf46f77e1e1dd62309ecdadc42f919874c6e2c58b936 gcc-4.9.2.tar.gz
|
||||
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
|
||||
618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch
|
||||
21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch
|
||||
@@ -497,6 +448,7 @@ dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec
|
||||
8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch
|
||||
976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch
|
||||
e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch
|
||||
6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch
|
||||
5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch
|
||||
c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch
|
||||
433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch
|
||||
@@ -512,6 +464,7 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
|
||||
e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch
|
||||
b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch
|
||||
e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch
|
||||
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
||||
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch
|
||||
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
|
||||
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
|
||||
@@ -519,6 +472,7 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
|
||||
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
|
||||
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
|
||||
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
|
||||
efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
|
||||
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
|
||||
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
|
||||
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
|
||||
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
@@ -0,0 +1,83 @@
|
||||
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
|
||||
(changelog changes removed)
|
||||
|
||||
From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
|
||||
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Sun, 14 Dec 2014 16:07:03 +0000
|
||||
Subject: [PATCH] Pass unpromoted argument to promote_function_mode
|
||||
|
||||
This patch updates setup_incoming_promotions in combine.c to match what
|
||||
is actually passed in assign_parm_setup_reg in function.c.
|
||||
|
||||
Backported from mainline:
|
||||
|
||||
gcc/
|
||||
|
||||
PR rtl-optimization/64037
|
||||
* combine.c (setup_incoming_promotions): Pass the argument
|
||||
before any promotions happen to promote_function_mode.
|
||||
|
||||
gcc/testsuite/
|
||||
|
||||
PR rtl-optimization/64037
|
||||
* g++.dg/pr64037.C: New test.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/combine.c | 4 ++--
|
||||
gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
|
||||
4 files changed, 46 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.dg/pr64037.C
|
||||
|
||||
diff --git a/gcc/combine.c b/gcc/combine.c
|
||||
index 7c00452..adea2c1 100644
|
||||
--- a/gcc/combine.c
|
||||
+++ b/gcc/combine.c
|
||||
@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
|
||||
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
|
||||
|
||||
/* The mode and signedness of the argument as it is actually passed,
|
||||
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
|
||||
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
|
||||
+ see assign_parm_setup_reg in function.c. */
|
||||
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
|
||||
TREE_TYPE (cfun->decl), 0);
|
||||
|
||||
/* The mode of the register in which the argument is being passed. */
|
||||
diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
|
||||
new file mode 100644
|
||||
index 0000000..e5cd0e2
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.dg/pr64037.C
|
||||
@@ -0,0 +1,27 @@
|
||||
+// { dg-do run { target i?86-*-* x86_64-*-* } }
|
||||
+// { dg-options "-std=c++11 -Os" }
|
||||
+
|
||||
+enum class X : unsigned char {
|
||||
+ V = 2,
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+__attribute__((noinline,noclone))
|
||||
+foo(unsigned &out, unsigned a, X b)
|
||||
+{
|
||||
+ out = static_cast<unsigned>(b);
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ unsigned deadbeef = 0xDEADBEEF;
|
||||
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
|
||||
+
|
||||
+ unsigned out;
|
||||
+ foo(out, 2, X::V);
|
||||
+
|
||||
+ if (out != 2)
|
||||
+ __builtin_abort ();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
Enable -D_FORTIFY_SOURCE=2 by default.
|
||||
|
||||
Original patch from:
|
||||
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch
|
||||
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -951,6 +951,9 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default w/optimization. */
|
||||
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
--- a/gcc/doc/gcc.info
|
||||
+++ b/gcc/doc/gcc.info
|
||||
@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level.
|
||||
Please note the warning under '-fgcse' about invoking '-O2' on
|
||||
programs that use computed gotos.
|
||||
|
||||
+ NOTE: In Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is
|
||||
+ activated when `-Os' or `-O1' or higher is used. This enables additional
|
||||
+ compile-time and run-time checks for several libc functions. To disable,
|
||||
+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'.
|
||||
+
|
||||
'-O3'
|
||||
Optimize yet more. '-O3' turns on all optimizations specified by
|
||||
'-O2' and also turns on the '-finline-functions',
|
||||
+17
-63
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc4-armhf
|
||||
# Based on: main/gcc4 (from postmarketOS)
|
||||
|
||||
CTARGET_ARCH=armhf
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,22 +23,19 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer=""
|
||||
pkgname=gcc4-armhf
|
||||
pkgver=9999
|
||||
_pkgver=4.9.4
|
||||
pkgrel=10
|
||||
_pkgver=4.9.2
|
||||
pkgrel=7
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="http://gcc.gnu.org"
|
||||
# loongarch64: not supported
|
||||
# ppc64le, riscv64: doesn't build
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
license="GPL LGPL"
|
||||
_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"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip"
|
||||
|
||||
# We only care about C, so we can compile old Linux kernels
|
||||
LANG_CXX=false
|
||||
@@ -69,23 +67,11 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LIBATOMIC=false
|
||||
LIBITM=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -93,23 +79,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -133,31 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
# Go needs {set,make,swap}context, unimplemented in musl
|
||||
@@ -228,6 +176,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
40_all_gcc49_config_esp.patch
|
||||
41_all_gcc49_config_esp_alpine.patch
|
||||
|
||||
10_all_default-fortify-source.patch
|
||||
12_all_default-warn-trampolines.patch
|
||||
15_all_libgfortran-Werror.patch
|
||||
16_all_libgomp-Werror.patch
|
||||
@@ -244,6 +193,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
gcc-4.9-musl.patch
|
||||
gcc-4.8-musl-fix-iteratephdr.patch
|
||||
gcc-4.8-musl-libssp.patch
|
||||
gcc-4.9-musl-fortify.patch
|
||||
boehm-gc-uclibc.patch
|
||||
boehm-gc-musl.patch
|
||||
gcc-pure64.patch
|
||||
@@ -251,6 +201,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
fix-gcj-iconv-musl.patch
|
||||
musl-posix_memalign-c++.patch
|
||||
pr63740.patch
|
||||
pr64037.patch
|
||||
|
||||
gcc-4.8-build-args.patch
|
||||
fix-cxxflags-passing.patch
|
||||
@@ -484,7 +435,7 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ca0f589f33987755195e81a9c7a83f797cfe5775fca908d025eb3ddbe8857edd666d272c2e97088c1808b268c5785326b72f2a340a277f6aa2c9bfe22c02ad69 gcc-4.9.4.tar.gz
|
||||
35a1386ae2b8629cd464383fbb3c61e94a07f3691f48b8029b97cc62a60c792ffb870aad2343b2ad8185bf46f77e1e1dd62309ecdadc42f919874c6e2c58b936 gcc-4.9.2.tar.gz
|
||||
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
|
||||
618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch
|
||||
21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch
|
||||
@@ -497,6 +448,7 @@ dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec
|
||||
8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch
|
||||
976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch
|
||||
e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch
|
||||
6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch
|
||||
5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch
|
||||
c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch
|
||||
433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch
|
||||
@@ -512,6 +464,7 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
|
||||
e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch
|
||||
b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch
|
||||
e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch
|
||||
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
||||
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch
|
||||
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
|
||||
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
|
||||
@@ -519,6 +472,7 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
|
||||
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
|
||||
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
|
||||
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
|
||||
efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
|
||||
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
|
||||
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
|
||||
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
|
||||
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
@@ -0,0 +1,83 @@
|
||||
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
|
||||
(changelog changes removed)
|
||||
|
||||
From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
|
||||
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Sun, 14 Dec 2014 16:07:03 +0000
|
||||
Subject: [PATCH] Pass unpromoted argument to promote_function_mode
|
||||
|
||||
This patch updates setup_incoming_promotions in combine.c to match what
|
||||
is actually passed in assign_parm_setup_reg in function.c.
|
||||
|
||||
Backported from mainline:
|
||||
|
||||
gcc/
|
||||
|
||||
PR rtl-optimization/64037
|
||||
* combine.c (setup_incoming_promotions): Pass the argument
|
||||
before any promotions happen to promote_function_mode.
|
||||
|
||||
gcc/testsuite/
|
||||
|
||||
PR rtl-optimization/64037
|
||||
* g++.dg/pr64037.C: New test.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/combine.c | 4 ++--
|
||||
gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
|
||||
4 files changed, 46 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.dg/pr64037.C
|
||||
|
||||
diff --git a/gcc/combine.c b/gcc/combine.c
|
||||
index 7c00452..adea2c1 100644
|
||||
--- a/gcc/combine.c
|
||||
+++ b/gcc/combine.c
|
||||
@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
|
||||
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
|
||||
|
||||
/* The mode and signedness of the argument as it is actually passed,
|
||||
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
|
||||
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
|
||||
+ see assign_parm_setup_reg in function.c. */
|
||||
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
|
||||
TREE_TYPE (cfun->decl), 0);
|
||||
|
||||
/* The mode of the register in which the argument is being passed. */
|
||||
diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
|
||||
new file mode 100644
|
||||
index 0000000..e5cd0e2
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.dg/pr64037.C
|
||||
@@ -0,0 +1,27 @@
|
||||
+// { dg-do run { target i?86-*-* x86_64-*-* } }
|
||||
+// { dg-options "-std=c++11 -Os" }
|
||||
+
|
||||
+enum class X : unsigned char {
|
||||
+ V = 2,
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+__attribute__((noinline,noclone))
|
||||
+foo(unsigned &out, unsigned a, X b)
|
||||
+{
|
||||
+ out = static_cast<unsigned>(b);
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ unsigned deadbeef = 0xDEADBEEF;
|
||||
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
|
||||
+
|
||||
+ unsigned out;
|
||||
+ foo(out, 2, X::V);
|
||||
+
|
||||
+ if (out != 2)
|
||||
+ __builtin_abort ();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
Enable -D_FORTIFY_SOURCE=2 by default.
|
||||
|
||||
Original patch from:
|
||||
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch
|
||||
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -951,6 +951,9 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default w/optimization. */
|
||||
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
--- a/gcc/doc/gcc.info
|
||||
+++ b/gcc/doc/gcc.info
|
||||
@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level.
|
||||
Please note the warning under '-fgcse' about invoking '-O2' on
|
||||
programs that use computed gotos.
|
||||
|
||||
+ NOTE: In Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is
|
||||
+ activated when `-Os' or `-O1' or higher is used. This enables additional
|
||||
+ compile-time and run-time checks for several libc functions. To disable,
|
||||
+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'.
|
||||
+
|
||||
'-O3'
|
||||
Optimize yet more. '-O3' turns on all optimizations specified by
|
||||
'-O2' and also turns on the '-finline-functions',
|
||||
+17
-63
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc4-armv7
|
||||
# Based on: main/gcc4 (from postmarketOS)
|
||||
|
||||
CTARGET_ARCH=armv7
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,22 +23,19 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer=""
|
||||
pkgname=gcc4-armv7
|
||||
pkgver=9999
|
||||
_pkgver=4.9.4
|
||||
pkgrel=10
|
||||
_pkgver=4.9.2
|
||||
pkgrel=7
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="http://gcc.gnu.org"
|
||||
# loongarch64: not supported
|
||||
# ppc64le, riscv64: doesn't build
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
license="GPL LGPL"
|
||||
_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"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip"
|
||||
|
||||
# We only care about C, so we can compile old Linux kernels
|
||||
LANG_CXX=false
|
||||
@@ -69,23 +67,11 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LIBATOMIC=false
|
||||
LIBITM=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -93,23 +79,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -133,31 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 4
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
# Go needs {set,make,swap}context, unimplemented in musl
|
||||
@@ -228,6 +176,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
40_all_gcc49_config_esp.patch
|
||||
41_all_gcc49_config_esp_alpine.patch
|
||||
|
||||
10_all_default-fortify-source.patch
|
||||
12_all_default-warn-trampolines.patch
|
||||
15_all_libgfortran-Werror.patch
|
||||
16_all_libgomp-Werror.patch
|
||||
@@ -244,6 +193,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
gcc-4.9-musl.patch
|
||||
gcc-4.8-musl-fix-iteratephdr.patch
|
||||
gcc-4.8-musl-libssp.patch
|
||||
gcc-4.9-musl-fortify.patch
|
||||
boehm-gc-uclibc.patch
|
||||
boehm-gc-musl.patch
|
||||
gcc-pure64.patch
|
||||
@@ -251,6 +201,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
fix-gcj-iconv-musl.patch
|
||||
musl-posix_memalign-c++.patch
|
||||
pr63740.patch
|
||||
pr64037.patch
|
||||
|
||||
gcc-4.8-build-args.patch
|
||||
fix-cxxflags-passing.patch
|
||||
@@ -484,7 +435,7 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ca0f589f33987755195e81a9c7a83f797cfe5775fca908d025eb3ddbe8857edd666d272c2e97088c1808b268c5785326b72f2a340a277f6aa2c9bfe22c02ad69 gcc-4.9.4.tar.gz
|
||||
35a1386ae2b8629cd464383fbb3c61e94a07f3691f48b8029b97cc62a60c792ffb870aad2343b2ad8185bf46f77e1e1dd62309ecdadc42f919874c6e2c58b936 gcc-4.9.2.tar.gz
|
||||
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
|
||||
618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch
|
||||
21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch
|
||||
@@ -497,6 +448,7 @@ dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec
|
||||
8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch
|
||||
976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch
|
||||
e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch
|
||||
6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch
|
||||
5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch
|
||||
c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch
|
||||
433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch
|
||||
@@ -512,6 +464,7 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
|
||||
e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch
|
||||
b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch
|
||||
e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch
|
||||
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
||||
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch
|
||||
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
|
||||
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
|
||||
@@ -519,6 +472,7 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
|
||||
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
|
||||
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
|
||||
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
|
||||
efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
|
||||
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
|
||||
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
|
||||
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
|
||||
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
@@ -0,0 +1,83 @@
|
||||
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
|
||||
(changelog changes removed)
|
||||
|
||||
From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
|
||||
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Sun, 14 Dec 2014 16:07:03 +0000
|
||||
Subject: [PATCH] Pass unpromoted argument to promote_function_mode
|
||||
|
||||
This patch updates setup_incoming_promotions in combine.c to match what
|
||||
is actually passed in assign_parm_setup_reg in function.c.
|
||||
|
||||
Backported from mainline:
|
||||
|
||||
gcc/
|
||||
|
||||
PR rtl-optimization/64037
|
||||
* combine.c (setup_incoming_promotions): Pass the argument
|
||||
before any promotions happen to promote_function_mode.
|
||||
|
||||
gcc/testsuite/
|
||||
|
||||
PR rtl-optimization/64037
|
||||
* g++.dg/pr64037.C: New test.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/combine.c | 4 ++--
|
||||
gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
|
||||
4 files changed, 46 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gcc/testsuite/g++.dg/pr64037.C
|
||||
|
||||
diff --git a/gcc/combine.c b/gcc/combine.c
|
||||
index 7c00452..adea2c1 100644
|
||||
--- a/gcc/combine.c
|
||||
+++ b/gcc/combine.c
|
||||
@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
|
||||
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
|
||||
|
||||
/* The mode and signedness of the argument as it is actually passed,
|
||||
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
|
||||
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
|
||||
+ see assign_parm_setup_reg in function.c. */
|
||||
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
|
||||
TREE_TYPE (cfun->decl), 0);
|
||||
|
||||
/* The mode of the register in which the argument is being passed. */
|
||||
diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
|
||||
new file mode 100644
|
||||
index 0000000..e5cd0e2
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/g++.dg/pr64037.C
|
||||
@@ -0,0 +1,27 @@
|
||||
+// { dg-do run { target i?86-*-* x86_64-*-* } }
|
||||
+// { dg-options "-std=c++11 -Os" }
|
||||
+
|
||||
+enum class X : unsigned char {
|
||||
+ V = 2,
|
||||
+};
|
||||
+
|
||||
+static void
|
||||
+__attribute__((noinline,noclone))
|
||||
+foo(unsigned &out, unsigned a, X b)
|
||||
+{
|
||||
+ out = static_cast<unsigned>(b);
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ unsigned deadbeef = 0xDEADBEEF;
|
||||
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
|
||||
+
|
||||
+ unsigned out;
|
||||
+ foo(out, 2, X::V);
|
||||
+
|
||||
+ if (out != 2)
|
||||
+ __builtin_abort ();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
|
||||
# DP: if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/doc/invoke.texi | 6 ++++++
|
||||
gcc/c-family/c-cppbuiltin.c | 3 +
|
||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: b/gcc/doc/invoke.texi
|
||||
===================================================================
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -7840,6 +7840,12 @@ also turns on the following optimization
|
||||
Please note the warning under @option{-fgcse} about
|
||||
invoking @option{-O2} on programs that use computed gotos.
|
||||
|
||||
+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
|
||||
+set by default, and is activated when @option{-O} is set to 2 or higher.
|
||||
+This enables additional compile-time and run-time checks for several libc
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@item -O3
|
||||
@opindex O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
Index: b/gcc/c-family/c-cppbuiltin.c
|
||||
===================================================================
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -1176,6 +1176,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default for optimization levels > 0 */
|
||||
+ if (optimize)
|
||||
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
+13
-65
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc6-aarch64
|
||||
# Based on: main/gcc6 (from postmarketOS)
|
||||
|
||||
CTARGET_ARCH=aarch64
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,23 +23,19 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer=""
|
||||
pkgname=gcc6-aarch64
|
||||
pkgver=9999
|
||||
_pkgver=6.4.0
|
||||
pkgrel=15
|
||||
pkgrel=12
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="http://gcc.gnu.org"
|
||||
# loongarch64: not relevant
|
||||
# ppc64le: not relevant
|
||||
# riscv64: doesn't build
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
license="GPL LGPL"
|
||||
_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"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip"
|
||||
|
||||
# We only care about C, so we can compile old Linux kernels
|
||||
LANG_CXX=false
|
||||
@@ -70,23 +67,11 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LIBATOMIC=false
|
||||
LIBITM=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -94,23 +79,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -134,31 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
# Go needs {set,make,swap}context, unimplemented in musl
|
||||
@@ -219,6 +166,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
|
||||
001_all_default-ssp-strong.patch
|
||||
002_all_default-relro.patch
|
||||
003_all_default-fortify-source.patch
|
||||
005_all_default-as-needed.patch
|
||||
011_all_default-warn-format-security.patch
|
||||
012_all_default-warn-trampolines.patch
|
||||
@@ -236,6 +184,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
207-static-pie.patch
|
||||
|
||||
libgcc-always-build-gcceh.a.patch
|
||||
gcc-4.9-musl-fortify.patch
|
||||
gcc-6.1-musl-libssp.patch
|
||||
boehm-gc-musl.patch
|
||||
gcc-pure64.patch
|
||||
@@ -259,8 +208,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
gcc-pure64-mips.patch
|
||||
ada-mips64.patch
|
||||
|
||||
gcc-6.4-isl.patch
|
||||
|
||||
0001-i386-Move-struct-ix86_frame-to-machine_function.patch
|
||||
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
|
||||
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
|
||||
@@ -499,6 +446,7 @@ sha512sums="
|
||||
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
|
||||
a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch
|
||||
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
|
||||
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
|
||||
51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch
|
||||
3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch
|
||||
9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch
|
||||
@@ -514,6 +462,7 @@ fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b99
|
||||
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
|
||||
3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch
|
||||
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
|
||||
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
||||
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
|
||||
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
|
||||
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
|
||||
@@ -533,7 +482,6 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
|
||||
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
|
||||
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
|
||||
508f3bca214d88531d739d761d07affc953689b1540905c73420b34c246e1e6b72588cf89f0e1462752633f8ddc88da8c0238be2a1b6e1c213829cecee7924cf ada-mips64.patch
|
||||
80084d4f5984ea1c62f813c3c1fe7ce033d41d6cd5e6df3b10c649c0bbc2544ad0a58e7076fa28bf71d691df0211b07fc11eb0d5c9f462ef28eed4c3fbeeb9ee gcc-6.4-isl.patch
|
||||
7912964bf3a985e9f870250d6e068f715582a4fb04270849d697a50e6aad0cf50df3d483ff80a0eb777d9940fd85526dd8d0b85da9bc71a5f2fbc07616263866 0001-i386-Move-struct-ix86_frame-to-machine_function.patch
|
||||
baa27a4b912d8e27cd65a556b09cf45289a0e00e86dae3925f2923d1f3752080e80d80e159c996ef4156c4df1dfc3069114810a846672170ef3ae461ae0ab7e1 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
|
||||
6701d15000bdd7c4c98a8fece8c814f5e4e73603eecf84fe4dc5ac10f79b3074afba7c2cc9e51d08b2abade1c34cb0c944c08ead7a85db94e97158c752fd1aac 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
|
||||
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
@@ -1,251 +0,0 @@
|
||||
From cc46a51d4ff8bc1c42b7e6ae472494733bed5c49 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Thu, 16 Feb 2017 07:53:53 +0000
|
||||
Subject: [PATCH] graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
isl/isl_val.h.
|
||||
|
||||
2017-02-16 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
isl/isl_val.h.
|
||||
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
|
||||
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
|
||||
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
|
||||
(isl_val_int_from_wi): New function.
|
||||
(extract_affine_gmp): Rename to ...
|
||||
(extract_affine_wi): ... this, take a widest_int.
|
||||
(extract_affine_int): Just wrap extract_affine_wi.
|
||||
(add_param_constraints): Use isl_val_int_from_wi.
|
||||
(add_loop_constraints): Likewise, and extract_affine_wi.
|
||||
|
||||
From-SVN: r245501
|
||||
---
|
||||
gcc/ChangeLog | 14 ++++++++
|
||||
gcc/graphite-isl-ast-to-gimple.c | 30 +++++------------
|
||||
gcc/graphite-sese-to-poly.c | 58 ++++++++++++++------------------
|
||||
gcc/graphite.h | 2 +-
|
||||
4 files changed, 50 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
|
||||
index 24d9c1589f456..5fc6142eaa03f 100644
|
||||
--- a/gcc/ChangeLog
|
||||
+++ b/gcc/ChangeLog
|
||||
@@ -1,3 +1,17 @@
|
||||
+2017-02-16 Richard Biener <rguenther@suse.de>
|
||||
+
|
||||
+ * graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
+ isl/isl_val.h.
|
||||
+ * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
|
||||
+ (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
|
||||
+ * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
|
||||
+ (isl_val_int_from_wi): New function.
|
||||
+ (extract_affine_gmp): Rename to ...
|
||||
+ (extract_affine_wi): ... this, take a widest_int.
|
||||
+ (extract_affine_int): Just wrap extract_affine_wi.
|
||||
+ (add_param_constraints): Use isl_val_int_from_wi.
|
||||
+ (add_loop_constraints): Likewise, and extract_affine_wi.
|
||||
+
|
||||
2017-02-15 Jeff Law <law@redhat.com>
|
||||
|
||||
PR middle-end/79521
|
||||
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
|
||||
index dbdae7a7c155d..ec5fb73d9b2bc 100644
|
||||
--- a/gcc/graphite-isl-ast-to-gimple.c
|
||||
+++ b/gcc/graphite-isl-ast-to-gimple.c
|
||||
@@ -73,22 +73,6 @@ struct ast_build_info
|
||||
bool is_parallelizable;
|
||||
};
|
||||
|
||||
-/* Converts a GMP constant VAL to a tree and returns it. */
|
||||
-
|
||||
-static tree
|
||||
-gmp_cst_to_tree (tree type, mpz_t val)
|
||||
-{
|
||||
- tree t = type ? type : integer_type_node;
|
||||
- mpz_t tmp;
|
||||
-
|
||||
- mpz_init (tmp);
|
||||
- mpz_set (tmp, val);
|
||||
- wide_int wi = wi::from_mpz (t, tmp, true);
|
||||
- mpz_clear (tmp);
|
||||
-
|
||||
- return wide_int_to_tree (t, wi);
|
||||
-}
|
||||
-
|
||||
/* Verifies properties that GRAPHITE should maintain during translation. */
|
||||
|
||||
static inline void
|
||||
@@ -325,16 +309,20 @@ gcc_expression_from_isl_expr_int (tree type, __isl_take isl_ast_expr *expr)
|
||||
{
|
||||
gcc_assert (isl_ast_expr_get_type (expr) == isl_ast_expr_int);
|
||||
isl_val *val = isl_ast_expr_get_val (expr);
|
||||
- mpz_t val_mpz_t;
|
||||
- mpz_init (val_mpz_t);
|
||||
+ size_t n = isl_val_n_abs_num_chunks (val, sizeof (HOST_WIDE_INT));
|
||||
+ HOST_WIDE_INT *chunks = XALLOCAVEC (HOST_WIDE_INT, n);
|
||||
tree res;
|
||||
- if (isl_val_get_num_gmp (val, val_mpz_t) == -1)
|
||||
+ if (isl_val_get_abs_num_chunks (val, sizeof (HOST_WIDE_INT), chunks) == -1)
|
||||
res = NULL_TREE;
|
||||
else
|
||||
- res = gmp_cst_to_tree (type, val_mpz_t);
|
||||
+ {
|
||||
+ widest_int wi = widest_int::from_array (chunks, n, true);
|
||||
+ if (isl_val_is_neg (val))
|
||||
+ wi = -wi;
|
||||
+ res = wide_int_to_tree (type, wi);
|
||||
+ }
|
||||
isl_val_free (val);
|
||||
isl_ast_expr_free (expr);
|
||||
- mpz_clear (val_mpz_t);
|
||||
return res;
|
||||
}
|
||||
|
||||
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
|
||||
index ede96e5a3c299..8ff9a22e12916 100644
|
||||
--- a/gcc/graphite-sese-to-poly.c
|
||||
+++ b/gcc/graphite-sese-to-poly.c
|
||||
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include <isl/constraint.h>
|
||||
#include <isl/aff.h>
|
||||
#include <isl/val.h>
|
||||
-#include <isl/val_gmp.h>
|
||||
|
||||
#include "graphite.h"
|
||||
|
||||
@@ -154,16 +153,32 @@ extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
|
||||
return isl_pw_aff_alloc (dom, aff);
|
||||
}
|
||||
|
||||
+/* Convert WI to a isl_val with CTX. */
|
||||
+
|
||||
+static __isl_give isl_val *
|
||||
+isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
|
||||
+{
|
||||
+ if (wi::neg_p (wi, SIGNED))
|
||||
+ {
|
||||
+ widest_int mwi = -wi;
|
||||
+ return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
|
||||
+ sizeof (HOST_WIDE_INT),
|
||||
+ mwi.get_val ()));
|
||||
+ }
|
||||
+ return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
|
||||
+ wi.get_val ());
|
||||
+}
|
||||
+
|
||||
/* Extract an affine expression from the gmp constant G. */
|
||||
|
||||
static isl_pw_aff *
|
||||
-extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
|
||||
+extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
|
||||
{
|
||||
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
|
||||
isl_aff *aff = isl_aff_zero_on_domain (ls);
|
||||
isl_set *dom = isl_set_universe (space);
|
||||
isl_ctx *ct = isl_aff_get_ctx (aff);
|
||||
- isl_val *v = isl_val_int_from_gmp (ct, g);
|
||||
+ isl_val *v = isl_val_int_from_wi (ct, g);
|
||||
aff = isl_aff_add_constant_val (aff, v);
|
||||
|
||||
return isl_pw_aff_alloc (dom, aff);
|
||||
@@ -174,13 +189,7 @@ extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
|
||||
static isl_pw_aff *
|
||||
extract_affine_int (tree e, __isl_take isl_space *space)
|
||||
{
|
||||
- mpz_t g;
|
||||
-
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (e, g);
|
||||
- isl_pw_aff *res = extract_affine_gmp (g, space);
|
||||
- mpz_clear (g);
|
||||
-
|
||||
+ isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -411,15 +420,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
|
||||
{
|
||||
isl_space *space = isl_set_get_space (scop->param_context);
|
||||
isl_constraint *c;
|
||||
- mpz_t g;
|
||||
isl_val *v;
|
||||
|
||||
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (lb, g);
|
||||
- v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
|
||||
v = isl_val_neg (v);
|
||||
- mpz_clear (g);
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
|
||||
|
||||
@@ -431,15 +436,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
|
||||
{
|
||||
isl_space *space = isl_set_get_space (scop->param_context);
|
||||
isl_constraint *c;
|
||||
- mpz_t g;
|
||||
isl_val *v;
|
||||
|
||||
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
||||
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (ub, g);
|
||||
- v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
|
||||
|
||||
@@ -773,11 +774,8 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
isl_local_space *ls = isl_local_space_from_space (space);
|
||||
isl_constraint *c = isl_inequality_alloc (ls);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
||||
- mpz_t g;
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (nb_iters, g);
|
||||
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ isl_val *v
|
||||
+ = isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
return isl_set_add_constraint (domain, c);
|
||||
}
|
||||
@@ -817,12 +815,9 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
|
||||
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
|
||||
do not know whether the loop executes at least once. */
|
||||
- mpz_t g;
|
||||
- mpz_init (g);
|
||||
- wi::to_mpz (nit, g, SIGNED);
|
||||
- mpz_sub_ui (g, g, 1);
|
||||
+ --nit;
|
||||
|
||||
- isl_pw_aff *approx = extract_affine_gmp (g, isl_space_copy (space));
|
||||
+ isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
|
||||
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
|
||||
x = isl_set_project_out (x, isl_dim_set, 0,
|
||||
isl_set_dim (x, isl_dim_set));
|
||||
@@ -831,8 +826,7 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
ls = isl_local_space_from_space (space);
|
||||
c = isl_inequality_alloc (ls);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
||||
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
|
||||
if (dump_file)
|
||||
diff --git a/gcc/graphite.h b/gcc/graphite.h
|
||||
index 5103c614ff140..d22c4f2693f52 100644
|
||||
--- a/gcc/graphite.h
|
||||
+++ b/gcc/graphite.h
|
||||
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "sese.h"
|
||||
#include <isl/options.h>
|
||||
#include <isl/ctx.h>
|
||||
-#include <isl/val_gmp.h>
|
||||
+#include <isl/val.h>
|
||||
#include <isl/set.h>
|
||||
#include <isl/union_set.h>
|
||||
#include <isl/map.h>
|
||||
@@ -0,0 +1,40 @@
|
||||
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
|
||||
# DP: if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/doc/invoke.texi | 6 ++++++
|
||||
gcc/c-family/c-cppbuiltin.c | 3 +
|
||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: b/gcc/doc/invoke.texi
|
||||
===================================================================
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -7840,6 +7840,12 @@ also turns on the following optimization
|
||||
Please note the warning under @option{-fgcse} about
|
||||
invoking @option{-O2} on programs that use computed gotos.
|
||||
|
||||
+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
|
||||
+set by default, and is activated when @option{-O} is set to 2 or higher.
|
||||
+This enables additional compile-time and run-time checks for several libc
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@item -O3
|
||||
@opindex O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
Index: b/gcc/c-family/c-cppbuiltin.c
|
||||
===================================================================
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -1176,6 +1176,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default for optimization levels > 0 */
|
||||
+ if (optimize)
|
||||
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
+13
-65
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc6-armhf
|
||||
# Based on: main/gcc6 (from postmarketOS)
|
||||
|
||||
CTARGET_ARCH=armhf
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,23 +23,19 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer=""
|
||||
pkgname=gcc6-armhf
|
||||
pkgver=9999
|
||||
_pkgver=6.4.0
|
||||
pkgrel=15
|
||||
pkgrel=12
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="http://gcc.gnu.org"
|
||||
# loongarch64: not relevant
|
||||
# ppc64le: not relevant
|
||||
# riscv64: doesn't build
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
license="GPL LGPL"
|
||||
_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"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip"
|
||||
|
||||
# We only care about C, so we can compile old Linux kernels
|
||||
LANG_CXX=false
|
||||
@@ -70,23 +67,11 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LIBATOMIC=false
|
||||
LIBITM=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -94,23 +79,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -134,31 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
# Go needs {set,make,swap}context, unimplemented in musl
|
||||
@@ -219,6 +166,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
|
||||
001_all_default-ssp-strong.patch
|
||||
002_all_default-relro.patch
|
||||
003_all_default-fortify-source.patch
|
||||
005_all_default-as-needed.patch
|
||||
011_all_default-warn-format-security.patch
|
||||
012_all_default-warn-trampolines.patch
|
||||
@@ -236,6 +184,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
207-static-pie.patch
|
||||
|
||||
libgcc-always-build-gcceh.a.patch
|
||||
gcc-4.9-musl-fortify.patch
|
||||
gcc-6.1-musl-libssp.patch
|
||||
boehm-gc-musl.patch
|
||||
gcc-pure64.patch
|
||||
@@ -259,8 +208,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
gcc-pure64-mips.patch
|
||||
ada-mips64.patch
|
||||
|
||||
gcc-6.4-isl.patch
|
||||
|
||||
0001-i386-Move-struct-ix86_frame-to-machine_function.patch
|
||||
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
|
||||
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
|
||||
@@ -499,6 +446,7 @@ sha512sums="
|
||||
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
|
||||
a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch
|
||||
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
|
||||
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
|
||||
51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch
|
||||
3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch
|
||||
9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch
|
||||
@@ -514,6 +462,7 @@ fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b99
|
||||
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
|
||||
3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch
|
||||
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
|
||||
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
||||
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
|
||||
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
|
||||
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
|
||||
@@ -533,7 +482,6 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
|
||||
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
|
||||
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
|
||||
508f3bca214d88531d739d761d07affc953689b1540905c73420b34c246e1e6b72588cf89f0e1462752633f8ddc88da8c0238be2a1b6e1c213829cecee7924cf ada-mips64.patch
|
||||
80084d4f5984ea1c62f813c3c1fe7ce033d41d6cd5e6df3b10c649c0bbc2544ad0a58e7076fa28bf71d691df0211b07fc11eb0d5c9f462ef28eed4c3fbeeb9ee gcc-6.4-isl.patch
|
||||
7912964bf3a985e9f870250d6e068f715582a4fb04270849d697a50e6aad0cf50df3d483ff80a0eb777d9940fd85526dd8d0b85da9bc71a5f2fbc07616263866 0001-i386-Move-struct-ix86_frame-to-machine_function.patch
|
||||
baa27a4b912d8e27cd65a556b09cf45289a0e00e86dae3925f2923d1f3752080e80d80e159c996ef4156c4df1dfc3069114810a846672170ef3ae461ae0ab7e1 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
|
||||
6701d15000bdd7c4c98a8fece8c814f5e4e73603eecf84fe4dc5ac10f79b3074afba7c2cc9e51d08b2abade1c34cb0c944c08ead7a85db94e97158c752fd1aac 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
|
||||
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
@@ -1,251 +0,0 @@
|
||||
From cc46a51d4ff8bc1c42b7e6ae472494733bed5c49 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Thu, 16 Feb 2017 07:53:53 +0000
|
||||
Subject: [PATCH] graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
isl/isl_val.h.
|
||||
|
||||
2017-02-16 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
isl/isl_val.h.
|
||||
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
|
||||
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
|
||||
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
|
||||
(isl_val_int_from_wi): New function.
|
||||
(extract_affine_gmp): Rename to ...
|
||||
(extract_affine_wi): ... this, take a widest_int.
|
||||
(extract_affine_int): Just wrap extract_affine_wi.
|
||||
(add_param_constraints): Use isl_val_int_from_wi.
|
||||
(add_loop_constraints): Likewise, and extract_affine_wi.
|
||||
|
||||
From-SVN: r245501
|
||||
---
|
||||
gcc/ChangeLog | 14 ++++++++
|
||||
gcc/graphite-isl-ast-to-gimple.c | 30 +++++------------
|
||||
gcc/graphite-sese-to-poly.c | 58 ++++++++++++++------------------
|
||||
gcc/graphite.h | 2 +-
|
||||
4 files changed, 50 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
|
||||
index 24d9c1589f456..5fc6142eaa03f 100644
|
||||
--- a/gcc/ChangeLog
|
||||
+++ b/gcc/ChangeLog
|
||||
@@ -1,3 +1,17 @@
|
||||
+2017-02-16 Richard Biener <rguenther@suse.de>
|
||||
+
|
||||
+ * graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
+ isl/isl_val.h.
|
||||
+ * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
|
||||
+ (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
|
||||
+ * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
|
||||
+ (isl_val_int_from_wi): New function.
|
||||
+ (extract_affine_gmp): Rename to ...
|
||||
+ (extract_affine_wi): ... this, take a widest_int.
|
||||
+ (extract_affine_int): Just wrap extract_affine_wi.
|
||||
+ (add_param_constraints): Use isl_val_int_from_wi.
|
||||
+ (add_loop_constraints): Likewise, and extract_affine_wi.
|
||||
+
|
||||
2017-02-15 Jeff Law <law@redhat.com>
|
||||
|
||||
PR middle-end/79521
|
||||
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
|
||||
index dbdae7a7c155d..ec5fb73d9b2bc 100644
|
||||
--- a/gcc/graphite-isl-ast-to-gimple.c
|
||||
+++ b/gcc/graphite-isl-ast-to-gimple.c
|
||||
@@ -73,22 +73,6 @@ struct ast_build_info
|
||||
bool is_parallelizable;
|
||||
};
|
||||
|
||||
-/* Converts a GMP constant VAL to a tree and returns it. */
|
||||
-
|
||||
-static tree
|
||||
-gmp_cst_to_tree (tree type, mpz_t val)
|
||||
-{
|
||||
- tree t = type ? type : integer_type_node;
|
||||
- mpz_t tmp;
|
||||
-
|
||||
- mpz_init (tmp);
|
||||
- mpz_set (tmp, val);
|
||||
- wide_int wi = wi::from_mpz (t, tmp, true);
|
||||
- mpz_clear (tmp);
|
||||
-
|
||||
- return wide_int_to_tree (t, wi);
|
||||
-}
|
||||
-
|
||||
/* Verifies properties that GRAPHITE should maintain during translation. */
|
||||
|
||||
static inline void
|
||||
@@ -325,16 +309,20 @@ gcc_expression_from_isl_expr_int (tree type, __isl_take isl_ast_expr *expr)
|
||||
{
|
||||
gcc_assert (isl_ast_expr_get_type (expr) == isl_ast_expr_int);
|
||||
isl_val *val = isl_ast_expr_get_val (expr);
|
||||
- mpz_t val_mpz_t;
|
||||
- mpz_init (val_mpz_t);
|
||||
+ size_t n = isl_val_n_abs_num_chunks (val, sizeof (HOST_WIDE_INT));
|
||||
+ HOST_WIDE_INT *chunks = XALLOCAVEC (HOST_WIDE_INT, n);
|
||||
tree res;
|
||||
- if (isl_val_get_num_gmp (val, val_mpz_t) == -1)
|
||||
+ if (isl_val_get_abs_num_chunks (val, sizeof (HOST_WIDE_INT), chunks) == -1)
|
||||
res = NULL_TREE;
|
||||
else
|
||||
- res = gmp_cst_to_tree (type, val_mpz_t);
|
||||
+ {
|
||||
+ widest_int wi = widest_int::from_array (chunks, n, true);
|
||||
+ if (isl_val_is_neg (val))
|
||||
+ wi = -wi;
|
||||
+ res = wide_int_to_tree (type, wi);
|
||||
+ }
|
||||
isl_val_free (val);
|
||||
isl_ast_expr_free (expr);
|
||||
- mpz_clear (val_mpz_t);
|
||||
return res;
|
||||
}
|
||||
|
||||
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
|
||||
index ede96e5a3c299..8ff9a22e12916 100644
|
||||
--- a/gcc/graphite-sese-to-poly.c
|
||||
+++ b/gcc/graphite-sese-to-poly.c
|
||||
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include <isl/constraint.h>
|
||||
#include <isl/aff.h>
|
||||
#include <isl/val.h>
|
||||
-#include <isl/val_gmp.h>
|
||||
|
||||
#include "graphite.h"
|
||||
|
||||
@@ -154,16 +153,32 @@ extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
|
||||
return isl_pw_aff_alloc (dom, aff);
|
||||
}
|
||||
|
||||
+/* Convert WI to a isl_val with CTX. */
|
||||
+
|
||||
+static __isl_give isl_val *
|
||||
+isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
|
||||
+{
|
||||
+ if (wi::neg_p (wi, SIGNED))
|
||||
+ {
|
||||
+ widest_int mwi = -wi;
|
||||
+ return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
|
||||
+ sizeof (HOST_WIDE_INT),
|
||||
+ mwi.get_val ()));
|
||||
+ }
|
||||
+ return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
|
||||
+ wi.get_val ());
|
||||
+}
|
||||
+
|
||||
/* Extract an affine expression from the gmp constant G. */
|
||||
|
||||
static isl_pw_aff *
|
||||
-extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
|
||||
+extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
|
||||
{
|
||||
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
|
||||
isl_aff *aff = isl_aff_zero_on_domain (ls);
|
||||
isl_set *dom = isl_set_universe (space);
|
||||
isl_ctx *ct = isl_aff_get_ctx (aff);
|
||||
- isl_val *v = isl_val_int_from_gmp (ct, g);
|
||||
+ isl_val *v = isl_val_int_from_wi (ct, g);
|
||||
aff = isl_aff_add_constant_val (aff, v);
|
||||
|
||||
return isl_pw_aff_alloc (dom, aff);
|
||||
@@ -174,13 +189,7 @@ extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
|
||||
static isl_pw_aff *
|
||||
extract_affine_int (tree e, __isl_take isl_space *space)
|
||||
{
|
||||
- mpz_t g;
|
||||
-
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (e, g);
|
||||
- isl_pw_aff *res = extract_affine_gmp (g, space);
|
||||
- mpz_clear (g);
|
||||
-
|
||||
+ isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -411,15 +420,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
|
||||
{
|
||||
isl_space *space = isl_set_get_space (scop->param_context);
|
||||
isl_constraint *c;
|
||||
- mpz_t g;
|
||||
isl_val *v;
|
||||
|
||||
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (lb, g);
|
||||
- v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
|
||||
v = isl_val_neg (v);
|
||||
- mpz_clear (g);
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
|
||||
|
||||
@@ -431,15 +436,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
|
||||
{
|
||||
isl_space *space = isl_set_get_space (scop->param_context);
|
||||
isl_constraint *c;
|
||||
- mpz_t g;
|
||||
isl_val *v;
|
||||
|
||||
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
||||
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (ub, g);
|
||||
- v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
|
||||
|
||||
@@ -773,11 +774,8 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
isl_local_space *ls = isl_local_space_from_space (space);
|
||||
isl_constraint *c = isl_inequality_alloc (ls);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
||||
- mpz_t g;
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (nb_iters, g);
|
||||
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ isl_val *v
|
||||
+ = isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
return isl_set_add_constraint (domain, c);
|
||||
}
|
||||
@@ -817,12 +815,9 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
|
||||
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
|
||||
do not know whether the loop executes at least once. */
|
||||
- mpz_t g;
|
||||
- mpz_init (g);
|
||||
- wi::to_mpz (nit, g, SIGNED);
|
||||
- mpz_sub_ui (g, g, 1);
|
||||
+ --nit;
|
||||
|
||||
- isl_pw_aff *approx = extract_affine_gmp (g, isl_space_copy (space));
|
||||
+ isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
|
||||
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
|
||||
x = isl_set_project_out (x, isl_dim_set, 0,
|
||||
isl_set_dim (x, isl_dim_set));
|
||||
@@ -831,8 +826,7 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
ls = isl_local_space_from_space (space);
|
||||
c = isl_inequality_alloc (ls);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
||||
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
|
||||
if (dump_file)
|
||||
diff --git a/gcc/graphite.h b/gcc/graphite.h
|
||||
index 5103c614ff140..d22c4f2693f52 100644
|
||||
--- a/gcc/graphite.h
|
||||
+++ b/gcc/graphite.h
|
||||
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "sese.h"
|
||||
#include <isl/options.h>
|
||||
#include <isl/ctx.h>
|
||||
-#include <isl/val_gmp.h>
|
||||
+#include <isl/val.h>
|
||||
#include <isl/set.h>
|
||||
#include <isl/union_set.h>
|
||||
#include <isl/map.h>
|
||||
@@ -0,0 +1,40 @@
|
||||
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
|
||||
# DP: if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/doc/invoke.texi | 6 ++++++
|
||||
gcc/c-family/c-cppbuiltin.c | 3 +
|
||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: b/gcc/doc/invoke.texi
|
||||
===================================================================
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -7840,6 +7840,12 @@ also turns on the following optimization
|
||||
Please note the warning under @option{-fgcse} about
|
||||
invoking @option{-O2} on programs that use computed gotos.
|
||||
|
||||
+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
|
||||
+set by default, and is activated when @option{-O} is set to 2 or higher.
|
||||
+This enables additional compile-time and run-time checks for several libc
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@item -O3
|
||||
@opindex O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
Index: b/gcc/c-family/c-cppbuiltin.c
|
||||
===================================================================
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -1176,6 +1176,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
+ /* Fortify Source enabled by default for optimization levels > 0 */
|
||||
+ if (optimize)
|
||||
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
|
||||
+
|
||||
/* Misc. */
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
+13
-65
@@ -1,6 +1,7 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen gcc6-armv7
|
||||
# Based on: main/gcc6 (from postmarketOS)
|
||||
|
||||
CTARGET_ARCH=armv7
|
||||
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
|
||||
LANG_D=false
|
||||
@@ -22,23 +23,19 @@ CBUILDROOT="/"
|
||||
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
maintainer=""
|
||||
pkgname=gcc6-armv7
|
||||
pkgver=9999
|
||||
_pkgver=6.4.0
|
||||
pkgrel=15
|
||||
pkgrel=12
|
||||
pkgdesc="Stage2 cross-compiler for armv7"
|
||||
url="http://gcc.gnu.org"
|
||||
# loongarch64: not relevant
|
||||
# ppc64le: not relevant
|
||||
# riscv64: doesn't build
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
license="GPL LGPL"
|
||||
_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"
|
||||
options="!strip !tracedeps toolchain"
|
||||
options="!strip"
|
||||
|
||||
# We only care about C, so we can compile old Linux kernels
|
||||
LANG_CXX=false
|
||||
@@ -70,23 +67,11 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LIBATOMIC=false
|
||||
LIBITM=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -94,23 +79,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -134,31 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CFLAGS="${CFLAGS/-Werror=format-security/}"
|
||||
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fstack-clash-protection is not known to GCC 6
|
||||
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
|
||||
# and neither is -fno-plt
|
||||
CFLAGS="${CFLAGS/-fno-plt/}"
|
||||
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
|
||||
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS -g0 $CFLAGS -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
# Go needs {set,make,swap}context, unimplemented in musl
|
||||
@@ -219,6 +166,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
|
||||
001_all_default-ssp-strong.patch
|
||||
002_all_default-relro.patch
|
||||
003_all_default-fortify-source.patch
|
||||
005_all_default-as-needed.patch
|
||||
011_all_default-warn-format-security.patch
|
||||
012_all_default-warn-trampolines.patch
|
||||
@@ -236,6 +184,7 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
207-static-pie.patch
|
||||
|
||||
libgcc-always-build-gcceh.a.patch
|
||||
gcc-4.9-musl-fortify.patch
|
||||
gcc-6.1-musl-libssp.patch
|
||||
boehm-gc-musl.patch
|
||||
gcc-pure64.patch
|
||||
@@ -259,8 +208,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
|
||||
gcc-pure64-mips.patch
|
||||
ada-mips64.patch
|
||||
|
||||
gcc-6.4-isl.patch
|
||||
|
||||
0001-i386-Move-struct-ix86_frame-to-machine_function.patch
|
||||
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
|
||||
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
|
||||
@@ -499,6 +446,7 @@ sha512sums="
|
||||
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
|
||||
a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch
|
||||
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
|
||||
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
|
||||
51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch
|
||||
3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch
|
||||
9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch
|
||||
@@ -514,6 +462,7 @@ fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b99
|
||||
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
|
||||
3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch
|
||||
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
|
||||
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
||||
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
|
||||
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
|
||||
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
|
||||
@@ -533,7 +482,6 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
|
||||
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
|
||||
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
|
||||
508f3bca214d88531d739d761d07affc953689b1540905c73420b34c246e1e6b72588cf89f0e1462752633f8ddc88da8c0238be2a1b6e1c213829cecee7924cf ada-mips64.patch
|
||||
80084d4f5984ea1c62f813c3c1fe7ce033d41d6cd5e6df3b10c649c0bbc2544ad0a58e7076fa28bf71d691df0211b07fc11eb0d5c9f462ef28eed4c3fbeeb9ee gcc-6.4-isl.patch
|
||||
7912964bf3a985e9f870250d6e068f715582a4fb04270849d697a50e6aad0cf50df3d483ff80a0eb777d9940fd85526dd8d0b85da9bc71a5f2fbc07616263866 0001-i386-Move-struct-ix86_frame-to-machine_function.patch
|
||||
baa27a4b912d8e27cd65a556b09cf45289a0e00e86dae3925f2923d1f3752080e80d80e159c996ef4156c4df1dfc3069114810a846672170ef3ae461ae0ab7e1 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
|
||||
6701d15000bdd7c4c98a8fece8c814f5e4e73603eecf84fe4dc5ac10f79b3074afba7c2cc9e51d08b2abade1c34cb0c944c08ead7a85db94e97158c752fd1aac 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
|
||||
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
|
||||
@@ -146,6 +146,8 @@
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
|
||||
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
@@ -1,251 +0,0 @@
|
||||
From cc46a51d4ff8bc1c42b7e6ae472494733bed5c49 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Biener <rguenther@suse.de>
|
||||
Date: Thu, 16 Feb 2017 07:53:53 +0000
|
||||
Subject: [PATCH] graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
isl/isl_val.h.
|
||||
|
||||
2017-02-16 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
isl/isl_val.h.
|
||||
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
|
||||
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
|
||||
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
|
||||
(isl_val_int_from_wi): New function.
|
||||
(extract_affine_gmp): Rename to ...
|
||||
(extract_affine_wi): ... this, take a widest_int.
|
||||
(extract_affine_int): Just wrap extract_affine_wi.
|
||||
(add_param_constraints): Use isl_val_int_from_wi.
|
||||
(add_loop_constraints): Likewise, and extract_affine_wi.
|
||||
|
||||
From-SVN: r245501
|
||||
---
|
||||
gcc/ChangeLog | 14 ++++++++
|
||||
gcc/graphite-isl-ast-to-gimple.c | 30 +++++------------
|
||||
gcc/graphite-sese-to-poly.c | 58 ++++++++++++++------------------
|
||||
gcc/graphite.h | 2 +-
|
||||
4 files changed, 50 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
|
||||
index 24d9c1589f456..5fc6142eaa03f 100644
|
||||
--- a/gcc/ChangeLog
|
||||
+++ b/gcc/ChangeLog
|
||||
@@ -1,3 +1,17 @@
|
||||
+2017-02-16 Richard Biener <rguenther@suse.de>
|
||||
+
|
||||
+ * graphite.h: Do not include isl/isl_val_gmp.h, instead include
|
||||
+ isl/isl_val.h.
|
||||
+ * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
|
||||
+ (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
|
||||
+ * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
|
||||
+ (isl_val_int_from_wi): New function.
|
||||
+ (extract_affine_gmp): Rename to ...
|
||||
+ (extract_affine_wi): ... this, take a widest_int.
|
||||
+ (extract_affine_int): Just wrap extract_affine_wi.
|
||||
+ (add_param_constraints): Use isl_val_int_from_wi.
|
||||
+ (add_loop_constraints): Likewise, and extract_affine_wi.
|
||||
+
|
||||
2017-02-15 Jeff Law <law@redhat.com>
|
||||
|
||||
PR middle-end/79521
|
||||
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
|
||||
index dbdae7a7c155d..ec5fb73d9b2bc 100644
|
||||
--- a/gcc/graphite-isl-ast-to-gimple.c
|
||||
+++ b/gcc/graphite-isl-ast-to-gimple.c
|
||||
@@ -73,22 +73,6 @@ struct ast_build_info
|
||||
bool is_parallelizable;
|
||||
};
|
||||
|
||||
-/* Converts a GMP constant VAL to a tree and returns it. */
|
||||
-
|
||||
-static tree
|
||||
-gmp_cst_to_tree (tree type, mpz_t val)
|
||||
-{
|
||||
- tree t = type ? type : integer_type_node;
|
||||
- mpz_t tmp;
|
||||
-
|
||||
- mpz_init (tmp);
|
||||
- mpz_set (tmp, val);
|
||||
- wide_int wi = wi::from_mpz (t, tmp, true);
|
||||
- mpz_clear (tmp);
|
||||
-
|
||||
- return wide_int_to_tree (t, wi);
|
||||
-}
|
||||
-
|
||||
/* Verifies properties that GRAPHITE should maintain during translation. */
|
||||
|
||||
static inline void
|
||||
@@ -325,16 +309,20 @@ gcc_expression_from_isl_expr_int (tree type, __isl_take isl_ast_expr *expr)
|
||||
{
|
||||
gcc_assert (isl_ast_expr_get_type (expr) == isl_ast_expr_int);
|
||||
isl_val *val = isl_ast_expr_get_val (expr);
|
||||
- mpz_t val_mpz_t;
|
||||
- mpz_init (val_mpz_t);
|
||||
+ size_t n = isl_val_n_abs_num_chunks (val, sizeof (HOST_WIDE_INT));
|
||||
+ HOST_WIDE_INT *chunks = XALLOCAVEC (HOST_WIDE_INT, n);
|
||||
tree res;
|
||||
- if (isl_val_get_num_gmp (val, val_mpz_t) == -1)
|
||||
+ if (isl_val_get_abs_num_chunks (val, sizeof (HOST_WIDE_INT), chunks) == -1)
|
||||
res = NULL_TREE;
|
||||
else
|
||||
- res = gmp_cst_to_tree (type, val_mpz_t);
|
||||
+ {
|
||||
+ widest_int wi = widest_int::from_array (chunks, n, true);
|
||||
+ if (isl_val_is_neg (val))
|
||||
+ wi = -wi;
|
||||
+ res = wide_int_to_tree (type, wi);
|
||||
+ }
|
||||
isl_val_free (val);
|
||||
isl_ast_expr_free (expr);
|
||||
- mpz_clear (val_mpz_t);
|
||||
return res;
|
||||
}
|
||||
|
||||
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
|
||||
index ede96e5a3c299..8ff9a22e12916 100644
|
||||
--- a/gcc/graphite-sese-to-poly.c
|
||||
+++ b/gcc/graphite-sese-to-poly.c
|
||||
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include <isl/constraint.h>
|
||||
#include <isl/aff.h>
|
||||
#include <isl/val.h>
|
||||
-#include <isl/val_gmp.h>
|
||||
|
||||
#include "graphite.h"
|
||||
|
||||
@@ -154,16 +153,32 @@ extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
|
||||
return isl_pw_aff_alloc (dom, aff);
|
||||
}
|
||||
|
||||
+/* Convert WI to a isl_val with CTX. */
|
||||
+
|
||||
+static __isl_give isl_val *
|
||||
+isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
|
||||
+{
|
||||
+ if (wi::neg_p (wi, SIGNED))
|
||||
+ {
|
||||
+ widest_int mwi = -wi;
|
||||
+ return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
|
||||
+ sizeof (HOST_WIDE_INT),
|
||||
+ mwi.get_val ()));
|
||||
+ }
|
||||
+ return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
|
||||
+ wi.get_val ());
|
||||
+}
|
||||
+
|
||||
/* Extract an affine expression from the gmp constant G. */
|
||||
|
||||
static isl_pw_aff *
|
||||
-extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
|
||||
+extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
|
||||
{
|
||||
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
|
||||
isl_aff *aff = isl_aff_zero_on_domain (ls);
|
||||
isl_set *dom = isl_set_universe (space);
|
||||
isl_ctx *ct = isl_aff_get_ctx (aff);
|
||||
- isl_val *v = isl_val_int_from_gmp (ct, g);
|
||||
+ isl_val *v = isl_val_int_from_wi (ct, g);
|
||||
aff = isl_aff_add_constant_val (aff, v);
|
||||
|
||||
return isl_pw_aff_alloc (dom, aff);
|
||||
@@ -174,13 +189,7 @@ extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
|
||||
static isl_pw_aff *
|
||||
extract_affine_int (tree e, __isl_take isl_space *space)
|
||||
{
|
||||
- mpz_t g;
|
||||
-
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (e, g);
|
||||
- isl_pw_aff *res = extract_affine_gmp (g, space);
|
||||
- mpz_clear (g);
|
||||
-
|
||||
+ isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -411,15 +420,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
|
||||
{
|
||||
isl_space *space = isl_set_get_space (scop->param_context);
|
||||
isl_constraint *c;
|
||||
- mpz_t g;
|
||||
isl_val *v;
|
||||
|
||||
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (lb, g);
|
||||
- v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
|
||||
v = isl_val_neg (v);
|
||||
- mpz_clear (g);
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
|
||||
|
||||
@@ -431,15 +436,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
|
||||
{
|
||||
isl_space *space = isl_set_get_space (scop->param_context);
|
||||
isl_constraint *c;
|
||||
- mpz_t g;
|
||||
isl_val *v;
|
||||
|
||||
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
||||
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (ub, g);
|
||||
- v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
|
||||
|
||||
@@ -773,11 +774,8 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
isl_local_space *ls = isl_local_space_from_space (space);
|
||||
isl_constraint *c = isl_inequality_alloc (ls);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
||||
- mpz_t g;
|
||||
- mpz_init (g);
|
||||
- tree_int_to_gmp (nb_iters, g);
|
||||
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ isl_val *v
|
||||
+ = isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
return isl_set_add_constraint (domain, c);
|
||||
}
|
||||
@@ -817,12 +815,9 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
|
||||
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
|
||||
do not know whether the loop executes at least once. */
|
||||
- mpz_t g;
|
||||
- mpz_init (g);
|
||||
- wi::to_mpz (nit, g, SIGNED);
|
||||
- mpz_sub_ui (g, g, 1);
|
||||
+ --nit;
|
||||
|
||||
- isl_pw_aff *approx = extract_affine_gmp (g, isl_space_copy (space));
|
||||
+ isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
|
||||
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
|
||||
x = isl_set_project_out (x, isl_dim_set, 0,
|
||||
isl_set_dim (x, isl_dim_set));
|
||||
@@ -831,8 +826,7 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
||||
ls = isl_local_space_from_space (space);
|
||||
c = isl_inequality_alloc (ls);
|
||||
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
||||
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
|
||||
- mpz_clear (g);
|
||||
+ isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
|
||||
c = isl_constraint_set_constant_val (c, v);
|
||||
|
||||
if (dump_file)
|
||||
diff --git a/gcc/graphite.h b/gcc/graphite.h
|
||||
index 5103c614ff140..d22c4f2693f52 100644
|
||||
--- a/gcc/graphite.h
|
||||
+++ b/gcc/graphite.h
|
||||
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "sese.h"
|
||||
#include <isl/options.h>
|
||||
#include <isl/ctx.h>
|
||||
-#include <isl/val_gmp.h>
|
||||
+#include <isl/val.h>
|
||||
#include <isl/set.h>
|
||||
#include <isl/union_set.h>
|
||||
#include <isl/map.h>
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
maintainer=""
|
||||
pkgname=grub-efi-x86
|
||||
pkgver=2.14
|
||||
pkgrel=0
|
||||
pkgver=2.12
|
||||
pkgrel=9
|
||||
|
||||
_arch="x86"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -23,5 +23,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a092d829a6726702f7c21047c2b3bc27b5ef50ab928f60831a4107659a0ea0d670cc81e0d5b7ed047e06f990bffa9c032633b4f0b15a6920c9fcff37cd39e465 grub-efi-2.14-r0-x86-edge.apk
|
||||
ef8dd1fde9db54c71dd5024be62d09bf4f19dbdd2faf9772780373816050f23c594c6eefdc367f5b8cd93e97ae2f10dbd73cf7979377b72deb77acf8a3e37f71 grub-efi-2.12-r9-x86-edge.apk
|
||||
"
|
||||
@@ -6,10 +6,9 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-aarch64
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-aarch64:package_dev"
|
||||
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
03134d5e7b840db09a10f1f34254840dd86d69f960f3eb38a0944df06d897cc603a1a82af380f0ee975a10708c51430d77618debc8ae500d1bbef705fd77681b musl-1.2.6-r2-aarch64-edge.apk
|
||||
d95f9907bd7c0e818ffde40481bf0a8c23ca038e83f260f4ecb583fe164a581c978f76df3623be312400d75e23e2ca4b0742d59855cd908a9d411829ac017de7 musl-dev-1.2.6-r2-aarch64-edge.apk
|
||||
dce3b131910f7596f8f1d7c2662805b619a151313c7822cf56a7529b6a8b3baf708bfab649be42d920b173dbd7caf33c667ab120779728b9c271439e1190d4ce musl-1.2.5-r21-aarch64-edge.apk
|
||||
e635424ca037e3d949f793de68218e43fc25f0633aa27d1c330d96d97a8473643683f37bd545022bcb25c8298b8ed54288cf48ccc9633b6dda849cfa187d1019 musl-dev-1.2.5-r21-aarch64-edge.apk
|
||||
"
|
||||
@@ -6,11 +6,10 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
arch="aarch64 x86_64"
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
_arch="armhf"
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
0f2a24ee0f23612adfb578ccda1b9dccd24a37f78c90d1ba655cdcf0e094dd95f4ec34288c87f98804714cb8fc0865bf0fe079c7a1902b39c4d992bb46e10e64 musl-1.2.6-r2-armhf-edge.apk
|
||||
8b5175848776267bee95be058595e538eaa06cb63522d519b6760920faac40c16fa59a57a6be545c121f1e4d1c7cd2e4b2b8fdded57cbdb7e8585b08ca349d86 musl-dev-1.2.6-r2-armhf-edge.apk
|
||||
b5411d6b4e03c1c8767906733d091e3438b5ca61959395e5de969a311c131d460052d6ad0c776740bce51a57ea7956ceb11e76355ddc9cc7b045804dfea9927e musl-1.2.5-r21-armhf-edge.apk
|
||||
cb52d3a273cfe102f1c782412d0fa5cb24d735527c99e6702aa456d04655bb09f2939c8c64db86c7e256579cc4179c5fbf1f56b6461596a5e298494c4464c35d musl-dev-1.2.5-r21-armhf-edge.apk
|
||||
"
|
||||
@@ -6,11 +6,10 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-armv7
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
arch="aarch64 x86_64"
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-armv7:package_dev"
|
||||
|
||||
_arch="armv7"
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a5847eb6b71a52d8b348e8ef09953bf9df858f3d3a141a75bba8db7525a83b3143e7ead4b00bdddffad0a21af6a9c01e4d4c8bb27aa8d69ce13dceb58eb43309 musl-1.2.6-r2-armv7-edge.apk
|
||||
01ed9d094bee237e8794678572769ec456709e9f58511be2e301f495518ab82f86ceedc2ad03727fe43925c5e3a5a0f18a1d7b244f57107c3f7593edd14e84c4 musl-dev-1.2.6-r2-armv7-edge.apk
|
||||
440fa575b03ca4253d9d25fbe5a59ae3164ba945c012d12224ef829786afa14c654a2ff3868fedbd200bbbadd5789539f6d88def7831ca207e63a1d753021e5e musl-1.2.5-r21-armv7-edge.apk
|
||||
3b7ce82a7ab3c02cb302614898ca68356ed18512f37f3632b1ef8df44b242b40b528c60c42cc19cb6b31c1e197019bf712713eb3b7998b4efbf96dc2aac29723 musl-dev-1.2.5-r21-armv7-edge.apk
|
||||
"
|
||||
@@ -6,11 +6,10 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-loongarch64
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
arch="aarch64 x86_64"
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-loongarch64:package_dev"
|
||||
|
||||
_arch="loongarch64"
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
112265a3a4c20cbc03a67fe23c69338332e127d51d3a4ad137547fcc8554a8878425f74f46765a032ba1c36c2782a1f3dcf3102e7bbb3c93a671fb85eba4e000 musl-1.2.6-r2-loongarch64-edge.apk
|
||||
45a0953693e6eaa3434e799bc79608dccedfb711cf816ac7dc1bb7ab15ed4a934dfbd0b2ad0b286ac8b8b00f901b99c8e4b06b9f7e50fb69e2d96cc83bbc0304 musl-dev-1.2.6-r2-loongarch64-edge.apk
|
||||
ec3cafd077ad5d07aadd75fdefadb6bcb625979eec47f2ac4ac675471c4d57c956c563bbcb1a455fe30b72212047cff8a1d7f4e4d143ad681a1f3c71c98614fd musl-1.2.5-r21-loongarch64-edge.apk
|
||||
6bfff1beebaa45f409e414e3213c1260a98fc6a1345e11f41d23dcc1a7d37380ae21c538e28e72ab1c4ce5370f3e776dad6e827f741358ce85888bf5ab4e027c musl-dev-1.2.5-r21-loongarch64-edge.apk
|
||||
"
|
||||
@@ -6,11 +6,10 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-ppc64le
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
arch="aarch64 x86_64"
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-ppc64le:package_dev"
|
||||
|
||||
_arch="ppc64le"
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
fa1484bf04b70b27bf6540d8b3f506a334623a160c7d86dd5c58f418dd751eb641c35a0166b485c8ba1bba57f4e929b277352eae5e55cd740a0b73e741f72cc7 musl-1.2.6-r2-ppc64le-edge.apk
|
||||
4ea8db19500bcc05e31c1e9c37e43742b150e9218ba585f98b4cde918abd1896431797921f19ff6a82f42d2db245ccfe368ab552c01637d17f19a8ff33db0396 musl-dev-1.2.6-r2-ppc64le-edge.apk
|
||||
0e2720a11cd9c4417c96301d71f97dcc65ebe990e0115628aa30fe95debce12db75a716def86b4326074110c5e515f5f6876691c693c72ae211d641a43ba73cf musl-1.2.5-r21-ppc64le-edge.apk
|
||||
fcea40a1616b49350f90fb1f0ba99ea8e7cf40544044133553ef4d70f24376d489fa5ff85c15aa4550e4283915eb172c14429ef439a51cd1ec7e08f3a231ce04 musl-dev-1.2.5-r21-ppc64le-edge.apk
|
||||
"
|
||||
@@ -6,11 +6,10 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-riscv64
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
arch="aarch64 x86_64"
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-riscv64:package_dev"
|
||||
|
||||
_arch="riscv64"
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
3113c288563199b52e9fbb93a34e16eb87bfe4b7e0872ba0349eec1fc532ea8583565f862b82130fcf416fc006ff661afad1bf549e25d688aa6b055287089c39 musl-1.2.6-r2-riscv64-edge.apk
|
||||
8bf4503998a50581af7965407bd25aa41c2716526e6db7683dfb9cce134d9cf401bdeeafd060fd6e5d83ac52852e745c6eafdd406dd59d8f5eea256445f21a3d musl-dev-1.2.6-r2-riscv64-edge.apk
|
||||
c3f9b76c99bd9c1426f4f87b1d60405e3b4fc6c93451d08b72338496b4cefae6692ef0b0ab9f09b78317d944289060b38c0a7072737d92b3f75fbb0fd8e81132 musl-1.2.5-r21-riscv64-edge.apk
|
||||
2b28646a759b54c3b2846499c04df7d9b8195da8892a004cbefb69625bbbb874bbc1748ce3d49738931e1e321ab5d90482b08783d07efe28f55d8d1657d451dd musl-dev-1.2.5-r21-riscv64-edge.apk
|
||||
"
|
||||
@@ -6,11 +6,10 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-x86
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
arch="aarch64 x86_64"
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="x86_64"
|
||||
subpackages="musl-dev-x86:package_dev"
|
||||
|
||||
_arch="x86"
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f731bafa153e7b3ea212cc4e13d5c843227374a13530188131184c32f13907057f66af65ff7889a01f7c2b46bae7087f712b09e97ff879e2ed263ebec37432bf musl-1.2.6-r2-x86-edge.apk
|
||||
afc7894a31de08bcfa6b28604625ad7e6cf8cd61394d34bd2ed50ea07c9d4e7ad212cb668439f51599ce2c946a326e196ee01503fe196a4a8dce973ae51d57ef musl-dev-1.2.6-r2-x86-edge.apk
|
||||
6b0da8df450dc4f9b15851a0cdcfc8249f5cc6bedf91ce0d04d6b810b6d2970337345bb8ea83d6b66927be24b88395779b0f660c3511ac2adedbbae76e5c2dc2 musl-1.2.5-r21-x86-edge.apk
|
||||
771c4002ede113c134bc00586dcafba4004c3860ca715723d680c5d8916d42a0a888094276d24405a8e6a39ff79e4690f0021fff075909398ae3f7379cdb6c25 musl-dev-1.2.5-r21-x86-edge.apk
|
||||
"
|
||||
@@ -6,10 +6,9 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
maintainer=""
|
||||
pkgname=musl-x86_64
|
||||
pkgver=1.2.6
|
||||
pkgrel=2
|
||||
pkgver=1.2.5
|
||||
pkgrel=21
|
||||
arch="aarch64"
|
||||
subpackages="musl-dev-x86_64:package_dev"
|
||||
|
||||
@@ -58,6 +57,6 @@ package_dev() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5a10449984203c8f1c3f243310cec43aad11023bf83f5e08f9a15771a6c3545e678ab98a57f9f9b9528f4096d2efa1cda5620006eacef3feb459156588f5b44a musl-1.2.6-r2-x86_64-edge.apk
|
||||
2454ee23df3c3b93aaa366554692a0ab7258b7c9865247c0acde3903ebbe796e4dda982d11f7556b635b3b9cf7cf238628b276f95eabc426d5045c24830c3b2d musl-dev-1.2.6-r2-x86_64-edge.apk
|
||||
a378f3015c9222161aaa8ffd34038880f923e7a86cb400dac886d1c1adcf691e55798844f8fa6a4ee3ca9ee4d1a1a5d5ea616a550ac0d99933e64a68c2d65332 musl-1.2.5-r21-x86_64-edge.apk
|
||||
87296e7eb778ba4153c6fb27f596561ea7997ee5aa67346aeee9b42687ccb6a5d45e1c1faa2f13d1742e45f47898d78629db3320f640ef8700b55f710584662a musl-dev-1.2.5-r21-x86_64-edge.apk
|
||||
"
|
||||
@@ -2,7 +2,7 @@
|
||||
maintainer=""
|
||||
pkgname=systemd-boot-x86
|
||||
_pkgname=systemd-boot # for monitoring
|
||||
pkgver=260.2
|
||||
pkgver=259.2
|
||||
pkgrel=0
|
||||
pkgdesc="systemd's EFI boot manager for x86 EFI on x86_64."
|
||||
url="https://systemd.io/"
|
||||
@@ -118,7 +118,7 @@ efistub() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
63d15da49e7580952a48a0b50df20c1b398e4b77edf259510b0cdb9022e919387baadf2190194a50f1f582b83e0768c13997a4189cf0fb6a61b65015496d9c80 systemd-260.2.tar.gz
|
||||
1cb677c98a56210948bfc9a6e296aa92dde030ceeca6b6e4fe3f4014d051f4d0f1d83584cfdceb921d7d578952b85112b2ba497385faefca4d6c871bf8de48cf systemd-259.2.tar.gz
|
||||
8ecb5e25c0d8b01c406fa3084b0910d517cabbf12894958b4d3d77462cb0924f0a52fe2bf1aa39af29b16fd78fe080a6a99daa18015c6059fb2e52c971d83ba9 0001-meson-disable-libintl-check-if-pam-is-disabled.patch
|
||||
ad54e2c7e7a21bfa9b5f9e8db1b6af6a6d78a3e5dfe2dafcec77488f6224865ab4d4c8a8c8ee1c54c99d1741361e9fb3a51e5d36bcbc7a1c3fdcc4d0c1672132 cross-x86.meson
|
||||
"
|
||||
-3
@@ -9,7 +9,6 @@ test-{{ device.name }}:
|
||||
extends:
|
||||
# Extended from jobs defined in ci-common/ci-tron/common.yml
|
||||
- .pmos-ci-tron-runner-{{ device.name }}
|
||||
- .pmos-ci-tron-initramfs-test
|
||||
|
||||
# Extended from build-jobs.yaml.j2
|
||||
- .device-boot-flow-separate-artifacts
|
||||
@@ -29,6 +28,4 @@ test-{{ device.name }}:
|
||||
CI_TRON_FASTBOOT__RAMDISK_OFFSET: 0x01000000
|
||||
CI_TRON_FASTBOOT__TAGS_OFFSET: 0x00000100
|
||||
CI_TRON_FASTBOOT__PAGESIZE: 4096
|
||||
# Devices should not have the serial console enabled, but we want it
|
||||
# to be able to get logs. And all qcom devices use the same one!
|
||||
CI_TRON_KERNEL_CMDLINE__CONSOLE: "console=ttyMSM0,115200"
|
||||
-6
@@ -10,13 +10,7 @@ test-{{ device.name }}:
|
||||
extends:
|
||||
# Extended from jobs defined in ci-common's ci-tron/common.yml
|
||||
- .pmos-ci-tron-runner-{{ device.name }}
|
||||
- .pmos-ci-tron-initramfs-test
|
||||
|
||||
# Extended from build-jobs.yaml.j2
|
||||
- .device-boot-flow-separate-artifacts
|
||||
- .test-{{ device.name }}
|
||||
variables:
|
||||
# FIXME: cmdline is hardcoded here, but ideally would be built from
|
||||
# fragments using generate-kernel-cmdline...
|
||||
# See: https://gitlab.freedesktop.org/gfx-ci/ci-tron/-/issues/317
|
||||
CI_TRON_KERNEL_CMDLINE__DEVICEINFO: 'console=tty1 console=ttyS0,115200 pmos.force-partition-resize psi=1'
|
||||
@@ -1,34 +0,0 @@
|
||||
From c977b184350479b8c43a0e002eaf2b13b510ba4f Mon Sep 17 00:00:00 2001
|
||||
From: Michal Suchanek <msuchanek@suse.de>
|
||||
Date: Thu, 13 Oct 2022 22:39:51 +0200
|
||||
Subject: [PATCH] libfdt: Fix invalid version warning
|
||||
|
||||
python does not like the u-boot- prefix in the version, drop it.
|
||||
|
||||
/usr/lib/python3.10/site-packages/setuptools/dist.py:544: UserWarning:
|
||||
The version specified ('u-boot-2022.10') is an invalid version, this may
|
||||
not work as expected with newer versions of setuptools, pip, and PyPI.
|
||||
Please see PEP 440 for more details.
|
||||
|
||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
||||
Reviewed-by: Simon Glass <sjg@chromium.org>
|
||||
Link: https://github.com/u-boot/u-boot/commit/c977b184350479b8c43a0e002eaf2b13b510ba4f
|
||||
Note by ollieparanoid: this isn't just a warning anymore, but causes
|
||||
builds to fail with more recent python tooling.
|
||||
---
|
||||
scripts/dtc/pylibfdt/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
|
||||
index 493995e30384..a7579f0c5f67 100644
|
||||
--- a/scripts/dtc/pylibfdt/Makefile
|
||||
+++ b/scripts/dtc/pylibfdt/Makefile
|
||||
@@ -17,7 +17,7 @@ quiet_cmd_pymod = PYMOD $@
|
||||
cmd_pymod = unset CROSS_COMPILE; unset CFLAGS; \
|
||||
CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \
|
||||
LDFLAGS="$(HOSTLDFLAGS)" \
|
||||
- VERSION="u-boot-$(UBOOTVERSION)" \
|
||||
+ VERSION="$(UBOOTVERSION)" \
|
||||
CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
|
||||
SOURCES="$(PYLIBFDT_srcs)" \
|
||||
SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
From 78a3943b752afa9321bd4d87626cf44b5fdeeb63 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
Date: Sun, 31 May 2026 10:51:08 +0200
|
||||
Subject: [PATCH] python 3.13: binman: migrate from pkg_resources to importlib
|
||||
|
||||
Fix for:
|
||||
File "/home/pmos/build/src/uboot-imx-c4960dade272da9d6a7f53f6956d4d6747d573e9/tools/binman/control.py", line 11, in <module>
|
||||
import pkg_resources
|
||||
ModuleNotFoundError: No module named 'pkg_resources'
|
||||
|
||||
Patch based on:
|
||||
https://github.com/u-boot/u-boot/commit/538719cb6a77934d069e0e64f264457a59a9ebfc
|
||||
|
||||
Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
---
|
||||
tools/binman/control.py | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tools/binman/control.py b/tools/binman/control.py
|
||||
index bfe63a1520..e77e433ae4 100644
|
||||
--- a/tools/binman/control.py
|
||||
+++ b/tools/binman/control.py
|
||||
@@ -8,7 +8,7 @@
|
||||
from collections import OrderedDict
|
||||
import glob
|
||||
import os
|
||||
-import pkg_resources
|
||||
+import importlib.resources as importlib_resources
|
||||
import re
|
||||
|
||||
import sys
|
||||
@@ -89,7 +89,7 @@ def _ReadMissingBlobHelp():
|
||||
msg = ''
|
||||
return tag, msg
|
||||
|
||||
- my_data = pkg_resources.resource_string(__name__, 'missing-blob-help')
|
||||
+ my_data = importlib_resources.files(__package__).joinpath('missing-blob-help').read_bytes()
|
||||
re_tag = re.compile('^([-a-z0-9]+):$')
|
||||
result = {}
|
||||
tag = None
|
||||
@@ -136,8 +136,9 @@ def GetEntryModules(include_testing=True):
|
||||
Returns:
|
||||
Set of paths to entry class filenames
|
||||
"""
|
||||
- glob_list = pkg_resources.resource_listdir(__name__, 'etype')
|
||||
- glob_list = [fname for fname in glob_list if fname.endswith('.py')]
|
||||
+ entries = importlib_resources.files(__package__).joinpath('etype')
|
||||
+ glob_list = [entry.name for entry in entries.iterdir()
|
||||
+ if entry.name.endswith('.py') and entry.is_file()]
|
||||
return set([os.path.splitext(os.path.basename(item))[0]
|
||||
for item in glob_list
|
||||
if include_testing or '_testing' not in item])
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Archived: Downstream port, only for testing. Use mainline port (alcatel-idol347)!
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-alcatel-idol347-downstream
|
||||
pkgdesc="Alcatel OneTouch Idol 3 (4.7) (Downstream)"
|
||||
pkgver=5
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Archived: Kernel does not build anymore
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-amazon-mantis
|
||||
pkgdesc="Amazon Fire TV Stick 4K"
|
||||
pkgver=4
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Archived: Replaced by apple-idevice
|
||||
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-apple-d22
|
||||
pkgdesc="Apple iPhone X (Global)"
|
||||
pkgver=3
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Archived: Downstream port, only for testing. Use mainline port (asus-x00td)!
|
||||
# This kernel is mostly used for bringing up new features on mainline, thus unmaintained
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-asus-x00td-downstream
|
||||
pkgdesc="Asus Zenfone Max Pro M1 downstream"
|
||||
pkgver=4
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Archived: Downstream port, only for testing. Use mainline port (bq-paella)!
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-bq-paella-downstream
|
||||
pkgdesc="BQ Aquaris X5 (Downstream)"
|
||||
pkgver=4
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Archived: unmaintained port, only for testing. Use generic/mainline port (qcom-msm8916)
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-bq-piccolo
|
||||
pkgdesc="BQ Aquaris M5"
|
||||
pkgver=10
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Archived: Kernel does not build anymore
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-bq-vegetahd
|
||||
pkgdesc="BQ Aquaris E5 HD"
|
||||
pkgver=4
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
# Archived: linux-radxa-dev packages x86_64 binaries in aarch64 package which makes akms part of this device fail when built on aarch64
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer="Antoine Martin (ayakael) <dev@ayakael.net>"
|
||||
pkgname=device-clockworkpi-uconsole-radxa-cm5
|
||||
pkgdesc="Clockwork Tech ClockworkPi uConsole Radxa CM5"
|
||||
pkgver=6
|
||||
_commit=2e8040ec92f85e3d43caf3e44557cb0659db4531
|
||||
_dtso_commit=c2204834e1d7d0acfd64e1b7874d432bc142f1a4
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!archcheck"
|
||||
depends="
|
||||
linux-radxa
|
||||
postmarketos-base
|
||||
u-boot-radxa-cm5
|
||||
"
|
||||
makedepends="
|
||||
devicepkg-dev
|
||||
clang
|
||||
dtc
|
||||
linux-radxa
|
||||
linux-radxa-dev
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-openrc
|
||||
$pkgname-x11
|
||||
$pkgname-akms
|
||||
"
|
||||
source="
|
||||
clockworkradxa-linux-$_commit.tar.gz::https://github.com/ak-rex/ClockworkRadxa-linux/archive/$_commit.tar.gz
|
||||
radxa-cm5-uconsole-$_dtso_commit.tar.gz::https://github.com/dev-null2019/radxa-cm5-uconsole/archive/$_dtso_commit.tar.gz
|
||||
|
||||
deviceinfo
|
||||
kernel-cmdline.conf
|
||||
modules-initfs
|
||||
modules-load.conf
|
||||
modprobe.conf
|
||||
xorg.conf
|
||||
|
||||
driver-makefile.in
|
||||
driver-akmbuild.in
|
||||
"
|
||||
builddir="$srcdir"/ClockworkRadxa-linux-$_commit
|
||||
|
||||
# Location of out-of-tree drivers to be built using AKMS
|
||||
_drivers="
|
||||
drivers/pinctrl/pinctrl-axp209.c
|
||||
drivers/power/supply/axp20x_usb_power.c
|
||||
drivers/iio/adc/axp20x_adc.c
|
||||
drivers/iio/adc/ti-adc081c.c
|
||||
drivers/mfd/axp20x-i2c.c
|
||||
drivers/mfd/axp20x.c
|
||||
drivers/regulator/axp20x-regulator.c
|
||||
drivers/input/misc/axp20x-pek.c
|
||||
drivers/power/supply/axp20x_ac_power.c
|
||||
drivers/power/supply/axp20x_battery.c
|
||||
drivers/video/backlight/ocp8178_bl.c
|
||||
drivers/gpu/drm/panel/panel-cwu50.c
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
|
||||
local _modules=
|
||||
local _objects=
|
||||
local _file=
|
||||
|
||||
# setup akms folder
|
||||
# this also generates information to complete AKMBUILD and Makefile
|
||||
mkdir -p "$builddir"/akms
|
||||
for driver in $_drivers; do
|
||||
_file=${driver##*\/}
|
||||
cp "$builddir"/$driver "$builddir"/akms/$_file
|
||||
_modules="$_modules ${_file/.c/.ko}"
|
||||
_objects="$_objects ${_file/.c/.o}"
|
||||
done
|
||||
sed -e "s/%%MODVER%%/$pkgver/" -e "s/%%DRIVER_MOD%%/$_modules/" "$srcdir"/driver-akmbuild.in > "$builddir"/akms/AKMBUILD
|
||||
sed "s/%%DRIVER_OBJ%%/$_objects/" "$srcdir"/driver-makefile.in > "$builddir"/akms/Makefile
|
||||
|
||||
# generate dtbo for uconsole
|
||||
_kernel_ver=$(find /lib/modules -maxdepth 1 -mindepth 1 | sed 's|.*/||g')
|
||||
cp -r "$srcdir"/radxa-cm5-uconsole-$_dtso_commit/devicetree_overlays "$builddir"/dtso
|
||||
echo ">>> Generating dtbo against $_kernel_ver"
|
||||
for dts in "$builddir"/dtso/*.dts; do
|
||||
cpp -nostdinc -I "/usr/src/linux-headers-$_kernel_ver/include" -I arch -undef -x assembler-with-cpp $dts $dts.preprocessed
|
||||
dtc -O dtb -o ${dts/.dts/.dtbo} $dts.preprocessed
|
||||
done
|
||||
}
|
||||
|
||||
x11() {
|
||||
install_if="$pkgname xorg-server"
|
||||
install -Dm644 "$srcdir"/xorg.conf \
|
||||
"$subpkgdir"/etc/X11/xorg.conf.d/10-monitor.conf
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
|
||||
# merge dtbos with soc dtb for uconsole
|
||||
mkdir -p "$pkgdir"/boot/dtbs/rockchip
|
||||
fdtoverlay -i /boot/dtbs/rockchip/rk3588s-radxa-cm5-rpi-cm4-io.dtb "$builddir"/dtso/*.dtbo -o "$pkgdir"/boot/dtbs/rockchip/rk3588s-radxa-cm5-uconsole.dtb
|
||||
}
|
||||
|
||||
# Test build of drivers against kernel
|
||||
check() {
|
||||
_kernel_ver=$(find /lib/modules -maxdepth 1 -mindepth 1 | sed 's|.*/||g')
|
||||
for ver in $_kernel_ver; do
|
||||
echo ">>> Testing module build against $ver"
|
||||
cp -R "$builddir"/akms "$builddir"/akms-$ver
|
||||
(
|
||||
cd "$builddir"/akms-$ver
|
||||
make KVER=$ver
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
akms() {
|
||||
pkgdesc="uConsole kernel module (AKMS)"
|
||||
depends="akms linux-radxa-dev build-base"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/src
|
||||
cp -R "$builddir"/akms "$subpkgdir"/usr/src/clockworkpi-radxa
|
||||
chmod -R u=rwX,go=rX-w "$subpkgdir"/usr/src/clockworkpi-radxa
|
||||
}
|
||||
|
||||
openrc() {
|
||||
depends=openrc
|
||||
install_if="$pkgname=$pkgver-r$pkgrel openrc"
|
||||
install="$subpkgname.post-install $subpkgname.post-upgrade"
|
||||
mkdir -p "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a9c48c3470d5641113e351456d6cfa1e2283e6577cf54eea9a2d49ba4f6269e46cba16039584b34e07c7d8006f6dec112e970148f155f2c3ff0670521568a5a7 clockworkradxa-linux-2e8040ec92f85e3d43caf3e44557cb0659db4531.tar.gz
|
||||
a15eb74d9db9114022e96ba04542d18350cf6d637c5efa49f4a5a65c33c5fd20a7997095a049a561fb7aac767a299f367489c5a342138a5259cc32ebb6152384 radxa-cm5-uconsole-c2204834e1d7d0acfd64e1b7874d432bc142f1a4.tar.gz
|
||||
0afdcebb4b42ab9d489bfeb32912f03de0ee30875eba760112b24def4bb04185eca5f827c737da4824081940ec998c2c26a99e9105267e90e9d852b0afa76539 deviceinfo
|
||||
fa6332b91b62572528b1f919370382d67f521b0a65c3c9f416df67545ebae7b01f31729340a42e656b5589cdbde676ec8fe0eb9537a34e02ec20f5309bf43b12 kernel-cmdline.conf
|
||||
85d573bfd51ac4aa502336452b0384af77b6ec095f5c4760e8f287b8452b3ccb4521051bc01c53fa0856440d52231f535f3f0258d62ad578161ad464344413e9 modules-initfs
|
||||
642cdb1b4ac02b8c3ab7b72f4eeef615ac4911b42bcd845b54305f0ff64c07b86f4a807a97d395cb6c0cd0a5f5eed15e68d9e4ccb69db8e38fb65c8be4acaeeb modules-load.conf
|
||||
a5324ed5118168b846d359dc2c8e76ccdc624003d157a28e4c9728ddedd9b52c6deb95af9c3a9d94faf52413f2f830dc45ec6c0093458d27149ef17de5dceef5 modprobe.conf
|
||||
939cb4ca50e0f54258dd92bdfbf91e6fa7b33b386022d058ba0d4b4e4f6d855cba9f5fffda0652f18c8b9b95d5dbbfc766e0931f0de53841f96d9d8975bf27e7 xorg.conf
|
||||
51a1fc5ba9336e784fe8dfb97eed8d3f51fd181a9a76c5266e227e1670aa423fdaec04b869795a2abd5afca6d472a1f107f30a0f0efd242ee16c8910773ddcc2 driver-makefile.in
|
||||
576346f3e5611dcba4fd3a5f5bf97e51febb844ff8006b5e4e8aba429df0c1835f702548d61120439cf0279b56d337f4ab9e2389ae8fa0c024b0a3afd4422b2f driver-akmbuild.in
|
||||
"
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,26 @@
|
||||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Clockwork Tech ClockworkPi uConsole Radxa CM5"
|
||||
deviceinfo_manufacturer="Clockwork Tech"
|
||||
deviceinfo_codename="clockworkpi-uconsole-radxa-cm5"
|
||||
deviceinfo_year="2023"
|
||||
deviceinfo_arch="aarch64"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Device related
|
||||
deviceinfo_drm="true"
|
||||
deviceinfo_chassis="embedded"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1280"
|
||||
deviceinfo_screen_height="720"
|
||||
deviceinfo_getty="ttyFIQ0;1500000"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_boot_filesystem="fat32"
|
||||
deviceinfo_dtb="rockchip/rk3588s-radxa-cm5-uconsole"
|
||||
deviceinfo_sd_embed_firmware="u-boot/radxa-cm5/rpi-cm4-io/idbloader.img:64,u-boot/radxa-cm5/rpi-cm4-io/u-boot.itb:16384"
|
||||
deviceinfo_sd_embed_firmware_step_size="512"
|
||||
deviceinfo_boot_part_start="32768"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
@@ -0,0 +1,3 @@
|
||||
modname=clockworkpi-radxa
|
||||
modver=%%MODVER%%
|
||||
built_modules='%%DRIVER_MOD%%'
|
||||
@@ -0,0 +1,10 @@
|
||||
obj-m += %%DRIVER_OBJ%%
|
||||
USER := $(shell whoami)
|
||||
KVER ?= $(shell uname -r)
|
||||
KDIR ?= /lib/modules/$(KVER)/build
|
||||
|
||||
all:
|
||||
make -C $(KDIR) M=$(PWD) modules
|
||||
|
||||
clean:
|
||||
make -C $(KDIR) M=$(PWD) clean
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 2045 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user