FFmpeg-Builds/images/base-win32/Dockerfile

42 lines
1.6 KiB
Docker
Raw Normal View History

2020-09-27 20:10:05 +00:00
ARG GH_REPO=btbn/ffmpeg-builds
2021-04-05 17:51:41 +00:00
FROM ghcr.io/$GH_REPO/base:latest
2020-09-27 20:10:05 +00:00
RUN --mount=src=ct-ng-config,dst=/.config \
git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \
./bootstrap && \
./configure --enable-local && \
make -j$(nproc) && \
cp /.config .config && \
./ct-ng build && \
cd / && \
rm -rf ct-ng
2020-09-27 20:10:05 +00:00
# Prepare "cross" environment to heavily favour static builds
2020-09-27 20:10:05 +00:00
RUN \
find /opt/ct-ng \
-name "*.dll" \
-or -name "*.dll.a" \
-delete && \
2020-09-27 20:10:05 +00:00
mkdir /opt/ffbuild
2020-11-07 20:35:21 +00:00
RUN rustup target add i686-pc-windows-gnu
2020-09-27 20:10:05 +00:00
ADD toolchain.cmake /toolchain.cmake
ADD cross.meson /cross.meson
ENV PATH="/opt/ct-ng/bin:${PATH}" \
FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=i686-w64-mingw32- --arch=i686 --target-os=mingw32" \
2020-09-27 20:10:05 +00:00
FFBUILD_TOOLCHAIN=i686-w64-mingw32 \
FFBUILD_CROSS_PREFIX=i686-w64-mingw32- \
2021-04-04 02:08:20 +00:00
FFBUILD_RUST_TARGET=i686-pc-windows-gnu \
2020-09-27 20:10:05 +00:00
FFBUILD_PREFIX=/opt/ffbuild \
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
2021-07-13 21:51:33 +00:00
PKG_CONFIG=pkg-config \
2021-07-14 19:37:48 +00:00
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
2020-09-27 20:10:05 +00:00
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
2021-04-04 02:08:20 +00:00
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" \
DLLTOOL="i686-w64-mingw32-dlltool" \
STAGE_CFLAGS="-fno-semantic-interposition" \
STAGE_CXXFLAGS="-fno-semantic-interposition"