diff options
author | Gleb Balykov <g.balykov@samsung.com> | 2020-06-11 15:29:13 +0300 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2020-06-18 13:09:14 +0900 |
commit | 44d822061f76e1fadd249abffe20f8090147b35c (patch) | |
tree | 20632f8d6012721cfe9c674c954a930d2341aed1 /eng | |
parent | 4ecfce38f66f6f411b586c56ecc8ebf52e428a64 (diff) | |
download | coreclr-44d822061f76e1fadd249abffe20f8090147b35c.tar.gz coreclr-44d822061f76e1fadd249abffe20f8090147b35c.tar.bz2 coreclr-44d822061f76e1fadd249abffe20f8090147b35c.zip |
[Tizen] Add tizen arm64 toolchain file. Explicitly pass non-portable build to fix arm64 build on tizen (on armel non-portable build is default, tizen rid in general is non-portable).
Diffstat (limited to 'eng')
-rw-r--r-- | eng/common/cross/toolchain.cmake | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 071d411241..9fb7d4ae80 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -24,6 +24,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") else() set(TOOLCHAIN "aarch64-linux-gnu") endif() + if("$ENV{__DistroRid}" MATCHES "tizen.*") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR i686) set(TOOLCHAIN "i686-linux-gnu") @@ -32,11 +35,15 @@ else() endif() # Specify include paths -if(TARGET_ARCH_NAME STREQUAL "armel") - if(DEFINED TIZEN_TOOLCHAIN) +if(DEFINED TIZEN_TOOLCHAIN) + if(TARGET_ARCH_NAME STREQUAL "armel") include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) endif() + if(TARGET_ARCH_NAME STREQUAL "arm64") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) + endif() endif() # add_compile_param - adds only new options without duplicates. @@ -69,6 +76,17 @@ if(TARGET_ARCH_NAME STREQUAL "armel") add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib") add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") endif() +elseif(TARGET_ARCH_NAME STREQUAL "arm64") + if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only + add_compile_param(CROSS_LINK_FLAGS "-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/lib64") + add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib64") + add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + + add_compile_param(CROSS_LINK_FLAGS "-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") + add_compile_param(CROSS_LINK_FLAGS "-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") + add_compile_param(CROSS_LINK_FLAGS "-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") add_compile_param(CROSS_LINK_FLAGS "-m32") endif() @@ -93,16 +111,19 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") add_compile_options(-mfpu=vfpv3) if(TARGET_ARCH_NAME STREQUAL "armel") add_compile_options(-mfloat-abi=softfp) - if(DEFINED TIZEN_TOOLCHAIN) - add_compile_options(-Wno-deprecated-declarations) # compile-time option - add_compile_options(-D__extern_always_inline=inline) # compile-time option - endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") add_compile_options(-m32) add_compile_options(-Wno-error=unused-command-line-argument) endif() +if(DEFINED TIZEN_TOOLCHAIN) + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$") + add_compile_options(-Wno-deprecated-declarations) # compile-time option + add_compile_options(-D__extern_always_inline=inline) # compile-time option + endif() +endif() + # Set LLDB include and library paths if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") if(TARGET_ARCH_NAME STREQUAL "x86") |