fix: 启用 opus 静态链接修复交叉编译

- 添加 OPUS_STATIC=1 和 PKG_CONFIG_ALL_STATIC=1 环境变量
- 为 libopus 配置添加 --prefix 参数确保静态链接
This commit is contained in:
mofeng-git
2026-01-10 13:03:43 +08:00
parent e670f1ffd1
commit 9feb74b72c
2 changed files with 6 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ RUN git clone --depth 1 https://github.com/xiph/opus /tmp/opus \
&& export RANLIB=aarch64-linux-gnu-ranlib \
&& ./autogen.sh \
&& ./configure \
--prefix=/usr/aarch64-linux-gnu \
--host=aarch64-linux-gnu \
--enable-static --disable-shared \
--disable-doc \
@@ -316,4 +317,6 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
PKG_CONFIG_ALLOW_CROSS=1 \
FFMPEG_STATIC=1 \
LIBYUV_STATIC=1 \
OPUS_STATIC=1 \
PKG_CONFIG_ALL_STATIC=1 \
RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc"