Skip to content

Commit

Permalink
Refine configure for crossbuild.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 11, 2022
1 parent 7f7406e commit b73847d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions trunk/auto/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit b73847d

Please sign in to comment.