summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaylorjonl <taylorjonl@gmail.com>2015-12-19 20:20:27 +0000
committertaylorjonl <taylorjonl@gmail.com>2015-12-19 20:20:27 +0000
commit22b99a4f16b9782663b0acea3cb9a491a53a0d41 (patch)
tree7d3be20368dffa8b48c0b3501d16bdf3dbccd5f2
parentea7f6d05953cd1660b07621dac11d4d204d3bbbb (diff)
downloadcoreclr-22b99a4f16b9782663b0acea3cb9a491a53a0d41.tar.gz
coreclr-22b99a4f16b9782663b0acea3cb9a491a53a0d41.tar.bz2
coreclr-22b99a4f16b9782663b0acea3cb9a491a53a0d41.zip
Initial support for building on SmartOS
-rw-r--r--CMakeLists.txt6
-rwxr-xr-xbuild.sh4
-rwxr-xr-xsrc/pal/tools/gen-buildsys-clang.sh6
3 files changed, 14 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c56b582d4..b70d0955ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL NetBSD)
set(CLR_CMAKE_PLATFORM_NETBSD 1)
endif(CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+if(CMAKE_SYSTEM_NAME STREQUAL SunOS)
+ set(CLR_CMAKE_PLATFORM_UNIX 1)
+ set(CLR_CMAKE_PLATFORM_UNIX_TARGET_AMD64 1)
+ set(CLR_CMAKE_PLATFORM_SUNOS 1)
+endif(CMAKE_SYSTEM_NAME STREQUAL SunOS)
+
if(CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM)
set(CLR_CMAKE_PLATFORM_ARCH_ARM 1)
elseif(CLR_CMAKE_PLATFORM_UNIX_TARGET_ARM64)
diff --git a/build.sh b/build.sh
index c289fb3723..2141ffb168 100755
--- a/build.sh
+++ b/build.sh
@@ -239,6 +239,10 @@ case $OSName in
__BuildOS=NetBSD
;;
+ SunOS)
+ __BuildOS=SunOS
+ ;;
+
*)
echo "Unsupported OS $OSName detected, configuring as if for Linux"
__BuildOS=Linux
diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh
index 31e83ef029..326b01c353 100755
--- a/src/pal/tools/gen-buildsys-clang.sh
+++ b/src/pal/tools/gen-buildsys-clang.sh
@@ -72,7 +72,7 @@ OS=`uname`
# On FreeBSD the version number is appended without point and dash (i.e.
# llvm-ar35).
# Additionally, OSX doesn't use the llvm- prefix.
-if [ $OS = "Linux" -o $OS = "FreeBSD" -o $OS = "OpenBSD" -o $OS = "NetBSD" ]; then
+if [ $OS = "Linux" -o $OS = "FreeBSD" -o $OS = "OpenBSD" -o $OS = "NetBSD" -o $OS = "SunOS" ]; then
llvm_prefix="llvm-"
elif [ $OS = "Darwin" ]; then
llvm_prefix=""
@@ -89,6 +89,8 @@ elif [ $OS = "OpenBSD" ]; then
desired_llvm_version=""
elif [ $OS = "NetBSD" ]; then
desired_llvm_version=""
+elif [ $OS = "SunOS" ]; then
+ desired_llvm_version=""
else
desired_llvm_version="-$desired_llvm_major_version.$desired_llvm_minor_version"
fi
@@ -110,7 +112,7 @@ llvm_link="$(locate_llvm_exec link)"
[[ $? -eq 0 ]] || { echo "Unable to locate llvm-link"; exit 1; }
llvm_nm="$(locate_llvm_exec nm)"
[[ $? -eq 0 ]] || { echo "Unable to locate llvm-nm"; exit 1; }
-if [ $OS = "Linux" -o $OS = "FreeBSD" -o $OS = "OpenBSD" -o $OS = "NetBSD" ]; then
+if [ $OS = "Linux" -o $OS = "FreeBSD" -o $OS = "OpenBSD" -o $OS = "NetBSD" -o $OS = "SunOS" ]; then
llvm_objdump="$(locate_llvm_exec objdump)"
[[ $? -eq 0 ]] || { echo "Unable to locate llvm-objdump"; exit 1; }
fi