summaryrefslogtreecommitdiff
path: root/packaging/coreclr.spec
diff options
context:
space:
mode:
authorSlava Barinov <v.barinov@samsung.com>2017-05-18 10:22:19 +0300
committerJiyoung Yun <jy910.yun@samsung.com>2017-07-14 13:05:34 +0900
commit5cd8b824074d6bc4bdce6890e6cc343acc04de03 (patch)
tree94146e20ed1b0abbe9da63b319893ba985981dcf /packaging/coreclr.spec
parent58cb688fd9f04087a63f5cb2aebadd6810b4a840 (diff)
downloadcoreclr-5cd8b824074d6bc4bdce6890e6cc343acc04de03.tar.gz
coreclr-5cd8b824074d6bc4bdce6890e6cc343acc04de03.tar.bz2
coreclr-5cd8b824074d6bc4bdce6890e6cc343acc04de03.zip
Enable build with updated clang
Explicit options passing is not needed now and compiler is detected automatically. Change-Id: I5b0b1ab330cd0e3150c6848b63f3ed9d205c8a22 Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Diffstat (limited to 'packaging/coreclr.spec')
-rw-r--r--packaging/coreclr.spec64
1 files changed, 25 insertions, 39 deletions
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 3995c48ba1..13e0c663d2 100644
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -23,7 +23,7 @@ Source1000: downloaded_files.tar.gz
Source1001: %{name}.manifest
Source1002: libicu.tar.gz
Source1003: dep_libs.tar.gz
-# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11
+# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12
Patch0: Add-project.assets.json-files.patch
Patch1: Add-Tizen-RuntimeID-case.patch
Patch2: Change-O3-build-in-clang3.8.patch
@@ -36,6 +36,7 @@ Patch8: Add-skipped-testcase-on-TM1.patch
Patch9: Set-local-variables-as-addr-exposed-if-it-appears-in.patch
Patch10: Revert-unnecessary-changes.patch
Patch11: Add-skipped-testcase-superpmi.patch
+Patch12: tizen-toolchain-support.patch
ExcludeArch: aarch64
@@ -55,6 +56,15 @@ Requires: libstdc++
Requires: libunwind
Requires: libuuid
+# Accelerate python
+%ifarch %{arm}
+BuildRequires: python-accel-armv7l-cross-arm
+%endif
+
+%ifarch aarch64
+BuildRequires: python-accel-aarch64-cross-aarch64
+%endif
+
%if 0%{skipnative}
%else
BuildRequires: cmake
@@ -130,6 +140,7 @@ cp %{SOURCE1001} .
%patch9 -p1
%patch10 -p1
%patch11 -p1
+%patch12 -p1
%if 0%{skipmscorlib}
%else
cp %{SOURCE1000} ./
@@ -161,57 +172,32 @@ done
%endif
%build
-# Detect paths to toolchain headers in universal way
-export GCC_INSTALL_DIR=$(gcc -print-search-dirs | sed -ne '/install: /s/install: //p')
-export LLVM_LIBDIR=$(llvm-config --libdir)
-export LLVM_INCLUDEDIR=$(llvm-config --includedir)
-export GPP_INCLUDE_PATHS=$(cpp -xc++ -v < /dev/null 2>&1 | \
- awk '/search starts here:/{flag=1;next}/End of search list/{flag=0}flag' | \
- sed -e "s/^ //" | tr '\n' ':' | sed -e 's/.$//')
-export CLANG_INCLUDE_PATHS=$(clang++ -E -xc++ - -v < /dev/null 2>&1 | \
- awk '/search starts here:/{flag=1;next}/End of search list/{flag=0}flag' | \
- sed -e "s/^ //" | tr '\n' ':' | sed -e 's/.$//')
-export CLANG_HEADERS=$(clang++ -print-search-dirs 2>&1 | sed -ne '/libraries: /s/libraries: =//p' | sed -ne 's|:.*|/include|p')
-
-# NOTHING to build
-%if 0%{skipnative}
-%else
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LLVM_LIBDIR}:${GCC_INSTALL_DIR}
-export LIBRARY_PATH=$LIBRARY_PATH:${LLVM_LIBDIR}:${GCC_INSTALL_DIR}
-export CFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
-export CPPFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
-export CXXFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
-export CPLUS_INCLUDE_PATH="${LLVM_INCLUDEDIR}/llvm/:${LLVM_INCLUDEDIR}/llvm-c/:${CLANG_HEADERS}:${GPP_INCLUDE_PATHS}:${CLANG_INCLUDE_PATHS}"
-export C_INCLUDE_PATH="${LLVM_INCLUDEDIR}/llvm-c/:%{_includedir}"
-%endif
+# These flags aren't supported by clang
+export CFLAGS=$(echo $CFLAGS | sed -e "s/-Wa,-mimplicit-it=thumb//;s/-mimplicit-it=thumb//;s/-Wl,--hash-style=gnu//;s/-Wl,-O1//;s/-Wl,--as-needed//")
+export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-integrated-as//;s/-mimplicit-it=thumb//;s/-Wl,--hash-style=gnu//;s/-Wl,-O1//;s/-Wl,--as-needed//")
+
+export CFLAGS+=" --target=%{_host} "
+export CXXFLAGS+=" --target=%{_host} "
%ifarch x86_64
# Even though build architectur is x86_64, it will be running on arm board.
# So we need to pass the arch argument as arm.
%define _barch %{?cross:%{cross}}%{!?cross:x64}
-
%else
%ifarch aarch64
%define _barch arm64
-
%else
%ifarch %{ix86}
%define _barch x86
-
+export CLANG_NO_LIBDIR_SUFFIX=1
+export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
+export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
%else
%ifarch %{arm}
%define _barch armel
-
-%if 0%{skipnative}
-%else
-export CFLAGS="${CFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__ -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w"
-export CPPFLAGS="${CPPFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__ -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w"
-export CXXFLAGS="${CXXFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp-buffer-size=32 -fdiagnostics-color=never -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__ -Wno-error=inline-asm -integrated-as -Wno-ignored-attributes -Wno-switch-enum -Wno-switch -Wno-error=switch -Wno-error=switch-enum -w"
-%endif
-
+export CLANG_NO_LIBDIR_SUFFIX=1
%else
-# write the paths in general!
%endif
%endif
@@ -251,15 +237,15 @@ export PAL_DBG_CHANNELS=""
# No build native and mscorlib.
%else
# Build native only.
-./build.sh %{_barch} %{_buildtype} clang3.8 skipmscorlib skipgenerateversion skipnuget %{testopt} cmakeargs -DFEATURE_GDBJIT=TRUE cmakeargs -DFEATURE_DBGIPC=0
+./build.sh %{_barch} %{_buildtype} clang3.8 skipmscorlib skipgenerateversion skipnuget %{testopt} cmakeargs -DFEATURE_GDBJIT=TRUE cmakeargs -DFEATURE_DBGIPC=0 cmakeargs -DCMAKE_C_COMPILER=/usr/bin/clang cmakeargs -DCMAKE_CXX_COMPILER=/usr/bin/clang++
%endif
%else
%if 0%{skipnative}
# Build mscorlib only.
-./build.sh %{_barch} %{_buildtype} -skiprestore skipnative skipnuget %{testopt} -- /p:RestorePackages=false
+./build.sh %{_barch} %{_buildtype} -skiprestore skipnative skipnuget %{testopt}
%else
# Build native and mscorlib.
-./build.sh %{_barch} %{_buildtype} clang3.8 skipgenerateversion skipnuget %{testopt} cmakeargs -DFEATURE_GDBJIT=TRUE cmakeargs -DFEATURE_DBGIPC=0 cmakeargs -DFEATURE_NI_BIND_FALLBACK=false -- /p:RestorePackages=false
+./build.sh %{_barch} %{_buildtype} clang3.8 skipgenerateversion -skiprestore skipnuget %{testopt} cmakeargs -DFEATURE_GDBJIT=TRUE cmakeargs -DFEATURE_DBGIPC=0 cmakeargs -DCMAKE_C_COMPILER=/usr/bin/clang cmakeargs -DCMAKE_CXX_COMPILER=/usr/bin/clang++
%endif
%endif