Compare commits
187
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27c999827f | ||
|
|
80ab66cd2a | ||
|
|
a1b9f90871 | ||
|
|
bd1ee83338 | ||
|
|
5433eecb11 | ||
|
|
b982708186 | ||
|
|
e27bc8a84e | ||
|
|
cb0e167a3c | ||
|
|
0c043b055d | ||
|
|
c025160029 | ||
|
|
a002330b81 | ||
|
|
614ac1835d | ||
|
|
bc6800b368 | ||
|
|
ea7522f44e | ||
|
|
0665493f14 | ||
|
|
35129cb2c7 | ||
|
|
14bc7fe038 | ||
|
|
881dbc6a22 | ||
|
|
96a21ace3f | ||
|
|
d7e56cc7c0 | ||
|
|
be819d7474 | ||
|
|
00e4c6d1b2 | ||
|
|
f757d06824 | ||
|
|
690f9bf67d | ||
|
|
d4d18a0b81 | ||
|
|
8bbc90f097 | ||
|
|
56c96a30e9 | ||
|
|
f5fc3217f0 | ||
|
|
c4886f93c7 | ||
|
|
9291b05b2c | ||
|
|
945a74a9ce | ||
|
|
2a8a57b08e | ||
|
|
bbbc7b7b2d | ||
|
|
5a2178cb5a | ||
|
|
6ab29d06fd | ||
|
|
0806c84144 | ||
|
|
da05e2a230 | ||
|
|
66625efa43 | ||
|
|
997243f6f7 | ||
|
|
bc0ff89fdc | ||
|
|
b2e5ad1670 | ||
|
|
403c33eda6 | ||
|
|
f0b8dceae5 | ||
|
|
68d7792bb9 | ||
|
|
1edbf01dcb | ||
|
|
734d4d1572 | ||
|
|
ca976d487c | ||
|
|
df8b0a6665 | ||
|
|
928fa5b9c5 | ||
|
|
7a9d86bc25 | ||
|
|
5e0a9edcae | ||
|
|
0ccd191d21 | ||
|
|
b8023b44e1 | ||
|
|
3fff515886 | ||
|
|
9ba1d82f6e | ||
|
|
d195f254a2 | ||
|
|
6dc3335119 | ||
|
|
559454de25 | ||
|
|
f427ccd09d | ||
|
|
eeb6fb22eb | ||
|
|
a2e7dc074a | ||
|
|
d595967928 | ||
|
|
4e056b2242 | ||
|
|
1a50b3a49b | ||
|
|
42d8a5abd5 | ||
|
|
8d81c77f05 | ||
|
|
9813033c80 | ||
|
|
a8f0c9268e | ||
|
|
dd80d9b57b | ||
|
|
5aa28ef117 | ||
|
|
e388dbb57d | ||
|
|
5666109a4a | ||
|
|
1db7d64aab | ||
|
|
b6cc5c0e9f | ||
|
|
866b67e772 | ||
|
|
30ff0308a2 | ||
|
|
7926019217 | ||
|
|
6e2077e604 | ||
|
|
fdd5c560e9 | ||
|
|
eee2eaf970 | ||
|
|
b891b8b18b | ||
|
|
4b92e922ef | ||
|
|
a2a4772177 | ||
|
|
853f4ba5a5 | ||
|
|
8dcb873f9b | ||
|
|
a04ca4caff | ||
|
|
9f15da8d46 | ||
|
|
4e1f99160d | ||
|
|
fcf33fccaa | ||
|
|
fc3421e665 | ||
|
|
d69cd81186 | ||
|
|
22df89a1cb | ||
|
|
7f78f74025 | ||
|
|
af2ae7aa4c | ||
|
|
a2faf88238 | ||
|
|
fd0c785eb9 | ||
|
|
36e6a69dd7 | ||
|
|
50d260240b | ||
|
|
e859e47589 | ||
|
|
3ed15d3d19 | ||
|
|
3c20e11910 | ||
|
|
0f4258d37e | ||
|
|
6688808de8 | ||
|
|
07cdab935a | ||
|
|
46304c497c | ||
|
|
486de9b306 | ||
|
|
00261bc123 | ||
|
|
1e59890385 | ||
|
|
5954048db3 | ||
|
|
644439c79f | ||
|
|
e8eb332fa2 | ||
|
|
e9029c9153 | ||
|
|
af105937a2 | ||
|
|
44797d1f4e | ||
|
|
8ff50a82a8 | ||
|
|
f77fb2e610 | ||
|
|
a26ede4de6 | ||
|
|
b1b5f9a8f2 | ||
|
|
7b4bf89443 | ||
|
|
476f7fe6ad | ||
|
|
f3adab7539 | ||
|
|
8e3cc49cfe | ||
|
|
68a3bf8610 | ||
|
|
6d72b33b41 | ||
|
|
9c8ccba142 | ||
|
|
3c629c64e3 | ||
|
|
093611357b | ||
|
|
daea5dade3 | ||
|
|
5ae8060f6d | ||
|
|
670f23f640 | ||
|
|
2c6399db1c | ||
|
|
5bfe3ab5b5 | ||
|
|
08096700f0 | ||
|
|
91adc26f51 | ||
|
|
f47d58a680 | ||
|
|
86601ff415 | ||
|
|
8ada15f062 | ||
|
|
34b1aff3cd | ||
|
|
9c858aad62 | ||
|
|
8a9170d125 | ||
|
|
57b22658a9 | ||
|
|
a3001a0cb0 | ||
|
|
13904bb777 | ||
|
|
6352910769 | ||
|
|
69aea328e5 | ||
|
|
70b7813fee | ||
|
|
741b9caece | ||
|
|
4f6b01db82 | ||
|
|
16696849eb | ||
|
|
5b4df25783 | ||
|
|
ffb351f136 | ||
|
|
76f32fecf3 | ||
|
|
74c7092bbd | ||
|
|
4ded17dc1e | ||
|
|
91b81d92f7 | ||
|
|
5cf259f46e | ||
|
|
047730dfb0 | ||
|
|
9a4a818bde | ||
|
|
f71abed592 | ||
|
|
3c32dbe814 | ||
|
|
3628ed25e8 | ||
|
|
919c24cecb | ||
|
|
f07d122b67 | ||
|
|
b8aca2b914 | ||
|
|
2f1d832d4d | ||
|
|
d1856dad75 | ||
|
|
83d224df2b | ||
|
|
bc8bc00ef9 | ||
|
|
10e5f418a0 | ||
|
|
ec062f4e09 | ||
|
|
088482b579 | ||
|
|
2d2b9bddd8 | ||
|
|
cbb4367c47 | ||
|
|
d820779a10 | ||
|
|
ab87fde2f6 | ||
|
|
6a125a739e | ||
|
|
39f6db50cb | ||
|
|
60fe572b47 | ||
|
|
b2f939943c | ||
|
|
e2169ff59f | ||
|
|
214f898dc5 | ||
|
|
8ddef357b3 | ||
|
|
65e27349d5 | ||
|
|
bec770e995 | ||
|
|
9c894f8a73 | ||
|
|
d40db11c30 | ||
|
|
6c27c1c460 |
No files matched your search
@@ -38,3 +38,10 @@ if grep -qr '/usr/share/postmarketos-mkinitfs' -- *; then
|
||||
grep --color=always -r '/usr/share/postmarketos-mkinitfs' -- *
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Direct sourcing of deviceinfo
|
||||
if grep --exclude='source_deviceinfo' -qEr 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *; then
|
||||
echo 'ERROR: Please source the source_deviceinfo script instead of sourcing deviceinfo directly!'
|
||||
grep --color=always --exclude='rootfs-usr-share-misc-source_deviceinfo' -Er 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *
|
||||
exit 1
|
||||
fi
|
||||
+1
-1
@@ -134,7 +134,7 @@ def get_changed_packages_sanity_check(count):
|
||||
print("ERROR: Too many packages have changed!")
|
||||
print()
|
||||
print("This is a sanity check, so we don't end up building packages that")
|
||||
print("have not been modified. CI won't run for more than one hour")
|
||||
print("have not been modified. CI won't run for more than three hours")
|
||||
print("anyway.")
|
||||
print()
|
||||
print("Your options:")
|
||||
|
||||
@@ -18,6 +18,7 @@ sh_files="
|
||||
./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-installkernel/installkernel-pmos
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v23.06`
|
||||
* [ ] `v22.12`
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
@@ -71,6 +71,8 @@ device/*/device-samsung-klimtlte @Grimler
|
||||
device/*/linux-samsung-klimtlte @Grimler
|
||||
device/*/firmware-odroid-xu4 @Grimler
|
||||
device/*/linux-samsung-chagallwifi @Grimler
|
||||
device/*/device-huawei-plank @gtrxAC
|
||||
device/*/linux-huawei-plank @gtrxAC
|
||||
|
||||
main/postmarketos-update-depthcharge-kernel/ @jenneron
|
||||
main/osk-sdl/ @craftyguy
|
||||
|
||||
@@ -8,6 +8,12 @@ branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v23.06]
|
||||
description=Upcoming stable release (DO NOT USE)
|
||||
branch_pmaports=v23.06
|
||||
branch_aports=3.18-stable
|
||||
mirrordir_alpine=v3.18
|
||||
|
||||
[v22.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v22.12
|
||||
|
||||
@@ -8,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-aarch64
|
||||
pkgver=2.40
|
||||
pkgrel=5
|
||||
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 zstd-dev"
|
||||
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
|
||||
binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -73,6 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -82,22 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
--enable-default-hash-style=gnu \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_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
|
||||
}
|
||||
@@ -128,6 +145,8 @@ gold() {
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
"
|
||||
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
@@ -0,0 +1,103 @@
|
||||
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,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-armhf
|
||||
pkgver=2.40
|
||||
pkgrel=5
|
||||
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 zstd-dev"
|
||||
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
|
||||
binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -73,6 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -82,22 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
--enable-default-hash-style=gnu \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_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
|
||||
}
|
||||
@@ -128,6 +145,8 @@ gold() {
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
"
|
||||
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
@@ -0,0 +1,103 @@
|
||||
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,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-armv7
|
||||
pkgver=2.40
|
||||
pkgrel=5
|
||||
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 zstd-dev"
|
||||
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
|
||||
binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -73,6 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -82,22 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
--enable-default-hash-style=gnu \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_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
|
||||
}
|
||||
@@ -128,6 +145,8 @@ gold() {
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
"
|
||||
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
@@ -0,0 +1,103 @@
|
||||
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,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
|
||||
|
||||
pkgname=binutils-riscv64
|
||||
pkgver=2.40
|
||||
pkgrel=5
|
||||
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 zstd-dev"
|
||||
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
|
||||
binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
fi
|
||||
|
||||
# secfixes:
|
||||
# 2.40-r10:
|
||||
# - CVE-2023-1972
|
||||
# 2.40-r0:
|
||||
# - CVE-2023-1579
|
||||
# 2.39-r2:
|
||||
# - CVE-2022-38533
|
||||
# 2.39-r0:
|
||||
@@ -73,6 +83,8 @@ build() {
|
||||
_gold_configure="--disable-gold"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
@@ -82,22 +94,27 @@ build() {
|
||||
--prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-multilib \
|
||||
--disable-gprofng \
|
||||
--enable-ld=default \
|
||||
$_gold_configure \
|
||||
--enable-64-bit-bfd \
|
||||
$_plugin_configure \
|
||||
--enable-relro \
|
||||
--enable-deterministic-archives \
|
||||
--enable-default-execstack=no \
|
||||
$_cross_configure \
|
||||
--sysconfdir=/etc \
|
||||
$_arch_configure \
|
||||
--enable-default-hash-style=gnu \
|
||||
--with-pic \
|
||||
--disable-werror \
|
||||
$_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
|
||||
}
|
||||
@@ -128,6 +145,8 @@ gold() {
|
||||
|
||||
sha512sums="
|
||||
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
|
||||
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
|
||||
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
|
||||
"
|
||||
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
@@ -0,0 +1,103 @@
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.36.0
|
||||
pkgrel=8
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
918c25a969447cc34a1c3d8176a3da560bc61d3b028206b08d0ef8cc1147756f0f8a2fff02a560a14062ddfffcbb264368502a0f24725992a5652ea0755ed24a busybox-static-1.36.0-r8-aarch64-edge.apk
|
||||
d4977cf4654bb5659d4e6d91785832d3fd418403b70f1619c26aa305839d64c131c6389979793896af0fb0d9e8fc2b99537dbeb65133465d7d983576902dff34 busybox-static-1.36.1-r0-aarch64-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.36.0
|
||||
pkgrel=8
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
d6c6d8c34101406c7dd7a237a0b3201908a3180d95aa7905bc4c9bde88ea2427cc808a5456c49bd087ce9ed07cbeae9de62681b6cc98900d7ce66af5b73fc0c8 busybox-static-1.36.0-r8-armhf-edge.apk
|
||||
eece41953046c99029ec4a0707c1fd4270d43b497f05cf63070deef376fc28f61bcdfa8b9f34e23305ba459a633909eb1682fbe183206b69dea8be3742479ae7 busybox-static-1.36.1-r0-armhf-edge.apk
|
||||
"
|
||||
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.36.0
|
||||
pkgrel=8
|
||||
pkgver=1.36.1
|
||||
pkgrel=0
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
@@ -32,5 +32,5 @@ package() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b7ebdf31d92ebf6d4a5eebc57a9f9e4d5246e2e325999631bcad71e019e3f6be9ebc2e46ff085a92cee5cd7bb106964ca1f17fd69da47e7b0438bde592dbd830 busybox-static-1.36.0-r8-armv7-edge.apk
|
||||
29df2ea5d83535632308524064dbb43bf9ed147ab1112bed76b1fc70b519d7dc3e4083c51527e80129a455a001479569641b710f58fdad8538852061d4880660 busybox-static-1.36.1-r0-armv7-edge.apk
|
||||
"
|
||||
@@ -1,14 +1,14 @@
|
||||
From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001
|
||||
From 3e5acbe356124aa5d8dde0635d652c065a553e7d Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH] posix_memalign
|
||||
Subject: [PATCH 01/33] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 3b2e4f47915..20f790904a2 100644
|
||||
index 3527283693b..c4071b64b53 100644
|
||||
--- a/gcc/config/i386/pmm_malloc.h
|
||||
+++ b/gcc/config/i386/pmm_malloc.h
|
||||
@@ -27,12 +27,13 @@
|
||||
@@ -37,3 +37,6 @@ index 3b2e4f47915..20f790904a2 100644
|
||||
return __ptr;
|
||||
else
|
||||
return NULL;
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dd1e75ff4ecda96957465b34681f245e818928bd Mon Sep 17 00:00:00 2001
|
||||
From f986a4a1224fa7d452b415d690aead8d356a7eae Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 29 Mar 2013 08:59:00 +0400
|
||||
Subject: [PATCH] gcc: poison-system-directories
|
||||
Subject: [PATCH 02/33] gcc: poison-system-directories
|
||||
|
||||
Add /sw/include and /opt/include based on the original
|
||||
zecke-no-host-includes.patch patch. The original patch checked for
|
||||
@@ -26,10 +26,10 @@ Upstream-Status: Pending
|
||||
7 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 8a0dafc522d..0357868e22c 100644
|
||||
index 862c474d3c8..64c4277c991 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -710,6 +710,10 @@ Wreturn-local-addr
|
||||
@@ -711,6 +711,10 @@ Wreturn-local-addr
|
||||
Common Var(warn_return_local_addr) Init(1) Warning
|
||||
Warn about returning a pointer/reference to a local or temporary variable.
|
||||
|
||||
@@ -41,10 +41,10 @@ index 8a0dafc522d..0357868e22c 100644
|
||||
Common Var(warn_shadow) Warning
|
||||
Warn when one variable shadows another. Same as -Wshadow=global.
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 64c27c9cfac..f0fbf123aa8 100644
|
||||
index 4cad077bfbe..0679fbbf4c6 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -230,6 +230,12 @@
|
||||
@@ -236,6 +236,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ index 64c27c9cfac..f0fbf123aa8 100644
|
||||
optimizer and back end) to be checked for dynamic type safety at runtime.
|
||||
This is quite expensive. */
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 5ce0557719a..e9060112384 100755
|
||||
index c7b26d1927d..8c46369f73f 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -1023,6 +1023,7 @@ enable_maintainer_mode
|
||||
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
|
||||
enable_link_mutex
|
||||
enable_link_serialization
|
||||
enable_version_specific_runtime_libs
|
||||
@@ -69,7 +69,7 @@ index 5ce0557719a..e9060112384 100755
|
||||
enable_plugin
|
||||
enable_host_shared
|
||||
enable_libquadmath_support
|
||||
@@ -1785,6 +1786,8 @@ Optional Features:
|
||||
@@ -1788,6 +1789,8 @@ Optional Features:
|
||||
--enable-version-specific-runtime-libs
|
||||
specify that runtime libraries should be installed
|
||||
in a compiler-specific directory
|
||||
@@ -78,7 +78,7 @@ index 5ce0557719a..e9060112384 100755
|
||||
--enable-plugin enable plugin support
|
||||
--enable-host-shared build host code as shared libraries
|
||||
--disable-libquadmath-support
|
||||
@@ -31982,6 +31985,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ index 5ce0557719a..e9060112384 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 23bee7010a3..75a7048045c 100644
|
||||
index 09082e8ccae..5504bf6eb01 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7421,6 +7421,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
[specify that runtime libraries should be
|
||||
installed in a compiler-specific directory])])
|
||||
|
||||
@@ -120,37 +120,37 @@ index 23bee7010a3..75a7048045c 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 07b440190c3..b2de464798a 100644
|
||||
index c0c3ad14515..7cdd5bfa952 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
|
||||
-Wparentheses -Wno-pedantic-ms-format @gol
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
|
||||
+-Wno-poison-system-directories @gol
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
|
||||
-Wno-scalar-storage-order -Wsequence-point @gol
|
||||
@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
|
||||
-Wparentheses -Wno-pedantic-ms-format
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
|
||||
+-Wno-poison-system-directories
|
||||
-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
|
||||
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.
|
||||
|
||||
+@item -Wno-poison-system-directories
|
||||
+@opindex Wno-poison-system-directories
|
||||
+@item -Wno-poison-system-directories
|
||||
+Do not warn for @option{-I} or @option{-L} options using system
|
||||
+directories such as @file{/usr/include} when cross compiling. This
|
||||
+option is intended for use in chroot environments when such
|
||||
+directories contain the correct headers and libraries for the target
|
||||
+system rather than the host.
|
||||
+
|
||||
@item -Wfloat-equal
|
||||
@opindex Wfloat-equal
|
||||
@opindex Wno-float-equal
|
||||
@item -Wfloat-equal
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index bb07cc244e3..47fb5802194 100644
|
||||
index 16bb07f2cdc..33b56e721d2 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1159,6 +1159,8 @@ proper position among the other output files. */
|
||||
@@ -1146,6 +1146,8 @@ proper position among the other output files. */
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
@@ -160,7 +160,7 @@ index bb07cc244e3..47fb5802194 100644
|
||||
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
|
||||
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
|
||||
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
|
||||
index bd2a97938eb..c80f100f476 100644
|
||||
index 4d44321183f..0f3f071b44c 100644
|
||||
--- a/gcc/incpath.cc
|
||||
+++ b/gcc/incpath.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -198,3 +198,6 @@ index bd2a97938eb..c80f100f476 100644
|
||||
}
|
||||
|
||||
/* Use given -I paths for #include "..." but not #include <...>, and
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001
|
||||
From 31e2b60000e779ef775daa306120eabcf987852a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH 03/33] 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,24 +14,24 @@ now by default.
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b2de464798a..83bd1bde433 100644
|
||||
index 7cdd5bfa952..158b7bcb81e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
linker. When using the GNU linker, you can also get the same effect with
|
||||
@option{-Wl,-Map=output.map}.
|
||||
|
||||
+NOTE: In Alpine Linux, for LDFLAGS, the option
|
||||
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
|
||||
+
|
||||
@item -u @var{symbol}
|
||||
@opindex u
|
||||
@item -u @var{symbol}
|
||||
Pretend the symbol @var{symbol} is undefined, to force linking of
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 47fb5802194..d18b5d7b59a 100644
|
||||
index 33b56e721d2..f82fae23c22 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1157,6 +1157,7 @@ proper position among the other output files. */
|
||||
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
|
||||
"%{flto|flto=*:%<fcompare-debug*} \
|
||||
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
@@ -39,3 +39,6 @@ index 47fb5802194..d18b5d7b59a 100644
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
%{Wno-poison-system-directories:--no-poison-system-directories} \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001
|
||||
From 3b910da7d1e81bdd953e6d9ec82020e7b120353b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
ObjC++, if the optimization level is > 0
|
||||
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/c-family/c-cppbuiltin.cc | 4 ++++
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
|
||||
index 4672ae8486a..573c021e1e8 100644
|
||||
index 5d64625fcd7..868d69506e4 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.cc
|
||||
+++ b/gcc/c-family/c-cppbuiltin.cc
|
||||
@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
@@ -25,10 +25,10 @@ index 4672ae8486a..573c021e1e8 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 83bd1bde433..dda299a9987 100644
|
||||
index 158b7bcb81e..cc9972f907b 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10896,6 +10896,12 @@ also turns on the following optimization flags:
|
||||
@@ -11866,6 +11866,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.
|
||||
|
||||
@@ -38,6 +38,9 @@ index 83bd1bde433..dda299a9987 100644
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@item -O3
|
||||
@opindex O3
|
||||
@item -O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 75d1a35180cf0967f062765314bf091a64032062 Mon Sep 17 00:00:00 2001
|
||||
From 9c3a2882b1932296ccb1d0ed2900cf046f998a26 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
but always link the sanitizer libraries with --no-as-needed.
|
||||
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
gcc/config/aarch64/aarch64-linux.h | 1 +
|
||||
@@ -22,7 +22,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
14 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
|
||||
index 5e4553d79f5..b516f3ef97f 100644
|
||||
index 4277f03da2a..b131983a546 100644
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -34,7 +34,7 @@ index 5e4553d79f5..b516f3ef97f 100644
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
|
||||
index 17f16a55910..9ec667e9a5e 100644
|
||||
index 03f783f2ad1..d946e700dda 100644
|
||||
--- a/gcc/config/alpha/linux-elf.h
|
||||
+++ b/gcc/config/alpha/linux-elf.h
|
||||
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -47,7 +47,7 @@ index 17f16a55910..9ec667e9a5e 100644
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
|
||||
index df3da67c4f0..7532bc29f9b 100644
|
||||
index 7b7b7cbbe14..49c050c6f2c 100644
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -70,6 +70,7 @@
|
||||
@@ -59,7 +59,7 @@ index df3da67c4f0..7532bc29f9b 100644
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 857c0e077bf..8433e56c3e1 100644
|
||||
index eda8010b133..b26b17f2f2a 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -69,9 +69,9 @@ index 857c0e077bf..8433e56c3e1 100644
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#undef LIBHWASAN_EARLY_SPEC
|
||||
#define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \
|
||||
@@ -145,12 +145,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
|
||||
"%{static-libhwasan:%{!shared:" \
|
||||
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
|
||||
"%{static-libtsan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
||||
@@ -87,7 +87,7 @@ index 857c0e077bf..8433e56c3e1 100644
|
||||
|
||||
#undef TARGET_F951_OPTIONS
|
||||
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
|
||||
index 0102b2a6f3b..994414c1845 100644
|
||||
index a79b739089d..e0752673dff 100644
|
||||
--- a/gcc/config/i386/gnu-user.h
|
||||
+++ b/gcc/config/i386/gnu-user.h
|
||||
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -100,7 +100,7 @@ index 0102b2a6f3b..994414c1845 100644
|
||||
%{!static: \
|
||||
%{!static-pie: \
|
||||
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
|
||||
index abc8cf624ca..fe656aeae27 100644
|
||||
index 3b63b99acf6..759bf0db86f 100644
|
||||
--- a/gcc/config/i386/gnu-user64.h
|
||||
+++ b/gcc/config/i386/gnu-user64.h
|
||||
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -112,7 +112,7 @@ index abc8cf624ca..fe656aeae27 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
|
||||
index 93510098ccc..3813e536423 100644
|
||||
index 5dfd428aa17..02656dad7fc 100644
|
||||
--- a/gcc/config/ia64/linux.h
|
||||
+++ b/gcc/config/ia64/linux.h
|
||||
@@ -58,7 +58,7 @@ do { \
|
||||
@@ -125,7 +125,7 @@ index 93510098ccc..3813e536423 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
|
||||
index 6aad7192e69..e1256a55add 100644
|
||||
index a4e5380b589..3cc61bce69f 100644
|
||||
--- a/gcc/config/mips/gnu-user.h
|
||||
+++ b/gcc/config/mips/gnu-user.h
|
||||
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -137,10 +137,10 @@ index 6aad7192e69..e1256a55add 100644
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 38803723ba9..3067ed6eac8 100644
|
||||
index 2fdfd930cf2..16503482ec2 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mabi=ilp32:_ilp32}"
|
||||
|
||||
#define LINK_SPEC "\
|
||||
@@ -149,7 +149,7 @@ index 38803723ba9..3067ed6eac8 100644
|
||||
%{mno-relax:--no-relax} \
|
||||
%{mbig-endian:-EB} \
|
||||
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
|
||||
index b2a7afabc73..34ceb4e4fce 100644
|
||||
index 9e457033d11..08016bf224d 100644
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -377,13 +377,13 @@ extern int dot_symbols;
|
||||
@@ -169,10 +169,10 @@ index b2a7afabc73..34ceb4e4fce 100644
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
|
||||
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
|
||||
index 7e2519de5d4..61215a7a1b3 100644
|
||||
index ae932fc22f0..c8ff0c6dc8e 100644
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -788,7 +788,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
#endif
|
||||
|
||||
@@ -182,7 +182,7 @@ index 7e2519de5d4..61215a7a1b3 100644
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
|
||||
|
||||
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
|
||||
index d7b7e7a7b02..d2287f14f2e 100644
|
||||
index 02aa1edaff8..64df5801134 100644
|
||||
--- a/gcc/config/s390/linux.h
|
||||
+++ b/gcc/config/s390/linux.h
|
||||
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -195,7 +195,7 @@ index d7b7e7a7b02..d2287f14f2e 100644
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
|
||||
index 6a809e9092d..93bfb92d3ff 100644
|
||||
index 0e33b3cac2c..c2f44546e62 100644
|
||||
--- a/gcc/config/sparc/linux.h
|
||||
+++ b/gcc/config/sparc/linux.h
|
||||
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
@@ -208,10 +208,10 @@ index 6a809e9092d..93bfb92d3ff 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index d18b5d7b59a..3b76311b544 100644
|
||||
index f82fae23c22..da6417dd0d1 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -744,8 +744,11 @@ proper position among the other output files. */
|
||||
@@ -754,8 +754,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBASAN_EARLY_SPEC
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -225,7 +225,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -780,8 +783,11 @@ proper position among the other output files. */
|
||||
@@ -790,8 +793,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBTSAN_EARLY_SPEC
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -239,7 +239,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -798,8 +804,11 @@ proper position among the other output files. */
|
||||
@@ -808,8 +814,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBLSAN_EARLY_SPEC
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -253,7 +253,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -814,8 +823,11 @@ proper position among the other output files. */
|
||||
@@ -824,8 +833,11 @@ proper position among the other output files. */
|
||||
#define STATIC_LIBUBSAN_LIBS \
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
@@ -267,3 +267,6 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001
|
||||
From 288cb2be3abe07dcf2737ed3ac07e93573262bc4 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
|
||||
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index 07da40ef43b..8683f706426 100644
|
||||
index a75038930ae..b98726f33ed 100644
|
||||
--- a/gcc/c-family/c.opt
|
||||
+++ b/gcc/c-family/c.opt
|
||||
@@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end
|
||||
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
|
||||
of the destination region. Same as -Wformat-overflow=1.
|
||||
|
||||
Wformat-security
|
||||
@@ -20,7 +20,7 @@ index 07da40ef43b..8683f706426 100644
|
||||
Warn about possible security problems with format functions.
|
||||
|
||||
Wformat-signedness
|
||||
@@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
Warn about zero-length formats.
|
||||
|
||||
Wformat=
|
||||
@@ -29,3 +29,6 @@ index 07da40ef43b..8683f706426 100644
|
||||
Warn about printf/scanf/strftime/strfmon format string anomalies.
|
||||
|
||||
Wformat-overflow=
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From e4d0ec43e772b6dc7c3708aed5309897df26a125 Mon Sep 17 00:00:00 2001
|
||||
From 93e44f7c7b1f11c1f714d6c384b0d39a191ac18a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH] Enable -Wtrampolines by default.
|
||||
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 0357868e22c..6d5e5eebe60 100644
|
||||
index 64c4277c991..c24839d32bc 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -802,7 +802,7 @@ Common Var(warn_system_headers) Warning
|
||||
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers.
|
||||
|
||||
Wtrampolines
|
||||
@@ -20,3 +20,6 @@ index 0357868e22c..6d5e5eebe60 100644
|
||||
Warn whenever a trampoline is generated.
|
||||
|
||||
Wtrivial-auto-var-init
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 27e5d5bd3fed9006a2958d2b09750d15ad07383b Mon Sep 17 00:00:00 2001
|
||||
From 7aa93d6d9a63c7bedf1e033f6d040e95038537e7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
Change the buffer size.
|
||||
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 8 +++++++-
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 3b76311b544..cc99d0b7aa1 100644
|
||||
index da6417dd0d1..b5a6f200635 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -996,6 +996,12 @@ proper position among the other output files. */
|
||||
@@ -983,6 +983,12 @@ proper position among the other output files. */
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ index 3b76311b544..cc99d0b7aa1 100644
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
@@ -1295,7 +1301,7 @@ static const char *cc1_options =
|
||||
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
|
||||
%{-version:--version}\
|
||||
%{-help=*:--help=%*}\
|
||||
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
|
||||
@@ -36,10 +36,10 @@ index 3b76311b544..cc99d0b7aa1 100644
|
||||
%{fprofile-arcs|fprofile-generate*|coverage:\
|
||||
%{!fprofile-update=single:\
|
||||
diff --git a/gcc/params.opt b/gcc/params.opt
|
||||
index b88e1372005..82a7e25dd2f 100644
|
||||
index 823cdb2ff85..5b096899b40 100644
|
||||
--- a/gcc/params.opt
|
||||
+++ b/gcc/params.opt
|
||||
@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
The maximum number of SSA_NAME assignments to follow in determining a value.
|
||||
|
||||
-param=ssp-buffer-size=
|
||||
@@ -48,3 +48,6 @@ index b88e1372005..82a7e25dd2f 100644
|
||||
The lower bound for a buffer to be considered for stack smashing protection.
|
||||
|
||||
-param=stack-clash-protection-guard-size=
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 83bf2a316222e2fe0b72968cadf4e334d41173f6 Mon Sep 17 00:00:00 2001
|
||||
From e44b295b5b0b917c0b47085f60466a37f890e1c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
|
||||
bootstrapping.
|
||||
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
@@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
|
||||
index 8f51544989e..5329804d136 100644
|
||||
index 12d34910830..61b13762b71 100644
|
||||
--- a/libstdc++-v3/po/Makefile.am
|
||||
+++ b/libstdc++-v3/po/Makefile.am
|
||||
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
|
||||
@@ -38,7 +38,7 @@ index 8f51544989e..5329804d136 100644
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
|
||||
index 243f3db7b72..822210781fa 100644
|
||||
index 8e93445acd2..d6ff06e5ddb 100644
|
||||
--- a/libstdc++-v3/po/Makefile.in
|
||||
+++ b/libstdc++-v3/po/Makefile.in
|
||||
@@ -561,6 +561,7 @@ uninstall-am:
|
||||
@@ -49,3 +49,6 @@ index 243f3db7b72..822210781fa 100644
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001
|
||||
From f041dcd8f775e03b85a49e3aeef0870e2333b10e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH] Don't declare asprintf if defined as a macro.
|
||||
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index a65ced9c820..eb20ab0f95f 100644
|
||||
index 1d5c779fcff..19e3cb1e31c 100644
|
||||
--- a/include/libiberty.h
|
||||
+++ b/include/libiberty.h
|
||||
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
|
||||
@@ -23,3 +23,6 @@ index a65ced9c820..eb20ab0f95f 100644
|
||||
|
||||
/* Like asprintf but allocates memory without fail. This works like
|
||||
xmalloc. */
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 838e1daa955d9013c462be3471497cb39641e951 Mon Sep 17 00:00:00 2001
|
||||
From 6fc13fce114648b1a64e658b469a4697382d18bb Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH] libiberty: copy PIC objects during build process
|
||||
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 1b17c2e3a47..8db1176df2e 100644
|
||||
index 72608f3e4a7..58356884728 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
||||
@@ -19,3 +19,6 @@ index 1b17c2e3a47..8db1176df2e 100644
|
||||
cd ..; \
|
||||
else true; fi
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 048c394eb709bfd216e307c1b92ac7f8a7e7758b Mon Sep 17 00:00:00 2001
|
||||
From 6a1955bbf49836ad99b23501f42283842e01761b Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH] libgcc_s
|
||||
Subject: [PATCH 12/33] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.cc | 4 ++--
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] libgcc_s
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
|
||||
index 31780b6daf7..d89898846e1 100644
|
||||
index 0d817fc3f3b..2e99db00db9 100644
|
||||
--- a/gcc/config/i386/i386-expand.cc
|
||||
+++ b/gcc/config/i386/i386-expand.cc
|
||||
@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
{
|
||||
case IX86_BUILTIN_CPU_INIT:
|
||||
{
|
||||
@@ -27,7 +27,7 @@ index 31780b6daf7..d89898846e1 100644
|
||||
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
|
||||
}
|
||||
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
|
||||
index dab1d98060f..cf824b4114a 100644
|
||||
index 50b6d8248a2..724ced402a1 100644
|
||||
--- a/libgcc/config/i386/cpuinfo.c
|
||||
+++ b/libgcc/config/i386/cpuinfo.c
|
||||
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
|
||||
@@ -52,3 +52,6 @@ index 8506a635790..564296f788e 100644
|
||||
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
|
||||
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
|
||||
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 717346fbbd6642ba6b0c3af2deb3771794346507 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:36 +0000
|
||||
Subject: [PATCH] libitm: disable FORTIFY
|
||||
|
||||
---
|
||||
libitm/configure.tgt | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
|
||||
index 06e90973ef3..669e64236c3 100644
|
||||
--- a/libitm/configure.tgt
|
||||
+++ b/libitm/configure.tgt
|
||||
@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
+# FIXME: error: inlining failed in call to always_inline
|
||||
+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’
|
||||
+# : function body can be overwritten at link time
|
||||
+# Disable Fortify in libitm for now. #508852
|
||||
+case "${target}" in
|
||||
+ *-*-linux*)
|
||||
+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
# Map the target cpu to an ARCH sub-directory. At the same time,
|
||||
# work out any special compilation flags as necessary.
|
||||
case "${target_cpu}" in
|
||||
@@ -1,7 +1,7 @@
|
||||
From db28b1e0f3b06325026ec5b5e7cdca4e9992e05c Mon Sep 17 00:00:00 2001
|
||||
From 558e95aa2b0f3bbf416e1bb572e5f47bddc8601c Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH] nopie
|
||||
Subject: [PATCH 13/33] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] nopie
|
||||
2 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index e9060112384..2f6b3265a6c 100755
|
||||
index 8c46369f73f..e59cbee1767 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -32497,6 +32497,33 @@ fi
|
||||
@@ -32268,6 +32268,33 @@ fi
|
||||
$as_echo "$gcc_cv_no_pie" >&6; }
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -47,10 +47,10 @@ index e9060112384..2f6b3265a6c 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 75a7048045c..e683d3a7a5f 100644
|
||||
index 5504bf6eb01..57268319de1 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7681,6 +7681,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
@@ -7552,6 +7552,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
LDFLAGS="$saved_LDFLAGS"])
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -70,3 +70,6 @@ index 75a7048045c..e683d3a7a5f 100644
|
||||
fi
|
||||
AC_SUBST([NO_PIE_FLAG])
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,14 +1,14 @@
|
||||
From fd642f8cd61849a9dc169588be5562ceda96a889 Mon Sep 17 00:00:00 2001
|
||||
From ecad19db42776c536bd4f6033ec1891ffae03720 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH] ada: fix shared linking
|
||||
Subject: [PATCH 14/33] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
|
||||
index a7574efb472..0ad0d66463c 100644
|
||||
index f2126441208..22cfa9c641f 100644
|
||||
--- a/gcc/ada/link.c
|
||||
+++ b/gcc/ada/link.c
|
||||
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|
||||
@@ -37,3 +37,6 @@ index a7574efb472..0ad0d66463c 100644
|
||||
int __gnat_link_max = 8192;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,17 +1,17 @@
|
||||
From a547632f5c7caec4a164e8d5e5b568fb7a461365 Mon Sep 17 00:00:00 2001
|
||||
From 8500b4cdd039c16a02a8acabd124b92865871979 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 593495e1650..b96f60e33e2 100644
|
||||
index 06a9398e172..6ff2b3f9925 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
|
||||
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
|
||||
# built for the build system to override those in BASE_FLAGS_TO_PASS.
|
||||
EXTRA_BUILD_FLAGS = \
|
||||
CFLAGS="$(CFLAGS_FOR_BUILD)" \
|
||||
@@ -19,3 +19,6 @@ index 593495e1650..b96f60e33e2 100644
|
||||
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
|
||||
|
||||
# This is the list of directories to built for the host system.
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 686e85d8a05f9f9e6c983afb13f937bd88fe84dd Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:18:32 +0000
|
||||
Subject: [PATCH] dlang: use libucontext on mips64
|
||||
|
||||
---
|
||||
libphobos/configure.tgt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
|
||||
index 0063dd23249..c5e782a1238 100644
|
||||
--- a/libphobos/configure.tgt
|
||||
+++ b/libphobos/configure.tgt
|
||||
@@ -38,6 +38,7 @@ case "${target}" in
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
|
||||
;;
|
||||
power*-*-freebsd*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+7
-4
@@ -1,17 +1,17 @@
|
||||
From 5bd37f8ee93a0fe1a3f841f48ed6626e7e0aa19d Mon Sep 17 00:00:00 2001
|
||||
From e893ad827215a7c090a835e20a81559f4044fb47 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH] add fortify-headers paths
|
||||
Subject: [PATCH 16/33] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index 74f70793d90..61b07f319f6 100644
|
||||
index e3aca79cccc..b3537b8fbeb 100644
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -172,6 +172,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
@@ -20,3 +20,6 @@ index 74f70793d90..61b07f319f6 100644
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+10
-7
@@ -1,11 +1,11 @@
|
||||
From d2577dc78a1f159e5c41fd0b53e73fa0e264cb52 Mon Sep 17 00:00:00 2001
|
||||
From 064afc74f18f2a00771fc2600029a713b8708845 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
||||
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
it unconditionally, as otherwise we get link failures if some objects are
|
||||
-fstack-protector built and final link happens with -fno-stack-protector.
|
||||
Subject: [PATCH 17/33] Alpine musl package provides libssp_nonshared.a. We
|
||||
link to it unconditionally, as otherwise we get link failures if some objects
|
||||
are -fstack-protector built and final link happens with -fno-stack-protector.
|
||||
This seems to be the common case when bootstrapping gcc, the piepatches do
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
stack-protector flag usage.
|
||||
|
||||
---
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index cc99d0b7aa1..c60a75371f8 100644
|
||||
index b5a6f200635..6cbb726599b 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1004,8 +1004,7 @@ proper position among the other output files. */
|
||||
@@ -991,8 +991,7 @@ proper position among the other output files. */
|
||||
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
@@ -26,3 +26,6 @@ index cc99d0b7aa1..c60a75371f8 100644
|
||||
#else
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
"|fstack-protector-strong|fstack-protector-explicit" \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+10
-7
@@ -1,7 +1,7 @@
|
||||
From bbd5c529ef878c2d6096fd4949616714eb82683a Mon Sep 17 00:00:00 2001
|
||||
From 45a98ce1f1702424aba4271f7f7570e43a354101 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index c60a75371f8..735b2b1bba1 100644
|
||||
index 6cbb726599b..59390fd39d6 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -745,10 +745,10 @@ proper position among the other output files. */
|
||||
@@ -755,10 +755,10 @@ proper position among the other output files. */
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
|
||||
@@ -25,7 +25,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -784,10 +784,10 @@ proper position among the other output files. */
|
||||
@@ -794,10 +794,10 @@ proper position among the other output files. */
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -38,7 +38,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -805,10 +805,10 @@ proper position among the other output files. */
|
||||
@@ -815,10 +815,10 @@ proper position among the other output files. */
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -51,7 +51,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -824,10 +824,10 @@ proper position among the other output files. */
|
||||
@@ -834,10 +834,10 @@ proper position among the other output files. */
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -64,3 +64,6 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From 8fc8d6c26a2a45945182e211bc3ac2eae4d6a11b Mon Sep 17 00:00:00 2001
|
||||
From 6a2e902dc8abcfd44522b9224fd759d038db51f5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH] aarch64: disable multilib support
|
||||
Subject: [PATCH 19/33] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
@@ -9,7 +9,7 @@ multilib is unsupported on Alpine GCC
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
|
||||
index d0cd546002a..b63a77f4969 100644
|
||||
index 57bf4100fcd..172894b57ef 100644
|
||||
--- a/gcc/config/aarch64/t-aarch64-linux
|
||||
+++ b/gcc/config/aarch64/t-aarch64-linux
|
||||
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
|
||||
@@ -21,3 +21,6 @@ index d0cd546002a..b63a77f4969 100644
|
||||
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
|
||||
|
||||
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+5
-2
@@ -1,7 +1,7 @@
|
||||
From 65ad898df141261a1ccd891a99133ad8f9847133 Mon Sep 17 00:00:00 2001
|
||||
From 6e7c72ee05353a284d9c9809035e7ff488b4b8c1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH] s390x: disable multilib support
|
||||
Subject: [PATCH 20/33] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
@@ -20,3 +20,6 @@ index cc6ab367072..7f498ee1cdc 100644
|
||||
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
From 714ed6d9649bf9ed42e34fef9c41169921e63921 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Andreas Svee <me@lochnair.net>
|
||||
Date: Thu, 21 Dec 2017 03:14:33 +0100
|
||||
Subject: [PATCH] mips64: disable multilib support
|
||||
|
||||
multilib is not supported by Alpine GCC
|
||||
---
|
||||
gcc/config/mips/mips.h | 8 ++++----
|
||||
gcc/config/mips/t-linux64 | 6 +++---
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
|
||||
index 858bbba3a36..2d4f553e652 100644
|
||||
--- a/gcc/config/mips/mips.h
|
||||
+++ b/gcc/config/mips/mips.h
|
||||
@@ -3447,11 +3447,11 @@ struct GTY(()) machine_function {
|
||||
/* If we are *not* using multilibs and the default ABI is not ABI_32 we
|
||||
need to change these from /lib and /usr/lib. */
|
||||
#if MIPS_ABI_DEFAULT == ABI_N32
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib32/"
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#elif MIPS_ABI_DEFAULT == ABI_64
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib64/"
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#endif
|
||||
|
||||
/* Load store bonding is not supported by micromips and fix_24k. The
|
||||
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
|
||||
index 2fdd8e00407..406a3676289 100644
|
||||
--- a/gcc/config/mips/t-linux64
|
||||
+++ b/gcc/config/mips/t-linux64
|
||||
@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
|
||||
MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
|
||||
MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
|
||||
MULTILIB_OSDIRNAMES = \
|
||||
- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
|
||||
- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
|
||||
- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
|
||||
+ ../lib \
|
||||
+ ../lib32 \
|
||||
+ ../lib
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From 3263d8634da6d7e1edb1bfd88e1b2627ce0aa1be Mon Sep 17 00:00:00 2001
|
||||
From 44655aa3be8d5354fb82a42317a9ac6ac1b50164 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH] ppc64[le]: disable multilib support
|
||||
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
@@ -36,7 +36,7 @@ index 4e371255533..128c75c7d39 100644
|
||||
endif
|
||||
|
||||
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
|
||||
index 47e0efd5764..f89729af64f 100644
|
||||
index 01a94242308..b3a76379c03 100644
|
||||
--- a/gcc/config/rs6000/t-linux64
|
||||
+++ b/gcc/config/rs6000/t-linux64
|
||||
@@ -28,8 +28,8 @@
|
||||
@@ -76,3 +76,6 @@ index 2e63bdb9fc9..c6e1c5db65d 100644
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From bf63353ea679e0bbf2c2f17bb64c75ebd590c6e7 Mon Sep 17 00:00:00 2001
|
||||
From 5f79236c49bd0c2c36440f0ef83cea02d52fcaaf Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH] x86_64: disable multilib support
|
||||
Subject: [PATCH 22/33] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
@@ -9,7 +9,7 @@ multilib is not presently supported on Alpine GCC
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
|
||||
index 5526ad0e6cc..78866afab36 100644
|
||||
index 138956b0962..bc03dab874f 100644
|
||||
--- a/gcc/config/i386/t-linux64
|
||||
+++ b/gcc/config/i386/t-linux64
|
||||
@@ -33,6 +33,6 @@
|
||||
@@ -21,3 +21,6 @@ index 5526ad0e6cc..78866afab36 100644
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
From 2eed19787020ce52cf07b76a5d167c420ec42b61 Mon Sep 17 00:00:00 2001
|
||||
From 4605e64b3a076411f2f8134256c400eb58bcc1c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 3 Jan 2022 07:14:48 +0100
|
||||
Subject: [PATCH] riscv: disable multilib support
|
||||
Subject: [PATCH 23/33] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -43,10 +43,10 @@ library.
|
||||
2 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 3067ed6eac8..4c8c85e3285 100644
|
||||
index 16503482ec2..8d9881eadeb 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -71,9 +71,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -61,9 +61,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{static:-static}}"
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
@@ -69,3 +69,6 @@ index 216d2776a18..1a8a863853e 100644
|
||||
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
|
||||
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
|
||||
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+9
-6
@@ -1,7 +1,7 @@
|
||||
From 51a35c0fa0e793c6a2c64ae1449c0cfd681d8f8a Mon Sep 17 00:00:00 2001
|
||||
From a178cfeb975d79bb9b9fd877ab4c6e05d10b147e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH] always build libgcc_eh.a
|
||||
Subject: [PATCH 24/33] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
@@ -10,10 +10,10 @@ highly inspired by:
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
index 6c4dc79ab71..023cede18a7 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),)
|
||||
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
|
||||
all: libunwind.a
|
||||
endif
|
||||
|
||||
@@ -24,7 +24,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1160,10 +1161,6 @@ install-libunwind:
|
||||
@@ -1163,10 +1164,6 @@ install-libunwind:
|
||||
install-shared:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||
|
||||
@@ -35,7 +35,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes)
|
||||
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
|
||||
endif
|
||||
|
||||
@@ -46,3 +46,6 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
parts="$(INSTALL_PARTS)"; \
|
||||
for file in $$parts; do \
|
||||
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
From 64a1c5f57e278869f41c43ee56cc5defb3dd55c5 Mon Sep 17 00:00:00 2001
|
||||
From 5bc3deb9bc2679ad4f6f189a65e3643b550587a1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
2 files changed, 3 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
index 7c9e7ca4518..caafc4aa68f 100644
|
||||
index a5e645d334d..32165347071 100644
|
||||
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
@@ -403,12 +403,6 @@ package System.OS_Interface is
|
||||
@@ -38,7 +38,7 @@ index 7c9e7ca4518..caafc4aa68f 100644
|
||||
sched_priority : int; -- scheduling priority
|
||||
end record;
|
||||
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
index 4ff784f0ea7..b34a12802c6 100644
|
||||
index 821ceef30e4..ae95b58e01e 100644
|
||||
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -130,3 +130,6 @@ index 4ff784f0ea7..b34a12802c6 100644
|
||||
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
|
||||
|
||||
pragma Assert (Result in 0 | ENOMEM);
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+23
-20
@@ -1,7 +1,7 @@
|
||||
From 82addb1312f4f58a412a664228944009aa5cb569 Mon Sep 17 00:00:00 2001
|
||||
From e1e6dccc9124e0907c5ae174d20acb3bad87e633 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH] ada: musl support fixes
|
||||
Subject: [PATCH 26/33] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] ada: musl support fixes
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index aaf853e3a2a..e2dd3587ed5 100644
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1633,7 +1633,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2258,7 +2258,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +32,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2289,7 +2289,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -41,7 +41,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<libgnarl/a-intnam__linux.ads \
|
||||
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
|
||||
@@ -2504,7 +2504,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -50,7 +50,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2608,7 +2608,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -58,9 +58,9 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 591d033fbca..a485cbf15b9 100644
|
||||
index 8522094164e..92b230a462b 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -75,7 +75,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3446,7 +3451,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -83,7 +83,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3456,7 +3460,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -92,7 +92,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3469,33 +3473,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -134,7 +134,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3505,23 +3509,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -164,10 +164,10 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 2631be5ad3e..d442f4bd6cd 100644
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -321,13 +321,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
|
||||
/* Routines for interface to required CPU set primitives */
|
||||
|
||||
@@ -186,10 +186,10 @@ index 2631be5ad3e..d442f4bd6cd 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index 32d30a49c7e..d960e32e2d0 100644
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1132,7 +1132,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -198,7 +198,7 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1146,7 +1146,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -207,7 +207,7 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1195,8 +1195,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -218,3 +218,6 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+26
-33
@@ -1,7 +1,7 @@
|
||||
From 573a66e4146c9a65d895af9081a4d3d49cfc9e7a Mon Sep 17 00:00:00 2001
|
||||
From 9506e729f0e4f66f4018fbfc5340a568e8520264 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 16:07:26 +0000
|
||||
Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH 27/33] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
@@ -9,19 +9,19 @@ This fixes issues with RISC-V.
|
||||
Makefile.in | 1 +
|
||||
gcc/config.in | 6 ++++++
|
||||
gcc/config/gnu-user.h | 12 +++++++++++-
|
||||
gcc/configure | 32 ++++++++++++++++++++++++++++++--
|
||||
gcc/configure.ac | 22 +++++++++++++++++++++-
|
||||
gcc/configure | 31 ++++++++++++++++++++++++++++++-
|
||||
gcc/configure.ac | 21 +++++++++++++++++++++
|
||||
gcc/doc/install.texi | 8 ++++++++
|
||||
gcc/doc/tm.texi | 8 +++++++-
|
||||
gcc/doc/tm.texi.in | 8 +++++++-
|
||||
gcc/gcc.cc | 12 +++++++++++-
|
||||
9 files changed, 102 insertions(+), 7 deletions(-)
|
||||
9 files changed, 102 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b564ddbf792..a95c7407d16 100644
|
||||
index 6ff2b3f9925..394b105b271 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -232,6 +232,7 @@ HOST_EXPORTS = \
|
||||
@@ -235,6 +235,7 @@ HOST_EXPORTS = \
|
||||
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
|
||||
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
|
||||
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
|
||||
@@ -30,7 +30,7 @@ index b564ddbf792..a95c7407d16 100644
|
||||
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
|
||||
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index f0fbf123aa8..af84efc4f9e 100644
|
||||
index 0679fbbf4c6..ee81139b385 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -118,6 +118,12 @@
|
||||
@@ -47,7 +47,7 @@ index f0fbf123aa8..af84efc4f9e 100644
|
||||
format instead of DPD */
|
||||
#ifndef USED_FOR_TARGET
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 8433e56c3e1..0347f10da8b 100644
|
||||
index b26b17f2f2a..3f64ea46180 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -71,10 +71,10 @@ index 8433e56c3e1..0347f10da8b 100644
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
index e59cbee1767..787c35d4e25 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -981,6 +981,7 @@ with_changes_root_url
|
||||
@@ -984,6 +984,7 @@ with_changes_root_url
|
||||
enable_languages
|
||||
with_multilib_list
|
||||
with_multilib_generator
|
||||
@@ -82,7 +82,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
with_zstd
|
||||
with_zstd_include
|
||||
with_zstd_lib
|
||||
@@ -1710,6 +1711,9 @@ Optional Features:
|
||||
@@ -1713,6 +1714,9 @@ Optional Features:
|
||||
--disable-shared don't provide a shared libgcc
|
||||
--disable-gcov don't provide libgcov and related host tools
|
||||
--enable-languages=LIST specify which front-ends to build
|
||||
@@ -92,7 +92,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
--disable-rpath do not hardcode runtime library paths
|
||||
--enable-sjlj-exceptions
|
||||
arrange to use setjmp/longjmp exception handling
|
||||
@@ -8324,7 +8328,6 @@ else
|
||||
@@ -8329,7 +8333,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
# Check whether --with-multilib-generator was given.
|
||||
if test "${with_multilib_generator+set}" = set; then :
|
||||
withval=$with_multilib_generator; :
|
||||
@@ -8332,6 +8335,32 @@ else
|
||||
@@ -8337,6 +8340,32 @@ else
|
||||
with_multilib_generator=default
|
||||
fi
|
||||
|
||||
@@ -133,16 +133,11 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
@@ -34296,4 +34325,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
-
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index e683d3a7a5f..07c81c78336 100644
|
||||
index 57268319de1..56bcaa87620 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -1205,6 +1205,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
:,
|
||||
with_multilib_generator=default)
|
||||
|
||||
@@ -170,16 +165,11 @@ index e683d3a7a5f..07c81c78336 100644
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
@@ -7839,4 +7860,3 @@ done
|
||||
],
|
||||
[subdirs='$subdirs'])
|
||||
AC_OUTPUT
|
||||
-
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index 48408d842db..c90be0ee750 100644
|
||||
index 928fc6b6d4b..81a677014df 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2295,6 +2295,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
@@ -2374,6 +2374,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}.
|
||||
|
||||
@@ -195,7 +185,7 @@ index 48408d842db..c90be0ee750 100644
|
||||
Tell GCC that when the GNU C Library (glibc) is used on the target it
|
||||
will be version @var{major}.@var{minor} or later. Normally this can
|
||||
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
|
||||
index c5006afc00d..56b62c69ae8 100644
|
||||
index a660e33739b..6183c407a2b 100644
|
||||
--- a/gcc/doc/tm.texi
|
||||
+++ b/gcc/doc/tm.texi
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
@@ -214,7 +204,7 @@ index c5006afc00d..56b62c69ae8 100644
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
|
||||
index f869ddd5e5b..57c93f24ac3 100644
|
||||
index f7ab5d48a63..281540aba68 100644
|
||||
--- a/gcc/doc/tm.texi.in
|
||||
+++ b/gcc/doc/tm.texi.in
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
@@ -233,10 +223,10 @@ index f869ddd5e5b..57c93f24ac3 100644
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 735b2b1bba1..f10f3c91aa7 100644
|
||||
index 59390fd39d6..dae1dd4cf79 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -987,13 +987,23 @@ proper position among the other output files. */
|
||||
@@ -974,13 +974,23 @@ proper position among the other output files. */
|
||||
# define ASM_DEBUG_OPTION_SPEC ""
|
||||
#endif
|
||||
|
||||
@@ -261,3 +251,6 @@ index 735b2b1bba1..f10f3c91aa7 100644
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEFAULT_SSP
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,8 +1,8 @@
|
||||
From 4baaeb9661fa4015d9701e3616ce1ad4e8a07fd8 Mon Sep 17 00:00:00 2001
|
||||
From 966da83d0d75482a1489804593ae61f3f8e3b385 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 29 Aug 2021 09:45:27 +0200
|
||||
Subject: [PATCH] configure: fix detection of atomic builtins in libatomic
|
||||
configure script
|
||||
Date: Sun, 29 Aug 2021 12:23:34 +0200
|
||||
Subject: [PATCH 28/33] configure: fix detection of atomic builtins in
|
||||
libatomic configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
default) causes the libatomic configure script to incorrectly detect
|
||||
@@ -22,7 +22,7 @@ See:
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
|
||||
index 33f8c91ce77..3999db2cf8a 100644
|
||||
index a92ae9e8309..90b579ca4d8 100644
|
||||
--- a/libatomic/configure.tgt
|
||||
+++ b/libatomic/configure.tgt
|
||||
@@ -30,6 +30,26 @@
|
||||
@@ -52,3 +52,6 @@ index 33f8c91ce77..3999db2cf8a 100644
|
||||
case "${target_cpu}" in
|
||||
alpha*)
|
||||
# fenv.c needs this option to generate inexact exceptions.
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,15 +1,15 @@
|
||||
From 20c84de53efcb86993f1a1909e65a97240d6123e Mon Sep 17 00:00:00 2001
|
||||
From e74f4b3a10d96f06b15df9d9b61d5b10a84ec084 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Thu, 30 Jun 2022 17:08:36 +0000
|
||||
Subject: [PATCH] libstdc++: do not throw exceptions for non-C locales on musl
|
||||
targets
|
||||
Date: Thu, 30 Jun 2022 16:44:51 +0000
|
||||
Subject: [PATCH 29/33] libstdc++: do not throw exceptions for non-C locales on
|
||||
musl targets
|
||||
|
||||
---
|
||||
libstdc++-v3/config/locale/generic/c_locale.cc | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
index 1e4db8d4415..9b79bc3c5dd 100644
|
||||
index 8849d78fdfa..aff467f98fe 100644
|
||||
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
|
||||
@@ -242,9 +242,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
@@ -22,3 +22,6 @@ index 1e4db8d4415..9b79bc3c5dd 100644
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+9
-5
@@ -1,7 +1,8 @@
|
||||
From b6554d1207d0f5771c2f5d11316b61787e4dd705 Mon Sep 17 00:00:00 2001
|
||||
From bdc2699f0284e59842e5d3a39fc426550b4ba0e8 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 16:31:09 +0000
|
||||
Subject: [PATCH] gdc: unconditionally link libgphobos against libucontext
|
||||
Date: Mon, 17 Jan 2022 03:49:21 +0000
|
||||
Subject: [PATCH 30/33] gdc: unconditionally link libgphobos against
|
||||
libucontext
|
||||
|
||||
ref: alpine/aports#13422
|
||||
---
|
||||
@@ -9,10 +10,10 @@ ref: alpine/aports#13422
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index a95c7407d16..ea942d60387 100644
|
||||
index 394b105b271..bc4a77fc300 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -53287,7 +53287,7 @@ configure-target-libphobos:
|
||||
@@ -52809,7 +52809,7 @@ configure-target-libphobos:
|
||||
esac; \
|
||||
module_srcdir=libphobos; \
|
||||
rm -f no-such-file || : ; \
|
||||
@@ -21,3 +22,6 @@ index a95c7407d16..ea942d60387 100644
|
||||
$$s/$$module_srcdir/configure \
|
||||
--srcdir=$${topdir}/$$module_srcdir \
|
||||
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,7 +1,7 @@
|
||||
From 39f5c9a850917a3c19630c0115ef0d5b0f151c72 Mon Sep 17 00:00:00 2001
|
||||
From 82780d18bfcb7dabc215d4b89b1187cb253e15f8 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 13:26:49 +0200
|
||||
Subject: [PATCH] druntime: link against libucontext on all platforms
|
||||
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
||||
Subject: [PATCH 31/33] 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
|
||||
@@ -12,10 +12,10 @@ an external library for these functions.
|
||||
2 files changed, 16 deletions(-)
|
||||
|
||||
diff --git a/libphobos/configure b/libphobos/configure
|
||||
index 9da06f087d0..0db0acfb9c2 100755
|
||||
index 925c53c5f5e..60c2a0c11c6 100755
|
||||
--- a/libphobos/configure
|
||||
+++ b/libphobos/configure
|
||||
@@ -15192,14 +15192,6 @@ fi
|
||||
@@ -15216,14 +15216,6 @@ fi
|
||||
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
|
||||
# "yes" for targets that have 'version = AsmExternal'.
|
||||
druntime_fiber_asm_external=no
|
||||
@@ -49,3 +49,6 @@ index 45a56f6f76a..fef6e890b1e 100644
|
||||
if test "$druntime_fiber_asm_external" = no; then
|
||||
AC_SEARCH_LIBS([swapcontext], [c ucontext], [],
|
||||
AC_MSG_ERROR([swapcontext required but not found]))
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,14 +1,14 @@
|
||||
From 4b28b8356c7ecf9375a2c07ac6be226a5693f8d2 Mon Sep 17 00:00:00 2001
|
||||
From 32fc6be0b339983e31f6285dbc565b906ec983d4 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 01:05:11 +0200
|
||||
Subject: [PATCH] libgnat: time_t is always 64-bit on musl libc
|
||||
Date: Tue, 19 Jul 2022 14:54:07 +0200
|
||||
Subject: [PATCH 32/33] libgnat: time_t is always 64-bit on musl libc
|
||||
|
||||
---
|
||||
gcc/ada/libgnat/s-parame.ads | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads
|
||||
index 4b8111402ba..b670e78c53b 100644
|
||||
index 3d6e345a1ba..cfe0b4d3ca6 100644
|
||||
--- a/gcc/ada/libgnat/s-parame.ads
|
||||
+++ b/gcc/ada/libgnat/s-parame.ads
|
||||
@@ -102,7 +102,7 @@ package System.Parameters is
|
||||
@@ -20,3 +20,6 @@ index 4b8111402ba..b670e78c53b 100644
|
||||
-- Number of bits in type time_t
|
||||
|
||||
----------------------------------------------
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
From ecc2a2e70e44fa76a75b12d0893bc1702b72a1b4 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Mon, 19 Dec 2022 10:37:06 -0800
|
||||
Subject: [PATCH] libgo: check for makecontext in -lucontext
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Patch from Sören Tempel.
|
||||
|
||||
Change-Id: I74b4052cc7aca19224afd6d9a2739c3fae46b722
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/458396
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/configure | 57 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
libgo/configure.ac | 3 +++
|
||||
2 files changed, 60 insertions(+)
|
||||
|
||||
diff --git a/libgo/configure b/libgo/configure
|
||||
index 460fdad7..a607dbff 100755
|
||||
--- a/libgo/configure
|
||||
+++ b/libgo/configure
|
||||
@@ -14818,6 +14818,63 @@ fi
|
||||
|
||||
|
||||
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing makecontext" >&5
|
||||
+$as_echo_n "checking for library containing makecontext... " >&6; }
|
||||
+if ${ac_cv_search_makecontext+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_func_search_save_LIBS=$LIBS
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char makecontext ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return makecontext ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+for ac_lib in '' ucontext; do
|
||||
+ if test -z "$ac_lib"; then
|
||||
+ ac_res="none required"
|
||||
+ else
|
||||
+ ac_res=-l$ac_lib
|
||||
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
+ fi
|
||||
+ if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_search_makecontext=$ac_res
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext
|
||||
+ if ${ac_cv_search_makecontext+:} false; then :
|
||||
+ break
|
||||
+fi
|
||||
+done
|
||||
+if ${ac_cv_search_makecontext+:} false; then :
|
||||
+
|
||||
+else
|
||||
+ ac_cv_search_makecontext=no
|
||||
+fi
|
||||
+rm conftest.$ac_ext
|
||||
+LIBS=$ac_func_search_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_makecontext" >&5
|
||||
+$as_echo "$ac_cv_search_makecontext" >&6; }
|
||||
+ac_res=$ac_cv_search_makecontext
|
||||
+if test "$ac_res" != no; then :
|
||||
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
|
||||
$as_echo_n "checking for library containing sched_yield... " >&6; }
|
||||
if ${ac_cv_search_sched_yield+:} false; then :
|
||||
diff --git a/libgo/configure.ac b/libgo/configure.ac
|
||||
index 09554a37..a59aa091 100644
|
||||
--- a/libgo/configure.ac
|
||||
+++ b/libgo/configure.ac
|
||||
@@ -570,6 +570,9 @@ PTHREAD_LIBS=
|
||||
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread)
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
|
||||
+dnl Test if -lucontext is required for makecontext.
|
||||
+AC_SEARCH_LIBS([makecontext], [ucontext])
|
||||
+
|
||||
dnl Test if -lrt is required for sched_yield or nanosleep or clock_gettime.
|
||||
AC_SEARCH_LIBS([sched_yield], [rt])
|
||||
AC_SEARCH_LIBS([nanosleep], [rt])
|
||||
@@ -0,0 +1,30 @@
|
||||
From b5e9f810a8a5963104dd1897c3276f60786f9edb 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
|
||||
|
||||
musl does not have these since 1.2.4, we can't use the compat interfaces.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
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
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
|
||||
@@ -293,11 +293,7 @@ else version (CRuntime_Bionic)
|
||||
}
|
||||
else version (CRuntime_Musl)
|
||||
{
|
||||
- static if (__USE_LARGEFILE64) void* mmap64(void*, size_t, int, int, int, off_t);
|
||||
- static if (__USE_FILE_OFFSET64)
|
||||
- alias mmap = mmap64;
|
||||
- else
|
||||
- void* mmap(void*, size_t, int, int, int, off_t);
|
||||
+ void* mmap(void*, size_t, int, int, int, off_t);
|
||||
int munmap(void*, size_t);
|
||||
}
|
||||
else version (CRuntime_UClibc)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
From b3840bdcc0eee2a4d099a9af52199944ade7acb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Tue, 29 Nov 2022 17:28:44 -0800
|
||||
Subject: [PATCH] syscall, runtime: always call XSI strerror_r
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This does the right thing for either glibc or musl on GNU/Linux.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: If2969e131f0fae456d58b35d839d8abe191fcc59
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
|
||||
---
|
||||
libgo/Makefile.am | 1 +
|
||||
libgo/Makefile.in | 6 +++++-
|
||||
libgo/go/syscall/errstr.go | 22 ++++++++-----------
|
||||
libgo/go/syscall/errstr_glibc.go | 33 ----------------------------
|
||||
libgo/runtime/go-strerror.c | 37 ++++++++++++++++++++++++++++++++
|
||||
5 files changed, 52 insertions(+), 47 deletions(-)
|
||||
delete mode 100644 libgo/go/syscall/errstr_glibc.go
|
||||
create mode 100644 libgo/runtime/go-strerror.c
|
||||
|
||||
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
|
||||
index e0a1eec5..df568743 100644
|
||||
--- a/libgo/Makefile.am
|
||||
+++ b/libgo/Makefile.am
|
||||
@@ -465,6 +465,7 @@ runtime_files = \
|
||||
runtime/go-nanotime.c \
|
||||
runtime/go-now.c \
|
||||
runtime/go-nosys.c \
|
||||
+ runtime/go-strerror.c \
|
||||
runtime/go-reflect-call.c \
|
||||
runtime/go-setenv.c \
|
||||
runtime/go-signal.c \
|
||||
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
|
||||
index 7bef5df9..f2f3f0fc 100644
|
||||
--- a/libgo/Makefile.in
|
||||
+++ b/libgo/Makefile.in
|
||||
@@ -247,7 +247,7 @@ am__objects_4 = runtime/aeshash.lo runtime/go-assert.lo \
|
||||
runtime/go-fieldtrack.lo runtime/go-matherr.lo \
|
||||
runtime/go-memclr.lo runtime/go-memmove.lo \
|
||||
runtime/go-memequal.lo runtime/go-nanotime.lo \
|
||||
- runtime/go-now.lo runtime/go-nosys.lo \
|
||||
+ runtime/go-now.lo runtime/go-nosys.lo runtime/go-strerror.lo \
|
||||
runtime/go-reflect-call.lo runtime/go-setenv.lo \
|
||||
runtime/go-signal.lo runtime/go-unsafe-pointer.lo \
|
||||
runtime/go-unsetenv.lo runtime/go-unwind.lo \
|
||||
@@ -917,6 +917,7 @@ runtime_files = \
|
||||
runtime/go-nanotime.c \
|
||||
runtime/go-now.c \
|
||||
runtime/go-nosys.c \
|
||||
+ runtime/go-strerror.c \
|
||||
runtime/go-reflect-call.c \
|
||||
runtime/go-setenv.c \
|
||||
runtime/go-signal.c \
|
||||
@@ -1390,6 +1391,8 @@ runtime/go-now.lo: runtime/$(am__dirstamp) \
|
||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
runtime/go-nosys.lo: runtime/$(am__dirstamp) \
|
||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
+runtime/go-strerror.lo: runtime/$(am__dirstamp) \
|
||||
+ runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
runtime/go-reflect-call.lo: runtime/$(am__dirstamp) \
|
||||
runtime/$(DEPDIR)/$(am__dirstamp)
|
||||
runtime/go-setenv.lo: runtime/$(am__dirstamp) \
|
||||
@@ -1457,6 +1460,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-reflect-call.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-strerror.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
|
||||
diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
|
||||
index 6c2441d3..9f688e2a 100644
|
||||
--- a/libgo/go/syscall/errstr.go
|
||||
+++ b/libgo/go/syscall/errstr.go
|
||||
@@ -4,23 +4,19 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-// +build !hurd
|
||||
-// +build !linux
|
||||
-
|
||||
package syscall
|
||||
|
||||
-//sysnb strerror_r(errnum int, buf []byte) (err Errno)
|
||||
-//strerror_r(errnum _C_int, buf *byte, buflen Size_t) _C_int
|
||||
+import "internal/bytealg"
|
||||
+
|
||||
+//extern go_strerror
|
||||
+func go_strerror(_C_int, *byte, Size_t) _C_int
|
||||
|
||||
func Errstr(errnum int) string {
|
||||
- for len := 128; ; len *= 2 {
|
||||
- b := make([]byte, len)
|
||||
- errno := strerror_r(errnum, b)
|
||||
+ for size := 128; ; size *= 2 {
|
||||
+ b := make([]byte, size)
|
||||
+ errno := go_strerror(_C_int(errnum), &b[0], Size_t(len(b)))
|
||||
if errno == 0 {
|
||||
- i := 0
|
||||
- for b[i] != 0 {
|
||||
- i++
|
||||
- }
|
||||
+ i := bytealg.IndexByte(b, 0)
|
||||
// Lowercase first letter: Bad -> bad, but
|
||||
// STREAM -> STREAM.
|
||||
if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
|
||||
@@ -29,7 +25,7 @@ func Errstr(errnum int) string {
|
||||
return string(b[:i])
|
||||
}
|
||||
if errno != ERANGE {
|
||||
- return "errstr failure"
|
||||
+ return "strerror_r failure"
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go
|
||||
deleted file mode 100644
|
||||
index 5b19e6f2..00000000
|
||||
--- a/libgo/go/syscall/errstr_glibc.go
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
|
||||
-
|
||||
-// Copyright 2010 The Go Authors. All rights reserved.
|
||||
-// Use of this source code is governed by a BSD-style
|
||||
-// license that can be found in the LICENSE file.
|
||||
-
|
||||
-// We use this rather than errstr.go because on GNU/Linux sterror_r
|
||||
-// returns a pointer to the error message, and may not use buf at all.
|
||||
-
|
||||
-// +build hurd linux
|
||||
-
|
||||
-package syscall
|
||||
-
|
||||
-import "unsafe"
|
||||
-
|
||||
-//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
|
||||
-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
|
||||
-
|
||||
-func Errstr(errnum int) string {
|
||||
- a := make([]byte, 128)
|
||||
- p := strerror_r(errnum, a)
|
||||
- b := (*[1000]byte)(unsafe.Pointer(p))
|
||||
- i := 0
|
||||
- for b[i] != 0 {
|
||||
- i++
|
||||
- }
|
||||
- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
||||
- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
|
||||
- c := b[0] + 'a' - 'A'
|
||||
- return string(c) + string(b[1:i])
|
||||
- }
|
||||
- return string(b[:i])
|
||||
-}
|
||||
diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c
|
||||
new file mode 100644
|
||||
index 00000000..13d1d91d
|
||||
--- /dev/null
|
||||
+++ b/libgo/runtime/go-strerror.c
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* go-strerror.c -- wrapper around XSI-compliant strerror_r.
|
||||
+
|
||||
+ Copyright 2022 The Go Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style
|
||||
+ license that can be found in the LICENSE file. */
|
||||
+
|
||||
+/* There are two version of strerror_r on GNU/Linux: a GNU-specific
|
||||
+ and an XSI-compliant version. The former version is only available
|
||||
+ on glibc. Since glibc 2.13, the XSI-compliant version is also
|
||||
+ provided by glibc if _GNU_SOURCE is not defined. Since the
|
||||
+ entirety of gofrontend is compiled with _GNU_SOURCE, this file
|
||||
+ exists to selectively undefine it and provides an alias to the
|
||||
+ XSI-compliant version of strerror_r(3). */
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+
|
||||
+/* Force selection of XSI-compliant strerror_r by glibc. */
|
||||
+#undef XOPEN_SOURCE
|
||||
+#define XOPEN_SOURCE 600
|
||||
+#undef _POSIX_C_SOURCE
|
||||
+#define _POSIX_C_SOURCE 200112L
|
||||
+#undef _GNU_SOURCE
|
||||
+
|
||||
+#endif /* __linux__ */
|
||||
+
|
||||
+#include <string.h>
|
||||
+
|
||||
+#ifndef HAVE_STRERROR_R
|
||||
+// Provided by go-nosys.c if not provided by libc itself.
|
||||
+extern int strerror_r (int, char *, size_t);
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+go_strerror (int errnum, char *buf, size_t buflen)
|
||||
+{
|
||||
+ return strerror_r (errnum, buf, buflen);
|
||||
+}
|
||||
@@ -1,199 +0,0 @@
|
||||
From 3b9243b891cc06373639a23ed5717b0d1c2d8ea6 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Tue, 14 Jun 2022 06:13:43 -0700
|
||||
Subject: [PATCH] libgo: permit loff_t and off_t to be macros
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
They are macros in musl libc, rather than typedefs, and -fgo-dump-spec
|
||||
doesn't handle that case.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: Ic9a608fd964a6f78e754aa8e3100aff06ab3dade
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
|
||||
libgo: #include <sys/types.h> when checking for loff_t
|
||||
|
||||
Fixes https://gcc.gnu.org/PR106033
|
||||
Fixes golang/go#53469
|
||||
|
||||
Change-Id: I060021b7bb9334949b567442448abb6822fd6d35
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413214
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/config.h.in | 3 +++
|
||||
libgo/configure | 12 ++++++++++--
|
||||
libgo/configure.ac | 11 +++++++++--
|
||||
libgo/go/syscall/libcall_linux.go | 17 +++++++++--------
|
||||
libgo/mksysinfo.sh | 6 +-----
|
||||
libgo/sysinfo.c | 15 ++++++++++++++-
|
||||
6 files changed, 46 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/libgo/config.h.in b/libgo/config.h.in
|
||||
index 25b8ab8f9ee..2c3c7469675 100644
|
||||
--- a/libgo/config.h.in
|
||||
+++ b/libgo/config.h.in
|
||||
@@ -70,6 +70,9 @@
|
||||
/* Define to 1 if you have the `fchownat' function. */
|
||||
#undef HAVE_FCHOWNAT
|
||||
|
||||
+/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
+#undef HAVE_FCNTL_H
|
||||
+
|
||||
/* Define to 1 if you have the `futimesat' function. */
|
||||
#undef HAVE_FUTIMESAT
|
||||
|
||||
diff --git a/libgo/configure b/libgo/configure
|
||||
index ffe17c9be55..61a49947eb9 100755
|
||||
--- a/libgo/configure
|
||||
+++ b/libgo/configure
|
||||
@@ -15249,7 +15249,7 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
-for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
|
||||
+for ac_header in fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
@@ -15546,7 +15546,14 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
|
||||
+
|
||||
+CFLAGS_hold="$CFLAGS"
|
||||
+CFLAGS="$OSCFLAGS $CFLAGS"
|
||||
+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+
|
||||
+"
|
||||
if test "x$ac_cv_type_loff_t" = xyes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -15556,6 +15563,7 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
+CFLAGS="$CFLAGS_hold"
|
||||
|
||||
LIBS_hold="$LIBS"
|
||||
LIBS="$LIBS -lm"
|
||||
diff --git a/libgo/configure.ac b/libgo/configure.ac
|
||||
index 7e2b98ba67c..274fcfc35c7 100644
|
||||
--- a/libgo/configure.ac
|
||||
+++ b/libgo/configure.ac
|
||||
@@ -579,7 +579,7 @@ AC_C_BIGENDIAN
|
||||
|
||||
GCC_CHECK_UNWIND_GETIPINFO
|
||||
|
||||
-AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h)
|
||||
+AC_CHECK_HEADERS(fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h)
|
||||
|
||||
AC_CHECK_HEADERS([netinet/icmp6.h], [], [],
|
||||
[#include <netinet/in.h>
|
||||
@@ -601,7 +601,14 @@ AC_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat open64 openat pipe2 removexattr renameat setxattr sync_file_range splice syscall tee unlinkat unshare utimensat)
|
||||
AC_TYPE_OFF_T
|
||||
-AC_CHECK_TYPES([loff_t])
|
||||
+
|
||||
+CFLAGS_hold="$CFLAGS"
|
||||
+CFLAGS="$OSCFLAGS $CFLAGS"
|
||||
+AC_CHECK_TYPES([loff_t], [], [], [[
|
||||
+#include <sys/types.h>
|
||||
+#include <fcntl.h>
|
||||
+]])
|
||||
+CFLAGS="$CFLAGS_hold"
|
||||
|
||||
LIBS_hold="$LIBS"
|
||||
LIBS="$LIBS -lm"
|
||||
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
|
||||
index 96974bd3269..65eb1a745f7 100644
|
||||
--- a/libgo/go/syscall/libcall_linux.go
|
||||
+++ b/libgo/go/syscall/libcall_linux.go
|
||||
@@ -209,19 +209,20 @@ func Gettid() (tid int) {
|
||||
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
|
||||
//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
|
||||
|
||||
-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
|
||||
-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
|
||||
+//sys splice(rfd int, roff *_libgo_loff_t_type, wfd int, woff *_libgo_loff_t_type, len int, flags int) (n int64, err error)
|
||||
+//splice(rfd _C_int, roff *_libgo_loff_t_type, wfd _C_int, woff *_libgo_loff_t_type, len Size_t, flags _C_uint) Ssize_t
|
||||
+
|
||||
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
|
||||
- var lroff _loff_t
|
||||
- var plroff *_loff_t
|
||||
+ var lroff _libgo_loff_t_type
|
||||
+ var plroff *_libgo_loff_t_type
|
||||
if roff != nil {
|
||||
- lroff = _loff_t(*roff)
|
||||
+ lroff = _libgo_loff_t_type(*roff)
|
||||
plroff = &lroff
|
||||
}
|
||||
- var lwoff _loff_t
|
||||
- var plwoff *_loff_t
|
||||
+ var lwoff _libgo_loff_t_type
|
||||
+ var plwoff *_libgo_loff_t_type
|
||||
if woff != nil {
|
||||
- lwoff = _loff_t(*woff)
|
||||
+ lwoff = _libgo_loff_t_type(*woff)
|
||||
plwoff = &lwoff
|
||||
}
|
||||
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index 0c52ea5d71a..5aa309155c3 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -403,11 +403,7 @@ fi
|
||||
# Some basic types.
|
||||
echo 'type Size_t _size_t' >> ${OUT}
|
||||
echo "type Ssize_t _ssize_t" >> ${OUT}
|
||||
-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
|
||||
- echo "type Offset_t _off64_t" >> ${OUT}
|
||||
-else
|
||||
- echo "type Offset_t _off_t" >> ${OUT}
|
||||
-fi
|
||||
+echo "type Offset_t _libgo_off_t_type" >> ${OUT}
|
||||
echo "type Mode_t _mode_t" >> ${OUT}
|
||||
echo "type Pid_t _pid_t" >> ${OUT}
|
||||
echo "type Uid_t _uid_t" >> ${OUT}
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index 336a5983750..fc0210992fa 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -354,6 +354,18 @@ enum {
|
||||
};
|
||||
#endif
|
||||
|
||||
+#if defined(HAVE_LOFF_T)
|
||||
+// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
|
||||
+// see a typedef.
|
||||
+typedef loff_t libgo_loff_t_type;
|
||||
+#endif
|
||||
+
|
||||
+#if defined(HAVE_OFF64_T)
|
||||
+typedef off64_t libgo_off_t_type;
|
||||
+#else
|
||||
+typedef off_t libgo_off_t_type;
|
||||
+#endif
|
||||
+
|
||||
// The following section introduces explicit references to types and
|
||||
// constants of interest to support bootstrapping libgo using a
|
||||
// compiler that doesn't support -fdump-go-spec (e.g., clang), via
|
||||
@@ -534,7 +546,8 @@ SREF(timex);
|
||||
// From sys/types.h
|
||||
TREF(pid_t);
|
||||
TREF(off_t);
|
||||
-TREF(loff_t);
|
||||
+TREF(libgo_loff_t_type);
|
||||
+TREF(libgo_off_t_type);
|
||||
TREF(size_t);
|
||||
TREF(ssize_t);
|
||||
TREF(mode_t);
|
||||
@@ -1,59 +0,0 @@
|
||||
From 5e658f4659c551330ea68f5667e4f951b218f32d Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Wed, 26 Oct 2022 17:23:42 -0700
|
||||
Subject: [PATCH] runtime: use _libgo_off_t_type when calling C mmap
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The last argument to the C mmap function is type off_t, not uintptr.
|
||||
On some 32-bit systems, off_t is larger than uintptr.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: Ib6f9d5bcd4734f99a72889e2282b97ec3c8fbd34
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/445735
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/go/runtime/mem_gccgo.go | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
|
||||
index fa3389d8..1e84f4f5 100644
|
||||
--- a/libgo/go/runtime/mem_gccgo.go
|
||||
+++ b/libgo/go/runtime/mem_gccgo.go
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
//go:linkname sysFree
|
||||
|
||||
//extern mmap
|
||||
-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
|
||||
+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off _libgo_off_t_type) unsafe.Pointer
|
||||
|
||||
//extern munmap
|
||||
func munmap(addr unsafe.Pointer, length uintptr) int32
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
}
|
||||
|
||||
func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
|
||||
- p := sysMmap(addr, n, prot, flags, fd, off)
|
||||
+ p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off))
|
||||
if uintptr(p) == _MAP_FAILED {
|
||||
return nil, errno()
|
||||
}
|
||||
@@ -47,6 +47,7 @@ func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (u
|
||||
|
||||
// Don't split the stack as this method may be invoked without a valid G, which
|
||||
// prevents us from allocating more stack.
|
||||
+//
|
||||
//go:nosplit
|
||||
func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer {
|
||||
p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, mmapFD, 0)
|
||||
@@ -165,6 +166,7 @@ func sysHugePage(v unsafe.Pointer, n uintptr) {
|
||||
|
||||
// Don't split the stack as this function may be invoked without a valid G,
|
||||
// which prevents us from allocating more stack.
|
||||
+//
|
||||
//go:nosplit
|
||||
func sysFree(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) {
|
||||
sysStat.add(-int64(n))
|
||||
@@ -1,71 +0,0 @@
|
||||
From c86b726c048eddc1be320c0bf64a897658bee13d Mon Sep 17 00:00:00 2001
|
||||
From: Uros Bizjak <ubizjak@gmail.com>
|
||||
Date: Wed, 18 May 2022 20:03:26 +0200
|
||||
Subject: [PATCH] x86: Fix -fsplit-stack feature detection via
|
||||
TARGET_CAN_SPLIT_STACK
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since commit c163647ffbc9a20c8feb6e079dbecccfe016c82e -fsplit-stack
|
||||
is only supported on glibc targets. However, this original commit
|
||||
required some fixups. As part of the fixup, the changes to the
|
||||
gnu-user-common.h and gnu.h were partially reverted in commit
|
||||
60953a23d57b13a672f751bec0c6eefc059eb1ab thus causing TARGET_CAN_SPLIT_STACK
|
||||
to be defined for non-glibc targets even though -fsplit-stack is
|
||||
actually not supported and attempting to use it causes a runtime error.
|
||||
|
||||
This causes gcc internal code, such as ./gcc/go/gospec.c to not
|
||||
correctly detect that -fsplit-stack is not supported and thus causes
|
||||
gccgo to fail compilation on non-glibc targets.
|
||||
|
||||
This commit ensures that TARGET_CAN_SPLIT_STACK is only set if the
|
||||
default libc is glibc. It is presently unclear to me if there is a
|
||||
better way to detect glibc at pre-processor time.
|
||||
|
||||
The proposed changes have been tested on x86 and x86_64 Alpine Linux
|
||||
(which uses musl libc) and fix compilation of gccgo for this target.
|
||||
|
||||
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* config/i386/gnu-user-common.h (defined): Only define
|
||||
TARGET_CAN_SPLIT_STACK for glibc targets.
|
||||
* config/i386/gnu.h (defined): Ditto.
|
||||
---
|
||||
gcc/config/i386/gnu-user-common.h | 5 +++--
|
||||
gcc/config/i386/gnu.h | 5 +++--
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
|
||||
index 23b54c5be52..cab9be2bfb7 100644
|
||||
--- a/gcc/config/i386/gnu-user-common.h
|
||||
+++ b/gcc/config/i386/gnu-user-common.h
|
||||
@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define STACK_CHECK_STATIC_BUILTIN 1
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives. Also
|
||||
+ we only support -fsplit-stack on glibc targets. */
|
||||
+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
|
||||
index 401e60c9a02..fb8d69a97d8 100644
|
||||
--- a/gcc/config/i386/gnu.h
|
||||
+++ b/gcc/config/i386/gnu.h
|
||||
@@ -41,8 +41,9 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define TARGET_THREAD_SSP_OFFSET 0x14
|
||||
|
||||
/* We only build the -fsplit-stack support in libgcc if the
|
||||
- assembler has full support for the CFI directives. */
|
||||
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
+ assembler has full support for the CFI directives. Also
|
||||
+ we only support -fsplit-stack on glibc targets. */
|
||||
+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
|
||||
#define TARGET_CAN_SPLIT_STACK
|
||||
#endif
|
||||
/* We steal the last transactional memory word. */
|
||||
@@ -1,41 +0,0 @@
|
||||
From 548720bca6bff21ebc9aba22249d9ce45bbd90c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Wed, 29 Jun 2022 15:32:04 -0700
|
||||
Subject: [PATCH] libgo: handle stat st_atim32 field and SYS_SECCOMP
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Patches for musl support, from Sören Tempel.
|
||||
|
||||
Fixes https://gcc.gnu.org/PR105225
|
||||
|
||||
Change-Id: If396877d4a4c7d27962226d7a6e3bb91b1344413
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
---
|
||||
libgo/mksysinfo.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
|
||||
index 5aa30915..ea1fa17d 100755
|
||||
--- a/libgo/mksysinfo.sh
|
||||
+++ b/libgo/mksysinfo.sh
|
||||
@@ -127,6 +127,7 @@ fi
|
||||
|
||||
# The syscall numbers. We force the names to upper case.
|
||||
grep '^const _SYS_' gen-sysinfo.go | \
|
||||
+ grep -v '^const _SYS_SECCOMP = ' | \
|
||||
sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
|
||||
while read sys; do
|
||||
sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
@@ -506,7 +507,7 @@ fi
|
||||
|
||||
# For historical reasons Go uses the suffix "timespec" instead of "tim" for
|
||||
# stat_t's time fields on NetBSD.
|
||||
-st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/'
|
||||
+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g'
|
||||
if test "${GOOS}" = "netbsd"; then
|
||||
st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e s/st_ctim/Ctimespec/'
|
||||
fi
|
||||
@@ -1,108 +0,0 @@
|
||||
From 8f1a91aeff400d572857895b7f5e863ec5a4d93e Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Mon, 26 Sep 2022 15:03:53 -0400
|
||||
Subject: [PATCH] runtime: portable access to sigev_notify_thread_id
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Previously, libgo relied on the _sigev_un implementation-specific
|
||||
field in struct sigevent, which is only available on glibc.
|
||||
This patch uses the sigev_notify_thread_id macro instead which is
|
||||
mandated by timer_create(2). In theory, this should work with any libc
|
||||
implementation for Linux. Unfortunately, there is an open glibc bug
|
||||
as glibc does not define this macro. For this reason, a glibc-specific
|
||||
workaround is required. Other libcs (such as musl) define the macro
|
||||
and don't require the workaround.
|
||||
|
||||
See https://sourceware.org/bugzilla/show_bug.cgi?id=27417
|
||||
|
||||
This makes libgo compatible with musl libc.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: I0924a53d5212730ebc395ecf9199f85967be8cc6
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
---
|
||||
libgo/go/runtime/os_linux.go | 12 +++++++++++-
|
||||
libgo/runtime/go-signal.c | 18 ++++++++++++++++++
|
||||
2 files changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
|
||||
index 96fb1788..2b2d827c 100644
|
||||
--- a/libgo/go/runtime/os_linux.go
|
||||
+++ b/libgo/go/runtime/os_linux.go
|
||||
@@ -22,6 +22,12 @@ type mOS struct {
|
||||
profileTimerValid uint32
|
||||
}
|
||||
|
||||
+// setSigeventTID is written in C to set the sigev_notify_thread_id
|
||||
+// field of a sigevent struct.
|
||||
+//
|
||||
+//go:noescape
|
||||
+func setSigeventTID(*_sigevent, int32)
|
||||
+
|
||||
func getProcID() uint64 {
|
||||
return uint64(gettid())
|
||||
}
|
||||
@@ -52,9 +58,12 @@ const (
|
||||
)
|
||||
|
||||
// Atomically,
|
||||
+//
|
||||
// if(*addr == val) sleep
|
||||
+//
|
||||
// Might be woken up spuriously; that's allowed.
|
||||
// Don't sleep longer than ns; ns < 0 means forever.
|
||||
+//
|
||||
//go:nosplit
|
||||
func futexsleep(addr *uint32, val uint32, ns int64) {
|
||||
// Some Linux kernels have a bug where futex of
|
||||
@@ -73,6 +82,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
|
||||
}
|
||||
|
||||
// If any procs are sleeping on addr, wake up at most cnt.
|
||||
+//
|
||||
//go:nosplit
|
||||
func futexwakeup(addr *uint32, cnt uint32) {
|
||||
ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE_PRIVATE, cnt, nil, nil, 0)
|
||||
@@ -365,7 +375,7 @@ func setThreadCPUProfiler(hz int32) {
|
||||
var sevp _sigevent
|
||||
sevp.sigev_notify = _SIGEV_THREAD_ID
|
||||
sevp.sigev_signo = _SIGPROF
|
||||
- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
|
||||
+ setSigeventTID(&sevp, int32(mp.procid))
|
||||
ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid)
|
||||
if ret != 0 {
|
||||
// If we cannot create a timer for this M, leave profileTimerValid false
|
||||
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
|
||||
index 528d9b6d..aa1b6305 100644
|
||||
--- a/libgo/runtime/go-signal.c
|
||||
+++ b/libgo/runtime/go-signal.c
|
||||
@@ -183,6 +183,24 @@ setSigactionHandler(struct sigaction* sa, uintptr handler)
|
||||
sa->sa_sigaction = (void*)(handler);
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
+
|
||||
+// Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=27417
|
||||
+#ifndef sigev_notify_thread_id
|
||||
+ #define sigev_notify_thread_id _sigev_un._tid
|
||||
+#endif
|
||||
+
|
||||
+void setSigeventTID(struct sigevent*, int32_t)
|
||||
+ __asm__ (GOSYM_PREFIX "runtime.setSigeventTID");
|
||||
+
|
||||
+void
|
||||
+setSigeventTID(struct sigevent *sev, int32_t v)
|
||||
+{
|
||||
+ sev->sigev_notify_thread_id = v;
|
||||
+}
|
||||
+
|
||||
+#endif // defined(__linux__)
|
||||
+
|
||||
// C code to fetch values from the siginfo_t and ucontext_t pointers
|
||||
// passed to a signal handler.
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
From 01be086df55016ad676685c6b0dca6aa11330bfc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 17 Jul 2022 13:38:39 +0200
|
||||
Subject: [PATCH] libphobos: don't define __mode_t twice on musl targets
|
||||
|
||||
For musl targets, __mode_t is already aliased to uint, thus if it
|
||||
aliased in an architecture-specific if-case then it is defined twice
|
||||
which causes a build error.
|
||||
|
||||
To-Do: Report this upstream or revise this patch in a way that is also
|
||||
works with glibc and submit that upstream.
|
||||
---
|
||||
libphobos/libdruntime/core/sys/posix/sys/stat.d | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
|
||||
index 1fb4e44cbbf..ca31bbb7ccf 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
|
||||
@@ -167,7 +167,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = size_t;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -483,7 +482,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -565,7 +563,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = size_t;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -660,7 +657,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -746,7 +742,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -838,7 +833,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = uint;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -914,7 +908,6 @@ version (linux)
|
||||
alias __dev_t = ulong;
|
||||
alias __ino_t = c_ulong;
|
||||
alias __ino64_t = ulong;
|
||||
- alias __mode_t = uint;
|
||||
alias __nlink_t = ulong;
|
||||
alias __uid_t = uint;
|
||||
alias __gid_t = uint;
|
||||
@@ -1,36 +0,0 @@
|
||||
From d53e8a0e94e34dc609e34dd5e404debda2640cfb Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Sat, 30 Jul 2022 07:29:28 -0700
|
||||
Subject: [PATCH] libgo: use SYS_timer_settime32
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: I1f3485028d132ceca1aba595325af24b4d72b894
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
||||
---
|
||||
libgo/sysinfo.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
||||
index fc021099..180f5c31 100644
|
||||
--- a/libgo/sysinfo.c
|
||||
+++ b/libgo/sysinfo.c
|
||||
@@ -354,6 +354,11 @@ enum {
|
||||
};
|
||||
#endif
|
||||
|
||||
+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
|
||||
+// musl defines SYS_timer_settim32 on 32-bit systems.
|
||||
+#define SYS_timer_settime SYS_timer_settime32
|
||||
+#endif
|
||||
+
|
||||
#if defined(HAVE_LOFF_T)
|
||||
// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
|
||||
// see a typedef.
|
||||
@@ -1,50 +0,0 @@
|
||||
From a62f20ae78ddd41be682dde8cab075ca4f5dbb2a Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Fri, 22 Jul 2022 11:38:20 -0700
|
||||
Subject: [PATCH] libgo: use POSIX shell arithmetic expansion
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Avoid bash-specific ((expression)) syntax. As the bash syntax
|
||||
converts a non-zero value to a zero status (and a zero value to a 1
|
||||
status), and POSIX arithmetic expansion does not, we have to negate
|
||||
the result.
|
||||
|
||||
Based on patch by Sören Tempel.
|
||||
|
||||
Change-Id: I4c64fa15de3994a1a5c7c5ec0de6a82ddd858917
|
||||
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/419154
|
||||
Reviewed-by: Than McIntosh <thanm@google.com>
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
---
|
||||
libgo/match.sh | 2 +-
|
||||
libgo/testsuite/gotest | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgo/match.sh b/libgo/match.sh
|
||||
index 7ed587ff..e5ed98de 100755
|
||||
--- a/libgo/match.sh
|
||||
+++ b/libgo/match.sh
|
||||
@@ -111,7 +111,7 @@ gobuild() {
|
||||
if test "$goarch" != "386"; then
|
||||
line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
|
||||
fi
|
||||
- (($line))
|
||||
+ return $((!($line)))
|
||||
}
|
||||
|
||||
matched=
|
||||
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
|
||||
index 04e4267f..0a0a7e14 100755
|
||||
--- a/libgo/testsuite/gotest
|
||||
+++ b/libgo/testsuite/gotest
|
||||
@@ -302,7 +302,7 @@ gobuild() {
|
||||
if test "$goarch" != "386"; then
|
||||
line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
|
||||
fi
|
||||
- (($line))
|
||||
+ return $((!($line)))
|
||||
}
|
||||
|
||||
case "x$gofiles" in
|
||||
@@ -1,65 +0,0 @@
|
||||
From 7b8400f902ef25ea71ed460716c1afedca357a61 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 2 Nov 2022 12:31:36 +0100
|
||||
Subject: [PATCH] libphobos: fix undefined reference to `__cmsg_nxthdr' with
|
||||
musl
|
||||
|
||||
Ported fix from upstream.
|
||||
|
||||
Upstream: https://github.com/dlang/dmd/commit/54544260a848c8ebad5582e27ac1e09627cdfb17
|
||||
Bug-URL: https://issues.dlang.org/show_bug.cgi?id=23157
|
||||
---
|
||||
.../libdruntime/core/sys/posix/sys/socket.d | 36 +++++++++++++++++--
|
||||
1 file changed, 33 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libphobos/libdruntime/core/sys/posix/sys/socket.d b/libphobos/libdruntime/core/sys/posix/sys/socket.d
|
||||
index c1309a68c9c..e3b536d87e7 100644
|
||||
--- a/libphobos/libdruntime/core/sys/posix/sys/socket.d
|
||||
+++ b/libphobos/libdruntime/core/sys/posix/sys/socket.d
|
||||
@@ -188,10 +188,40 @@ version (linux)
|
||||
|
||||
extern (D) inout(ubyte)* CMSG_DATA( return scope inout(cmsghdr)* cmsg ) pure nothrow @nogc { return cast(ubyte*)( cmsg + 1 ); }
|
||||
|
||||
- private inout(cmsghdr)* __cmsg_nxthdr(inout(msghdr)*, inout(cmsghdr)*) pure nothrow @nogc;
|
||||
- extern (D) inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc
|
||||
+ version (CRuntime_Musl)
|
||||
{
|
||||
- return __cmsg_nxthdr(msg, cmsg);
|
||||
+ extern (D)
|
||||
+ {
|
||||
+ private size_t __CMSG_LEN(inout(cmsghdr)* cmsg) pure nothrow @nogc
|
||||
+ {
|
||||
+ return (cmsg.cmsg_len + size_t.sizeof -1) & cast(size_t)(~(size_t.sizeof - 1));
|
||||
+ }
|
||||
+
|
||||
+ private inout(cmsghdr)* __CMSG_NEXT(inout(cmsghdr)* cmsg) pure nothrow @nogc
|
||||
+ {
|
||||
+ return cmsg + __CMSG_LEN(cmsg);
|
||||
+ }
|
||||
+
|
||||
+ private inout(msghdr)* __MHDR_END(inout(msghdr)* mhdr) pure nothrow @nogc
|
||||
+ {
|
||||
+ return cast(inout(msghdr)*)(mhdr.msg_control + mhdr.msg_controllen);
|
||||
+ }
|
||||
+
|
||||
+ inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc
|
||||
+ {
|
||||
+ return cmsg.cmsg_len < cmsghdr.sizeof ||
|
||||
+ __CMSG_LEN(cmsg) + cmsghdr.sizeof >= __MHDR_END(msg) - cast(inout(msghdr)*)(cmsg)
|
||||
+ ? cast(inout(cmsghdr)*) null : cast(inout(cmsghdr)*) __CMSG_NEXT(cmsg);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ private inout(cmsghdr)* __cmsg_nxthdr(inout(msghdr)*, inout(cmsghdr)*) pure nothrow @nogc;
|
||||
+ extern (D) inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc
|
||||
+ {
|
||||
+ return __cmsg_nxthdr(msg, cmsg);
|
||||
+ }
|
||||
}
|
||||
|
||||
extern (D) inout(cmsghdr)* CMSG_FIRSTHDR( inout(msghdr)* mhdr ) pure nothrow @nogc
|
||||
--
|
||||
2.38.1
|
||||
|
||||
+102
-99
@@ -24,15 +24,17 @@ CBUILDROOT="/"
|
||||
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
_pkgbase=12.2.1 # must match gcc/BASE-VER
|
||||
_pkgsnap=20220924
|
||||
pkgver=${_pkgbase}_git$_pkgsnap
|
||||
pkgver=13.1.1_git20230527
|
||||
# i.e. 13.1.1, must match gcc/BASE-VER
|
||||
_pkgbase="${pkgver%%_git*}"
|
||||
# date component from snapshots
|
||||
_pkgsnap="${pkgver##*_git}"
|
||||
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
||||
|
||||
pkgname=gcc-aarch64
|
||||
pkgrel=10
|
||||
pkgrel=1
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="https://gcc.gnu.org"
|
||||
arch="x86_64"
|
||||
@@ -40,10 +42,9 @@ license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="binutils-aarch64 mpc1"
|
||||
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
||||
# XXX: build hack to upgrade live on builders
|
||||
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-aarch64 binutils-aarch64"
|
||||
subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target"
|
||||
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
|
||||
replaces="libstdc++ binutils"
|
||||
|
||||
: "${LANG_CXX:=true}"
|
||||
@@ -77,11 +78,13 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
_libatomic=false
|
||||
_libitm=false
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# reset target flags (should be set in crosscreate abuild)
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
|
||||
unset CPPFLAGS
|
||||
export CFLAGS_FOR_TARGET=" "
|
||||
export CXXFLAGS_FOR_TARGET=" "
|
||||
@@ -89,10 +92,12 @@ if [ "$CHOST" != "$CTARGET" ]; then
|
||||
|
||||
STRIP_FOR_TARGET="$CTARGET-strip"
|
||||
elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# fixup flags. seems gcc treats CPPFLAGS as global without
|
||||
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
||||
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
|
||||
unset CPPFLAGS
|
||||
|
||||
# reset flags and cc for build
|
||||
@@ -117,6 +122,21 @@ elif [ "$CBUILD" != "$CHOST" ]; then
|
||||
else
|
||||
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
||||
_builddir="$srcdir/build"
|
||||
|
||||
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
|
||||
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
|
||||
# pass -g0 by default to bypass -g, since we don't do debug
|
||||
# if -dbg added, the -g is appended and overrides this
|
||||
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/} -O2"
|
||||
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/} -O2"
|
||||
unset CPPFLAGS
|
||||
# https://gcc.gnu.org/install/build.html
|
||||
export CFLAGS_FOR_TARGET="$CFLAGS"
|
||||
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
|
||||
export LDFLAGS_FOR_TARGET="$LDFLAGS"
|
||||
export BOOT_CFLAGS="$CFLAGS"
|
||||
export BOOT_CXXFLAGS="$CXXFLAGS"
|
||||
export BOOT_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
@@ -148,7 +168,7 @@ esac
|
||||
# currently on x86, x86_64 and ia64
|
||||
_libquadmath=$LANG_FORTRAN
|
||||
case "$CTARGET_ARCH" in
|
||||
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
||||
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
|
||||
*) _libquadmath=false ;;
|
||||
esac
|
||||
|
||||
@@ -225,41 +245,28 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
|
||||
0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
0012-libitm-disable-FORTIFY.patch
|
||||
0013-libgcc_s.patch
|
||||
0014-nopie.patch
|
||||
0015-dlang-use-libucontext-on-mips64.patch
|
||||
0016-ada-fix-shared-linking.patch
|
||||
0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
0018-add-fortify-headers-paths.patch
|
||||
0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
0020-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
0021-mips64-disable-multilib-support.patch
|
||||
0022-aarch64-disable-multilib-support.patch
|
||||
0023-s390x-disable-multilib-support.patch
|
||||
0024-ppc64-le-disable-multilib-support.patch
|
||||
0025-x86_64-disable-multilib-support.patch
|
||||
0026-riscv-disable-multilib-support.patch
|
||||
0027-always-build-libgcc_eh.a.patch
|
||||
0028-ada-libgnarl-compatibility-for-musl.patch
|
||||
0029-ada-musl-support-fixes.patch
|
||||
0033-gcc-go-link-to-libucontext.patch
|
||||
0034-Use-generic-errstr.go-implementation-on-musl.patch
|
||||
0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
0036-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
||||
0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
|
||||
0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
|
||||
0043-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
0044-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
0045-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
|
||||
0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch
|
||||
0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
|
||||
0052-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
0053-libgo-make-match.sh-POSIX-shell-compatible.patch
|
||||
0054-libphobos-fix-undefined-reference-to-__cmsg_nxthdr-w.patch
|
||||
0012-libgcc_s.patch
|
||||
0013-nopie.patch
|
||||
0014-ada-fix-shared-linking.patch
|
||||
0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
0016-add-fortify-headers-paths.patch
|
||||
0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
0019-aarch64-disable-multilib-support.patch
|
||||
0020-s390x-disable-multilib-support.patch
|
||||
0021-ppc64-le-disable-multilib-support.patch
|
||||
0022-x86_64-disable-multilib-support.patch
|
||||
0023-riscv-disable-multilib-support.patch
|
||||
0024-always-build-libgcc_eh.a.patch
|
||||
0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
0026-ada-musl-support-fixes.patch
|
||||
0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
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
|
||||
"
|
||||
|
||||
# we build out-of-tree
|
||||
@@ -303,7 +310,7 @@ build() {
|
||||
case "$CTARGET" in
|
||||
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
|
||||
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
|
||||
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";;
|
||||
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6kz --with-tune=arm1176jzf-s --with-fpu=vfpv2 --with-float=hard --with-abi=aapcs-linux";;
|
||||
armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";;
|
||||
mips-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";;
|
||||
mips64-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";;
|
||||
@@ -358,11 +365,7 @@ build() {
|
||||
echo " hash_style_configure=$_hash_style_configure"
|
||||
echo ""
|
||||
|
||||
export CFLAGS="$CFLAGS -O2"
|
||||
export CXXFLAGS="$CXXFLAGS -O2"
|
||||
export CPPFLAGS="$CPPFLAGS -O2"
|
||||
|
||||
local version="Alpine $pkgver-r$pkgrel"
|
||||
local version="Alpine $pkgver"
|
||||
local gccconfiguration="
|
||||
--prefix=/usr
|
||||
--mandir=/usr/share/man
|
||||
@@ -371,6 +374,7 @@ build() {
|
||||
--host=$CHOST
|
||||
--target=$CTARGET
|
||||
--enable-checking=release
|
||||
--disable-cet
|
||||
--disable-fixed-point
|
||||
--disable-libstdcxx-pch
|
||||
--disable-multilib
|
||||
@@ -381,6 +385,8 @@ build() {
|
||||
--enable-default-pie
|
||||
--enable-default-ssp
|
||||
--enable-languages=$_languages
|
||||
--enable-link-serialization=2
|
||||
--enable-linker-build-id
|
||||
$_arch_configure
|
||||
$_libc_configure
|
||||
$_cross_configure
|
||||
@@ -553,6 +559,7 @@ libcxx_dev() {
|
||||
replaces="g++"
|
||||
|
||||
amove usr/${_target:+$CTARGET/}lib/libstdc++.a \
|
||||
usr/${_target:+$CTARGET/}lib/libstdc++exp.a \
|
||||
usr/${_target:+$CTARGET/}lib/libstdc++.so \
|
||||
usr/${_target:+$CTARGET/}lib/libstdc++fs.a \
|
||||
usr/${_target:+$CTARGET/}lib/libsupc++.a \
|
||||
@@ -763,52 +770,48 @@ gnat() {
|
||||
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
gdb() {
|
||||
pkgdesc="$pkgdesc (gdb printers)"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel gdb"
|
||||
|
||||
amove \
|
||||
usr/share/gdb/python/ \
|
||||
usr/share/gcc-*/python/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ba4d9e73d108088da26fbefe18d9b245b76771ffe752c2b4b31bdf38a2d0b638fbc115c377526c27311d4d7ffd4e0d236a5af5016bd364ccaa11a4989d1401e8 gcc-12-20220924.tar.xz
|
||||
41cbb4d69218006cf9e0cdb6c86212ef451f8decd52a50a7dbb4d34726009da7a4e0261c852b46cb584db253a4bae2f31dc485c506cb545e64a7d26e0ba6c2b6 0001-posix_memalign.patch
|
||||
531155055cda7f119bcac6479bcae73af9201cd596af9cf1616850bbcf4393b91c5de9f2fbbc1cde6e158fb4df7237b033146f662dff5fa0ea12151cc514adb8 0002-gcc-poison-system-directories.patch
|
||||
c1275d77b5269386a2ec683933570810f5a2ba1208c161ed887797eb9aee3cb82ef08a8964635902614e6a6e83f3065ba0801c9355d85dd8d60cb1fa20bdf687 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
a54e45bff4484a35d3826435a414d909281453f5605f4081cf3be1f15336cceed93a1d8a54e92e2fa97188623e3030ca1323d7749141e228a7db73795230d86a 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
ad132ddbd0c33a3983e3de4f74d8fdb8cb1ddf53ef54de0a5c12efb49e42014ed117165d43f396bcf3455ecfe2c8620e0326e73b4160a370a4cc92d213329c34 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
0b9ce0f130a7b797770f3d58a5200575f20e5663c86c0c5710718b7bffd3416cc2f05861613d9c258428e9541c6e0b9837d01f0c99d383e2c3de0503a988e861 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
e7813acc7ead61373c212cefbe53eb020b4c5bd8f0f35ee972e0524060713f911624f5a1a871feada642e1f3f5e48c8508125ca2da09de351d544bedf1d44ada 0007-Enable-Wtrampolines-by-default.patch
|
||||
d0d0566a11e4828bdd6f53346a9a6b9841f3066d3f4a05ee2b6fe97aeb4552654170e7662318ea18fc777c3e75c88a067097478fc4e880a3f9c134b8a3af2277 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
f75e63d9d933874f18fb7f55b135c60dfa0377abafa8e0edb91b85d5f00f4f072d0a338ba5d9baec18494211dbbda8068782830dbafbb37068936f76aede270f 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
afa4daba222a19569588736a8276dc7c12223a7c222f3dd3795dc3f1cd90f40b90518971ae27b358020354f89562c9680ec8b8e24e85e6d4f8e54e79d185359b 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
79dac82249fb573ec477e1451a33883302eb63a5110853faed117f5021221f2153e2ec845dd5a0043b1bf9f0e5736ef0c89743ff2d771774a281c8b24542803a 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
b035f85c1703b45d15c1d1ffe7d23400e01625e5d403504911cc92f740b02586447de2a9d66a9f80f12b9c227bc193e2a43942c8af2bdb42cdeff8272bbe6068 0012-libitm-disable-FORTIFY.patch
|
||||
9fb4d396a9493d2d68fe829ce075ba4c5df148b1d6aaab315a6f8ccbdd70d0e052a5dc50369adc2dab005b4a3becd1504b182faed6e82c86accb95f5bc2b9f50 0013-libgcc_s.patch
|
||||
f82ac22961d842c9f8e731a601bb255918cc160969888363ad2d83e2ccf08b19114a200d46bcf99d097bf530f470c2b1e71e46828bc1b9fff5469ff945f541d8 0014-nopie.patch
|
||||
6527dc9d250db48d56cf01e9299461bf22a838ffda96c40d448e18f457b206cec2322275d2d5abbbaf3c6573c5e7eba12724c9691b601f118ff7520e19726373 0015-dlang-use-libucontext-on-mips64.patch
|
||||
6c3ce0ccd68b19e2c76172d8f24b0747ee0af2b8de7af692f2f699848267d7fc42fec8e5c303102fe05be7e934b56f21eea17ce47c8aca20570590830d88e9b0 0016-ada-fix-shared-linking.patch
|
||||
7089a96aaec8e0b222cb3fa7301d71bb2e328a24dec33e15ea9e3e7695bcae919308249b9a3be5ea2f3b1f069f9fd1739066f31d12317fcdab0596dba9ca54a4 0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
b7ebdeee0b143052fdd6e3efa070ea8621d4fb729312cbc787d618e666b593990a20cd9044a786265970d8e09ec13da03b797009543d0b657b0fe924f2dcaa68 0018-add-fortify-headers-paths.patch
|
||||
8e682893d6367732ab8c490b915112a68d98855deec3bd8db91dc0d9bf486b8c044b13ee2b95c4806da7ac17c41034e081b7a66861018274cb33fdb2fd6df04a 0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
a14c5f98ade5af8cd6e3a0244752674d9c4f6dadb4260f98f1949bff51ac1211a3f8319e0f933f776e98998d2c7221004f92413f97ccc2e966f8462ed6d33597 0020-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
28c1d477da79aa212ac79e4b02cf865d8b9c31cec6c42f41b4268e3f3c49bf67fb51e54180abe543a54e550788bb472bfcf1b4bc38d072a792d7403dbbee178a 0021-mips64-disable-multilib-support.patch
|
||||
0920e31c46bf937b47a0602766f042d45adb71abf332ee84399c665c12298ef115cff945fe26d646b0276bfdfdd04913970e6f1f8784a11c26e15111c854643d 0022-aarch64-disable-multilib-support.patch
|
||||
e4c6bf7ec40f2798c8e5b40a543aecffd5591a2805546b3b97aaa4fbe4df6ce4330a60973a9ddfbca9890590606d5204e7f653ab2b6e4b2c13feeb595b68e63a 0023-s390x-disable-multilib-support.patch
|
||||
0e956d793c94283ce5af7fe84bfcbb655585a9573608e9bf497fa7b726e12daa391e44977d0a8c97fb460aba89b1773b91e036b0ee1ef4d6263a3943cb63d9cd 0024-ppc64-le-disable-multilib-support.patch
|
||||
95917fcb60dbc0a8134db9beb583f3c9ea61128499c214f594c434ec8246641ec41e245ce2d1d9b85ffd40ea0e5764f7a33c5522b2547145814245ac0fa25025 0025-x86_64-disable-multilib-support.patch
|
||||
b40d7e4712c035674c993bbb55475290ec14523b3f0fd05493514bac4e9adaa6641faf815fc40ffc00119d9fd64be28218ee874c289ec7430eeef05ab2fcae5e 0026-riscv-disable-multilib-support.patch
|
||||
674360ce2ee9f704d0632cc98756f9fe8dd8ca30064fb9d3423b437f7e679c1c51e765b15e535dcb278cd2769583690acb3395b91e4fd5f6f4e3b97879fcc313 0027-always-build-libgcc_eh.a.patch
|
||||
f060687adcd5297124e4000f1ba1e3fd5d7d124da04d948cbd0d4a6c69a90a2b29a4a0dbbe13a83ab6950724f434de012b681bdbcdf53c0100b40fe3d00f2f2f 0028-ada-libgnarl-compatibility-for-musl.patch
|
||||
5160bae68e20a1966c1f6d655ee98af759e9b9ee842718ae6007d467b418e1cf3b307528a0841477b5259671ce868521b06c0f2e947b7b8f3a398c53dd978252 0029-ada-musl-support-fixes.patch
|
||||
72631fbef4843d6ada52f3173b257e027605866a3faf1d8e34438cbf2581952f97bf6f9569ee44fcd7c4b3b337612eaeb0612fb2e6451903f219e4d99bf719db 0033-gcc-go-link-to-libucontext.patch
|
||||
141c0428f988cbd102000d4db8d4150485f6da5c064469493ea378cd579bed99330658f41fe106c0d07d1c1aa436ec3f864403ed1ba79f791a1d727b42d46910 0034-Use-generic-errstr.go-implementation-on-musl.patch
|
||||
d9ba710f770e053c8f212e821817c188091a829658050b9ab5906388553ec60fec37943ea43c270e92a9014902949f3c98fc4639032d92b8145b375bb29e193e 0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
ab90d8fdd977d6cd3da096a1c76d77be3e89a020b2127247771711a32eb608cceed21834ef488ab4b69bb0f408b098fdfb61630819e3d1a1e57d5af67800ee74 0036-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
8bc6823f0b3c66f7b73d7ddb64ffa6930463285c2e9a14a2bc1882bcc4271144eaa1107d713294699caf9481648163cbf43921a2b8e4ac0d55c78a804bae8a3d 0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
||||
f0744c01859e67deed404c97e1870b2876935fdc467e51980373744936574c314d5d21134734c5d515e7f3cd3483ef98045b9bbcd81c568c6038fac96ffb5fa0 0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
||||
d6dc1bfb881a313d167aaa5658790b0f55eea4336c408cfc6613dd5783440dafd0d37c43031a5f3e69be40f632e38371cd4fb6e5f0494ac4ea4d7d5025d2ae02 0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
|
||||
684c6a6d52512b973429b6e709966439ac1e174f9e79a33d4a638b452245b457b34752b4b4034ba983f6a712f86522e7adf715bab00a6603f64a12139c5b1e39 0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
|
||||
25014dfa99d96ee70ce0ad22e9f7974f0a51cc50b3b9c2db49df50774c8cd29e497ceed120486bee50be83bfb07f2009ed310eb9b0543f2795bd7359b87eadd2 0043-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
75fd83ac05ab0a08d5f48547b08810f9934209bc78b5db59d65f33887b382af7ec24d8a29d40f86325c05af40c1ae1ec6466c839f646af90afc895a13073d07b 0044-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
13e047153076d6e1fc40c9f5b6bfe5699c0e5460248f3d2b35ae36677cb960525af7b0b025997e5000a8492cec5e77a86828d66b4058c0d7f89fde0ab3890142 0045-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
c33ca2553642c2dbd1c65cd97046548f08775785a3db06d761e3bbe61398c37bc382fe132c0c3fa2101dfd4eea2a6d48bf4fae899a0ddb811c81abd7be35c122 0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
|
||||
179cd15d629884a66e954fd76066675efa594686b970facbb12ad50769e5d70b5530d7f61e77120e26d1c3dfc701cfc5295f341f635db998df73c41bc8e62172 0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch
|
||||
c82d7c8d340a76df3d796565a79b0ccc04ddffef39927620e1f3719bf2dc1db101ba13aef24b46c5bc95b7bf1e31c8bda4ab0936ba4c9c5e5047ba08826c982c 0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
|
||||
eb403d8ea665fd5dc2c11faf43b055e6a3bf480a397ceee3e0ca1e38ec7d2392315f2694ed9a34ffbc99e464f2873fbbf91be8646ea4dea5d3636e3ea22fefa0 0052-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
22fb6edf1ed0387e2b93839ffe6e82a7fee420950af90e91199c3488d966702fdeb1a3396d22be0c73a4051525da9349c93d070a0d83b724c83f2b268da6483f 0053-libgo-make-match.sh-POSIX-shell-compatible.patch
|
||||
9b74d0a0e4140b597708a295bcf51b93944782698470e2ba9bc0f0d4a830fc418da9624eccc85f3d65ff6d50b8ebf40cecd34d5b045db9e6c29614e981e93f92 0054-libphobos-fix-undefined-reference-to-__cmsg_nxthdr-w.patch
|
||||
bcad5977ff9b0fe66df53e985ddcf0be1727860f76025a09c2ea786bd6d4c7f1129776ad2e52912c16824fb5d870188d44a24125db78603d78da75c13d207311 gcc-13-20230527.tar.xz
|
||||
af3d297e6e6aa9076fd09d128d72d72cb9c225ee377f3c65cc7647620b956ac463e8f744c808b045102ab7ed131cbaa3d511e121e5c820ac93f29374bb1f4281 0001-posix_memalign.patch
|
||||
1be15c3740749731e606eed65f99c274fca2072cc8c907f036f44f3f03047af356fd2f1b2b5b8a082dac6f9046998dde400f8acb4046d14702dace7d976ff78f 0002-gcc-poison-system-directories.patch
|
||||
a43fd3091f7cecba66f6904d4241a3d04b084c6eab820f34d36a445fa57b44b0a65613550544c179e314a3d516c2cbd8f245a3f001a0854b99c7bbac171c5756 0003-specs-turn-on-Wl-z-now-by-default.patch
|
||||
b8dd907022785d5f3edd5b6575a1343d54a0c84d935e76a35308dcf2cb602a03e8b91fb51431a9be970eb797f0ae8d4f64f93ec97573cc0fdac61c0dba5ab79f 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
||||
f93ec8f926a014cd43e70589ce188ca0ef24d216617184bcb81e9c9cbd56aeeede6653489f2d31105c51cab7ea94499db5ec46528ad6e14d33d8e90e2c95dc29 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
||||
966012aa0a9271232d271d548c1029af3567aaf0b1d3d1ef502ad6fa18cb1c6709f8e7f7124c58040777ddd84bca68490255664a02f0a626d9e76aa4a3949980 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
||||
503789bae52d70ddae2cb55ab5046b149f03af95c8341927712d1f7c6c2d25db1fa2ee19f0832d477357162adb276f287c66b702565b684162a2f43b69157d9f 0007-Enable-Wtrampolines-by-default.patch
|
||||
1488ae4f29e3d9416430e1a10e9201d4c1cad10515ff0921756e98b6be4ec5aa8adbd94d7e5fe4dab446bdf495183fbd6d04cd53a69e5d7f2d1963eeb739daf7 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
||||
6785152ee7d25ccfdb5bb14ccb08e9fa21433f3f9567b12c7174ec77c37d2437737bde60d8b4be41927eaf40efe46d24348e95ccde78428877f296f33642ab49 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
||||
8ca5ef6c9ad56c0314a2230ef6d8d21e0bffdc1289f573991077d6ed1007e30d4cbefe00b0ea72718c09020bb8275178f028ce6763829f7e34255a9b84e5332f 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
||||
6909b33e6067c3aef3f6a6975c9c35523d3aa7cb1e8bdaed73804b9afd28890fc868e54f806ac31b134a9c783b2e4774e561f9a7c456c6dba85c17acee1aa84d 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
||||
2ff9b6828b25ea6ede730954131ccdcbdd7457f0fc32c0ba87dc9a4732a22f9bb87086b1429f7ebd04859ea66b7b3682fc75e8d81e96b2b74e9a6891456f6835 0012-libgcc_s.patch
|
||||
eb1241be648e0371dd83bed55e1902b7867938cb71fa5ed09b8e1ecfb81ee5da40abc42f2ab515217c8e70234f923fc1b85ec137fd7a58cbfaf357f732cd16f7 0013-nopie.patch
|
||||
4cd04db2d503d4cc224b08a39b4130056df340ea27c2d2c8b682096516255d4f431af2a9cf8bf1fb946b1499f1157123de666beaef72875ab3e678dde1dddce2 0014-ada-fix-shared-linking.patch
|
||||
07c159267d0f3fea64f504ce0f995e2e1dab5c96cc00198698ff24392d3cb242915ac373f69f8fc3fbc12bd60fa2c5d5b22bbf01aba938bcb6c9d2541c1701f0 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
||||
548c7e0f7795405f46c9177638c6c20dca1d3de850a8e238ac2278887924be080d243135d246e7c15c0eb0c82b6d58cec5afbcba26da45c294a3e3de54b12e9b 0016-add-fortify-headers-paths.patch
|
||||
3e50bec315f257f57e5fdc830a91a813451348f4ed2b7d43d628544592d684e0971e2b00b614f46d0b5902fa530f13db7c86bedc180da6a700a96f1e4be2ad88 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
||||
c777cf9ed9e0a9d91b5539a12375679f37b101e35aae6a70d113074138f4eb47afeae454206d47f5a8d6e5d437640a754839cc67cfa81a3269cc4ee4fefa8a6b 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
||||
5b3e6875725b0a63666af7709e55154774045f1e03ef7e8620cf3cf9d50bfd852259b26e8f072613e02b106c0a09834f6223f21084362ff6a7697ba874ab1a14 0019-aarch64-disable-multilib-support.patch
|
||||
bc7790e9012985d8f2147476d57f580e966b83323b596914575518d80db51c27bd7080116ff6aef91fcf0de6712f4710a32f1c272c7fc927f0f8a4ee90fc547b 0020-s390x-disable-multilib-support.patch
|
||||
4284db01201fa1e9cebda4098b61b0c9c0319f86e0870e26e991df4b902cef6381b032f4ba83ba4e6b2537b2e14bf6e1069bba8a55054d70421769fbca3a5d80 0021-ppc64-le-disable-multilib-support.patch
|
||||
a151bd420781dae743c3406657d111a226e3170b258d7a0ce32c7c959c8702d504249222071e329c24dc74ebdcd9fafd36cb5a15d153714c6fc52e9b399353cb 0022-x86_64-disable-multilib-support.patch
|
||||
59a32ab970d83a7be15e75be73dcbf760df1a16768568ab8bfdb7519b97b53096cb9f9db5fbefe01c23957bb5f84f89eb44df3bd09ec168ab0dfb49036246b04 0023-riscv-disable-multilib-support.patch
|
||||
e083d4fdfdc22d318d8cb75c7b7ec9b1426cb0a4b66c35766a0c59aab0151a69cc40a58041ef7b2475e6c6c7d7130fbe8898f04b28008cec36076ed9b74f8b3e 0024-always-build-libgcc_eh.a.patch
|
||||
c3c3f80d48d79a8ea182d6b193cbc9334a04f8620bf53f44c7a1016a184c0113754d25c8ab912fae7c985147454f3c3dcaea05de05f9232bfa44b377a7740ebb 0025-ada-libgnarl-compatibility-for-musl.patch
|
||||
8f7392f6339488916b94ef5bae8e13991462b8ea4ce8317eb7b70eac59785b0a68fae26fee5b819e2889a365e512693a650f33c59848537568798b859884ad17 0026-ada-musl-support-fixes.patch
|
||||
8198c2761551912e286d4cbe8d9f3feadc63cba1cb03f9fec739b8127643714b559fbaa8d16f6f9605836cc660dbdd10d4d2cdf322418a9b135a03b79577e58e 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
||||
65410e7eb0e9cfb202570365cac76ba951ec52332a02d16bfece10e4f90ea1c2feccc0aee8d3b57ec36c3d83dc3e48b80c077458106dc031fc4b9a9fe7386466 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
||||
023b3f79edd904a2fdafa903288626467aba43777ab40b53875fc3fb126a64af24b772ae06266afe93aa09f594c494b6e2c3b4d94eb9da724bb130978242a07c 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
||||
f37af328cf6562aaed7d3c8a62f4cc9bcd7b858d862e6a7cd9e6f5d8710578cf77c78bfe153b7a736cc1881b5534cd98f99065f821ae961e64840d360966c669 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
||||
8f5fd0aa921c3fb34bc268a76dea34f6db0dcf120b9c72dce8e691e880fc404f6881d73d0ea20620703da8720fff769215df3bbb679fd32eff78a27fc40a3366 0031-druntime-link-against-libucontext-on-all-platforms.patch
|
||||
00f1d6434bd8bc2baaad58f3d739e771fd2738af7c86f0ea1a99a70b71153b78d586b3e098cc7a5cdd06b515d70e32acb2b239a0bb3b96078af7a0e52be9d6aa 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
||||
5ee4a721f27908c9f9352f7f0de46f36d6464548b9524c7f45ca92c159966481782182022f2270ef690a1828270bbb9879111cc62b080e5314a235aa83d409e3 0033-libphobos-do-not-use-LFS64-symbols.patch
|
||||
"
|
||||
@@ -1,14 +1,14 @@
|
||||
From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001
|
||||
From 3e5acbe356124aa5d8dde0635d652c065a553e7d Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Fri, 26 Jan 2018 20:32:50 +0000
|
||||
Subject: [PATCH] posix_memalign
|
||||
Subject: [PATCH 01/33] posix_memalign
|
||||
|
||||
---
|
||||
gcc/config/i386/pmm_malloc.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
|
||||
index 3b2e4f47915..20f790904a2 100644
|
||||
index 3527283693b..c4071b64b53 100644
|
||||
--- a/gcc/config/i386/pmm_malloc.h
|
||||
+++ b/gcc/config/i386/pmm_malloc.h
|
||||
@@ -27,12 +27,13 @@
|
||||
@@ -37,3 +37,6 @@ index 3b2e4f47915..20f790904a2 100644
|
||||
return __ptr;
|
||||
else
|
||||
return NULL;
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dd1e75ff4ecda96957465b34681f245e818928bd Mon Sep 17 00:00:00 2001
|
||||
From f986a4a1224fa7d452b415d690aead8d356a7eae Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 29 Mar 2013 08:59:00 +0400
|
||||
Subject: [PATCH] gcc: poison-system-directories
|
||||
Subject: [PATCH 02/33] gcc: poison-system-directories
|
||||
|
||||
Add /sw/include and /opt/include based on the original
|
||||
zecke-no-host-includes.patch patch. The original patch checked for
|
||||
@@ -26,10 +26,10 @@ Upstream-Status: Pending
|
||||
7 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 8a0dafc522d..0357868e22c 100644
|
||||
index 862c474d3c8..64c4277c991 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -710,6 +710,10 @@ Wreturn-local-addr
|
||||
@@ -711,6 +711,10 @@ Wreturn-local-addr
|
||||
Common Var(warn_return_local_addr) Init(1) Warning
|
||||
Warn about returning a pointer/reference to a local or temporary variable.
|
||||
|
||||
@@ -41,10 +41,10 @@ index 8a0dafc522d..0357868e22c 100644
|
||||
Common Var(warn_shadow) Warning
|
||||
Warn when one variable shadows another. Same as -Wshadow=global.
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index 64c27c9cfac..f0fbf123aa8 100644
|
||||
index 4cad077bfbe..0679fbbf4c6 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -230,6 +230,12 @@
|
||||
@@ -236,6 +236,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ index 64c27c9cfac..f0fbf123aa8 100644
|
||||
optimizer and back end) to be checked for dynamic type safety at runtime.
|
||||
This is quite expensive. */
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 5ce0557719a..e9060112384 100755
|
||||
index c7b26d1927d..8c46369f73f 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -1023,6 +1023,7 @@ enable_maintainer_mode
|
||||
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
|
||||
enable_link_mutex
|
||||
enable_link_serialization
|
||||
enable_version_specific_runtime_libs
|
||||
@@ -69,7 +69,7 @@ index 5ce0557719a..e9060112384 100755
|
||||
enable_plugin
|
||||
enable_host_shared
|
||||
enable_libquadmath_support
|
||||
@@ -1785,6 +1786,8 @@ Optional Features:
|
||||
@@ -1788,6 +1789,8 @@ Optional Features:
|
||||
--enable-version-specific-runtime-libs
|
||||
specify that runtime libraries should be installed
|
||||
in a compiler-specific directory
|
||||
@@ -78,7 +78,7 @@ index 5ce0557719a..e9060112384 100755
|
||||
--enable-plugin enable plugin support
|
||||
--enable-host-shared build host code as shared libraries
|
||||
--disable-libquadmath-support
|
||||
@@ -31982,6 +31985,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ index 5ce0557719a..e9060112384 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 23bee7010a3..75a7048045c 100644
|
||||
index 09082e8ccae..5504bf6eb01 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7421,6 +7421,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
[specify that runtime libraries should be
|
||||
installed in a compiler-specific directory])])
|
||||
|
||||
@@ -120,37 +120,37 @@ index 23bee7010a3..75a7048045c 100644
|
||||
AC_SUBST(subdirs)
|
||||
AC_SUBST(srcdir)
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 07b440190c3..b2de464798a 100644
|
||||
index c0c3ad14515..7cdd5bfa952 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
|
||||
-Wparentheses -Wno-pedantic-ms-format @gol
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
|
||||
+-Wno-poison-system-directories @gol
|
||||
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
|
||||
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
|
||||
-Wno-scalar-storage-order -Wsequence-point @gol
|
||||
@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
|
||||
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
|
||||
-Wparentheses -Wno-pedantic-ms-format
|
||||
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
|
||||
+-Wno-poison-system-directories
|
||||
-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
|
||||
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.
|
||||
|
||||
+@item -Wno-poison-system-directories
|
||||
+@opindex Wno-poison-system-directories
|
||||
+@item -Wno-poison-system-directories
|
||||
+Do not warn for @option{-I} or @option{-L} options using system
|
||||
+directories such as @file{/usr/include} when cross compiling. This
|
||||
+option is intended for use in chroot environments when such
|
||||
+directories contain the correct headers and libraries for the target
|
||||
+system rather than the host.
|
||||
+
|
||||
@item -Wfloat-equal
|
||||
@opindex Wfloat-equal
|
||||
@opindex Wno-float-equal
|
||||
@item -Wfloat-equal
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index bb07cc244e3..47fb5802194 100644
|
||||
index 16bb07f2cdc..33b56e721d2 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1159,6 +1159,8 @@ proper position among the other output files. */
|
||||
@@ -1146,6 +1146,8 @@ proper position among the other output files. */
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
@@ -160,7 +160,7 @@ index bb07cc244e3..47fb5802194 100644
|
||||
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
|
||||
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
|
||||
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
|
||||
index bd2a97938eb..c80f100f476 100644
|
||||
index 4d44321183f..0f3f071b44c 100644
|
||||
--- a/gcc/incpath.cc
|
||||
+++ b/gcc/incpath.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -198,3 +198,6 @@ index bd2a97938eb..c80f100f476 100644
|
||||
}
|
||||
|
||||
/* Use given -I paths for #include "..." but not #include <...>, and
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001
|
||||
From 31e2b60000e779ef775daa306120eabcf987852a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:45:49 +0000
|
||||
Subject: [PATCH] specs: turn on -Wl,-z,now by default
|
||||
Subject: [PATCH 03/33] 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,24 +14,24 @@ now by default.
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index b2de464798a..83bd1bde433 100644
|
||||
index 7cdd5bfa952..158b7bcb81e 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
|
||||
linker. When using the GNU linker, you can also get the same effect with
|
||||
@option{-Wl,-Map=output.map}.
|
||||
|
||||
+NOTE: In Alpine Linux, for LDFLAGS, the option
|
||||
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
|
||||
+
|
||||
@item -u @var{symbol}
|
||||
@opindex u
|
||||
@item -u @var{symbol}
|
||||
Pretend the symbol @var{symbol} is undefined, to force linking of
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 47fb5802194..d18b5d7b59a 100644
|
||||
index 33b56e721d2..f82fae23c22 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1157,6 +1157,7 @@ proper position among the other output files. */
|
||||
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
|
||||
"%{flto|flto=*:%<fcompare-debug*} \
|
||||
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
|
||||
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
|
||||
@@ -39,3 +39,6 @@ index 47fb5802194..d18b5d7b59a 100644
|
||||
"%X %{o*} %{e*} %{N} %{n} %{r}\
|
||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
|
||||
%{Wno-poison-system-directories:--no-poison-system-directories} \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001
|
||||
From 3b910da7d1e81bdd953e6d9ec82020e7b120353b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:22 +0000
|
||||
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
ObjC++, if the optimization level is > 0
|
||||
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
|
||||
ObjC, ObjC++, if the optimization level is > 0
|
||||
|
||||
---
|
||||
gcc/c-family/c-cppbuiltin.cc | 4 ++++
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
|
||||
index 4672ae8486a..573c021e1e8 100644
|
||||
index 5d64625fcd7..868d69506e4 100644
|
||||
--- a/gcc/c-family/c-cppbuiltin.cc
|
||||
+++ b/gcc/c-family/c-cppbuiltin.cc
|
||||
@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
|
||||
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
|
||||
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
|
||||
|
||||
@@ -25,10 +25,10 @@ index 4672ae8486a..573c021e1e8 100644
|
||||
if (flag_gnu89_inline)
|
||||
cpp_define (pfile, "__GNUC_GNU_INLINE__");
|
||||
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
||||
index 83bd1bde433..dda299a9987 100644
|
||||
index 158b7bcb81e..cc9972f907b 100644
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10896,6 +10896,12 @@ also turns on the following optimization flags:
|
||||
@@ -11866,6 +11866,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.
|
||||
|
||||
@@ -38,6 +38,9 @@ index 83bd1bde433..dda299a9987 100644
|
||||
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
|
||||
+@option{-D_FORTIFY_SOURCE=0}.
|
||||
+
|
||||
@item -O3
|
||||
@opindex O3
|
||||
@item -O3
|
||||
Optimize yet more. @option{-O3} turns on all optimizations specified
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 75d1a35180cf0967f062765314bf091a64032062 Mon Sep 17 00:00:00 2001
|
||||
From 9c3a2882b1932296ccb1d0ed2900cf046f998a26 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
but always link the sanitizer libraries with --no-as-needed.
|
||||
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
|
||||
linker, but always link the sanitizer libraries with --no-as-needed.
|
||||
|
||||
---
|
||||
gcc/config/aarch64/aarch64-linux.h | 1 +
|
||||
@@ -22,7 +22,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
14 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
|
||||
index 5e4553d79f5..b516f3ef97f 100644
|
||||
index 4277f03da2a..b131983a546 100644
|
||||
--- a/gcc/config/aarch64/aarch64-linux.h
|
||||
+++ b/gcc/config/aarch64/aarch64-linux.h
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -34,7 +34,7 @@ index 5e4553d79f5..b516f3ef97f 100644
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
|
||||
index 17f16a55910..9ec667e9a5e 100644
|
||||
index 03f783f2ad1..d946e700dda 100644
|
||||
--- a/gcc/config/alpha/linux-elf.h
|
||||
+++ b/gcc/config/alpha/linux-elf.h
|
||||
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -47,7 +47,7 @@ index 17f16a55910..9ec667e9a5e 100644
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
|
||||
index df3da67c4f0..7532bc29f9b 100644
|
||||
index 7b7b7cbbe14..49c050c6f2c 100644
|
||||
--- a/gcc/config/arm/linux-elf.h
|
||||
+++ b/gcc/config/arm/linux-elf.h
|
||||
@@ -70,6 +70,7 @@
|
||||
@@ -59,7 +59,7 @@ index df3da67c4f0..7532bc29f9b 100644
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 857c0e077bf..8433e56c3e1 100644
|
||||
index eda8010b133..b26b17f2f2a 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -69,9 +69,9 @@ index 857c0e077bf..8433e56c3e1 100644
|
||||
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
|
||||
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
|
||||
#undef LIBHWASAN_EARLY_SPEC
|
||||
#define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \
|
||||
@@ -145,12 +145,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
|
||||
"%{static-libhwasan:%{!shared:" \
|
||||
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
|
||||
"%{static-libtsan:%{!shared:" \
|
||||
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
|
||||
@@ -87,7 +87,7 @@ index 857c0e077bf..8433e56c3e1 100644
|
||||
|
||||
#undef TARGET_F951_OPTIONS
|
||||
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
|
||||
index 0102b2a6f3b..994414c1845 100644
|
||||
index a79b739089d..e0752673dff 100644
|
||||
--- a/gcc/config/i386/gnu-user.h
|
||||
+++ b/gcc/config/i386/gnu-user.h
|
||||
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -100,7 +100,7 @@ index 0102b2a6f3b..994414c1845 100644
|
||||
%{!static: \
|
||||
%{!static-pie: \
|
||||
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
|
||||
index abc8cf624ca..fe656aeae27 100644
|
||||
index 3b63b99acf6..759bf0db86f 100644
|
||||
--- a/gcc/config/i386/gnu-user64.h
|
||||
+++ b/gcc/config/i386/gnu-user64.h
|
||||
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -112,7 +112,7 @@ index abc8cf624ca..fe656aeae27 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
|
||||
index 93510098ccc..3813e536423 100644
|
||||
index 5dfd428aa17..02656dad7fc 100644
|
||||
--- a/gcc/config/ia64/linux.h
|
||||
+++ b/gcc/config/ia64/linux.h
|
||||
@@ -58,7 +58,7 @@ do { \
|
||||
@@ -125,7 +125,7 @@ index 93510098ccc..3813e536423 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
|
||||
index 6aad7192e69..e1256a55add 100644
|
||||
index a4e5380b589..3cc61bce69f 100644
|
||||
--- a/gcc/config/mips/gnu-user.h
|
||||
+++ b/gcc/config/mips/gnu-user.h
|
||||
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -137,10 +137,10 @@ index 6aad7192e69..e1256a55add 100644
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 38803723ba9..3067ed6eac8 100644
|
||||
index 2fdfd930cf2..16503482ec2 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
"%{mabi=ilp32:_ilp32}"
|
||||
|
||||
#define LINK_SPEC "\
|
||||
@@ -149,7 +149,7 @@ index 38803723ba9..3067ed6eac8 100644
|
||||
%{mno-relax:--no-relax} \
|
||||
%{mbig-endian:-EB} \
|
||||
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
|
||||
index b2a7afabc73..34ceb4e4fce 100644
|
||||
index 9e457033d11..08016bf224d 100644
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -377,13 +377,13 @@ extern int dot_symbols;
|
||||
@@ -169,10 +169,10 @@ index b2a7afabc73..34ceb4e4fce 100644
|
||||
%{rdynamic:-export-dynamic} \
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
|
||||
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
|
||||
index 7e2519de5d4..61215a7a1b3 100644
|
||||
index ae932fc22f0..c8ff0c6dc8e 100644
|
||||
--- a/gcc/config/rs6000/sysv4.h
|
||||
+++ b/gcc/config/rs6000/sysv4.h
|
||||
@@ -788,7 +788,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
|
||||
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
|
||||
#endif
|
||||
|
||||
@@ -182,7 +182,7 @@ index 7e2519de5d4..61215a7a1b3 100644
|
||||
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
|
||||
|
||||
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
|
||||
index d7b7e7a7b02..d2287f14f2e 100644
|
||||
index 02aa1edaff8..64df5801134 100644
|
||||
--- a/gcc/config/s390/linux.h
|
||||
+++ b/gcc/config/s390/linux.h
|
||||
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -195,7 +195,7 @@ index d7b7e7a7b02..d2287f14f2e 100644
|
||||
%{!shared: \
|
||||
%{static:-static} \
|
||||
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
|
||||
index 6a809e9092d..93bfb92d3ff 100644
|
||||
index 0e33b3cac2c..c2f44546e62 100644
|
||||
--- a/gcc/config/sparc/linux.h
|
||||
+++ b/gcc/config/sparc/linux.h
|
||||
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
@@ -208,10 +208,10 @@ index 6a809e9092d..93bfb92d3ff 100644
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index d18b5d7b59a..3b76311b544 100644
|
||||
index f82fae23c22..da6417dd0d1 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -744,8 +744,11 @@ proper position among the other output files. */
|
||||
@@ -754,8 +754,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBASAN_EARLY_SPEC
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -225,7 +225,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -780,8 +783,11 @@ proper position among the other output files. */
|
||||
@@ -790,8 +793,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBTSAN_EARLY_SPEC
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -239,7 +239,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -798,8 +804,11 @@ proper position among the other output files. */
|
||||
@@ -808,8 +814,11 @@ proper position among the other output files. */
|
||||
#ifdef LIBLSAN_EARLY_SPEC
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
@@ -253,7 +253,7 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -814,8 +823,11 @@ proper position among the other output files. */
|
||||
@@ -824,8 +833,11 @@ proper position among the other output files. */
|
||||
#define STATIC_LIBUBSAN_LIBS \
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
@@ -267,3 +267,6 @@ index d18b5d7b59a..3b76311b544 100644
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001
|
||||
From 288cb2be3abe07dcf2737ed3ac07e93573262bc4 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
|
||||
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
---
|
||||
gcc/c-family/c.opt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
|
||||
index 07da40ef43b..8683f706426 100644
|
||||
index a75038930ae..b98726f33ed 100644
|
||||
--- a/gcc/c-family/c.opt
|
||||
+++ b/gcc/c-family/c.opt
|
||||
@@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end
|
||||
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
|
||||
of the destination region. Same as -Wformat-overflow=1.
|
||||
|
||||
Wformat-security
|
||||
@@ -20,7 +20,7 @@ index 07da40ef43b..8683f706426 100644
|
||||
Warn about possible security problems with format functions.
|
||||
|
||||
Wformat-signedness
|
||||
@@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
||||
Warn about zero-length formats.
|
||||
|
||||
Wformat=
|
||||
@@ -29,3 +29,6 @@ index 07da40ef43b..8683f706426 100644
|
||||
Warn about printf/scanf/strftime/strfmon format string anomalies.
|
||||
|
||||
Wformat-overflow=
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From e4d0ec43e772b6dc7c3708aed5309897df26a125 Mon Sep 17 00:00:00 2001
|
||||
From 93e44f7c7b1f11c1f714d6c384b0d39a191ac18a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:48:24 +0000
|
||||
Subject: [PATCH] Enable -Wtrampolines by default.
|
||||
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
|
||||
|
||||
---
|
||||
gcc/common.opt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||
index 0357868e22c..6d5e5eebe60 100644
|
||||
index 64c4277c991..c24839d32bc 100644
|
||||
--- a/gcc/common.opt
|
||||
+++ b/gcc/common.opt
|
||||
@@ -802,7 +802,7 @@ Common Var(warn_system_headers) Warning
|
||||
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers.
|
||||
|
||||
Wtrampolines
|
||||
@@ -20,3 +20,6 @@ index 0357868e22c..6d5e5eebe60 100644
|
||||
Warn whenever a trampoline is generated.
|
||||
|
||||
Wtrivial-auto-var-init
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 27e5d5bd3fed9006a2958d2b09750d15ad07383b Mon Sep 17 00:00:00 2001
|
||||
From 7aa93d6d9a63c7bedf1e033f6d040e95038537e7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:49:40 +0000
|
||||
Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
Change the buffer size.
|
||||
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
|
||||
-ffreestanding Change the buffer size.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 8 +++++++-
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 3b76311b544..cc99d0b7aa1 100644
|
||||
index da6417dd0d1..b5a6f200635 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -996,6 +996,12 @@ proper position among the other output files. */
|
||||
@@ -983,6 +983,12 @@ proper position among the other output files. */
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ index 3b76311b544..cc99d0b7aa1 100644
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
@@ -1295,7 +1301,7 @@ static const char *cc1_options =
|
||||
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
|
||||
%{-version:--version}\
|
||||
%{-help=*:--help=%*}\
|
||||
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
|
||||
@@ -36,10 +36,10 @@ index 3b76311b544..cc99d0b7aa1 100644
|
||||
%{fprofile-arcs|fprofile-generate*|coverage:\
|
||||
%{!fprofile-update=single:\
|
||||
diff --git a/gcc/params.opt b/gcc/params.opt
|
||||
index b88e1372005..82a7e25dd2f 100644
|
||||
index 823cdb2ff85..5b096899b40 100644
|
||||
--- a/gcc/params.opt
|
||||
+++ b/gcc/params.opt
|
||||
@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
|
||||
The maximum number of SSA_NAME assignments to follow in determining a value.
|
||||
|
||||
-param=ssp-buffer-size=
|
||||
@@ -48,3 +48,6 @@ index b88e1372005..82a7e25dd2f 100644
|
||||
The lower bound for a buffer to be considered for stack smashing protection.
|
||||
|
||||
-param=stack-clash-protection-guard-size=
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 83bf2a316222e2fe0b72968cadf4e334d41173f6 Mon Sep 17 00:00:00 2001
|
||||
From e44b295b5b0b917c0b47085f60466a37f890e1c7 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
|
||||
bootstrapping.
|
||||
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
|
||||
gcc bootstrapping.
|
||||
|
||||
Solves error messages like the following:
|
||||
|
||||
@@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
|
||||
index 8f51544989e..5329804d136 100644
|
||||
index 12d34910830..61b13762b71 100644
|
||||
--- a/libstdc++-v3/po/Makefile.am
|
||||
+++ b/libstdc++-v3/po/Makefile.am
|
||||
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
|
||||
@@ -38,7 +38,7 @@ index 8f51544989e..5329804d136 100644
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
|
||||
index 243f3db7b72..822210781fa 100644
|
||||
index 8e93445acd2..d6ff06e5ddb 100644
|
||||
--- a/libstdc++-v3/po/Makefile.in
|
||||
+++ b/libstdc++-v3/po/Makefile.in
|
||||
@@ -561,6 +561,7 @@ uninstall-am:
|
||||
@@ -49,3 +49,6 @@ index 243f3db7b72..822210781fa 100644
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
all-local: all-local-$(USE_NLS)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001
|
||||
From f041dcd8f775e03b85a49e3aeef0870e2333b10e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH] Don't declare asprintf if defined as a macro.
|
||||
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
|
||||
|
||||
---
|
||||
include/libiberty.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index a65ced9c820..eb20ab0f95f 100644
|
||||
index 1d5c779fcff..19e3cb1e31c 100644
|
||||
--- a/include/libiberty.h
|
||||
+++ b/include/libiberty.h
|
||||
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
|
||||
@@ -23,3 +23,6 @@ index a65ced9c820..eb20ab0f95f 100644
|
||||
|
||||
/* Like asprintf but allocates memory without fail. This works like
|
||||
xmalloc. */
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 838e1daa955d9013c462be3471497cb39641e951 Mon Sep 17 00:00:00 2001
|
||||
From 6fc13fce114648b1a64e658b469a4697382d18bb Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH] libiberty: copy PIC objects during build process
|
||||
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
|
||||
|
||||
---
|
||||
libiberty/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 1b17c2e3a47..8db1176df2e 100644
|
||||
index 72608f3e4a7..58356884728 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
||||
@@ -19,3 +19,6 @@ index 1b17c2e3a47..8db1176df2e 100644
|
||||
cd ..; \
|
||||
else true; fi
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 048c394eb709bfd216e307c1b92ac7f8a7e7758b Mon Sep 17 00:00:00 2001
|
||||
From 6a1955bbf49836ad99b23501f42283842e01761b Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH] libgcc_s
|
||||
Subject: [PATCH 12/33] libgcc_s
|
||||
|
||||
---
|
||||
gcc/config/i386/i386-expand.cc | 4 ++--
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] libgcc_s
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
|
||||
index 31780b6daf7..d89898846e1 100644
|
||||
index 0d817fc3f3b..2e99db00db9 100644
|
||||
--- a/gcc/config/i386/i386-expand.cc
|
||||
+++ b/gcc/config/i386/i386-expand.cc
|
||||
@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
|
||||
{
|
||||
case IX86_BUILTIN_CPU_INIT:
|
||||
{
|
||||
@@ -27,7 +27,7 @@ index 31780b6daf7..d89898846e1 100644
|
||||
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
|
||||
}
|
||||
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
|
||||
index dab1d98060f..cf824b4114a 100644
|
||||
index 50b6d8248a2..724ced402a1 100644
|
||||
--- a/libgcc/config/i386/cpuinfo.c
|
||||
+++ b/libgcc/config/i386/cpuinfo.c
|
||||
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
|
||||
@@ -52,3 +52,6 @@ index 8506a635790..564296f788e 100644
|
||||
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
|
||||
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
|
||||
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 717346fbbd6642ba6b0c3af2deb3771794346507 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:36 +0000
|
||||
Subject: [PATCH] libitm: disable FORTIFY
|
||||
|
||||
---
|
||||
libitm/configure.tgt | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
|
||||
index 06e90973ef3..669e64236c3 100644
|
||||
--- a/libitm/configure.tgt
|
||||
+++ b/libitm/configure.tgt
|
||||
@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
+# FIXME: error: inlining failed in call to always_inline
|
||||
+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’
|
||||
+# : function body can be overwritten at link time
|
||||
+# Disable Fortify in libitm for now. #508852
|
||||
+case "${target}" in
|
||||
+ *-*-linux*)
|
||||
+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
# Map the target cpu to an ARCH sub-directory. At the same time,
|
||||
# work out any special compilation flags as necessary.
|
||||
case "${target_cpu}" in
|
||||
@@ -1,7 +1,7 @@
|
||||
From db28b1e0f3b06325026ec5b5e7cdca4e9992e05c Mon Sep 17 00:00:00 2001
|
||||
From 558e95aa2b0f3bbf416e1bb572e5f47bddc8601c Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH] nopie
|
||||
Subject: [PATCH 13/33] nopie
|
||||
|
||||
---
|
||||
gcc/configure | 27 +++++++++++++++++++++++++++
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] nopie
|
||||
2 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index e9060112384..2f6b3265a6c 100755
|
||||
index 8c46369f73f..e59cbee1767 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -32497,6 +32497,33 @@ fi
|
||||
@@ -32268,6 +32268,33 @@ fi
|
||||
$as_echo "$gcc_cv_no_pie" >&6; }
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -47,10 +47,10 @@ index e9060112384..2f6b3265a6c 100755
|
||||
|
||||
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 75a7048045c..e683d3a7a5f 100644
|
||||
index 5504bf6eb01..57268319de1 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -7681,6 +7681,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
@@ -7552,6 +7552,19 @@ AC_CACHE_CHECK([for -no-pie option],
|
||||
LDFLAGS="$saved_LDFLAGS"])
|
||||
if test "$gcc_cv_no_pie" = "yes"; then
|
||||
NO_PIE_FLAG="-no-pie"
|
||||
@@ -70,3 +70,6 @@ index 75a7048045c..e683d3a7a5f 100644
|
||||
fi
|
||||
AC_SUBST([NO_PIE_FLAG])
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,14 +1,14 @@
|
||||
From fd642f8cd61849a9dc169588be5562ceda96a889 Mon Sep 17 00:00:00 2001
|
||||
From ecad19db42776c536bd4f6033ec1891ffae03720 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH] ada: fix shared linking
|
||||
Subject: [PATCH 14/33] ada: fix shared linking
|
||||
|
||||
---
|
||||
gcc/ada/link.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
|
||||
index a7574efb472..0ad0d66463c 100644
|
||||
index f2126441208..22cfa9c641f 100644
|
||||
--- a/gcc/ada/link.c
|
||||
+++ b/gcc/ada/link.c
|
||||
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|
||||
@@ -37,3 +37,6 @@ index a7574efb472..0ad0d66463c 100644
|
||||
int __gnat_link_max = 8192;
|
||||
unsigned char __gnat_objlist_file_supported = 1;
|
||||
const char *__gnat_object_library_extension = ".a";
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,17 +1,17 @@
|
||||
From a547632f5c7caec4a164e8d5e5b568fb7a461365 Mon Sep 17 00:00:00 2001
|
||||
From 8500b4cdd039c16a02a8acabd124b92865871979 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 593495e1650..b96f60e33e2 100644
|
||||
index 06a9398e172..6ff2b3f9925 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
|
||||
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
|
||||
# built for the build system to override those in BASE_FLAGS_TO_PASS.
|
||||
EXTRA_BUILD_FLAGS = \
|
||||
CFLAGS="$(CFLAGS_FOR_BUILD)" \
|
||||
@@ -19,3 +19,6 @@ index 593495e1650..b96f60e33e2 100644
|
||||
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
|
||||
|
||||
# This is the list of directories to built for the host system.
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 686e85d8a05f9f9e6c983afb13f937bd88fe84dd Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:18:32 +0000
|
||||
Subject: [PATCH] dlang: use libucontext on mips64
|
||||
|
||||
---
|
||||
libphobos/configure.tgt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
|
||||
index 0063dd23249..c5e782a1238 100644
|
||||
--- a/libphobos/configure.tgt
|
||||
+++ b/libphobos/configure.tgt
|
||||
@@ -38,6 +38,7 @@ case "${target}" in
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
|
||||
;;
|
||||
power*-*-freebsd*)
|
||||
LIBPHOBOS_SUPPORTED=yes
|
||||
+7
-4
@@ -1,17 +1,17 @@
|
||||
From 5bd37f8ee93a0fe1a3f841f48ed6626e7e0aa19d Mon Sep 17 00:00:00 2001
|
||||
From e893ad827215a7c090a835e20a81559f4044fb47 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH] add fortify-headers paths
|
||||
Subject: [PATCH 16/33] add fortify-headers paths
|
||||
|
||||
---
|
||||
gcc/config/linux.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
|
||||
index 74f70793d90..61b07f319f6 100644
|
||||
index e3aca79cccc..b3537b8fbeb 100644
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -172,6 +172,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
#ifdef NATIVE_SYSTEM_HEADER_DIR
|
||||
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
|
||||
@@ -20,3 +20,6 @@ index 74f70793d90..61b07f319f6 100644
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
|
||||
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
|
||||
#else
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+10
-7
@@ -1,11 +1,11 @@
|
||||
From d2577dc78a1f159e5c41fd0b53e73fa0e264cb52 Mon Sep 17 00:00:00 2001
|
||||
From 064afc74f18f2a00771fc2600029a713b8708845 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
||||
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
it unconditionally, as otherwise we get link failures if some objects are
|
||||
-fstack-protector built and final link happens with -fno-stack-protector.
|
||||
Subject: [PATCH 17/33] Alpine musl package provides libssp_nonshared.a. We
|
||||
link to it unconditionally, as otherwise we get link failures if some objects
|
||||
are -fstack-protector built and final link happens with -fno-stack-protector.
|
||||
This seems to be the common case when bootstrapping gcc, the piepatches do
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
stack-protector flag usage.
|
||||
|
||||
---
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index cc99d0b7aa1..c60a75371f8 100644
|
||||
index b5a6f200635..6cbb726599b 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -1004,8 +1004,7 @@ proper position among the other output files. */
|
||||
@@ -991,8 +991,7 @@ proper position among the other output files. */
|
||||
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
@@ -26,3 +26,6 @@ index cc99d0b7aa1..c60a75371f8 100644
|
||||
#else
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
"|fstack-protector-strong|fstack-protector-explicit" \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+10
-7
@@ -1,7 +1,7 @@
|
||||
From bbd5c529ef878c2d6096fd4949616714eb82683a Mon Sep 17 00:00:00 2001
|
||||
From 45a98ce1f1702424aba4271f7f7570e43a354101 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
|
||||
linking libtsan.
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index c60a75371f8..735b2b1bba1 100644
|
||||
index 6cbb726599b..59390fd39d6 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -745,10 +745,10 @@ proper position among the other output files. */
|
||||
@@ -755,10 +755,10 @@ proper position among the other output files. */
|
||||
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
|
||||
@@ -25,7 +25,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBASAN_LIBS
|
||||
#else
|
||||
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
|
||||
@@ -784,10 +784,10 @@ proper position among the other output files. */
|
||||
@@ -794,10 +794,10 @@ proper position among the other output files. */
|
||||
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -38,7 +38,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBTSAN_LIBS
|
||||
#else
|
||||
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
|
||||
@@ -805,10 +805,10 @@ proper position among the other output files. */
|
||||
@@ -815,10 +815,10 @@ proper position among the other output files. */
|
||||
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
|
||||
#elif defined(HAVE_LD_STATIC_DYNAMIC)
|
||||
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -51,7 +51,7 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBLSAN_LIBS
|
||||
#else
|
||||
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
|
||||
@@ -824,10 +824,10 @@ proper position among the other output files. */
|
||||
@@ -834,10 +834,10 @@ proper position among the other output files. */
|
||||
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
|
||||
#ifdef HAVE_LD_STATIC_DYNAMIC
|
||||
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
|
||||
@@ -64,3 +64,6 @@ index c60a75371f8..735b2b1bba1 100644
|
||||
STATIC_LIBUBSAN_LIBS
|
||||
#else
|
||||
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From 8fc8d6c26a2a45945182e211bc3ac2eae4d6a11b Mon Sep 17 00:00:00 2001
|
||||
From 6a2e902dc8abcfd44522b9224fd759d038db51f5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH] aarch64: disable multilib support
|
||||
Subject: [PATCH 19/33] aarch64: disable multilib support
|
||||
|
||||
multilib is unsupported on Alpine GCC
|
||||
---
|
||||
@@ -9,7 +9,7 @@ multilib is unsupported on Alpine GCC
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
|
||||
index d0cd546002a..b63a77f4969 100644
|
||||
index 57bf4100fcd..172894b57ef 100644
|
||||
--- a/gcc/config/aarch64/t-aarch64-linux
|
||||
+++ b/gcc/config/aarch64/t-aarch64-linux
|
||||
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
|
||||
@@ -21,3 +21,6 @@ index d0cd546002a..b63a77f4969 100644
|
||||
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
|
||||
|
||||
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+5
-2
@@ -1,7 +1,7 @@
|
||||
From 65ad898df141261a1ccd891a99133ad8f9847133 Mon Sep 17 00:00:00 2001
|
||||
From 6e7c72ee05353a284d9c9809035e7ff488b4b8c1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH] s390x: disable multilib support
|
||||
Subject: [PATCH 20/33] s390x: disable multilib support
|
||||
|
||||
multilib is not supported on Alpine GCC at present
|
||||
---
|
||||
@@ -20,3 +20,6 @@ index cc6ab367072..7f498ee1cdc 100644
|
||||
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
From 714ed6d9649bf9ed42e34fef9c41169921e63921 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Andreas Svee <me@lochnair.net>
|
||||
Date: Thu, 21 Dec 2017 03:14:33 +0100
|
||||
Subject: [PATCH] mips64: disable multilib support
|
||||
|
||||
multilib is not supported by Alpine GCC
|
||||
---
|
||||
gcc/config/mips/mips.h | 8 ++++----
|
||||
gcc/config/mips/t-linux64 | 6 +++---
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
|
||||
index 858bbba3a36..2d4f553e652 100644
|
||||
--- a/gcc/config/mips/mips.h
|
||||
+++ b/gcc/config/mips/mips.h
|
||||
@@ -3447,11 +3447,11 @@ struct GTY(()) machine_function {
|
||||
/* If we are *not* using multilibs and the default ABI is not ABI_32 we
|
||||
need to change these from /lib and /usr/lib. */
|
||||
#if MIPS_ABI_DEFAULT == ABI_N32
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib32/"
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#elif MIPS_ABI_DEFAULT == ABI_64
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib64/"
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#endif
|
||||
|
||||
/* Load store bonding is not supported by micromips and fix_24k. The
|
||||
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
|
||||
index 2fdd8e00407..406a3676289 100644
|
||||
--- a/gcc/config/mips/t-linux64
|
||||
+++ b/gcc/config/mips/t-linux64
|
||||
@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
|
||||
MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
|
||||
MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
|
||||
MULTILIB_OSDIRNAMES = \
|
||||
- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
|
||||
- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
|
||||
- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
|
||||
+ ../lib \
|
||||
+ ../lib32 \
|
||||
+ ../lib
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From 3263d8634da6d7e1edb1bfd88e1b2627ce0aa1be Mon Sep 17 00:00:00 2001
|
||||
From 44655aa3be8d5354fb82a42317a9ac6ac1b50164 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH] ppc64[le]: disable multilib support
|
||||
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
@@ -36,7 +36,7 @@ index 4e371255533..128c75c7d39 100644
|
||||
endif
|
||||
|
||||
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
|
||||
index 47e0efd5764..f89729af64f 100644
|
||||
index 01a94242308..b3a76379c03 100644
|
||||
--- a/gcc/config/rs6000/t-linux64
|
||||
+++ b/gcc/config/rs6000/t-linux64
|
||||
@@ -28,8 +28,8 @@
|
||||
@@ -76,3 +76,6 @@ index 2e63bdb9fc9..c6e1c5db65d 100644
|
||||
+MULTILIB_OSDIRNAMES := m64=../lib
|
||||
+MULTILIB_OSDIRNAMES += m32=../lib32
|
||||
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
From bf63353ea679e0bbf2c2f17bb64c75ebd590c6e7 Mon Sep 17 00:00:00 2001
|
||||
From 5f79236c49bd0c2c36440f0ef83cea02d52fcaaf Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH] x86_64: disable multilib support
|
||||
Subject: [PATCH 22/33] x86_64: disable multilib support
|
||||
|
||||
multilib is not presently supported on Alpine GCC
|
||||
---
|
||||
@@ -9,7 +9,7 @@ multilib is not presently supported on Alpine GCC
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
|
||||
index 5526ad0e6cc..78866afab36 100644
|
||||
index 138956b0962..bc03dab874f 100644
|
||||
--- a/gcc/config/i386/t-linux64
|
||||
+++ b/gcc/config/i386/t-linux64
|
||||
@@ -33,6 +33,6 @@
|
||||
@@ -21,3 +21,6 @@ index 5526ad0e6cc..78866afab36 100644
|
||||
+MULTILIB_OSDIRNAMES = m64=../lib
|
||||
+MULTILIB_OSDIRNAMES+= m32=../lib32
|
||||
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
From 2eed19787020ce52cf07b76a5d167c420ec42b61 Mon Sep 17 00:00:00 2001
|
||||
From 4605e64b3a076411f2f8134256c400eb58bcc1c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 3 Jan 2022 07:14:48 +0100
|
||||
Subject: [PATCH] riscv: disable multilib support
|
||||
Subject: [PATCH 23/33] riscv: disable multilib support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -43,10 +43,10 @@ library.
|
||||
2 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||
index 3067ed6eac8..4c8c85e3285 100644
|
||||
index 16503482ec2..8d9881eadeb 100644
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -71,9 +71,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
@@ -61,9 +61,3 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{static:-static}}"
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
@@ -69,3 +69,6 @@ index 216d2776a18..1a8a863853e 100644
|
||||
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
|
||||
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
|
||||
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+9
-6
@@ -1,7 +1,7 @@
|
||||
From 51a35c0fa0e793c6a2c64ae1449c0cfd681d8f8a Mon Sep 17 00:00:00 2001
|
||||
From a178cfeb975d79bb9b9fd877ab4c6e05d10b147e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH] always build libgcc_eh.a
|
||||
Subject: [PATCH 24/33] always build libgcc_eh.a
|
||||
|
||||
highly inspired by:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
@@ -10,10 +10,10 @@ highly inspired by:
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
index 6c4dc79ab71..023cede18a7 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),)
|
||||
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
|
||||
all: libunwind.a
|
||||
endif
|
||||
|
||||
@@ -24,7 +24,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1160,10 +1161,6 @@ install-libunwind:
|
||||
@@ -1163,10 +1164,6 @@ install-libunwind:
|
||||
install-shared:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||
|
||||
@@ -35,7 +35,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes)
|
||||
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
|
||||
endif
|
||||
|
||||
@@ -46,3 +46,6 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
|
||||
parts="$(INSTALL_PARTS)"; \
|
||||
for file in $$parts; do \
|
||||
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+7
-4
@@ -1,7 +1,7 @@
|
||||
From 64a1c5f57e278869f41c43ee56cc5defb3dd55c5 Mon Sep 17 00:00:00 2001
|
||||
From 5bc3deb9bc2679ad4f6f189a65e3643b550587a1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:06:30 +0000
|
||||
Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
|
||||
|
||||
---
|
||||
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] ada: libgnarl compatibility for musl
|
||||
2 files changed, 3 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
index 7c9e7ca4518..caafc4aa68f 100644
|
||||
index a5e645d334d..32165347071 100644
|
||||
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
|
||||
@@ -403,12 +403,6 @@ package System.OS_Interface is
|
||||
@@ -38,7 +38,7 @@ index 7c9e7ca4518..caafc4aa68f 100644
|
||||
sched_priority : int; -- scheduling priority
|
||||
end record;
|
||||
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
index 4ff784f0ea7..b34a12802c6 100644
|
||||
index 821ceef30e4..ae95b58e01e 100644
|
||||
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
|
||||
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
|
||||
@@ -130,3 +130,6 @@ index 4ff784f0ea7..b34a12802c6 100644
|
||||
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
|
||||
|
||||
pragma Assert (Result in 0 | ENOMEM);
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+23
-20
@@ -1,7 +1,7 @@
|
||||
From 82addb1312f4f58a412a664228944009aa5cb569 Mon Sep 17 00:00:00 2001
|
||||
From e1e6dccc9124e0907c5ae174d20acb3bad87e633 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:07:48 +0000
|
||||
Subject: [PATCH] ada: musl support fixes
|
||||
Subject: [PATCH 26/33] ada: musl support fixes
|
||||
|
||||
---
|
||||
gcc/ada/Makefile.rtl | 10 +++++-----
|
||||
@@ -11,10 +11,10 @@ Subject: [PATCH] ada: musl support fixes
|
||||
4 files changed, 32 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
|
||||
index aaf853e3a2a..e2dd3587ed5 100644
|
||||
index 96306f8cc9a..090b6770ae5 100644
|
||||
--- a/gcc/ada/Makefile.rtl
|
||||
+++ b/gcc/ada/Makefile.rtl
|
||||
@@ -1633,7 +1633,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
|
||||
s-intman.adb<libgnarl/s-intman__posix.adb \
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -23,7 +23,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
a-exetim.adb<libgnarl/a-exetim__posix.adb \
|
||||
a-exetim.ads<libgnarl/a-exetim__default.ads \
|
||||
s-linux.ads<libgnarl/s-linux.ads \
|
||||
@@ -2258,7 +2258,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -32,7 +32,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
system.ads<libgnat/system-linux-ppc.ads
|
||||
@@ -2289,7 +2289,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
|
||||
endif
|
||||
|
||||
# ARM linux, GNU eabi
|
||||
@@ -41,7 +41,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
LIBGNAT_TARGET_PAIRS = \
|
||||
a-intnam.ads<libgnarl/a-intnam__linux.ads \
|
||||
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
|
||||
@@ -2504,7 +2504,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -50,7 +50,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
@@ -2608,7 +2608,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
|
||||
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
|
||||
s-taspri.ads<libgnarl/s-taspri__posix.ads \
|
||||
$(TRASYM_DWARF_UNIX_PAIRS) \
|
||||
@@ -58,9 +58,9 @@ index aaf853e3a2a..e2dd3587ed5 100644
|
||||
+ s-tsmona.adb<libgnat/s-tsmona.adb \
|
||||
$(ATOMICS_TARGET_PAIRS) \
|
||||
$(X86_64_TARGET_PAIRS) \
|
||||
$(GNATRTL_128BIT_PAIRS) \
|
||||
$(SIMD_PATH_TARGET_PAIRS) \
|
||||
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
|
||||
index 591d033fbca..a485cbf15b9 100644
|
||||
index 8522094164e..92b230a462b 100644
|
||||
--- a/gcc/ada/adaint.c
|
||||
+++ b/gcc/ada/adaint.c
|
||||
@@ -91,6 +91,11 @@
|
||||
@@ -75,7 +75,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
|
||||
#ifdef __PikeOS__
|
||||
#define __BSD_VISIBLE 1
|
||||
@@ -3446,7 +3451,6 @@ __gnat_lwp_self (void)
|
||||
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
@@ -83,7 +83,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
|
||||
/* glibc versions earlier than 2.7 do not define the routines to handle
|
||||
dynamically allocated CPU sets. For these targets, we use the static
|
||||
@@ -3456,7 +3460,7 @@ __gnat_lwp_self (void)
|
||||
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
|
||||
|
||||
/* Dynamic cpu sets */
|
||||
|
||||
@@ -92,7 +92,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
__gnat_cpu_alloc (size_t count)
|
||||
{
|
||||
return CPU_ALLOC (count);
|
||||
@@ -3469,33 +3473,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -134,7 +134,7 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -3505,23 +3509,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
void
|
||||
@@ -164,10 +164,10 @@ index 591d033fbca..a485cbf15b9 100644
|
||||
#endif /* !CPU_ALLOC */
|
||||
#endif /* __linux__ */
|
||||
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
|
||||
index 2631be5ad3e..d442f4bd6cd 100644
|
||||
index 987432c9307..4d782f07de9 100644
|
||||
--- a/gcc/ada/adaint.h
|
||||
+++ b/gcc/ada/adaint.h
|
||||
@@ -321,13 +321,11 @@ extern void *__gnat_lwp_self (void);
|
||||
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
|
||||
|
||||
/* Routines for interface to required CPU set primitives */
|
||||
|
||||
@@ -186,10 +186,10 @@ index 2631be5ad3e..d442f4bd6cd 100644
|
||||
|
||||
#if defined (_WIN32)
|
||||
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
|
||||
index 32d30a49c7e..d960e32e2d0 100644
|
||||
index c0ee4a16bb1..ed796a48c1b 100644
|
||||
--- a/gcc/ada/terminals.c
|
||||
+++ b/gcc/ada/terminals.c
|
||||
@@ -1132,7 +1132,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
/* POSIX does not specify how to open the master side of a terminal.Several
|
||||
methods are available (system specific):
|
||||
1- using a cloning device (USE_CLONE_DEVICE)
|
||||
@@ -198,7 +198,7 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
3- openpty (USE_OPENPTY)
|
||||
|
||||
When using the cloning device method, the macro USE_CLONE_DEVICE should
|
||||
@@ -1146,7 +1146,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
|
||||
#if defined (__APPLE__) || defined (BSD)
|
||||
#define USE_OPENPTY
|
||||
#elif defined (__linux__)
|
||||
@@ -207,7 +207,7 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
#elif defined (__sun__)
|
||||
#define USE_CLONE_DEVICE "/dev/ptmx"
|
||||
#elif defined (_AIX)
|
||||
@@ -1195,8 +1195,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
|
||||
int master_fd = -1;
|
||||
char *slave_name = NULL;
|
||||
|
||||
@@ -218,3 +218,6 @@ index 32d30a49c7e..d960e32e2d0 100644
|
||||
#elif defined (USE_OPENPTY)
|
||||
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
|
||||
#elif defined (USE_CLONE_DEVICE)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+26
-33
@@ -1,7 +1,7 @@
|
||||
From 573a66e4146c9a65d895af9081a4d3d49cfc9e7a Mon Sep 17 00:00:00 2001
|
||||
From 9506e729f0e4f66f4018fbfc5340a568e8520264 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 16:07:26 +0000
|
||||
Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH 27/33] configure: Add --enable-autolink-libatomic, use in
|
||||
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
|
||||
|
||||
This fixes issues with RISC-V.
|
||||
@@ -9,19 +9,19 @@ This fixes issues with RISC-V.
|
||||
Makefile.in | 1 +
|
||||
gcc/config.in | 6 ++++++
|
||||
gcc/config/gnu-user.h | 12 +++++++++++-
|
||||
gcc/configure | 32 ++++++++++++++++++++++++++++++--
|
||||
gcc/configure.ac | 22 +++++++++++++++++++++-
|
||||
gcc/configure | 31 ++++++++++++++++++++++++++++++-
|
||||
gcc/configure.ac | 21 +++++++++++++++++++++
|
||||
gcc/doc/install.texi | 8 ++++++++
|
||||
gcc/doc/tm.texi | 8 +++++++-
|
||||
gcc/doc/tm.texi.in | 8 +++++++-
|
||||
gcc/gcc.cc | 12 +++++++++++-
|
||||
9 files changed, 102 insertions(+), 7 deletions(-)
|
||||
9 files changed, 102 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b564ddbf792..a95c7407d16 100644
|
||||
index 6ff2b3f9925..394b105b271 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -232,6 +232,7 @@ HOST_EXPORTS = \
|
||||
@@ -235,6 +235,7 @@ HOST_EXPORTS = \
|
||||
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
|
||||
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
|
||||
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
|
||||
@@ -30,7 +30,7 @@ index b564ddbf792..a95c7407d16 100644
|
||||
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
|
||||
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
|
||||
diff --git a/gcc/config.in b/gcc/config.in
|
||||
index f0fbf123aa8..af84efc4f9e 100644
|
||||
index 0679fbbf4c6..ee81139b385 100644
|
||||
--- a/gcc/config.in
|
||||
+++ b/gcc/config.in
|
||||
@@ -118,6 +118,12 @@
|
||||
@@ -47,7 +47,7 @@ index f0fbf123aa8..af84efc4f9e 100644
|
||||
format instead of DPD */
|
||||
#ifndef USED_FOR_TARGET
|
||||
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
|
||||
index 8433e56c3e1..0347f10da8b 100644
|
||||
index b26b17f2f2a..3f64ea46180 100644
|
||||
--- a/gcc/config/gnu-user.h
|
||||
+++ b/gcc/config/gnu-user.h
|
||||
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
@@ -71,10 +71,10 @@ index 8433e56c3e1..0347f10da8b 100644
|
||||
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
diff --git a/gcc/configure b/gcc/configure
|
||||
index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
index e59cbee1767..787c35d4e25 100755
|
||||
--- a/gcc/configure
|
||||
+++ b/gcc/configure
|
||||
@@ -981,6 +981,7 @@ with_changes_root_url
|
||||
@@ -984,6 +984,7 @@ with_changes_root_url
|
||||
enable_languages
|
||||
with_multilib_list
|
||||
with_multilib_generator
|
||||
@@ -82,7 +82,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
with_zstd
|
||||
with_zstd_include
|
||||
with_zstd_lib
|
||||
@@ -1710,6 +1711,9 @@ Optional Features:
|
||||
@@ -1713,6 +1714,9 @@ Optional Features:
|
||||
--disable-shared don't provide a shared libgcc
|
||||
--disable-gcov don't provide libgcov and related host tools
|
||||
--enable-languages=LIST specify which front-ends to build
|
||||
@@ -92,7 +92,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
--disable-rpath do not hardcode runtime library paths
|
||||
--enable-sjlj-exceptions
|
||||
arrange to use setjmp/longjmp exception handling
|
||||
@@ -8324,7 +8328,6 @@ else
|
||||
@@ -8329,7 +8333,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
# Check whether --with-multilib-generator was given.
|
||||
if test "${with_multilib_generator+set}" = set; then :
|
||||
withval=$with_multilib_generator; :
|
||||
@@ -8332,6 +8335,32 @@ else
|
||||
@@ -8337,6 +8340,32 @@ else
|
||||
with_multilib_generator=default
|
||||
fi
|
||||
|
||||
@@ -133,16 +133,11 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
|
||||
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
@@ -34296,4 +34325,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
-
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index e683d3a7a5f..07c81c78336 100644
|
||||
index 57268319de1..56bcaa87620 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -1205,6 +1205,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator,
|
||||
:,
|
||||
with_multilib_generator=default)
|
||||
|
||||
@@ -170,16 +165,11 @@ index e683d3a7a5f..07c81c78336 100644
|
||||
# -------------------------
|
||||
# Checks for other programs
|
||||
# -------------------------
|
||||
@@ -7839,4 +7860,3 @@ done
|
||||
],
|
||||
[subdirs='$subdirs'])
|
||||
AC_OUTPUT
|
||||
-
|
||||
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
|
||||
index 48408d842db..c90be0ee750 100644
|
||||
index 928fc6b6d4b..81a677014df 100644
|
||||
--- a/gcc/doc/install.texi
|
||||
+++ b/gcc/doc/install.texi
|
||||
@@ -2295,6 +2295,14 @@ files, but these changed header paths may conflict with some compilation
|
||||
@@ -2374,6 +2374,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}.
|
||||
|
||||
@@ -195,7 +185,7 @@ index 48408d842db..c90be0ee750 100644
|
||||
Tell GCC that when the GNU C Library (glibc) is used on the target it
|
||||
will be version @var{major}.@var{minor} or later. Normally this can
|
||||
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
|
||||
index c5006afc00d..56b62c69ae8 100644
|
||||
index a660e33739b..6183c407a2b 100644
|
||||
--- a/gcc/doc/tm.texi
|
||||
+++ b/gcc/doc/tm.texi
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
@@ -214,7 +204,7 @@ index c5006afc00d..56b62c69ae8 100644
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
|
||||
index f869ddd5e5b..57c93f24ac3 100644
|
||||
index f7ab5d48a63..281540aba68 100644
|
||||
--- a/gcc/doc/tm.texi.in
|
||||
+++ b/gcc/doc/tm.texi.in
|
||||
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
|
||||
@@ -233,10 +223,10 @@ index f869ddd5e5b..57c93f24ac3 100644
|
||||
|
||||
@defmac POST_LINK_SPEC
|
||||
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
|
||||
index 735b2b1bba1..f10f3c91aa7 100644
|
||||
index 59390fd39d6..dae1dd4cf79 100644
|
||||
--- a/gcc/gcc.cc
|
||||
+++ b/gcc/gcc.cc
|
||||
@@ -987,13 +987,23 @@ proper position among the other output files. */
|
||||
@@ -974,13 +974,23 @@ proper position among the other output files. */
|
||||
# define ASM_DEBUG_OPTION_SPEC ""
|
||||
#endif
|
||||
|
||||
@@ -261,3 +251,6 @@ index 735b2b1bba1..f10f3c91aa7 100644
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEFAULT_SSP
|
||||
--
|
||||
2.40.1
|
||||
|
||||
+8
-5
@@ -1,8 +1,8 @@
|
||||
From 4baaeb9661fa4015d9701e3616ce1ad4e8a07fd8 Mon Sep 17 00:00:00 2001
|
||||
From 966da83d0d75482a1489804593ae61f3f8e3b385 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 29 Aug 2021 09:45:27 +0200
|
||||
Subject: [PATCH] configure: fix detection of atomic builtins in libatomic
|
||||
configure script
|
||||
Date: Sun, 29 Aug 2021 12:23:34 +0200
|
||||
Subject: [PATCH 28/33] configure: fix detection of atomic builtins in
|
||||
libatomic configure script
|
||||
|
||||
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
|
||||
default) causes the libatomic configure script to incorrectly detect
|
||||
@@ -22,7 +22,7 @@ See:
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
|
||||
index 33f8c91ce77..3999db2cf8a 100644
|
||||
index a92ae9e8309..90b579ca4d8 100644
|
||||
--- a/libatomic/configure.tgt
|
||||
+++ b/libatomic/configure.tgt
|
||||
@@ -30,6 +30,26 @@
|
||||
@@ -52,3 +52,6 @@ index 33f8c91ce77..3999db2cf8a 100644
|
||||
case "${target_cpu}" in
|
||||
alpha*)
|
||||
# fenv.c needs this option to generate inexact exceptions.
|
||||
--
|
||||
2.40.1
|
||||
|
||||
Loaded 100 of 568 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user