Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mason
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MASON_COMMAND=$1 ; shift
MASON_NAME=$1 ; shift
MASON_VERSION=$1 ; shift

set -e
set -eu
set -o pipefail

MASON_RELEASED_VERSION="0.7.0"
Expand Down Expand Up @@ -84,4 +84,8 @@ fi
. ${MASON_DIR}/mason.sh

export MASON_DIR
bash "${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/script.sh" "${MASON_COMMAND}" "$@"
if [ -d "${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}-${MASON_PLATFORM_VERSION}" ]; then
bash "${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}-${MASON_PLATFORM_VERSION}/script.sh" "${MASON_COMMAND}" "$@"
else
bash "${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/script.sh" "${MASON_COMMAND}" "$@"
fi
12 changes: 6 additions & 6 deletions mason.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -e
set -eu
set -o pipefail
# set -x

Expand Down Expand Up @@ -47,7 +47,7 @@ if [ ${MASON_PLATFORM} = 'osx' ]; then
MASON_SDK_ROOT=${MASON_XCODE_ROOT}/Platforms/MacOSX.platform/Developer
MASON_SDK_PATH="${MASON_SDK_ROOT}/SDKs/MacOSX${MASON_SDK_VERSION}.sdk"

if [[ ${MASON_SYSTEM_PACKAGE} && ${MASON_SDK_VERSION%%.*} -ge 10 && ${MASON_SDK_VERSION##*.} -ge 11 ]]; then
if [[ ${MASON_SYSTEM_PACKAGE:-} && ${MASON_SDK_VERSION%%.*} -ge 10 && ${MASON_SDK_VERSION##*.} -ge 11 ]]; then
export MASON_DYNLIB_SUFFIX="tbd"
else
export MASON_DYNLIB_SUFFIX="dylib"
Expand Down Expand Up @@ -96,14 +96,14 @@ elif [ ${MASON_PLATFORM} = 'linux' ]; then
export MASON_DYNLIB_SUFFIX="so"

# Assume current system is the target platform
if [ -z ${MASON_PLATFORM_VERSION} ] ; then
export MASON_PLATFORM_VERSION=`uname -m`
if [ ! ${MASON_PLATFORM_VERSION:-} ] ; then
export MASON_PLATFORM_VERSION=$(uname -m)
fi

export CFLAGS="-fPIC"
export CXXFLAGS="${CFLAGS} -std=c++11"

if [ `uname -m` != ${MASON_PLATFORM_VERSION} ] ; then
if [ $(uname -m) != ${MASON_PLATFORM_VERSION} ] ; then
# Install the cross compiler
MASON_XC_PACKAGE_NAME=gcc
MASON_XC_PACKAGE_VERSION=${MASON_XC_GCC_VERSION:-5.3.0}-${MASON_PLATFORM_VERSION}
Expand All @@ -121,7 +121,7 @@ elif [ ${MASON_PLATFORM} = 'linux' ]; then
fi

elif [ ${MASON_PLATFORM} = 'android' ]; then
case "${MASON_PLATFORM_VERSION}" in
case "${MASON_PLATFORM_VERSION:-}" in
arm-v5-9) export MASON_ANDROID_ABI=arm-v5 ;;
arm-v7-9) export MASON_ANDROID_ABI=arm-v7 ;;
arm-v8-21) export MASON_ANDROID_ABI=arm-v8 ;;
Expand Down
4 changes: 4 additions & 0 deletions scripts/gcc/5.3.0-cortex_a9-hf/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ function mason_try_binary {
mason_success "Installed toolchain setup files at ${MASON_PREFIX}"
}

function mason_build {
:
}

function mason_load_source {
:
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/gcc/5.3.0-cortex_a9/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ function mason_try_binary {
mason_success "Installed toolchain setup files at ${MASON_PREFIX}"
}

function mason_build {
:
}

function mason_load_source {
:
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/gcc/5.3.0-i686/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ function mason_try_binary {
mason_success "Installed toolchain setup files at ${MASON_PREFIX}"
}

function mason_build {
:
}

function mason_load_source {
:
}
Expand Down