diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2024-03-07 00:43:37 +0000 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2024-03-09 00:42:27 +0000 |
commit | c1e3f02f99a3cab181c36d1f55c552e2bcfba370 (patch) | |
tree | e1617e1f9b901b4ca7b32b0faeafffa524933594 /auto | |
parent | 0b5223e1cda35addb1e3e1b8a6d0601b2ee9bab6 (diff) | |
download | unit-c1e3f02f99a3cab181c36d1f55c552e2bcfba370.tar.gz unit-c1e3f02f99a3cab181c36d1f55c552e2bcfba370.tar.bz2 |
Compile with -fno-strict-overflow
This causes signed integer & pointer overflow to have a defined
behaviour of wrapping according to two's compliment. I.e INT_MAX will
wrap to INT_MIN and vice versa.
This is mainly to cover existing cases, not an invitation to add more.
Cc: Dan Callahan <d.callahan@f5.com>
Suggested-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'auto')
-rw-r--r-- | auto/cc/test | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/auto/cc/test b/auto/cc/test index 10588dac..5bd94d2f 100644 --- a/auto/cc/test +++ b/auto/cc/test @@ -65,6 +65,8 @@ case $NXT_CC_NAME in # Do not export symbols except explicitly marked with NXT_EXPORT. NXT_CFLAGS="$NXT_CFLAGS -fvisibility=hidden" + NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow" + # c99/gnu99 conflict with Solaris XOPEN. #NXT_CFLAGS="$NXT_CFLAGS -std=gnu99" @@ -107,6 +109,8 @@ case $NXT_CC_NAME in # Do not export symbols except explicitly marked with NXT_EXPORT. NXT_CFLAGS="$NXT_CFLAGS -fvisibility=hidden" + NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow" + NXT_CFLAGS="$NXT_CFLAGS -O" #NXT_CFLAGS="$NXT_CFLAGS -O0" NXT_CFLAGS="$NXT_CFLAGS -Wall -Wextra" |