summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-27 10:29:59 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-27 10:29:59 -0400
commit61f698715dfed3a7e21895430020f029934184cd (patch)
treeb6c3f3b0acc9e5566d677ad2234b43709d23aefd
parentf62eee569c33537d7d3957b5226a3c5a2532d3f3 (diff)
downloadrockbox-61f6987.tar.gz
rockbox-61f6987.zip
coldfire: We need -fno-delete-null-pointer-checks in flash controller code
Change-Id: I9a3e4ced2c3d41f6a31a968af72659a1a14f702e
-rw-r--r--firmware/target/coldfire/debug-coldfire.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/coldfire/debug-coldfire.c b/firmware/target/coldfire/debug-coldfire.c
index 249c0a75ab..ef44a82176 100644
--- a/firmware/target/coldfire/debug-coldfire.c
+++ b/firmware/target/coldfire/debug-coldfire.c
@@ -50,6 +50,11 @@
#elif (CONFIG_KEYPAD == MPIO_HD300_PAD)
# define DEBUG_CANCEL BUTTON_MENU
#endif
+
+/* dbg_flash_id() hits address 0, which is nominally illegal. Make sure
+ GCC doesn't helpfully turn this into an exception.
+ */
+#pragma GCC optimize "no-delete-null-pointer-checks"
/* Tool function to read the flash manufacturer and type, if available.
Only chips which could be reprogrammed in system will return values.
(The mode switch addresses vary between flash manufacturers, hence addr1/2) */