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
This commit is contained in:
parent
100e9ac137
commit
8ff0fb6075
1 changed files with 1 additions and 1 deletions
2
tools/configure
vendored
2
tools/configure
vendored
|
@ -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=""
|
||||
|
|
Loading…
Reference in a new issue