mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 10:56:17 +00:00
fix lto for rust and lame_init_old
This commit is contained in:
17
lib/build.sh
17
lib/build.sh
@@ -115,12 +115,12 @@ ld.lld:ld:lld:ld"
|
||||
realT="$(command -v "${realT}")"
|
||||
|
||||
# add fuse-ld for the compiler
|
||||
local addFlag=''
|
||||
if line_contains "${realT}" clang; then addFlag="-fuse-ld=${USE_LD}"; fi
|
||||
local addFlag='-v'
|
||||
if line_contains "${realT}" clang; then addFlag+=" -fuse-ld=${USE_LD}"; fi
|
||||
|
||||
# create generic tool version
|
||||
echo "#!/usr/bin/env bash
|
||||
echo \$@ > ${compilerDir}/${genericT}.\${RANDOM}
|
||||
echo \$@ > ${compilerDir}/${genericT}.last-command
|
||||
exec \"${realT}\" ${addFlag} \"\$@\"" >"${compilerDir}/${genericT}"
|
||||
chmod +x "${compilerDir}/${genericT}"
|
||||
echo_if_fail "${compilerDir}/${genericT}" --version || return 1
|
||||
@@ -156,6 +156,7 @@ exec \"${realT}\" ${addFlag} \"\$@\"" >"${compilerDir}/${genericT}"
|
||||
)
|
||||
CARGO_CINSTALL_FLAGS=(
|
||||
"--release"
|
||||
"--verbose"
|
||||
"--prefix" "${PREFIX}"
|
||||
"--libdir" "${LIBDIR}"
|
||||
)
|
||||
@@ -632,7 +633,8 @@ del_pkgconfig_gcc_s() {
|
||||
### RUST ###
|
||||
meta_cargoc_build() {
|
||||
local destdir="${PWD}/fb-local-install"
|
||||
cargo cinstall \
|
||||
# let rust handle its own lto
|
||||
CFLAGS="${CFLAGS//${LTO_FLAG}/}" cargo cinstall \
|
||||
--destdir "${destdir}" \
|
||||
"${CARGO_CINSTALL_FLAGS[@]}" || return 1
|
||||
# cargo cinstall destdir prepends with entire prefix
|
||||
@@ -915,13 +917,6 @@ build_libx264() {
|
||||
}
|
||||
|
||||
build_libmp3lame() {
|
||||
# https://sourceforge.net/p/lame/mailman/message/36081038/
|
||||
if is_darwin || is_android; then
|
||||
remove_line \
|
||||
'include/libmp3lame.sym' \
|
||||
'lame_init_old' || return 1
|
||||
fi
|
||||
|
||||
meta_configure_build \
|
||||
--enable-nasm \
|
||||
--disable-frontend || return 1
|
||||
|
||||
11
patches/libmp3lame/fix_lame_init_old_symbol.patch
Normal file
11
patches/libmp3lame/fix_lame_init_old_symbol.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
# https://sourceforge.net/p/lame/mailman/message/36081038/
|
||||
diff --git a/include/libmp3lame.sym b/include/libmp3lame.sym
|
||||
index ff7d318..fd120f5 100644
|
||||
--- a/include/libmp3lame.sym
|
||||
+++ b/include/libmp3lame.sym
|
||||
@@ -1,5 +1,4 @@
|
||||
lame_init
|
||||
-lame_init_old
|
||||
lame_set_num_samples
|
||||
lame_get_num_samples
|
||||
lame_set_in_samplerate
|
||||
Reference in New Issue
Block a user