From: Amul Shah <Amul.Shah@fisglobal.com>
Description: Backport upstream change that makes i586 the default build type for 32bit GT.M
Applied-Upstream: V6.2-000

--- a/sr_linux/platform.cmake
+++ b/sr_linux/platform.cmake
@@ -13,6 +13,9 @@
   set(arch "x86")
   set(bits 32)
   set(FIND_LIBRARY_USE_LIB64_PATHS FALSE)
+  # Set arch to i586 in order to compile for Galileo
+  set(CMAKE_C_FLAGS  "${CMAKE_C_FLAGS} -march=i586")
+  set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-march=i586")
 else()
   set(arch "x86_64")
   set(bits 64)
@@ -32,7 +35,7 @@
 
 # Compiler
 set(CMAKE_C_FLAGS
-  "${CMAKE_C_FLAGS} -ansi -fsigned-char -fPIC -Wmissing-prototypes -fno-omit-frame-pointer")
+  "${CMAKE_C_FLAGS} -ansi -fsigned-char -fPIC -Wmissing-prototypes -Wreturn-type -Wpointer-sign -fno-omit-frame-pointer")
 
 set(CMAKE_C_FLAGS_RELEASE
   "${CMAKE_C_FLAGS_RELEASE} -fno-defer-pop -fno-strict-aliasing -ffloat-store")
