# as x64 does. It has been causing issues in ARM (https://github.com/dotnet/coreclr/issues/4746)
add_compile_options(-fsigned-char)
-if(CLR_CMAKE_PLATFORM_UNIX_ARM)
+if(CLR_CMAKE_PLATFORM_UNIX_ARM AND NOT DEFINED CLR_CMAKE_TARGET_TIZEN_LINUX)
# Because we don't use CMAKE_C_COMPILER/CMAKE_CXX_COMPILER to use clang
# we have to set the triple by adding a compiler argument
add_compile_options(-mthumb)
else()
add_compile_options(-target armv7-linux-gnueabihf)
endif(ARM_SOFTFP)
-endif(CLR_CMAKE_PLATFORM_UNIX_ARM)
+endif()
%build
+export CFLAGS=" --target=%{_host}"
+export CXXFLAGS=" --target=%{_host}"
+
%ifarch %{ix86}
-export CFLAGS=" --target=i586-tizen-linux-gnu -Wno-deprecated-declarations"
-export CXXFLAGS=" --target=i586-tizen-linux-gnu -Wno-deprecated-declarations"
-export ASMFLAGS=" --target=i586-tizen-linux-gnu"
-%else
-export CFLAGS=" --target=%{_host} -Wno-deprecated-declarations"
-export CXXFLAGS=" --target=%{_host} -Wno-deprecated-declarations"
-export ASMFLAGS=" --target=%{_host}"
+export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
+export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
%endif
mkdir build
-DCLR_DIR=%{_datarootdir}/%{netcoreappdir} \
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DCMAKE_BUILD_TYPE=Release \
- -DCLR_CMAKE_TARGET_ARCH_%{ARCH}=1 \
+ -DCLR_CMAKE_LINUX_ID=tizen \
-DCORECLR_SET_RPATH=%{_datarootdir}/%{netcoreappdir} \
-DBUILD_MANAGED=OFF
make %{?jobs:-j%jobs}