Closed s88100 closed 2 years ago
processor architecture check
src/Makefile
# ARM Processor
ifneq ($(filter arm%, $(shell uname -m)),)
# $(info processor "$(shell uname -m)")
CFLAGS += -fsigned-char
endif
Linux Deploy 'armhf' terminal: uname -m armv7l
this should work for 'arm' processors
Should be fixed by #541.
terminal output 'x86_64' and 'arm' pwma-sdl-armhf.txt pwma-sdl-x86_64.txt
check please
https://developer.arm.com/documentation/den0013/d/Porting/Miscellaneous-C-porting-issues/unsigned-char-and-signed-char tested on Android, workaround for users of GCC
-fsigned-char
https://quick-adviser.com/what-does-unsigned-char-mean-in-c/#Is_char_signed_in_C https://stackoverflow.com/questions/757482/comparison-is-always-true-due-to-limited-range-of-data-type-warning-in-c The C and C++ standards allows the character type char to be signed or unsigned, depending on the platform and compiler. Most systems, including x86 GNU/Linux and Microsoft Windows, use signed char, but those based on PowerPC and ARM processors typically use unsigned char. This can lead to unexpected results when porting programs between platforms which have different defaults for the type of char.
it would be nice to have support on ARM processors Raspberry Pi etc. recommend explicitly using
signed char
signed char: -127...127 unsigned char: 0...255