summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Chesakov <Egor.Chesakov@microsoft.com>2018-10-03 10:21:23 -0700
committerGitHub <noreply@github.com>2018-10-03 10:21:23 -0700
commit48a8c74e355fad5c1a569b131f4038218c98dfee (patch)
tree5820c97c8730f0aecefd2a419623fe2ab1b539e2
parent302630ed5a3730470e9ffeeebcd38c737c03963d (diff)
downloadcoreclr-48a8c74e355fad5c1a569b131f4038218c98dfee.tar.gz
coreclr-48a8c74e355fad5c1a569b131f4038218c98dfee.tar.bz2
coreclr-48a8c74e355fad5c1a569b131f4038218c98dfee.zip
Support building cross-architecture components on armel (#20190)
-rwxr-xr-xbuild.sh4
-rw-r--r--configurecompiler.cmake5
-rw-r--r--src/pal/src/CMakeLists.txt2
3 files changed, 7 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 2dfcf5d748..031d294317 100755
--- a/build.sh
+++ b/build.sh
@@ -500,9 +500,9 @@ build_CoreLib()
exit 1
fi
elif [ $__DoCrossArchBuild == 1 ]; then
- if [[ ( "$__CrossArch" == "x86" ) && ( "$__BuildArch" == "arm" ) ]]; then
+ if [[ ( "$__CrossArch" == "x86" ) && ( "$__BuildArch" == "arm" || "$__BuildArch" == "armel" ) ]]; then
build_CoreLib_ni "$__CrossComponentBinDir/crossgen"
- elif [[ ( "$__CrossArch" == "x64" ) && ( "$__BuildArch" == "arm" ) ]]; then
+ elif [[ ( "$__CrossArch" == "x64" ) && ( "$__BuildArch" == "arm" || "$__BuildArch" == "armel" ) ]]; then
build_CoreLib_ni "$__CrossComponentBinDir/crossgen"
elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "arm64" ) ]]; then
build_CoreLib_ni "$__CrossComponentBinDir/crossgen"
diff --git a/configurecompiler.cmake b/configurecompiler.cmake
index 7ee19bac96..6567cefbb2 100644
--- a/configurecompiler.cmake
+++ b/configurecompiler.cmake
@@ -8,7 +8,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
if(CLR_CROSS_COMPONENTS_BUILD)
# CMAKE_HOST_SYSTEM_PROCESSOR returns the value of `uname -p` on host.
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL amd64)
- if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm")
+ if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm" OR CLR_CMAKE_TARGET_ARCH STREQUAL "armel")
if($ENV{CROSSCOMPILE} STREQUAL "1")
set(CLR_CMAKE_PLATFORM_UNIX_X86 1)
else()
@@ -156,6 +156,9 @@ if (CLR_CMAKE_TARGET_ARCH STREQUAL x64)
set(CLR_CMAKE_TARGET_ARCH_ARM64 1)
elseif(CLR_CMAKE_TARGET_ARCH STREQUAL arm)
set(CLR_CMAKE_TARGET_ARCH_ARM 1)
+ elseif(CLR_CMAKE_TARGET_ARCH STREQUAL armel)
+ set(CLR_CMAKE_TARGET_ARCH_ARM 1)
+ set(ARM_SOFTFP 1)
else()
clr_unknown_arch()
endif()
diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt
index fe73050127..9659ffdc12 100644
--- a/src/pal/src/CMakeLists.txt
+++ b/src/pal/src/CMakeLists.txt
@@ -70,7 +70,7 @@ include_directories(include)
if(CLR_CROSS_COMPONENTS_BUILD)
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL amd64)
- if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm")
+ if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm" OR CLR_CMAKE_TARGET_ARCH STREQUAL "armel")
if($ENV{CROSSCOMPILE} STREQUAL "1")
set(PAL_CMAKE_PLATFORM_ARCH_I386 1)
add_definitions(-D_X86_)