summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2022-12-01 10:32:00 -0500
committerSolomon Peachy <pizza@shaftnet.org>2023-04-18 10:51:24 -0400
commit8ff0fb60758f519e9b0cb2560d87f76977357f42 (patch)
treea6e31a67c8bb3aca039982ebe864e2fa4fefc973
parent100e9ac137179d0a9b604042a4c1363f46b10d9c (diff)
downloadrockbox-8ff0fb60758f519e9b0cb2560d87f76977357f42.tar.gz
rockbox-8ff0fb60758f519e9b0cb2560d87f76977357f42.zip
toolchain: Globally use '-fno-strict-overflow'
This turns on -fwrapv and -fwrapv-pointers. As per GCC docs: "This option instructs the compiler to assume that signed arithmetic overflow of addition, subtraction and multiplication wraps around using twos-complement representation. This flag enables some optimizations and disables others." All of our targets fall under this category. For some time now we've been using -Wall which implies -Wstrict-overflow=2, which only warns when the compiler actually implements a possibly questionable optimization, so I'd expect this to not affect our code size at all. Change-Id: I8e1c10183e390c6d0897e81f84a5df4590b02d84
-rwxr-xr-xtools/configure2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/configure b/tools/configure
index 12b45bf890..7f5b5c6f5b 100755
--- a/tools/configure
+++ b/tools/configure
@@ -8,7 +8,7 @@
8# 8#
9 9
10# global CC options for all platforms 10# global CC options for all platforms
11CCOPTS="-W -Wall -Wextra -Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99 -funit-at-a-time -fno-delete-null-pointer-checks" 11CCOPTS="-W -Wall -Wextra -Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99 -funit-at-a-time -fno-delete-null-pointer-checks -fno-strict-overflow"
12 12
13# LD options for the core 13# LD options for the core
14LDOPTS="" 14LDOPTS=""