Compare commits
156
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
464244460d | ||
|
|
b5063eb65a | ||
|
|
f112bfc632 | ||
|
|
6040a83bc2 | ||
|
|
1f59a4ecc7 | ||
|
|
9d5d6d7ef5 | ||
|
|
da9d54b44c | ||
|
|
91b0823d57 | ||
|
|
2640a4632f | ||
|
|
024a301ebe | ||
|
|
caa4101bfb | ||
|
|
5eaa998a50 | ||
|
|
9369c05ae9 | ||
|
|
ccbc7f8a1a | ||
|
|
ed5f4a5bf3 | ||
|
|
805cf7bb62 | ||
|
|
f7db770f46 | ||
|
|
5ebb29e7a4 | ||
|
|
8736351969 | ||
|
|
0043344385 | ||
|
|
e6ae7507dd | ||
|
|
26064730d1 | ||
|
|
f4f1b0dea2 | ||
|
|
5685f2e68e | ||
|
|
1f9644713c | ||
|
|
0a8c952c39 | ||
|
|
4eb8b81d7b | ||
|
|
348b930e4a | ||
|
|
447802c2e6 | ||
|
|
a1ee78900e | ||
|
|
440e57fa50 | ||
|
|
3747b6cbd9 | ||
|
|
0b3d223ac2 | ||
|
|
94c1e706e6 | ||
|
|
40bba0626f | ||
|
|
0225230ce5 | ||
|
|
05f591716e | ||
|
|
0f36d48161 | ||
|
|
62b4175130 | ||
|
|
50e1216a1f | ||
|
|
2c3d69e439 | ||
|
|
065a85ddc4 | ||
|
|
9eb1f85339 | ||
|
|
300f1ce660 | ||
|
|
7e899024db | ||
|
|
39d38a6314 | ||
|
|
92554e9bb5 | ||
|
|
26efb302d9 | ||
|
|
01a5c18735 | ||
|
|
490618f458 | ||
|
|
de35a48aa0 | ||
|
|
154ff85adf | ||
|
|
ab32a3642c | ||
|
|
de08bca311 | ||
|
|
bf8bbc9a88 | ||
|
|
4e0229f789 | ||
|
|
ed0e80f329 | ||
|
|
a86442b472 | ||
|
|
e92889280c | ||
|
|
b4b69df341 | ||
|
|
e6af038e83 | ||
|
|
206d963026 | ||
|
|
1cbf491070 | ||
|
|
45e5d826cf | ||
|
|
49a14c0daf | ||
|
|
50dd205fd8 | ||
|
|
38ce112cdf | ||
|
|
f3c7308f6f | ||
|
|
65be0d7e81 | ||
|
|
53ea67b177 | ||
|
|
763f75c9ba | ||
|
|
d3fd1f5e3c | ||
|
|
f774de5b6a | ||
|
|
9d3a8332cd | ||
|
|
139b6bdea3 | ||
|
|
81fbe5a74e | ||
|
|
87ef850e88 | ||
|
|
de9808d904 | ||
|
|
64890d86ee | ||
|
|
ae43410d9e | ||
|
|
df89903082 | ||
|
|
7dbb476f4d | ||
|
|
dd5f448bee | ||
|
|
757aa80636 | ||
|
|
7495be948b | ||
|
|
c1d23e5fdb | ||
|
|
54d42e22be | ||
|
|
b63b67e8a0 | ||
|
|
b9c3ee99cd | ||
|
|
764d6f8772 | ||
|
|
4658a9c35d | ||
|
|
5b0cfb6a2b | ||
|
|
939f6b6a36 | ||
|
|
e073914c01 | ||
|
|
629bde0adb | ||
|
|
62d4d0c62a | ||
|
|
58690846bb | ||
|
|
d49c15000f | ||
|
|
ff3e1ab038 | ||
|
|
81594d2745 | ||
|
|
78cbceb756 | ||
|
|
ab3bcfe071 | ||
|
|
97c5995c7c | ||
|
|
3bb2859c98 | ||
|
|
32336fbd00 | ||
|
|
b59aac214c | ||
|
|
51c564d256 | ||
|
|
73a9100e13 | ||
|
|
b8e23f13fd | ||
|
|
0bcef33a6d | ||
|
|
ed29e90653 | ||
|
|
6eec0b0503 | ||
|
|
3b5e3cb66a | ||
|
|
c1fc79202f | ||
|
|
8d9b899b04 | ||
|
|
19fccce9e6 | ||
|
|
34908d3fee | ||
|
|
2d5a9d7d0a | ||
|
|
97e752caaf | ||
|
|
cbd746d249 | ||
|
|
0acc5220a8 | ||
|
|
10f86941d6 | ||
|
|
d15a16ec9b | ||
|
|
e5e35027d2 | ||
|
|
07082620c3 | ||
|
|
06e52230e9 | ||
|
|
16b030c8aa | ||
|
|
d7c036b978 | ||
|
|
2d0c0891da | ||
|
|
561e7959f8 | ||
|
|
f06a3b1e68 | ||
|
|
d5973bd456 | ||
|
|
3cc4b158f9 | ||
|
|
cf607b6987 | ||
|
|
016e512c83 | ||
|
|
9e11b3aa03 | ||
|
|
ec804dcb33 | ||
|
|
5b4c1d14ff | ||
|
|
f7876f67d6 | ||
|
|
2e216a3592 | ||
|
|
d0a12d9c48 | ||
|
|
2034a8f771 | ||
|
|
af2446e5b4 | ||
|
|
8df8d5ef15 | ||
|
|
68b1dfcd20 | ||
|
|
f4cab61428 | ||
|
|
35f17bfa38 | ||
|
|
d1f839d2cb | ||
|
|
d630f6c1fe | ||
|
|
70fa81059d | ||
|
|
bb5b986bf3 | ||
|
|
4e2f839fb0 | ||
|
|
ef00e24e5a | ||
|
|
4f88b15af5 | ||
|
|
ad438c06cf | ||
|
|
e97cb6ff03 |
No files matched your search
+2
-2
@@ -17,8 +17,8 @@ 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-base-ui/rootfs-etc-NetworkManager-dispatcher.d-99-dns-filter.sh
|
||||
./main/postmarketos-base-ui/rootfs-etc-NetworkManager-dispatcher.d-85-tethering
|
||||
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-dns-filter.sh
|
||||
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-tethering.sh
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
### On what environment did you encounter the issue?
|
||||
#### Environments
|
||||
* [ ] GNOME Shell on Mobile
|
||||
* [ ] Phosh
|
||||
* [ ] Plasma Mobile
|
||||
* [ ] Sxmo (Wayland/Sway) **Please post the output of `sxmo_version.sh`**
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ branch_aports=3.18-stable
|
||||
mirrordir_alpine=v3.18
|
||||
|
||||
[v22.12]
|
||||
description=Old release (supported until: 2023-07-07)
|
||||
description=Old release (unsupported)
|
||||
branch_pmaports=v22.12
|
||||
branch_aports=3.17-stable
|
||||
mirrordir_alpine=v3.17
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
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(-)
|
||||
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 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)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
- /* Don't transfer these tags from dynamic objects. */
|
||||
- if ((ibfd->flags & DYNAMIC) != 0)
|
||||
- continue;
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,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 (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
+ private data of the output bfd. */
|
||||
+
|
||||
bfd_error_handler_type pfn = NULL;
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen binutils-aarch64
|
||||
# Based on: main/binutils
|
||||
|
||||
|
||||
CTARGET_ARCH=aarch64
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-aarch64
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for aarch64 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
sonameprefix="binutils:"
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
# - CVE-2022-38126
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
# - CVE-2018-20002
|
||||
# - CVE-2018-20712
|
||||
# 2.28-r1:
|
||||
# - CVE-2017-7614
|
||||
|
||||
build() {
|
||||
local _sysroot=/
|
||||
local _cross_configure="--enable-install-libiberty --enable-shared"
|
||||
local _arch_configure=""
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
_plugin_configure="--disable-plugins"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
_gold_configure="--enable-gold"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "x86_64" ]; then
|
||||
_arch_configure="--enable-targets=x86_64-pep"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "riscv64" ]; then
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--target=$CTARGET \
|
||||
--with-build-sysroot="$CBUILDROOT" \
|
||||
--with-sysroot=$_sysroot \
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
if [ -d "$pkgdir"/usr/lib64 ]; then
|
||||
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
|
||||
rmdir "$pkgdir"/usr/lib64
|
||||
fi
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# creating cross tools: remove any files that would conflict
|
||||
# with the native tools, or other cross tools
|
||||
rm -r "${pkgdir:?}"/usr/share
|
||||
rm -f "$pkgdir"/usr/lib/libiberty.a
|
||||
rm -r "${pkgdir:?}"/usr/lib/bfd-plugins
|
||||
fi
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,37 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,46 +0,0 @@
|
||||
This fixes static linking for our hardened toolchain
|
||||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index e8126cb..9532bfb 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
|
||||
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
|
||||
- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
+ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
+ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
else
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
|
||||
@@ -270,15 +270,14 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
|
||||
- KEEP (*crtbegin.o(.ctors))
|
||||
- KEEP (*crtbegin?.o(.ctors))
|
||||
+ KEEP (*crtbegin*.o(.ctors))
|
||||
|
||||
/* We don't want to include the .ctor section from
|
||||
the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
${CONSTRUCTING+${CTOR_END}}
|
||||
@@ -286,9 +285,8 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
DTOR=".dtors ${CONSTRUCTING-0} :
|
||||
{
|
||||
${CONSTRUCTING+${DTOR_START}}
|
||||
- KEEP (*crtbegin.o(.dtors))
|
||||
- KEEP (*crtbegin?.o(.dtors))
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
+ KEEP (*crtbegin*.o(.dtors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
${CONSTRUCTING+${DTOR_END}}
|
||||
@@ -1,103 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
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(-)
|
||||
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 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)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
- /* Don't transfer these tags from dynamic objects. */
|
||||
- if ((ibfd->flags & DYNAMIC) != 0)
|
||||
- continue;
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,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 (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
+ private data of the output bfd. */
|
||||
+
|
||||
bfd_error_handler_type pfn = NULL;
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen binutils-armhf
|
||||
# Based on: main/binutils
|
||||
|
||||
|
||||
CTARGET_ARCH=armhf
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-armhf
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for armhf targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
sonameprefix="binutils:"
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
# - CVE-2022-38126
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
# - CVE-2018-20002
|
||||
# - CVE-2018-20712
|
||||
# 2.28-r1:
|
||||
# - CVE-2017-7614
|
||||
|
||||
build() {
|
||||
local _sysroot=/
|
||||
local _cross_configure="--enable-install-libiberty --enable-shared"
|
||||
local _arch_configure=""
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
_plugin_configure="--disable-plugins"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
_gold_configure="--enable-gold"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "x86_64" ]; then
|
||||
_arch_configure="--enable-targets=x86_64-pep"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "riscv64" ]; then
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--target=$CTARGET \
|
||||
--with-build-sysroot="$CBUILDROOT" \
|
||||
--with-sysroot=$_sysroot \
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
if [ -d "$pkgdir"/usr/lib64 ]; then
|
||||
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
|
||||
rmdir "$pkgdir"/usr/lib64
|
||||
fi
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# creating cross tools: remove any files that would conflict
|
||||
# with the native tools, or other cross tools
|
||||
rm -r "${pkgdir:?}"/usr/share
|
||||
rm -f "$pkgdir"/usr/lib/libiberty.a
|
||||
rm -r "${pkgdir:?}"/usr/lib/bfd-plugins
|
||||
fi
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,37 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,46 +0,0 @@
|
||||
This fixes static linking for our hardened toolchain
|
||||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index e8126cb..9532bfb 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
|
||||
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
|
||||
- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
+ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
+ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
else
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
|
||||
@@ -270,15 +270,14 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
|
||||
- KEEP (*crtbegin.o(.ctors))
|
||||
- KEEP (*crtbegin?.o(.ctors))
|
||||
+ KEEP (*crtbegin*.o(.ctors))
|
||||
|
||||
/* We don't want to include the .ctor section from
|
||||
the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
${CONSTRUCTING+${CTOR_END}}
|
||||
@@ -286,9 +285,8 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
DTOR=".dtors ${CONSTRUCTING-0} :
|
||||
{
|
||||
${CONSTRUCTING+${DTOR_START}}
|
||||
- KEEP (*crtbegin.o(.dtors))
|
||||
- KEEP (*crtbegin?.o(.dtors))
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
+ KEEP (*crtbegin*.o(.dtors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
${CONSTRUCTING+${DTOR_END}}
|
||||
@@ -1,103 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
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(-)
|
||||
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 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)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
- /* Don't transfer these tags from dynamic objects. */
|
||||
- if ((ibfd->flags & DYNAMIC) != 0)
|
||||
- continue;
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,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 (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
+ private data of the output bfd. */
|
||||
+
|
||||
bfd_error_handler_type pfn = NULL;
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen binutils-armv7
|
||||
# Based on: main/binutils
|
||||
|
||||
|
||||
CTARGET_ARCH=armv7
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-armv7
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for armv7 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
sonameprefix="binutils:"
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
# - CVE-2022-38126
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
# - CVE-2018-20002
|
||||
# - CVE-2018-20712
|
||||
# 2.28-r1:
|
||||
# - CVE-2017-7614
|
||||
|
||||
build() {
|
||||
local _sysroot=/
|
||||
local _cross_configure="--enable-install-libiberty --enable-shared"
|
||||
local _arch_configure=""
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
_plugin_configure="--disable-plugins"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
_gold_configure="--enable-gold"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "x86_64" ]; then
|
||||
_arch_configure="--enable-targets=x86_64-pep"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "riscv64" ]; then
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--target=$CTARGET \
|
||||
--with-build-sysroot="$CBUILDROOT" \
|
||||
--with-sysroot=$_sysroot \
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
if [ -d "$pkgdir"/usr/lib64 ]; then
|
||||
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
|
||||
rmdir "$pkgdir"/usr/lib64
|
||||
fi
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# creating cross tools: remove any files that would conflict
|
||||
# with the native tools, or other cross tools
|
||||
rm -r "${pkgdir:?}"/usr/share
|
||||
rm -f "$pkgdir"/usr/lib/libiberty.a
|
||||
rm -r "${pkgdir:?}"/usr/lib/bfd-plugins
|
||||
fi
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,37 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,46 +0,0 @@
|
||||
This fixes static linking for our hardened toolchain
|
||||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index e8126cb..9532bfb 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
|
||||
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
|
||||
- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
+ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
+ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
else
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
|
||||
@@ -270,15 +270,14 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
|
||||
- KEEP (*crtbegin.o(.ctors))
|
||||
- KEEP (*crtbegin?.o(.ctors))
|
||||
+ KEEP (*crtbegin*.o(.ctors))
|
||||
|
||||
/* We don't want to include the .ctor section from
|
||||
the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
${CONSTRUCTING+${CTOR_END}}
|
||||
@@ -286,9 +285,8 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
DTOR=".dtors ${CONSTRUCTING-0} :
|
||||
{
|
||||
${CONSTRUCTING+${DTOR_START}}
|
||||
- KEEP (*crtbegin.o(.dtors))
|
||||
- KEEP (*crtbegin?.o(.dtors))
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
+ KEEP (*crtbegin*.o(.dtors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
${CONSTRUCTING+${DTOR_END}}
|
||||
@@ -1,103 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
||||
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(-)
|
||||
|
||||
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
||||
index 5754f3cb860..3ad1d612749 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)
|
||||
|
||||
case Tag_ABI_PIC:
|
||||
case Tag_ABI_PID:
|
||||
- /* Don't transfer these tags from dynamic objects. */
|
||||
- if ((ibfd->flags & DYNAMIC) != 0)
|
||||
- continue;
|
||||
if (out_attr[i].i > in_attr[i].i)
|
||||
out_attr[i].i = in_attr[i].i;
|
||||
break;
|
||||
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
||||
index 37b64c89ee1..f13beaef9d9 100644
|
||||
--- a/ld/ldlang.c
|
||||
+++ b/ld/ldlang.c
|
||||
@@ -7071,13 +7071,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 (bfd_count_sections (input_bfd))
|
||||
{
|
||||
+ /* If the input bfd has no contents, it shouldn't set the
|
||||
+ private data of the output bfd. */
|
||||
+
|
||||
bfd_error_handler_type pfn = NULL;
|
||||
|
||||
/* If we aren't supposed to warn about mismatched input
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen binutils-riscv64
|
||||
# Based on: main/binutils
|
||||
|
||||
|
||||
CTARGET_ARCH=riscv64
|
||||
CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-riscv64
|
||||
pkgver=2.40
|
||||
pkgrel=11
|
||||
pkgdesc="Tools necessary to build programs for riscv64 targets"
|
||||
url="https://www.gnu.org/software/binutils/"
|
||||
makedepends_build="bison flex texinfo"
|
||||
makedepends_host="zlib-dev jansson-dev zstd-dev"
|
||||
makedepends="$makedepends_build $makedepends_host"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
|
||||
subpackages="binutils-dev binutils-doc"
|
||||
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
|
||||
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
CVE-2023-1972.patch
|
||||
binutils-ld-fix-static-linking.patch
|
||||
riscv64-textrels.patch
|
||||
"
|
||||
builddir="$srcdir/binutils-$pkgver"
|
||||
|
||||
if [ -z "$BOOTSTRAP" ]; then
|
||||
makedepends_host="$makedepends_host jansson-dev zstd-dev"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
subpackages="$subpackages binutils-gold"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
pkgname="binutils-$CTARGET_ARCH"
|
||||
subpackages=""
|
||||
sonameprefix="binutils:"
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
# - CVE-2022-38126
|
||||
# 2.35.2-r1:
|
||||
# - CVE-2021-3487
|
||||
# 2.32-r0:
|
||||
# - CVE-2018-19931
|
||||
# - CVE-2018-19932
|
||||
# - CVE-2018-20002
|
||||
# - CVE-2018-20712
|
||||
# 2.28-r1:
|
||||
# - CVE-2017-7614
|
||||
|
||||
build() {
|
||||
local _sysroot=/
|
||||
local _cross_configure="--enable-install-libiberty --enable-shared"
|
||||
local _arch_configure=""
|
||||
local _gold_configure="--disable-gold"
|
||||
local _plugin_configure="--enable-plugins"
|
||||
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_sysroot="$CBUILDROOT"
|
||||
_cross_configure="--disable-install-libiberty"
|
||||
_plugin_configure="--disable-plugins"
|
||||
fi
|
||||
|
||||
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
|
||||
_gold_configure="--enable-gold"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "x86_64" ]; then
|
||||
_arch_configure="--enable-targets=x86_64-pep"
|
||||
fi
|
||||
|
||||
if [ "$CTARGET_ARCH" = "riscv64" ]; then
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--target=$CTARGET \
|
||||
--with-build-sysroot="$CBUILDROOT" \
|
||||
--with-sysroot=$_sysroot \
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
$_cross_configure \
|
||||
$_gold_configure \
|
||||
$_plugin_configure \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-64-bit-bfd \
|
||||
--enable-colored-disassembly \
|
||||
--enable-default-execstack=no \
|
||||
--enable-default-hash-style=gnu \
|
||||
--enable-deterministic-archives \
|
||||
--enable-ld=default \
|
||||
--enable-new-dtags \
|
||||
--enable-relro \
|
||||
--enable-threads \
|
||||
--with-bugurl="https://postmarketos.org/issues" \
|
||||
--with-mmap \
|
||||
--with-pic \
|
||||
--with-system-zlib
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
if [ -d "$pkgdir"/usr/lib64 ]; then
|
||||
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
|
||||
rmdir "$pkgdir"/usr/lib64
|
||||
fi
|
||||
if [ "$CHOST" != "$CTARGET" ]; then
|
||||
# creating cross tools: remove any files that would conflict
|
||||
# with the native tools, or other cross tools
|
||||
rm -r "${pkgdir:?}"/usr/share
|
||||
rm -f "$pkgdir"/usr/lib/libiberty.a
|
||||
rm -r "${pkgdir:?}"/usr/lib/bfd-plugins
|
||||
fi
|
||||
}
|
||||
|
||||
gold() {
|
||||
pkgdesc="GNU binutils - gold linker"
|
||||
|
||||
if [ -e "$pkgdir"/usr/bin/ld.gold ]; then
|
||||
amove usr/bin/ld.gold
|
||||
fi
|
||||
amove usr/$CTARGET/bin/ld.gold
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
|
||||
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
|
||||
"
|
||||
@@ -1,37 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
|
||||
--
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
|
||||
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
|
||||
|
||||
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
|
||||
|
||||
PR 30285
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 027d0143735..185028cbd97 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
@@ -1,46 +0,0 @@
|
||||
This fixes static linking for our hardened toolchain
|
||||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index e8126cb..9532bfb 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
|
||||
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
|
||||
- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
+ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors"
|
||||
+ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors"
|
||||
else
|
||||
SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
|
||||
SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
|
||||
@@ -270,15 +270,14 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
|
||||
- KEEP (*crtbegin.o(.ctors))
|
||||
- KEEP (*crtbegin?.o(.ctors))
|
||||
+ KEEP (*crtbegin*.o(.ctors))
|
||||
|
||||
/* We don't want to include the .ctor section from
|
||||
the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
${CONSTRUCTING+${CTOR_END}}
|
||||
@@ -286,9 +285,8 @@ CTOR=".ctors ${CONSTRUCTING-0} :
|
||||
DTOR=".dtors ${CONSTRUCTING-0} :
|
||||
{
|
||||
${CONSTRUCTING+${DTOR_START}}
|
||||
- KEEP (*crtbegin.o(.dtors))
|
||||
- KEEP (*crtbegin?.o(.dtors))
|
||||
- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
+ KEEP (*crtbegin*.o(.dtors))
|
||||
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
${CONSTRUCTING+${DTOR_END}}
|
||||
@@ -1,103 +0,0 @@
|
||||
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
|
||||
--
|
||||
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
|
||||
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
|
||||
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
|
||||
|
||||
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
|
||||
|
||||
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
|
||||
|
||||
* For PR ld/25694,
|
||||
In the check_reloc, refer to spare and loongarch, they don't need to reserve
|
||||
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
|
||||
So it seems like riscv was too conservative to estimate the TLS LE before.
|
||||
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
|
||||
TEXTREL problem.
|
||||
|
||||
* For PR ld/22263,
|
||||
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
|
||||
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
|
||||
also the right way to do the same thing for risc-v.
|
||||
|
||||
On risc-v, fixes
|
||||
FAIL: Build pr22263-1
|
||||
|
||||
RISC-V haven't supported the TLS transitions, so will need the same fix (use
|
||||
bfd_link_dll) in the future.
|
||||
|
||||
bfd/
|
||||
PR ld/22263
|
||||
PR ld/25694
|
||||
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
|
||||
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
|
||||
relocation for TLS LE in pie/pde, and report error in pic just like
|
||||
before.
|
||||
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
|
||||
than !bfd_link_pic in determining the dynamic symbol index. Avoid
|
||||
the index of -1.
|
||||
---
|
||||
|
||||
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
|
||||
index 75af040cf92..762ea231c0b 100644
|
||||
--- a/bfd/elfnn-riscv.c
|
||||
+++ b/bfd/elfnn-riscv.c
|
||||
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
|
||||
case R_RISCV_TLS_GOT_HI20:
|
||||
- if (bfd_link_pic (info))
|
||||
+ if (bfd_link_dll (info))
|
||||
info->flags |= DF_STATIC_TLS;
|
||||
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|
||||
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
|
||||
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
goto static_reloc;
|
||||
|
||||
case R_RISCV_TPREL_HI20:
|
||||
+ /* This is not allowed in the pic, but okay in pie. */
|
||||
if (!bfd_link_executable (info))
|
||||
return bad_static_reloc (abfd, r_type, h);
|
||||
if (h != NULL)
|
||||
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
|
||||
- goto static_reloc;
|
||||
+ break;
|
||||
|
||||
case R_RISCV_HI20:
|
||||
if (bfd_link_pic (info))
|
||||
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
|
||||
if (htab->elf.srelgot == NULL)
|
||||
abort ();
|
||||
|
||||
- if (h != NULL)
|
||||
- {
|
||||
- bool dyn, pic;
|
||||
- dyn = htab->elf.dynamic_sections_created;
|
||||
- pic = bfd_link_pic (info);
|
||||
-
|
||||
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
|
||||
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
- indx = h->dynindx;
|
||||
- }
|
||||
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
|
||||
+ if (h != NULL
|
||||
+ && h->dynindx != -1
|
||||
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
|
||||
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
|
||||
+ indx = h->dynindx;
|
||||
|
||||
/* The GOT entries have not been initialized yet. Do it
|
||||
now, and emit any relocations. */
|
||||
- if ((bfd_link_pic (info) || indx != 0)
|
||||
+ if ((bfd_link_dll (info) || indx != 0)
|
||||
&& (h == NULL
|
||||
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
- need_relocs = true;
|
||||
+ need_relocs = true;
|
||||
|
||||
if (tls_type & GOT_TLS_GD)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
pkgrel=4
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d4977cf4654bb5659d4e6d91785832d3fd418403b70f1619c26aa305839d64c131c6389979793896af0fb0d9e8fc2b99537dbeb65133465d7d983576902dff34 busybox-static-1.36.1-r0-aarch64-edge.apk
|
||||
c0ea71bcec70e35de3dcb919c22c02afe7e35b3168845209e93bcd15ff380d62dc807848e36e1e5fef22c16adbbdfc1dc3a3559015d0c4a3b2978e0e303d4413 busybox-static-1.36.1-r4-aarch64-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
pkgrel=4
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
eece41953046c99029ec4a0707c1fd4270d43b497f05cf63070deef376fc28f61bcdfa8b9f34e23305ba459a633909eb1682fbe183206b69dea8be3742479ae7 busybox-static-1.36.1-r0-armhf-edge.apk
|
||||
701ee52541aee37a075563c430b891860afd205e4446379a4686b3eac57ce8443c1203b06fb90f146c88064e00d99101c86d0d8b3a91377e465d46958c942366 busybox-static-1.36.1-r4-armhf-edge.apk
|
||||
"
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
pkgrel=4
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
29df2ea5d83535632308524064dbb43bf9ed147ab1112bed76b1fc70b519d7dc3e4083c51527e80129a455a001479569641b710f58fdad8538852061d4880660 busybox-static-1.36.1-r0-armv7-edge.apk
|
||||
e01fdc7edfe06b9b8c30acb0df90f026c49982d378724c8afd4e545f5ab7e9d317a9fd8e1e7ae06d3f89e3ddf5e572ad3f7d2d033225f195d5bc7530e6e4bcd2 busybox-static-1.36.1-r4-armv7-edge.apk
|
||||
"
|
||||
@@ -1,7 +1,7 @@
|
||||
From 75e758609803afe6ced6cd7799b4159f3848a8d5 Mon Sep 17 00:00:00 2001
|
||||
From 47b4bd4deb2c356bb07d2a96f22127aefafec3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH 01/33] posix_memalign
|
||||
Subject: [PATCH 01/34] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 447c2a21d1fa8c2c3b216102a808834d86f12104 Mon Sep 17 00:00:00 2001
|
||||
From 4fa620d8c3e6730211bfb071eb4c817320491bd0 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 02/33] gcc: poison-system-directories
|
||||
Subject: [PATCH 02/34] 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
|
||||
@@ -120,7 +120,7 @@ index 09082e8ccae..5504bf6eb01 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b61ecfc1bc8..b290908679e 100644
|
||||
index af0e5933fdb..b6731a4673c 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
@@ -131,7 +131,7 @@ index b61ecfc1bc8..b290908679e 100644
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type
|
||||
-Wno-scalar-storage-order -Wsequence-point
|
||||
@@ -8424,6 +8425,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -8426,6 +8427,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.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b5c378c4c1e71b2dd8b4616d8f61530ee1a3ac98 Mon Sep 17 00:00:00 2001
|
||||
From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH 03/33] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH 03/34] specs: turn on -Wl,-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.
|
||||
@@ -14,10 +14,10 @@ now by default.
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b290908679e..cb34e6d40c9 100644
|
||||
index b6731a4673c..f393c7846c6 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -17961,6 +17961,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}.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From bb3ef1f5acfde9658c922d0aef9283fe60328c33 Mon Sep 17 00:00:00 2001
|
||||
From 1b315235433701e4a974da259b8d651169ddc7ac Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
Subject: [PATCH 04/34] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
@@ -25,10 +25,10 @@ index 5d64625fcd7..868d69506e4 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index cb34e6d40c9..7f1aa660285 100644
|
||||
index f393c7846c6..ef3c14a189e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -11866,6 +11866,12 @@ also turns on the following optimization flags:
|
||||
@@ -11868,6 +11868,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.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0727ad9e4a458d090be6fb0cfbe334d8496cd5e0 Mon Sep 17 00:00:00 2001
|
||||
From 67c0f5789630b27149f60ff831999ef7c1dba5d5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
|
||||
Subject: [PATCH 05/34] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dc3e2f629fe7f8df81c74162c66910339ec5d03d Mon Sep 17 00:00:00 2001
|
||||
From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
|
||||
Subject: [PATCH 06/34] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d25c373cf839df0720f8d345b5ad55147030515a Mon Sep 17 00:00:00 2001
|
||||
From 4a728ad48a7b437cc6f2697e26603bf648149f86 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
|
||||
Subject: [PATCH 07/34] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From eb58983c3d3126caaab8ed174571b142a095c132 Mon Sep 17 00:00:00 2001
|
||||
From 32f24560d0602f7735d5e9efd92fe3151bd72cea Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
Subject: [PATCH 08/34] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 823afef2053ca4f79ac13f2b0f52b132282ee705 Mon Sep 17 00:00:00 2001
|
||||
From c7ec8da7280d7f97f5543eb9ddeca7600aafc43c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
|
||||
Subject: [PATCH 09/34] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 702cbba342eae468e79d9b42e366b9699c158402 Mon Sep 17 00:00:00 2001
|
||||
From aaa029bcee68298695b7c4278c90b6bc320d098c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
|
||||
Subject: [PATCH 10/34] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 18f0ecbdab63b0ee590ef21650ac72879318a8be Mon Sep 17 00:00:00 2001
|
||||
From 65e01e749205c9af218b01233cebd0077538d0ee Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
|
||||
Subject: [PATCH 11/34] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e350a47267790a1a624032a645425b4018433e0c Mon Sep 17 00:00:00 2001
|
||||
From 453a815bf2844971a91eaef800af188d9e86b784 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH 12/33] libgcc_s
|
||||
Subject: [PATCH 12/34] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.cc | 4 ++--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6ed790bb2e5bf49d186885cad8fd7efc10d8fd36 Mon Sep 17 00:00:00 2001
|
||||
From 7d7d12137c666761a8dd61179c9651b85dae9b41 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH 13/33] nopie
|
||||
Subject: [PATCH 13/34] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c7398885b5c2cd91a3ad1a56fde272b719d17ff5 Mon Sep 17 00:00:00 2001
|
||||
From dd5bb97c31a9f57034c70a7a18ba6e2e133084c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH 14/33] ada: fix shared linking
|
||||
Subject: [PATCH 14/34] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c2861147eacede8c97dbb8d251f7d30ac2116481 Mon Sep 17 00:00:00 2001
|
||||
From 6bb5b7d9161d05f31b001d8211a9c63caf63fd2f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
Subject: [PATCH 15/34] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 736fd338aaa6d0686b15beabac687a20cfb29c27 Mon Sep 17 00:00:00 2001
|
||||
From f0d9e00cac06689f64b214de7aee80d7116ef084 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH 16/33] add fortify-headers paths
|
||||
Subject: [PATCH 16/34] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f71fef0a3d527ba84faaf63cee2a5ecb2322412e Mon Sep 17 00:00:00 2001
|
||||
From 857db04f4f1a06e866551b4172fe8f27363f4a92 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 17/33] Alpine musl package provides libssp_nonshared.a. We
|
||||
Subject: [PATCH 17/34] 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 06624ddc7dfd4dcfb4e41f4549ffcacfbc43b315 Mon Sep 17 00:00:00 2001
|
||||
From 5a8347e23ab13912b6edec2c6c6e3a101b017c79 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
|
||||
Subject: [PATCH 18/34] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cbc762f2d4c8ae714f7a0c762d90453607a5c2e5 Mon Sep 17 00:00:00 2001
|
||||
From 41d00a2eb0754acf71958808bd17dbebeb517b84 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH 19/33] aarch64: disable multilib support
|
||||
Subject: [PATCH 19/34] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f820b730e48421ab03e5742dc06e83570690078e Mon Sep 17 00:00:00 2001
|
||||
From 85b42bfbba71616831d14360b16998acb28790fd Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH 20/33] s390x: disable multilib support
|
||||
Subject: [PATCH 20/34] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 40c3d28f4d090fcd3486ca2a88d0c7618fdb03ed Mon Sep 17 00:00:00 2001
|
||||
From 7b53df284242638e940c0155b6c21e88cea1f55b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
|
||||
Subject: [PATCH 21/34] ppc64[le]: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 05cf20eb11b3013c2fbb26c841485f675811058c Mon Sep 17 00:00:00 2001
|
||||
From 96e7e1e9a899d9bb5fcbdf788bd529d0390c626f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH 22/33] x86_64: disable multilib support
|
||||
Subject: [PATCH 22/34] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0920d23e3a345bc17675b9bebc52644c238123e2 Mon Sep 17 00:00:00 2001
|
||||
From b26224acf342eacb33491f6ea0da1faf73d35715 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 23/33] riscv: disable multilib support
|
||||
Subject: [PATCH 23/34] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5c955776d65f5a018375652904b088a37203899d Mon Sep 17 00:00:00 2001
|
||||
From a72e0613f79f6b6867819317accb7a714031a08c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH 24/33] always build libgcc_eh.a
|
||||
Subject: [PATCH 24/34] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ac6202d063308fbf67e4b617b768536e66a44519 Mon Sep 17 00:00:00 2001
|
||||
From 3ee8cbc1cad261b30d4a7a66d31496d5f243ce2f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
|
||||
Subject: [PATCH 25/34] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b7404c39a6a76ebe382caa2b9da16006413b21b9 Mon Sep 17 00:00:00 2001
|
||||
From 3df4788c79c7429b196c7b284af2b4cf9a4b4f8d Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/33] ada: musl support fixes
|
||||
Subject: [PATCH 26/34] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 401ac3feeea049a8035bf916f550ce6f4e859cba Mon Sep 17 00:00:00 2001
|
||||
From 7b50823d8a4131e5a55d2499a0f5a52b3d91eed2 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH 27/33] configure: Add --enable-autolink-libatomic, use in
|
||||
Subject: [PATCH 27/34] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
@@ -166,10 +166,10 @@ index 57268319de1..56bcaa87620 100644
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index 928fc6b6d4b..81a677014df 100644
|
||||
index b30d3691fe6..ccc8e5dbb00 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2374,6 +2374,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
@@ -2377,6 +2377,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}.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cd46156af13743fe93c48d00b0661add2c319226 Mon Sep 17 00:00:00 2001
|
||||
From 5bbbd320e54ab5341cfba83e8af98685131caba1 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 12:23:34 +0200
|
||||
Subject: [PATCH 28/33] configure: fix detection of atomic builtins in
|
||||
Subject: [PATCH 28/34] configure: fix detection of atomic builtins in
|
||||
libatomic configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f0f2cad36cd4796426ce1c25a6cec7c70a56741e Mon Sep 17 00:00:00 2001
|
||||
From 430c701a3cefbe09a9c7c8a2f5bbe957f9b2ecb2 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Thu, 30 Jun 2022 16:44:51 +0000
|
||||
Subject: [PATCH 29/33] libstdc++: do not throw exceptions for non-C locales on
|
||||
Subject: [PATCH 29/34] libstdc++: do not throw exceptions for non-C locales on
|
||||
musl targets
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b474c9688ebda225ced95ecea0219312110d9c9e Mon Sep 17 00:00:00 2001
|
||||
From 05f0043755f341a2ff4f845379327076b3e0203d Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 03:49:21 +0000
|
||||
Subject: [PATCH 30/33] gdc: unconditionally link libgphobos against
|
||||
Subject: [PATCH 30/34] gdc: unconditionally link libgphobos against
|
||||
libucontext
|
||||
|
||||
ref: alpine/aports#13422
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6598811df64744ba862e36a6dca88578b01dd46e Mon Sep 17 00:00:00 2001
|
||||
From 0b89a74fbf77ae6917f043c79cd03db0d6ef0212 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
||||
Subject: [PATCH 31/33] druntime: link against libucontext on all platforms
|
||||
Subject: [PATCH 31/34] druntime: link against libucontext on all platforms
|
||||
|
||||
On musl-based Linux distributions, swapcontext etc. are not provided by
|
||||
musl but instead by libucontext. Hence, we _always_ need to link against
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4e84b0a3c019438b25de7c1e844746e4bc83af42 Mon Sep 17 00:00:00 2001
|
||||
From eeec799f43fbd0bfffc13594585b39d708972511 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Tue, 19 Jul 2022 14:54:07 +0200
|
||||
Subject: [PATCH 32/33] libgnat: time_t is always 64-bit on musl libc
|
||||
Subject: [PATCH 32/34] libgnat: time_t is always 64-bit on musl libc
|
||||
|
||||
---
|
||||
gcc/ada/libgnat/s-parame.ads | 2 +-
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
From 4cf06fff68090b1681d070a55214f2ab26754edf Mon Sep 17 00:00:00 2001
|
||||
From b71d21b87e6946c763edad5e420bf22d8a453077 Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 29 May 2023 15:33:11 +0000
|
||||
Subject: [PATCH 33/33] libphobos: do not use LFS64 symbols
|
||||
Subject: [PATCH 33/34] libphobos: do not use LFS64 symbols
|
||||
|
||||
musl does not have these since 1.2.4, we can't use the compat interfaces.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/config.d | 2 +-
|
||||
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/config.d b/libphobos/libdruntime/core/sys/posix/config.d
|
||||
index ae6752f220e..6b80d1ff0e6 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/config.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/config.d
|
||||
@@ -88,7 +88,7 @@ else version (CRuntime_Musl)
|
||||
enum __REDIRECT = false;
|
||||
|
||||
// Those three are irrelevant for Musl as it always uses 64 bits off_t
|
||||
- enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
|
||||
+ enum __USE_FILE_OFFSET64 = false;
|
||||
enum __USE_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
|
||||
enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
index 0d3d517d69a..323aa0af72d 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
From 4bfcb35bc43d3e3b7510620362d7c28d9e4c17ca Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 10 Jul 2023 23:23:29 +0000
|
||||
Subject: [PATCH 34/34] libgo: fix lfs64 use
|
||||
|
||||
---
|
||||
.../go/internal/syscall/unix/at_largefile.go | 2 +-
|
||||
libgo/go/os/dir_largefile.go | 2 +-
|
||||
libgo/go/syscall/libcall_glibc.go | 2 +-
|
||||
libgo/go/syscall/libcall_linux.go | 4 +--
|
||||
libgo/go/syscall/libcall_posix_largefile.go | 26 +++++++++----------
|
||||
libgo/runtime/go-varargs.c | 2 +-
|
||||
libgo/sysinfo.c | 9 +++----
|
||||
7 files changed, 22 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
index 82e0dcfd074..16151ecad1b 100644
|
||||
--- a/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
+++ b/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
@@ -10,5 +10,5 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
-//extern fstatat64
|
||||
+//extern fstatat
|
||||
func fstatat(int32, *byte, *syscall.Stat_t, int32) int32
|
||||
diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go
|
||||
index 1fc5ee0771f..0c6dffe1a75 100644
|
||||
--- a/libgo/go/os/dir_largefile.go
|
||||
+++ b/libgo/go/os/dir_largefile.go
|
||||
@@ -11,5 +11,5 @@ package os
|
||||
|
||||
import "syscall"
|
||||
|
||||
-//extern readdir64
|
||||
+//extern readdir
|
||||
func libc_readdir(*syscall.DIR) *syscall.Dirent
|
||||
diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go
|
||||
index 5c1ec483c75..5a1245ed44b 100644
|
||||
--- a/libgo/go/syscall/libcall_glibc.go
|
||||
+++ b/libgo/go/syscall/libcall_glibc.go
|
||||
@@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
|
||||
-//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
|
||||
+//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if race.Enabled {
|
||||
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
|
||||
index 03ca7261b59..ad21fd0b3ac 100644
|
||||
--- a/libgo/go/syscall/libcall_linux.go
|
||||
+++ b/libgo/go/syscall/libcall_linux.go
|
||||
@@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) {
|
||||
//adjtimex(buf *Timex) _C_int
|
||||
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
-//fstatfs64(fd _C_int, buf *Statfs_t) _C_int
|
||||
+//fstatfs(fd _C_int, buf *Statfs_t) _C_int
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0)
|
||||
@@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
|
||||
}
|
||||
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
-//statfs64(path *byte, buf *Statfs_t) _C_int
|
||||
+//statfs(path *byte, buf *Statfs_t) _C_int
|
||||
|
||||
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
||||
//sysinfo(info *Sysinfo_t) _C_int
|
||||
diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go
|
||||
index f90055bb29a..334212f0af1 100644
|
||||
--- a/libgo/go/syscall/libcall_posix_largefile.go
|
||||
+++ b/libgo/go/syscall/libcall_posix_largefile.go
|
||||
@@ -10,40 +10,40 @@
|
||||
package syscall
|
||||
|
||||
//sys Creat(path string, mode uint32) (fd int, err error)
|
||||
-//creat64(path *byte, mode Mode_t) _C_int
|
||||
+//creat(path *byte, mode Mode_t) _C_int
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
-//fstat64(fd _C_int, stat *Stat_t) _C_int
|
||||
+//fstat(fd _C_int, stat *Stat_t) _C_int
|
||||
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
-//ftruncate64(fd _C_int, length Offset_t) _C_int
|
||||
+//ftruncate(fd _C_int, length Offset_t) _C_int
|
||||
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
-//getrlimit64(resource _C_int, rlim *Rlimit) _C_int
|
||||
+//getrlimit(resource _C_int, rlim *Rlimit) _C_int
|
||||
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
-//lstat64(path *byte, stat *Stat_t) _C_int
|
||||
+//lstat(path *byte, stat *Stat_t) _C_int
|
||||
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
-//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
|
||||
+//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
|
||||
|
||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
-//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int
|
||||
+//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int
|
||||
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
||||
-//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
+//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||
-//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
+//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error)
|
||||
-//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t
|
||||
+//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t
|
||||
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
-//setrlimit64(resource int, rlim *Rlimit) _C_int
|
||||
+//setrlimit(resource int, rlim *Rlimit) _C_int
|
||||
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
-//stat64(path *byte, stat *Stat_t) _C_int
|
||||
+//stat(path *byte, stat *Stat_t) _C_int
|
||||
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
-//truncate64(path *byte, length Offset_t) _C_int
|
||||
+//truncate(path *byte, length Offset_t) _C_int
|
||||
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c
|
||||
index f84860891e6..7efc9615985 100644
|
||||
--- a/libgo/runtime/go-varargs.c
|
||||
+++ b/libgo/runtime/go-varargs.c
|
||||
@@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg)
|
||||
int
|
||||
__go_open64 (char *path, int mode, mode_t perm)
|
||||
{
|
||||
- return open64 (path, mode, perm);
|
||||
+ return open (path, mode, perm);
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 180f5c31d74..1d717d55c0e 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -366,7 +366,7 @@ typedef loff_t libgo_loff_t_type;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OFF64_T)
|
||||
-typedef off64_t libgo_off_t_type;
|
||||
+typedef off_t libgo_off_t_type;
|
||||
#else
|
||||
typedef off_t libgo_off_t_type;
|
||||
#endif
|
||||
@@ -398,13 +398,11 @@ typedef off_t libgo_off_t_type;
|
||||
|
||||
// From dirent.h
|
||||
SREF(dirent);
|
||||
-SREF(dirent64);
|
||||
OTREF(DIR);
|
||||
EREF(DT_UNKNOWN);
|
||||
|
||||
// From fcntl.h
|
||||
SREF(flock);
|
||||
-SREF(flock64);
|
||||
|
||||
// From ffi headers
|
||||
SREF(_ffi_type);
|
||||
@@ -485,11 +483,10 @@ EREF(SS_ONSTACK);
|
||||
EREF(SEGV_MAPERR);
|
||||
|
||||
// From stat.h
|
||||
-SREF(stat64);
|
||||
+SREF(stat);
|
||||
|
||||
// From statfs.h
|
||||
SREF(statfs);
|
||||
-SREF(statfs64);
|
||||
|
||||
// From sysinfo.h
|
||||
SREF(sysinfo);
|
||||
@@ -519,7 +516,7 @@ EREF(PTRACE_PEEKTEXT);
|
||||
|
||||
// From sys/resource.h
|
||||
SREF(rusage);
|
||||
-SREF(rlimit64);
|
||||
+SREF(rlimit);
|
||||
EREF(RLIMIT_NOFILE);
|
||||
EREF(PRIO_USER);
|
||||
EREF(RUSAGE_SELF);
|
||||
--
|
||||
2.41.0
|
||||
|
||||
+40
-38
@@ -24,7 +24,7 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgver=13.1.1_git20230603
|
||||
pkgver=13.1.1_git20230715
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -267,6 +267,7 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
"
|
||||
|
||||
# we build out-of-tree
|
||||
@@ -319,7 +320,7 @@ build() {
|
||||
powerpc-*-*-*) _arch_configure="--enable-secureplt --enable-decimal-float=no";;
|
||||
powerpc64*-*-*-*) _arch_configure="--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux";;
|
||||
i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";;
|
||||
i586-*-*-*) _arch_configure="--with-arch=i586 --with-tune=generic --enable-cld";;
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
esac
|
||||
@@ -423,7 +424,7 @@ build() {
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
|
||||
@@ -780,38 +781,39 @@ gdb() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
207d1a0a3e17ab8d1912918c31291850461ee3ad476ffcbcafd875cf2b7a3eca0a48bc03f0e6b71a5a0ca7df39f5c256c72b54dbe48e19de23135873bd38e3ad gcc-13-20230603.tar.xz
|
||||
5738a25e510d47058ea7acf44f47292c365f74f60f75d600c3bdf79022a78e3c14c87648e23d3f44612833123ba1ae6776c8a6ea4371bf8c2cf31ea8296a0278 0001-posix_memalign.patch
|
||||
35cba990b41ba8fd2544404a0330ceddfbc7b63475f4ebb515552d5ec494d0099f0585240a36099431ae6dcaf9bd7674ca0224f0dd4310cd3597aabadedd1d07 0002-gcc-poison-system-directories.patch
|
||||
fa3b349be7e7f49c1d2192a84d6fc6b9f9b750381607711950d3ad5c867c677dac65dc2274fa4227aa6909d6b5e0fcc59b137254202035e930a2c6a0ba494e2f 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
495b08b8b25f25f616fd68d205c23232d8307a35dae81f5d37e248ec704734e40618d5e3855f1cedeaa615b1d03e5a34089695faca9798d51a367a0e3bc59b78 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
ee10b0b91e7b0a91a47b6708dd8a41c8f08a89f87a3eed57aed2ea3df5b7109a2a33741651a294a10f056c736beeb0be0fb6004c0517e8687a80bc33be50d8c9 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
87dca73e398acf396ade55b8cd533d3e90889444c27069df9840a57d524d8f045781b4a38f9e0e52595a510049a0832a5067f6f0200df00fc51501316fa7c61b 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
5eca632dbb3f709ee92ba89e062642cfcf854aa31426b8eca859432773bff4bffd35fa6a7418a760bed89a30a1f64e1de87b0353e9d332d8abc72c14e236e1ed 0007-Enable-Wtrampolines-by-default.patch
|
||||
d46546536564f76abcda3a54b0c159175aca7044542fdcdf1f08c46bfabff452e2ba7d535e9e5b04c9c595c3f865bf80bdece8aee4a0bc24baea4f2c94fcf0bb 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
00ce50efdeb9a31cbd9ca2d2fa22cd27b1d972e96c01948bd9ae95aff7275e6bc894196ff871107c5feadb6cb832119127240f4539fda35d4326955babf5f510 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
46a228b875f835fd1c2cae479f5e931cd2afc4124690ebb935ea49a3fc4ed46b69d4c76e18a1d7632283690e9d51fbcb90f478fc0b87d532dc095fcf067de7e6 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
b2c5e2af8f6f50da5795de7fb94309149eb63b1dcc31d72147975702b751e7af0f89adbde7e359416a4ad7749c3d251e6c2b8b57c9a24c77e15c9ce4730d5e4a 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
8c60c72a123d984452b57bc6a7d3dea3ab092e963d459d8a69a27384c8cf2d7e0e718d1dda2957b62cb2d0353dd851e57c3d1791f90adf6a32393b64846677d9 0012-libgcc_s.patch
|
||||
082a1dcca42899fc7c70616f0b73fc640fbaae8c4f08c960c71bd9f2cda57bf34a662f1f6327a6eb7e026ebe3414ee71303c3354687ad6c14068fdf37025f2e5 0013-nopie.patch
|
||||
ced25410c21b0bac351ef4a6c2d381f4e0a1c0f4043899bbed2f10ad5f5c39ec6ff4cde07c62d486643a89421c28266798234c318a09a029bc1a79d6adee1c0e 0014-ada-fix-shared-linking.patch
|
||||
f245428f57f1d59e353b3c1d745c7cb3987689d8ef3cb38e113f69750dca08ed76681ed72b2d5ee659d0d6c33179c4b12eb1d509c0baf185cc8c8549e0c09f8f 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
4fd357f4f24899f742e19680db543647dea556e3144744ac990474ee01f32d28e1724f6f56dac4ba2ce2491aae88ffea16b6f7c33b74132deb2f932d550f119a 0016-add-fortify-headers-paths.patch
|
||||
dd028aeb2e8a32157a419f4450fa70a96522ce2de88febfac374d11f1340660584c7547eaa287715f585289aa313b17918a52b64bc758778833f387c0e3c3506 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
47eb31a354177f4abd699e6bcb29ba688eeb51511b27969a88e25a0153108023ceb3d821fe3ffca0491dafec5341a3186b813519b9d043450eeec990bfc7d7d4 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
b77e98c45d28e42ec9f9842b5aab3fd69b8696ea69376a049e7792bd5cef98c730ab5a458406084fb7be2f3c361962c407b72dde3dd27857f55433f3fc749b3c 0019-aarch64-disable-multilib-support.patch
|
||||
79b3a8ea1fe452a2f8fdf2b15b75754ed00f2993120596e7870622d4d608edf8c3ddc31181dafa40815fdfe277a10d539830484f09a57c3b0ee5677785224e04 0020-s390x-disable-multilib-support.patch
|
||||
d250d791dd9d5190eee9fc54326830b0e19d9986e801d0576199808c6e211f5137ce71b92e0dbfb1ab910c22311b4b48dbbd63fa9390c2e2491dce80062e5f51 0021-ppc64-le-disable-multilib-support.patch
|
||||
51206e8132e93bb79f891f0f69461982435fa4212b1bf91c75b9bb9ee7fd25106d53fad21470f4706b5d258fbe1715ef7524d6c2bb94813b7d4a48d949a176f7 0022-x86_64-disable-multilib-support.patch
|
||||
b774c6a750077a546d1cef0b31812d5d68cf64a8abdd47a30180fb6f3a848941e7986f4a587da9a6ab034e5083068723620319e3f821f0db3ff66dc4c33faf06 0023-riscv-disable-multilib-support.patch
|
||||
1b6ed17c5798d8fd80826188c35232d0f90843d6cba060ea784fdfa5b5cb2490ac4507ce9802f7f6f50ccb7fe5db34cd6860c256e9da311710c95b1d4870fc1c 0024-always-build-libgcc_eh.a.patch
|
||||
4b9f4446254720e692478fb016798b44c6ebc021816dff49fe32b6eac4f4da091c47adf46f040df603ee74f4986a832257eaad4d3c594b6d50a23e447c755586 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
fbc903ca64f8a17ea8ffce4cb882dd53713dee3b24b729ab81741a8133802b9c95619596829706fcfe26350a33e8558dc9b9edf92802170041c3f4f831b2ff2c 0026-ada-musl-support-fixes.patch
|
||||
8d3f37bd75a9fea17c277b380aa943ad44989c65e6aabbf09f9c3f35acb1f048dbe361bc788b6ef2133dee3b9f646c56637811fe33171a50a2a024fe9d78e6ef 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
04a07053c82842f1ec5ec58723c0801659f8174318e32d1e966411422bfa9665f259ba9025d030e0e298608d6eeff423cbe5ed9981717d691a49de8806ead7aa 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
3398fcb9273e5d76006b2c2c0215cf9ead757faa4751f7a55cf7bc687894ac38da47e76700860ea3c7f8feb18361e4ce8ce6b16a365fdfe4c61032bd53da56e7 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
ac86593db92aca836a91dd7ad3060e6c1d92b1b7c685a6fa1b51281f76b091fb07058d8d53f16f7df18eb148fde0526723c6cf6fc4c38471399dc7fde8892307 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
e2f8901bf30494563373a24cb632a251056cb99dbb9cce789817f12016da323f702d981ce4ba9d7d52eefc33f257568509d391776fd022b012e589b43857c696 0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
434d3739d7e6ecc5017c29711c3a7c207e7c673d2a535607dea78a5a5d265d8efb74b7f726c18efc13e9c80c29385ce1b4e3b53c7d1c9d55bb1b8a217425f3ea 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
8a56a2a1d1c60894ab429ecc8fa3ddbfdd6c7e3cc9f764b4f260695a2cd54442668e9b4c7ba62d833e5dbc05548586aefc344caf9ea87cdf6de60ce3c30f9da9 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
942d706e7f8ae8dbc85808e388b9c98de6bd922d49adeca63691218363a4f0b46829509ba1f1ed358ef436e1adf77ad7a820aaeb4bb03a4fc52cfdec118394f3 gcc-13-20230715.tar.xz
|
||||
438eda29a1851c72e65422bb4cd129ecc016f06f9bd038288e39762c01b932f786ed4aad587c7b16baf948c342c10dc9beff125166b97e0b8e0d05789aec95ce 0001-posix_memalign.patch
|
||||
4a7cd030e107b6e35fb883c80f21a547da14f540f989555ac2c9ba08958ace5b44dca194a96b460415c71f663e885954d73b04ade55f2f9d3cb116f50df8d8ca 0002-gcc-poison-system-directories.patch
|
||||
99b194f53677c3a75c3c376160673703f2d759d795ebd9f6e66d5ee095a648eba35d8aef1990a6a1e805c1cc1720636d7c23ef6102b674d92996b1e5646a0b2c 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
39013ad0b255e9cfd168010eefc32ec4d015fce2c2b4e864341a6aa8bdb74e52a08f0ae83f29e27e9524d4da27f28369a6aa4d76f6aed6490dc2961b18f90e94 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
0ef08231bef5c77a38e8deaae4e00675de4312071425cf1db46ee54c3e00d2a5d1658a68302dd495c796d397e61e79efcf4e91fbd8fb2cd2e2fa539c2e884492 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
8202e22832141fb12601546cec42472fdb194892f839e9fed86b4ab597204b6e6575c0585c283301eeb598ac1f06d16ce500d9c0ea333444bd50ae2a210d2d76 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
1b239b94b570a0eff2249a9ec7ad150270c3210128f8f8a67e1554a044a039b2acc69768ebc57a15cec661f039c41fb7b620e7ec65320efbce40ceec1c9c6b90 0007-Enable-Wtrampolines-by-default.patch
|
||||
eb3ce4df99bf4f22ca4bac2d4e24be4c235098fb67ae118cb8efe360f0441a39a9931076fa615fbc3b7d2b2a541d4ffb2cfc56097224fbd8b5f09bc01a1d7878 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
58a5ea76b4f7d662d3165dfeaad258087b0ec58b7ff87a62971c60817388ec6191d6dc841d63696d00fb68fe16b690790f3c0639e0edbd204033b4f8bbb4dafe 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
85d60bc6ef5f41854a5bc36847917dcee24bf6663fcd70b78a164a07fc08551f74fe37329b57cf187b95e23a6d04bce2ba620f21ac80c8df7d9cfcc8052089df 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
8ef0f45bc0639464537f39319f4954d9a9ab182e14a10c6e39455bebddd24dcdbe6ec3fc0316324a4f9d7dc1f95ec8babd7112c2ff05af54534e0fbe74ff6ebf 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
d8467365c19339e52bcf27476b338fb412b6a7dd6eefd4fd92822e67c756a1f04a106f4e0c1c1909b4bee8f5f3b506a98614c1bf3478d7714415cca9eb7257e1 0012-libgcc_s.patch
|
||||
cab0cb6c462f2f4abefde020e17199366c6c24ad2582fe7d793c552aa2bcbe3148c5f6cd6245bc9ff86017d949ef4e6f063c8a01ce7d247abfe685077c57e71c 0013-nopie.patch
|
||||
b1277a4edc91208fecf5ad7015e8cf237d567b310063f26d14ff39c4aade683e6d1d54d817b7f4fef79db7dc456be9f09a5a8c0ceeff784f839521d0cf243807 0014-ada-fix-shared-linking.patch
|
||||
9fa42ba8374b8e47cb3d96315d783c990cf35075354869f5657383908c4d5f143ee94d1f7f86f52140a974f5fc872b22bcaec1f732ebc249357a86ad9e781d4e 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
05e1e06a6e33958ec5c22b26919fe142153c9605173ad90c770a32d7d48dfb5df421553f3030b6d979f34acbd3614d0e32c86c3cb0b819f3fbaa054f2962ff20 0016-add-fortify-headers-paths.patch
|
||||
784d488cf55fafa259d3aa874f4230453b4d3aeb94158d0c96caf26524b8b7f8cea12367a72fa4616389dfcb877c4a1c4fe9d1cb57a67c0329bbad61e91ee423 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
18c1092273005f4fcaec36830a2cbfbf5e2a2e4e82cf5f7f4f7f3141dbbe2731db2f47a9869f271b4ee337835962c7dfbf009165f2988a14ff40d6c6935986ce 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
4bbce70032f125002aa857b0561c80e15588847282c2ab2851c3c507a48d22613ef3affb288c33da461688890c7ce265c6175fb1580194669621653788172d1b 0019-aarch64-disable-multilib-support.patch
|
||||
d4bf0a7add6d531871324c36004f7d92eea9ad7042d567e43377e5bdde7dce8d87c649c3c4bdf0144b82d2607b46fab4eb821cf9a82ee4eddb003601b331e395 0020-s390x-disable-multilib-support.patch
|
||||
e0002f9aea22c923530591f97cfb29953cd924a78b3c7ae5d15ccaae46491c1f40b03a5dc5fc17a286299b82ef48248a9ecbf6eea9bbd2058189a697e9e2ffe8 0021-ppc64-le-disable-multilib-support.patch
|
||||
28b6e2f1574611964f8e2effa57dcb6efff5d562ec5f923abfa9ddeaf4a09b0c6941d1406b02d113f950113b7239dcc8dd6b14d06ade3b2f4dbdb7f6d5560bed 0022-x86_64-disable-multilib-support.patch
|
||||
6955ea39199f258340b69c8aa7021c65fc15179323f50be08952a302b77cec1a720b99ada60bf2a07594ba536a50b682d06290497fc9d4553c8e11e2f536a606 0023-riscv-disable-multilib-support.patch
|
||||
46bfcfc122a29060d6ff1fb52b509251ba44357df67f81be1c274fdfe9b80099b1a5ad64f7d40d8412bb437e6147cb404448b8e067989018bdaf2df5cdfabaef 0024-always-build-libgcc_eh.a.patch
|
||||
07b4028c8d8c7b8bc71c0fb4e31669fb2066aefdded556d0a65773fa93db097a55e9bfa9ac9ee10fbc82e4ba21aa84738e91c331b768cf7d067407934fc30064 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
7201a76ac033bd4f7532600d7a975f2aa9f93692cec42e28323e6e8e27f7357e0cb1497c12503829a41ed025e9c7953bf4738ad0d980687a774088fabaf08cdf 0026-ada-musl-support-fixes.patch
|
||||
f3974d1a693c0e382fa78ae94ebf768c6a1ca0ee631b478cf52a366537edae373cd0ab31369ef1ae0627d2834bcacfb94c9a4d01505c91eaac9d228a5933d0ae 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
8f77c3a908ec92966fb1697fd40cc936d4dca2624f6f14b199ba154f8c46be773548a571b41a1cf537134b011e3426deb443e4a13e49fb763c91c821ca1bae63 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
8cd10e3d10e3da0505cb4c09c4448335e5bbd18fe6e2c47cfa1257df3d83234983d71b1fdb0b4bfc76b24d477fd6e2d771b8eefacbb61e0ca1df105b980dbd4a 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
e026f1e20b78328b55b92a5fdf8f9d1d761176d2eea90556d7be8e2bae72d0dc52fd482d1eac8ab623e98653ca56d39b18fd2139ff99d420994b10c36f266ca6 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
80b41cf68a7e56bef50c05073cc79b9eafbd37535f6360deac16dfe5498ac041aaf91c3cc1bc6e323d574cd1da65aab22df32a03e39f606bff41a103063aafef 0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
b4917017c45d170c6878c7744c1ecababef4346903ee1f684d5a59d65255a5576d16d40137f7dbfe46144907c6389035966813e9024c9a4f499e963ed533947a 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
1cc7a5ef067bf543f6c1fa14dedc6378750a43be1649b18605699dffdc1ebce8b88405d3f12dd57e3d821c7d457d861ee0a54138c037917d6365b0bf69526e85 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
77a1426e316b96b51edef9a35a64565d5f84b94d46a2fd7293ea406ede473b449613969f9e29cae44f8fbfbc767a27cef01b36392cf8ffb3f618c0df4e217c71 0034-libgo-fix-lfs64-use.patch
|
||||
"
|
||||
@@ -1,7 +1,7 @@
|
||||
From 75e758609803afe6ced6cd7799b4159f3848a8d5 Mon Sep 17 00:00:00 2001
|
||||
From 47b4bd4deb2c356bb07d2a96f22127aefafec3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH 01/33] posix_memalign
|
||||
Subject: [PATCH 01/34] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 447c2a21d1fa8c2c3b216102a808834d86f12104 Mon Sep 17 00:00:00 2001
|
||||
From 4fa620d8c3e6730211bfb071eb4c817320491bd0 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 02/33] gcc: poison-system-directories
|
||||
Subject: [PATCH 02/34] 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
|
||||
@@ -120,7 +120,7 @@ index 09082e8ccae..5504bf6eb01 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b61ecfc1bc8..b290908679e 100644
|
||||
index af0e5933fdb..b6731a4673c 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
@@ -131,7 +131,7 @@ index b61ecfc1bc8..b290908679e 100644
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type
|
||||
-Wno-scalar-storage-order -Wsequence-point
|
||||
@@ -8424,6 +8425,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -8426,6 +8427,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.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b5c378c4c1e71b2dd8b4616d8f61530ee1a3ac98 Mon Sep 17 00:00:00 2001
|
||||
From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH 03/33] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH 03/34] specs: turn on -Wl,-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.
|
||||
@@ -14,10 +14,10 @@ now by default.
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b290908679e..cb34e6d40c9 100644
|
||||
index b6731a4673c..f393c7846c6 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -17961,6 +17961,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}.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From bb3ef1f5acfde9658c922d0aef9283fe60328c33 Mon Sep 17 00:00:00 2001
|
||||
From 1b315235433701e4a974da259b8d651169ddc7ac Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
Subject: [PATCH 04/34] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
@@ -25,10 +25,10 @@ index 5d64625fcd7..868d69506e4 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index cb34e6d40c9..7f1aa660285 100644
|
||||
index f393c7846c6..ef3c14a189e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -11866,6 +11866,12 @@ also turns on the following optimization flags:
|
||||
@@ -11868,6 +11868,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.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0727ad9e4a458d090be6fb0cfbe334d8496cd5e0 Mon Sep 17 00:00:00 2001
|
||||
From 67c0f5789630b27149f60ff831999ef7c1dba5d5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
|
||||
Subject: [PATCH 05/34] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dc3e2f629fe7f8df81c74162c66910339ec5d03d Mon Sep 17 00:00:00 2001
|
||||
From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
|
||||
Subject: [PATCH 06/34] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d25c373cf839df0720f8d345b5ad55147030515a Mon Sep 17 00:00:00 2001
|
||||
From 4a728ad48a7b437cc6f2697e26603bf648149f86 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
|
||||
Subject: [PATCH 07/34] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From eb58983c3d3126caaab8ed174571b142a095c132 Mon Sep 17 00:00:00 2001
|
||||
From 32f24560d0602f7735d5e9efd92fe3151bd72cea Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
Subject: [PATCH 08/34] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 823afef2053ca4f79ac13f2b0f52b132282ee705 Mon Sep 17 00:00:00 2001
|
||||
From c7ec8da7280d7f97f5543eb9ddeca7600aafc43c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
|
||||
Subject: [PATCH 09/34] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 702cbba342eae468e79d9b42e366b9699c158402 Mon Sep 17 00:00:00 2001
|
||||
From aaa029bcee68298695b7c4278c90b6bc320d098c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
|
||||
Subject: [PATCH 10/34] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 18f0ecbdab63b0ee590ef21650ac72879318a8be Mon Sep 17 00:00:00 2001
|
||||
From 65e01e749205c9af218b01233cebd0077538d0ee Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
|
||||
Subject: [PATCH 11/34] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e350a47267790a1a624032a645425b4018433e0c Mon Sep 17 00:00:00 2001
|
||||
From 453a815bf2844971a91eaef800af188d9e86b784 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH 12/33] libgcc_s
|
||||
Subject: [PATCH 12/34] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.cc | 4 ++--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6ed790bb2e5bf49d186885cad8fd7efc10d8fd36 Mon Sep 17 00:00:00 2001
|
||||
From 7d7d12137c666761a8dd61179c9651b85dae9b41 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH 13/33] nopie
|
||||
Subject: [PATCH 13/34] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c7398885b5c2cd91a3ad1a56fde272b719d17ff5 Mon Sep 17 00:00:00 2001
|
||||
From dd5bb97c31a9f57034c70a7a18ba6e2e133084c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH 14/33] ada: fix shared linking
|
||||
Subject: [PATCH 14/34] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c2861147eacede8c97dbb8d251f7d30ac2116481 Mon Sep 17 00:00:00 2001
|
||||
From 6bb5b7d9161d05f31b001d8211a9c63caf63fd2f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
Subject: [PATCH 15/34] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 736fd338aaa6d0686b15beabac687a20cfb29c27 Mon Sep 17 00:00:00 2001
|
||||
From f0d9e00cac06689f64b214de7aee80d7116ef084 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH 16/33] add fortify-headers paths
|
||||
Subject: [PATCH 16/34] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f71fef0a3d527ba84faaf63cee2a5ecb2322412e Mon Sep 17 00:00:00 2001
|
||||
From 857db04f4f1a06e866551b4172fe8f27363f4a92 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 17/33] Alpine musl package provides libssp_nonshared.a. We
|
||||
Subject: [PATCH 17/34] 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 06624ddc7dfd4dcfb4e41f4549ffcacfbc43b315 Mon Sep 17 00:00:00 2001
|
||||
From 5a8347e23ab13912b6edec2c6c6e3a101b017c79 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
|
||||
Subject: [PATCH 18/34] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cbc762f2d4c8ae714f7a0c762d90453607a5c2e5 Mon Sep 17 00:00:00 2001
|
||||
From 41d00a2eb0754acf71958808bd17dbebeb517b84 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH 19/33] aarch64: disable multilib support
|
||||
Subject: [PATCH 19/34] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f820b730e48421ab03e5742dc06e83570690078e Mon Sep 17 00:00:00 2001
|
||||
From 85b42bfbba71616831d14360b16998acb28790fd Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH 20/33] s390x: disable multilib support
|
||||
Subject: [PATCH 20/34] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 40c3d28f4d090fcd3486ca2a88d0c7618fdb03ed Mon Sep 17 00:00:00 2001
|
||||
From 7b53df284242638e940c0155b6c21e88cea1f55b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
|
||||
Subject: [PATCH 21/34] ppc64[le]: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 05cf20eb11b3013c2fbb26c841485f675811058c Mon Sep 17 00:00:00 2001
|
||||
From 96e7e1e9a899d9bb5fcbdf788bd529d0390c626f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH 22/33] x86_64: disable multilib support
|
||||
Subject: [PATCH 22/34] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0920d23e3a345bc17675b9bebc52644c238123e2 Mon Sep 17 00:00:00 2001
|
||||
From b26224acf342eacb33491f6ea0da1faf73d35715 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 23/33] riscv: disable multilib support
|
||||
Subject: [PATCH 23/34] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5c955776d65f5a018375652904b088a37203899d Mon Sep 17 00:00:00 2001
|
||||
From a72e0613f79f6b6867819317accb7a714031a08c Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH 24/33] always build libgcc_eh.a
|
||||
Subject: [PATCH 24/34] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ac6202d063308fbf67e4b617b768536e66a44519 Mon Sep 17 00:00:00 2001
|
||||
From 3ee8cbc1cad261b30d4a7a66d31496d5f243ce2f Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
|
||||
Subject: [PATCH 25/34] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b7404c39a6a76ebe382caa2b9da16006413b21b9 Mon Sep 17 00:00:00 2001
|
||||
From 3df4788c79c7429b196c7b284af2b4cf9a4b4f8d Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH 26/33] ada: musl support fixes
|
||||
Subject: [PATCH 26/34] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 401ac3feeea049a8035bf916f550ce6f4e859cba Mon Sep 17 00:00:00 2001
|
||||
From 7b50823d8a4131e5a55d2499a0f5a52b3d91eed2 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH 27/33] configure: Add --enable-autolink-libatomic, use in
|
||||
Subject: [PATCH 27/34] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
@@ -166,10 +166,10 @@ index 57268319de1..56bcaa87620 100644
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index 928fc6b6d4b..81a677014df 100644
|
||||
index b30d3691fe6..ccc8e5dbb00 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2374,6 +2374,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
@@ -2377,6 +2377,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}.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cd46156af13743fe93c48d00b0661add2c319226 Mon Sep 17 00:00:00 2001
|
||||
From 5bbbd320e54ab5341cfba83e8af98685131caba1 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 12:23:34 +0200
|
||||
Subject: [PATCH 28/33] configure: fix detection of atomic builtins in
|
||||
Subject: [PATCH 28/34] configure: fix detection of atomic builtins in
|
||||
libatomic configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f0f2cad36cd4796426ce1c25a6cec7c70a56741e Mon Sep 17 00:00:00 2001
|
||||
From 430c701a3cefbe09a9c7c8a2f5bbe957f9b2ecb2 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Thu, 30 Jun 2022 16:44:51 +0000
|
||||
Subject: [PATCH 29/33] libstdc++: do not throw exceptions for non-C locales on
|
||||
Subject: [PATCH 29/34] libstdc++: do not throw exceptions for non-C locales on
|
||||
musl targets
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b474c9688ebda225ced95ecea0219312110d9c9e Mon Sep 17 00:00:00 2001
|
||||
From 05f0043755f341a2ff4f845379327076b3e0203d Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 03:49:21 +0000
|
||||
Subject: [PATCH 30/33] gdc: unconditionally link libgphobos against
|
||||
Subject: [PATCH 30/34] gdc: unconditionally link libgphobos against
|
||||
libucontext
|
||||
|
||||
ref: alpine/aports#13422
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6598811df64744ba862e36a6dca88578b01dd46e Mon Sep 17 00:00:00 2001
|
||||
From 0b89a74fbf77ae6917f043c79cd03db0d6ef0212 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
||||
Subject: [PATCH 31/33] druntime: link against libucontext on all platforms
|
||||
Subject: [PATCH 31/34] druntime: link against libucontext on all platforms
|
||||
|
||||
On musl-based Linux distributions, swapcontext etc. are not provided by
|
||||
musl but instead by libucontext. Hence, we _always_ need to link against
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4e84b0a3c019438b25de7c1e844746e4bc83af42 Mon Sep 17 00:00:00 2001
|
||||
From eeec799f43fbd0bfffc13594585b39d708972511 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Tue, 19 Jul 2022 14:54:07 +0200
|
||||
Subject: [PATCH 32/33] libgnat: time_t is always 64-bit on musl libc
|
||||
Subject: [PATCH 32/34] libgnat: time_t is always 64-bit on musl libc
|
||||
|
||||
---
|
||||
gcc/ada/libgnat/s-parame.ads | 2 +-
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
From 4cf06fff68090b1681d070a55214f2ab26754edf Mon Sep 17 00:00:00 2001
|
||||
From b71d21b87e6946c763edad5e420bf22d8a453077 Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 29 May 2023 15:33:11 +0000
|
||||
Subject: [PATCH 33/33] libphobos: do not use LFS64 symbols
|
||||
Subject: [PATCH 33/34] libphobos: do not use LFS64 symbols
|
||||
|
||||
musl does not have these since 1.2.4, we can't use the compat interfaces.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/config.d | 2 +-
|
||||
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/config.d b/libphobos/libdruntime/core/sys/posix/config.d
|
||||
index ae6752f220e..6b80d1ff0e6 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/config.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/config.d
|
||||
@@ -88,7 +88,7 @@ else version (CRuntime_Musl)
|
||||
enum __REDIRECT = false;
|
||||
|
||||
// Those three are irrelevant for Musl as it always uses 64 bits off_t
|
||||
- enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
|
||||
+ enum __USE_FILE_OFFSET64 = false;
|
||||
enum __USE_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
|
||||
enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
index 0d3d517d69a..323aa0af72d 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
From 4bfcb35bc43d3e3b7510620362d7c28d9e4c17ca Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 10 Jul 2023 23:23:29 +0000
|
||||
Subject: [PATCH 34/34] libgo: fix lfs64 use
|
||||
|
||||
---
|
||||
.../go/internal/syscall/unix/at_largefile.go | 2 +-
|
||||
libgo/go/os/dir_largefile.go | 2 +-
|
||||
libgo/go/syscall/libcall_glibc.go | 2 +-
|
||||
libgo/go/syscall/libcall_linux.go | 4 +--
|
||||
libgo/go/syscall/libcall_posix_largefile.go | 26 +++++++++----------
|
||||
libgo/runtime/go-varargs.c | 2 +-
|
||||
libgo/sysinfo.c | 9 +++----
|
||||
7 files changed, 22 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
index 82e0dcfd074..16151ecad1b 100644
|
||||
--- a/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
+++ b/libgo/go/internal/syscall/unix/at_largefile.go
|
||||
@@ -10,5 +10,5 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
-//extern fstatat64
|
||||
+//extern fstatat
|
||||
func fstatat(int32, *byte, *syscall.Stat_t, int32) int32
|
||||
diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go
|
||||
index 1fc5ee0771f..0c6dffe1a75 100644
|
||||
--- a/libgo/go/os/dir_largefile.go
|
||||
+++ b/libgo/go/os/dir_largefile.go
|
||||
@@ -11,5 +11,5 @@ package os
|
||||
|
||||
import "syscall"
|
||||
|
||||
-//extern readdir64
|
||||
+//extern readdir
|
||||
func libc_readdir(*syscall.DIR) *syscall.Dirent
|
||||
diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go
|
||||
index 5c1ec483c75..5a1245ed44b 100644
|
||||
--- a/libgo/go/syscall/libcall_glibc.go
|
||||
+++ b/libgo/go/syscall/libcall_glibc.go
|
||||
@@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
|
||||
-//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
|
||||
+//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if race.Enabled {
|
||||
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
|
||||
index 03ca7261b59..ad21fd0b3ac 100644
|
||||
--- a/libgo/go/syscall/libcall_linux.go
|
||||
+++ b/libgo/go/syscall/libcall_linux.go
|
||||
@@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) {
|
||||
//adjtimex(buf *Timex) _C_int
|
||||
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
-//fstatfs64(fd _C_int, buf *Statfs_t) _C_int
|
||||
+//fstatfs(fd _C_int, buf *Statfs_t) _C_int
|
||||
|
||||
func Gettid() (tid int) {
|
||||
r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0)
|
||||
@@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
|
||||
}
|
||||
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
-//statfs64(path *byte, buf *Statfs_t) _C_int
|
||||
+//statfs(path *byte, buf *Statfs_t) _C_int
|
||||
|
||||
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
||||
//sysinfo(info *Sysinfo_t) _C_int
|
||||
diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go
|
||||
index f90055bb29a..334212f0af1 100644
|
||||
--- a/libgo/go/syscall/libcall_posix_largefile.go
|
||||
+++ b/libgo/go/syscall/libcall_posix_largefile.go
|
||||
@@ -10,40 +10,40 @@
|
||||
package syscall
|
||||
|
||||
//sys Creat(path string, mode uint32) (fd int, err error)
|
||||
-//creat64(path *byte, mode Mode_t) _C_int
|
||||
+//creat(path *byte, mode Mode_t) _C_int
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
-//fstat64(fd _C_int, stat *Stat_t) _C_int
|
||||
+//fstat(fd _C_int, stat *Stat_t) _C_int
|
||||
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
-//ftruncate64(fd _C_int, length Offset_t) _C_int
|
||||
+//ftruncate(fd _C_int, length Offset_t) _C_int
|
||||
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
-//getrlimit64(resource _C_int, rlim *Rlimit) _C_int
|
||||
+//getrlimit(resource _C_int, rlim *Rlimit) _C_int
|
||||
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
-//lstat64(path *byte, stat *Stat_t) _C_int
|
||||
+//lstat(path *byte, stat *Stat_t) _C_int
|
||||
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
-//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
|
||||
+//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
|
||||
|
||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
-//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int
|
||||
+//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int
|
||||
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
||||
-//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
+//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||
-//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
+//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
|
||||
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error)
|
||||
-//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t
|
||||
+//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t
|
||||
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
-//setrlimit64(resource int, rlim *Rlimit) _C_int
|
||||
+//setrlimit(resource int, rlim *Rlimit) _C_int
|
||||
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
-//stat64(path *byte, stat *Stat_t) _C_int
|
||||
+//stat(path *byte, stat *Stat_t) _C_int
|
||||
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
-//truncate64(path *byte, length Offset_t) _C_int
|
||||
+//truncate(path *byte, length Offset_t) _C_int
|
||||
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c
|
||||
index f84860891e6..7efc9615985 100644
|
||||
--- a/libgo/runtime/go-varargs.c
|
||||
+++ b/libgo/runtime/go-varargs.c
|
||||
@@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg)
|
||||
int
|
||||
__go_open64 (char *path, int mode, mode_t perm)
|
||||
{
|
||||
- return open64 (path, mode, perm);
|
||||
+ return open (path, mode, perm);
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 180f5c31d74..1d717d55c0e 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -366,7 +366,7 @@ typedef loff_t libgo_loff_t_type;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OFF64_T)
|
||||
-typedef off64_t libgo_off_t_type;
|
||||
+typedef off_t libgo_off_t_type;
|
||||
#else
|
||||
typedef off_t libgo_off_t_type;
|
||||
#endif
|
||||
@@ -398,13 +398,11 @@ typedef off_t libgo_off_t_type;
|
||||
|
||||
// From dirent.h
|
||||
SREF(dirent);
|
||||
-SREF(dirent64);
|
||||
OTREF(DIR);
|
||||
EREF(DT_UNKNOWN);
|
||||
|
||||
// From fcntl.h
|
||||
SREF(flock);
|
||||
-SREF(flock64);
|
||||
|
||||
// From ffi headers
|
||||
SREF(_ffi_type);
|
||||
@@ -485,11 +483,10 @@ EREF(SS_ONSTACK);
|
||||
EREF(SEGV_MAPERR);
|
||||
|
||||
// From stat.h
|
||||
-SREF(stat64);
|
||||
+SREF(stat);
|
||||
|
||||
// From statfs.h
|
||||
SREF(statfs);
|
||||
-SREF(statfs64);
|
||||
|
||||
// From sysinfo.h
|
||||
SREF(sysinfo);
|
||||
@@ -519,7 +516,7 @@ EREF(PTRACE_PEEKTEXT);
|
||||
|
||||
// From sys/resource.h
|
||||
SREF(rusage);
|
||||
-SREF(rlimit64);
|
||||
+SREF(rlimit);
|
||||
EREF(RLIMIT_NOFILE);
|
||||
EREF(PRIO_USER);
|
||||
EREF(RUSAGE_SELF);
|
||||
--
|
||||
2.41.0
|
||||
|
||||
+40
-38
@@ -24,7 +24,7 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgver=13.1.1_git20230603
|
||||
pkgver=13.1.1_git20230715
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-armhf
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -267,6 +267,7 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
0034-libgo-fix-lfs64-use.patch
|
||||
"
|
||||
|
||||
# we build out-of-tree
|
||||
@@ -319,7 +320,7 @@ build() {
|
||||
powerpc-*-*-*) _arch_configure="--enable-secureplt --enable-decimal-float=no";;
|
||||
powerpc64*-*-*-*) _arch_configure="--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux";;
|
||||
i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";;
|
||||
i586-*-*-*) _arch_configure="--with-arch=i586 --with-tune=generic --enable-cld";;
|
||||
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
|
||||
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
|
||||
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
||||
esac
|
||||
@@ -423,7 +424,7 @@ build() {
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
make -j1 DESTDIR="$pkgdir" install
|
||||
|
||||
ln -s gcc "$pkgdir"/usr/bin/cc
|
||||
|
||||
@@ -780,38 +781,39 @@ gdb() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
207d1a0a3e17ab8d1912918c31291850461ee3ad476ffcbcafd875cf2b7a3eca0a48bc03f0e6b71a5a0ca7df39f5c256c72b54dbe48e19de23135873bd38e3ad gcc-13-20230603.tar.xz
|
||||
5738a25e510d47058ea7acf44f47292c365f74f60f75d600c3bdf79022a78e3c14c87648e23d3f44612833123ba1ae6776c8a6ea4371bf8c2cf31ea8296a0278 0001-posix_memalign.patch
|
||||
35cba990b41ba8fd2544404a0330ceddfbc7b63475f4ebb515552d5ec494d0099f0585240a36099431ae6dcaf9bd7674ca0224f0dd4310cd3597aabadedd1d07 0002-gcc-poison-system-directories.patch
|
||||
fa3b349be7e7f49c1d2192a84d6fc6b9f9b750381607711950d3ad5c867c677dac65dc2274fa4227aa6909d6b5e0fcc59b137254202035e930a2c6a0ba494e2f 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
495b08b8b25f25f616fd68d205c23232d8307a35dae81f5d37e248ec704734e40618d5e3855f1cedeaa615b1d03e5a34089695faca9798d51a367a0e3bc59b78 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
ee10b0b91e7b0a91a47b6708dd8a41c8f08a89f87a3eed57aed2ea3df5b7109a2a33741651a294a10f056c736beeb0be0fb6004c0517e8687a80bc33be50d8c9 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
87dca73e398acf396ade55b8cd533d3e90889444c27069df9840a57d524d8f045781b4a38f9e0e52595a510049a0832a5067f6f0200df00fc51501316fa7c61b 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
5eca632dbb3f709ee92ba89e062642cfcf854aa31426b8eca859432773bff4bffd35fa6a7418a760bed89a30a1f64e1de87b0353e9d332d8abc72c14e236e1ed 0007-Enable-Wtrampolines-by-default.patch
|
||||
d46546536564f76abcda3a54b0c159175aca7044542fdcdf1f08c46bfabff452e2ba7d535e9e5b04c9c595c3f865bf80bdece8aee4a0bc24baea4f2c94fcf0bb 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
00ce50efdeb9a31cbd9ca2d2fa22cd27b1d972e96c01948bd9ae95aff7275e6bc894196ff871107c5feadb6cb832119127240f4539fda35d4326955babf5f510 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
46a228b875f835fd1c2cae479f5e931cd2afc4124690ebb935ea49a3fc4ed46b69d4c76e18a1d7632283690e9d51fbcb90f478fc0b87d532dc095fcf067de7e6 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
b2c5e2af8f6f50da5795de7fb94309149eb63b1dcc31d72147975702b751e7af0f89adbde7e359416a4ad7749c3d251e6c2b8b57c9a24c77e15c9ce4730d5e4a 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
8c60c72a123d984452b57bc6a7d3dea3ab092e963d459d8a69a27384c8cf2d7e0e718d1dda2957b62cb2d0353dd851e57c3d1791f90adf6a32393b64846677d9 0012-libgcc_s.patch
|
||||
082a1dcca42899fc7c70616f0b73fc640fbaae8c4f08c960c71bd9f2cda57bf34a662f1f6327a6eb7e026ebe3414ee71303c3354687ad6c14068fdf37025f2e5 0013-nopie.patch
|
||||
ced25410c21b0bac351ef4a6c2d381f4e0a1c0f4043899bbed2f10ad5f5c39ec6ff4cde07c62d486643a89421c28266798234c318a09a029bc1a79d6adee1c0e 0014-ada-fix-shared-linking.patch
|
||||
f245428f57f1d59e353b3c1d745c7cb3987689d8ef3cb38e113f69750dca08ed76681ed72b2d5ee659d0d6c33179c4b12eb1d509c0baf185cc8c8549e0c09f8f 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
4fd357f4f24899f742e19680db543647dea556e3144744ac990474ee01f32d28e1724f6f56dac4ba2ce2491aae88ffea16b6f7c33b74132deb2f932d550f119a 0016-add-fortify-headers-paths.patch
|
||||
dd028aeb2e8a32157a419f4450fa70a96522ce2de88febfac374d11f1340660584c7547eaa287715f585289aa313b17918a52b64bc758778833f387c0e3c3506 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
47eb31a354177f4abd699e6bcb29ba688eeb51511b27969a88e25a0153108023ceb3d821fe3ffca0491dafec5341a3186b813519b9d043450eeec990bfc7d7d4 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
b77e98c45d28e42ec9f9842b5aab3fd69b8696ea69376a049e7792bd5cef98c730ab5a458406084fb7be2f3c361962c407b72dde3dd27857f55433f3fc749b3c 0019-aarch64-disable-multilib-support.patch
|
||||
79b3a8ea1fe452a2f8fdf2b15b75754ed00f2993120596e7870622d4d608edf8c3ddc31181dafa40815fdfe277a10d539830484f09a57c3b0ee5677785224e04 0020-s390x-disable-multilib-support.patch
|
||||
d250d791dd9d5190eee9fc54326830b0e19d9986e801d0576199808c6e211f5137ce71b92e0dbfb1ab910c22311b4b48dbbd63fa9390c2e2491dce80062e5f51 0021-ppc64-le-disable-multilib-support.patch
|
||||
51206e8132e93bb79f891f0f69461982435fa4212b1bf91c75b9bb9ee7fd25106d53fad21470f4706b5d258fbe1715ef7524d6c2bb94813b7d4a48d949a176f7 0022-x86_64-disable-multilib-support.patch
|
||||
b774c6a750077a546d1cef0b31812d5d68cf64a8abdd47a30180fb6f3a848941e7986f4a587da9a6ab034e5083068723620319e3f821f0db3ff66dc4c33faf06 0023-riscv-disable-multilib-support.patch
|
||||
1b6ed17c5798d8fd80826188c35232d0f90843d6cba060ea784fdfa5b5cb2490ac4507ce9802f7f6f50ccb7fe5db34cd6860c256e9da311710c95b1d4870fc1c 0024-always-build-libgcc_eh.a.patch
|
||||
4b9f4446254720e692478fb016798b44c6ebc021816dff49fe32b6eac4f4da091c47adf46f040df603ee74f4986a832257eaad4d3c594b6d50a23e447c755586 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
fbc903ca64f8a17ea8ffce4cb882dd53713dee3b24b729ab81741a8133802b9c95619596829706fcfe26350a33e8558dc9b9edf92802170041c3f4f831b2ff2c 0026-ada-musl-support-fixes.patch
|
||||
8d3f37bd75a9fea17c277b380aa943ad44989c65e6aabbf09f9c3f35acb1f048dbe361bc788b6ef2133dee3b9f646c56637811fe33171a50a2a024fe9d78e6ef 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
04a07053c82842f1ec5ec58723c0801659f8174318e32d1e966411422bfa9665f259ba9025d030e0e298608d6eeff423cbe5ed9981717d691a49de8806ead7aa 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
3398fcb9273e5d76006b2c2c0215cf9ead757faa4751f7a55cf7bc687894ac38da47e76700860ea3c7f8feb18361e4ce8ce6b16a365fdfe4c61032bd53da56e7 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
ac86593db92aca836a91dd7ad3060e6c1d92b1b7c685a6fa1b51281f76b091fb07058d8d53f16f7df18eb148fde0526723c6cf6fc4c38471399dc7fde8892307 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
e2f8901bf30494563373a24cb632a251056cb99dbb9cce789817f12016da323f702d981ce4ba9d7d52eefc33f257568509d391776fd022b012e589b43857c696 0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
434d3739d7e6ecc5017c29711c3a7c207e7c673d2a535607dea78a5a5d265d8efb74b7f726c18efc13e9c80c29385ce1b4e3b53c7d1c9d55bb1b8a217425f3ea 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
8a56a2a1d1c60894ab429ecc8fa3ddbfdd6c7e3cc9f764b4f260695a2cd54442668e9b4c7ba62d833e5dbc05548586aefc344caf9ea87cdf6de60ce3c30f9da9 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
942d706e7f8ae8dbc85808e388b9c98de6bd922d49adeca63691218363a4f0b46829509ba1f1ed358ef436e1adf77ad7a820aaeb4bb03a4fc52cfdec118394f3 gcc-13-20230715.tar.xz
|
||||
438eda29a1851c72e65422bb4cd129ecc016f06f9bd038288e39762c01b932f786ed4aad587c7b16baf948c342c10dc9beff125166b97e0b8e0d05789aec95ce 0001-posix_memalign.patch
|
||||
4a7cd030e107b6e35fb883c80f21a547da14f540f989555ac2c9ba08958ace5b44dca194a96b460415c71f663e885954d73b04ade55f2f9d3cb116f50df8d8ca 0002-gcc-poison-system-directories.patch
|
||||
99b194f53677c3a75c3c376160673703f2d759d795ebd9f6e66d5ee095a648eba35d8aef1990a6a1e805c1cc1720636d7c23ef6102b674d92996b1e5646a0b2c 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
39013ad0b255e9cfd168010eefc32ec4d015fce2c2b4e864341a6aa8bdb74e52a08f0ae83f29e27e9524d4da27f28369a6aa4d76f6aed6490dc2961b18f90e94 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
0ef08231bef5c77a38e8deaae4e00675de4312071425cf1db46ee54c3e00d2a5d1658a68302dd495c796d397e61e79efcf4e91fbd8fb2cd2e2fa539c2e884492 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
8202e22832141fb12601546cec42472fdb194892f839e9fed86b4ab597204b6e6575c0585c283301eeb598ac1f06d16ce500d9c0ea333444bd50ae2a210d2d76 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
1b239b94b570a0eff2249a9ec7ad150270c3210128f8f8a67e1554a044a039b2acc69768ebc57a15cec661f039c41fb7b620e7ec65320efbce40ceec1c9c6b90 0007-Enable-Wtrampolines-by-default.patch
|
||||
eb3ce4df99bf4f22ca4bac2d4e24be4c235098fb67ae118cb8efe360f0441a39a9931076fa615fbc3b7d2b2a541d4ffb2cfc56097224fbd8b5f09bc01a1d7878 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
58a5ea76b4f7d662d3165dfeaad258087b0ec58b7ff87a62971c60817388ec6191d6dc841d63696d00fb68fe16b690790f3c0639e0edbd204033b4f8bbb4dafe 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
85d60bc6ef5f41854a5bc36847917dcee24bf6663fcd70b78a164a07fc08551f74fe37329b57cf187b95e23a6d04bce2ba620f21ac80c8df7d9cfcc8052089df 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
8ef0f45bc0639464537f39319f4954d9a9ab182e14a10c6e39455bebddd24dcdbe6ec3fc0316324a4f9d7dc1f95ec8babd7112c2ff05af54534e0fbe74ff6ebf 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
d8467365c19339e52bcf27476b338fb412b6a7dd6eefd4fd92822e67c756a1f04a106f4e0c1c1909b4bee8f5f3b506a98614c1bf3478d7714415cca9eb7257e1 0012-libgcc_s.patch
|
||||
cab0cb6c462f2f4abefde020e17199366c6c24ad2582fe7d793c552aa2bcbe3148c5f6cd6245bc9ff86017d949ef4e6f063c8a01ce7d247abfe685077c57e71c 0013-nopie.patch
|
||||
b1277a4edc91208fecf5ad7015e8cf237d567b310063f26d14ff39c4aade683e6d1d54d817b7f4fef79db7dc456be9f09a5a8c0ceeff784f839521d0cf243807 0014-ada-fix-shared-linking.patch
|
||||
9fa42ba8374b8e47cb3d96315d783c990cf35075354869f5657383908c4d5f143ee94d1f7f86f52140a974f5fc872b22bcaec1f732ebc249357a86ad9e781d4e 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
05e1e06a6e33958ec5c22b26919fe142153c9605173ad90c770a32d7d48dfb5df421553f3030b6d979f34acbd3614d0e32c86c3cb0b819f3fbaa054f2962ff20 0016-add-fortify-headers-paths.patch
|
||||
784d488cf55fafa259d3aa874f4230453b4d3aeb94158d0c96caf26524b8b7f8cea12367a72fa4616389dfcb877c4a1c4fe9d1cb57a67c0329bbad61e91ee423 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
18c1092273005f4fcaec36830a2cbfbf5e2a2e4e82cf5f7f4f7f3141dbbe2731db2f47a9869f271b4ee337835962c7dfbf009165f2988a14ff40d6c6935986ce 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
4bbce70032f125002aa857b0561c80e15588847282c2ab2851c3c507a48d22613ef3affb288c33da461688890c7ce265c6175fb1580194669621653788172d1b 0019-aarch64-disable-multilib-support.patch
|
||||
d4bf0a7add6d531871324c36004f7d92eea9ad7042d567e43377e5bdde7dce8d87c649c3c4bdf0144b82d2607b46fab4eb821cf9a82ee4eddb003601b331e395 0020-s390x-disable-multilib-support.patch
|
||||
e0002f9aea22c923530591f97cfb29953cd924a78b3c7ae5d15ccaae46491c1f40b03a5dc5fc17a286299b82ef48248a9ecbf6eea9bbd2058189a697e9e2ffe8 0021-ppc64-le-disable-multilib-support.patch
|
||||
28b6e2f1574611964f8e2effa57dcb6efff5d562ec5f923abfa9ddeaf4a09b0c6941d1406b02d113f950113b7239dcc8dd6b14d06ade3b2f4dbdb7f6d5560bed 0022-x86_64-disable-multilib-support.patch
|
||||
6955ea39199f258340b69c8aa7021c65fc15179323f50be08952a302b77cec1a720b99ada60bf2a07594ba536a50b682d06290497fc9d4553c8e11e2f536a606 0023-riscv-disable-multilib-support.patch
|
||||
46bfcfc122a29060d6ff1fb52b509251ba44357df67f81be1c274fdfe9b80099b1a5ad64f7d40d8412bb437e6147cb404448b8e067989018bdaf2df5cdfabaef 0024-always-build-libgcc_eh.a.patch
|
||||
07b4028c8d8c7b8bc71c0fb4e31669fb2066aefdded556d0a65773fa93db097a55e9bfa9ac9ee10fbc82e4ba21aa84738e91c331b768cf7d067407934fc30064 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
7201a76ac033bd4f7532600d7a975f2aa9f93692cec42e28323e6e8e27f7357e0cb1497c12503829a41ed025e9c7953bf4738ad0d980687a774088fabaf08cdf 0026-ada-musl-support-fixes.patch
|
||||
f3974d1a693c0e382fa78ae94ebf768c6a1ca0ee631b478cf52a366537edae373cd0ab31369ef1ae0627d2834bcacfb94c9a4d01505c91eaac9d228a5933d0ae 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
8f77c3a908ec92966fb1697fd40cc936d4dca2624f6f14b199ba154f8c46be773548a571b41a1cf537134b011e3426deb443e4a13e49fb763c91c821ca1bae63 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
8cd10e3d10e3da0505cb4c09c4448335e5bbd18fe6e2c47cfa1257df3d83234983d71b1fdb0b4bfc76b24d477fd6e2d771b8eefacbb61e0ca1df105b980dbd4a 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
e026f1e20b78328b55b92a5fdf8f9d1d761176d2eea90556d7be8e2bae72d0dc52fd482d1eac8ab623e98653ca56d39b18fd2139ff99d420994b10c36f266ca6 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
80b41cf68a7e56bef50c05073cc79b9eafbd37535f6360deac16dfe5498ac041aaf91c3cc1bc6e323d574cd1da65aab22df32a03e39f606bff41a103063aafef 0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
b4917017c45d170c6878c7744c1ecababef4346903ee1f684d5a59d65255a5576d16d40137f7dbfe46144907c6389035966813e9024c9a4f499e963ed533947a 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
1cc7a5ef067bf543f6c1fa14dedc6378750a43be1649b18605699dffdc1ebce8b88405d3f12dd57e3d821c7d457d861ee0a54138c037917d6365b0bf69526e85 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
77a1426e316b96b51edef9a35a64565d5f84b94d46a2fd7293ea406ede473b449613969f9e29cae44f8fbfbc767a27cef01b36392cf8ffb3f618c0df4e217c71 0034-libgo-fix-lfs64-use.patch
|
||||
"
|
||||
@@ -1,7 +1,7 @@
|
||||
From 75e758609803afe6ced6cd7799b4159f3848a8d5 Mon Sep 17 00:00:00 2001
|
||||
From 47b4bd4deb2c356bb07d2a96f22127aefafec3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH 01/33] posix_memalign
|
||||
Subject: [PATCH 01/34] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 447c2a21d1fa8c2c3b216102a808834d86f12104 Mon Sep 17 00:00:00 2001
|
||||
From 4fa620d8c3e6730211bfb071eb4c817320491bd0 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 02/33] gcc: poison-system-directories
|
||||
Subject: [PATCH 02/34] 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
|
||||
@@ -120,7 +120,7 @@ index 09082e8ccae..5504bf6eb01 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b61ecfc1bc8..b290908679e 100644
|
||||
index af0e5933fdb..b6731a4673c 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
@@ -131,7 +131,7 @@ index b61ecfc1bc8..b290908679e 100644
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type
|
||||
-Wno-scalar-storage-order -Wsequence-point
|
||||
@@ -8424,6 +8425,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -8426,6 +8427,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.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b5c378c4c1e71b2dd8b4616d8f61530ee1a3ac98 Mon Sep 17 00:00:00 2001
|
||||
From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH 03/33] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH 03/34] specs: turn on -Wl,-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.
|
||||
@@ -14,10 +14,10 @@ now by default.
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b290908679e..cb34e6d40c9 100644
|
||||
index b6731a4673c..f393c7846c6 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -17961,6 +17961,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}.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From bb3ef1f5acfde9658c922d0aef9283fe60328c33 Mon Sep 17 00:00:00 2001
|
||||
From 1b315235433701e4a974da259b8d651169ddc7ac Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
Subject: [PATCH 04/34] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
@@ -25,10 +25,10 @@ index 5d64625fcd7..868d69506e4 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index cb34e6d40c9..7f1aa660285 100644
|
||||
index f393c7846c6..ef3c14a189e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -11866,6 +11866,12 @@ also turns on the following optimization flags:
|
||||
@@ -11868,6 +11868,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.
|
||||
|
||||
|
||||
Loaded 100 of 529 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user