Skip to content

Commit 0a42504

Browse files
committed
fix: 修复了ffmpeg不能在更多架构处理器上编译的问题
1 parent 9e1008f commit 0a42504

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

repo/packages/f/ffmpeg/xmake.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ do
5151
local packagedeps = {}
5252
os.setenv("PATH", info.toolchainsdir .. ":" .. os.getenv("PATH"))
5353

54-
if host == "aarch64-linux-musleabi" then
55-
arch = "aarch64"
56-
cpu = "armv8-a"
57-
end
58-
5954
table.insert(configs, "--cross-prefix=" .. host .. "-")
6055
table.insert(configs, "--enable-cross-compile")
6156
table.insert(configs, "--target-os=none")
@@ -64,6 +59,10 @@ do
6459
table.insert(configs, "--arch=" .. arch)
6560
table.insert(configs, "--cpu=" .. cpu)
6661

62+
if arch == "x86_64" then
63+
table.insert(configs,"--disable-x86asm")
64+
end
65+
6766
if package:config("shared") then
6867
table.insert(configs, "--enable-shared")
6968
end

tools/scripts/modules/rt/private/build/rtflags.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ function get_package_info(package)
129129

130130
if rtn.arch == "aarch64" then
131131
rtn.cpu = "armv8-a"
132+
elseif rtn.arch == "arm" then
133+
rtn.cpu = "armv7-a"
134+
elseif rtn.arch == "x86_64" then
135+
rtn.cpu = "generic64"
132136
else
133137
rtn.cpu = ""
134138
end

0 commit comments

Comments
 (0)