diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2016-05-04 13:28:31 +0900 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2016-05-04 13:30:29 +0900 |
commit | 7f203ae2ca9f7c14239b4e7228b8f9638b3388f3 (patch) | |
tree | 91e3affc01451fe96fa2b4aea6f5552189779c41 /compileoptions.cmake | |
parent | 92e2d4e6fe1d1af3ee761637f1c99e4e8616282c (diff) | |
download | coreclr-7f203ae2ca9f7c14239b4e7228b8f9638b3388f3.tar.gz coreclr-7f203ae2ca9f7c14239b4e7228b8f9638b3388f3.tar.bz2 coreclr-7f203ae2ca9f7c14239b4e7228b8f9638b3388f3.zip |
Unix/Build: use -fsigned-char
Some architectures including ARM assumes that plain char is
unsigned unlike x64.
Because CoreCLR has been assuming char is signed, we need to
explictly tell the toolchain the signedness of char type.
Fix #4746
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'compileoptions.cmake')
-rw-r--r-- | compileoptions.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compileoptions.cmake b/compileoptions.cmake index 739b1a214c..bda438e050 100644 --- a/compileoptions.cmake +++ b/compileoptions.cmake @@ -42,6 +42,10 @@ if (CLR_CMAKE_PLATFORM_UNIX) # may not generate the same object layout as MSVC. add_compile_options(-Wno-incompatible-ms-struct) + # Some architectures (e.g., ARM) assume char type is unsigned while CoreCLR assumes char is signed + # as x64 does. It has been causing issues in ARM (https://github.com/dotnet/coreclr/issues/4746) + add_compile_options(-fsigned-char) + endif(CLR_CMAKE_PLATFORM_UNIX) if(CLR_CMAKE_PLATFORM_UNIX_ARM) |