Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84cba00242 | ||
|
|
18d6098210 | ||
|
|
d8d55f76b2 | ||
|
|
dbdacde199 |
No files matched your search
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def args(request):
|
||||
# Initialize args
|
||||
pmaports = os.path.realpath(f"{os.path.dirname(__file__)}/../..")
|
||||
sys.argv = ["pmbootstrap",
|
||||
"--aports", pmaports,
|
||||
"--log", "$WORK/log_testsuite_pmaports.txt"
|
||||
"chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
|
||||
# Initialize logging
|
||||
pmb.helpers.logging.init(args)
|
||||
request.addfinalizer(pmb.helpers.logging.logfd.close)
|
||||
return args
|
||||
@@ -1,136 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
|
||||
|
||||
def device_dependency_check(apkbuild, path):
|
||||
""" Raise an error if a device package has a dependency that is not allowed
|
||||
(e.g. because it should be in a subpackage instead). """
|
||||
|
||||
# asus-me176c: without this, the device will simply run the broken ACPI
|
||||
# DSDT table, so we might as well update it. See pmaports!699.
|
||||
firmware_ok = {"device-asus-me176c": ["firmware-asus-me176c-acpi"]}
|
||||
|
||||
pkgname = apkbuild["pkgname"]
|
||||
for depend in apkbuild["depends"]:
|
||||
if (depend.startswith("firmware-") or
|
||||
depend.startswith("linux-firmware")):
|
||||
if pkgname in firmware_ok and depend in firmware_ok[pkgname]:
|
||||
continue
|
||||
raise RuntimeError("Firmware package '" + depend + "' found in"
|
||||
" depends of " + path + ". These go into"
|
||||
" subpackages now, see"
|
||||
" <https://postmarketos.org/devicepkg>.")
|
||||
|
||||
|
||||
def test_aports_device(args):
|
||||
"""
|
||||
Various tests performed on the /device/*/device-* aports.
|
||||
"""
|
||||
for path in glob.iglob(args.aports + "/device/*/device-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
|
||||
# Depends: Require "postmarketos-base"
|
||||
if "postmarketos-base" not in apkbuild["depends"]:
|
||||
raise RuntimeError("Missing 'postmarketos-base' in depends of " +
|
||||
path)
|
||||
|
||||
# Depends: Must not have firmware packages
|
||||
for depend in apkbuild["depends"]:
|
||||
device_dependency_check(apkbuild, path)
|
||||
|
||||
# Architecture
|
||||
device = apkbuild["pkgname"][len("device-"):]
|
||||
deviceinfo = pmb.parse.deviceinfo(args, device)
|
||||
if "".join(apkbuild["arch"]) != deviceinfo["arch"]:
|
||||
raise RuntimeError("wrong architecture, please change to arch=\"" +
|
||||
deviceinfo["arch"] + "\": " + path)
|
||||
if "!archcheck" not in apkbuild["options"]:
|
||||
raise RuntimeError("!archcheck missing in options= line: " + path)
|
||||
|
||||
if deviceinfo["flash_kernel_on_update"] == "true" \
|
||||
and "postmarketos-update-kernel" not in apkbuild["depends"]:
|
||||
raise RuntimeError(
|
||||
"Deviceinfo indicates this device supports automatic kernel"
|
||||
" flashing on update, but doesn't depend on"
|
||||
" 'postmarketos-update-kernel'. Please add the missing"
|
||||
" dependency.")
|
||||
|
||||
|
||||
def test_aports_device_kernel(args):
|
||||
"""
|
||||
Verify the kernels specified in the device packages:
|
||||
* Kernel must not be in depends when kernels are in subpackages
|
||||
* Check if only one kernel is defined in depends
|
||||
"""
|
||||
|
||||
# Iterate over device aports
|
||||
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
|
||||
# Parse apkbuild and kernels from subpackages
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
device = apkbuild["pkgname"][len("device-"):]
|
||||
kernels_subpackages = pmb.parse._apkbuild.kernels(args, device)
|
||||
|
||||
# Parse kernels from depends
|
||||
kernels_depends = []
|
||||
for depend in apkbuild["depends"]:
|
||||
if not depend.startswith("linux-"):
|
||||
continue
|
||||
kernels_depends.append(depend)
|
||||
|
||||
# Kernel in subpackages *and* depends
|
||||
if kernels_subpackages:
|
||||
raise RuntimeError("Kernel package '" + depend + "' needs to"
|
||||
" be removed when using kernel" +
|
||||
" subpackages: " + path)
|
||||
|
||||
# No kernel
|
||||
if not kernels_depends and not kernels_subpackages:
|
||||
raise RuntimeError("Device doesn't have a kernel in depends or"
|
||||
" subpackages: " + path)
|
||||
|
||||
# Multiple kernels in depends
|
||||
if len(kernels_depends) > 1:
|
||||
raise RuntimeError("Please use kernel subpackages instead of"
|
||||
" multiple kernels in depends (see"
|
||||
" <https://postmarketos.org/devicepkg>): " +
|
||||
path)
|
||||
|
||||
|
||||
def test_aports_maintained(args):
|
||||
"""
|
||||
Ensure that aports in /device/{main,community} have "Maintainer:" and
|
||||
"Co-Maintainer:" (only required for main) listed in their APKBUILDs.
|
||||
"""
|
||||
for path in glob.iglob(f"{args.aports}/device/main/*/APKBUILD"):
|
||||
if '/firmware-' in path:
|
||||
continue
|
||||
maintainers = pmb.parse._apkbuild.maintainers(path)
|
||||
assert maintainers and len(maintainers) >= 2, \
|
||||
f"{path} in main needs at least 1 Maintainer and 1 Co-Maintainer"
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/device/community/*/APKBUILD"):
|
||||
if '/firmware-' in path:
|
||||
continue
|
||||
maintainers = pmb.parse._apkbuild.maintainers(path)
|
||||
assert maintainers, f"{path} in community needs at least 1 Maintainer"
|
||||
|
||||
|
||||
def test_aports_unmaintained(args):
|
||||
"""
|
||||
Ensure that aports in /device/unmaintained have an "Unmaintained:" comment
|
||||
that describes why the aport is unmaintained.
|
||||
"""
|
||||
for path in glob.iglob(f"{args.aports}/device/unmaintained/*/APKBUILD"):
|
||||
unmaintained = pmb.parse._apkbuild.unmaintained(path)
|
||||
assert unmaintained, f"{path} should have an Unmaintained: " +\
|
||||
"comment that describes why the package is unmaintained"
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
|
||||
|
||||
def deviceinfo_obsolete(info):
|
||||
"""
|
||||
Test for obsolete options used in the deviceinfo file. They must still be
|
||||
defined in pmbootstrap's config/__init__.py.
|
||||
"""
|
||||
obsolete_options = ["weston_pixman_type"]
|
||||
for option in obsolete_options:
|
||||
if info[option]:
|
||||
raise RuntimeError("option '" + option + "' is obsolete, please"
|
||||
" remove it (reasons for removal are at"
|
||||
" <https://postmarketos.org/deviceinfo>)")
|
||||
|
||||
|
||||
def test_deviceinfo(args):
|
||||
"""
|
||||
Parse all deviceinfo files successfully and run checks on the parsed data.
|
||||
"""
|
||||
# Iterate over all devices
|
||||
last_exception = None
|
||||
count = 0
|
||||
for folder in glob.glob(args.aports + "/device/*/device-*"):
|
||||
device = folder[len(args.aports):].split("-", 1)[1]
|
||||
|
||||
f = open(folder[len(args.aports):][1:] + "/deviceinfo")
|
||||
lines = f.read().split("\n")
|
||||
f.close()
|
||||
|
||||
try:
|
||||
# variable can not be empty
|
||||
for line in lines:
|
||||
if '=""' in line:
|
||||
raise RuntimeError("Please remove the empty variable: " + line)
|
||||
|
||||
# Successful deviceinfo parsing / obsolete options
|
||||
info = pmb.parse.deviceinfo(args, device)
|
||||
deviceinfo_obsolete(info)
|
||||
|
||||
# deviceinfo_name must start with manufacturer
|
||||
name = info["name"]
|
||||
manufacturer = info["manufacturer"]
|
||||
if not name.startswith(manufacturer) and \
|
||||
not name.startswith("Google"):
|
||||
raise RuntimeError("Please add the manufacturer in front of"
|
||||
" the deviceinfo_name, e.g.: '" +
|
||||
manufacturer + " " + name + "'")
|
||||
|
||||
# Don't abort on first error
|
||||
except Exception as e:
|
||||
last_exception = e
|
||||
count += 1
|
||||
print(device + ": " + str(e))
|
||||
|
||||
# Raise the last exception
|
||||
if last_exception:
|
||||
print("deviceinfo error count: " + str(count))
|
||||
raise last_exception
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Johannes Marbach
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
|
||||
|
||||
def test_aports_firmware(args):
|
||||
"""
|
||||
Various tests performed on the /**/firmware-* aports.
|
||||
"""
|
||||
|
||||
excluded = [
|
||||
"firmware-motorola-potter", # Depends on soc-qcom-msm8916-ucm
|
||||
"firmware-oneplus-msm8998", # Depends on soc-qcom-sdm845-nonfree-firmware
|
||||
"firmware-oneplus-sdm845", # Depends on soc-qcom-sdm845-nonfree-firmware
|
||||
"firmware-samsung-baffinlite", # Depends on firmware-aosp-broadcom-wlan
|
||||
"firmware-samsung-crespo", # Depends on firmware-aosp-broadcom-wlan
|
||||
"firmware-samsung-maguro", # Depends on firmware-aosp-broadcom-wlan
|
||||
"firmware-shift-sdm845", # Depends on soc-qcom-sdm845-nonfree-firmware
|
||||
"firmware-xiaomi-beryllium", # Depends on soc-qcom-sdm845-nonfree-firmware
|
||||
"firmware-xiaomi-ferrari", # Depends on soc-qcom-msm8916
|
||||
"firmware-xiaomi-willow", # Doesn't build, source link is dead (pma#1212)
|
||||
]
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/**/firmware-*/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
aport_name = os.path.basename(os.path.dirname(path))
|
||||
|
||||
if aport_name not in excluded:
|
||||
if "pmb:cross-native" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"{aport_name}: \"pmb:cross-native\" missing in"
|
||||
" options= line. The pmb:cross-native option is"
|
||||
" preferred because it results in significantly"
|
||||
" lower build times. If the package doesn't build"
|
||||
" with the option, you can add an exemption in"
|
||||
" .gitlab-ci/testcases/test_firmware.py.")
|
||||
|
||||
if "!tracedeps" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"{aport_name}: \"!tracedeps\" missing in"
|
||||
" options= line. The tracedeps option is superfluous"
|
||||
" for firmware packages.")
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
|
||||
|
||||
def test_aports_kernel(args):
|
||||
"""
|
||||
Various tests performed on the /**/linux-* aports.
|
||||
"""
|
||||
|
||||
for path in glob.iglob(f"{args.aports}/**/linux-*/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
aport_name = os.path.basename(os.path.dirname(path))
|
||||
|
||||
if "pmb:cross-native" not in apkbuild["options"]:
|
||||
raise RuntimeError(f"{aport_name}: \"pmb:cross-native\" missing in"
|
||||
" options= line")
|
||||
|
||||
# cross-compilers should not be in makedepends
|
||||
for ccc in ["gcc-armv7", "gcc-armhf", "gcc-aarch64",
|
||||
"gcc4-armv7", "gcc4-armhf", "gcc4-aarch64",
|
||||
"gcc6-armv7", "gcc6-armhf", "gcc6-aarch64"]:
|
||||
if ccc in apkbuild["makedepends"]:
|
||||
raise RuntimeError(f"{aport_name}: Cross-compiler ({ccc}) should"
|
||||
" not be explicitly specified in makedepends!"
|
||||
" pmbootstrap installs cross-compiler"
|
||||
" automatically.")
|
||||
|
||||
# nftables support in kernels used by main and community devices
|
||||
for dir in ["main", "device/main", "device/community"]:
|
||||
if path.startswith(f"{args.aports}/{dir}"):
|
||||
assert pmb.parse.kconfig.check(args,
|
||||
aport_name.replace("linux-", ""),
|
||||
force_nftables_check=True)
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
|
||||
|
||||
def test_aports_ui(args):
|
||||
"""
|
||||
Raise an error if package in _pmb_recommends is not found
|
||||
"""
|
||||
for arch in pmb.config.build_device_architectures:
|
||||
for path in glob.iglob(args.aports + "/main/postmarketos-ui-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
# Skip if arch isn't enabled
|
||||
if not pmb.helpers.package.check_arch(args, apkbuild["pkgname"], arch, False):
|
||||
continue
|
||||
|
||||
for package in apkbuild["_pmb_recommends"]:
|
||||
depend = pmb.helpers.package.get(args, package,
|
||||
arch, must_exist=False)
|
||||
if depend is None or not pmb.helpers.package.check_arch(args, package, arch):
|
||||
raise RuntimeError(f"{path}: package '{package}' from"
|
||||
f" _pmb_recommends not found for arch '{arch}'")
|
||||
|
||||
# Check packages from "_pmb_recommends" of -extras subpackage if one exists
|
||||
if f"{apkbuild['pkgname']}-extras" in apkbuild["subpackages"]:
|
||||
apkbuild = apkbuild["subpackages"][f"{apkbuild['pkgname']}-extras"]
|
||||
for package in apkbuild["_pmb_recommends"]:
|
||||
depend = pmb.helpers.package.get(args, package,
|
||||
arch, must_exist=False)
|
||||
if depend is None or not pmb.helpers.package.check_arch(args, package, arch):
|
||||
raise RuntimeError(f"{path}: package '{package}' from _pmb_recommends "
|
||||
f"of -extras subpackage is not found for arch '{arch}'")
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.repo
|
||||
|
||||
|
||||
def parse_source_from_checksums(args, apkbuild_path):
|
||||
"""
|
||||
Read the APKBUILD file and parse source files from the checksums at the
|
||||
bottom. This has always the same format, even if $source is built with hard
|
||||
to parse shell code (like in postmarketos-base).
|
||||
|
||||
:param apkbuild_path: full path to the APKBUILD
|
||||
:returns: list of parsed "source" files, e.g.:
|
||||
["first.patch", "second.patch"]
|
||||
"""
|
||||
start = 'sha512sums="'
|
||||
in_block = False
|
||||
ret = []
|
||||
|
||||
with open(apkbuild_path, encoding="utf-8") as handle:
|
||||
for line in handle.readlines():
|
||||
# Find start
|
||||
if not in_block:
|
||||
if line.startswith(start):
|
||||
in_block = True
|
||||
else:
|
||||
continue
|
||||
|
||||
# sha512sums may have lines without checksums:
|
||||
# https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/73
|
||||
if " " not in line:
|
||||
continue
|
||||
|
||||
try:
|
||||
_, filename = line.rstrip().split(" ", 2)
|
||||
except ValueError:
|
||||
raise ValueError("Failed to parse checksums. Try to delete the"
|
||||
" checksums and generate them again with"
|
||||
f" 'pmbootstrap checksum': {apkbuild_path}")
|
||||
|
||||
# Find end
|
||||
if filename.endswith('"'):
|
||||
ret += [filename[:-1]]
|
||||
break
|
||||
|
||||
ret += [filename]
|
||||
return ret
|
||||
|
||||
|
||||
def test_aports_unreferenced_files(args):
|
||||
"""
|
||||
Raise an error if an unreferenced file is found
|
||||
"""
|
||||
for apkbuild_path in glob.iglob(args.aports + "/**/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(apkbuild_path)
|
||||
sources_chk = parse_source_from_checksums(args, apkbuild_path)
|
||||
|
||||
# Collect install files from subpackages
|
||||
subpackage_installs = []
|
||||
if apkbuild["subpackages"]:
|
||||
for subpackage in apkbuild["subpackages"].values():
|
||||
if not subpackage:
|
||||
continue
|
||||
try:
|
||||
subpackage_installs += subpackage["install"]
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
# Collect trigger files
|
||||
trigger_sources = []
|
||||
if apkbuild["triggers"]:
|
||||
for trigger in apkbuild["triggers"]:
|
||||
trigger_sources.append(trigger.split("=")[0])
|
||||
|
||||
dirname = os.path.dirname(apkbuild_path)
|
||||
for file in glob.iglob(dirname + "/**", recursive=True):
|
||||
rel_file_path = os.path.relpath(file, dirname)
|
||||
# Skip APKBUILDs and directories
|
||||
if rel_file_path == "APKBUILD" or os.path.isdir(file):
|
||||
continue
|
||||
|
||||
if os.path.basename(rel_file_path) not in sources_chk \
|
||||
and rel_file_path not in apkbuild["install"] \
|
||||
and rel_file_path not in subpackage_installs \
|
||||
and rel_file_path not in trigger_sources:
|
||||
raise RuntimeError(f"{apkbuild_path}: found unreferenced file: {rel_file_path}")
|
||||
+1
-1
@@ -115,7 +115,7 @@ ENV/
|
||||
.idea
|
||||
|
||||
# Sources as unpacked and built by abuild
|
||||
**/src/
|
||||
/*/*/src/
|
||||
|
||||
# Allow having untracked packages in aports using a custom-something directory
|
||||
/custom-*/
|
||||
+10
-15
@@ -3,7 +3,7 @@
|
||||
# global settings
|
||||
image: alpine:latest
|
||||
after_script:
|
||||
- .ci/move_logs.sh $CI_PROJECT_DIR
|
||||
- .gitlab-ci/move_logs.sh $CI_PROJECT_DIR
|
||||
stages:
|
||||
- lint
|
||||
- build
|
||||
@@ -34,7 +34,7 @@ wiki:
|
||||
before_script:
|
||||
- apk -q add python3
|
||||
script:
|
||||
- .ci/check_devices_in_wiki.py --booting
|
||||
- .gitlab-ci/check_devices_in_wiki.py --booting
|
||||
|
||||
# testcases linting
|
||||
testcases-linting:
|
||||
@@ -44,8 +44,8 @@ testcases-linting:
|
||||
refs:
|
||||
- merge_requests
|
||||
changes:
|
||||
- .ci/*
|
||||
- .ci/*/*
|
||||
- .gitlab-ci/*
|
||||
- .gitlab-ci/*/*
|
||||
before_script:
|
||||
- apk -q add py-flake8
|
||||
script:
|
||||
@@ -57,9 +57,10 @@ shellcheck:
|
||||
<<: *only-default
|
||||
image: alpine:edge
|
||||
before_script:
|
||||
- apk -q upgrade
|
||||
- apk -q add shellcheck
|
||||
script:
|
||||
- .ci/shellcheck.sh
|
||||
- .gitlab-ci/shellcheck.sh
|
||||
|
||||
# aports checks (generic)
|
||||
aports-static:
|
||||
@@ -69,8 +70,8 @@ aports-static:
|
||||
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
- sh ./install_pmbootstrap.sh pytest
|
||||
script:
|
||||
- su pmos -c ".ci/run_testcases.sh"
|
||||
- su pmos -c ".ci/check_changed_aports_versions.py"
|
||||
- su pmos -c ".gitlab-ci/run_testcases.sh"
|
||||
- su pmos -c ".gitlab-ci/check_changed_aports_versions.py"
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
@@ -98,7 +99,7 @@ aport-lint:
|
||||
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
- sh ./install_pmbootstrap.sh
|
||||
script:
|
||||
- su pmos -c ".ci/apkbuild-linting.py"
|
||||
- su pmos -c ".gitlab-ci/apkbuild-linting.py"
|
||||
only:
|
||||
- merge_requests
|
||||
allow_failure: true
|
||||
@@ -139,7 +140,7 @@ mr-settings:
|
||||
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
- sh ./install_pmbootstrap.sh
|
||||
script:
|
||||
- .ci/build.sh
|
||||
- .gitlab-ci/build.sh
|
||||
- cp -r /home/pmos/.local/var/pmbootstrap/packages/ packages/ || true
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
@@ -153,16 +154,10 @@ build-x86:
|
||||
extends: .build
|
||||
|
||||
build-aarch64:
|
||||
tags:
|
||||
- aarch64
|
||||
extends: .build
|
||||
|
||||
build-armv7:
|
||||
tags:
|
||||
- aarch64
|
||||
extends: .build
|
||||
|
||||
build-armhf:
|
||||
tags:
|
||||
- aarch64
|
||||
extends: .build
|
||||
@@ -13,19 +13,20 @@ if __name__ == "__main__":
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
packages = []
|
||||
issues = []
|
||||
for apkbuild in apkbuilds:
|
||||
if apkbuild.startswith("temp/") or apkbuild.startswith("cross/"):
|
||||
print(f"NOTE: Skipping linting of {apkbuild}")
|
||||
continue
|
||||
packages.append(os.path.basename(os.path.dirname(apkbuild)))
|
||||
if len(packages) < 1:
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
result = common.run_pmbootstrap(["-q", "lint"] + packages, output_return=True)
|
||||
package = os.path.basename(os.path.dirname(apkbuild))
|
||||
result = common.run_pmbootstrap(["-q", "lint", package], output_return=True)
|
||||
if len(result) > 0:
|
||||
issues.append([apkbuild, result])
|
||||
|
||||
if len(result) > 0:
|
||||
if len(issues) > 0:
|
||||
print("Linting issues found:")
|
||||
print(result)
|
||||
for issue in issues:
|
||||
print(issue[0] + ": " + issue[1])
|
||||
|
||||
sys.exit(1)
|
||||
@@ -5,4 +5,4 @@ export PYTHONUNBUFFERED=1
|
||||
JOB_ARCH="${CI_JOB_NAME#build-}"
|
||||
|
||||
set -x
|
||||
su pmos -c ".ci/build_changed_aports.py $JOB_ARCH"
|
||||
su pmos -c ".gitlab-ci/build_changed_aports.py $JOB_ARCH"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import sys
|
||||
|
||||
@@ -15,9 +15,8 @@ import pmb.helpers.pmaports
|
||||
|
||||
def build_strict(packages, arch):
|
||||
common.run_pmbootstrap(["build_init"])
|
||||
common.run_pmbootstrap(["--details-to-stdout", "--no-ccache", "build",
|
||||
"--strict", "--force",
|
||||
"--arch", arch, ] + list(packages))
|
||||
common.run_pmbootstrap(["--details-to-stdout", "build", "--strict",
|
||||
"--force", "--arch", arch] + list(packages))
|
||||
|
||||
|
||||
def verify_checksums(packages, arch):
|
||||
@@ -67,7 +66,8 @@ if __name__ == "__main__":
|
||||
# (Iterate over copy of packages, because we modify it in this loop)
|
||||
for package in packages.copy():
|
||||
apkbuild_path = pmb.helpers.pmaports.find(args, package)
|
||||
apkbuild = pmb.parse._apkbuild.apkbuild(f"{apkbuild_path}/APKBUILD")
|
||||
apkbuild = pmb.parse._apkbuild.apkbuild(args,
|
||||
f"{apkbuild_path}/APKBUILD")
|
||||
|
||||
if not pmb.helpers.pmaports.check_arches(apkbuild["arch"], arch):
|
||||
print(f"{package}: not enabled for {arch}, skipping")
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
@@ -38,7 +38,7 @@ def get_package_version(args, package, revision, check=True):
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
with open(tempdir + "/APKBUILD", "w", encoding="utf-8") as handle:
|
||||
handle.write(apkbuild_content)
|
||||
parsed = pmb.parse.apkbuild(tempdir + "/APKBUILD", False, False)
|
||||
parsed = pmb.parse.apkbuild(args, tempdir + "/APKBUILD", False, False)
|
||||
|
||||
return parsed["pkgver"] + "-r" + parsed["pkgrel"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import argparse
|
||||
@@ -16,14 +16,6 @@ def get_devices():
|
||||
"/..")))
|
||||
for path in glob.glob(pmaports + "/device/*/device-*/"):
|
||||
device = os.path.dirname(path).split("device-", 1)[1]
|
||||
|
||||
# -downstream suffix is used when packaging the downstream kernel for
|
||||
# devices that have a working mainline kernel. Those are usually
|
||||
# unmaintained and therefore might not appear in the wiki. However,
|
||||
# the main device should be documented (remove the -downstream suffix).
|
||||
if device.endswith('-downstream'):
|
||||
device = device[:-len('-downstream')]
|
||||
|
||||
ret.append(device)
|
||||
return sorted(ret)
|
||||
|
||||
@@ -53,13 +45,6 @@ def get_wiki_devices_html(path):
|
||||
return {"booting": split[0], "not_booting": split[1]}
|
||||
|
||||
|
||||
def get_wiki_renamed_devices_html():
|
||||
""":returns: HTML of the page"""
|
||||
# Download wiki page
|
||||
url = "http://wiki.postmarketos.org/wiki/Renamed_Devices"
|
||||
return urllib.request.urlopen(url).read().decode("utf-8")
|
||||
|
||||
|
||||
def check_device(device, html, is_booting):
|
||||
""":param is_booting: require the device to be in the booting section, not
|
||||
just anywhere in the page (i.e. in the not booting
|
||||
@@ -74,9 +59,6 @@ def check_device(device, html, is_booting):
|
||||
" section already)")
|
||||
return False
|
||||
return True
|
||||
if device in html["renamed"]:
|
||||
print(f"WARNING: {device} was renamed in the wiki")
|
||||
return True
|
||||
|
||||
print(device + ": not in the wiki yet.")
|
||||
return False
|
||||
@@ -97,7 +79,6 @@ def main():
|
||||
|
||||
# Check all devices
|
||||
html = get_wiki_devices_html(args.path)
|
||||
html["renamed"] = get_wiki_renamed_devices_html()
|
||||
error = False
|
||||
for device in get_devices():
|
||||
if not check_device(device, html, args.booting):
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Various functions used in CI scripts
|
||||
@@ -162,7 +162,7 @@ def get_changed_packages():
|
||||
|
||||
# Skip files:
|
||||
# * in the root dir of pmaports (e.g. README.md)
|
||||
# * path with a dot (e.g. .ci/, device/.shared-patches/)
|
||||
# * path with a dot (e.g. .gitlab-ci/, device/.shared-patches/)
|
||||
if not dirname or file.startswith(".") or "/." in file:
|
||||
continue
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Require pmbootstrap
|
||||
@@ -32,4 +32,4 @@ if ! [ -e $deviceinfo ]; then
|
||||
fi
|
||||
|
||||
# Run testcases
|
||||
pytest -vv -x --tb=native "$pmaports/.ci/testcases" "$@"
|
||||
pytest -vv -x --tb=native "$pmaports/.gitlab-ci/testcases" "$@"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
set -e
|
||||
@@ -15,22 +15,16 @@ fi
|
||||
|
||||
# Shell: shellcheck
|
||||
sh_files="
|
||||
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
||||
./main/osk-sdl/unlock.sh
|
||||
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-mkinitfs/init.sh
|
||||
./main/postmarketos-base/rootfs-usr-libexec-elogind-system-sleep-suspend-disable-conditions.hook
|
||||
./main/postmarketos-mkinitfs/init.sh.in
|
||||
./main/postmarketos-mkinitfs/init_functions.sh
|
||||
./main/postmarketos-mkinitfs/mkinitfs.sh
|
||||
./main/postmarketos-mkinitfs/mkinitfs_functions.sh
|
||||
./main/postmarketos-mkinitfs/mkinitfs_test.sh
|
||||
./main/postmarketos-mkinitfs-hook-debug-shell/20-debug-shell.sh
|
||||
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
||||
./main/postmarketos-update-kernel/update-kernel.sh
|
||||
./main/swclock-offset/swclock-offset-boot.sh
|
||||
./main/swclock-offset/swclock-offset-shutdown.sh
|
||||
./main/ttyescape/*.sh
|
||||
./main/ttyescape/*.post-install
|
||||
./main/unl0kr/unlock.sh
|
||||
./main/msm-firmware-loader/*.sh
|
||||
./main/msm-firmware-loader/*.post-install
|
||||
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
||||
|
||||
$(find . -path './main/postmarketos-ui-*/*.sh')
|
||||
$(find . -path './main/postmarketos-ui-*/*.pre-install')
|
||||
@@ -44,7 +38,7 @@ sh_files="
|
||||
$(find . -path './main/devicepkg-dev/*.sh')
|
||||
$(find . -path './main/postmarketos-mvcfg/*.sh')
|
||||
|
||||
$(find . -path '.ci/*.sh')
|
||||
$(find . -path '.gitlab-ci/*.sh')
|
||||
"
|
||||
for file in $sh_files; do
|
||||
echo "Test with shellcheck: $file"
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import shutil
|
||||
@@ -0,0 +1,289 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
import pmb.parse.apkindex
|
||||
import pmb.helpers.repo
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def args(request):
|
||||
# Initialize args
|
||||
pmaports = os.path.realpath(f"{os.path.dirname(__file__)}/../..")
|
||||
sys.argv = ["pmbootstrap",
|
||||
"--aports", pmaports,
|
||||
"--log", "$WORK/log_testsuite_pmaports.txt"
|
||||
"chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
|
||||
# Initialize logging
|
||||
pmb.helpers.logging.init(args)
|
||||
request.addfinalizer(args.logfd.close)
|
||||
return args
|
||||
|
||||
|
||||
def deviceinfo_obsolete(info):
|
||||
"""
|
||||
Test for obsolete options used in the deviceinfo file. They must still be
|
||||
defined in pmbootstrap's config/__init__.py.
|
||||
"""
|
||||
obsolete_options = ["weston_pixman_type"]
|
||||
for option in obsolete_options:
|
||||
if info[option]:
|
||||
raise RuntimeError("option '" + option + "' is obsolete, please"
|
||||
" remove it (reasons for removal are at"
|
||||
" <https://postmarketos.org/deviceinfo>)")
|
||||
|
||||
|
||||
def test_deviceinfo(args):
|
||||
"""
|
||||
Parse all deviceinfo files successfully and run checks on the parsed data.
|
||||
"""
|
||||
# Iterate over all devices
|
||||
last_exception = None
|
||||
count = 0
|
||||
for folder in glob.glob(args.aports + "/device/*/device-*"):
|
||||
device = folder[len(args.aports):].split("-", 1)[1]
|
||||
|
||||
try:
|
||||
# Successful deviceinfo parsing / obsolete options
|
||||
info = pmb.parse.deviceinfo(args, device)
|
||||
deviceinfo_obsolete(info)
|
||||
|
||||
# deviceinfo_name must start with manufacturer
|
||||
name = info["name"]
|
||||
manufacturer = info["manufacturer"]
|
||||
if not name.startswith(manufacturer) and \
|
||||
not name.startswith("Google"):
|
||||
raise RuntimeError("Please add the manufacturer in front of"
|
||||
" the deviceinfo_name, e.g.: '" +
|
||||
manufacturer + " " + name + "'")
|
||||
|
||||
# Don't abort on first error
|
||||
except Exception as e:
|
||||
last_exception = e
|
||||
count += 1
|
||||
print(device + ": " + str(e))
|
||||
|
||||
# Raise the last exception
|
||||
if last_exception:
|
||||
print("deviceinfo error count: " + str(count))
|
||||
raise last_exception
|
||||
|
||||
|
||||
def device_dependency_check(apkbuild, path):
|
||||
""" Raise an error if a device package has a dependency that is not allowed
|
||||
(e.g. because it should be in a subpackage instead). """
|
||||
|
||||
# asus-me176c: without this, the device will simply run the broken ACPI
|
||||
# DSDT table, so we might as well update it. See pmaports!699.
|
||||
firmware_ok = {"device-asus-me176c": ["firmware-asus-me176c-acpi"]}
|
||||
|
||||
pkgname = apkbuild["pkgname"]
|
||||
for depend in apkbuild["depends"]:
|
||||
if (depend.startswith("firmware-") or
|
||||
depend.startswith("linux-firmware")):
|
||||
if pkgname in firmware_ok and depend in firmware_ok[pkgname]:
|
||||
continue
|
||||
raise RuntimeError("Firmware package '" + depend + "' found in"
|
||||
" depends of " + path + ". These go into"
|
||||
" subpackages now, see"
|
||||
" <https://postmarketos.org/devicepkg>.")
|
||||
|
||||
|
||||
def test_aports_kernel(args):
|
||||
"""
|
||||
Various tests performed on the /**/linux-* aports.
|
||||
"""
|
||||
for path in glob.iglob(args.aports + "**/linux-*/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(args, path)
|
||||
|
||||
if "pmb:cross-native" not in apkbuild["options"]:
|
||||
raise RuntimeError("\"pmb:cross-native\" missing in"
|
||||
f" options= line: {path}")
|
||||
|
||||
|
||||
def test_aports_device(args):
|
||||
"""
|
||||
Various tests performed on the /device/*/device-* aports.
|
||||
"""
|
||||
for path in glob.iglob(args.aports + "/device/*/device-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(args, path)
|
||||
|
||||
# Depends: Require "postmarketos-base"
|
||||
if "postmarketos-base" not in apkbuild["depends"]:
|
||||
raise RuntimeError("Missing 'postmarketos-base' in depends of " +
|
||||
path)
|
||||
|
||||
# Depends: Must not have firmware packages
|
||||
for depend in apkbuild["depends"]:
|
||||
device_dependency_check(apkbuild, path)
|
||||
|
||||
# Architecture
|
||||
device = apkbuild["pkgname"][len("device-"):]
|
||||
deviceinfo = pmb.parse.deviceinfo(args, device)
|
||||
if "".join(apkbuild["arch"]) != deviceinfo["arch"]:
|
||||
raise RuntimeError("wrong architecture, please change to arch=\"" +
|
||||
deviceinfo["arch"] + "\": " + path)
|
||||
if "!archcheck" not in apkbuild["options"]:
|
||||
raise RuntimeError("!archcheck missing in options= line: " + path)
|
||||
|
||||
|
||||
def test_aports_device_kernel(args):
|
||||
"""
|
||||
Verify the kernels specified in the device packages:
|
||||
* Kernel must not be in depends when kernels are in subpackages
|
||||
* Check if only one kernel is defined in depends
|
||||
"""
|
||||
|
||||
# Iterate over device aports
|
||||
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
|
||||
# Parse apkbuild and kernels from subpackages
|
||||
apkbuild = pmb.parse.apkbuild(args, path)
|
||||
device = apkbuild["pkgname"][len("device-"):]
|
||||
kernels_subpackages = pmb.parse._apkbuild.kernels(args, device)
|
||||
|
||||
# Parse kernels from depends
|
||||
kernels_depends = []
|
||||
for depend in apkbuild["depends"]:
|
||||
if not depend.startswith("linux-"):
|
||||
continue
|
||||
kernels_depends.append(depend)
|
||||
|
||||
# Kernel in subpackages *and* depends
|
||||
if kernels_subpackages:
|
||||
raise RuntimeError("Kernel package '" + depend + "' needs to"
|
||||
" be removed when using kernel" +
|
||||
" subpackages: " + path)
|
||||
|
||||
# No kernel
|
||||
if not kernels_depends and not kernels_subpackages:
|
||||
raise RuntimeError("Device doesn't have a kernel in depends or"
|
||||
" subpackages: " + path)
|
||||
|
||||
# Multiple kernels in depends
|
||||
if len(kernels_depends) > 1:
|
||||
raise RuntimeError("Please use kernel subpackages instead of"
|
||||
" multiple kernels in depends (see"
|
||||
" <https://postmarketos.org/devicepkg>): " +
|
||||
path)
|
||||
|
||||
|
||||
def parse_source_from_checksums(args, apkbuild_path):
|
||||
"""
|
||||
Read the APKBUILD file and parse source files from the checksums at the
|
||||
bottom. This has always the same format, even if $source is built with hard
|
||||
to parse shell code (like in postmarketos-base).
|
||||
|
||||
:param apkbuild_path: full path to the APKBUILD
|
||||
:returns: list of parsed "source" files, e.g.:
|
||||
["first.patch", "second.patch"]
|
||||
"""
|
||||
start = 'sha512sums="'
|
||||
in_block = False
|
||||
ret = []
|
||||
|
||||
with open(apkbuild_path, encoding="utf-8") as handle:
|
||||
for line in handle.readlines():
|
||||
# Find start
|
||||
if not in_block:
|
||||
if line.startswith(start):
|
||||
in_block = True
|
||||
else:
|
||||
continue
|
||||
|
||||
# sha512sums may have lines without checksums:
|
||||
# https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/73
|
||||
if " " not in line:
|
||||
continue
|
||||
|
||||
try:
|
||||
_, filename = line.rstrip().split(" ", 2)
|
||||
except ValueError:
|
||||
raise ValueError("Failed to parse checksums. Try to delete the"
|
||||
" checksums and generate them again with"
|
||||
f" 'pmbootstrap checksum': {apkbuild_path}")
|
||||
|
||||
# Find end
|
||||
if filename.endswith('"'):
|
||||
ret += [filename[:-1]]
|
||||
break
|
||||
|
||||
ret += [filename]
|
||||
return ret
|
||||
|
||||
|
||||
def test_aports_unreferenced_files(args):
|
||||
"""
|
||||
Raise an error if an unreferenced file is found
|
||||
"""
|
||||
for apkbuild_path in glob.iglob(args.aports + "/**/APKBUILD", recursive=True):
|
||||
apkbuild = pmb.parse.apkbuild(args, apkbuild_path)
|
||||
sources_chk = parse_source_from_checksums(args, apkbuild_path)
|
||||
|
||||
# Collect install files from subpackages
|
||||
subpackage_installs = []
|
||||
if apkbuild["subpackages"]:
|
||||
for subpackage in apkbuild["subpackages"].values():
|
||||
if not subpackage:
|
||||
continue
|
||||
try:
|
||||
subpackage_installs += subpackage["install"]
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
# Collect trigger files
|
||||
trigger_sources = []
|
||||
if apkbuild["triggers"]:
|
||||
for trigger in apkbuild["triggers"]:
|
||||
trigger_sources.append(trigger.split("=")[0])
|
||||
|
||||
dirname = os.path.dirname(apkbuild_path)
|
||||
for file in glob.iglob(dirname + "/**", recursive=True):
|
||||
rel_file_path = os.path.relpath(file, dirname)
|
||||
# Skip APKBUILDs and directories
|
||||
if rel_file_path == "APKBUILD" or os.path.isdir(file):
|
||||
continue
|
||||
|
||||
if os.path.basename(rel_file_path) not in sources_chk \
|
||||
and rel_file_path not in apkbuild["install"] \
|
||||
and rel_file_path not in subpackage_installs \
|
||||
and rel_file_path not in trigger_sources:
|
||||
raise RuntimeError(f"{apkbuild_path}: found unreferenced file: {rel_file_path}")
|
||||
|
||||
|
||||
def test_aports_ui(args):
|
||||
"""
|
||||
Raise an error if package in _pmb_recommends is not found
|
||||
"""
|
||||
for arch in pmb.config.build_device_architectures:
|
||||
for path in glob.iglob(args.aports + "/main/postmarketos-ui-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(args, path)
|
||||
# Skip if arch isn't enabled
|
||||
if not pmb.helpers.package.check_arch(args, apkbuild["pkgname"], arch, False):
|
||||
continue
|
||||
|
||||
for package in apkbuild["_pmb_recommends"]:
|
||||
depend = pmb.helpers.package.get(args, package,
|
||||
arch, must_exist=False)
|
||||
if depend is None or not pmb.helpers.package.check_arch(args, package, arch):
|
||||
raise RuntimeError(f"{path}: package '{package}' from"
|
||||
f" _pmb_recommends not found for arch '{arch}'")
|
||||
|
||||
# Check packages from "_pmb_recommends" of -extras subpackage if one exists
|
||||
if f"{apkbuild['pkgname']}-extras" in apkbuild["subpackages"]:
|
||||
apkbuild = apkbuild["subpackages"][f"{apkbuild['pkgname']}-extras"]
|
||||
for package in apkbuild["_pmb_recommends"]:
|
||||
depend = pmb.helpers.package.get(args, package,
|
||||
arch, must_exist=False)
|
||||
if depend is None or not pmb.helpers.package.check_arch(args, package, arch):
|
||||
raise RuntimeError(f"{path}: package '{package}' from _pmb_recommends "
|
||||
f"of -extras subpackage is not found for arch '{arch}'")
|
||||
+17
-2
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# Copyright 2020 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
""" Make sure that components of frameworks (Qt, KDE, ...) have the same
|
||||
@@ -17,6 +17,21 @@ import pmb.config
|
||||
import pmb.parse
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def args(request):
|
||||
# Initialize args
|
||||
sys.argv = ["pmbootstrap",
|
||||
"--aports", os.path.dirname(__file__) + "/../..",
|
||||
"--log", "$WORK/log_testsuite_pmaports.txt"
|
||||
"chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
|
||||
# Initialize logging
|
||||
pmb.helpers.logging.init(args)
|
||||
request.addfinalizer(args.logfd.close)
|
||||
return args
|
||||
|
||||
|
||||
def get_categorized_packages(args):
|
||||
"""
|
||||
Parse all aports and categorize them.
|
||||
@@ -30,7 +45,7 @@ def get_categorized_packages(args):
|
||||
|
||||
for path in glob.glob(args.aports + "/*/*/APKBUILD"):
|
||||
# Parse APKBUILD
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
apkbuild = pmb.parse.apkbuild(args, path)
|
||||
url = apkbuild["url"]
|
||||
pkgname = apkbuild["pkgname"]
|
||||
pkgver = apkbuild["pkgver"]
|
||||
+4
-3
@@ -5,14 +5,15 @@ import os
|
||||
import stat
|
||||
|
||||
expected_directories = [
|
||||
"console",
|
||||
"cross",
|
||||
"device/community",
|
||||
"device/main",
|
||||
"device/testing",
|
||||
"device/unmaintained",
|
||||
"kde",
|
||||
"maemo",
|
||||
"main",
|
||||
"modem",
|
||||
"non-free",
|
||||
"sxmo",
|
||||
"temp",
|
||||
]
|
||||
@@ -46,7 +47,7 @@ def test_executable_files():
|
||||
|
||||
# Make sure files are either:
|
||||
# - in root directory (README.md)
|
||||
# - hidden (.ci/, device/.shared-patches/)
|
||||
# - hidden (.gitlab-ci/, device/.shared-patches/)
|
||||
# - or belong to a package (below a directory with APKBUILD)
|
||||
def test_files_belong_to_package():
|
||||
# Walk directories and set package_dir when we find an APKBUILD
|
||||
+3
-5
@@ -1,10 +1,8 @@
|
||||
# https://docs.gitlab.com/ee/user/project/code_owners.html
|
||||
|
||||
device/*/*-pine64-pinephone/ @craftyguy @milesalan @bshah @proycon @anjandev @StacyHarper
|
||||
device/*/*-purism-librem5/ @craftyguy @bshah
|
||||
device/*/*-pine64-pinephone/ @craftyguy
|
||||
device/*/*-purism-librem5/ @craftyguy
|
||||
main/osk-sdl/ @craftyguy
|
||||
main/mesa-pvr-dri-classic/ @xc-racer99
|
||||
main/postmarketos-ui-plasma-mobile/ @bshah
|
||||
temp/u-boot-librem5/ @craftyguy @bshah
|
||||
temp/u-boot-librem5/ @craftyguy
|
||||
|
||||
# vim: ts=4 sw=4 et
|
||||
@@ -3,6 +3,5 @@
|
||||
Helpful resources:
|
||||
* [How to create a package](https://wiki.postmarketos.org/wiki/Create_a_package)
|
||||
* [APKBUILD reference](https://wiki.alpinelinux.org/wiki/APKBUILD_Reference)
|
||||
* [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)
|
||||
* [Alpine Linux aports](https://git.alpinelinux.org/cgit/aports)
|
||||
* [Alpine Linux package search](https://pkgs.alpinelinux.org/packages)
|
||||
+3
-21
@@ -3,31 +3,13 @@
|
||||
recommended=edge
|
||||
|
||||
[edge]
|
||||
description=Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
|
||||
description=Rolling release channel
|
||||
branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v21.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v21.12
|
||||
branch_aports=3.15-stable
|
||||
mirrordir_alpine=v3.15
|
||||
|
||||
[v21.06]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v21.06
|
||||
branch_aports=3.14-stable
|
||||
mirrordir_alpine=v3.14
|
||||
|
||||
[v21.03]
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v21.03
|
||||
branch_aports=3.13-stable
|
||||
mirrordir_alpine=v3.13
|
||||
|
||||
[v20.05]
|
||||
description=Old release (unsupported)
|
||||
[stable]
|
||||
description=Stable release channel (first beta v20.05, does not have many devices yet)
|
||||
branch_pmaports=v20.05
|
||||
branch_aports=3.12-stable
|
||||
mirrordir_alpine=v3.12
|
||||
+48
-17
@@ -1,24 +1,39 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
Date: Fri, 30 Oct 2020 16:59:48 -0600
|
||||
Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
|
||||
libraries"
|
||||
|
||||
This revert is needed to avoid wrongly tagging objects with the incompatible
|
||||
IBM long double ABI, which is not supported by musl and will result in
|
||||
linking errors if used.
|
||||
|
||||
This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
|
||||
---
|
||||
bfd/elf32-tic6x.c | 3 ---
|
||||
ld/ldlang.c | 10 ++++------
|
||||
2 files changed, 4 insertions(+), 9 deletions(-)
|
||||
bfd/ChangeLog | 6 ------
|
||||
bfd/elf32-tic6x.c | 3 ---
|
||||
ld/ChangeLog | 6 ------
|
||||
ld/ldlang.c | 9 ++++-----
|
||||
4 files changed, 4 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
|
||||
index 9fac12538a..b5461494e8 100644
|
||||
--- a/bfd/ChangeLog
|
||||
+++ b/bfd/ChangeLog
|
||||
@@ -1422,12 +1422,6 @@
|
||||
accessing root.u.def of symbols. Also check root.u.def.section
|
||||
is non-NULL. Reverse tests so as to make the logic positive.
|
||||
|
||||
-2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
-
|
||||
- PR 25882
|
||||
- * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
|
||||
- Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
|
||||
-
|
||||
2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 25882
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 100644
|
||||
index b8b916bfd3..91bb6a10b1 100644
|
||||
--- a/bfd/elf32-tic6x.c
|
||||
+++ b/bfd/elf32-tic6x.c
|
||||
@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
@@ -28,20 +43,36 @@ index 5754f3cb860..3ad1d612749 100644
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ChangeLog b/ld/ChangeLog
|
||||
index 4eec7d2977..b93452f70c 100644
|
||||
--- a/ld/ChangeLog
|
||||
+++ b/ld/ChangeLog
|
||||
@@ -1319,12 +1319,6 @@
|
||||
* testsuite/ld-aarch64/farcall-group.d: New test driver.
|
||||
* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
|
||||
|
||||
-2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
-
|
||||
- PR 25882
|
||||
- * ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
|
||||
- shared libraries.
|
||||
-
|
||||
2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* po/BLD-POTFILES.in: Regenerate.
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
index 9977195074..173d8ec349 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,11 @@ lang_check (void)
|
||||
@@ -6972,12 +6972,11 @@ lang_check (void)
|
||||
bfd_printable_name (input_bfd), input_bfd,
|
||||
bfd_printable_name (link_info.output_bfd));
|
||||
}
|
||||
-
|
||||
- /* If the input bfd has no contents, it shouldn't set the
|
||||
- private data of the output bfd. */
|
||||
- else if (!file->flags.just_syms
|
||||
- && ((input_bfd->flags & DYNAMIC) != 0
|
||||
- || bfd_count_sections (input_bfd) != 0))
|
||||
- else if ((input_bfd->flags & DYNAMIC) != 0
|
||||
- || bfd_count_sections (input_bfd) != 0)
|
||||
+ else if (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
@@ -51,5 +82,5 @@ index 37b64c89ee1..f13beaef9d9 100644
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
2.29.2
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Based on: main/binutils
|
||||
|
||||
pkgname=binutils-aarch64
|
||||
pkgver=2.38
|
||||
pkgver=2.35.1
|
||||
pkgrel=1
|
||||
pkgdesc="Tools necessary to build programs for aarch64 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
@@ -15,15 +15,9 @@ source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
binutils-ppc-fix-machine-options.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages=""
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
@@ -31,8 +25,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
@@ -64,19 +56,12 @@ package() {
|
||||
|
||||
# remove man, info folders
|
||||
rm -rf "$pkgdir"/usr/share
|
||||
|
||||
# remove files that conflict with non-cross binutils
|
||||
rm -rf "$pkgdir"/usr/lib/bfd-plugins
|
||||
}
|
||||
|
||||
|
||||
|
||||
sha512sums="
|
||||
8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d binutils-2.38.tar.xz
|
||||
sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
27ea91e0e406e2ed464fd692cf92a07e338781789f2d968c8b95d9d5545985056a6f7f500df3952e5ab42165db28b741aa33d6b717e880b11a2e41fe406b13c4 binutils-ppc-fix-machine-options.patch
|
||||
"
|
||||
642c617db6c6e491f78f053d60f3aa369bad7bf8c1bc7ce267de6cf8fddf6c0d4cf63ce8c8f6e2f225dedbce7cb930d8e87e168fd8f72ca0837c77266ee2b5f8 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch"
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,41 +0,0 @@
|
||||
Fix for DARN opcode error during ppc64le compilation of rng-tools which
|
||||
occurs with binutils 2.38 but not with binutils 2.37..
|
||||
|
||||
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=cebc89b9328;hp=9cbed90ee623d75e31994e7943960c997ba565f2
|
||||
|
||||
|
||||
diff -aur a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -5965,7 +5965,30 @@
|
||||
options do not count as a new machine, instead they add
|
||||
to currently selected opcodes. */
|
||||
ppc_cpu_t machine_sticky = 0;
|
||||
- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string);
|
||||
+ /* Unfortunately, some versions of gcc emit a .machine
|
||||
+ directive very near the start of the compiler's assembly
|
||||
+ output file. This is bad because it overrides user -Wa
|
||||
+ cpu selection. Worse, there are versions of gcc that
|
||||
+ emit the *wrong* cpu, not even respecting the -mcpu given
|
||||
+ to gcc. See gcc pr101393. And to compound the problem,
|
||||
+ as of 20220222 gcc doesn't pass the correct cpu option to
|
||||
+ gas on the command line. See gcc pr59828. Hack around
|
||||
+ this by keeping sticky options for an early .machine. */
|
||||
+ asection *sec;
|
||||
+ for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
|
||||
+ {
|
||||
+ segment_info_type *info = seg_info (sec);
|
||||
+ /* Are the frags for this section perturbed from their
|
||||
+ initial state? Even .align will count here. */
|
||||
+ if (info != NULL
|
||||
+ && (info->frchainP->frch_root != info->frchainP->frch_last
|
||||
+ || info->frchainP->frch_root->fr_type != rs_fill
|
||||
+ || info->frchainP->frch_root->fr_fix != 0))
|
||||
+ break;
|
||||
+ }
|
||||
+ new_cpu = ppc_parse_cpu (ppc_cpu,
|
||||
+ sec == NULL ? &sticky : &machine_sticky,
|
||||
+ cpu_string);
|
||||
if (new_cpu != 0)
|
||||
ppc_cpu = new_cpu;
|
||||
else
|
||||
+48
-17
@@ -1,24 +1,39 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
Date: Fri, 30 Oct 2020 16:59:48 -0600
|
||||
Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
|
||||
libraries"
|
||||
|
||||
This revert is needed to avoid wrongly tagging objects with the incompatible
|
||||
IBM long double ABI, which is not supported by musl and will result in
|
||||
linking errors if used.
|
||||
|
||||
This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
|
||||
---
|
||||
bfd/elf32-tic6x.c | 3 ---
|
||||
ld/ldlang.c | 10 ++++------
|
||||
2 files changed, 4 insertions(+), 9 deletions(-)
|
||||
bfd/ChangeLog | 6 ------
|
||||
bfd/elf32-tic6x.c | 3 ---
|
||||
ld/ChangeLog | 6 ------
|
||||
ld/ldlang.c | 9 ++++-----
|
||||
4 files changed, 4 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
|
||||
index 9fac12538a..b5461494e8 100644
|
||||
--- a/bfd/ChangeLog
|
||||
+++ b/bfd/ChangeLog
|
||||
@@ -1422,12 +1422,6 @@
|
||||
accessing root.u.def of symbols. Also check root.u.def.section
|
||||
is non-NULL. Reverse tests so as to make the logic positive.
|
||||
|
||||
-2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
-
|
||||
- PR 25882
|
||||
- * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
|
||||
- Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
|
||||
-
|
||||
2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 25882
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 100644
|
||||
index b8b916bfd3..91bb6a10b1 100644
|
||||
--- a/bfd/elf32-tic6x.c
|
||||
+++ b/bfd/elf32-tic6x.c
|
||||
@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
@@ -28,20 +43,36 @@ index 5754f3cb860..3ad1d612749 100644
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ChangeLog b/ld/ChangeLog
|
||||
index 4eec7d2977..b93452f70c 100644
|
||||
--- a/ld/ChangeLog
|
||||
+++ b/ld/ChangeLog
|
||||
@@ -1319,12 +1319,6 @@
|
||||
* testsuite/ld-aarch64/farcall-group.d: New test driver.
|
||||
* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
|
||||
|
||||
-2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
-
|
||||
- PR 25882
|
||||
- * ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
|
||||
- shared libraries.
|
||||
-
|
||||
2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* po/BLD-POTFILES.in: Regenerate.
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
index 9977195074..173d8ec349 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,11 @@ lang_check (void)
|
||||
@@ -6972,12 +6972,11 @@ lang_check (void)
|
||||
bfd_printable_name (input_bfd), input_bfd,
|
||||
bfd_printable_name (link_info.output_bfd));
|
||||
}
|
||||
-
|
||||
- /* If the input bfd has no contents, it shouldn't set the
|
||||
- private data of the output bfd. */
|
||||
- else if (!file->flags.just_syms
|
||||
- && ((input_bfd->flags & DYNAMIC) != 0
|
||||
- || bfd_count_sections (input_bfd) != 0))
|
||||
- else if ((input_bfd->flags & DYNAMIC) != 0
|
||||
- || bfd_count_sections (input_bfd) != 0)
|
||||
+ else if (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
@@ -51,5 +82,5 @@ index 37b64c89ee1..f13beaef9d9 100644
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
2.29.2
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Based on: main/binutils
|
||||
|
||||
pkgname=binutils-armhf
|
||||
pkgver=2.38
|
||||
pkgver=2.35.1
|
||||
pkgrel=1
|
||||
pkgdesc="Tools necessary to build programs for armhf targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
@@ -15,15 +15,9 @@ source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
binutils-ppc-fix-machine-options.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages=""
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
@@ -31,8 +25,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
@@ -64,19 +56,12 @@ package() {
|
||||
|
||||
# remove man, info folders
|
||||
rm -rf "$pkgdir"/usr/share
|
||||
|
||||
# remove files that conflict with non-cross binutils
|
||||
rm -rf "$pkgdir"/usr/lib/bfd-plugins
|
||||
}
|
||||
|
||||
|
||||
|
||||
sha512sums="
|
||||
8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d binutils-2.38.tar.xz
|
||||
sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
27ea91e0e406e2ed464fd692cf92a07e338781789f2d968c8b95d9d5545985056a6f7f500df3952e5ab42165db28b741aa33d6b717e880b11a2e41fe406b13c4 binutils-ppc-fix-machine-options.patch
|
||||
"
|
||||
642c617db6c6e491f78f053d60f3aa369bad7bf8c1bc7ce267de6cf8fddf6c0d4cf63ce8c8f6e2f225dedbce7cb930d8e87e168fd8f72ca0837c77266ee2b5f8 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch"
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,41 +0,0 @@
|
||||
Fix for DARN opcode error during ppc64le compilation of rng-tools which
|
||||
occurs with binutils 2.38 but not with binutils 2.37..
|
||||
|
||||
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=cebc89b9328;hp=9cbed90ee623d75e31994e7943960c997ba565f2
|
||||
|
||||
|
||||
diff -aur a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -5965,7 +5965,30 @@
|
||||
options do not count as a new machine, instead they add
|
||||
to currently selected opcodes. */
|
||||
ppc_cpu_t machine_sticky = 0;
|
||||
- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string);
|
||||
+ /* Unfortunately, some versions of gcc emit a .machine
|
||||
+ directive very near the start of the compiler's assembly
|
||||
+ output file. This is bad because it overrides user -Wa
|
||||
+ cpu selection. Worse, there are versions of gcc that
|
||||
+ emit the *wrong* cpu, not even respecting the -mcpu given
|
||||
+ to gcc. See gcc pr101393. And to compound the problem,
|
||||
+ as of 20220222 gcc doesn't pass the correct cpu option to
|
||||
+ gas on the command line. See gcc pr59828. Hack around
|
||||
+ this by keeping sticky options for an early .machine. */
|
||||
+ asection *sec;
|
||||
+ for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
|
||||
+ {
|
||||
+ segment_info_type *info = seg_info (sec);
|
||||
+ /* Are the frags for this section perturbed from their
|
||||
+ initial state? Even .align will count here. */
|
||||
+ if (info != NULL
|
||||
+ && (info->frchainP->frch_root != info->frchainP->frch_last
|
||||
+ || info->frchainP->frch_root->fr_type != rs_fill
|
||||
+ || info->frchainP->frch_root->fr_fix != 0))
|
||||
+ break;
|
||||
+ }
|
||||
+ new_cpu = ppc_parse_cpu (ppc_cpu,
|
||||
+ sec == NULL ? &sticky : &machine_sticky,
|
||||
+ cpu_string);
|
||||
if (new_cpu != 0)
|
||||
ppc_cpu = new_cpu;
|
||||
else
|
||||
+48
-17
@@ -1,24 +1,39 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From b1faf99f3e546df2cd302bb1ad36a2078224fe8b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
Date: Fri, 30 Oct 2020 16:59:48 -0600
|
||||
Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
|
||||
libraries"
|
||||
|
||||
This revert is needed to avoid wrongly tagging objects with the incompatible
|
||||
IBM long double ABI, which is not supported by musl and will result in
|
||||
linking errors if used.
|
||||
|
||||
This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
|
||||
---
|
||||
bfd/elf32-tic6x.c | 3 ---
|
||||
ld/ldlang.c | 10 ++++------
|
||||
2 files changed, 4 insertions(+), 9 deletions(-)
|
||||
bfd/ChangeLog | 6 ------
|
||||
bfd/elf32-tic6x.c | 3 ---
|
||||
ld/ChangeLog | 6 ------
|
||||
ld/ldlang.c | 9 ++++-----
|
||||
4 files changed, 4 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
|
||||
index 9fac12538a..b5461494e8 100644
|
||||
--- a/bfd/ChangeLog
|
||||
+++ b/bfd/ChangeLog
|
||||
@@ -1422,12 +1422,6 @@
|
||||
accessing root.u.def of symbols. Also check root.u.def.section
|
||||
is non-NULL. Reverse tests so as to make the logic positive.
|
||||
|
||||
-2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
-
|
||||
- PR 25882
|
||||
- * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
|
||||
- Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
|
||||
-
|
||||
2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 25882
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 100644
|
||||
index b8b916bfd3..91bb6a10b1 100644
|
||||
--- a/bfd/elf32-tic6x.c
|
||||
+++ b/bfd/elf32-tic6x.c
|
||||
@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
@@ -3748,9 +3748,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
@@ -28,20 +43,36 @@ index 5754f3cb860..3ad1d612749 100644
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ChangeLog b/ld/ChangeLog
|
||||
index 4eec7d2977..b93452f70c 100644
|
||||
--- a/ld/ChangeLog
|
||||
+++ b/ld/ChangeLog
|
||||
@@ -1319,12 +1319,6 @@
|
||||
* testsuite/ld-aarch64/farcall-group.d: New test driver.
|
||||
* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
|
||||
|
||||
-2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
-
|
||||
- PR 25882
|
||||
- * ldlang.c (lang_check): Call bfd_merge_private_bfd_data for
|
||||
- shared libraries.
|
||||
-
|
||||
2020-05-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* po/BLD-POTFILES.in: Regenerate.
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
index 9977195074..173d8ec349 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,11 @@ lang_check (void)
|
||||
@@ -6972,12 +6972,11 @@ lang_check (void)
|
||||
bfd_printable_name (input_bfd), input_bfd,
|
||||
bfd_printable_name (link_info.output_bfd));
|
||||
}
|
||||
-
|
||||
- /* If the input bfd has no contents, it shouldn't set the
|
||||
- private data of the output bfd. */
|
||||
- else if (!file->flags.just_syms
|
||||
- && ((input_bfd->flags & DYNAMIC) != 0
|
||||
- || bfd_count_sections (input_bfd) != 0))
|
||||
- else if ((input_bfd->flags & DYNAMIC) != 0
|
||||
- || bfd_count_sections (input_bfd) != 0)
|
||||
+ else if (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
@@ -51,5 +82,5 @@ index 37b64c89ee1..f13beaef9d9 100644
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
2.29.2
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Based on: main/binutils
|
||||
|
||||
pkgname=binutils-armv7
|
||||
pkgver=2.38
|
||||
pkgver=2.35.1
|
||||
pkgrel=1
|
||||
pkgdesc="Tools necessary to build programs for armv7 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
@@ -15,15 +15,9 @@ source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
gold-mips.patch
|
||||
ld-bfd-mips.patch
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
binutils-mips-disable-assert.patch
|
||||
binutils-ppc-fix-machine-options.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages=""
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
@@ -31,8 +25,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
@@ -64,19 +56,12 @@ package() {
|
||||
|
||||
# remove man, info folders
|
||||
rm -rf "$pkgdir"/usr/share
|
||||
|
||||
# remove files that conflict with non-cross binutils
|
||||
rm -rf "$pkgdir"/usr/lib/bfd-plugins
|
||||
}
|
||||
|
||||
|
||||
|
||||
sha512sums="
|
||||
8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d binutils-2.38.tar.xz
|
||||
sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch
|
||||
314d2ef9071c89940aa6c8118e8a1e2f191a5d0a4bf596da1ad9cc84f884d8bc7dea8bd7b9fc3f8f1bddd3fd41c6eb017e1e804044b3bf084df1ed9e6e095e2d ld-bfd-mips.patch
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
609cd90d8b334eb309f586b17b9d335a08d3dbb6def7c3eb5c010028fcb681674031e5b9d853aa7a39a50304356a86afc184b85562b3f228f8197f4d29395c8f binutils-mips-disable-assert.patch
|
||||
27ea91e0e406e2ed464fd692cf92a07e338781789f2d968c8b95d9d5545985056a6f7f500df3952e5ab42165db28b741aa33d6b717e880b11a2e41fe406b13c4 binutils-ppc-fix-machine-options.patch
|
||||
"
|
||||
642c617db6c6e491f78f053d60f3aa369bad7bf8c1bc7ce267de6cf8fddf6c0d4cf63ce8c8f6e2f225dedbce7cb930d8e87e168fd8f72ca0837c77266ee2b5f8 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch"
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c
|
||||
--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700
|
||||
+++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600
|
||||
@@ -6744,8 +6744,10 @@
|
||||
in the relocation. */
|
||||
if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
|
||||
{
|
||||
+#if 0
|
||||
BFD_ASSERT (htab->root.target_os == is_vxworks
|
||||
|| h->global_got_area != GGA_NONE);
|
||||
+#endif
|
||||
indx = h->root.dynindx;
|
||||
if (SGI_COMPAT (output_bfd))
|
||||
defined_p = h->root.def_regular;
|
||||
@@ -1,41 +0,0 @@
|
||||
Fix for DARN opcode error during ppc64le compilation of rng-tools which
|
||||
occurs with binutils 2.38 but not with binutils 2.37..
|
||||
|
||||
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=cebc89b9328;hp=9cbed90ee623d75e31994e7943960c997ba565f2
|
||||
|
||||
|
||||
diff -aur a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -5965,7 +5965,30 @@
|
||||
options do not count as a new machine, instead they add
|
||||
to currently selected opcodes. */
|
||||
ppc_cpu_t machine_sticky = 0;
|
||||
- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string);
|
||||
+ /* Unfortunately, some versions of gcc emit a .machine
|
||||
+ directive very near the start of the compiler's assembly
|
||||
+ output file. This is bad because it overrides user -Wa
|
||||
+ cpu selection. Worse, there are versions of gcc that
|
||||
+ emit the *wrong* cpu, not even respecting the -mcpu given
|
||||
+ to gcc. See gcc pr101393. And to compound the problem,
|
||||
+ as of 20220222 gcc doesn't pass the correct cpu option to
|
||||
+ gas on the command line. See gcc pr59828. Hack around
|
||||
+ this by keeping sticky options for an early .machine. */
|
||||
+ asection *sec;
|
||||
+ for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
|
||||
+ {
|
||||
+ segment_info_type *info = seg_info (sec);
|
||||
+ /* Are the frags for this section perturbed from their
|
||||
+ initial state? Even .align will count here. */
|
||||
+ if (info != NULL
|
||||
+ && (info->frchainP->frch_root != info->frchainP->frch_last
|
||||
+ || info->frchainP->frch_root->fr_type != rs_fill
|
||||
+ || info->frchainP->frch_root->fr_fix != 0))
|
||||
+ break;
|
||||
+ }
|
||||
+ new_cpu = ppc_parse_cpu (ppc_cpu,
|
||||
+ sec == NULL ? &sticky : &machine_sticky,
|
||||
+ cpu_string);
|
||||
if (new_cpu != 0)
|
||||
ppc_cpu = new_cpu;
|
||||
else
|
||||
@@ -7,11 +7,11 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.35.0
|
||||
pkgrel=5
|
||||
pkgver=1.32.0
|
||||
pkgrel=8
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
_mirror="http://dl-2.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
@@ -31,6 +31,4 @@ package() {
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5be7db2e4793b74ffa487153b1ca52027b6d1a4ca316c152163d1b3030ba3270e645d02522f9c8187b14fc193b5471ccedc7439b38463fabeac08b404f1b6fbb busybox-static-1.35.0-r5-aarch64-edge.apk
|
||||
"
|
||||
sha512sums="9e6078f585cee2f3bea8cc355a7f53d2efbebb47029f20f4c90f84acfbae7ade49bfff97c5b6e7eff0e4128d3f67c3f4d02e574cfa8d5483cba0a2dda2f679d5 busybox-static-1.32.0-r8-aarch64-edge.apk"
|
||||
@@ -7,11 +7,11 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.35.0
|
||||
pkgrel=5
|
||||
pkgver=1.32.0
|
||||
pkgrel=8
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
_mirror="http://dl-2.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
@@ -31,6 +31,4 @@ package() {
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
dcfd4a8af7c0f2ae33cacdc933f38906c9173b9a6476b04624d0dce7bf03277328bc3422182cbf0cf784495ff663326779a39d4a259064d5a740f8bea4f5a3be busybox-static-1.35.0-r5-armhf-edge.apk
|
||||
"
|
||||
sha512sums="57cd3ab0e504a6a6ee27fb2aee902a4426136d1e0d3ae3a55003e5f3a4f7df03cce6c201244287f4315f4f8ba162f19fee18f3159f11a07015b7c37fe607d701 busybox-static-1.32.0-r8-armhf-edge.apk"
|
||||
@@ -7,11 +7,11 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.35.0
|
||||
pkgrel=5
|
||||
pkgver=1.32.0
|
||||
pkgrel=8
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
_mirror="http://dl-2.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
@@ -31,6 +31,4 @@ package() {
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2b2ff67a0cf0ab1b1fc67458f328c7b2e91a24a6c57d4d7707c5c88a68b715af11b2ee29381aaa15946d6bccaf3d6f899f8a760ff87df2156a59bd12e67af71d busybox-static-1.35.0-r5-armv7-edge.apk
|
||||
"
|
||||
sha512sums="2e11a7a2b7474ddf0705f066e211bb89f2d17b81ef008080168b1cbbf6330810737e60cd44cd7ab5d0379841d78916ca9f4386e76ccf0e731dc9d69296454f8e busybox-static-1.32.0-r8-armv7-edge.apk"
|
||||
@@ -1,4 +1,4 @@
|
||||
From feb04e50d907683385cc4dc0163cf1d82258073a Mon Sep 17 00:00:00 2001
|
||||
From 61621c64caffb54ea82c5b573e55d16dcb732dea Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH] posix_memalign
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] posix_memalign
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 1b0bfe37852..d7b2b19bb3c 100644
|
||||
index 87344d9383f..ece428df487 100644
|
||||
--- a/gcc/config/i386/pmm_malloc.h
|
||||
+++ b/gcc/config/i386/pmm_malloc.h
|
||||
@@ -27,12 +27,13 @@
|
||||
@@ -38,5 +38,5 @@ index 1b0bfe37852..d7b2b19bb3c 100644
|
||||
else
|
||||
return NULL;
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d64825212f807435a4b2f8e068c0f65195c8e2e6 Mon Sep 17 00:00:00 2001
|
||||
From b6af6fd400def85c7f6933a991c888df16f12533 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 29 Mar 2013 08:59:00 +0400
|
||||
Subject: [PATCH] gcc: poison-system-directories
|
||||
@@ -26,10 +26,10 @@ Upstream-Status: Pending
|
||||
7 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index a75b44ee47e..d15105a73f3 100644
|
||||
index dfed6ec76ba..8bb65e0e1af 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -683,6 +683,10 @@ Wreturn-local-addr
|
||||
@@ -682,6 +682,10 @@ Wreturn-local-addr
|
||||
Common Var(warn_return_local_addr) Init(1) Warning
|
||||
Warn about returning a pointer/reference to a local or temporary variable.
|
||||
|
||||
@@ -41,10 +41,10 @@ index a75b44ee47e..d15105a73f3 100644
|
||||
Common Var(warn_shadow) Warning
|
||||
Warn when one variable shadows another. Same as -Wshadow=global.
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 2de5a463315..059c818c895 100644
|
||||
index 364eba47737..9551c0dfdf9 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -218,6 +218,12 @@
|
||||
@@ -224,6 +224,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,18 +58,18 @@ index 2de5a463315..059c818c895 100644
|
||||
optimizer and back end) to be checked for dynamic type safety at runtime.
|
||||
This is quite expensive. */
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 708328e1670..4b977e313b5 100755
|
||||
index b4088d8fd1e..793530e21cf 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -1020,6 +1020,7 @@ enable_maintainer_mode
|
||||
@@ -1010,6 +1010,7 @@ with_system_zlib
|
||||
enable_maintainer_mode
|
||||
enable_link_mutex
|
||||
enable_link_serialization
|
||||
enable_version_specific_runtime_libs
|
||||
+enable_poison_system_directories
|
||||
enable_plugin
|
||||
enable_host_shared
|
||||
enable_libquadmath_support
|
||||
@@ -1782,6 +1783,8 @@ Optional Features:
|
||||
@@ -1766,6 +1767,8 @@ Optional Features:
|
||||
--enable-version-specific-runtime-libs
|
||||
specify that runtime libraries should be installed
|
||||
in a compiler-specific directory
|
||||
@@ -78,7 +78,7 @@ index 708328e1670..4b977e313b5 100755
|
||||
--enable-plugin enable plugin support
|
||||
--enable-host-shared build host code as shared libraries
|
||||
--disable-libquadmath-support
|
||||
@@ -31790,6 +31793,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
@@ -30271,6 +30274,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ index 708328e1670..4b977e313b5 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index df1c9cc3200..5461bab88a9 100644
|
||||
index 070b9c6c497..0fd438e39e5 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7311,6 +7311,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
@@ -6605,6 +6605,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
[specify that runtime libraries should be
|
||||
installed in a compiler-specific directory])])
|
||||
|
||||
@@ -120,10 +120,10 @@ index df1c9cc3200..5461bab88a9 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index cf536a15116..7d3f1ccddf3 100644
|
||||
index 7775bcc72eb..034d3066c2b 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -369,6 +369,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
@@ -348,6 +348,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
|
||||
-Wparentheses -Wno-pedantic-ms-format @gol
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
|
||||
@@ -131,7 +131,7 @@ index cf536a15116..7d3f1ccddf3 100644
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
|
||||
-Wno-scalar-storage-order -Wsequence-point @gol
|
||||
@@ -7728,6 +7729,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -6926,6 +6927,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
most targets, it is made up of code and thus requires the stack to be
|
||||
made executable in order for the program to work properly.
|
||||
|
||||
@@ -147,10 +147,10 @@ index cf536a15116..7d3f1ccddf3 100644
|
||||
@opindex Wfloat-equal
|
||||
@opindex Wno-float-equal
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index 8ba410c9e17..a83ba34ac4b 100644
|
||||
index 9f790db0daf..b2200c5185a 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -1152,6 +1152,8 @@ proper position among the other output files. */
|
||||
@@ -1041,6 +1041,8 @@ proper position among the other output files. */
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
@@ -160,7 +160,7 @@ index 8ba410c9e17..a83ba34ac4b 100644
|
||||
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
|
||||
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
|
||||
diff --git a/gcc/incpath.c b/gcc/incpath.c
|
||||
index 446d280321d..fbfc0ce03b8 100644
|
||||
index 8a2bda00f80..9098ab044ab 100644
|
||||
--- a/gcc/incpath.c
|
||||
+++ b/gcc/incpath.c
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -171,7 +171,7 @@ index 446d280321d..fbfc0ce03b8 100644
|
||||
|
||||
/* Microsoft Windows does not natively support inodes.
|
||||
VMS has non-numeric inodes. */
|
||||
@@ -395,6 +396,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
|
||||
@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
|
||||
}
|
||||
fprintf (stderr, _("End of search list.\n"));
|
||||
}
|
||||
@@ -199,5 +199,5 @@ index 446d280321d..fbfc0ce03b8 100644
|
||||
|
||||
/* Use given -I paths for #include "..." but not #include <...>, and
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+9
-14
@@ -1,44 +1,39 @@
|
||||
From 9675297b3a46b65a54e9df97f26ea445d53c67c6 Mon Sep 17 00:00:00 2001
|
||||
From 8e8955cbd60155d131d3ac66cb2a1e7e41835278 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH] Turn on -Wl,-z,relro,-z,now by default.
|
||||
|
||||
Previously, we also used to turn on -z relro here, but we now build
|
||||
binutils with --enable-relro, which is functionally equivalent.
|
||||
|
||||
Binutils does not appear to have a similar option for enabling -z
|
||||
now by default.
|
||||
---
|
||||
gcc/doc/invoke.texi | 3 +++
|
||||
gcc/gcc.c | 1 +
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 7d3f1ccddf3..485d2d6b742 100644
|
||||
index 034d3066c2b..4885efe3247 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -15921,6 +15921,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -14663,6 +14663,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
linker. When using the GNU linker, you can also get the same effect with
|
||||
@option{-Wl,-Map=output.map}.
|
||||
|
||||
+NOTE: In Alpine Linux, for LDFLAGS, the option
|
||||
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
|
||||
+@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}.
|
||||
+
|
||||
@item -u @var{symbol}
|
||||
@opindex u
|
||||
Pretend the symbol @var{symbol} is undefined, to force linking of
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index a83ba34ac4b..faf9ce76b3d 100644
|
||||
index b2200c5185a..625c9ab7902 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -1150,6 +1150,7 @@ proper position among the other output files. */
|
||||
@@ -1039,6 +1039,7 @@ proper position among the other output files. */
|
||||
"%{flto|flto=*:%<fcompare-debug*} \
|
||||
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
+ "-z now " \
|
||||
+ "-z relro -z now " \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
%{Wno-poison-system-directories:--no-poison-system-directories} \
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 4eb1b3849325b77c4cb66b675119299de35125bb Mon Sep 17 00:00:00 2001
|
||||
From c5924988157b27b60c28d20d971179bbacbd2ae3 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
|
||||
index 11e015bdb87..de8b7bf246f 100644
|
||||
index db91a36794a..ed976c71404 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -1427,6 +1427,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
@@ -1385,6 +1385,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);
|
||||
|
||||
@@ -25,10 +25,10 @@ index 11e015bdb87..de8b7bf246f 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 485d2d6b742..164929f7583 100644
|
||||
index 4885efe3247..a3e5e002fa5 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10225,6 +10225,12 @@ also turns on the following optimization flags:
|
||||
@@ -9230,6 +9230,12 @@ also turns on the following optimization flags:
|
||||
Please note the warning under @option{-fgcse} about
|
||||
invoking @option{-O2} on programs that use computed gotos.
|
||||
|
||||
@@ -42,5 +42,5 @@ index 485d2d6b742..164929f7583 100644
|
||||
@opindex O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8de5d46c530ceca9f4add46d5cae3cd52c38eba3 Mon Sep 17 00:00:00 2001
|
||||
From 5b8de466aa959a6c929cee2c78e4159a0209b4f8 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
@@ -22,7 +22,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
14 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
|
||||
index 7f2529a2a1d..b097e1688aa 100644
|
||||
index e587e2e9ad6..1d1017aa523 100644
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -34,7 +34,7 @@ index 7f2529a2a1d..b097e1688aa 100644
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
|
||||
index c1dae8ca2cf..a87dc740171 100644
|
||||
index e25fcac3c59..22b2f7b0d14 100644
|
||||
--- a/gcc/config/alpha/linux-elf.h
|
||||
+++ b/gcc/config/alpha/linux-elf.h
|
||||
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -47,7 +47,7 @@ index c1dae8ca2cf..a87dc740171 100644
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
|
||||
index 0c1c4e70b6b..8b581afacdd 100644
|
||||
index 0ec3aa53189..f8bda84de2a 100644
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -70,6 +70,7 @@
|
||||
@@ -59,19 +59,16 @@ index 0c1c4e70b6b..8b581afacdd 100644
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 5ebbf42a13d..902378e1bad 100644
|
||||
index ff2e880b1fa..7f30c363e4a 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -136,17 +136,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
|
||||
"%{static-libasan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#undef LIBHWASAN_EARLY_SPEC
|
||||
#define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \
|
||||
@@ -145,12 +145,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#undef LIBTSAN_EARLY_SPEC
|
||||
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
|
||||
"%{static-libtsan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
||||
@@ -87,10 +84,10 @@ index 5ebbf42a13d..902378e1bad 100644
|
||||
|
||||
#undef TARGET_F951_OPTIONS
|
||||
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
|
||||
index a23e7ab3eb7..12ac8cb93a9 100644
|
||||
index ae4aa844f02..54b91c0492a 100644
|
||||
--- a/gcc/config/i386/gnu-user.h
|
||||
+++ b/gcc/config/i386/gnu-user.h
|
||||
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -74,7 +74,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
{ "link_emulation", GNU_USER_LINK_EMULATION },\
|
||||
{ "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
|
||||
|
||||
@@ -100,7 +97,7 @@ index a23e7ab3eb7..12ac8cb93a9 100644
|
||||
%{!static: \
|
||||
%{!static-pie: \
|
||||
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
|
||||
index f3e25b1412a..712b0f1c30e 100644
|
||||
index 785c68220b8..21dd66b412a 100644
|
||||
--- a/gcc/config/i386/gnu-user64.h
|
||||
+++ b/gcc/config/i386/gnu-user64.h
|
||||
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -112,7 +109,7 @@ index f3e25b1412a..712b0f1c30e 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
|
||||
index ac40c3dfd3f..6e19e25c35a 100644
|
||||
index ee38e218aec..0325971d818 100644
|
||||
--- a/gcc/config/ia64/linux.h
|
||||
+++ b/gcc/config/ia64/linux.h
|
||||
@@ -58,7 +58,7 @@ do { \
|
||||
@@ -125,7 +122,7 @@ index ac40c3dfd3f..6e19e25c35a 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
|
||||
index a390bcece83..be0ee289367 100644
|
||||
index 5d0782100bb..4be5fbb2191 100644
|
||||
--- a/gcc/config/mips/gnu-user.h
|
||||
+++ b/gcc/config/mips/gnu-user.h
|
||||
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -137,7 +134,7 @@ index a390bcece83..be0ee289367 100644
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index fce5b896e6e..ee29979dd34 100644
|
||||
index 4afef7c228c..ba1a6e60e05 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -145,14 +142,14 @@ index fce5b896e6e..ee29979dd34 100644
|
||||
|
||||
#define LINK_SPEC "\
|
||||
+-as-needed \
|
||||
-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " \
|
||||
-melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX " \
|
||||
%{mno-relax:--no-relax} \
|
||||
%{mbig-endian:-EB} \
|
||||
%{shared} \
|
||||
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
|
||||
index e3f2cd254f6..43499ed29cf 100644
|
||||
index 2ded3301282..a1e44ddcc0d 100644
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -374,13 +374,13 @@ extern int dot_symbols;
|
||||
@@ -457,13 +457,13 @@ extern int dot_symbols;
|
||||
" -m elf64ppc")
|
||||
#endif
|
||||
|
||||
@@ -169,7 +166,7 @@ index e3f2cd254f6..43499ed29cf 100644
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
|
||||
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
|
||||
index 510abe169c5..3c1f3a8ec5d 100644
|
||||
index 9ade72114e9..9490b84a153 100644
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -789,7 +789,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
@@ -182,7 +179,7 @@ index 510abe169c5..3c1f3a8ec5d 100644
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
|
||||
|
||||
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
|
||||
index daa48fdfc2b..2fcfc5d770f 100644
|
||||
index 6919b468f06..56d52d41b31 100644
|
||||
--- a/gcc/config/s390/linux.h
|
||||
+++ b/gcc/config/s390/linux.h
|
||||
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -195,7 +192,7 @@ index daa48fdfc2b..2fcfc5d770f 100644
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
|
||||
index 2550d7ee8f0..7596d0b2757 100644
|
||||
index 63853e60c03..de6d8675456 100644
|
||||
--- a/gcc/config/sparc/linux.h
|
||||
+++ b/gcc/config/sparc/linux.h
|
||||
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
@@ -208,10 +205,10 @@ index 2550d7ee8f0..7596d0b2757 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index faf9ce76b3d..1ad5da6d769 100644
|
||||
index 625c9ab7902..7aec9d3a016 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -737,8 +737,11 @@ proper position among the other output files. */
|
||||
@@ -695,8 +695,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBASAN_EARLY_SPEC
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -225,7 +222,7 @@ index faf9ce76b3d..1ad5da6d769 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -773,8 +776,11 @@ proper position among the other output files. */
|
||||
@@ -713,8 +716,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBTSAN_EARLY_SPEC
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -239,7 +236,7 @@ index faf9ce76b3d..1ad5da6d769 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -791,8 +797,11 @@ proper position among the other output files. */
|
||||
@@ -731,8 +737,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBLSAN_EARLY_SPEC
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -253,7 +250,7 @@ index faf9ce76b3d..1ad5da6d769 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -807,8 +816,11 @@ proper position among the other output files. */
|
||||
@@ -747,8 +756,11 @@ proper position among the other output files. */
|
||||
#define STATIC_LIBUBSAN_LIBS \
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
@@ -268,5 +265,5 @@ index faf9ce76b3d..1ad5da6d769 100644
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 85e12e3d32a44c3fd10b5327edd542972a179eec Mon Sep 17 00:00:00 2001
|
||||
From 7c79655102e756622211ca40384e8562be334973 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index 2005b783c68..c5c6af427cc 100644
|
||||
index c49da99d395..93f25319005 100644
|
||||
--- a/gcc/c-family/c.opt
|
||||
+++ b/gcc/c-family/c.opt
|
||||
@@ -637,7 +637,7 @@ Warn about function calls with format strings that write past the end
|
||||
@@ -599,7 +599,7 @@ Warn about function calls with format strings that write past the end
|
||||
of the destination region. Same as -Wformat-overflow=1.
|
||||
|
||||
Wformat-security
|
||||
@@ -20,7 +20,7 @@ index 2005b783c68..c5c6af427cc 100644
|
||||
Warn about possible security problems with format functions.
|
||||
|
||||
Wformat-signedness
|
||||
@@ -658,7 +658,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
@@ -620,7 +620,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
Warn about zero-length formats.
|
||||
|
||||
Wformat=
|
||||
@@ -30,5 +30,5 @@ index 2005b783c68..c5c6af427cc 100644
|
||||
|
||||
Wformat-overflow=
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f1e92f5f3576779776c9f3d6aeef76e1569e719a Mon Sep 17 00:00:00 2001
|
||||
From 25eb9009f180c799647cfc81d27d8b67ba3f3b72 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH] Enable -Wtrampolines by default.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Enable -Wtrampolines by default.
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index d15105a73f3..29f9504cb68 100644
|
||||
index 8bb65e0e1af..ace932b300d 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -775,7 +775,7 @@ Common Var(warn_system_headers) Warning
|
||||
@@ -774,7 +774,7 @@ Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers.
|
||||
|
||||
Wtrampolines
|
||||
@@ -21,5 +21,5 @@ index d15105a73f3..29f9504cb68 100644
|
||||
|
||||
Wtype-limits
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3503fd734a33b67ec6a9fdc2c52bb8310864b119 Mon Sep 17 00:00:00 2001
|
||||
From cfa0c7a3154415fe0e0ab6bd373a8f2164024ff5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index 1ad5da6d769..99314032ec2 100644
|
||||
index 7aec9d3a016..daeb4d0c8ea 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -989,6 +989,12 @@ proper position among the other output files. */
|
||||
@@ -886,6 +886,12 @@ proper position among the other output files. */
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
#endif
|
||||
|
||||
@@ -26,20 +26,20 @@ index 1ad5da6d769..99314032ec2 100644
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
@@ -1288,7 +1294,7 @@ static const char *cc1_options =
|
||||
@@ -1170,7 +1176,7 @@ static const char *cc1_options =
|
||||
%{-version:--version}\
|
||||
%{-help=*:--help=%*}\
|
||||
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
|
||||
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
|
||||
- %{fsyntax-only:-o %j} %{-param*}\
|
||||
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
|
||||
%{coverage:-fprofile-arcs -ftest-coverage}\
|
||||
%{fprofile-arcs|fprofile-generate*|coverage:\
|
||||
%{!fprofile-update=single:\
|
||||
diff --git a/gcc/params.opt b/gcc/params.opt
|
||||
index 8ba281b4cfa..bab39cdf8a2 100644
|
||||
index 4aec480798b..eaecfab37ad 100644
|
||||
--- a/gcc/params.opt
|
||||
+++ b/gcc/params.opt
|
||||
@@ -946,7 +946,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
@@ -853,7 +853,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
The maximum number of SSA_NAME assignments to follow in determining a value.
|
||||
|
||||
-param=ssp-buffer-size=
|
||||
@@ -49,5 +49,5 @@ index 8ba281b4cfa..bab39cdf8a2 100644
|
||||
|
||||
-param=stack-clash-protection-guard-size=
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c4dd51fe15a938fdd76d781a4eede2a9205eacbc Mon Sep 17 00:00:00 2001
|
||||
From 4733bb8115411c50028f7a583783ac10c63e8536 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
|
||||
@@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
|
||||
index ab716ff04ea..e595268d9fc 100644
|
||||
index a9391d8d167..f7eee24dc8c 100644
|
||||
--- a/libstdc++-v3/po/Makefile.am
|
||||
+++ b/libstdc++-v3/po/Makefile.am
|
||||
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
|
||||
@@ -38,10 +38,10 @@ index ab716ff04ea..e595268d9fc 100644
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
|
||||
index 8edd2e05639..63f61fcf96f 100644
|
||||
index a0f84b0cfa0..ab24a47a2fd 100644
|
||||
--- a/libstdc++-v3/po/Makefile.in
|
||||
+++ b/libstdc++-v3/po/Makefile.in
|
||||
@@ -553,6 +553,7 @@ uninstall-am:
|
||||
@@ -548,6 +548,7 @@ uninstall-am:
|
||||
|
||||
|
||||
.po.mo:
|
||||
@@ -50,5 +50,5 @@ index 8edd2e05639..63f61fcf96f 100644
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0a1fd78184f00fb77dac00dabe98eb025620efc2 Mon Sep 17 00:00:00 2001
|
||||
From 7d4ee7a90b87edd33a7f628ff89ce1b1e0576b4d Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH] Don't declare asprintf if defined as a macro.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] Don't declare asprintf if defined as a macro.
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index f4c0fe11d6f..cf4b1043e4d 100644
|
||||
index 141cb886a85..fa0e78eb62f 100644
|
||||
--- a/include/libiberty.h
|
||||
+++ b/include/libiberty.h
|
||||
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
|
||||
@@ -645,8 +645,11 @@ extern int pwait (int, int *, int);
|
||||
/* Like sprintf but provides a pointer to malloc'd storage, which must
|
||||
be freed by the caller. */
|
||||
|
||||
@@ -24,5 +24,5 @@ index f4c0fe11d6f..cf4b1043e4d 100644
|
||||
/* Like asprintf but allocates memory without fail. This works like
|
||||
xmalloc. */
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f81d67f6fe1f1066642606209c882b333d937cb7 Mon Sep 17 00:00:00 2001
|
||||
From 84b959624e1371f1d02630b6e067f00f46dbe516 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH] libiberty: copy PIC objects during build process
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] libiberty: copy PIC objects during build process
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 4f1213b983b..d0224649d30 100644
|
||||
index d6b302e02fd..fd39928546f 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -264,6 +264,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
||||
@@ -263,6 +263,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
||||
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
||||
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
|
||||
$(RANLIB) $(TARGETLIB); \
|
||||
@@ -20,5 +20,5 @@ index 4f1213b983b..d0224649d30 100644
|
||||
else true; fi
|
||||
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3b732288ce771348cbcc9fb633a36b7aff2b4ad4 Mon Sep 17 00:00:00 2001
|
||||
From 8ffd575380bc28aaf3c210ad838b205ce2403124 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:36 +0000
|
||||
Subject: [PATCH] libitm: disable FORTIFY
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] libitm: disable FORTIFY
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
|
||||
index a3d84896cc5..ecb281d5919 100644
|
||||
index 04109160e91..107b957ece3 100644
|
||||
--- a/libitm/configure.tgt
|
||||
+++ b/libitm/configure.tgt
|
||||
@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then
|
||||
@@ -46,6 +46,16 @@ if test "$gcc_cv_have_tls" = yes ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -29,5 +29,5 @@ index a3d84896cc5..ecb281d5919 100644
|
||||
# work out any special compilation flags as necessary.
|
||||
case "${target_cpu}" in
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a3e556187d0a8e9d39544f023960eca0f07d3e83 Mon Sep 17 00:00:00 2001
|
||||
From 0d83ea67b2e16658a88068ebce0e25cce22fe75e Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH] libgcc_s
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] libgcc_s
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
|
||||
index 1772fb16c9a..77e04b0c2df 100644
|
||||
index c6033688f51..a60e5162995 100644
|
||||
--- a/gcc/config/i386/i386-expand.c
|
||||
+++ b/gcc/config/i386/i386-expand.c
|
||||
@@ -11066,10 +11066,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
@@ -10966,10 +10966,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
{
|
||||
case IX86_BUILTIN_CPU_INIT:
|
||||
{
|
||||
@@ -27,11 +27,11 @@ index 1772fb16c9a..77e04b0c2df 100644
|
||||
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
|
||||
}
|
||||
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
|
||||
index ef463848f9d..1a3de052c80 100644
|
||||
index cf5f0884bb4..ed0381e7744 100644
|
||||
--- a/libgcc/config/i386/cpuinfo.c
|
||||
+++ b/libgcc/config/i386/cpuinfo.c
|
||||
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
|
||||
__cpu_features2);
|
||||
@@ -510,7 +510,7 @@ __cpu_indicator_init (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#if defined SHARED && defined USE_ELF_SYMVER
|
||||
@@ -53,5 +53,5 @@ index 8506a635790..564296f788e 100644
|
||||
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
|
||||
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f520e67fba621f213146271408ff3210b3527176 Mon Sep 17 00:00:00 2001
|
||||
From 99ccc2d68049c56519d49e21b6f13cf8d98ea163 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH] nopie
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] nopie
|
||||
2 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 4b977e313b5..592e81e40f6 100755
|
||||
index 793530e21cf..2d874d3defe 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -32300,6 +32300,33 @@ fi
|
||||
@@ -30779,6 +30779,33 @@ fi
|
||||
$as_echo "$gcc_cv_no_pie" >&6; }
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -47,10 +47,10 @@ index 4b977e313b5..592e81e40f6 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 5461bab88a9..1577529ffb7 100644
|
||||
index 0fd438e39e5..0b257e687ee 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7571,6 +7571,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
@@ -6863,6 +6863,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
LDFLAGS="$saved_LDFLAGS"])
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -71,5 +71,5 @@ index 5461bab88a9..1577529ffb7 100644
|
||||
AC_SUBST([NO_PIE_FLAG])
|
||||
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 37310cabb8bc7256899c4d45cc68a47ca2a3232b Mon Sep 17 00:00:00 2001
|
||||
From a5a7decc1944cf6831eebc10d71a52ef8496bff5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:57:09 +0000
|
||||
Subject: [PATCH] libffi: use __linux__ instead of __gnu_linux__ for musl
|
||||
@@ -21,5 +21,5 @@ index 721ff00ea43..22a699c6340 100644
|
||||
with both write and execute permission. Code compiled when this
|
||||
option is defined will attempt to map such pages once, but if it
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 586e82425a024d85d1bd9952ca51d8a671aa9b5d Mon Sep 17 00:00:00 2001
|
||||
From 3554a4b751acce2a4f432d1bb24d9fc69a916889 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:57:51 +0000
|
||||
Subject: [PATCH] dlang: update zlib binding
|
||||
@@ -421,5 +421,5 @@ index e6cce240fd5..bd2fe37ebec 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+20
-7
@@ -1,17 +1,30 @@
|
||||
From caeae8288593dbd5a1a6d93508d875eb0d8fdf49 Mon Sep 17 00:00:00 2001
|
||||
From abf18c3f7d908f8f4a365bd4d8f9a4743f1d8f0c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:19:12 +0000
|
||||
Subject: [PATCH] dlang: libdruntime: define fcntl.h constants for mips64
|
||||
Date: Fri, 21 Aug 2020 06:58:22 +0000
|
||||
Subject: [PATCH] dlang: fix fcntl on mips, add libucontext dep
|
||||
|
||||
---
|
||||
libphobos/configure.tgt | 1 +
|
||||
libphobos/libdruntime/core/sys/posix/fcntl.d | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
|
||||
index 94e42bf5509..73f2e4b7f01 100644
|
||||
--- a/libphobos/configure.tgt
|
||||
+++ b/libphobos/configure.tgt
|
||||
@@ -35,6 +35,7 @@ case "${target}" in
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
|
||||
;;
|
||||
power*-*-linux*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/fcntl.d b/libphobos/libdruntime/core/sys/posix/fcntl.d
|
||||
index 59df921ba41..9ee9f943948 100644
|
||||
index 9febcff849b..cb34e2108bd 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/fcntl.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/fcntl.d
|
||||
@@ -871,6 +871,21 @@ else version (CRuntime_Musl)
|
||||
@@ -870,6 +870,21 @@ else version (CRuntime_Musl)
|
||||
F_SETLKW = 7,
|
||||
}
|
||||
}
|
||||
@@ -34,5 +47,5 @@ index 59df921ba41..9ee9f943948 100644
|
||||
static assert(0, "Platform not supported");
|
||||
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 26daa73d678b87a6950df1d79d171ba40ecbce15 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:18:32 +0000
|
||||
Subject: [PATCH] dlang: use libucontext on mips64
|
||||
|
||||
---
|
||||
libphobos/configure.tgt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
|
||||
index 0643daeb613..b74d9fb3f25 100644
|
||||
--- a/libphobos/configure.tgt
|
||||
+++ b/libphobos/configure.tgt
|
||||
@@ -38,6 +38,7 @@ case "${target}" in
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
|
||||
;;
|
||||
power*-*-freebsd*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
--
|
||||
2.35.1
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
From 374a19de60fcd5c31321c3f4d26dcc4b631e8c3f Mon Sep 17 00:00:00 2001
|
||||
From 277c3317929f41e514632d29ff00354c511deb0e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH] ada: fix shared linking
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] ada: fix shared linking
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
|
||||
index 5cd5ef64f56..1c611a82cab 100644
|
||||
index 02c413a412f..f0e52a87d6e 100644
|
||||
--- a/gcc/ada/link.c
|
||||
+++ b/gcc/ada/link.c
|
||||
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|
||||
@@ -38,5 +38,5 @@ index 5cd5ef64f56..1c611a82cab 100644
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
From ad053bc46b535e78397f992e3c2c1d28c1ebd1f4 Mon Sep 17 00:00:00 2001
|
||||
From b1e3ea43462684675cc4f75c2ca4e984a6d511fb Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 047be0255e2..426949aa91c 100644
|
||||
index 36e369df6e7..63627db68cf 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -170,6 +170,7 @@ BUILD_EXPORTS = \
|
||||
@@ -20,5 +20,5 @@ index 047be0255e2..426949aa91c 100644
|
||||
|
||||
# This is the list of directories to built for the host system.
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
From 18d44a7f8d801cc6926a73e2dda2f0ce859dc561 Mon Sep 17 00:00:00 2001
|
||||
From ea75db47e243b59e7cf793623a87295c0d2aada2 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH] add fortify-headers paths
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] add fortify-headers paths
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index 4e1db60fced..7fcf402b416 100644
|
||||
index 95654bcdb5a..d88df8f154a 100644
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -167,6 +167,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -21,5 +21,5 @@ index 4e1db60fced..7fcf402b416 100644
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
From 38d27ebdcc5a8bea0807b5d56203f0ea5e16868f Mon Sep 17 00:00:00 2001
|
||||
From 42637405a9cf90d96627406c72dbaf19cca34164 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
||||
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index 99314032ec2..6e91767efe8 100644
|
||||
index daeb4d0c8ea..6920bec0fa0 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -997,8 +997,7 @@ proper position among the other output files. */
|
||||
@@ -894,8 +894,7 @@ proper position among the other output files. */
|
||||
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
@@ -27,5 +27,5 @@ index 99314032ec2..6e91767efe8 100644
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
"|fstack-protector-strong|fstack-protector-explicit" \
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
From 0cc2a1befaf343e5ce1cbc15bd247eee812bdf33 Mon Sep 17 00:00:00 2001
|
||||
From 64f209a51a7277d778c196c31c58422a04a69238 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index 6e91767efe8..22dbbf85850 100644
|
||||
index 6920bec0fa0..40e07354b3d 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -738,10 +738,10 @@ proper position among the other output files. */
|
||||
@@ -696,10 +696,10 @@ proper position among the other output files. */
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
|
||||
@@ -25,7 +25,7 @@ index 6e91767efe8..22dbbf85850 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -777,10 +777,10 @@ proper position among the other output files. */
|
||||
@@ -717,10 +717,10 @@ proper position among the other output files. */
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -38,7 +38,7 @@ index 6e91767efe8..22dbbf85850 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -798,10 +798,10 @@ proper position among the other output files. */
|
||||
@@ -738,10 +738,10 @@ proper position among the other output files. */
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -51,7 +51,7 @@ index 6e91767efe8..22dbbf85850 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -817,10 +817,10 @@ proper position among the other output files. */
|
||||
@@ -757,10 +757,10 @@ proper position among the other output files. */
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -65,5 +65,5 @@ index 6e91767efe8..22dbbf85850 100644
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+6
-7
@@ -1,19 +1,18 @@
|
||||
From feea6f782e83a53487ad633608484dfa3483be1b Mon Sep 17 00:00:00 2001
|
||||
From a57f530ace0ce215b1d6e2073223f05417ca2ed4 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Andreas Svee <me@lochnair.net>
|
||||
Date: Thu, 21 Dec 2017 03:14:33 +0100
|
||||
Subject: [PATCH] mips64: disable multilib support
|
||||
Subject: [PATCH] Pure 64-bit MIPS
|
||||
|
||||
multilib is not supported by Alpine GCC
|
||||
---
|
||||
gcc/config/mips/mips.h | 8 ++++----
|
||||
gcc/config/mips/t-linux64 | 6 +++---
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
|
||||
index 47aac9d3d61..4ad81059a86 100644
|
||||
index 3ce0c19a29a..b9920b49167 100644
|
||||
--- a/gcc/config/mips/mips.h
|
||||
+++ b/gcc/config/mips/mips.h
|
||||
@@ -3425,11 +3425,11 @@ struct GTY(()) machine_function {
|
||||
@@ -3424,11 +3424,11 @@ struct GTY(()) machine_function {
|
||||
/* If we are *not* using multilibs and the default ABI is not ABI_32 we
|
||||
need to change these from /lib and /usr/lib. */
|
||||
#if MIPS_ABI_DEFAULT == ABI_N32
|
||||
@@ -30,7 +29,7 @@ index 47aac9d3d61..4ad81059a86 100644
|
||||
|
||||
/* Load store bonding is not supported by micromips and fix_24k. The
|
||||
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
|
||||
index 130e1f04707..a64ac2bbb5b 100644
|
||||
index ceb58d3b5f3..8116e23ebba 100644
|
||||
--- a/gcc/config/mips/t-linux64
|
||||
+++ b/gcc/config/mips/t-linux64
|
||||
@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
|
||||
@@ -44,5 +43,5 @@ index 130e1f04707..a64ac2bbb5b 100644
|
||||
+ ../lib32 \
|
||||
+ ../lib
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+51
-11
@@ -1,16 +1,44 @@
|
||||
From 5c24869c9bc1a552f8bb5c32a8538c6e065a4db8 Mon Sep 17 00:00:00 2001
|
||||
From 4571e0787fc992d647991e64a64d2b9c82e9a0e6 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH] ppc64[le]: disable multilib support
|
||||
Date: Fri, 21 Aug 2020 07:04:40 +0000
|
||||
Subject: [PATCH] use pure 64-bit configuration where appropriate
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
gcc/config/rs6000/t-linux | 6 ++++--
|
||||
gcc/config/rs6000/t-linux64 | 4 ++--
|
||||
gcc/config/rs6000/t-linux64bele | 4 ++--
|
||||
gcc/config/rs6000/t-linux64lebe | 4 ++--
|
||||
4 files changed, 10 insertions(+), 8 deletions(-)
|
||||
gcc/config/aarch64/t-aarch64-linux | 2 +-
|
||||
gcc/config/i386/t-linux64 | 4 ++--
|
||||
gcc/config/rs6000/t-linux | 6 ++++--
|
||||
gcc/config/rs6000/t-linux64 | 4 ++--
|
||||
gcc/config/rs6000/t-linux64bele | 4 ++--
|
||||
gcc/config/rs6000/t-linux64lebe | 4 ++--
|
||||
gcc/config/s390/t-linux64 | 4 ++--
|
||||
7 files changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
|
||||
index 83e59e33b85..6ec56fdf6a8 100644
|
||||
--- a/gcc/config/aarch64/t-aarch64-linux
|
||||
+++ b/gcc/config/aarch64/t-aarch64-linux
|
||||
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
|
||||
LIB1ASMFUNCS = _aarch64_sync_cache_range
|
||||
|
||||
AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
|
||||
-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = mabi.lp64=../lib
|
||||
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
|
||||
|
||||
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
|
||||
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
|
||||
index 1171e218578..256f8c079ba 100644
|
||||
--- a/gcc/config/i386/t-linux64
|
||||
+++ b/gcc/config/i386/t-linux64
|
||||
@@ -33,6 +33,6 @@
|
||||
comma=,
|
||||
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
||||
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
||||
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux
|
||||
index aeb7440c492..ab14c455d8d 100644
|
||||
--- a/gcc/config/rs6000/t-linux
|
||||
@@ -36,7 +64,7 @@ index aeb7440c492..ab14c455d8d 100644
|
||||
endif
|
||||
|
||||
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
|
||||
index e11a118cb5f..df81dc04a32 100644
|
||||
index 264a7e27524..d1e460811cc 100644
|
||||
--- a/gcc/config/rs6000/t-linux64
|
||||
+++ b/gcc/config/rs6000/t-linux64
|
||||
@@ -28,8 +28,8 @@
|
||||
@@ -76,6 +104,18 @@ index 2e63bdb9fc9..c6e1c5db65d 100644
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
|
||||
diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64
|
||||
index cc6ab367072..7f498ee1cdc 100644
|
||||
--- a/gcc/config/s390/t-linux64
|
||||
+++ b/gcc/config/s390/t-linux64
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
MULTILIB_OPTIONS = m64/m31
|
||||
MULTILIB_DIRNAMES = 64 32
|
||||
-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From cbd96a32dc2aaa61f6adcb3643e1da21f185f80e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
gcc/config/aarch64/t-aarch64-linux | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
|
||||
index 241b0ef20b6..18e63b34d8b 100644
|
||||
--- a/gcc/config/aarch64/t-aarch64-linux
|
||||
+++ b/gcc/config/aarch64/t-aarch64-linux
|
||||
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
|
||||
LIB1ASMFUNCS = _aarch64_sync_cache_range
|
||||
|
||||
AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
|
||||
-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = mabi.lp64=../lib
|
||||
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
|
||||
|
||||
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
|
||||
--
|
||||
2.35.1
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
From a46c8d6cb9428db29fbf8a80609ff449354ce111 Mon Sep 17 00:00:00 2001
|
||||
From a1fb957dd7fe9a8dd99d256d7b0a676f87a9d80c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH] always build libgcc_eh.a
|
||||
@@ -10,10 +10,10 @@ highly inspired by:
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index 2c8be561eb5..c557750b1b3 100644
|
||||
index 851e7657d07..99ec513a1a6 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),)
|
||||
@@ -956,8 +956,9 @@ ifneq ($(LIBUNWIND),)
|
||||
all: libunwind.a
|
||||
endif
|
||||
|
||||
@@ -24,7 +24,7 @@ index 2c8be561eb5..c557750b1b3 100644
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1160,10 +1161,6 @@ install-libunwind:
|
||||
@@ -1159,10 +1160,6 @@ install-libunwind:
|
||||
install-shared:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||
|
||||
@@ -35,7 +35,7 @@ index 2c8be561eb5..c557750b1b3 100644
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes)
|
||||
@@ -1179,6 +1176,10 @@ ifeq ($(enable_gcov),yes)
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
|
||||
endif
|
||||
|
||||
@@ -47,5 +47,5 @@ index 2c8be561eb5..c557750b1b3 100644
|
||||
for file in $$parts; do \
|
||||
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
From d7064ab25a561bb99c3d0b35663154656013aed2 Mon Sep 17 00:00:00 2001
|
||||
From 3a0a3d3843edd30ce72c96a40caa9e1334233558 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
2 files changed, 3 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
index 2272f83d68d..1d78456544a 100644
|
||||
index 80cb2b2a793..701b7a3aeab 100644
|
||||
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
@@ -401,12 +401,6 @@ package System.OS_Interface is
|
||||
@@ -399,12 +399,6 @@ package System.OS_Interface is
|
||||
PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
|
||||
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
|
||||
|
||||
@@ -25,7 +25,7 @@ index 2272f83d68d..1d78456544a 100644
|
||||
function pthread_rwlock_init
|
||||
(mutex : access pthread_rwlock_t;
|
||||
attr : access pthread_rwlockattr_t) return int;
|
||||
@@ -468,11 +462,6 @@ package System.OS_Interface is
|
||||
@@ -466,11 +460,6 @@ package System.OS_Interface is
|
||||
protocol : int) return int;
|
||||
pragma Import (C, pthread_mutexattr_setprotocol);
|
||||
|
||||
@@ -38,10 +38,10 @@ index 2272f83d68d..1d78456544a 100644
|
||||
sched_priority : int; -- scheduling priority
|
||||
end record;
|
||||
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
index 757a6cdfdad..82df94f6a00 100644
|
||||
index c45559e5ba0..0b0f173e7d4 100644
|
||||
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -202,9 +202,6 @@ package body System.Task_Primitives.Operations is
|
||||
pragma Import
|
||||
(C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
|
||||
|
||||
@@ -51,7 +51,7 @@ index 757a6cdfdad..82df94f6a00 100644
|
||||
-- We do not have pragma Linker_Options ("-lcap"); here, because this
|
||||
-- library is not present on many Linux systems. 'libcap' is the Linux
|
||||
-- "capabilities" library, called by __gnat_has_cap_sys_nice.
|
||||
@@ -210,38 +207,6 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -214,38 +211,6 @@ package body System.Task_Primitives.Operations is
|
||||
-- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
|
||||
-- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
|
||||
|
||||
@@ -84,13 +84,13 @@ index 757a6cdfdad..82df94f6a00 100644
|
||||
- return Ceiling_Support;
|
||||
- end Get_Ceiling_Support;
|
||||
-
|
||||
- pragma Warnings (Off, "non-preelaborable call not allowed*");
|
||||
- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
|
||||
- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
|
||||
- pragma Warnings (On, "non-preelaborable call not allowed*");
|
||||
- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
|
||||
-- True if the locking policy is Ceiling_Locking, and the current process
|
||||
-- has permission to use this policy. The process has permission if it is
|
||||
-- running as 'root', or if the capability was set by the setcap command,
|
||||
@@ -344,7 +309,9 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -348,7 +313,9 @@ package body System.Task_Primitives.Operations is
|
||||
-- Init_Mutex --
|
||||
----------------
|
||||
|
||||
@@ -100,7 +100,7 @@ index 757a6cdfdad..82df94f6a00 100644
|
||||
Mutex_Attr : aliased pthread_mutexattr_t;
|
||||
Result, Result_2 : C.int;
|
||||
|
||||
@@ -356,16 +323,7 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -360,16 +327,7 @@ package body System.Task_Primitives.Operations is
|
||||
return Result;
|
||||
end if;
|
||||
|
||||
@@ -118,7 +118,7 @@ index 757a6cdfdad..82df94f6a00 100644
|
||||
Result := pthread_mutexattr_setprotocol
|
||||
(Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
|
||||
pragma Assert (Result = 0);
|
||||
@@ -405,11 +363,6 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -409,11 +367,6 @@ package body System.Task_Primitives.Operations is
|
||||
Result := pthread_rwlockattr_init (RWlock_Attr'Access);
|
||||
pragma Assert (Result = 0);
|
||||
|
||||
@@ -131,5 +131,5 @@ index 757a6cdfdad..82df94f6a00 100644
|
||||
|
||||
pragma Assert (Result in 0 | ENOMEM);
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From e87e415e9a88dbce68ed7b9d8386c3c2d0c0d6b6 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
gcc/config/s390/t-linux64 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64
|
||||
index cc6ab367072..7f498ee1cdc 100644
|
||||
--- a/gcc/config/s390/t-linux64
|
||||
+++ b/gcc/config/s390/t-linux64
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
MULTILIB_OPTIONS = m64/m31
|
||||
MULTILIB_DIRNAMES = 64 32
|
||||
-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
--
|
||||
2.35.1
|
||||
|
||||
+25
-25
@@ -1,4 +1,4 @@
|
||||
From 5193de0a6c96fefe0c46fc9a6b8c27623ad85640 Mon Sep 17 00:00:00 2001
|
||||
From d0716e14d5bd652a7e21d0e3c75ea8ed32e6b4c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH] ada: musl support fixes
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] ada: musl support fixes
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index b5b8b573ea4..6fce40d1e98 100644
|
||||
index 55ff9b0f3d5..0fadf4e4b79 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1748,7 +1748,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1533,7 +1533,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,16 +23,16 @@ index b5b8b573ea4..6fce40d1e98 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2355,7 +2355,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
@@ -2083,7 +2083,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-osinte.adb<libgnarl/s-osinte__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2386,7 +2386,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2112,7 +2112,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -41,7 +41,7 @@ index b5b8b573ea4..6fce40d1e98 100644
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<libgnarl/a-intnam__linux.ads \
|
||||
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
|
||||
@@ -2597,7 +2597,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2305,7 +2305,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -49,8 +49,8 @@ index b5b8b573ea4..6fce40d1e98 100644
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2700,7 +2700,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
system.ads<libgnat/system-linux-ia64.ads
|
||||
@@ -2401,7 +2401,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -58,24 +58,24 @@ index b5b8b573ea4..6fce40d1e98 100644
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
system.ads<libgnat/system-linux-x86.ads
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 2e54e69643a..e7e6507e2e0 100644
|
||||
index 595abf87d65..00858c24f53 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -90,6 +90,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
+
|
||||
+#if defined (linux) || defined(__linux__)
|
||||
+#if defined (linux)
|
||||
+#define _GNU_SOURCE 1
|
||||
+#include <sched.h>
|
||||
+#endif
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3442,7 +3447,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3308,7 +3313,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -83,7 +83,7 @@ index 2e54e69643a..e7e6507e2e0 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3452,7 +3456,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3318,7 +3322,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -92,7 +92,7 @@ index 2e54e69643a..e7e6507e2e0 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3465,33 +3469,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3331,33 +3335,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -134,7 +134,7 @@ index 2e54e69643a..e7e6507e2e0 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3501,23 +3505,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3367,23 +3371,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -164,10 +164,10 @@ index 2e54e69643a..e7e6507e2e0 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 85997b9ba68..fd10e5b5589 100644
|
||||
index 311e240dfcc..1c4d0050103 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -325,13 +325,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
|
||||
|
||||
/* Routines for interface to required CPU set primitives */
|
||||
|
||||
@@ -186,10 +186,10 @@ index 85997b9ba68..fd10e5b5589 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index ec9db3a6a4c..6f92e50dd67 100644
|
||||
index af4417fab90..bab6bf3ca87 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1132,7 +1132,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1145,7 +1145,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -198,7 +198,7 @@ index ec9db3a6a4c..6f92e50dd67 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1146,7 +1146,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1159,7 +1159,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns)
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -207,7 +207,7 @@ index ec9db3a6a4c..6f92e50dd67 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1195,8 +1195,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1208,8 +1208,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -219,5 +219,5 @@ index ec9db3a6a4c..6f92e50dd67 100644
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From e30511caa0046a09e09d08e01541ee89ebbf56f3 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 17:58:08 +0200
|
||||
Subject: [PATCH] gcc-go: Use _off_t type instead of _loff_t
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Taken from Adélie Linux.
|
||||
---
|
||||
libgo/go/syscall/libcall_linux.go | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
|
||||
index 88286c07b6e..f8f5cfb5011 100644
|
||||
--- a/libgo/go/syscall/libcall_linux.go
|
||||
+++ b/libgo/go/syscall/libcall_linux.go
|
||||
@@ -206,19 +206,19 @@ func Gettid() (tid int) {
|
||||
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
|
||||
//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
|
||||
|
||||
-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
|
||||
-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
|
||||
+//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error)
|
||||
+//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
|
||||
- var lroff _loff_t
|
||||
- var plroff *_loff_t
|
||||
+ var lroff _off_t
|
||||
+ var plroff *_off_t
|
||||
if roff != nil {
|
||||
- lroff = _loff_t(*roff)
|
||||
+ lroff = _off_t(*roff)
|
||||
plroff = &lroff
|
||||
}
|
||||
- var lwoff _loff_t
|
||||
- var plwoff *_loff_t
|
||||
+ var lwoff _off_t
|
||||
+ var plwoff *_off_t
|
||||
if woff != nil {
|
||||
- lwoff = _loff_t(*woff)
|
||||
+ lwoff = _off_t(*woff)
|
||||
plwoff = &lwoff
|
||||
}
|
||||
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 25927f8106583ee594e7bcdf92dd1387e0fd024c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
gcc/config/i386/t-linux64 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
|
||||
index d288b093522..2949033aa04 100644
|
||||
--- a/gcc/config/i386/t-linux64
|
||||
+++ b/gcc/config/i386/t-linux64
|
||||
@@ -33,6 +33,6 @@
|
||||
comma=,
|
||||
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
||||
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
||||
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
|
||||
-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From dd4c21ab43314e9dd6853f4157c0b2f530b46a3e Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 17:58:21 +0200
|
||||
Subject: [PATCH] gcc-go: Don't include sys/user.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Taken from Adélie Linux.
|
||||
---
|
||||
libgo/sysinfo.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 0692fd41eb7..c8d987358d9 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -73,9 +73,6 @@
|
||||
#include <sys/times.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/un.h>
|
||||
-#if defined(HAVE_SYS_USER_H)
|
||||
-#include <sys/user.h>
|
||||
-#endif
|
||||
#if defined(HAVE_SYS_UTSNAME_H)
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
From 18bcf23cae4069ffe9d9f64e851193d29dd4814f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 3 Jan 2022 07:14:48 +0100
|
||||
Subject: [PATCH] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From the musl wiki [1]:
|
||||
|
||||
musl does not support sharing an include directory between archs
|
||||
[…], and thus is not compatible with GCC-style multilib. It is
|
||||
recommended that distributions build GCC with multilib disabled,
|
||||
and use library directories named lib, not lib64 or lib32.
|
||||
|
||||
For this reason, we patch existing GCC configuration files (gcc/config)
|
||||
to pin MULTILIB_OSDIRNAMES to lib, there is also a corresponding GCC
|
||||
upstream bug about this issue [2]. Avoiding the use of lib64 and lib32
|
||||
directories is a bit more difficult on the RISC-V architecture. This is
|
||||
due to the fact that the default RISC-V configuration does not only use
|
||||
the lib64 and lib32 directories but also subdirectories within these
|
||||
directories for different RISC-V ABIs (e.g. lp64d, lp64, …) [3].
|
||||
|
||||
This patch aligns the RISC-V configuration with other architectures by
|
||||
pinning MULTILIB_OSDIRNAMES to lib for rv64gc (our default RISC-V
|
||||
-march). Furthermore, this patch removes the ABI-specific startfile
|
||||
prefix spec. Since both of these impact the default LIBRARY_PATH [4]
|
||||
this patch thereby aligns the default RISC-V LIBRARY_PATH with that from
|
||||
other Alpine architectures and thereby fixes #13369 [5].
|
||||
|
||||
Incidentally, this also fixes gccgo on riscv64, as without this patch
|
||||
gccgo is otherwise not able to find the *.gox files for the Go standard
|
||||
library.
|
||||
|
||||
[1]: https://wiki.musl-libc.org/guidelines-for-distributions.html#Multilib/multi_arch
|
||||
[2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90077
|
||||
[3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103889#c14
|
||||
[4]: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.c;h=d4c8746b0aa322286decf92aa72a12f0a393b655;hb=HEAD#l9122
|
||||
[5]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13369
|
||||
---
|
||||
gcc/config/riscv/linux.h | 6 ------
|
||||
gcc/config/riscv/t-linux | 7 +++++--
|
||||
2 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index ee29979dd34..fe8a82d6702 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -71,9 +71,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{static:-static}}"
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
-
|
||||
-#define STARTFILE_PREFIX_SPEC \
|
||||
- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
|
||||
- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
|
||||
- "/lib/ " \
|
||||
- "/usr/lib/ "
|
||||
diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
|
||||
index 216d2776a18..1a8a863853e 100644
|
||||
--- a/gcc/config/riscv/t-linux
|
||||
+++ b/gcc/config/riscv/t-linux
|
||||
@@ -1,3 +1,6 @@
|
||||
-# Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
|
||||
-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
|
||||
+MULTILIB_OPTIONS := march=rv64gc
|
||||
+MULTILIB_DIRNAMES := rv64gc
|
||||
+
|
||||
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
|
||||
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
|
||||
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 9f85680c5e156d7ac95260e43bc06fe52468bb6e Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 17:59:22 +0200
|
||||
Subject: [PATCH] gcc-go: Fix ucontext_t on PPC64
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Taken from Adélie Linux.
|
||||
---
|
||||
libgo/runtime/go-signal.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
|
||||
index b429fdb2403..fd1c885f043 100644
|
||||
--- a/libgo/runtime/go-signal.c
|
||||
+++ b/libgo/runtime/go-signal.c
|
||||
@@ -224,7 +224,7 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused)))
|
||||
#elif defined(__alpha__) && defined(__linux__)
|
||||
ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc;
|
||||
#elif defined(__PPC__) && defined(__linux__)
|
||||
- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
|
||||
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32];
|
||||
#elif defined(__PPC__) && defined(_AIX)
|
||||
ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar;
|
||||
#elif defined(__aarch64__) && defined(__linux__)
|
||||
--
|
||||
2.29.2
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
From 8a42d93247c375f199f3079538d659f95b9ff2a0 Mon Sep 17 00:00:00 2001
|
||||
From e8162b88725980771aaf473353a7a684aa31e974 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 17:59:45 +0200
|
||||
Subject: [PATCH] gcc-go: Fix handling of signal 34 on musl
|
||||
@@ -39,5 +39,5 @@ index 11e4ec436bd..fe866eacb27 100644
|
||||
|
||||
if test "${GOOS}" = "aix"; then
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
+5
-30
@@ -1,43 +1,18 @@
|
||||
From 36c79820c1085590f272ef1afcad4744125d96d0 Mon Sep 17 00:00:00 2001
|
||||
From e52442cf9860963ce5d896436efaa032f9d03d86 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 18:33:49 +0200
|
||||
Date: Sun, 30 Aug 2020 18:01:03 +0200
|
||||
Subject: [PATCH] gcc-go: Use int64 type as offset argument for mmap
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Without this patch, Go run-time memory allocation fails on 32-bit architectures:
|
||||
|
||||
fatal error: runtime: cannot allocate memory
|
||||
runtime stack:
|
||||
runtime.dopanic__m
|
||||
:0
|
||||
runtime.throw
|
||||
:0
|
||||
:0
|
||||
:0
|
||||
runtime.systemstack
|
||||
:0
|
||||
runtime.addrRanges.init
|
||||
:0
|
||||
runtime.pageAlloc.init
|
||||
:0
|
||||
runtime.mheap.init
|
||||
:0
|
||||
runtime.schedinit
|
||||
:0
|
||||
:0
|
||||
:0
|
||||
|
||||
Taken from Adélie Linux [1].
|
||||
|
||||
[1]: https://git.adelielinux.org/adelie/packages/-/commit/63b5fb12c3d75e460799c672bbbdd5d29c3cc33c
|
||||
Taken from Adélie Linux.
|
||||
---
|
||||
libgo/go/runtime/mem_gccgo.go | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
|
||||
index fa3389d857e..57bed97c710 100644
|
||||
index ba38ebaa9ab..3c9e5ce9461 100644
|
||||
--- a/libgo/go/runtime/mem_gccgo.go
|
||||
+++ b/libgo/go/runtime/mem_gccgo.go
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
@@ -59,5 +34,5 @@ index fa3389d857e..57bed97c710 100644
|
||||
if uintptr(p) == _MAP_FAILED {
|
||||
return nil, errno()
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From d374c7d1d9f6fab654a5ece60a7ea74aeaf90970 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 18:02:28 +0200
|
||||
Subject: [PATCH] gcc-go: Fix st_{a,m,c}tim fields in generated sysinfo.go
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
There are more than one st_{a,m,c}tim fields in struct stat on time64 machines.
|
||||
|
||||
Run the Go-isation on all of them.
|
||||
|
||||
Taken from Adélie Linux.
|
||||
---
|
||||
libgo/mksysinfo.sh | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index bd2ba32cba1..972e2c379bc 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -510,9 +510,9 @@ fi | sed -e 's/type _stat64/type Stat_t/' \
|
||||
-e 's/st_size/Size/' \
|
||||
-e 's/st_blksize/Blksize/' \
|
||||
-e 's/st_blocks/Blocks/' \
|
||||
- -e 's/st_atim/Atim/' \
|
||||
- -e 's/st_mtim/Mtim/' \
|
||||
- -e 's/st_ctim/Ctim/' \
|
||||
+ -e 's/st_atim/Atim/g' \
|
||||
+ -e 's/st_mtim/Mtim/g' \
|
||||
+ -e 's/st_ctim/Ctim/g' \
|
||||
-e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \
|
||||
-e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \
|
||||
-e 's/\([^a-zA-Z0-9_]\)_st_timespec_t\([^a-zA-Z0-9_]\)/\1StTimespec\2/g' \
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From c205f79c18add13247a06cfd843f5eb44c4c3cb4 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 25 Nov 2021 01:47:03 +0000
|
||||
Subject: [PATCH] There are more than one st_{a,m,c}tim fields in struct stat
|
||||
on time64 machines.
|
||||
|
||||
Run the Go-isation on all of them.
|
||||
---
|
||||
libgo/mksysinfo.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index 0c52ea5d71a..6fef104cc1c 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -510,7 +510,7 @@ fi
|
||||
|
||||
# For historical reasons Go uses the suffix "timespec" instead of "tim" for
|
||||
# stat_t's time fields on NetBSD.
|
||||
-st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/'
|
||||
+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g'
|
||||
if test "${GOOS}" = "netbsd"; then
|
||||
st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e s/st_ctim/Ctimespec/'
|
||||
fi
|
||||
--
|
||||
2.35.1
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
From af64f915a4717036a7f1fe637308b455c94e0f1e Mon Sep 17 00:00:00 2001
|
||||
From 03365f764ffe09acbfaa08ede12c48d5cbafe37f Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 18:03:03 +0200
|
||||
Subject: [PATCH] gcc-go: signal 34 is special on musl libc
|
||||
@@ -12,7 +12,7 @@ Taken from Adélie Linux.
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go
|
||||
index 2eece687e35..e86490ce203 100644
|
||||
index c555712a03c..9e228580d37 100644
|
||||
--- a/libgo/go/runtime/signal_gccgo.go
|
||||
+++ b/libgo/go/runtime/signal_gccgo.go
|
||||
@@ -106,7 +106,7 @@ func getsig(i uint32) uintptr {
|
||||
@@ -25,5 +25,5 @@ index 2eece687e35..e86490ce203 100644
|
||||
}
|
||||
throw("sigaction read failure")
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 8f432a1e00956bc2fcb6242571860a69fb32131d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 30 Aug 2020 19:26:53 +0200
|
||||
Subject: [PATCH] gcc-go: Prefer _off_t over _off64_t
|
||||
|
||||
musl does not seem to have _off64_t.
|
||||
---
|
||||
libgo/mksysinfo.sh | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index 972e2c379bc..8d6da15f983 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -379,11 +379,7 @@ fi
|
||||
# Some basic types.
|
||||
echo 'type Size_t _size_t' >> ${OUT}
|
||||
echo "type Ssize_t _ssize_t" >> ${OUT}
|
||||
-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
|
||||
- echo "type Offset_t _off64_t" >> ${OUT}
|
||||
-else
|
||||
- echo "type Offset_t _off_t" >> ${OUT}
|
||||
-fi
|
||||
+echo "type Offset_t _off_t" >> ${OUT}
|
||||
echo "type Mode_t _mode_t" >> ${OUT}
|
||||
echo "type Pid_t _pid_t" >> ${OUT}
|
||||
echo "type Uid_t _uid_t" >> ${OUT}
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 6e41b6753af412388e9259fe791904146695e84e Mon Sep 17 00:00:00 2001
|
||||
From 8438932b8a20156459589e9d6b3fcf11989db0e8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 30 Aug 2020 19:27:51 +0200
|
||||
Subject: [PATCH] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
|
||||
index 38bf7a6b255..e50403b5a75 100644
|
||||
index 274ce01c0bf..92a540bdde9 100644
|
||||
--- a/libgo/runtime/proc.c
|
||||
+++ b/libgo/runtime/proc.c
|
||||
@@ -66,6 +66,10 @@ static void gscanstack(G*);
|
||||
@@ -23,5 +23,5 @@ index 38bf7a6b255..e50403b5a75 100644
|
||||
|
||||
static inline void
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From cc89c078ffc58a7f6675a60fbca24224effcb7e3 Mon Sep 17 00:00:00 2001
|
||||
From 31375289a4c1a0f32c97ae3d73ab950014729392 Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Mon, 31 Aug 2020 08:59:40 +0200
|
||||
Subject: [PATCH] gcc-go: link to libucontext
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] gcc-go: link to libucontext
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 426949aa91c..f97db1ef569 100644
|
||||
index 63627db68cf..c7f1f84d683 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -50331,7 +50331,7 @@ configure-target-libgo:
|
||||
@@ -48823,7 +48823,7 @@ configure-target-libgo:
|
||||
esac; \
|
||||
module_srcdir=libgo; \
|
||||
rm -f no-such-file || : ; \
|
||||
@@ -21,5 +21,5 @@ index 426949aa91c..f97db1ef569 100644
|
||||
--srcdir=$${topdir}/$$module_srcdir \
|
||||
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
From 3fb914ca83ac18287ee24aa75aba9149e35487ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 19 Apr 2021 07:21:41 +0200
|
||||
Subject: [PATCH] Use generic errstr.go implementation on musl
|
||||
|
||||
glibc provides two version of strerror_r() depending on a feature test
|
||||
macro. The first is the XSI-compliant version which returns an int, the
|
||||
second is GNU-specific and returns a char pointer.
|
||||
|
||||
Similarity, gcc's libgo provides two implementations of Errstr() both of
|
||||
which use strerror_r(). On Linux, it is assumed that the GNU-specific
|
||||
strerror_r version is used. However, musl only provides the
|
||||
XSI-compliant version of strerror_r. This patch enables the generic
|
||||
Errstr() implementation which also uses the XSI-compliant version of
|
||||
strerror_r.
|
||||
---
|
||||
libgo/go/syscall/errstr.go | 1 -
|
||||
libgo/go/syscall/errstr_glibc.go | 2 +-
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
|
||||
index 6c2441d364d..8f7c5538163 100644
|
||||
--- a/libgo/go/syscall/errstr.go
|
||||
+++ b/libgo/go/syscall/errstr.go
|
||||
@@ -5,7 +5,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !hurd
|
||||
-// +build !linux
|
||||
|
||||
package syscall
|
||||
|
||||
diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go
|
||||
index 5b19e6f202d..8dc60172186 100644
|
||||
--- a/libgo/go/syscall/errstr_glibc.go
|
||||
+++ b/libgo/go/syscall/errstr_glibc.go
|
||||
@@ -7,7 +7,7 @@
|
||||
// We use this rather than errstr.go because on GNU/Linux sterror_r
|
||||
// returns a pointer to the error message, and may not use buf at all.
|
||||
|
||||
-// +build hurd linux
|
||||
+// +build hurd !linux
|
||||
|
||||
package syscall
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 84fb75f5e30bfde3a076564f566d2f85caf5e6dd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 31 Aug 2020 20:26:56 +0200
|
||||
Subject: [PATCH] gcc-go: Disable printing of unaccessible ppc64 struct members
|
||||
|
||||
These struct members do not seem to exist on musl.
|
||||
---
|
||||
libgo/runtime/go-signal.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
|
||||
index fd1c885f043..e845e453332 100644
|
||||
--- a/libgo/runtime/go-signal.c
|
||||
+++ b/libgo/runtime/go-signal.c
|
||||
@@ -333,7 +333,7 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u
|
||||
runtime_printf("sp %X\n", m->sc_regs[30]);
|
||||
runtime_printf("pc %X\n", m->sc_pc);
|
||||
}
|
||||
-#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__)
|
||||
+#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__GLIBC__)
|
||||
{
|
||||
mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
|
||||
int i;
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,275 +0,0 @@
|
||||
From 52ce9c86c0c89ae45e0d08cc232682e1811aa8f2 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 16:07:26 +0000
|
||||
Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
gcc/config.in | 6 ++++++
|
||||
gcc/config/gnu-user.h | 12 +++++++++++-
|
||||
gcc/configure | 34 +++++++++++++++++++++++++++++++---
|
||||
gcc/configure.ac | 22 +++++++++++++++++++++-
|
||||
gcc/doc/install.texi | 8 ++++++++
|
||||
gcc/doc/tm.texi | 8 +++++++-
|
||||
gcc/doc/tm.texi.in | 8 +++++++-
|
||||
gcc/gcc.c | 12 +++++++++++-
|
||||
9 files changed, 103 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index f97db1ef569..7e577ed3dbb 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -222,6 +222,7 @@ HOST_EXPORTS = \
|
||||
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
|
||||
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
|
||||
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
|
||||
+ TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; \
|
||||
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
|
||||
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
|
||||
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 059c818c895..2a560417440 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -106,6 +106,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
+/* Define if libatomic should always be linked. */
|
||||
+#ifndef USED_FOR_TARGET
|
||||
+#undef ENABLE_AUTOLINK_LIBATOMIC
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* Define to 1 to specify that we are using the BID decimal floating point
|
||||
format instead of DPD */
|
||||
#ifndef USED_FOR_TARGET
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 902378e1bad..daf7727a01a 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
|
||||
#endif
|
||||
|
||||
+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
|
||||
+# ifdef LD_AS_NEEDED_OPTION
|
||||
+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
|
||||
+# else
|
||||
+# define LINK_LIBATOMIC_SPEC "-latomic"
|
||||
+# endif
|
||||
+#elif !defined(LINK_LIBATOMIC_SPEC)
|
||||
+# define LINK_LIBATOMIC_SPEC ""
|
||||
+#endif
|
||||
+
|
||||
#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
|
||||
- "%{static|static-pie:--start-group} %G %{!nolibc:%L} \
|
||||
+ "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L} \
|
||||
%{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 592e81e40f6..8672298f23f 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -978,6 +978,7 @@ with_changes_root_url
|
||||
enable_languages
|
||||
with_multilib_list
|
||||
with_multilib_generator
|
||||
+enable_autolink_libatomic
|
||||
with_zstd
|
||||
with_zstd_include
|
||||
with_zstd_lib
|
||||
@@ -1707,6 +1708,9 @@ Optional Features:
|
||||
--disable-shared don't provide a shared libgcc
|
||||
--disable-gcov don't provide libgcov and related host tools
|
||||
--enable-languages=LIST specify which front-ends to build
|
||||
+ --enable-autolink-libatomic
|
||||
+ enable automatic linking of libatomic (ignored if
|
||||
+ not built)
|
||||
--disable-rpath do not hardcode runtime library paths
|
||||
--enable-sjlj-exceptions
|
||||
arrange to use setjmp/longjmp exception handling
|
||||
@@ -8070,7 +8074,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
-
|
||||
# Check whether --with-multilib-generator was given.
|
||||
if test "${with_multilib_generator+set}" = set; then :
|
||||
withval=$with_multilib_generator; :
|
||||
@@ -8078,6 +8081,32 @@ else
|
||||
with_multilib_generator=default
|
||||
fi
|
||||
|
||||
+# If libatomic is available, whether it should be linked automatically
|
||||
+# Check whether --enable-autolink-libatomic was given.
|
||||
+if test "${enable_autolink_libatomic+set}" = set; then :
|
||||
+ enableval=$enable_autolink_libatomic;
|
||||
+ case $enable_autolink_libatomic in
|
||||
+ yes | no) ;;
|
||||
+ *) as_fn_error $? "'$enable_autolink_libatomic' is an invalid value for
|
||||
+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
|
||||
+ esac
|
||||
+
|
||||
+else
|
||||
+ enable_autolink_libatomic=''
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+if test x$enable_autolink_libatomic = xyes; then
|
||||
+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then
|
||||
+
|
||||
+$as_echo "#define ENABLE_AUTOLINK_LIBATOMIC 1" >>confdefs.h
|
||||
+
|
||||
+ else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&5
|
||||
+$as_echo "$as_me: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&2;}
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
@@ -19501,7 +19530,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 19501 "configure"
|
||||
+#line 19158 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -34068,4 +34097,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
-
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 1577529ffb7..e96691f69ba 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -1149,6 +1149,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
:,
|
||||
with_multilib_generator=default)
|
||||
|
||||
+# If libatomic is available, whether it should be linked automatically
|
||||
+AC_ARG_ENABLE(autolink-libatomic,
|
||||
+[AS_HELP_STRING([--enable-autolink-libatomic],
|
||||
+ [enable automatic linking of libatomic (ignored if not built)])],
|
||||
+[
|
||||
+ case $enable_autolink_libatomic in
|
||||
+ yes | no) ;;
|
||||
+ *) AC_MSG_ERROR(['$enable_autolink_libatomic' is an invalid value for
|
||||
+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'.]) ;;
|
||||
+ esac
|
||||
+], [enable_autolink_libatomic=''])
|
||||
+
|
||||
+if test x$enable_autolink_libatomic = xyes; then
|
||||
+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then
|
||||
+ AC_DEFINE(ENABLE_AUTOLINK_LIBATOMIC, 1,
|
||||
+ [Define if libatomic should always be linked.])
|
||||
+ else
|
||||
+ AC_MSG_WARN([libatomic is not build for this target, --enable-autolink-libatomic ignored])
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
@@ -7729,4 +7750,3 @@ done
|
||||
],
|
||||
[subdirs='$subdirs'])
|
||||
AC_OUTPUT
|
||||
-
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index 4c38244ae58..4a544e6a4ee 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2213,6 +2213,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
environments. Enabled by default, and may be disabled using
|
||||
@option{--disable-canonical-system-headers}.
|
||||
|
||||
+@item --enable-autolink-libatomic
|
||||
+@itemx --disable-autolink-libatomic
|
||||
+Tell GCC that it should automatically link libatomic; if supported by
|
||||
+the linker, the file is only linked as needed. This flag is ignored
|
||||
+when libatomic is not built. Note that this conigure flag is in particular
|
||||
+useful when building an offloading-target compiler; as for those, a
|
||||
+user had to specify @code{-foffload=target=-latomic} otherwise.
|
||||
+
|
||||
@item --with-glibc-version=@var{major}.@var{minor}
|
||||
Tell GCC that when the GNU C Library (glibc) is used on the target it
|
||||
will be version @var{major}.@var{minor} or later. Normally this can
|
||||
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
|
||||
index b370bc76b25..acc78273983 100644
|
||||
--- a/gcc/doc/tm.texi
|
||||
+++ b/gcc/doc/tm.texi
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
|
||||
@defmac LINK_GCC_C_SEQUENCE_SPEC
|
||||
The sequence in which libgcc and libc are specified to the linker.
|
||||
-By default this is @code{%G %L %G}.
|
||||
+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}.
|
||||
+@end defmac
|
||||
+
|
||||
+@defmac LINK_LIBATOMIC_SPEC
|
||||
+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link
|
||||
+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC}
|
||||
+is set.
|
||||
@end defmac
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
|
||||
index 2974dae2701..80e003a38ce 100644
|
||||
--- a/gcc/doc/tm.texi.in
|
||||
+++ b/gcc/doc/tm.texi.in
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
|
||||
@defmac LINK_GCC_C_SEQUENCE_SPEC
|
||||
The sequence in which libgcc and libc are specified to the linker.
|
||||
-By default this is @code{%G %L %G}.
|
||||
+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}.
|
||||
+@end defmac
|
||||
+
|
||||
+@defmac LINK_LIBATOMIC_SPEC
|
||||
+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link
|
||||
+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC}
|
||||
+is set.
|
||||
@end defmac
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/gcc.c b/gcc/gcc.c
|
||||
index 22dbbf85850..90aa576037a 100644
|
||||
--- a/gcc/gcc.c
|
||||
+++ b/gcc/gcc.c
|
||||
@@ -980,13 +980,23 @@ proper position among the other output files. */
|
||||
# define ASM_DEBUG_OPTION_SPEC ""
|
||||
#endif
|
||||
|
||||
+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
|
||||
+# ifdef LD_AS_NEEDED_OPTION
|
||||
+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
|
||||
+# else
|
||||
+# define LINK_LIBATOMIC_SPEC "-latomic"
|
||||
+# endif
|
||||
+#elif !defined(LINK_LIBATOMIC_SPEC)
|
||||
+# define LINK_LIBATOMIC_SPEC ""
|
||||
+#endif
|
||||
+
|
||||
/* Here is the spec for running the linker, after compiling all files. */
|
||||
|
||||
/* This is overridable by the target in case they need to specify the
|
||||
-lgcc and -lc order specially, yet not require them to override all
|
||||
of LINK_COMMAND_SPEC. */
|
||||
#ifndef LINK_GCC_C_SEQUENCE_SPEC
|
||||
-#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
+#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L %G}"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEFAULT_SSP
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From a3ed90c4579725a21f3375a8fe0abb626be7c250 Mon Sep 17 00:00:00 2001
|
||||
From: Geod24 <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 16 Nov 2020 18:40:46 +0100
|
||||
Subject: [PATCH] CRuntime_Musl: Support v1.2.0 for 32 bits
|
||||
|
||||
As explained in the comment, `time_t` on Musl is now always 64 bits,
|
||||
but used to be 32 bits on 32 bits systems.
|
||||
---
|
||||
.../libdruntime/core/sys/posix/sys/types.d | 25 ++++++++++++++++++-
|
||||
1 file changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/types.d b/libphobos/libdruntime/core/sys/posix/sys/types.d
|
||||
index 451c8b4fccc..ca654fbe424 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/types.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/types.d
|
||||
@@ -139,10 +139,33 @@ else version (CRuntime_Musl)
|
||||
alias int pid_t;
|
||||
alias uint uid_t;
|
||||
alias uint gid_t;
|
||||
+
|
||||
+ /**
|
||||
+ * Musl versions before v1.2.0 (up to v1.1.24) had different
|
||||
+ * definitions for `time_t` for 32 bits.
|
||||
+ * This was changed to always be 64 bits in v1.2.0:
|
||||
+ * https://musl.libc.org/time64.html
|
||||
+ * This change was only for 32 bits system and
|
||||
+ * didn't affect 64 bits systems
|
||||
+ *
|
||||
+ * To check previous definitions, `grep` for `time_t` in `arch/`,
|
||||
+ * and the result should be (in v1.1.24):
|
||||
+ * ---
|
||||
+ * // arch/riscv64/bits/alltypes.h.in:20:TYPEDEF long time_t;
|
||||
+ * // arch/s390x/bits/alltypes.h.in:17:TYPEDEF long time_t;
|
||||
+ * // arch/sh/bits/alltypes.h.in:21:TYPEDEF long time_t;
|
||||
+ * ---
|
||||
+ *
|
||||
+ * In order to be compatible with old versions of Musl,
|
||||
+ * one can recompile druntime with `CRuntime_Musl_Pre_Time64`.
|
||||
+ */
|
||||
version (D_X32)
|
||||
alias long time_t;
|
||||
- else
|
||||
+ else version (CRuntime_Musl_Pre_Time64)
|
||||
alias c_long time_t;
|
||||
+ else
|
||||
+ alias long time_t;
|
||||
+
|
||||
alias c_long clock_t;
|
||||
alias c_ulong pthread_t;
|
||||
version (D_LP64)
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
From 5010fa237897bca92291ba8835123125d4af933a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 29 Aug 2021 09:45:27 +0200
|
||||
Subject: [PATCH] configure: fix detection of atomic builtins in libatomic
|
||||
configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
default) causes the libatomic configure script to incorrectly detect
|
||||
which builtins are available on riscv64. This then causes incorrect code
|
||||
generation for libatomic since it assumes compiler builtins to be
|
||||
available which are not actually available on riscv64.
|
||||
|
||||
This commit fixes this issue by disabling linking of libatomic configure
|
||||
test code entirely, thereby preventing linking against libatomic.
|
||||
|
||||
See:
|
||||
|
||||
* https://gitlab.alpinelinux.org/alpine/aports/-/issues/12948
|
||||
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996#c6
|
||||
---
|
||||
libatomic/configure.tgt | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
|
||||
index 670b0d72cfe..38c2cd9345f 100644
|
||||
--- a/libatomic/configure.tgt
|
||||
+++ b/libatomic/configure.tgt
|
||||
@@ -30,6 +30,26 @@
|
||||
# on ${target_cpu}. For example to allow proper use of multilibs.
|
||||
configure_tgt_pre_target_cpu_XCFLAGS="${XCFLAGS}"
|
||||
|
||||
+# The libatomic configure script performs several checks to determine
|
||||
+# whether builtins for atomic operations are available. When compiling
|
||||
+# with --enable-autolink-libatomic the test code compiled by the
|
||||
+# configure script is also linked against libatomic. This causes it
|
||||
+# to think that builtins are available, even if there are not, since
|
||||
+# the tested symbols are provided by libatomic.
|
||||
+#
|
||||
+# This is a hack to ensure that we don't link against libatomic by not
|
||||
+# linking any configure test code at all when --enable-autolink-libatomic
|
||||
+# is given.
|
||||
+#
|
||||
+# See:
|
||||
+#
|
||||
+# * https://gitlab.alpinelinux.org/alpine/aports/-/issues/12817
|
||||
+# * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996#c4
|
||||
+#
|
||||
+if test x$enable_autolink_libatomic = xyes; then
|
||||
+ gcc_no_link=yes
|
||||
+fi
|
||||
+
|
||||
case "${target_cpu}" in
|
||||
alpha*)
|
||||
# fenv.c needs this option to generate inexact exceptions.
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
From 2d924c522dde7426afbb8096d9301b17d0e73121 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 28 Nov 2021 00:54:37 +0100
|
||||
Subject: [PATCH] libgo: Recognize off64_t and loff_t definitions of musl libc
|
||||
|
||||
Without this patch, both off64_t and loff_t are not recognized by
|
||||
-fdump-go-spec which causes a variety Go-related compilation errors on
|
||||
musl libc since the gcc-go frontend expects both off64_t and loff_t to
|
||||
be present.
|
||||
|
||||
Also make sure that autoconf recognizes support for loff_t on musl, by
|
||||
compiling the relevant feature test code with -D_GNU_SOURCE and making
|
||||
it include fcntl.h which defines loff_t on musl.
|
||||
---
|
||||
libgo/configure | 4 +++-
|
||||
libgo/configure.ac | 4 +++-
|
||||
libgo/sysinfo.c | 21 +++++++++++++++++++++
|
||||
3 files changed, 27 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgo/configure b/libgo/configure
|
||||
index 70f64c974fd..69d15839e8c 100755
|
||||
--- a/libgo/configure
|
||||
+++ b/libgo/configure
|
||||
@@ -15546,7 +15546,9 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
|
||||
+CFLAGS_hold=$CFLAGS
|
||||
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
||||
+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "#include <fcntl.h>"
|
||||
if test "x$ac_cv_type_loff_t" = xyes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
diff --git a/libgo/configure.ac b/libgo/configure.ac
|
||||
index ebab9d9de3e..a3d9d309aba 100644
|
||||
--- a/libgo/configure.ac
|
||||
+++ b/libgo/configure.ac
|
||||
@@ -602,7 +602,9 @@ AC_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat open64 openat pipe2 removexattr renameat setxattr sync_file_range splice syscall tee unlinkat unshare utimensat)
|
||||
AC_TYPE_OFF_T
|
||||
-AC_CHECK_TYPES([loff_t])
|
||||
+CFLAGS_hold=$CFLAGS
|
||||
+CFLAGS="$CFLAGS -D_GNU_SOURCE" # musl does not define loff_t without this
|
||||
+AC_CHECK_TYPES([loff_t], [], [], [[#include <fcntl.h>]])
|
||||
|
||||
LIBS_hold="$LIBS"
|
||||
LIBS="$LIBS -lm"
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 8ce061e2f5f..b85add15a7b 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -343,6 +343,27 @@ enum {
|
||||
#endif
|
||||
};
|
||||
|
||||
+// musl libc has both off64_t and loff_t. However, both of these types
|
||||
+// are defined as CPP macros, not as C typedefs. Unfortunately, the GCC
|
||||
+// -fdump-go-spec option, which is responsible for generating type
|
||||
+// definitions for Go based on this file, only recognizes types defined
|
||||
+// through typedefs.
|
||||
+//
|
||||
+// For this reason, we check here if either off64_t or loff_t are
|
||||
+// defined as CPP macros and if so, we redefine them using a C typedef.
|
||||
+#if defined(HAVE_OFF64_T) && defined(off64_t)
|
||||
+typedef off64_t __musl_off64_t;
|
||||
+#undef off64_t
|
||||
+typedef __musl_off64_t off64_t;
|
||||
+#endif
|
||||
+
|
||||
+// See comment regarding musl libc above.
|
||||
+#if defined(HAVE_LOFF_T) && defined(loff_t)
|
||||
+typedef loff_t __musl_loff_t;
|
||||
+#undef loff_t
|
||||
+typedef __musl_loff_t loff_t;
|
||||
+#endif
|
||||
+
|
||||
// SIOCGIFMTU can't be added in the above enum as it might
|
||||
// be signed in some OSes.
|
||||
#ifdef SIOCGIFMTU
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
From 72f32e3383129ad139df76d9a063fac9b03079b1 Mon Sep 17 00:00:00 2001
|
||||
From: Alex McGrath <amk@amk.ie>
|
||||
Date: Wed, 13 Oct 2021 23:24:27 +0100
|
||||
Subject: [PATCH] Fix attempt to use poisoned calloc error in libgccjit
|
||||
|
||||
This moves usages of pthread.h to above any usage of system.h as it
|
||||
included #pragma GCC poison calloc
|
||||
---
|
||||
gcc/jit/jit-playback.c | 4 ++--
|
||||
gcc/jit/jit-recording.c | 4 ++--
|
||||
gcc/jit/libgccjit.c | 3 ++-
|
||||
3 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
|
||||
index cee9daa8220..a5600084933 100644
|
||||
--- a/gcc/jit/jit-playback.c
|
||||
+++ b/gcc/jit/jit-playback.c
|
||||
@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
+#include <pthread.h>
|
||||
+
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "diagnostic.h"
|
||||
#include "stmt.h"
|
||||
|
||||
-#include <pthread.h>
|
||||
-
|
||||
#include "jit-playback.h"
|
||||
#include "jit-result.h"
|
||||
#include "jit-builtins.h"
|
||||
diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
|
||||
index 117ff70114c..d2634a546b1 100644
|
||||
--- a/gcc/jit/jit-recording.c
|
||||
+++ b/gcc/jit/jit-recording.c
|
||||
@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
+#include <pthread.h>
|
||||
+
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "pretty-print.h"
|
||||
#include "toplev.h"
|
||||
|
||||
-#include <pthread.h>
|
||||
-
|
||||
#include "jit-builtins.h"
|
||||
#include "jit-recording.h"
|
||||
#include "jit-playback.h"
|
||||
diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
|
||||
index 0cc650f9810..2f44481eeb0 100644
|
||||
--- a/gcc/jit/libgccjit.c
|
||||
+++ b/gcc/jit/libgccjit.c
|
||||
@@ -18,13 +18,14 @@ You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
+#include <pthread.h>
|
||||
+
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "coretypes.h"
|
||||
#include "timevar.h"
|
||||
#include "typed-splay-tree.h"
|
||||
#include "cppbuiltin.h"
|
||||
-#include <pthread.h>
|
||||
|
||||
#include "libgccjit.h"
|
||||
#include "jit-recording.h"
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
From aeef0ee2aac43d89ae26c6a3559aae4f8a1d53da Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Thu, 25 Nov 2021 17:44:04 +0100
|
||||
Subject: [PATCH] stddef.h: add support for musl typedef macro guards
|
||||
|
||||
The stddef.h header checks/sets various hardcoded toolchain/os specific
|
||||
macro guards to prevent redefining types such as ptrdiff_t, wchar_t, or
|
||||
size_t. However, without this patch, the file does not check/set the
|
||||
typedef macro guards for musl libc. This causes types such as size_t to
|
||||
be defined twice for files which include both musl's stddef.h as well as
|
||||
GCC's ginclude/stddef.h. This is, for example, the case for
|
||||
libgo/sysinfo.c. If libgo/sysinfo.c has multiple typedefs for size_t
|
||||
this confuses -fdump-go-spec and causes size_t not to be included in the
|
||||
generated type definitions thereby causing a gcc-go compilation failure
|
||||
on musl with the following error message:
|
||||
|
||||
sysinfo.go:7765:13: error: use of undefined type '_size_t'
|
||||
7765 | type Size_t _size_t
|
||||
| ^
|
||||
libcall_posix.go:49:35: error: non-integer len argument in make
|
||||
49 | b := make([]byte, len)
|
||||
|
|
||||
|
||||
This commit fixes this issue by ensuring that ptrdiff_t, wchar_t, and size_t
|
||||
are only defined once in the pre-processed libgo/sysinfo.c file by enhancing
|
||||
gcc/ginclude/stddef.h with musl-specific typedef macro guards.
|
||||
---
|
||||
gcc/ginclude/stddef.h | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
|
||||
index 66619fe43b1..50d710a5ab9 100644
|
||||
--- a/gcc/ginclude/stddef.h
|
||||
+++ b/gcc/ginclude/stddef.h
|
||||
@@ -128,6 +128,7 @@ _TYPE_wchar_t;
|
||||
#ifndef ___int_ptrdiff_t_h
|
||||
#ifndef _GCC_PTRDIFF_T
|
||||
#ifndef _PTRDIFF_T_DECLARED /* DragonFly */
|
||||
+#ifndef __DEFINED_ptrdiff_t /* musl libc */
|
||||
#define _PTRDIFF_T
|
||||
#define _T_PTRDIFF_
|
||||
#define _T_PTRDIFF
|
||||
@@ -137,10 +138,12 @@ _TYPE_wchar_t;
|
||||
#define ___int_ptrdiff_t_h
|
||||
#define _GCC_PTRDIFF_T
|
||||
#define _PTRDIFF_T_DECLARED
|
||||
+#define __DEFINED_ptrdiff_t
|
||||
#ifndef __PTRDIFF_TYPE__
|
||||
#define __PTRDIFF_TYPE__ long int
|
||||
#endif
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
+#endif /* __DEFINED_ptrdiff_t */
|
||||
#endif /* _PTRDIFF_T_DECLARED */
|
||||
#endif /* _GCC_PTRDIFF_T */
|
||||
#endif /* ___int_ptrdiff_t_h */
|
||||
@@ -174,6 +177,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#ifndef _SIZE_T_DEFINED
|
||||
#ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
|
||||
#ifndef _SIZE_T_DECLARED /* FreeBSD 5 */
|
||||
+#ifndef __DEFINED_size_t /* musl libc */
|
||||
#ifndef ___int_size_t_h
|
||||
#ifndef _GCC_SIZE_T
|
||||
#ifndef _SIZET_
|
||||
@@ -191,6 +195,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#define _SIZE_T_DEFINED
|
||||
#define _BSD_SIZE_T_DEFINED_ /* Darwin */
|
||||
#define _SIZE_T_DECLARED /* FreeBSD 5 */
|
||||
+#define __DEFINED_size_t /* musl libc */
|
||||
#define ___int_size_t_h
|
||||
#define _GCC_SIZE_T
|
||||
#define _SIZET_
|
||||
@@ -215,6 +220,7 @@ typedef long ssize_t;
|
||||
#endif /* _SIZET_ */
|
||||
#endif /* _GCC_SIZE_T */
|
||||
#endif /* ___int_size_t_h */
|
||||
+#endif /* __DEFINED_size_t */
|
||||
#endif /* _SIZE_T_DECLARED */
|
||||
#endif /* _BSD_SIZE_T_DEFINED_ */
|
||||
#endif /* _SIZE_T_DEFINED */
|
||||
@@ -251,6 +257,7 @@ typedef long ssize_t;
|
||||
#ifndef _BSD_WCHAR_T_DEFINED_ /* Darwin */
|
||||
#ifndef _BSD_RUNE_T_DEFINED_ /* Darwin */
|
||||
#ifndef _WCHAR_T_DECLARED /* FreeBSD 5 */
|
||||
+#ifndef __DEFINED_wchar_t /* musl libc */
|
||||
#ifndef _WCHAR_T_DEFINED_
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
#ifndef _WCHAR_T_H
|
||||
@@ -272,6 +279,7 @@ typedef long ssize_t;
|
||||
#define __INT_WCHAR_T_H
|
||||
#define _GCC_WCHAR_T
|
||||
#define _WCHAR_T_DECLARED
|
||||
+#define __DEFINED_wchar_t
|
||||
|
||||
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
|
||||
instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
|
||||
@@ -326,6 +334,7 @@ typedef __WCHAR_TYPE__ wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
+#endif /* __DEFINED_wchar_t */
|
||||
#endif /* _WCHAR_T_DECLARED */
|
||||
#endif /* _BSD_RUNE_T_DEFINED_ */
|
||||
#endif
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From 353c8abdc34a294c89c24423ef0c4182189117f6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren@soeren-tempel.net>
|
||||
Date: Sun, 2 Jan 2022 01:07:03 +0100
|
||||
Subject: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Both glibc and musl libc declare pt_regs as an incomplete type. This
|
||||
type has to be completed by inclusion of another header. On Linux, the
|
||||
asm/ptrace.h header file provides this type definition. Without
|
||||
including this header file, it is not possible to access the regs member
|
||||
of the mcontext_t struct as done in libgo/runtime/go-signal.c. On glibc,
|
||||
other headers (e.g. sys/user.h) include asm/ptrace.h but on musl
|
||||
asm/ptrace.h is not included by other headers and thus the
|
||||
aforementioned files do not compile without an explicit include of
|
||||
asm/ptrace.h:
|
||||
|
||||
libgo/runtime/go-signal.c: In function 'getSiginfo':
|
||||
libgo/runtime/go-signal.c:227:63: error: invalid use of undefined type 'struct pt_regs'
|
||||
227 | ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
|
||||
|
|
||||
|
||||
Instead of including the asm/ptrace.h header conditionally on PowerPC
|
||||
only it would alternatively also be possible to include it
|
||||
unconditionally.
|
||||
|
||||
See also:
|
||||
|
||||
* https://git.musl-libc.org/cgit/musl/commit/?id=c2518a8efb6507f1b41c3b12e03b06f8f2317a1f
|
||||
* https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d57cb31910ca5c200e4172276749a7f8bd17ae3c
|
||||
* https://github.com/kaniini/libucontext/issues/36
|
||||
|
||||
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
|
||||
---
|
||||
libgo/runtime/go-signal.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
|
||||
index d30d1603adc..fc01e04e4a1 100644
|
||||
--- a/libgo/runtime/go-signal.c
|
||||
+++ b/libgo/runtime/go-signal.c
|
||||
@@ -10,6 +10,12 @@
|
||||
#include <sys/time.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
+// On PowerPC, ucontext.h uses a pt_regs struct as an incomplete
|
||||
+// type. This type must be completed by including asm/ptrace.h.
|
||||
+#ifdef __PPC__
|
||||
+#include <asm/ptrace.h>
|
||||
+#endif
|
||||
+
|
||||
#include "runtime.h"
|
||||
|
||||
#ifndef SA_RESTART
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
From 2c6bf28619c9b3bf713f7f5319c5d750a6c297ae Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren@soeren-tempel.net>
|
||||
Date: Fri, 21 Jan 2022 19:22:46 +0000
|
||||
Subject: [PATCH] Disable -fsplit-stack support on non-glibc targets
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The -fsplit-stack option requires the pthread_t TCB definition in the
|
||||
libc to provide certain struct fields at specific hardcoded offsets. As
|
||||
far as I know, only glibc provides these fields at the required offsets.
|
||||
Most notably, musl libc does not have these fields. However, since gcc
|
||||
accesses the fields using a fixed offset, this does not cause a
|
||||
compile-time error, but instead results in a silent memory corruption at
|
||||
run-time with musl libc. For example, on s390x libgcc's
|
||||
__stack_split_initialize CTOR will overwrite the cancel field in the
|
||||
pthread_t TCB on musl.
|
||||
|
||||
The -fsplit-stack option is used within the gcc code base itself by
|
||||
gcc-go (if available). On musl-based systems with split-stack support
|
||||
(i.e. s390x or x86) this causes Go programs compiled with gcc-go to
|
||||
misbehave at run-time.
|
||||
|
||||
This patch fixes gcc-go on musl by disabling -fsplit-stack in gcc itself
|
||||
since it is not supported on non-glibc targets anyhow. This is achieved
|
||||
by checking if gcc targets a glibc-based system. This check has been
|
||||
added for x86 and s390x, the rs6000 config already checks for
|
||||
TARGET_GLIBC_MAJOR. Other architectures do not have split-stack
|
||||
support. With this patch applied, the gcc-go configure script will
|
||||
detect that -fsplit-stack support is not available and will not use it.
|
||||
|
||||
See https://www.openwall.com/lists/musl/2012/10/16/12
|
||||
|
||||
This patch was written under the assumption that glibc is the only libc
|
||||
implementation which supports the required fields at the required
|
||||
offsets in the pthread_t TCB. The patch has been tested on Alpine Linux
|
||||
Edge on the s390x and x86 architectures by bootstrapping Google's Go
|
||||
implementation with gcc-go.
|
||||
|
||||
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* common/config/s390/s390-common.c (s390_supports_split_stack):
|
||||
Only support split-stack on glibc targets.
|
||||
* config/i386/gnu-user-common.h (STACK_CHECK_STATIC_BUILTIN): Ditto.
|
||||
* config/i386/gnu.h (defined): Ditto.
|
||||
---
|
||||
gcc/common/config/s390/s390-common.c | 14 ++++++++++----
|
||||
gcc/config/i386/gnu-user-common.h | 5 +++--
|
||||
gcc/config/i386/gnu.h | 5 ++++-
|
||||
3 files changed, 17 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gcc/common/config/s390/s390-common.c b/gcc/common/config/s390/s390-common.c
|
||||
index b6bc8501742..8c1e590322d 100644
|
||||
--- a/gcc/common/config/s390/s390-common.c
|
||||
+++ b/gcc/common/config/s390/s390-common.c
|
||||
@@ -116,13 +116,19 @@ s390_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
|
||||
|
||||
/* -fsplit-stack uses a field in the TCB, available with glibc-2.23.
|
||||
We don't verify it, since earlier versions just have padding at
|
||||
- its place, which works just as well. */
|
||||
+ its place, which works just as well. For other libc implementations
|
||||
+ we disable the feature entirely to avoid corrupting the TCB. */
|
||||
|
||||
static bool
|
||||
-s390_supports_split_stack (bool report ATTRIBUTE_UNUSED,
|
||||
- struct gcc_options *opts ATTRIBUTE_UNUSED)
|
||||
+s390_supports_split_stack (bool report,
|
||||
+ struct gcc_options *opts)
|
||||
{
|
||||
- return true;
|
||||
+ if (opts->x_linux_libc == LIBC_GLIBC)
|
||||
+ return true;
|
||||
+
|
||||
+ if (report)
|
||||
+ error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
|
||||
+ return false;
|
||||
}
|
||||
|
||||
#undef TARGET_DEFAULT_TARGET_FLAGS
|
||||
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
|
||||
index 00226f5a455..6e13315b5a3 100644
|
||||
--- a/gcc/config/i386/gnu-user-common.h
|
||||
+++ b/gcc/config/i386/gnu-user-common.h
|
||||
@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define STACK_CHECK_STATIC_BUILTIN 1
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives and
|
||||
+ targets glibc. */
|
||||
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE && OPTION_GLIBC
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
|
||||
index 25fbc07f58c..afd3e8e8841 100644
|
||||
--- a/gcc/config/i386/gnu.h
|
||||
+++ b/gcc/config/i386/gnu.h
|
||||
@@ -35,7 +35,10 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
|
||||
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
|
||||
#endif
|
||||
|
||||
-#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
+/* -fsplit-stack uses a field in the TCB at a fixed offset. This
|
||||
+ field is only available for glibc. Disable -fsplit-stack for
|
||||
+ other libc implementations to avoid silent TCB corruptions. */
|
||||
+#if defined (TARGET_LIBC_PROVIDES_SSP) && OPTION_GLIBC
|
||||
|
||||
/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
|
||||
#define TARGET_THREAD_SSP_OFFSET 0x14
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
From 4ea687132408a7c662706c4a7eb3c61b7773d735 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Fri, 21 Jan 2022 13:24:00 -0800
|
||||
Subject: [PATCH] x86: Properly disable -fsplit-stack support on non-glibc
|
||||
targets
|
||||
|
||||
Revert x86 changes in
|
||||
|
||||
commit c163647ffbc9a20c8feb6e079dbecccfe016c82e
|
||||
Author: Soren Tempel <soeren@soeren-tempel.net>
|
||||
Date: Fri Jan 21 19:22:46 2022 +0000
|
||||
|
||||
Disable -fsplit-stack support on non-glibc targets
|
||||
|
||||
and change ix86_supports_split_stack to return true only on glibc.
|
||||
|
||||
PR bootstrap/104170
|
||||
* common/config/i386/i386-common.c (ix86_supports_split_stack):
|
||||
Return true only on glibc.
|
||||
* config/i386/gnu-user-common.h (STACK_CHECK_STATIC_BUILTIN):
|
||||
Revert commit c163647ffbc.
|
||||
* config/i386/gnu.h (TARGET_LIBC_PROVIDES_SSP): Likewise.
|
||||
---
|
||||
gcc/common/config/i386/i386-common.c | 17 +++++++++++------
|
||||
gcc/config/i386/gnu-user-common.h | 5 ++---
|
||||
gcc/config/i386/gnu.h | 5 +----
|
||||
3 files changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c
|
||||
index 96549aa7d7e..a3b5258e828 100644
|
||||
--- a/gcc/common/config/i386/i386-common.c
|
||||
+++ b/gcc/common/config/i386/i386-common.c
|
||||
@@ -1696,16 +1696,21 @@ ix86_option_init_struct (struct gcc_options *opts)
|
||||
field in the TCB, so they cannot be used together. */
|
||||
|
||||
static bool
|
||||
-ix86_supports_split_stack (bool report ATTRIBUTE_UNUSED,
|
||||
+ix86_supports_split_stack (bool report,
|
||||
struct gcc_options *opts ATTRIBUTE_UNUSED)
|
||||
{
|
||||
+#ifdef TARGET_THREAD_SPLIT_STACK_OFFSET
|
||||
+ if (opts->x_linux_libc != LIBC_GLIBC)
|
||||
+#endif
|
||||
+ {
|
||||
+ if (report)
|
||||
+ error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
bool ret = true;
|
||||
|
||||
-#ifndef TARGET_THREAD_SPLIT_STACK_OFFSET
|
||||
- if (report)
|
||||
- error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
|
||||
- ret = false;
|
||||
-#else
|
||||
+#ifdef TARGET_THREAD_SPLIT_STACK_OFFSET
|
||||
if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE)
|
||||
{
|
||||
if (report)
|
||||
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
|
||||
index 6e13315b5a3..00226f5a455 100644
|
||||
--- a/gcc/config/i386/gnu-user-common.h
|
||||
+++ b/gcc/config/i386/gnu-user-common.h
|
||||
@@ -66,8 +66,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define STACK_CHECK_STATIC_BUILTIN 1
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives and
|
||||
- targets glibc. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE && OPTION_GLIBC
|
||||
+ assembler has full support for the CFI directives. */
|
||||
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
|
||||
index afd3e8e8841..25fbc07f58c 100644
|
||||
--- a/gcc/config/i386/gnu.h
|
||||
+++ b/gcc/config/i386/gnu.h
|
||||
@@ -35,10 +35,7 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
|
||||
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
|
||||
#endif
|
||||
|
||||
-/* -fsplit-stack uses a field in the TCB at a fixed offset. This
|
||||
- field is only available for glibc. Disable -fsplit-stack for
|
||||
- other libc implementations to avoid silent TCB corruptions. */
|
||||
-#if defined (TARGET_LIBC_PROVIDES_SSP) && OPTION_GLIBC
|
||||
+#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
|
||||
/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
|
||||
#define TARGET_THREAD_SSP_OFFSET 0x14
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From e74e2946a534fbac7e8ec6c687c407761daef49a Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 16:31:09 +0000
|
||||
Subject: [PATCH] gdc: unconditionally link libgphobos against libucontext
|
||||
|
||||
ref: alpine/aports#13422
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 7e577ed3dbb..da40b61a8c5 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -51248,7 +51248,7 @@ configure-target-libphobos:
|
||||
esac; \
|
||||
module_srcdir=libphobos; \
|
||||
rm -f no-such-file || : ; \
|
||||
- CONFIG_SITE=no-such-file $(SHELL) \
|
||||
+ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
|
||||
$$s/$$module_srcdir/configure \
|
||||
--srcdir=$${topdir}/$$module_srcdir \
|
||||
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,298 +0,0 @@
|
||||
From 7b5108375bb67532af30d1e7f553ac5f3b1096fe Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Mon, 24 Jan 2022 11:13:39 +0100
|
||||
Subject: [PATCH] properly disable -fsplit-stack on non-glibc targets
|
||||
[PR104170]
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On Sat, Jan 22, 2022 at 10:32:21AM +0100, Martin Liška wrote:
|
||||
> I've just noticed the patch broke a few cross compilers:
|
||||
>
|
||||
> s390x-ibm-tpf:
|
||||
>
|
||||
> /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc: In function ‘bool s390_supports_split_stack(bool, gcc_options*)’:
|
||||
> /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc:126:13: error: ‘struct gcc_options’ has no member named ‘x_linux_libc’
|
||||
> 126 | if (opts->x_linux_libc == LIBC_GLIBC)
|
||||
> | ^~~~~~~~~~~~
|
||||
>
|
||||
> i686-kopensolaris-gnu, i686-symbolics-gnu
|
||||
>
|
||||
> /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/i386/i386-common.cc: In function ‘bool ix86_supports_split_stack(bool, gcc_options*)’:
|
||||
> /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/i386/i386-common.cc:1721:13: error: ‘struct gcc_options’ has no member named ‘x_linux_libc’
|
||||
> 1721 | if (opts->x_linux_libc != LIBC_GLIBC)
|
||||
> | ^~~~~~~~~~~~
|
||||
> make[1]: *** [Makefile:2418: i386-common.o] Error 1
|
||||
>
|
||||
> Can you please take a look? Btw. do you have a bugzilla account?
|
||||
|
||||
I bet instead of opts->x_linux_libc != LIBC_GLIBC it needs to use
|
||||
#ifdef OPTION_GLIBC
|
||||
if (!OPTION_GLIBC)
|
||||
#endif
|
||||
or so. I think the first committed patch actually used that
|
||||
but used it in #if directive, which is wrong because it is something
|
||||
that needs to be evaluated at runtime.
|
||||
|
||||
That doesn't work well either, because the *supports_split_stack
|
||||
hooks have opts argument and OPTION_GLIBC doesn't take that.
|
||||
|
||||
So, here is a patch that introduces OPTION_*_P macros that take opts
|
||||
as an argument and redefines OPTION_* using those (similarly to how
|
||||
the option scripts create TARGET_*_P and TARGET_* macros).
|
||||
|
||||
2022-01-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR bootstrap/104170
|
||||
* config/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
|
||||
OPTION_BIONIC_P, OPTION_MUSL_P): Define.
|
||||
(OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
|
||||
using OPTION_*_P macros.
|
||||
* config/alpha/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
|
||||
OPTION_BIONIC_P, OPTION_MUSL_P): Define.
|
||||
(OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
|
||||
using OPTION_*_P macros.
|
||||
* config/rs6000/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
|
||||
OPTION_BIONIC_P, OPTION_MUSL_P): Define.
|
||||
(OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
|
||||
using OPTION_*_P macros.
|
||||
* config/rs6000/linux64.h (OPTION_GLIBC_P, OPTION_UCLIBC_P,
|
||||
OPTION_BIONIC_P, OPTION_MUSL_P): Define.
|
||||
(OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine
|
||||
using OPTION_*_P macros.
|
||||
* config/fuchsia.h (OPTION_MUSL_P): Redefine.
|
||||
* config/glibc-stdint.h (OPTION_MUSL_P): Define if not defined.
|
||||
* common/config/s390/s390-common.cc (s390_supports_split_stack): Re-add
|
||||
ATTRIBUTE_UNUSED to opts parameter. If OPTION_GLIBC_P is defined, use
|
||||
OPTION_GLIBC_P (opts) as condition, otherwise assume if (false).
|
||||
* common/config/i386/i386-common.cc (ix86_supports_split_stack): If
|
||||
OPTION_GLIBC_P is defined use !OPTION_GLIBC_P (opts) as condition,
|
||||
otherwise assume if (true).
|
||||
---
|
||||
gcc/common/config/i386/i386-common.c | 4 ++--
|
||||
gcc/common/config/s390/s390-common.c | 6 ++++--
|
||||
gcc/config/alpha/linux.h | 25 +++++++++++++++----------
|
||||
gcc/config/fuchsia.h | 2 ++
|
||||
gcc/config/glibc-stdint.h | 3 +++
|
||||
gcc/config/linux.h | 25 +++++++++++++++----------
|
||||
gcc/config/rs6000/linux.h | 25 +++++++++++++++----------
|
||||
gcc/config/rs6000/linux64.h | 25 +++++++++++++++----------
|
||||
8 files changed, 71 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c
|
||||
index a3b5258e828..864e68ab985 100644
|
||||
--- a/gcc/common/config/i386/i386-common.c
|
||||
+++ b/gcc/common/config/i386/i386-common.c
|
||||
@@ -1699,8 +1699,8 @@ static bool
|
||||
ix86_supports_split_stack (bool report,
|
||||
struct gcc_options *opts ATTRIBUTE_UNUSED)
|
||||
{
|
||||
-#ifdef TARGET_THREAD_SPLIT_STACK_OFFSET
|
||||
- if (opts->x_linux_libc != LIBC_GLIBC)
|
||||
+#if defined(TARGET_THREAD_SPLIT_STACK_OFFSET) && defined(OPTION_GLIBC_P)
|
||||
+ if (!OPTION_GLIBC_P (opts))
|
||||
#endif
|
||||
{
|
||||
if (report)
|
||||
diff --git a/gcc/common/config/s390/s390-common.c b/gcc/common/config/s390/s390-common.c
|
||||
index 8c1e590322d..11116f131cb 100644
|
||||
--- a/gcc/common/config/s390/s390-common.c
|
||||
+++ b/gcc/common/config/s390/s390-common.c
|
||||
@@ -121,10 +121,12 @@ s390_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
|
||||
|
||||
static bool
|
||||
s390_supports_split_stack (bool report,
|
||||
- struct gcc_options *opts)
|
||||
+ struct gcc_options *opts ATTRIBUTE_UNUSED)
|
||||
{
|
||||
- if (opts->x_linux_libc == LIBC_GLIBC)
|
||||
+#ifdef OPTION_GLIBC_P
|
||||
+ if (OPTION_GLIBC_P (opts))
|
||||
return true;
|
||||
+#endif
|
||||
|
||||
if (report)
|
||||
error ("%<-fsplit-stack%> currently only supported on GNU/Linux");
|
||||
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
|
||||
index bde7fb0d292..812ec8ecb31 100644
|
||||
--- a/gcc/config/alpha/linux.h
|
||||
+++ b/gcc/config/alpha/linux.h
|
||||
@@ -58,18 +58,23 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#ifdef SINGLE_LIBC
|
||||
-#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
-#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) ((opts)->x_linux_libc == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) ((opts)->x_linux_libc == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) ((opts)->x_linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) ((opts)->x_linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
+#define OPTION_GLIBC OPTION_GLIBC_P (&global_options)
|
||||
+#define OPTION_UCLIBC OPTION_UCLIBC_P (&global_options)
|
||||
+#define OPTION_BIONIC OPTION_BIONIC_P (&global_options)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL OPTION_MUSL_P (&global_options)
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
this includes full c99 runtime and sincos. */
|
||||
diff --git a/gcc/config/fuchsia.h b/gcc/config/fuchsia.h
|
||||
index 54602dc300d..47c0dfd8b81 100644
|
||||
--- a/gcc/config/fuchsia.h
|
||||
+++ b/gcc/config/fuchsia.h
|
||||
@@ -52,6 +52,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
/* We are using MUSL as our libc. */
|
||||
#undef OPTION_MUSL
|
||||
#define OPTION_MUSL 1
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) 1
|
||||
|
||||
#ifndef TARGET_SUB_OS_CPP_BUILTINS
|
||||
#define TARGET_SUB_OS_CPP_BUILTINS()
|
||||
diff --git a/gcc/config/glibc-stdint.h b/gcc/config/glibc-stdint.h
|
||||
index c8d7ba18d1c..f095197514f 100644
|
||||
--- a/gcc/config/glibc-stdint.h
|
||||
+++ b/gcc/config/glibc-stdint.h
|
||||
@@ -27,6 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#ifndef OPTION_MUSL
|
||||
#define OPTION_MUSL 0
|
||||
#endif
|
||||
+#ifndef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) 0
|
||||
+#endif
|
||||
|
||||
#define SIG_ATOMIC_TYPE "int"
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index 7fcf402b416..ab62a1741f7 100644
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -29,18 +29,23 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
/* C libraries supported on Linux. */
|
||||
#ifdef SINGLE_LIBC
|
||||
-#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
-#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) ((opts)->x_linux_libc == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) ((opts)->x_linux_libc == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) ((opts)->x_linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) ((opts)->x_linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
+#define OPTION_GLIBC OPTION_GLIBC_P (&global_options)
|
||||
+#define OPTION_UCLIBC OPTION_UCLIBC_P (&global_options)
|
||||
+#define OPTION_BIONIC OPTION_BIONIC_P (&global_options)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL OPTION_MUSL_P (&global_options)
|
||||
|
||||
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
|
||||
index 47c9d9ac0b6..be04462d357 100644
|
||||
--- a/gcc/config/rs6000/linux.h
|
||||
+++ b/gcc/config/rs6000/linux.h
|
||||
@@ -27,18 +27,23 @@
|
||||
#define NO_PROFILE_COUNTERS 1
|
||||
|
||||
#ifdef SINGLE_LIBC
|
||||
-#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
-#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) ((opts)->x_linux_libc == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) ((opts)->x_linux_libc == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) ((opts)->x_linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) ((opts)->x_linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
+#define OPTION_GLIBC OPTION_GLIBC_P (&global_options)
|
||||
+#define OPTION_UCLIBC OPTION_UCLIBC_P (&global_options)
|
||||
+#define OPTION_BIONIC OPTION_BIONIC_P (&global_options)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL OPTION_MUSL_P (&global_options)
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
this includes full c99 runtime and sincos. */
|
||||
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
|
||||
index 43499ed29cf..1d73a09a476 100644
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -267,18 +267,23 @@ extern int dot_symbols;
|
||||
#define OS_MISSING_POWERPC64 !TARGET_64BIT
|
||||
|
||||
#ifdef SINGLE_LIBC
|
||||
-#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
-#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
-#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
-#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
-#undef OPTION_MUSL
|
||||
-#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
+#define OPTION_GLIBC_P(opts) ((opts)->x_linux_libc == LIBC_GLIBC)
|
||||
+#define OPTION_UCLIBC_P(opts) ((opts)->x_linux_libc == LIBC_UCLIBC)
|
||||
+#define OPTION_BIONIC_P(opts) ((opts)->x_linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL_P
|
||||
+#define OPTION_MUSL_P(opts) ((opts)->x_linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
+#define OPTION_GLIBC OPTION_GLIBC_P (&global_options)
|
||||
+#define OPTION_UCLIBC OPTION_UCLIBC_P (&global_options)
|
||||
+#define OPTION_BIONIC OPTION_BIONIC_P (&global_options)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL OPTION_MUSL_P (&global_options)
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
this includes full c99 runtime and sincos. */
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
From 400bae077d11c3a2ee9f4c8b96c31bbf39416a4f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren@soeren-tempel.net>
|
||||
Date: Mon, 21 Feb 2022 04:13:47 +0100
|
||||
Subject: [PATCH] x86: Fix -fsplit-stack feature detection via
|
||||
TARGET_CAN_SPLIT_STACK
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since commit c163647ffbc9a20c8feb6e079dbecccfe016c82e -fsplit-stack
|
||||
is only supported on glibc targets. However, this original commit
|
||||
required some fixups. As part of the fixup, the changes to the
|
||||
gnu-user-common.h and gnu.h where partially reverted in commit
|
||||
60953a23d57b13a672f751bec0c6eefc059eb1ab thus causing TARGET_CAN_SPLIT_STACK
|
||||
to be defined for non-glibc targets even though -fsplit-stack is
|
||||
actually not supported and attempting to use it causes a runtime error.
|
||||
|
||||
This causes gcc internal code, such as ./gcc/go/gospec.c to not
|
||||
correctly detect that -fsplit-stack is not supported and thus causes
|
||||
gccgo to fail compilation on non-glibc targets.
|
||||
|
||||
This commit ensures that TARGET_CAN_SPLIT_STACK is set based on the
|
||||
changes performed in 2c31a8be4a5db11a0a0e97c366dded6362421086, i.e.
|
||||
the new OPTION_GLIBC_P macro is now used to detect if -fsplit-stack is
|
||||
supported in the x86 header files.
|
||||
|
||||
The proposed changes have been tested on x86_64 Alpine Linux (which uses
|
||||
musl libc) and fix compilation of gccgo for this target.
|
||||
|
||||
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* config/i386/gnu-user-common.h (defined): Only define
|
||||
TARGET_CAN_SPLIT_STACK for glibc targets.
|
||||
* config/i386/gnu.h (defined): Ditto.
|
||||
---
|
||||
gcc/config/i386/gnu-user-common.h | 5 +++--
|
||||
gcc/config/i386/gnu.h | 5 +++--
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
|
||||
index 00226f5a455..4e3fbb1de05 100644
|
||||
--- a/gcc/config/i386/gnu-user-common.h
|
||||
+++ b/gcc/config/i386/gnu-user-common.h
|
||||
@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define STACK_CHECK_STATIC_BUILTIN 1
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives. Also
|
||||
+ we only support -fsplit-stack on glibc targets. */
|
||||
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE && defined(OPTION_GLIBC_P)
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
|
||||
index 25fbc07f58c..41a6a37dfee 100644
|
||||
--- a/gcc/config/i386/gnu.h
|
||||
+++ b/gcc/config/i386/gnu.h
|
||||
@@ -41,8 +41,9 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define TARGET_THREAD_SSP_OFFSET 0x14
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives. Also
|
||||
+ we only support -fsplit-stack on glibc targets. */
|
||||
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE && defined(OPTION_GLIBC_P)
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
/* We steal the last transactional memory word. */
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From dba87d9796b61f4f3eea83c200a2d208564e2277 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Mon, 21 Feb 2022 10:04:47 +0000
|
||||
Subject: [PATCH] go/gospec: forcibly disable -fsplit-stack support
|
||||
|
||||
for some reason, TARGET_CAN_SPLIT_STACK still gets defined on 32-bit x86,
|
||||
so hackfix it for now
|
||||
---
|
||||
gcc/go/gospec.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
|
||||
index cf8d0f2b60e..d5bfa57ea45 100644
|
||||
--- a/gcc/go/gospec.c
|
||||
+++ b/gcc/go/gospec.c
|
||||
@@ -269,11 +269,12 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
|
||||
/* Copy the 0th argument, i.e., the name of the program itself. */
|
||||
new_decoded_options[j++] = decoded_options[i++];
|
||||
|
||||
-#ifdef TARGET_CAN_SPLIT_STACK
|
||||
+ /* Hackfix: we never support split stack on Alpine GCC */
|
||||
+#if 0
|
||||
supports_split_stack = 1;
|
||||
#endif
|
||||
|
||||
-#ifdef TARGET_CAN_SPLIT_STACK_64BIT
|
||||
+#if 0
|
||||
if (is_m64)
|
||||
supports_split_stack = 1;
|
||||
#endif
|
||||
--
|
||||
2.35.1
|
||||
|
||||
+70
-140
@@ -24,8 +24,8 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
_pkgbase=11.2.1
|
||||
pkgver=11.2.1_git20220219
|
||||
_pkgbase=10.2.1
|
||||
pkgver=10.2.1_pre1
|
||||
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
@@ -38,7 +38,7 @@ arch="x86_64"
|
||||
license="GPL-2.0-or-later LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="isl binutils-aarch64 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
makedepends_build="gcc g++ paxmark 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"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target"
|
||||
@@ -50,7 +50,6 @@ replaces="libstdc++ binutils"
|
||||
: "${LANG_GO:=true}"
|
||||
: "${LANG_FORTRAN:=true}"
|
||||
: "${LANG_ADA:=true}"
|
||||
: "${LANG_JIT:=true}"
|
||||
|
||||
_libgomp=true
|
||||
_libgcc=true
|
||||
@@ -70,7 +69,6 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
_libgomp=false
|
||||
_libatomic=false
|
||||
_libitm=false
|
||||
@@ -108,7 +106,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
LANG_GO=false
|
||||
LANG_FORTRAN=false
|
||||
LANG_D=false
|
||||
LANG_JIT=false
|
||||
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build-cross-native"
|
||||
@@ -119,16 +116,12 @@ fi
|
||||
|
||||
# GDC hasn't been ported to PowerPC
|
||||
# See libphobos/configure.tgt in GCC sources for supported targets
|
||||
# riscv fails with: error: static assert "unimplemented"
|
||||
case "$CARCH" in
|
||||
ppc64le|riscv64) LANG_D=false ;;
|
||||
esac
|
||||
[ "$CARCH" = ppc64le ] && LANG_D=false
|
||||
|
||||
# libitm has TEXTRELs in ARM build, so disable for now
|
||||
case "$CTARGET_ARCH" in
|
||||
arm*) _libitm=false ;;
|
||||
mips*) _libitm=false ;;
|
||||
riscv64) _libitm=false ;;
|
||||
esac
|
||||
|
||||
# Internal libffi fails to build on MIPS at the moment, need to
|
||||
@@ -155,11 +148,6 @@ if $_libgomp; then
|
||||
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
riscv64)
|
||||
LANG_ADA=false;;
|
||||
esac
|
||||
|
||||
_languages=c
|
||||
if $LANG_CXX; then
|
||||
_languages="$_languages,c++"
|
||||
@@ -182,15 +170,11 @@ if $LANG_FORTRAN; then
|
||||
_languages="$_languages,fortran"
|
||||
fi
|
||||
if $LANG_ADA; then
|
||||
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat"
|
||||
subpackages="$subpackages libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat"
|
||||
_languages="$_languages,ada"
|
||||
[ "$CBUILD" = "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
||||
[ "$CBUILD" != "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
||||
fi
|
||||
if $LANG_JIT; then
|
||||
subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev"
|
||||
_languages="$_languages,jit"
|
||||
fi
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
|
||||
# when using upstream releases, use this URI template
|
||||
@@ -203,7 +187,7 @@ makedepends="$makedepends_build $makedepends_host"
|
||||
source="https://dev.alpinelinux.org/~nenolod/gcc-${pkgver}.tar.xz
|
||||
0001-posix_memalign.patch
|
||||
0002-gcc-poison-system-directories.patch
|
||||
0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
0003-Turn-on-Wl-z-relro-z-now-by-default.patch
|
||||
0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
@@ -217,41 +201,29 @@ source="https://dev.alpinelinux.org/~nenolod/gcc-${pkgver}.tar.xz
|
||||
0014-nopie.patch
|
||||
0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch
|
||||
0016-dlang-update-zlib-binding.patch
|
||||
0017-dlang-use-libucontext-on-mips64.patch
|
||||
0018-dlang-libdruntime-define-fcntl.h-constants-for-mips6.patch
|
||||
0019-ada-fix-shared-linking.patch
|
||||
0020-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
0021-add-fortify-headers-paths.patch
|
||||
0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
0024-mips64-disable-multilib-support.patch
|
||||
0025-aarch64-disable-multilib-support.patch
|
||||
0026-s390x-disable-multilib-support.patch
|
||||
0027-ppc64-le-disable-multilib-support.patch
|
||||
0028-x86_64-disable-multilib-support.patch
|
||||
0029-riscv-disable-multilib-support.patch
|
||||
0030-always-build-libgcc_eh.a.patch
|
||||
0031-ada-libgnarl-compatibility-for-musl.patch
|
||||
0032-ada-musl-support-fixes.patch
|
||||
0033-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
0034-There-are-more-than-one-st_-a-m-c-tim-fields-in-stru.patch
|
||||
0035-gcc-go-signal-34-is-special-on-musl-libc.patch
|
||||
0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch
|
||||
0018-ada-fix-shared-linking.patch
|
||||
0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
0020-add-fortify-headers-paths.patch
|
||||
0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
0023-Pure-64-bit-MIPS.patch
|
||||
0024-use-pure-64-bit-configuration-where-appropriate.patch
|
||||
0025-always-build-libgcc_eh.a.patch
|
||||
0026-ada-libgnarl-compatibility-for-musl.patch
|
||||
0027-ada-musl-support-fixes.patch
|
||||
0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch
|
||||
0029-gcc-go-Don-t-include-sys-user.h.patch
|
||||
0030-gcc-go-Fix-ucontext_t-on-PPC64.patch
|
||||
0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch
|
||||
0034-gcc-go-signal-34-is-special-on-musl-libc.patch
|
||||
0035-gcc-go-Prefer-_off_t-over-_off64_t.patch
|
||||
0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
|
||||
0037-gcc-go-link-to-libucontext.patch
|
||||
0038-Use-generic-errstr.go-implementation-on-musl.patch
|
||||
0039-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
0040-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
0041-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
||||
0042-Fix-attempt-to-use-poisoned-calloc-error-in-libgccji.patch
|
||||
0043-stddef.h-add-support-for-musl-typedef-macro-guards.patch
|
||||
0044-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
0045-libgo-include-asm-ptrace.h-for-pt_regs-definition-on.patch
|
||||
0046-Disable-fsplit-stack-support-on-non-glibc-targets.patch
|
||||
0047-x86-Properly-disable-fsplit-stack-support-on-non-gli.patch
|
||||
0048-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
0049-properly-disable-fsplit-stack-on-non-glibc-targets-P.patch
|
||||
0050-x86-Fix-fsplit-stack-feature-detection-via-TARGET_CA.patch
|
||||
0051-go-gospec-forcibly-disable-fsplit-stack-support.patch
|
||||
0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch
|
||||
0040-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch
|
||||
"
|
||||
|
||||
# we build out-of-tree
|
||||
@@ -288,7 +260,6 @@ build() {
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
@@ -306,7 +277,6 @@ build() {
|
||||
i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";;
|
||||
i586-*-*-*) _arch_configure="--with-arch=i586 --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
esac
|
||||
|
||||
case "$CTARGET_ARCH" in
|
||||
@@ -331,8 +301,6 @@ build() {
|
||||
*) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;;
|
||||
esac
|
||||
|
||||
$LANG_JIT && _jit_configure="--enable-host-shared"
|
||||
|
||||
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
|
||||
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
|
||||
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
|
||||
@@ -380,7 +348,6 @@ build() {
|
||||
$_libc_configure \
|
||||
$_cross_configure \
|
||||
$_bootstrap_configure \
|
||||
$_jit_configure \
|
||||
--with-system-zlib \
|
||||
$_hash_style_configure
|
||||
make
|
||||
@@ -428,16 +395,14 @@ package() {
|
||||
done
|
||||
fi
|
||||
|
||||
paxmark -pmrs "$pkgdir"/$_gcclibexec/cc1
|
||||
|
||||
# move ada runtime libs
|
||||
if $LANG_ADA; then
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
|
||||
mv "$i" "$pkgdir"/usr/lib/
|
||||
ln -s ../../../../${i##*/} $i
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
@@ -522,24 +487,13 @@ gpp() {
|
||||
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
|
||||
|
||||
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
|
||||
paxmark -pmrs "$subpkgdir/$_gcclibexec/cc1plus"
|
||||
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/*++* "$subpkgdir"/usr/${_target:+$CTARGET/}lib/
|
||||
mv "$pkgdir"/usr/${_target:+$CTARGET/}include/c++ "$subpkgdir"/usr/${_target:+$CTARGET/}include/
|
||||
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
jit() {
|
||||
pkgdesc="GCC JIT Library"
|
||||
depends=
|
||||
amove usr/lib/libgccjit.so*
|
||||
}
|
||||
|
||||
jitdev() {
|
||||
pkgdesc="GCC JIT Library (development files)"
|
||||
depends="libgccjit"
|
||||
amove usr/include/libgccjit*.h
|
||||
}
|
||||
|
||||
libobjc() {
|
||||
pkgdesc="GNU Objective-C runtime"
|
||||
replaces="objc"
|
||||
@@ -603,9 +557,7 @@ gdc() {
|
||||
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
||||
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
||||
@@ -692,14 +644,6 @@ libgnat() {
|
||||
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
libgnatstatic() {
|
||||
pkgdesc="GNU Ada static libraries"
|
||||
depends=
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
||||
}
|
||||
|
||||
gnat() {
|
||||
pkgdesc="Ada support for GCC"
|
||||
depends="gcc=$_gccrel"
|
||||
@@ -714,57 +658,43 @@ gnat() {
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
94d4d2e31f5a84455055d34cfbbcc63d5bd63e60345c2a4e30aa404724e65e5d14868ef50b7fcf5537dd12dc6f1381a27cede269801050e193b4bdb8f2919971 gcc-11.2.1_git20220219.tar.xz
|
||||
d46a87edb919697a37c15af99c9142c6ad8ec364fe9b5747f5808368e619766163d3d8b64e987b1155785ddc91b5b191b795857cd70118d64f978e46b476bfff 0001-posix_memalign.patch
|
||||
59fa772417c1d1baf8bd8477ef4e30975fbd616d949fbd72fa88cc72d9662f2e28214305a188d75e30c54a95be111c7998784f7d1499562490acbe194a3c2116 0002-gcc-poison-system-directories.patch
|
||||
556240f9888c24706694560ad3ba1a90d3ed6da1dd3d7eebb603f4e3551d5743908840d4b1f598d6d5dc3cc52bcfafbcd777282ec8864051c3c8aba623866d3e 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
747a2ba2c0227471dd8a327bddd4699aa6aad5ddce2e523816e43e04fd5a4d8c2f1a69f02980632263ab1c23334d01e27d5df737a0ba9f6bd16b9c85112de82a 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
0fe2b802ce0b9c986d7ea5378df49899b028baad419ccd4071fd1a2dad90736e0f04eef29056f6c74c1fa2482359629b5e3747d58fcbf3520c6ed10c66c7b87e 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
7d37f31108cddfeb25ebf7e462d999873dc184bb26f74c9d7d6d32534a15070291661ab58be41ccedb44af20de0568e704b4152668c6bd803cf88f1ddfb6e35c 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
698893670d00df1ddbaa7dd970b17049f94d0cc2fec3225925bbad606e44c29288e38a7afa4b4cae3c9c26be35646c52e9eadc67022b89d7b4ce97ce64a5a2ac 0007-Enable-Wtrampolines-by-default.patch
|
||||
b549d45824d6b9f2ec830ed66ba192ebfe9d9c3db554bf0b51379e9b624de0f0a1a315520487a1a3bfbe9d65d41c41239b9461bc9f1b5059c51d5f4dc7581872 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
15089ea9465057f6897d5c570e79abd068b85f9fc77490668872397699025905aa065eaf7318ddb0847747da4397676242064f290b45e16f616bab86258be260 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
cc9aa31e3b4227f7887d9be470bb19cb3ccd8125155741721921b4c8f791710fabc279b492232454fda0a47bf98509bd2fd4bcdbf5a5aad8b8f476bc5aa74d07 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
c2c74411717e5bf6e261bde4d5c50b12645de2d556b3eb898600e7629772f7d9d213e32f5a0b81d8ee2ba2e4bc55ea64ee60119d9d9a03045574016d94b76f61 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
d92fe356d745fbc858cbb338b0027b814a2f7812fc7bb6147d641e7319d4ff09ac4ade766b419566e70e6250847ec56e95fd74617a82069dc93f669d827dd48e 0012-libitm-disable-FORTIFY.patch
|
||||
2e5c0845581c92573fc2e60f7771d9f99e23fd32bf4da7c09bc1738f69174f8becfe9f0c9ee96fbc87b3264dcf2d4b801d051606bd528b43e76cd1fb9ddf6b40 0013-libgcc_s.patch
|
||||
2a79fd03fe9b98cca3cdbed368969304f9ebcedb7701703740c30a1fe70bfdeceaddac4cbf796f60ee080f0d62a926da6c48042c563b081d9116691c4531a68c 0014-nopie.patch
|
||||
4a1d53c120047702ea51df3c611af3e4ae82b9cf63dc8244ac38042de44b24afe98578e70aa964884b22ef76ee65d1d703355defc613637acf52d580ce86f17c 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch
|
||||
64065ec9243eb12424cb75822219376e7829f1e1d206d93c4b4cbe18eb4e538019361cc1b5b7d88da4d2d5c891d9e282d579902db534d09b7d58ec91bfada6b5 0016-dlang-update-zlib-binding.patch
|
||||
35ffecaa8ec56b64c73df93530d858632f0429de007d70869432c183610d344711a1552b1bb00f2180ae952c66a66e1c6285139a8818d656691a121cd7abdba7 0017-dlang-use-libucontext-on-mips64.patch
|
||||
f78fc1bc99669a90bd68051f9d17bfc25065e49c7d4e853cda293be3a9f17b08867de31e73b90a82b948005f5e17020ccf55dfa4a1b0b9b0cba707c0ed635a46 0018-dlang-libdruntime-define-fcntl.h-constants-for-mips6.patch
|
||||
463ce54bb32d9ba52ed7f0d7df99011f17543e80f6aca9a61b747e074662b283c563434b96a0bc8ae4636e154f1033c5720f3c8113bc6ad095592a1d5584981c 0019-ada-fix-shared-linking.patch
|
||||
194647e5a87fb7ebd7602eee9ffa5d3e713dc26baa5f8fa50ada513ca5d28898d1fcee5e9db0d3af6d5b774961426fc1e2f9b5155992ead9981412c627967219 0020-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
d707e47a10c866c0e6d085f9a2bfa1b21eff8e6a1b222840abbbe1b2f21cc4a50f4fa45f7dbbb1ad86dc2eb7c88160c715e69039d3de7f7784de7d5f2a87d6e4 0021-add-fortify-headers-paths.patch
|
||||
e746e250451eb76726a9de8f42de5eb1d23a228fd3d8961cd2a6c6f691a5418fcd32a817998e3a5aaf8d2d90cd03371aaf7912c9b834ed6c663c649f85f1d058 0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
c6d3a4b5d541b52f44641e59556c6312d785c4e12d47fac11a530ae0746170e891c0ed64ce6e9856e5581debfae0d5216753afaf87df1a2d40d50bdfa24ea7dc 0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
a29ad877662bbdbc6422456d32ed31aab3764edcc1eb3e1abe7be0f22d162da6d0f0d6565a25c7a43bf23151faba0492122ddcf832bdac57b3e47f89a6ab158d 0024-mips64-disable-multilib-support.patch
|
||||
18be870ec68865f4661ac73f9bf50765164711582b497beb852928e1d993bc257a0d2b015f435e93461c35edc1811505d31f3a46147bccb4764dcf9b8319c93a 0025-aarch64-disable-multilib-support.patch
|
||||
b2b830626396936be105361e87c82490b5cd3d26ce7b8dbccf156d53eb5d0db82a28167656aaa5e47b6a1315263abf070432db693c5ae10da892217ce2728728 0026-s390x-disable-multilib-support.patch
|
||||
094ed675ff5512829bbf7f2bd2632498300b7f15cec6b4a397b145f378a41c17c99f05ea0b94ed1408773a3e8b1fd713ba302c64dba00269df270d401b0e6443 0027-ppc64-le-disable-multilib-support.patch
|
||||
ee67238c66132f30fd00cc084d37012a927abe32ac48b4617779f22069d86384826c063b79626ab64f6adefdac0f00fcd5c18b95c8a2f11fb2cbee67babc9beb 0028-x86_64-disable-multilib-support.patch
|
||||
2ddf60a03db15c9c3e847001e300a54dfd9b5435da630e18379313e516fccbb8ea5e26571bb4f88baa6756cdb5c8ba7d059249c46a2f56e67bfca368750431eb 0029-riscv-disable-multilib-support.patch
|
||||
e7f9088809a4a4b87a6a5670227fb31766fb124ecdcea9936b00a7b98fdc06d7e7f27b6f67a575c434ba978623cb5f1183691dd63d6db98b180c4e08d62e5c5e 0030-always-build-libgcc_eh.a.patch
|
||||
653b2dbdf43ad336e75aa33ee3e520edd4c8cdb486bf8f5a30dbd8496b96451aa508e12e6a81dd16d36119f22fb9b0c46bcc39d731c89443c435fa4d1ca6fa08 0031-ada-libgnarl-compatibility-for-musl.patch
|
||||
9d46489087018366eea3b6537f6a86b0e183c7d49f8fecc2f50fbbcebf78727f5a1661ee6a50b5bddef0d54ebe47668ad61440784495194420b0896d5bd3f1aa 0032-ada-musl-support-fixes.patch
|
||||
63a2f9a81f94826dfac05073d6b7cb599c5b1d026c460edfd329f770c72208e369af1e427904528351aa78bce6e9445af9c59ca73ef5302f7362027757fa5d46 0033-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
8d3a01d7e5e983eaabdf5c4a7e58ef33c55a794ed4cb5d438b41218ded367d3214b868a5c8d68f52ef74b0f83abb95d29b36ef8d0c7be68f7d1537a04e65d5c1 0034-There-are-more-than-one-st_-a-m-c-tim-fields-in-stru.patch
|
||||
56c7c1911fef05beaecfa1b41703d46d18c5e967430c79c719f8685f4c4971bb177f2de35b0a1631d5d3ed7292cb54c618e52fa859f483fafb5445511e5b226b 0035-gcc-go-signal-34-is-special-on-musl-libc.patch
|
||||
07921d5c30f3a23ba1c0540e106abe49e1675f183ffe2b326bdab80c59847b9ed5f39efd2836bc47d4ac1b3a3152f8de092c498ba91682e51c20548a65c0f105 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
|
||||
ef8df8a047b4145f30884b052345e4e390fc1efb35a9c7da63899aa115c19b8cc04513a57b2340a6a58ed02dc6881b10f684da653734afe5acf69761e3d064e7 0037-gcc-go-link-to-libucontext.patch
|
||||
cf000459b493815bb0c9bccbbccc61ab8101f067b5b45d0f30cf49bf0ec6745f6ae360e4b5dccdb5c9bef1974835830efbb349c2ab38d1ee4dcc22385546873b 0038-Use-generic-errstr.go-implementation-on-musl.patch
|
||||
0baffb0d19c26a387d38525c87b3500c4486bf11aeb9d98cec559eb67db4b71d5bc580fa6aebb9a12295422edb53aea77101e521e91f5189c744749448b89b4a 0039-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
d80074e1fa09cf6f7047a4dac7acadcfb53fcc93667af3348c61b22390999d618f2b16107c30a0fc52b145e27f14d6fddbe43ea36e6a9089741cb3b0b64fd856 0040-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
04434b605d71b6d4e9dedd03a810f250725d31fc70a5ad28d69499a04436caf6b0ec69f5c7223cb511063cc18c350ffdd95b722de97467f827789006ebcb2c73 0041-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
||||
a3dc43ba56f12f4243c186572b32809d47a9d29c7a40edcf7f6da34c7add65a271c77635a5b9ae325d167e24a2e6bbe883c63eccec3af5d6f925cb304f8ba92b 0042-Fix-attempt-to-use-poisoned-calloc-error-in-libgccji.patch
|
||||
04ebbf2143a2d4b6c6d768c3aeea2899e6261adf414e16faed1247bc94eeaf61e54f88a2ba7ffdca90e9c0ee87c6fd7e3746481d184c539b8e0130a14b215fa7 0043-stddef.h-add-support-for-musl-typedef-macro-guards.patch
|
||||
e47183b5a565bdc64a497e14124d767a3e889e9f9d77a92567b0047b285c5ca49897b46ba681e339a8982611b70583ae87a3472dae33f07becaeceb21b3cfe74 0044-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
a5adab61de2d4b2c3ccb1a55c70384a8496c447f7727a6680fa29263c4f57599a3dfb85e1e322859797f86605491af0f68f9dd1141ab4bbbe8b5183f67f3b32e 0045-libgo-include-asm-ptrace.h-for-pt_regs-definition-on.patch
|
||||
9c0e461eeba709110ca88d60236190c9b71d57d4e13786e2f15521a902e37dacc08d466966764abce9bc84e27d06e2e8523a1a80325f8a16d6ec16d2bf89fa05 0046-Disable-fsplit-stack-support-on-non-glibc-targets.patch
|
||||
f62778ab53125a9ba5a8088e064c2182c014bc264a46fd3d28d1ee0142dd02a7ed2c684dc63e9768a56a6f8f65621bea20026cd6b65053c2ff9ee51568ee260d 0047-x86-Properly-disable-fsplit-stack-support-on-non-gli.patch
|
||||
c44c6e5b28b622897af60e7e2dbf0d0284379eb57b39b480936e6d8b3743a24287c2a9ed69a530ef4f2327b5e5ca61ce00e92d415e0ed033e54bdffde345e6a9 0048-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
160ef16fde90546474e1548f1487c18d9b8edbae1d42a13ad06041b03214d06ff2c3586acd4d0bae27d48e48bb651861c6b9a140ade4ac59f00a268e85275da4 0049-properly-disable-fsplit-stack-on-non-glibc-targets-P.patch
|
||||
f4d9ebf6d5c80d2f303404b9bf315bf81435c0d369b03b92f8e8510d82db72c2a30d84603307ddc0697df3845862ba93045e4a3724f8e491e7c01bd4396d8864 0050-x86-Fix-fsplit-stack-feature-detection-via-TARGET_CA.patch
|
||||
8ac54b3a46f7270d975fa3e1198ac37a2311a4b9940938958ffc148e4e9c82c3e81cf3e3c3abd43cef29137897cd6768220b432f828672e036308f7994422d2e 0051-go-gospec-forcibly-disable-fsplit-stack-support.patch
|
||||
"
|
||||
sha512sums="172fd45e7274c36ebd22a7e12e44a7096ae3bf0e7f0b647da92cfd31ec406a69017df7ee6c1a6ee0822fbef4ff47855f83fab0a0cdb8f031713a14604af3900b gcc-10.2.1_pre1.tar.xz
|
||||
429a92934e1c507c0320741ed5cdd98ba96c73412447c8df0704077e3f0fa6ee4cc4056fadeaa6bb55d237416b555408e97a1c1d21f47b6f6812f153bc36f181 0001-posix_memalign.patch
|
||||
a0a9445358f58a34ba0a605d142243d62873d4669ca811013a593e3d6e6640006b5ec23b7a5734ee72f71762d098d607749d6ecc98c85aa4f2074400aedd63ff 0002-gcc-poison-system-directories.patch
|
||||
9fb636d1f2ef5b8225082f44da3086b9f196d1c045d7319cea148ee630b92c164e80a3e9a70a221e616a65fc00da761e733f87e23e8575634e498728bce2c48b 0003-Turn-on-Wl-z-relro-z-now-by-default.patch
|
||||
e34086d5a46f963e43e9f2f9240e3fb4d935e49feb8edba5121a59192b5991103a8253a342fbc20cef8ac2aa4ae2bf9a7ceb62abf6676be16441fd2dbf3b05f2 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
ffd89376a743d29a16b4f38463076691cd3716bee2bca0dbb67c2c1da00773661fb362bcc4b2ffd94f57c6b4470ae7cf8f6abad95de5880e74adaa5c4da21426 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
e101b356589fb794f1c4224bba8d8c714a962bed7858a734badfe38a5d10f4e800155f1ed5edbae9da7134192dfd6a4d8a33a9dbe871becb9526810af535819c 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
e6fbe275e8f4b1257271118bfea5d6c05b041439dde560775a7ee1a9457f442c3e0c8b1113c68bd54502b7d44e6e4b76315613bf2972898a981119f384106fde 0007-Enable-Wtrampolines-by-default.patch
|
||||
e2a6a0e3cb2c7a40f59432e0f633a3579bb320fc116290d4655766931c56fb78ce73b0f5e75a78c6aacf85155f3c508e84bfee259dba13cd36e77a601fd5d8f5 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
0f802f8d9d794a6515a7df7b8588eadc0fa49fdb0b7a5148036fa6fc6e74f35c97d79ed1e4ad225f8f46cca6801f49cbc041258494e4fdbad77a6a7020024d7d 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
ff99bc1d02ab07ca7d4c45ff5bfec555096b9a9eb6ef5c02d7e18de72ff3a02505d5e3dca6681caa23b8993049a4acf6a07f5a2e8b4481c4778a7a982851970e 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
cf4dc1bfe33250e4065d926d0a126eb87a43695e24a5efda1c383c4d78add0fa7884c378cd3fbb48d713503492d842758fed69c8b5e29774b3bc87c4abe65125 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
93f244dda3fa55a6016d511f526abf902f7902e876a2d813980d0ad0bf527e4c0fd6258293c90085c1e59056d827bf92aab2b9b92c6f17f776e0068e507d731a 0012-libitm-disable-FORTIFY.patch
|
||||
d6f409d8d9de3ff44e97046fed1b70ebbecebd5722e7c9bbb92d244ed37d43e77b5d398e39038c554945d022df6d2103b9d4c51fbe11e1d8a011bdfd9067b647 0013-libgcc_s.patch
|
||||
d380dc2f57bb2065e0c6d80c0837113c3feee2b2290b5747e922aa7dbcbc4463f55f1c22b39a1dcf88653ef5bbae9d29adbfc0f1002d5eaa523a7a31f980b7ab 0014-nopie.patch
|
||||
5db204edfcace211fd89eb16c358579d1534546a0245d2e11541078081d627e712a9ce372d838f152b4e361742696324929c4649d9b9ff6fb0678791bd898fca 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch
|
||||
bb76853e79fbeb5c57f52739dff132abf0b80fc551fe83d82238f598ab5ec153b7ebb45aa33b05b24750ff1895cd77a52375bcfb9295c1a44683996ac34bd381 0016-dlang-update-zlib-binding.patch
|
||||
50916865c79d9a1305f2524f7051d04df46be925fc7385a3b3cb2c17f1becb8827de76c3e897d470ce1f3fc269f9051c9b478c4d022d7611bcf081782e8b4cba 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch
|
||||
0de08138565d81d4b7bbd367f08e5a2bc637106c39736fbedc92401cf3c2cf18ff50c183c263354852bc03724f9353a9a357ed637b3f012ede2514d3c2ed3969 0018-ada-fix-shared-linking.patch
|
||||
82aa21e25fddb6ba6a4e1424c88cf5989f62bf3fe088b43bfaf2e624df0381c830b1f0d1e7f10afb2ec6bff07a2558c0464229a997420fe0435321d1d2117372 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
97cb91e95afccfa7fd020d10f48421745cf7afcbe903f17256fc1df05f5f07eaa675576b7eb340da1b5aa97854df4f1f003cb648d8c2e64d9e9c067a0acd2243 0020-add-fortify-headers-paths.patch
|
||||
3ffc3bbfbfd7ae3ddfef131d0731577aac0567c965d545a2ad7c9588430397748758990d2c449e4a4c66f11db6a3ea66fb3187d173c3581cda2093d25f3d90e6 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
fe3e098d71709bde04cc0a17dcf3bb6ce5bc14b51af1395db97afcb464ba5910dbf85be5d968beddf645e916241f9c6be243c24097c326d9bfebc58219f76118 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
7dc0c14cbdcab4aaa355568556e5263912ecc69301653602f99e7c70352d84431c6f931a27f4977de7bbd0d5a328c865f7717c8136e3ed6a12ef4448a107a1a6 0023-Pure-64-bit-MIPS.patch
|
||||
e4bbd675aea5f09d4aaa32990a88597bd070273754656575e9be74a172afd244aa15e58c2d6878606b652d56457b053c94213f3c0bbf63ebe1ede5fcfdedca25 0024-use-pure-64-bit-configuration-where-appropriate.patch
|
||||
f2bd09b05fb67544d0ef70ce14fd8ca2e2d21846d5396e4e53cdb95317ae122b3f121b8933e5784fc92e51e50d23812e4aa41f2fd07ae68ba1a21ca094a841ac 0025-always-build-libgcc_eh.a.patch
|
||||
0d49f5104e89a1269a286f7021dd32d0ac4f7aa427b36f40133bc8616ca87e92144d6cc36f958b3ab4ec683e12f946c3658bceada8fcd5114bdb7c197992eb4a 0026-ada-libgnarl-compatibility-for-musl.patch
|
||||
a09211cb007a9722ec95d046fbf317f63b362fb25f6d3ba285f278a33fe08ad5f5d51ba1e4ccf9ebe02c1ea3ca15f10b0721e7f65af5ced27ffc9380af7558b1 0027-ada-musl-support-fixes.patch
|
||||
35c1ee71725042fffded7e3189d96ace6cb730d95d83cd49fd4d8527eba72eb344c11d563d1c751a3934627e5aaa44525c58afd4d01c0bb99bab3b6222fa3040 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch
|
||||
26deab6006d46e2c8de4679cc7f598cfdd572b1b77c0595f0160fa693251669d324f47712c6faef481dc33a2c83878ec3fe385d54ab9bfd6fa2c576d84429d05 0029-gcc-go-Don-t-include-sys-user.h.patch
|
||||
dd9cc5c3c5368a210276ce4396be9cf120c5acfc65cae88508aebd7d4430a28d21b26b362f7f7456ae64c87dd06dfe7a615cd0c7ca13740b683e3a59c1c7bc8d 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch
|
||||
c17f5088172babddbdb32830387487286f6106304cf07d49d0b2e59feacad62aa10a46bf1bf927f1f138fd1112da5bef7ae1227a26e7946082a6edc7f340b522 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
db67b346f3def6c004639df27cef32a6c4e9b4661634f43b62f4f3be852f5ae6d5dadef85116f816d5fd88cbdd80001d8f81cc8d554b9094744402ca3ae14725 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
438c165b8e217142b64a002e99b112fbdac9b2c4ced7b0a8c8fe9cff42e6a5ea6d5939cb40905d5a8570fc890de447fd0f5b49c9ee43c3a6e33446efdf2229bf 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch
|
||||
85592117e6370ff8612a7a028194c6875c8df1f07299afa0188770bf9bdd82d9aeb322909ec980cf3bd10a54d90829fffb145c566d843027c11d49e78d3f0a9e 0034-gcc-go-signal-34-is-special-on-musl-libc.patch
|
||||
abc2ae2ea2ff270226c45321508c3641011b23172d043c55239a52fee9ed8451e8e23a2a65612c5f3a0d2e4d1a601a7e9a2c1d6c07f926e6cdf42164d23cff34 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch
|
||||
21ff83b1f5f8c71c41e7c22ba59f194bc789c8e67a6be9e5185f215adf4ddb175551a261556e5c9bd57dd9c302e1f966de01ff90e097d7ace2c2e43208b6e0f9 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
|
||||
5f0230f9e542bcbfa39f1a3da1f171229bd926971a924ec3e9f3ad8178645d3853659a58a89a48906ffdd77e9c5ff2af43dc54cfc4ac335a219267dddc4afad1 0037-gcc-go-link-to-libucontext.patch
|
||||
08ffdce5d1ef722364faf5e824b62d0e58655acbba99b58f24c609abb1d90577432863e769fbe269e4151c997b8bbb0cbed29032752b6e6c3356f8fb3086d607 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch
|
||||
81bcffde9635c9c4b3214afd8bb16048f15dc8c4ce82c5576b15ee552d6ca8eeee2c5444e2949fec3b938e69fc7a2a2259a07d437e004788ac232c43ae9a83d2 0040-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch"
|
||||
@@ -1,4 +1,4 @@
|
||||
From feb04e50d907683385cc4dc0163cf1d82258073a Mon Sep 17 00:00:00 2001
|
||||
From 61621c64caffb54ea82c5b573e55d16dcb732dea Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH] posix_memalign
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] posix_memalign
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 1b0bfe37852..d7b2b19bb3c 100644
|
||||
index 87344d9383f..ece428df487 100644
|
||||
--- a/gcc/config/i386/pmm_malloc.h
|
||||
+++ b/gcc/config/i386/pmm_malloc.h
|
||||
@@ -27,12 +27,13 @@
|
||||
@@ -38,5 +38,5 @@ index 1b0bfe37852..d7b2b19bb3c 100644
|
||||
else
|
||||
return NULL;
|
||||
--
|
||||
2.35.1
|
||||
2.29.2
|
||||
|
||||
Loaded 100 of 3088 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user