mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
Refine configure for crossbuild.
This commit is contained in:
parent
7f7406ec77
commit
b73847de7d
1 changed files with 9 additions and 4 deletions
|
@ -160,10 +160,10 @@ Toolchain options:
|
|||
--extra-flags=<EFLAGS> Set EFLAGS as CFLAGS and CXXFLAGS. Also passed to ST as EXTRA_CFLAGS.
|
||||
|
||||
Cross Build options: @see https://ossrs.net/lts/zh-cn/docs/v4/doc/arm#ubuntu-cross-build-srs
|
||||
--cpu=<CPU> Toolchain: Select the minimum required CPU for cross-build.
|
||||
--arch=<ARCH> Toolchain: Select architecture for cross-build.
|
||||
--host=<BUILD> Toolchain: Cross-compile to build programs to run on HOST.
|
||||
--cross-prefix=<PREFIX> Toolchain: Use PREFIX for compilation tools.
|
||||
--cpu=<CPU> Toolchain: Select the minimum required CPU for cross-build. For example: --cpu=24kc
|
||||
--arch=<ARCH> Toolchain: Select architecture for cross-build. For example: --arch=aarch64
|
||||
--host=<BUILD> Toolchain: Cross-compile to build programs to run on HOST. For example: --host=aarch64-linux-gnu
|
||||
--cross-prefix=<PREFIX> Toolchain: Use PREFIX for compilation tools. For example: --cross-prefix=aarch64-linux-gnu-
|
||||
|
||||
Experts:
|
||||
--sys-ssl=on|off Do not compile ssl, use system ssl(-lssl) if required. Default: $(value2switch $SRS_USE_SYS_SSL)
|
||||
|
@ -410,6 +410,11 @@ function apply_auto_options() {
|
|||
SRS_X86_X64=YES; opt="--x86-x64 $opt";
|
||||
fi
|
||||
|
||||
# Covert prefix without directory.
|
||||
if [[ $SRS_CROSS_BUILD_PREFIX != "" ]]; then
|
||||
SRS_CROSS_BUILD_PREFIX=$(basename $SRS_CROSS_BUILD_PREFIX)
|
||||
fi
|
||||
|
||||
if [[ $SRS_CROSS_BUILD == YES ]]; then
|
||||
if [[ $SRS_CROSS_BUILD_PREFIX != "" && $SRS_CROSS_BUILD_HOST == "" ]]; then
|
||||
SRS_CROSS_BUILD_HOST=$(echo $SRS_CROSS_BUILD_PREFIX| sed 's/-$//g')
|
||||
|
|
Loading…
Reference in a new issue