summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorTomas Weinfurt <tweinfurt@yahoo.com>2017-10-03 16:42:14 -0700
committerJan Vorlicek <janvorli@microsoft.com>2017-10-04 01:42:14 +0200
commit858f5e0658a63c39eaf14c34a2146a34950c387f (patch)
tree9d22d24098decf027020c1471a7b4b0ca83096d8 /build.sh
parentaae414026671e3dc1ccf0f308d351ac04cc746a4 (diff)
downloadcoreclr-858f5e0658a63c39eaf14c34a2146a34950c387f.tar.gz
coreclr-858f5e0658a63c39eaf14c34a2146a34950c387f.tar.bz2
coreclr-858f5e0658a63c39eaf14c34a2146a34950c387f.zip
Few build changes to support Freebsd (#14121)
* also look for python27 * add more locations to search for lldb.h so it just work on FreeBSD * add adm64 to ARCH selection. This is mostly cosmetic to avoild warning on FreeBSD * add support for -osgroup=XXX - this is mostly for conistency. -OSGroup=FreeBSD is similar to freebsdmscorlib in build.cmd * fix typo adm->amd * add back fi removed by mistake * add __HostDistroRid for FreeBSD * adress fedback from review: make python lookup consistent - starting with most specific version. uddate warning message about lldb.h and remove composite flag * feedback from review: type and small change on OSGroup syntax * few more minor fixes
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index ce5e4fbce8..fd21a43ee2 100755
--- a/build.sh
+++ b/build.sh
@@ -2,7 +2,7 @@
# resolve python-version to use
if [ "$PYTHON" == "" ] ; then
- if ! PYTHON=$(command -v python || command -v python2 || command -v python 2.7)
+ if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python)
then
echo "Unable to locate build-dependency python2.x!" 1>&2
exit 1
@@ -74,6 +74,10 @@ initHostDistroRid()
fi
fi
fi
+ if [ "$__HostOS" == "FreeBSD" ]; then
+ __freebsd_version=`sysctl -n kern.osrelease | cut -f1 -d'.'`
+ __HostDistroRid="freebsd.$__freebsd_version-$__HostArch"
+ fi
if [ "$__HostDistroRid" == "" ]; then
echo "WARNING: Can not determine runtime id for current distro."
@@ -107,6 +111,8 @@ initTargetDistroRid()
export __DistroRid="linux-$__BuildArch"
elif [ "$__BuildOS" == "OSX" ]; then
export __DistroRid="osx-$__BuildArch"
+ elif [ "$__BuildOS" == "FreeBSD" ]; then
+ export __DistroRid="freebsd-$__BuildArch"
fi
fi
}
@@ -553,6 +559,10 @@ case $CPUName in
__HostArch=arm64
;;
+ amd64)
+ __BuildArch=x64
+ __HostArch=x64
+ ;;
*)
echo "Unknown CPU $CPUName detected, configuring as if for x64"
__BuildArch=x64
@@ -860,6 +870,16 @@ while :; do
exit 1
fi
;;
+ osgroup|-osgroup)
+ if [ -n "$2" ]; then
+ __BuildOS="$2"
+ shift
+ else
+ echo "ERROR: 'osgroup' requires a non-empty option argument"
+ exit 1
+ fi
+ ;;
+
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;