Enable shared linux programs (EXPERIMENTAL)
This commit is contained in:
parent
368897e4b2
commit
8df6a4b92d
4 changed files with 12 additions and 19 deletions
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
Static Windows Builds of ffmpeg master and latest release branch.
|
Static Windows Builds of ffmpeg master and latest release branch.
|
||||||
|
|
||||||
EXPERIMENTAL Linux-Builds. Do not expect everything to work on them, specially anything that involved loading dynamic libs at runtime.
|
EXPERIMENTAL Linux-Builds. Do not expect everything to work on them, specially anything that involves loading dynamic libs at runtime.
|
||||||
Shared Linux builds come without the programs (hopefully just for now), since they won't run without musl.
|
Shared Linux builds need musl installed to run the programs. YMMV when trying to use the libraries.
|
||||||
|
Please report any issues you encounter with those builds!
|
||||||
|
|
||||||
## Auto-Builds
|
## Auto-Builds
|
||||||
|
|
||||||
|
|
4
build.sh
4
build.sh
|
@ -57,8 +57,8 @@ docker run --rm -i "${UIDARGS[@]}" -v $PWD/ffbuild:/ffbuild "$IMAGE" bash -s <<E
|
||||||
cd ffmpeg
|
cd ffmpeg
|
||||||
git checkout $GIT_BRANCH
|
git checkout $GIT_BRANCH
|
||||||
|
|
||||||
./configure --prefix=/ffbuild/prefix --pkg-config-flags="--static" \$FFBUILD_TARGET_FLAGS $FF_CONFIGURE --extra-cflags="$FF_CFLAGS" --extra-cxxflags="$FF_CXXFLAGS" --extra-ldflags="$FF_LDFLAGS" --extra-libs="$FF_LIBS"
|
./configure --prefix=/ffbuild/prefix --pkg-config-flags="--static" \$FFBUILD_TARGET_FLAGS $FF_CONFIGURE --extra-cflags='$FF_CFLAGS' --extra-cxxflags='$FF_CXXFLAGS' --extra-ldflags='$FF_LDFLAGS' --extra-libs='$FF_LIBS'
|
||||||
make -j\$(nproc)
|
make -j\$(nproc) V=1
|
||||||
make install install-doc
|
make install install-doc
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -21,22 +21,14 @@ ffbuild_dockerbuild() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_ldflags() {
|
ffbuild_ldflags() {
|
||||||
if [[ $VARIANT == *shared* ]]; then
|
if [[ $VARIANT != *shared* ]]; then
|
||||||
#if [[ $TARGET == *64* ]]; then
|
|
||||||
# echo "-Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2"
|
|
||||||
#else
|
|
||||||
# echo "-Wl,--dynamic-linker=/lib/ld-linux.so.2"
|
|
||||||
#fi
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "-pie -fPIE -static"
|
echo "-pie -fPIE -static"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_configure() {
|
ffbuild_configure() {
|
||||||
# Any dynamic executables linked against musl need its dynamic loader to run
|
if [[ $VARIANT == *shared* ]]; then
|
||||||
# Thus it's impossible to build both the libraries and the programs, since
|
# Can't escape hell
|
||||||
# with shared libs, the programs need to be dynamic, and in turn needs the musl
|
echo --extra-ldexeflags=\'-Wl,-rpath='\\\\\\\$\\\$ORIGIN'\\ -Wl,-rpath='\\\\\\\$\\\$ORIGIN/../lib'\'
|
||||||
# dynamic loader at runtime.
|
fi
|
||||||
[[ $VARIANT == *shared* ]] && echo --disable-programs
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ package_variant() {
|
||||||
IN="$1"
|
IN="$1"
|
||||||
OUT="$2"
|
OUT="$2"
|
||||||
|
|
||||||
# mkdir -p "$OUT"/bin
|
mkdir -p "$OUT"/bin
|
||||||
# cp "$IN"/bin/* "$OUT"/bin
|
cp "$IN"/bin/* "$OUT"/bin
|
||||||
|
|
||||||
mkdir -p "$OUT"/lib
|
mkdir -p "$OUT"/lib
|
||||||
cp -a "$IN"/lib/*.so* "$OUT"/lib
|
cp -a "$IN"/lib/*.so* "$OUT"/lib
|
||||||
|
|
Loading…
Reference in a new issue