mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Pass -fwrapv option to compiler
espeak source code uses signed integer wrapping (e.g. wavephase in wavegen.c's Wavegen). It happens that this is undefined behavior, so a compiler would be free optimize away various situations... Fortunately gcc has an -fwrapv option to make signed integer wrapping defined. Options would be needed for other compilers.
This commit is contained in:
@@ -311,6 +311,15 @@ AX_CHECK_COMPILE_FLAG([-Wuninitialized], [CFLAGS="-Wuninitialized $CFLAG
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused], [CFLAGS="-Wunused $CFLAGS"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [CFLAGS="-Wunused-parameter $CFLAGS"])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Enable two-complement signed integer wrapping
|
||||
dnl
|
||||
dnl Otherwise this is undefined behavior.
|
||||
dnl ================================================================
|
||||
|
||||
AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="-fwrapv $CFLAGS"])
|
||||
|
||||
dnl ================================================================
|
||||
dnl libFuzzer checks.
|
||||
dnl ================================================================
|
||||
|
||||
Reference in New Issue
Block a user