diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2022-12-01 10:32:00 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2023-04-18 10:51:24 -0400 |
commit | 8ff0fb60758f519e9b0cb2560d87f76977357f42 (patch) | |
tree | a6e31a67c8bb3aca039982ebe864e2fa4fefc973 | |
parent | 100e9ac137179d0a9b604042a4c1363f46b10d9c (diff) | |
download | rockbox-8ff0fb6075.tar.gz rockbox-8ff0fb6075.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-x | tools/configure | 2 |
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 @@ # # global CC options for all platforms -CCOPTS="-W -Wall -Wextra -Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99 -funit-at-a-time -fno-delete-null-pointer-checks" +CCOPTS="-W -Wall -Wextra -Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99 -funit-at-a-time -fno-delete-null-pointer-checks -fno-strict-overflow" # LD options for the core LDOPTS="" |