Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc7d1795b2 |
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
-9
@@ -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
|
||||
|
||||
@@ -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/firmwareload.sh
|
||||
./main/postmarketos-base/elogind-system-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')
|
||||
@@ -42,9 +36,8 @@ sh_files="
|
||||
|
||||
$(find . -name '*.trigger')
|
||||
$(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,244 @@
|
||||
#!/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
|
||||
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 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 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):
|
||||
print(f"Checking {apkbuild_path}...")
|
||||
apkbuild = pmb.parse.apkbuild(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 rel_file_path not in apkbuild["source"] \
|
||||
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
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
# https://docs.gitlab.com/ee/user/project/code_owners.html
|
||||
|
||||
device/*/*-pine64-pinephone/ @craftyguy @milesalan @bshah @proycon @anjandev @StacyHarper
|
||||
device/*/*-purism-librem5/ @craftyguy @bshah
|
||||
main/osk-sdl/ @craftyguy
|
||||
main/mesa-pvr-dri-classic/ @xc-racer99
|
||||
main/postmarketos-ui-plasma-mobile/ @bshah
|
||||
temp/u-boot-librem5/ @craftyguy @bshah
|
||||
|
||||
# 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,8 +3,8 @@
|
||||
# Based on: main/binutils
|
||||
|
||||
pkgname=binutils-aarch64
|
||||
pkgver=2.38
|
||||
pkgrel=0
|
||||
pkgver=2.35.1
|
||||
pkgrel=1
|
||||
pkgdesc="Tools necessary to build programs for aarch64 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends="gettext libtool autoconf automake bison texinfo"
|
||||
@@ -15,14 +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
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages=""
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
@@ -30,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
|
||||
@@ -63,18 +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
|
||||
"
|
||||
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;
|
||||
+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,8 +3,8 @@
|
||||
# Based on: main/binutils
|
||||
|
||||
pkgname=binutils-armhf
|
||||
pkgver=2.38
|
||||
pkgrel=0
|
||||
pkgver=2.35.1
|
||||
pkgrel=1
|
||||
pkgdesc="Tools necessary to build programs for armhf targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends="gettext libtool autoconf automake bison texinfo"
|
||||
@@ -15,14 +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
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages=""
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
@@ -30,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
|
||||
@@ -63,18 +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
|
||||
"
|
||||
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;
|
||||
+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,8 +3,8 @@
|
||||
# Based on: main/binutils
|
||||
|
||||
pkgname=binutils-armv7
|
||||
pkgver=2.38
|
||||
pkgrel=0
|
||||
pkgver=2.35.1
|
||||
pkgrel=1
|
||||
pkgdesc="Tools necessary to build programs for armv7 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends="gettext libtool autoconf automake bison texinfo"
|
||||
@@ -15,14 +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
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages=""
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
@@ -30,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
|
||||
@@ -63,18 +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
|
||||
"
|
||||
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;
|
||||
@@ -7,11 +7,11 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.35.0
|
||||
pkgrel=2
|
||||
pkgver=1.32.0
|
||||
pkgrel=4
|
||||
|
||||
_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="
|
||||
5c78ac835881f3647d2f434ba79f42e2098ac59c1a32d78b11062ea1bdc07f79dd19f51dd19aeb04853525c87759c3cfc2ad255ad65e1e193bd25d1d7d8143fc busybox-static-1.35.0-r2-aarch64-edge.apk
|
||||
"
|
||||
sha512sums="c101e490becccf14381bece807738bf29827d53f7d803b198068f7ecf420d46b77701185da98faa3cc19ea2b6a2ac6b564665e0dedb5aa56cb59f1a4931f278b busybox-static-1.32.0-r4-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=2
|
||||
pkgver=1.32.0
|
||||
pkgrel=4
|
||||
|
||||
_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="
|
||||
66eafcdcacfa2bc1bfe777add65e2471994932c2ddb68e30852e87d5d1a26e294e33b888547a4d05c281a9c2d570f0f992cb77a68de367086c055ea285ff31b6 busybox-static-1.35.0-r2-armhf-edge.apk
|
||||
"
|
||||
sha512sums="52acbc4b39adf80b5c31cc221aee96666327803c1b5eb70377e245b3cdc4da05bd81d095b4a8e7d01a8c2e379198e5ae4df0c7d21dc7fa6a7843b3e64460b382 busybox-static-1.32.0-r4-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=2
|
||||
pkgver=1.32.0
|
||||
pkgrel=4
|
||||
|
||||
_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="
|
||||
ce9099e461f7bb48a5312d00f7dc7b7e863c612925d8d0b8d1c0e6d7689a2d6b9eac47c7627f53eaa8350742d884a457b8fa65b8758ff62e349688141dcdd907 busybox-static-1.35.0-r2-armv7-edge.apk
|
||||
"
|
||||
sha512sums="fcc7619f591b44992b03268dff2c0cfade24577bcb277006794c628f8de7093107a0c191f320e7d2e307aa0680be3b93d2e433a1d1527c035f966ecdb8ed7b0f busybox-static-1.32.0-r4-armv7-edge.apk"
|
||||
@@ -1,14 +1,14 @@
|
||||
From e289226f5f16db14ca549efb41ca82accfe7ea8a Mon Sep 17 00:00:00 2001
|
||||
From 4ed2cc3054f444c683f54954c32e586a54066337 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
|
||||
Subject: [PATCH 01/40] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 48be81c9accb55c3c5ee683c84fa1f908bb18764 Mon Sep 17 00:00:00 2001
|
||||
From 09a32a40b34477cd787deb12833c063a09dea7b2 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
|
||||
Subject: [PATCH 02/40] gcc: poison-system-directories
|
||||
|
||||
Add /sw/include and /opt/include based on the original
|
||||
zecke-no-host-includes.patch patch. The original patch checked for
|
||||
@@ -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 5a4b3c6c234..9d1126e9751 100644
|
||||
index 0d532a64bfe..86e57038042 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 5a4b3c6c234..9d1126e9751 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
|
||||
@@ -7727,6 +7728,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 5a4b3c6c234..9d1126e9751 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.34.1
|
||||
2.29.2
|
||||
|
||||
+9
-14
@@ -1,44 +1,39 @@
|
||||
From 767b97ca271e82601a435015190fd15bfb28ae12 Mon Sep 17 00:00:00 2001
|
||||
From 77e75a23e9bdf8863823225567c509b6fed49e6e 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 03/40] 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 9d1126e9751..4b8335bbd1f 100644
|
||||
index 86e57038042..87ff404bc20 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -15920,6 +15920,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -14645,6 +14645,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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From b8abbd503d1be992bf1d204f0e6de5260fcdf533 Mon Sep 17 00:00:00 2001
|
||||
From 3b76b0c848746d4adbc4e8db408efd41aefb829c 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,
|
||||
ObjC++, if the optimization level is > 0
|
||||
Subject: [PATCH 04/40] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/c-family/c-cppbuiltin.c | 4 ++++
|
||||
@@ -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 9f993c4aff2..7db314195ff 100644
|
||||
index db91a36794a..ed976c71404 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -1421,6 +1421,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 9f993c4aff2..7db314195ff 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 4b8335bbd1f..833164e0a2b 100644
|
||||
index 87ff404bc20..01e67e97491 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10224,6 +10224,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 4b8335bbd1f..833164e0a2b 100644
|
||||
@opindex O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 1837896f54bd318788c1ba6dbd19c3efe147ba20 Mon Sep 17 00:00:00 2001
|
||||
From 483912c560424ee8b5cc996990d45802671fc73f 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,
|
||||
but always link the sanitizer libraries with --no-as-needed.
|
||||
Subject: [PATCH 05/40] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
gcc/config/aarch64/aarch64-linux.h | 1 +
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 1ba693868db68bef5178fd797c9e7d2cc4128182 Mon Sep 17 00:00:00 2001
|
||||
From c57a8b43401ca9a1b889fa9fd421ac49c3dbd380 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.
|
||||
Subject: [PATCH 06/40] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From eb2f1f7d7c503959279a7317af7b9a7625eecc6e Mon Sep 17 00:00:00 2001
|
||||
From a58dad2c52639422671ac6986c36e48499fc2f20 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.
|
||||
Subject: [PATCH 07/40] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 7a4086e83e3abbf2c20b7211e2a2c0bf00f25ff8 Mon Sep 17 00:00:00 2001
|
||||
From 98b2b8f7de60ed1b6b7602124ef6db278cf3c212 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
|
||||
Change the buffer size.
|
||||
Subject: [PATCH 08/40] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
gcc/gcc.c | 8 +++++++-
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 1c38cbf1f75066c3acc145f449f1fbd0b5de7968 Mon Sep 17 00:00:00 2001
|
||||
From 035775ef38206ed2859500efe5fb42ceec2e858d 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
|
||||
bootstrapping.
|
||||
Subject: [PATCH 09/40] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From e4c844ce0c1c355c2d1cf6a6e1595030b8ce2a5e Mon Sep 17 00:00:00 2001
|
||||
From e9875d74e75c601b95dba677bc9e58c869150212 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.
|
||||
Subject: [PATCH 10/40] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 79309ae34db26104ec85f6af31a4a8133142fe6d Mon Sep 17 00:00:00 2001
|
||||
From 764e64bba73a7b7eb5154c8537781412252ed33e 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
|
||||
Subject: [PATCH 11/40] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From fdf5ef3d1e61625cb96647d5bdc4ca0a32d287ec Mon Sep 17 00:00:00 2001
|
||||
From da46d99b1b7661a98064a45bdccf08c1867582b0 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
|
||||
Subject: [PATCH 12/40] libitm: disable FORTIFY
|
||||
|
||||
---
|
||||
libitm/configure.tgt | 10 ++++++++++
|
||||
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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9442d683845f63b931374ff81a7d08a31f992135 Mon Sep 17 00:00:00 2001
|
||||
From 354f2a8ceb70f9f6e1688ba41c1cc1c17ac87329 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
|
||||
Subject: [PATCH 13/40] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.c | 4 ++--
|
||||
@@ -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 16765718cc3..4a855b791b9 100644
|
||||
index c6033688f51..a60e5162995 100644
|
||||
--- a/gcc/config/i386/i386-expand.c
|
||||
+++ b/gcc/config/i386/i386-expand.c
|
||||
@@ -11063,10 +11063,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 16765718cc3..4a855b791b9 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 7a3e354de1ab87e992bfdaf858677ca140b80732 Mon Sep 17 00:00:00 2001
|
||||
From 7fb84007ff62309abffdbddfa751e69c331e82c3 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
|
||||
Subject: [PATCH 14/40] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9a5417a787c2ba197c0a3002ea7423488bedab0a Mon Sep 17 00:00:00 2001
|
||||
From 3f764eb6dc371cc48cfdf231cbd40e64b1f2a671 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
|
||||
Subject: [PATCH 15/40] libffi: use __linux__ instead of __gnu_linux__ for musl
|
||||
|
||||
---
|
||||
libffi/src/closures.c | 2 +-
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ecc537cc597fba87f00d3128fddd5f2a17e7d222 Mon Sep 17 00:00:00 2001
|
||||
From b78dea0f8f09d4092bec52b7ada719ead2552dd2 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
|
||||
Subject: [PATCH 16/40] dlang: update zlib binding
|
||||
|
||||
---
|
||||
libphobos/src/std/zlib.d | 266 ++++++++++++++++++++++++++++-----------
|
||||
@@ -421,5 +421,5 @@ index e6cce240fd5..bd2fe37ebec 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
2.29.2
|
||||
|
||||
+20
-7
@@ -1,17 +1,30 @@
|
||||
From 602c9c669e8270f51b8c9c07c3b8840d3cc5d5e4 Mon Sep 17 00:00:00 2001
|
||||
From 58c529af8a9673b90dc7137065ab788c25b358a8 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 17/40] 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 273edfbf9845a349cec0643c23fff5a740c76f78 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.34.1
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
From 94f4f85904f1c042e4d0c0ac855143129d58fdbd Mon Sep 17 00:00:00 2001
|
||||
From 2a614f9b702b02c312cd513eddb1fc6745f9a3ad 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
|
||||
Subject: [PATCH 18/40] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
From dac504eb0d50d751ac558efaf84d37716e9ee05b Mon Sep 17 00:00:00 2001
|
||||
From dab36b973223e0d6853f564e845bc22dadcc4d2d 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
|
||||
Subject: [PATCH 19/40] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From c2efb7703c2ef381a8b1d1cd751222e0a7e10665 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:00:17 +0000
|
||||
Subject: [PATCH 20/40] libstdc++: futex: add time64 compatibility
|
||||
|
||||
---
|
||||
libstdc++-v3/src/c++11/futex.cc | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc
|
||||
index c9de11a7ec7..7be702dbeda 100644
|
||||
--- a/libstdc++-v3/src/c++11/futex.cc
|
||||
+++ b/libstdc++-v3/src/c++11/futex.cc
|
||||
@@ -61,7 +61,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, NULL);
|
||||
// Convert the absolute timeout value to a relative timeout
|
||||
+#if defined(SYS_futex_time64)
|
||||
+ struct
|
||||
+ {
|
||||
+ long tv_sec;
|
||||
+ long tv_nsec;
|
||||
+ } rt;
|
||||
+#else
|
||||
struct timespec rt;
|
||||
+#endif
|
||||
rt.tv_sec = __s.count() - tv.tv_sec;
|
||||
rt.tv_nsec = __ns.count() - tv.tv_usec * 1000;
|
||||
if (rt.tv_nsec < 0)
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 5cc67e1262c1641aefa6da1e31bc759ecd1becbd Mon Sep 17 00:00:00 2001
|
||||
From ca8a8331acef15d0b3b095b8c63539acd1d93e8b 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
|
||||
Subject: [PATCH 21/40] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
From 154f797756e8098f33fa16799749b4cd827dd81c Mon Sep 17 00:00:00 2001
|
||||
From 23468db70f830e99ac138826d28cc33fa71d3405 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
|
||||
it unconditionally, as otherwise we get link failures if some objects are
|
||||
-fstack-protector built and final link happens with -fno-stack-protector.
|
||||
Subject: [PATCH 22/40] Alpine musl package provides libssp_nonshared.a. We
|
||||
link to it unconditionally, as otherwise we get link failures if some objects
|
||||
are -fstack-protector built and final link happens with -fno-stack-protector.
|
||||
This seems to be the common case when bootstrapping gcc, the piepatches do
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
stack-protector flag usage.
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a025b2325486bcba0cdf82a0468013961fe7cb99 Mon Sep 17 00:00:00 2001
|
||||
From 67513cb76a43014172f54384c3bad0c41e949c8a 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
|
||||
Subject: [PATCH 23/40] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
+6
-7
@@ -1,19 +1,18 @@
|
||||
From da8359d60789065ad866b0d5e3efa03d69829851 Mon Sep 17 00:00:00 2001
|
||||
From 5d9d38da4f523c052a5bcd2562d79809b4136f2c 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 24/40] 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 56a29e6c843999581b043b9a826853f90a2fd1e8 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.34.1
|
||||
|
||||
+51
-11
@@ -1,16 +1,44 @@
|
||||
From 88e39c0c4bc64a5734fdd6f255b62fd8711d73bb Mon Sep 17 00:00:00 2001
|
||||
From ac0eeb3237ac2cf75c19be92afe3335c9a0d83bb 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 25/40] 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.34.1
|
||||
2.29.2
|
||||
|
||||
+7
-7
@@ -1,7 +1,7 @@
|
||||
From 97972b0c9ef7b7f6b7ca87e2bbae6cb4e3adff51 Mon Sep 17 00:00:00 2001
|
||||
From 3f35cf750117fa7cbceaf33e4bea008d0688bd93 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
|
||||
Subject: [PATCH 26/40] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 2886563232a0c829e29a4a8d0e1d83392e134aef 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.34.1
|
||||
|
||||
+14
-14
@@ -1,7 +1,7 @@
|
||||
From 62e3ecf4d1216fb0daf9b12db3f4310170a80f8f Mon Sep 17 00:00:00 2001
|
||||
From 48342d154084bb9610b8f02f93fcfc2aa606595a 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
|
||||
Subject: [PATCH 27/40] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
+26
-26
@@ -1,7 +1,7 @@
|
||||
From a259508e9e3eb1dd5ebd160ac4600cb948d850fc Mon Sep 17 00:00:00 2001
|
||||
From 0d517a7c90f9e21616c8ad0c66e24c1554f6658c 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
|
||||
Subject: [PATCH 28/40] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
@@ -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 987eff0abba..03c8bc6f496 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 987eff0abba..03c8bc6f496 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 987eff0abba..03c8bc6f496 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 987eff0abba..03c8bc6f496 100644
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2699,7 +2699,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 987eff0abba..03c8bc6f496 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 2df8f5e7bfe077f5bdb1506d971644c471af4a06 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.34.1
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 3d86ab883c2a67dc9828f73a3d84c9fdb202ec32 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 29/40] 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,74 +0,0 @@
|
||||
From f45e75200cdebab7c23960d3ccebec862e269557 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.34.1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From da63b5262701f91a2261812332f2850be0180634 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 30/40] 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
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 18d6d2d1f62a4232340696fb7d68d248c751e416 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 31/40] 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
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From eec75a34ecc5074ed5857a8a2964d5a1e8fe5a66 Mon Sep 17 00:00:00 2001
|
||||
From d9942a2e54f69dee9c03e5e4339a6c62473e6845 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
|
||||
Subject: [PATCH 32/40] gcc-go: Fix handling of signal 34 on musl
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -39,5 +39,5 @@ index 11e4ec436bd..fe866eacb27 100644
|
||||
|
||||
if test "${GOOS}" = "aix"; then
|
||||
--
|
||||
2.34.1
|
||||
2.29.2
|
||||
|
||||
+6
-31
@@ -1,43 +1,18 @@
|
||||
From 61fc6a52f3fc5fe6c66dc2dd0fa222ba1349d7e5 Mon Sep 17 00:00:00 2001
|
||||
From 38e7c12086acae4507f9d5067f947431a28c34db Mon Sep 17 00:00:00 2001
|
||||
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
|
||||
Date: Sun, 30 Aug 2020 18:33:49 +0200
|
||||
Subject: [PATCH] gcc-go: Use int64 type as offset argument for mmap
|
||||
Date: Sun, 30 Aug 2020 18:01:03 +0200
|
||||
Subject: [PATCH 33/40] 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From dfd96cebf29a04f8a89587deb7469274cd206382 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.34.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From a4e800081081b00539bbb6fd8b5cf6b66504cfaa 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 34/40] 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,7 +1,7 @@
|
||||
From 54aca66b0640f56b7b0473ebd08ec8e9c8edb78e Mon Sep 17 00:00:00 2001
|
||||
From 57ccf0ad7f0c4b1f998ebfb6cdaa7d1876012d66 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
|
||||
Subject: [PATCH 35/40] gcc-go: signal 34 is special on musl libc
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From e6d4cdd4d03cceb01e8ed03bbe7d35b5798abc88 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 36/40] 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
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
From c61dfe08fa888a93fd1d65484a79dc4dd4260c03 Mon Sep 17 00:00:00 2001
|
||||
From ac54a2afa01a3ebb06346f8dac505f0babbbe1a7 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
|
||||
Subject: [PATCH 37/40] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c
|
||||
|
||||
---
|
||||
libgo/runtime/proc.c | 4 ++++
|
||||
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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
From f9defb064cdd5565d308df5d61f6881ea601e276 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.34.1
|
||||
|
||||
+5
-5
@@ -1,17 +1,17 @@
|
||||
From 9e7be29ad618d48740f42c98ba93e8367341b63f Mon Sep 17 00:00:00 2001
|
||||
From e456a63af7f0bd1f519de98e74f864be0f73572a 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
|
||||
Subject: [PATCH 38/40] gcc-go: link to libucontext
|
||||
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,275 +0,0 @@
|
||||
From c25b1e409bd20c7a1c47063e36c75f0dcca0b410 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.34.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From f3a1e98d6d4d546bfb749b91c1f3639df905c1d0 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 39/40] 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,57 +0,0 @@
|
||||
From 0282e9fc31d4245f0c562ac42fa7c900363c2c12 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.34.1
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From b36fd572e6cbe63dca6fbedd91f17d2797524eaa Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 17 Nov 2020 10:35:40 +0000
|
||||
Subject: [PATCH 40/40] opts: move -fpartial-inlining from -O2 to -O3 or
|
||||
higher.
|
||||
|
||||
We have observed strange behavior from the inliner on mips and on
|
||||
s390x when the new partial inlining feature is enabled.
|
||||
---
|
||||
gcc/doc/invoke.texi | 5 +++--
|
||||
gcc/opts.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 01e67e97491..6c4c2937b8f 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -9212,7 +9212,6 @@ also turns on the following optimization flags:
|
||||
-flra-remat @gol
|
||||
-foptimize-sibling-calls @gol
|
||||
-foptimize-strlen @gol
|
||||
--fpartial-inlining @gol
|
||||
-fpeephole2 @gol
|
||||
-freorder-blocks-algorithm=stc @gol
|
||||
-freorder-blocks-and-partition -freorder-functions @gol
|
||||
@@ -9234,7 +9233,8 @@ NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
|
||||
set by default, and is activated when @option{-O} is set to 2 or higher.
|
||||
This enables additional compile-time and run-time checks for several libc
|
||||
functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
-@option{-D_FORTIFY_SOURCE=0}.
|
||||
+@option{-D_FORTIFY_SOURCE=0}. Additionally, @option{-fpartial-inlining}
|
||||
+is only activated when @option{-O} is set to 3 or higher.
|
||||
|
||||
@item -O3
|
||||
@opindex O3
|
||||
@@ -9246,6 +9246,7 @@ by @option{-O2} and also turns on the following optimization flags:
|
||||
-fipa-cp-clone
|
||||
-floop-interchange @gol
|
||||
-floop-unroll-and-jam @gol
|
||||
+-fpartial-inlining @gol
|
||||
-fpeel-loops @gol
|
||||
-fpredictive-commoning @gol
|
||||
-fsplit-loops @gol
|
||||
diff --git a/gcc/opts.c b/gcc/opts.c
|
||||
index 73162528938..1d0d997eda2 100644
|
||||
--- a/gcc/opts.c
|
||||
+++ b/gcc/opts.c
|
||||
@@ -492,7 +492,6 @@ static const struct default_options default_options_table[] =
|
||||
{ OPT_LEVELS_2_PLUS, OPT_fisolate_erroneous_paths_dereference, NULL, 1 },
|
||||
{ OPT_LEVELS_2_PLUS, OPT_flra_remat, NULL, 1 },
|
||||
{ OPT_LEVELS_2_PLUS, OPT_foptimize_sibling_calls, NULL, 1 },
|
||||
- { OPT_LEVELS_2_PLUS, OPT_fpartial_inlining, NULL, 1 },
|
||||
{ OPT_LEVELS_2_PLUS, OPT_fpeephole2, NULL, 1 },
|
||||
{ OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 },
|
||||
{ OPT_LEVELS_2_PLUS, OPT_frerun_cse_after_loop, NULL, 1 },
|
||||
@@ -530,6 +529,7 @@ static const struct default_options default_options_table[] =
|
||||
{ OPT_LEVELS_3_PLUS, OPT_fipa_cp_clone, NULL, 1 },
|
||||
{ OPT_LEVELS_3_PLUS, OPT_floop_interchange, NULL, 1 },
|
||||
{ OPT_LEVELS_3_PLUS, OPT_floop_unroll_and_jam, NULL, 1 },
|
||||
+ { OPT_LEVELS_3_PLUS, OPT_fpartial_inlining, NULL, 1 },
|
||||
{ OPT_LEVELS_3_PLUS, OPT_fpeel_loops, NULL, 1 },
|
||||
{ OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
|
||||
{ OPT_LEVELS_3_PLUS, OPT_fsplit_loops, NULL, 1 },
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From ca0b670b87284afa341f1bef57f5614d88aecb4b 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.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/sys/types.d | 25 ++++++++++++++++++++++++-
|
||||
1 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/types.d b/libphobos/libdruntime/core/sys/posix/sys/types.d
|
||||
index fcf39b5b..aacd0df0 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/types.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/types.d
|
||||
@@ -140,10 +140,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)
|
||||
@@ -1,84 +0,0 @@
|
||||
From eab088e3a76ce23cf2365351c59707e2dd0aa599 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.34.1
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
From cad142fc0fa5fa52c886ad8807cc62b34e5f1540 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.34.1
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
From 4ede09cec9f5df24d0d24e7d82b07a9a0ffccdda 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.34.1
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
From 30e4c9be8d17c7806beaca9e78f6aff6ebae6463 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Wed, 15 Dec 2021 00:14:19 +0100
|
||||
Subject: [PATCH] Disable -fsplit-stack support on non-glibc targets
|
||||
|
||||
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. 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 by gcc-go by
|
||||
default. On musl based systems with split-stack support (e.g. 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 TARGET_GLIBC_MAJOR is defined to a non-zero value (it
|
||||
defaults to zero on non-glibc systems). The check has been added for x86
|
||||
and s390x, the rs6000 config already checks for TARGET_GLIBC_MAJOR. With
|
||||
this patch applied, the gcc-go configure script will detect that
|
||||
-fsplit-stack support is not available and will not use it.
|
||||
|
||||
This patch has been tested on Alpine Linux Edge on the s390x
|
||||
architecture by bootstrapping Google's Go implementation with gcc-go.
|
||||
|
||||
See https://www.openwall.com/lists/musl/2012/10/16/12
|
||||
---
|
||||
gcc/common/config/s390/s390-common.c | 9 ++++++++-
|
||||
gcc/config/i386/gnu-user-common.h | 5 +++--
|
||||
gcc/config/i386/gnu.h | 6 +++++-
|
||||
3 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/common/config/s390/s390-common.c b/gcc/common/config/s390/s390-common.c
|
||||
index b6bc8501742..afbd8d3fe66 100644
|
||||
--- a/gcc/common/config/s390/s390-common.c
|
||||
+++ b/gcc/common/config/s390/s390-common.c
|
||||
@@ -116,13 +116,20 @@ 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)
|
||||
{
|
||||
+#if TARGET_GLIBC_MAJOR
|
||||
return true;
|
||||
+#else
|
||||
+ if (report)
|
||||
+ error("%<-fsplit-stack%> currently only supported on GNU/Linux");
|
||||
+ return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
#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..554e146dbbe 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
|
||||
+ uses glibc. */
|
||||
+#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE && TARGET_GLIBC_MAJOR
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
|
||||
index 25fbc07f58c..895a7369816 100644
|
||||
--- a/gcc/config/i386/gnu.h
|
||||
+++ b/gcc/config/i386/gnu.h
|
||||
@@ -35,7 +35,11 @@ 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 implementation to avoid silent TCB corruptions. */
|
||||
+
|
||||
+#if defined (TARGET_LIBC_PROVIDES_SSP) && TARGET_GLIBC_MAJOR
|
||||
|
||||
/* i386 glibc provides __stack_chk_guard in %gs:0x14. */
|
||||
#define TARGET_THREAD_SSP_OFFSET 0x14
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From c1408c2e323bf724db3bb8b1523e4cf5848c7e63 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.34.1
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 7b7f146c0dd01fde892ed5b5f40850bdacd7431b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Mon, 17 Jan 2022 16:31:09 +0000
|
||||
Subject: [PATCH] gdc: unconditionally link libgphobos against libucontext
|
||||
|
||||
from: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
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.34.1
|
||||
|
||||
+78
-135
@@ -24,21 +24,21 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
_pkgbase=11.2.1
|
||||
pkgver=11.2.1_git20220117
|
||||
_pkgbase=10.2.1
|
||||
pkgver=10.2.1_pre0
|
||||
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=0
|
||||
pkgrel=2
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
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,28 +170,21 @@ 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
|
||||
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
||||
#
|
||||
# right now, we are using a git snapshot.
|
||||
#
|
||||
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
|
||||
# so that they can be properly tracked and easily rebased if needed.
|
||||
source="https://dev.alpinelinux.org/~nenolod/gcc-${pkgver}.tar.xz
|
||||
# right now, we are using a git snapshot
|
||||
source="https://dev.alpinelinux.org/~nenolod/gcc-10.2.1.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 +198,37 @@ 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
|
||||
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-libstdc-futex-add-time64-compatibility.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
|
||||
0024-Pure-64-bit-MIPS.patch
|
||||
0025-use-pure-64-bit-configuration-where-appropriate.patch
|
||||
0026-always-build-libgcc_eh.a.patch
|
||||
0027-ada-libgnarl-compatibility-for-musl.patch
|
||||
0028-ada-musl-support-fixes.patch
|
||||
0029-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch
|
||||
0030-gcc-go-Don-t-include-sys-user.h.patch
|
||||
0031-gcc-go-Fix-ucontext_t-on-PPC64.patch
|
||||
0032-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
0033-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
0034-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch
|
||||
0035-gcc-go-signal-34-is-special-on-musl-libc.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-Disable-fsplit-stack-support-on-non-glibc-targets.patch
|
||||
0046-libgo-include-asm-ptrace.h-for-pt_regs-definition-on.patch
|
||||
0047-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
0036-gcc-go-Prefer-_off_t-over-_off64_t.patch
|
||||
0037-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
|
||||
0038-gcc-go-link-to-libucontext.patch
|
||||
0039-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch
|
||||
0040-opts-move-fpartial-inlining-from-O2-to-O3-or-higher.patch
|
||||
0041-dlang-support-musl-1.2.0.patch
|
||||
"
|
||||
|
||||
# gcc-4.8-build-args.patch
|
||||
|
||||
# we build out-of-tree
|
||||
_gccdir="$srcdir"/gcc-$pkgver
|
||||
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
||||
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
||||
|
||||
@@ -284,7 +261,6 @@ build() {
|
||||
local _libc_configure=
|
||||
local _bootstrap_configure=
|
||||
local _symvers=
|
||||
local _jit_configure=
|
||||
|
||||
cd "$_gccdir"
|
||||
|
||||
@@ -302,7 +278,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
|
||||
@@ -327,8 +302,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"
|
||||
@@ -376,7 +349,6 @@ build() {
|
||||
$_libc_configure \
|
||||
$_cross_configure \
|
||||
$_bootstrap_configure \
|
||||
$_jit_configure \
|
||||
--with-system-zlib \
|
||||
$_hash_style_configure
|
||||
make
|
||||
@@ -424,16 +396,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
|
||||
@@ -518,24 +488,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"
|
||||
@@ -686,14 +645,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"
|
||||
@@ -708,53 +659,45 @@ gnat() {
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e756307338258432bd8dfc41cf27440117bca4cd7a3a80a7009eb06d06004ade0a61eefd773969ed6578afadef96b4813d41961faf8a43c28d0af77a388fea7d gcc-11.2.1_git20220117.tar.xz
|
||||
7e5d342e302b376c729e17998d3fdbb8397ed9330c44e0335c4a7319c010bb8d1680c45f37d9eb96d67f99d052290fe943aa818799307271a846a50232db0aa0 0001-posix_memalign.patch
|
||||
fe147a13e8e460a8ec6df26b7bed67455d55bd6ca238fc52f04095bb8151ec54c85bb048a90fa0ed4f42f97caacd158dec0b3651f32ecac3ce39c53e18aa3747 0002-gcc-poison-system-directories.patch
|
||||
6d8d6335ae657a65fea2bfed74c1da41208ae8849bd156622425c691d45d29a3e42ad419284ca70630c10cb14a458322dbcefc23ee87f24b85fdd0bb28bedc61 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
122e99feaa5954aea8f9bf9157b1d486725ea6643727eee440ab818d4a69c817eca6ac5ece3952687e53ca92781c3d00b5ae3e6fb20c71880377ff1b9c72650b 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
dc98a6f99dbaee44b1fb1ecdb5eb924a9636d705dc556d1a760611b0d38c215b9e33a9cd13f5307d2d3c16f86ebe8e9f700ecffc05cf9739554f57f3d953da0b 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
f55372e68065c31020a8afb5bb0b341a155f59887c8723151e3d2842f1a93842e86dc91a3860661762fbba6de340ba75727ad87e04b177975428f5d4010016d3 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
f599d8c0e65782938a1fb31d40720f31c9f0acb4fa7a34b3dd732dc0ead211447e8f9d153dd527471acea0508bdf625056a2128ab43f247080068bc54b711e85 0007-Enable-Wtrampolines-by-default.patch
|
||||
2a1f0c8f1a956e63aa4f61154a883aa510d619d5c5e3acedac2b19d0996d97e35f30e47fa7dca90f24fc8b6133860c91b43379afcf57fcf677c3490e7320cf2f 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
140cbba61b82069d153416be4b0ac6164280f2a8f9c96f122175dba0c1ba6ea7aaba3c32db38e580c1caed4a94d4f2a22972f021ca82c3a609b8287f53d40a23 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
39bad14674b741e4745b6e1a6e3f34af9c37b8b8258cc2b260ac3833e61480aebded0afc33ae45c7c126b4b5debfb01439a02521d4b299781bab0532736f462c 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
ffe5fd575cce27ba84b05a1cc37df8b3f5fa5c879fe4214054b6b441b85df974ac6f56d45eedcdeb81a4aa7db3418977e7acc50b05343ded15049d9d40da4f83 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
07a38d9233f1541cb3ba9c64b1ed8078c37fabeee46c4fb223171416105091cf8ec388b1dc7db4496b2da62c4198534de379e0f99490ff8cfb5cf9e508b0188c 0012-libitm-disable-FORTIFY.patch
|
||||
a42cf4072d23010b55be2d87e8a345dcc9cc09e3a655c8624d231659647d776053381f245a86214d1a11f3bc607248d08881e014d51e3920fb5659656d4b70e6 0013-libgcc_s.patch
|
||||
8b30699003a32f81ab9db6091570ad473e3a7269b2e4a1a1c0381c09031cc360ad8189f4f1cf7805a683e72b190752d5b7667626c5e4d8dd6ccf1741e7c53d6a 0014-nopie.patch
|
||||
cfe8a7a8060022d4210cacdac6a863ca1d9ab0f8e68c93928cace8d5219bb2cea6fa8aa78ec3217df51c44ff0b3814e3a6d5bce22375ff67da749d385e3d3f5d 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch
|
||||
511ab327571ad82f58acf94d9ec40c7b0920a1b163ff1aecce185281fb6121624bf2c1cdc6761bc794601882d0973fffb4664031315f0eab2623acc5ad40621a 0016-dlang-update-zlib-binding.patch
|
||||
49b8d10142e1cd5a01235cab5560d87d32a8c6c4f05e14db521eee1809128b038695e49dc5a61876e35a34845b2241c0169cb58fc0011dab62af2b0e6b185ca5 0017-dlang-use-libucontext-on-mips64.patch
|
||||
b092da7ac532fcb7b931d27eb0175374adb9f4a16e782c4f803af9cf073457b074f0c1fe0065a03f8432f2d422fa4e0ebe760d849d8f614337e33f3f027bb714 0018-dlang-libdruntime-define-fcntl.h-constants-for-mips6.patch
|
||||
6604a8653b660655baa0ed844326f49a6535e12934bc196acadf19fbcb83a37ea455e3a1fc60d529d62a672e5fbe97524b278eaa8fb3e25fb4a6ba362ef9ca91 0019-ada-fix-shared-linking.patch
|
||||
37b534d4c9fbc340e5df790e85b8997986db100fd86ea1b27b912ef5fd0ce5f6b248e468ffbd03e0a543906f57dcffe33d3975c63dcda95efac6713ed03c1606 0020-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
1c8be5fa094ad499a021e983d9f29a9e4375e03e0633c789aebc0ee7af0d33c4a1ac952257e3a807f17b7393d110657bd149459e0526a56b4f6380e09d3c4eec 0021-add-fortify-headers-paths.patch
|
||||
ba1d19e92e85551d8581a9eef6c103e1aee2ed47af8f6261d1c26c5d26b7a4b94cc98a6a22936f0d6ef868f3ebf77ed9cb5e8f3147a33c7270810084c47e22a7 0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
d1aa039a04a69a2b08ec44a54541c90b66be6b19d24a1060c587ec72e40adb1e8c33e2a5036f8c1f9b43a062c373b094e57f4bbb1225220c1527218661e5d9b6 0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
d5468649da2e973bc7ce389dd9797e0b3bb2acf93b3f17e0dcd9cf70b79fb81dc0268d0989693e72821a13376c134c648942cad6b8633f6615ac57573153e879 0024-mips64-disable-multilib-support.patch
|
||||
198a369b7bc67431cd11b3bc179a97349640864b3397d09932002ccea9e3c06cdd93671587ec43cf59aef66fc42649afb2939e08fa0d7354accd3554ede21dd7 0025-aarch64-disable-multilib-support.patch
|
||||
967b238f8740c6622613645a04415e7fd1a366fe46252ba49271be59b1396eb8ab73211516fda51c2b71f306b195e5527e065a58ef34f14984dbecacae38981c 0026-s390x-disable-multilib-support.patch
|
||||
7fff62eda6c6b0214825cb2ca29e5f8957b5b3fafdd3e3c2d1ab9036d0d1a62e002b8fca2db750152593ff08aba15ecf281f5a8b1aee662107969f0fd07de3a1 0027-ppc64-le-disable-multilib-support.patch
|
||||
ee883dd8775eaaf486cb926ec301d53a89043074917afb84fe2d639ff7fa5bb0497c204509f447f9920ddb09dcd73c179056b3790a13b145cc46dff451484b36 0028-x86_64-disable-multilib-support.patch
|
||||
b1ab2f7a6bbf659b0b37eec3bfbf1f85e017ca1d4382816ce8f0c6db6c3a5328c9ace8ca4c1716e715d6d076eb5e9e3bd6212299ddae7a13776f93dfc26ff1cc 0029-riscv-disable-multilib-support.patch
|
||||
1990d2e5d38f338b7beb888490cacfb0020a9c836402400f6b828341f946ff65bdc77b872f470fdfeaaff3e933396baace3233d3bf21fad76f999c0ce916d8f5 0030-always-build-libgcc_eh.a.patch
|
||||
0e7db3d9ab218122beecf663fe2cef236ca02538bc465f002a3fbde295d2d90e75b6b95942cd9018f72a466ecf149fa6d785999c75862d409ba10f6dce5a969a 0031-ada-libgnarl-compatibility-for-musl.patch
|
||||
1c4cdbecffa8a46b5fc21b886a03c8d7447d90b0c44f13438f431b02f66583894166c4798df9d71c45006df43d3808748f52be18317197eab629b7630cdbe5ec 0032-ada-musl-support-fixes.patch
|
||||
bb0f762bbfde7f38d1e82b2a443e3b8e662460bbe797f6260e51172d12a32c502d7b98c5d738f36da16d47a38bc739231fd5a76222159f5c50c034929da5b6e3 0033-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
fe5817651c3a1d981da6e4f34302d9345db5dcfe4e48feb1ef303620ab4f145ac758c80e40ec4ed442c445d6a1b087d175fa16d0e88c419aaa7e627cd884e369 0034-There-are-more-than-one-st_-a-m-c-tim-fields-in-stru.patch
|
||||
61225c94843c8fc89cdc84c4e04e9c5f3c113e3ec893d2e4be2935697851a29501cb8a2c8272a7ebe3b5fce110b061579b58439dfcb40a85224eba0f53ab082b 0035-gcc-go-signal-34-is-special-on-musl-libc.patch
|
||||
b4898ff728edef81b7553aa619ce4036256abad907e7c3e00b027a7552cd84fd79048021d29bfaa18a4f75b73f6207e4da63e010d01eb906f6db12cfdd88cb67 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
|
||||
715e21327c3264f81503116a86a8f725590e58be3249632d4e4c7f81ee3e82c86ec2745329acf8f413c234fc8b3a0e0a02cbfe6d0ea625486caaa3cc8a93951f 0037-gcc-go-link-to-libucontext.patch
|
||||
2e7588d07594e7e84e797bcdf2d6983c6f33a4303374643d23b56d595160c61d8777495c52a3739d99bd50b7b8c06749f1462dbc05a4076b23a4344438ce887e 0038-Use-generic-errstr.go-implementation-on-musl.patch
|
||||
766aa0b11ff8270ee5850ae4167bc2b84ec2c98d8f68e8e0f2a474f2ac27c3b45c7208afbe4d2051a526691107ec00d8258264d40cf5fc086ad40f63acd5630d 0039-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
7f79cd3bc3b345ad8b5d3d9494db285d5d1da57f4c1fb1f57aafe21d9a2f9c091ec1da9a64550d6bf7473f92adf7d249dfdb255c31f54ef2d0829b47e854d471 0040-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
f5b20eef9db3a60a7a0f3214a92fdd5ab7a158ce7d36bfef002a469d39f1fedc1531250bde80d56c640066a22145ca0707f4b2ae779d19e18954db1cf45102cd 0041-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
||||
ecb6a3836226fc43e72cee0fe1d59dcdc435e0eaf66378e31d1b6e8109572674c553a954a3409d733fea213ceb9dde8804b97f5802d1f5bc6c8f89c19f81558f 0042-Fix-attempt-to-use-poisoned-calloc-error-in-libgccji.patch
|
||||
9e6a5942b9b23df83aa453fa1440a3c90861f4760c8fb0481d24efa9c68c9bdf6bfc211877000221a7c663a907f01d26ce0798825b6bc0b82c1549279144e223 0043-stddef.h-add-support-for-musl-typedef-macro-guards.patch
|
||||
e9cd07f298fff1539e835b7cf440c17acf5fbe2ab4b468e645634e0005bdc45992b25de41d5766a9884beeceb8e92231f5e93967c801e96442327db6d4e6f987 0044-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
2776ffba938a293c7589483684a2c75991fb500918899c2853efa61a7e8295a5dcd192085730c835c6fd51afcee4d84d8c4883ba71230a8d4ceb65691940e13a 0045-Disable-fsplit-stack-support-on-non-glibc-targets.patch
|
||||
51edccd279c70628d8b34db74e2667de75482ed659f1a5f57407f433af89163d9b6b47986467a59d534e2177f872e5de90c95ede1dc8f1b2829fbe57590d8f4d 0046-libgo-include-asm-ptrace.h-for-pt_regs-definition-on.patch
|
||||
43b67d2970dcf65d90149ff2ea4f7264f7e01267f3152b0a244850e4f8a6e43da117015dc75dfd30c6428f7088d3cf4b6703f8735f0430959f128ce53de0b821 0047-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
"
|
||||
sha512sums="30c3e36c6e001d172b6219dbf5f0383655d29cbed8a197e1d6139213aacbfdb7cbca63553eedf3a4b35bd445a87ee0f555838d8b2cd7a46ab6bba7951a6b60c5 gcc-10.2.1.tar.xz
|
||||
70cfaed5960c5c9fa542d4f491be9c3291e7b0bf89f3e08212b6f490b8e9daa0474717c95e06454ff3c3258fe54a9ed13db35dbb316db161837b2a7f5fdeab7e 0001-posix_memalign.patch
|
||||
b821d95f0279564fad1c504f2d6968a38e518828643bb88466cc5eb2ff5a968ab998c12ef24d9ae4bee5663bf912fe751985a52483b86e09b3825fd3aa5e9bc2 0002-gcc-poison-system-directories.patch
|
||||
04f60941b5bed089be6e38d38346caaa9e91bc7b91a3e805df2661e728e43c276595efa4c2e40f99b4528d699121f12a0f1a59efd66d20f8b18908ce6f80ead3 0003-Turn-on-Wl-z-relro-z-now-by-default.patch
|
||||
97aff34931460d341cc0af337da783409139d520910cb1f8c68a54981fc68028161274d4ac3c7f264e3c87fa5222e439321fbe02a01d79b0470b644c118aa3e9 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
b58f3ae0d22009bc13d9f9cabf74a42db8019bfb5da8a31f5f5bf3042782bcb736d555a7ab8439d65894627094b8e0e65ba077b501f939b6f5171e435e77b3fd 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
67226e4f49cde2e5b27b987d1b89b903fdb4127d1339754e85eb135d99601b0718448f9decd3d36a27ba8bde92c50a886f0f6853d44206dba0f0d5d0de126c02 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
0756f53b630e8211cb278a8d91859de5bf4758d04e6f3b7e105633aaa1e319c87ab3f63cda0debb97fce430c44aa2d2c744f41c400711cae5187601e9280e8d6 0007-Enable-Wtrampolines-by-default.patch
|
||||
1db23c64e29d7c373a57df6ed6935557bc7e5e7627e5df3604ee179907fc663421c3c9e9c16fd406b80533bd653e5388669619a908e30c799e8bd25201a7352e 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
e7ac9b12bc66b72cbab02dba17d7bed8aa6365dbe800ce46ba3428d66004f9308f4d26c97f2c2575cf787ee265a343a05c52f1f90e4257d3e97de281c3d14bf9 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
a62736b28b667b53419a433aa9b73a89a28079639b0fd45dae37faa1eae5dbc8c4f81ccad56c5076d1fab50460512114478bd0d20af58216827632da13109d67 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
afe3a9733c972c90d8d303c7f7308afb016a012d7f61ac62a23a37e98932d87c3d6d8999688c45e1d664f8e793155691f66465651888db3d9ad48d595fb7ceb4 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
62bf455a214586ef8be20d998971df77a198df3638197638634ee0dca972f5cc302f8ff3ac7763af0e92f59398fe109520f8ffab143678ed4517fa62de0bd2e5 0012-libitm-disable-FORTIFY.patch
|
||||
55877b8b81d6a58ca1d02d207469b03d8fdb197b932ef389a393249091ac9619d4d80467232ff521dac733fdb2fd62eb1bd475d54025c74b03afc5ab411a98e4 0013-libgcc_s.patch
|
||||
ec75812674114c48e44eb6330d7e79a0155351377c928ca374b9c577af3ca3b19b435ece2d5ae41c6f32ac7410257a518f0d917775f6e0a6fa272ef8f8915921 0014-nopie.patch
|
||||
c6b04ffcf1d55de9a44cc09b8d9258bd9d3d479e629defb19d42631180b37f57b16d05bbbdac29e98d1d3aff02758baef43203882e46e38f00df118d7d4eef37 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch
|
||||
d800abe3ec4db542ed9a87af7c714338156be98e013e547e201111b390b0018e3f107c494cc1c8b7c75b7409b8560d14320b6dfd1bf6714c1aa887602060ae31 0016-dlang-update-zlib-binding.patch
|
||||
478250c9462f61540b202a17c91f30c8e0a8bef380f473a7828f327773dbc6c8d7d2df9d510289eedfad66d14d661620f358d4e2248a6a3176535368743ef16f 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch
|
||||
74076bafd154d4af206cecb5e338ebb5c8ff4098e7ded862f92e87b66a5c2d8abc20ea7acfe967a969e1a575c9686ba444e0d7f03e5020a8f846fda00cce0bce 0018-ada-fix-shared-linking.patch
|
||||
1eb3a2a762194daccdac2494ddac59cc60257999532685faa5606fdb5b6965945e6c199cd2218ee5b9e11b54c2f59b81519692956a06f7af1ff500efa5d22a5e 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
785d6441eccd4323ed0c787a0fc71a8699bddca6f080ff2bfa2eaf3a3e55450076323d01893cf9ff3aa49ee19267611f27b5f725b822af17eeb05aa6a5745f63 0020-libstdc-futex-add-time64-compatibility.patch
|
||||
4df558cd8c2311cf0b84f481c14b2381134ca8bbcdd2a34c289edd0dd24c8732b7b05bdea9a3f1d328f42f8df30f2131100d50b151b60ff64b71a14e09fcf8e1 0021-add-fortify-headers-paths.patch
|
||||
061980a1ed749ca305e0577ed9f9c80f7e1c49a133dd59d1598c553a6e1e577ad2a28daf117f7ff6210e625b2408ea1430477036f2212bdbe9100af9158b5951 0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
3100aa94fdcf616e635bce1e711a4f93f39ddfff92021e1446764e95a24f4dfc71d36614138ba407bb1221456658ec51fc0d40d4ac696e9931cb10492da75c06 0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
bcc546f087e84a9b806fcf8f0efdc354dc89a9d93dcd7dab2a9b29a1a88d233eb827b10bd76ca910c0d114772135368d7565a3e7b3440b500e9609a4db4bff8b 0024-Pure-64-bit-MIPS.patch
|
||||
f2b852c8799064305ebf7b5c9dd0edada0a534c9e4664fe06f3e25efba83afda12e8b147f7a28e812ef6e7a587565da9ee51b2a8990a110975f7b8d8345007f6 0025-use-pure-64-bit-configuration-where-appropriate.patch
|
||||
5b47adaa008020d0d42273ff5da646ace84a7c196aff0529dbabe75c1c03cdd89fe63a8f02904d58fa02d1b1a639923a111f4007d4e7c2cc2cdecceba28a0c74 0026-always-build-libgcc_eh.a.patch
|
||||
4cd8309e60e1bab29f2d5150f9cda8a6a2da9c14010d5f33fd4bb25318f031d36bb5650c69d7c4a0ff077e222229ad59f36d74a27f22f96321f0893b556e83c6 0027-ada-libgnarl-compatibility-for-musl.patch
|
||||
6e307a0b575284c0d4e99a134ac681cd58ed07a31411d43060184f1a1c9ed27af27396afca415a37120fecb3393ce10daeac9312f82d7d0e83be3c2c744a1eea 0028-ada-musl-support-fixes.patch
|
||||
121e297b1b0b2cc9cc2c4785c1e1d33995db050f428d92d8327d9720fe10319cf35592ad6e18e4c98d6f68a2ce6a2ccb172ad7ace26d0e4ad450229e673c2c40 0029-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch
|
||||
c0217653d19c2495fa3aeda18e40251531e64d5aa67221451a9e86fbd7a696ff063d6aaa01c8662c07bf85512ac8397592df2e4f622933438bf43b2915247d20 0030-gcc-go-Don-t-include-sys-user.h.patch
|
||||
70727dc46af7c0c46d7fcb58edc210f7b2be3fab91263e0b65458fc0073fe7c25c937f00fcb4dcd1a76d44d3b3895fd96853ed16f03daeb7786945bcb7391a76 0031-gcc-go-Fix-ucontext_t-on-PPC64.patch
|
||||
7058a1f8ce66a69e987a308e5b2521234ee3712955f46ab3bccb5c87b0bf6f666e3df585f0323e9494588b51e8300ed9b5d53e7d6229a03f9743892e1b88560b 0032-gcc-go-Fix-handling-of-signal-34-on-musl.patch
|
||||
ae4fc6ee120376902adb90aa7aea2d6fff35dfcafd75aea3ab62be7ffd72364ef0db2584134d48bc7f7fb6392bb8ca44c2970cd75a82a3e0ff12ad9f292fe61a 0033-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
d6d28d4e22129cf585d4481302b2f304c38568008a23c111a1d02544519bfcde7a5c26802861973c95669f2854c2f4e4670b480f6884bacab27c356d360e7054 0034-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch
|
||||
f7582eaa9b6f421652b6705e28a22ba68210ea7e32d3c468e86b481a26bf391c86146e1a3ee4dda51c5cd4bdf4f167d2284c2ac47c97e02b9e5bb755b68cd6d6 0035-gcc-go-signal-34-is-special-on-musl-libc.patch
|
||||
85a5759fe0c736cd637b009b4d42a20c836c54435e90d3fa34b3e1a24a7e703e9e18470c2f7a4d6b2a0c5361b5de75b2467415647cb3d232ee67691e82e7f47c 0036-gcc-go-Prefer-_off_t-over-_off64_t.patch
|
||||
c7d48b3657d37fbaef0696c96f858819bbe5469d7387e99db890eb925703dbeaf11858fdf2ecd556ac85d766c739374d71c5509f5e2fba88eb427cf93e9fdcc0 0037-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
|
||||
1e85dd650a43ce96d489f77e37fd247186e4e1fe2d088be991c3ff8233c923408137d94b72788ebc2ddcac8873c6f326a92138790ab0281722c67cce400f76cc 0038-gcc-go-link-to-libucontext.patch
|
||||
c93e8b0797c54483174b77f942e932eeb832c0784af9948ead7d8d95ca6392ffe3edee0740e835cf3d9310904718384e846a882284c21ccf26a055f8f940a874 0039-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch
|
||||
ff74dbf6a3e10f6abececdce57672e76cca8f8a92f67ed495ae2631265402fed74e9b567fc35ad16d2a62449ca4074b6868ebbc56c68b9cecf8e686018f26554 0040-opts-move-fpartial-inlining-from-O2-to-O3-or-higher.patch
|
||||
eb2d8e432206250a4c4682305390883343e3c8285ac26701a910c1418b6ba5b3681612db846eb298fd47f0163772403340a348b719af751afe410742d6e92472 0041-dlang-support-musl-1.2.0.patch"
|
||||
@@ -1,14 +1,14 @@
|
||||
From e289226f5f16db14ca549efb41ca82accfe7ea8a Mon Sep 17 00:00:00 2001
|
||||
From 4ed2cc3054f444c683f54954c32e586a54066337 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
|
||||
Subject: [PATCH 01/40] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 48be81c9accb55c3c5ee683c84fa1f908bb18764 Mon Sep 17 00:00:00 2001
|
||||
From 09a32a40b34477cd787deb12833c063a09dea7b2 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
|
||||
Subject: [PATCH 02/40] gcc: poison-system-directories
|
||||
|
||||
Add /sw/include and /opt/include based on the original
|
||||
zecke-no-host-includes.patch patch. The original patch checked for
|
||||
@@ -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 5a4b3c6c234..9d1126e9751 100644
|
||||
index 0d532a64bfe..86e57038042 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 5a4b3c6c234..9d1126e9751 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
|
||||
@@ -7727,6 +7728,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 5a4b3c6c234..9d1126e9751 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.34.1
|
||||
2.29.2
|
||||
|
||||
+9
-14
@@ -1,44 +1,39 @@
|
||||
From 767b97ca271e82601a435015190fd15bfb28ae12 Mon Sep 17 00:00:00 2001
|
||||
From 77e75a23e9bdf8863823225567c509b6fed49e6e 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 03/40] 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 9d1126e9751..4b8335bbd1f 100644
|
||||
index 86e57038042..87ff404bc20 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -15920,6 +15920,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -14645,6 +14645,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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From b8abbd503d1be992bf1d204f0e6de5260fcdf533 Mon Sep 17 00:00:00 2001
|
||||
From 3b76b0c848746d4adbc4e8db408efd41aefb829c 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,
|
||||
ObjC++, if the optimization level is > 0
|
||||
Subject: [PATCH 04/40] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/c-family/c-cppbuiltin.c | 4 ++++
|
||||
@@ -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 9f993c4aff2..7db314195ff 100644
|
||||
index db91a36794a..ed976c71404 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.c
|
||||
+++ b/gcc/c-family/c-cppbuiltin.c
|
||||
@@ -1421,6 +1421,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 9f993c4aff2..7db314195ff 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 4b8335bbd1f..833164e0a2b 100644
|
||||
index 87ff404bc20..01e67e97491 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10224,6 +10224,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 4b8335bbd1f..833164e0a2b 100644
|
||||
@opindex O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 1837896f54bd318788c1ba6dbd19c3efe147ba20 Mon Sep 17 00:00:00 2001
|
||||
From 483912c560424ee8b5cc996990d45802671fc73f 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,
|
||||
but always link the sanitizer libraries with --no-as-needed.
|
||||
Subject: [PATCH 05/40] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
gcc/config/aarch64/aarch64-linux.h | 1 +
|
||||
@@ -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.34.1
|
||||
2.29.2
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 1ba693868db68bef5178fd797c9e7d2cc4128182 Mon Sep 17 00:00:00 2001
|
||||
From c57a8b43401ca9a1b889fa9fd421ac49c3dbd380 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.
|
||||
Subject: [PATCH 06/40] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index 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.34.1
|
||||
2.29.2
|
||||
|
||||
Loaded 100 of 3035 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user