prplos/toolchain
Felix Fietkau 6489f3ef89 toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE
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 b050f87d13,
but got lost 6 years ago, when gcc 9.1 was added in 88c07c6552.

This primarily affects the kirkwood and ixp4xx targets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c1c11120069b8e04ad4b0c6e815d2e3421944933)
2025-07-22 12:05:09 +02:00
..
binutils toolchain: binutils: fix compilation with GCC15 2025-05-03 22:47:07 +02:00
fortify-headers toolchain/fortify-headers: update download url 2024-09-14 13:55:15 +02:00
gcc toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:05:09 +02:00
gdb toolchain: gdb: fix build error with Xcode 16.3 2025-06-12 10:51:01 +02:00
glibc toolchain: glibc: Update glibc 2.38 to recent HEAD 2024-05-04 20:03:47 +02:00
kernel-headers toolchain: assign PKG_CPE_ID 2023-09-19 20:22:59 +02:00
mold toolchain: mold: add PKG_NAME to Makefile 2025-04-23 12:22:58 +02:00
musl toolchain/musl: add support for renameat2() 2024-06-13 14:16:32 +02:00
nasm toolchain/nasm: update to 2.16.03 2024-09-22 19:06:22 +02:00
wrapper toolchain/wrapper: fill and reference info.mk in staging_dir ext toolchain 2024-04-21 17:59:17 +02:00
build_version toolchain: add a version that can be bumped to force toolchain/target rebuild 2021-11-16 22:02:45 +01:00
Config.in build: conditionally build llvm bpf toolchain by default 2025-02-07 11:19:10 +01:00
info.mk
Makefile toolchain: add mold as additional linker 2023-07-04 20:25:41 +02:00