diff options
author | Matt Mitchell <mmitche@microsoft.com> | 2015-08-05 16:59:34 -0700 |
---|---|---|
committer | Matt Mitchell <mmitche@microsoft.com> | 2015-08-05 16:59:34 -0700 |
commit | f61a9bf5fc676bd9384458fad8433391cc0f0a9b (patch) | |
tree | 6a67bcf9176fbfb607416fc8f5c024792b2a44cd /src | |
parent | f86d9bd03c21d07e934e5bde1eb54dfecececced (diff) | |
parent | 3587984322e62e7035234ad72a2d22797e10fd9a (diff) | |
download | coreclr-f61a9bf5fc676bd9384458fad8433391cc0f0a9b.tar.gz coreclr-f61a9bf5fc676bd9384458fad8433391cc0f0a9b.tar.bz2 coreclr-f61a9bf5fc676bd9384458fad8433391cc0f0a9b.zip |
Merge pull request #1343 from benpye/cross-compilation
Add cross compilation support for ARM and ARM64
Diffstat (limited to 'src')
-rw-r--r-- | src/pal/inc/unixasmmacrosarm64.inc | 11 | ||||
-rwxr-xr-x | src/pal/tools/gen-buildsys-clang.sh | 19 |
2 files changed, 26 insertions, 4 deletions
diff --git a/src/pal/inc/unixasmmacrosarm64.inc b/src/pal/inc/unixasmmacrosarm64.inc index dbed7b6123..e5d8ce3353 100644 --- a/src/pal/inc/unixasmmacrosarm64.inc +++ b/src/pal/inc/unixasmmacrosarm64.inc @@ -3,6 +3,17 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +.macro NESTED_ENTRY Name, Section, Handler + LEAF_ENTRY \Name, \Section + .ifnc \Handler, NoHandler + .cfi_personality 0, C_FUNC(\Handler) // 0 == DW_EH_PE_absptr + .endif +.endm + +.macro NESTED_END Name, Section + LEAF_END \Name, \Section +.endm + .macro PATCH_LABEL Name .global C_FUNC(\Name) C_FUNC(\Name): diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh index 91ac5c821a..c9f915ed7c 100755 --- a/src/pal/tools/gen-buildsys-clang.sh +++ b/src/pal/tools/gen-buildsys-clang.sh @@ -3,12 +3,13 @@ # This file invokes cmake and generates the build system for gcc. # -if [ $# -lt 3 -o $# -gt 4 ] +if [ $# -lt 4 -o $# -gt 5 ] then echo "Usage..." - echo "gen-buildsys-clang.sh <path to top level CMakeLists.txt> <ClangMajorVersion> <ClangMinorVersion> [build flavor]" + echo "gen-buildsys-clang.sh <path to top level CMakeLists.txt> <ClangMajorVersion> <ClangMinorVersion> <Architecture> [build flavor]" echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP" echo "Specify the clang version to use, split into major and minor version" + echo "Specify the target architecture." echo "Optionally specify the build configuration (flavor.) Defaults to DEBUG." exit 1 fi @@ -31,14 +32,16 @@ else exit 1 fi +build_arch="$4" + # Possible build types are DEBUG, RELEASE, RELWITHDEBINFO, MINSIZEREL. # Default to DEBUG -if [ -z "$4" ] +if [ -z "$5" ] then echo "Defaulting to DEBUG build." buildtype="DEBUG" else - buildtype="$4" + buildtype="$5" fi OS=`uname` @@ -102,6 +105,14 @@ fi if [[ -n "$LLDB_INCLUDE_DIR" ]]; then cmake_extra_defines="$cmake_extra_defines -DWITH_LLDB_INCLUDES=$LLDB_INCLUDE_DIR" fi +if [[ -n "$CROSSCOMPILE" ]]; then + if ! [[ -n "$ROOTFS_DIR" ]]; then + echo "ROOTFS_DIR not set for crosscompile" + exit 1 + fi + cmake_extra_defines="$cmake_extra_defines -C $1/cross/$build_arch/tryrun.cmake" + cmake_extra_defines="$cmake_extra_defines -DCMAKE_TOOLCHAIN_FILE=$1/cross/$build_arch/toolchain.cmake" +fi cmake \ "-DCMAKE_USER_MAKE_RULES_OVERRIDE=$1/src/pal/tools/clang-compiler-override.txt" \ |