diff options
author | SaeHie Park <saehie.park@gmail.com> | 2016-11-22 21:55:26 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-11-22 13:55:26 +0100 |
commit | d4b1a7473dcaa7ed9ead85ce3ff0fb39e1d5059f (patch) | |
tree | 26089e2d4f6bb48212e1ce99055f1e8e258d9861 /cross/x86 | |
parent | b78b71f220ccb28eb6a5f9ea903536bdb6cd3f3d (diff) | |
download | coreclr-d4b1a7473dcaa7ed9ead85ce3ff0fb39e1d5059f.tar.gz coreclr-d4b1a7473dcaa7ed9ead85ce3ff0fb39e1d5059f.tar.bz2 coreclr-d4b1a7473dcaa7ed9ead85ce3ff0fb39e1d5059f.zip |
[x86/Linux] fix and add for x86 cmake configuration (#8219)
This patch will add x86 part for cross build
- add x86 in build-rootfs and related cross files
- add x86 parts in CMakeLists.txt to pass configuration
- add required source files to pass configuration
Diffstat (limited to 'cross/x86')
-rw-r--r-- | cross/x86/sources.list.trusty | 11 | ||||
-rw-r--r-- | cross/x86/sources.list.vivid | 11 | ||||
-rw-r--r-- | cross/x86/sources.list.wily | 11 | ||||
-rw-r--r-- | cross/x86/sources.list.xenial | 11 | ||||
-rw-r--r-- | cross/x86/toolchain.cmake | 40 | ||||
-rw-r--r-- | cross/x86/tryrun.cmake | 127 |
6 files changed, 211 insertions, 0 deletions
diff --git a/cross/x86/sources.list.trusty b/cross/x86/sources.list.trusty new file mode 100644 index 0000000000..9b3085436e --- /dev/null +++ b/cross/x86/sources.list.trusty @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse diff --git a/cross/x86/sources.list.vivid b/cross/x86/sources.list.vivid new file mode 100644 index 0000000000..26d37b20fc --- /dev/null +++ b/cross/x86/sources.list.vivid @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ vivid main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ vivid main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse diff --git a/cross/x86/sources.list.wily b/cross/x86/sources.list.wily new file mode 100644 index 0000000000..c4b0b442ab --- /dev/null +++ b/cross/x86/sources.list.wily @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ wily main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ wily main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ wily-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ wily-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse diff --git a/cross/x86/sources.list.xenial b/cross/x86/sources.list.xenial new file mode 100644 index 0000000000..ad9c5a0144 --- /dev/null +++ b/cross/x86/sources.list.xenial @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse diff --git a/cross/x86/toolchain.cmake b/cross/x86/toolchain.cmake new file mode 100644 index 0000000000..63c64875fa --- /dev/null +++ b/cross/x86/toolchain.cmake @@ -0,0 +1,40 @@ + +set(CROSS_ROOTFS $ENV{ROOTFS_DIR}) + +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR i686) + +add_compile_options("-m32") +add_compile_options("--sysroot=${CROSS_ROOTFS}") +add_compile_options("-Wno-error=unused-command-line-argument") + +set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}") +set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/i686-linux-gnu") +set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/i386-linux-gnu") +set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -m32") + +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE) + +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(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}") +if(LLVM_CROSS_DIR) + set(WITH_LLDB_LIBS "${LLVM_CROSS_DIR}/lib/" CACHE STRING "") + set(WITH_LLDB_INCLUDES "${LLVM_CROSS_DIR}/include" CACHE STRING "") + set(LLDB_H "${WITH_LLDB_INCLUDES}" CACHE STRING "") + set(LLDB "${LLVM_CROSS_DIR}/lib/liblldb.so" CACHE STRING "") +else() + set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/i386-linux-gnu" CACHE STRING "") + set(CHECK_LLVM_DIR "${CROSS_ROOTFS}/usr/lib/llvm-3.8/include") + if(EXISTS "${CHECK_LLVM_DIR}" AND IS_DIRECTORY "${CHECK_LLVM_DIR}") + set(WITH_LLDB_INCLUDES "${CHECK_LLVM_DIR}") + else() + set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include") + endif() +endif() diff --git a/cross/x86/tryrun.cmake b/cross/x86/tryrun.cmake new file mode 100644 index 0000000000..cfc52087c2 --- /dev/null +++ b/cross/x86/tryrun.cmake @@ -0,0 +1,127 @@ +SET( REALPATH_SUPPORTS_NONEXISTENT_FILES_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( SSCANF_SUPPORT_ll_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_SCHED_GET_PRIORITY_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_WORKING_GETTIMEOFDAY_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_WORKING_CLOCK_GETTIME_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_CLOCK_MONOTONIC_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_MMAP_DEV_ZERO_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( PTHREAD_CREATE_MODIFIES_ERRNO_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( SEM_INIT_MODIFIES_ERRNO_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_COMPATIBLE_ACOS_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_COMPATIBLE_ASIN_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_COMPATIBLE_POW_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_VALID_NEGATIVE_INF_POW_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_VALID_POSITIVE_INF_POW_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_COMPATIBLE_ATAN2_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_COMPATIBLE_LOG_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_COMPATIBLE_LOG10_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( UNGETC_NOT_RETURN_EOF_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAS_POSIX_SEMAPHORES_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( GETPWUID_R_SETS_ERRNO_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_CLOCK_THREAD_CPUTIME_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_SCHED_GETCPU_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_PROCFS_CTL_EXITCODE + 1 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_PROCFS_MAPS_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_PROCFS_STAT_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_PROCFS_STATUS_EXITCODE + 0 + CACHE STRING "Result from TRY_RUN" FORCE) + +SET( HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES + 0 + CACHE STRING "Result from TRY_RUN" FORCE) |