|
@@ -205,14 +205,14 @@ is_host()
|
|
os_arch=`uname -m | tr '[A-Z]' '[a-z]'`
|
|
os_arch=`uname -m | tr '[A-Z]' '[a-z]'`
|
|
|
|
|
|
# set the default target platform and architecture
|
|
# set the default target platform and architecture
|
|
-_target_plat=${os_host}
|
|
|
|
-_target_arch=${os_arch}
|
|
|
|
|
|
+_target_plat_default=${os_host}
|
|
|
|
+_target_arch_default=${os_arch}
|
|
|
|
|
|
# set the default target toolchain
|
|
# set the default target toolchain
|
|
if is_host "macosx"; then
|
|
if is_host "macosx"; then
|
|
- _target_toolchain="clang"
|
|
|
|
|
|
+ _target_toolchain_default="clang"
|
|
else
|
|
else
|
|
- _target_toolchain="gcc"
|
|
|
|
|
|
+ _target_toolchain_default="gcc"
|
|
fi
|
|
fi
|
|
|
|
|
|
# determining target platform
|
|
# determining target platform
|
|
@@ -555,21 +555,21 @@ Common options:
|
|
--help Print this message.
|
|
--help Print this message.
|
|
--version Only print version information.
|
|
--version Only print version information.
|
|
--verbose Display more information.
|
|
--verbose Display more information.
|
|
- --plat=PLAT Compile for the given platform. (default: '"${_target_plat}"')
|
|
|
|
|
|
+ --plat=PLAT Compile for the given platform. (default: '"${_target_plat_default}"')
|
|
- msys
|
|
- msys
|
|
- cross
|
|
- cross
|
|
- bsd
|
|
- bsd
|
|
- mingw
|
|
- mingw
|
|
- macosx
|
|
- macosx
|
|
- linux
|
|
- linux
|
|
- --arch=ARCH Compile for the given architecture. (default: '"${_target_arch}"')
|
|
|
|
|
|
+ --arch=ARCH Compile for the given architecture. (default: '"${_target_arch_default}"')
|
|
- msys: i386 x86_64
|
|
- msys: i386 x86_64
|
|
- cross: i386 x86_64 arm arm64 mips mips64 riscv riscv64 s390x ppc ppc64 sh4
|
|
- cross: i386 x86_64 arm arm64 mips mips64 riscv riscv64 s390x ppc ppc64 sh4
|
|
- bsd: i386 x86_64
|
|
- bsd: i386 x86_64
|
|
- mingw: i386 x86_64 arm arm64
|
|
- mingw: i386 x86_64 arm arm64
|
|
- macosx: x86_64 arm64
|
|
- macosx: x86_64 arm64
|
|
- linux: i386 x86_64 armv7 armv7s arm64-v8a mips mips64 mipsel mips64el
|
|
- linux: i386 x86_64 armv7 armv7s arm64-v8a mips mips64 mipsel mips64el
|
|
- --toolchain=TOOLCHAIN Set toolchain name. (default: '"${_target_toolchain}"')
|
|
|
|
|
|
+ --toolchain=TOOLCHAIN Set toolchain name. (default: '"${_target_toolchain_default}"')
|
|
- clang
|
|
- clang
|
|
- gcc
|
|
- gcc
|
|
|
|
|
|
@@ -646,6 +646,12 @@ done
|
|
# check platform
|
|
# check platform
|
|
_check_platform()
|
|
_check_platform()
|
|
{
|
|
{
|
|
|
|
+ if test "x${_target_plat}" = "x"; then
|
|
|
|
+ _target_plat=${_target_plat_default}
|
|
|
|
+ fi
|
|
|
|
+ if test "x${_target_arch}" = "x"; then
|
|
|
|
+ _target_arch=${_target_arch_default}
|
|
|
|
+ fi
|
|
echo "checking for platform ... ${_target_plat}"
|
|
echo "checking for platform ... ${_target_plat}"
|
|
echo "checking for architecture ... ${_target_arch}"
|
|
echo "checking for architecture ... ${_target_arch}"
|
|
}
|
|
}
|
|
@@ -653,6 +659,9 @@ _check_platform()
|
|
# check toolchain
|
|
# check toolchain
|
|
_check_toolchain()
|
|
_check_toolchain()
|
|
{
|
|
{
|
|
|
|
+ if test "x${_target_toolchain}" = "x"; then
|
|
|
|
+ _target_toolchain=${_target_toolchain_default}
|
|
|
|
+ fi
|
|
echo "checking for toolchain ... ${_target_toolchain}"
|
|
echo "checking for toolchain ... ${_target_toolchain}"
|
|
}
|
|
}
|
|
|
|
|