[Scummvm-git-logs] scummvm master -> cfab954743d002e8aca3baac18c373c31d6b78f3
antoniou79
a.antoniou79 at gmail.com
Mon Sep 6 12:46:25 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cfab954743 CONFIGURE: Use -fsigned-char as extra building flag for Android
Commit: cfab954743d002e8aca3baac18c373c31d6b78f3
https://github.com/scummvm/scummvm/commit/cfab954743d002e8aca3baac18c373c31d6b78f3
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2021-09-06T15:21:38+03:00
Commit Message:
CONFIGURE: Use -fsigned-char as extra building flag for Android
Needed for Android ARM architectures, where compilers assumes char is unsigned
Addresses issues like outlining fonts in AGS (https://forums.scummvm.org/viewtopic.php?f=17&p=95919#p95919)
See: https://stackoverflow.com/questions/7414355/is-it-safe-to-build-with-fsigned-char-with-android-ndk
Changed paths:
configure
diff --git a/configure b/configure
index b93468d6df..e5b03c5ac5 100755
--- a/configure
+++ b/configure
@@ -6090,6 +6090,12 @@ case $_host_os in
fi
;;
android)
+ # Force treating unqualified char variables as signed by default.
+ # NDK compiler for ARM will treat them as unsigned otherwise, which creates bugs in the code.
+ # We apply this to all Android architectures (arm, arm64, and x86, x86-64)
+ # albeit only the ARM architectures really required it (the others are not affected by this addition).
+ echo "(Android) Treating char as signed char by default"
+ append_var CXXFLAGS "-fsigned-char"
# ssp at this point so the cxxtests link
if test "$_debug_build" = yes; then
append_var CXXFLAGS "-fstack-protector"
More information about the Scummvm-git-logs
mailing list