diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index ced90db07c..bbc35e10ac 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -160,10 +160,10 @@ Toolchain options: --extra-flags= 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= Toolchain: Select the minimum required CPU for cross-build. - --arch= Toolchain: Select architecture for cross-build. - --host= Toolchain: Cross-compile to build programs to run on HOST. - --cross-prefix= Toolchain: Use PREFIX for compilation tools. + --cpu= Toolchain: Select the minimum required CPU for cross-build. For example: --cpu=24kc + --arch= Toolchain: Select architecture for cross-build. For example: --arch=aarch64 + --host= Toolchain: Cross-compile to build programs to run on HOST. For example: --host=aarch64-linux-gnu + --cross-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')