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-03 18:29:13 +0000
commit089774c4b8f9f9f8122addc8474226957d057456 (patch)
treeb643914d00355d48d9791773344f50e11ae7d0c8
parent35aa5facb66b1d3bd33afe8d882fb6537d83a9d2 (diff)
downloadtoolchains-089774c4b8f9f9f8122addc8474226957d057456.tar.gz
toolchains-089774c4b8f9f9f8122addc8474226957d057456.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