Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
arm systems have unsigned chars by default, enforce signedness for consistancy
authorAugustin Degomme <adegomme@users.noreply.github.com>
Mon, 30 May 2022 15:28:44 +0000 (17:28 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Mon, 30 May 2022 15:28:44 +0000 (17:28 +0200)
tools/cmake/Flags.cmake

index de55de0..6fdaa31 100644 (file)
@@ -84,6 +84,12 @@ if(enable_compile_optimizations)
 else()
   set(optCFLAGS "-O0 ")
 endif()
+
+#ARM platforms have signed char by default, switch to unsigned for consistancy
+if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
+  set(optCFLAGS "${optCFLAGS} -fsigned-char")
+endif()
+
 if(enable_compile_optimizations AND CMAKE_COMPILER_IS_GNUCC
     AND (NOT enable_model-checking))
   # This is redundant (already in -03):