diff options
-rw-r--r-- | compileoptions.cmake | 4 | ||||
-rw-r--r-- | cross/arm/toolchain.cmake | 2 | ||||
-rw-r--r-- | cross/armel/toolchain.cmake | 2 | ||||
-rw-r--r-- | packaging/coreclr.spec | 53 |
4 files changed, 23 insertions, 38 deletions
diff --git a/compileoptions.cmake b/compileoptions.cmake index 75d51fd5bb..5b6f443513 100644 --- a/compileoptions.cmake +++ b/compileoptions.cmake @@ -59,9 +59,9 @@ if(CLR_CMAKE_PLATFORM_UNIX_ARM) if(ARM_SOFTFP) add_definitions(-DARM_SOFTFP) add_compile_options(-mfloat-abi=softfp) - add_compile_options(-target armv7-linux-gnueabi) + add_compile_options(-target armv7l-tizen-linux-gnueabi) else() - add_compile_options(-target armv7-linux-gnueabihf) + add_compile_options(-target armv7l-tizen-linux-gnueabihf) endif(ARM_SOFTFP) endif(CLR_CMAKE_PLATFORM_UNIX_ARM) diff --git a/cross/arm/toolchain.cmake b/cross/arm/toolchain.cmake index 7ecb34a66e..6db126d1c4 100644 --- a/cross/arm/toolchain.cmake +++ b/cross/arm/toolchain.cmake @@ -6,7 +6,7 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabihf") -add_compile_options(-target armv7-linux-gnueabihf) +add_compile_options(-target armv7l-tizen-linux-gnueabihf) add_compile_options(-mthumb) add_compile_options(-mfpu=vfpv3) add_compile_options(--sysroot=${CROSS_ROOTFS}) diff --git a/cross/armel/toolchain.cmake b/cross/armel/toolchain.cmake index ae3bd7c1ba..1dd9d37c55 100644 --- a/cross/armel/toolchain.cmake +++ b/cross/armel/toolchain.cmake @@ -6,7 +6,7 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") -add_compile_options(-target armv7-linux-gnueabi) +add_compile_options(-target armv7l-tizen-linux-gnueabi) add_compile_options(-mthumb) add_compile_options(-mfpu=vfpv3) add_compile_options(-mfloat-abi=softfp) diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec index 07aea25496..630baab0da 100644 --- a/packaging/coreclr.spec +++ b/packaging/coreclr.spec @@ -33,6 +33,7 @@ ExcludeArch: aarch64 BuildRequires: python BuildRequires: python-xml +BuildRequires: libstdc++-devel # libcoreclr.so BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(uuid) @@ -47,6 +48,11 @@ Requires: libstdc++ Requires: libunwind Requires: libuuid +# Accelerate python +%if 0%{?speedpython:1} && 0%{?en_speedpython:1} +%en_speedpython +%endif + %if 0%{skipnative} %else BuildRequires: cmake @@ -145,30 +151,12 @@ 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 +# 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//") -%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 +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. @@ -176,26 +164,23 @@ export C_INCLUDE_PATH="${LLVM_INCLUDEDIR}/llvm-c/:%{_includedir}" %define _barch %{?cross:%{cross}}%{!?cross:x64} %else +%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 %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 |