summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorJiyoung Giuliana Yun <t2wish@gmail.com>2017-02-17 20:43:52 (GMT)
committerJan Vorlicek <janvorli@microsoft.com>2017-02-17 20:43:52 (GMT)
commit849ad718ba1fe739ac1264fddc0609e67b95816f (patch)
tree3c0389b4b9dffb9b892f20f60ef206cc71af303c /cross
parent43c54ac30145db2d47f4b36e01f09ffda55b30b4 (diff)
downloadcoreclr-849ad718ba1fe739ac1264fddc0609e67b95816f.zip
coreclr-849ad718ba1fe739ac1264fddc0609e67b95816f.tar.gz
coreclr-849ad718ba1fe739ac1264fddc0609e67b95816f.tar.bz2
Synchronous toolchain.cmake files with CoreFX (#9409)
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
Diffstat (limited to 'cross')
-rw-r--r--cross/arm/toolchain.cmake10
-rw-r--r--cross/arm64/toolchain.cmake10
-rw-r--r--cross/armel/toolchain.cmake25
-rw-r--r--cross/x86/toolchain.cmake1
4 files changed, 14 insertions, 32 deletions
diff --git a/cross/arm/toolchain.cmake b/cross/arm/toolchain.cmake
index 84ae2a5..7ecb34a 100644
--- a/cross/arm/toolchain.cmake
+++ b/cross/arm/toolchain.cmake
@@ -4,15 +4,7 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR armv7l)
-## Specify the toolchain
set(TOOLCHAIN "arm-linux-gnueabihf")
-set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
-#set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
-#set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
-#set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}as)
-#set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
-#set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
-#set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
add_compile_options(-target armv7-linux-gnueabihf)
add_compile_options(-mthumb)
@@ -20,7 +12,7 @@ add_compile_options(-mfpu=vfpv3)
add_compile_options(--sysroot=${CROSS_ROOTFS})
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -target ${TOOLCHAIN}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
diff --git a/cross/arm64/toolchain.cmake b/cross/arm64/toolchain.cmake
index 08e36cd..4280549 100644
--- a/cross/arm64/toolchain.cmake
+++ b/cross/arm64/toolchain.cmake
@@ -4,15 +4,7 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
-## Specify the toolchain
set(TOOLCHAIN "aarch64-linux-gnu")
-set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
-#set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
-#set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
-#set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}as)
-#set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
-#set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
-#set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
add_compile_options(-target ${TOOLCHAIN})
add_compile_options(--sysroot=${CROSS_ROOTFS})
@@ -30,4 +22,4 @@ set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) \ No newline at end of file
diff --git a/cross/armel/toolchain.cmake b/cross/armel/toolchain.cmake
index 95bff08..ae3bd7c 100644
--- a/cross/armel/toolchain.cmake
+++ b/cross/armel/toolchain.cmake
@@ -4,36 +4,35 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR armv7l)
-## Specify the toolchain
set(TOOLCHAIN "arm-linux-gnueabi")
-set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
-#set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
-#set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
-#set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}as)
-#set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
-#set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
-#set(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
add_compile_options(-target armv7-linux-gnueabi)
add_compile_options(-mthumb)
add_compile_options(-mfpu=vfpv3)
+add_compile_options(-mfloat-abi=softfp)
add_compile_options(--sysroot=${CROSS_ROOTFS})
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -target ${TOOLCHAIN}")
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
if("$ENV{__DistroRid}" MATCHES "tizen.*")
- add_compile_options(-I$ENV{ROOTFS_DIR}/usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.9.2/include/c++/)
- add_compile_options(-I$ENV{ROOTFS_DIR}/usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.9.2/include/c++/armv7l-tizen-linux-gnueabi)
- add_compile_options(-Wno-deprecated-declarations) # compile-time option
- add_compile_options(-D__extern_always_inline=inline)
set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/4.9.2")
+ 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)
+ add_compile_options(-Wno-deprecated-declarations) # compile-time option
+ add_compile_options(-D__extern_always_inline=inline) # compile-time option
+
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib")
+ set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib")
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
else()
# TODO: this setting assumes debian armel rootfs
- include_directories(SYSTEM ${CROSS_ROOTFS}/usr/include/c++/4.9 ${CROSS_ROOTFS}/usr/include/${TOOLCHAIN}/c++/4.9 )
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/include/c++/4.9)
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/include/${TOOLCHAIN}/c++/4.9)
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}/4.9")
+ set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}")
+ set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}/4.9")
endif()
diff --git a/cross/x86/toolchain.cmake b/cross/x86/toolchain.cmake
index 63c6487..1389a76 100644
--- a/cross/x86/toolchain.cmake
+++ b/cross/x86/toolchain.cmake
@@ -1,4 +1,3 @@
-
set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
set(CMAKE_SYSTEM_NAME Linux)