summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2022-06-01 10:28:20 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-11-02 18:46:05 +0000
commitd8c1c67e23484ac60822665dd832e2841bffa2be (patch)
treee830443b85baf8093b05560d9b937c278e66efa3
parente36acc3764d403a77fe1d39085633ea5f84cc528 (diff)
downloadtoolchains-d8c1c67e23484ac60822665dd832e2841bffa2be.tar.gz
toolchains-d8c1c67e23484ac60822665dd832e2841bffa2be.tar.bz2
Disable halfword accesses by default.
We don't want these at all until such time as we drop support for the Risc PC. Due to the unique way that its bus operates (it was designed for armv3 parts), 16bit accesses fail horribly, even if the CPU supports armv4 (like StrongARM does). Disabling this by default ensures that everything built by this toolchain should run happily on such systems (unless someone explicitly opts in to LDRH/STRH generation by passing -mhalfword-accesses). Note that other armv4 access instructions (such as LDRSB) are not affected by this option at all.
-rw-r--r--arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-default-no-halfword-access.p13
1 files changed, 13 insertions, 0 deletions
diff --git a/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-default-no-halfword-access.p b/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-default-no-halfword-access.p
new file mode 100644
index 0000000..400341f
--- /dev/null
+++ b/arm-riscos-gnueabihf/recipes/patches/gccsdk/gcc-default-no-halfword-access.p
@@ -0,0 +1,13 @@
+Index: gcc/gcc.config.arm.arm.opt.p
+===================================================================
+--- gcc/gcc.config.arm.arm.opt.p (nonexistent)
++++ gcc/gcc.config.arm.arm.opt.p (working copy)
+@@ -5,7 +5,7 @@
+ that may trigger Cortex-M3 errata.
+
+ +mhalfword-access
+-+Target Report Var(halfword_access) Init(1)
+++Target Report Var(halfword_access) Init(0)
+ +Enable halfword memory accesses.
+ +
+ munaligned-access