openwrt/toolchain/gcc
Felix Fietkau 6489f3ef89
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
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 c1c1112006)
2025-07-22 12:05:09 +02:00
..
files do not use the wrapper scripts for exportable toolchains internally. on some systems the wrapper scripts are broken, and their use should be opt-in 2009-11-19 17:23:31 +00:00
final toolchain/gcc: use explicit configure args 2023-02-09 02:53:35 +01:00
initial toolchain: remove installing twice in the "initial" subdir 2023-02-19 19:44:39 +01:00
minimal toolchain: skip gcc/minimal for musl 2016-07-07 15:13:40 +02:00
patches-11.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:05:09 +02:00
patches-12.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:05:09 +02:00
patches-13.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:05:09 +02:00
patches-14.x toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE 2025-07-22 12:05:09 +02:00
common.mk toolchain: gcc: update GCC 14 to 14.2.0 2024-08-13 00:30:29 +02:00
Config.in toolchain: gcc: add support for GCC 14 2024-05-12 12:47:12 +01:00
Config.version toolchain: gcc: update GCC 14 to 14.2.0 2024-08-13 00:30:29 +02:00
exclude-testsuite toolchain: add gcc 7.1.0 support 2017-05-25 19:01:07 +02:00