aboutsummaryrefslogtreecommitdiff
path: root/toolchain/gcc/patches-14.x
Commit message (Collapse)AuthorAge
* toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TEFelix Fietkau2025-07-22
| | | | | | | | | | | | | | | | | | | | These instructions are for 64-bit load/store. On ARMv5TE, the CPU requires addresses to be aligned to 64-bit. When misaligned, behavior is undefined (effectively either loads the same word twice on LDRD, or corrupts surrounding memory on STRD). On ARMv6 and newer, unaligned access is safe. Removing these instructions for ARMv5TE is necessary, because GCC ignores alignment information in pointers and does unsafe optimizations that have shown up as bugs in various places. This patch was originally added more than 11 years ago in commit b050f87d13b5, but got lost 6 years ago, when gcc 9.1 was added in 88c07c655262. This primarily affects the kirkwood and ixp4xx targets Signed-off-by: Felix Fietkau <nbd@nbd.name>
* toolchain: gcc: update GCC14 to 14.3Shiji Yang2025-05-24
| | | | | | | | | | | | Remove upstreamed patches: - 020-MIPS-Include-missing-mips16.S-in-libgcc-lib1funcs.S.patch - 021-Reuse-scratch-registers-generated-by-LRA.patch All other patches are automatically refreshed. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/18891 Signed-off-by: Robert Marko <robimarko@gmail.com>
* toolchain: gcc: backport patch to fix ICE with PowerPC targetsMatthias Schiffer2025-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the build of perl, the following ICE was reported in https://github.com/openwrt/packages/issues/24565 when targeting PowerPC: during RTL pass: reload blocksort.c: In function 'mainSort.isra': blocksort.c:1011:1: internal compiler error: in patch_jump_insn, at cfgrtl.cc:1303 1011 | } | ^ 0x7d49cee29d8f __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7d49cee29e3f __libc_start_main_impl ../csu/libc-start.c:392 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <http://bugs.openwrt.org/> for instructions. The same issue also caused the CI failures in https://github.com/openwrt/packages/pull/26501. The issue only occurs with GCC 14.2.0, but not with the head of the releases/gcc-14 maintenance branch; a bisect found that this patch fixes it. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Link: https://github.com/openwrt/openwrt/pull/18797 Signed-off-by: Robert Marko <robimarko@gmail.com>
* toolchain: gcc: fix build error with glibc for aarch64 targetsKonstantin Demin2025-05-12
| | | | | | | | | | | | GCC 14+ fails to build due to libatomic specific -march handling. This build error triggers only with glibc and not with musl libc which is default. Related: https://github.com/openwrt/openwrt/issues/16073 Signed-off-by: Konstantin Demin <rockdrilla@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18647 Signed-off-by: Robert Marko <robimarko@gmail.com>
* toolchain: gcc: Backport patch to fix mips16 linkingHauke Mehrtens2025-05-03
| | | | | | | | | | | | | | | Backport patch from upstream GCC 14 branch which fixes linking with MIPS16 on the pistachio target. This fixes the following link problem: ``` /builder/shared-workdir/build/staging_dir/toolchain-mipsel_24kc+24kf_gcc-14.2.0_musl/lib/gcc/mipsel-openwrt-linux-musl/14.2.0/../../../../mipsel-openwrt-linux-musl/bin/ld.bfd: ./liblua.so: undefined reference to `__mips16_ledf2' /builder/shared-workdir/build/staging_dir/toolchain-mipsel_24kc+24kf_gcc-14.2.0_musl/lib/gcc/mipsel-openwrt-linux-musl/14.2.0/../../../../mipsel-openwrt-linux-musl/bin/ld.bfd: ./liblua.so: undefined reference to `__mips16_call_stub_df_2' /builder/shared-workdir/build/staging_dir/toolchain-mipsel_24kc+24kf_gcc-14.2.0_musl/lib/gcc/mipsel-openwrt-linux-musl/14.2.0/../../../../mipsel-openwrt-linux-musl/bin/ld.bfd: ./liblua.so: undefined reference to `__mips16_muldf3' ``` Link: https://github.com/openwrt/openwrt/pull/18688 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: Refresh patchesHauke Mehrtens2025-05-03
| | | | | | | Refresh all GCC patches. Link: https://github.com/openwrt/openwrt/pull/18688 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: fix build error with Xcode 16.3Georgi Valkov2025-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions. zutil.h conditionally defines fdopen as NULL when this macro is defined, resulting in the following build error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: e> 318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen)); | ^ ./zutil.h:147:33: note: expanded from macro 'fdopen' 147 | # define fdopen(fd,mode) NULL /* No fdopen() */ In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire block was ignored, gcc and gdb used to compile and work fine. This may have been used for compatibility with older versions of macOS, but is no longer needed. By pure luck, the build worked fine for a long time, because it did not properly detect macOS. Fixed by removing the check for TARGET_OS_MAC. Note that since Xcode 16.3, an entire set of TARGET_OS macros are now defined, most of which are set to 0: TARGET_OS_LINUX 0 TARGET_OS_MAC 1 TARGET_OS_OSX 1 Signed-off-by: Georgi Valkov <gvalkov@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18467 Signed-off-by: Robert Marko <robimarko@gmail.com>
* toolchain: gcc: drop 110-Fix-MIPS-PR-84790.patchChuanhong Guo2024-09-17
| | | | | | According to the bugzilla link, this is fixed in gcc 14.2. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* toolchain: gcc: update GCC 14 to 14.2.0Thomas Weißschuh2024-08-13
| | | | | | | | All patches automatically rebased. Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de> Link: https://github.com/openwrt/openwrt/pull/16047 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: add support for GCC 14Rui Salvaterra2024-05-12
Deleted (upstreamed): - 020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch [1] - 021-libcc1-fix-vector-include.patch [2] All other patches automatically rebased. Note that selecting GCC 14, as of now, *will* result in build failures. The packages that fail to build will be fixed as they're found. Thus, GCC 13.x is the default, for the time being. [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9970b576b7e4ae337af1268395ff221348c4b34a [2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5213047b1d50af63dfabb5e5649821a6cb157e33 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>