CONFIGURE: Enable SCUMM_NEED_ALIGNMENT when using --enable-ubsan
-fsanitize=undefined implies -fsanitize=alignment, so we need to define SCUMM_NEED_ALIGNMENT for UBSan builds, otherwise many false positives will be reported, such as for engines/scumm/smush/codec47.cpp. That's also a good way of having more tests for the SCUMM_NEED_ALIGNMENT code paths during development :)
This commit is contained in:
parent
908a13998c
commit
8a73f5d496
1 changed files with 4 additions and 0 deletions
4
configure
vendored
4
configure
vendored
|
@ -2490,6 +2490,10 @@ case $_host_cpu in
|
|||
_need_memalign=yes
|
||||
;;
|
||||
esac
|
||||
if test "$_enable_ubsan" = yes ; then
|
||||
# UBSan implies -fsanitize=alignment, so avoid false positives.
|
||||
_need_memalign=yes
|
||||
fi
|
||||
echo "$_need_memalign"
|
||||
|
||||
define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue