Fix gbs build
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Fri, 16 Feb 2018 12:40:46 +0000 (15:40 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Fri, 16 Feb 2018 12:40:46 +0000 (15:40 +0300)
compileoptions.cmake
packaging/netcoredbg.spec

index d872275dfa71196301beaf52a7846b2f95b2c000..0d221d87c74118a6924d0e145c35b898ea9c470a 100644 (file)
@@ -42,7 +42,7 @@ add_compile_options(-Wno-incompatible-ms-struct)
 # 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)
@@ -54,4 +54,4 @@ if(CLR_CMAKE_PLATFORM_UNIX_ARM)
    else()
      add_compile_options(-target armv7-linux-gnueabihf)
    endif(ARM_SOFTFP)
-endif(CLR_CMAKE_PLATFORM_UNIX_ARM)
+endif()
index b13532eb66c2adabc127303f1bf40313cc74ddf3..90fd764cd61b37efb7d32b86d40d469ec19b1f6e 100644 (file)
@@ -55,14 +55,12 @@ cp %{SOURCE1001} ..
 
 %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
@@ -74,7 +72,7 @@ cmake ../netcoredbg \
     -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}