parent
0e104d9662
commit
77b3030134
17 changed files with 123 additions and 19 deletions
26
images/base-win32/Dockerfile
Normal file
26
images/base-win32/Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
|||
ARG GH_REPO=btbn/ffmpeg-builds
|
||||
FROM docker.pkg.github.com/$GH_REPO/base:latest
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN \
|
||||
apt-get -y install mingw-w64 && \
|
||||
apt-get -y clean && \
|
||||
rm /usr/lib/gcc/*-w64-mingw32/*/libstdc++*.dll* && \
|
||||
rm /usr/lib/gcc/*-w64-mingw32/*/libgcc_s* && \
|
||||
rm /usr/lib/gcc/*-w64-mingw32/*/*.dll.a && \
|
||||
rm /usr/*-w64-mingw32/lib/*.dll.a && \
|
||||
mkdir /opt/ffbuild
|
||||
|
||||
ADD toolchain.cmake /toolchain.cmake
|
||||
ADD cross.meson /cross.meson
|
||||
|
||||
ENV FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=i686-w64-mingw32- --arch=i686 --target-os=mingw32" \
|
||||
FFBUILD_TOOLCHAIN=i686-w64-mingw32 \
|
||||
FFBUILD_CROSS_PREFIX=i686-w64-mingw32- \
|
||||
FFBUILD_PREFIX=/opt/ffbuild \
|
||||
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
|
||||
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig \
|
||||
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" \
|
||||
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong"
|
18
images/base-win32/cross.meson
Normal file
18
images/base-win32/cross.meson
Normal file
|
@ -0,0 +1,18 @@
|
|||
[binaries]
|
||||
c = 'i686-w64-mingw32-gcc'
|
||||
cpp = 'i686-w64-mingw32-g++'
|
||||
ar = 'i686-w64-mingw32-ar'
|
||||
strip = 'i686-w64-mingw32-strip'
|
||||
windres = 'i686-w64-mingw32-windres'
|
||||
exe_wrapper = ['wine']
|
||||
|
||||
[properties]
|
||||
c_link_args = ['-static-libgcc']
|
||||
cpp_link_args = ['-static-libgcc', '-static-libstdc++']
|
||||
needs_exe_wrapper = true
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'i686'
|
||||
cpu = 'i686'
|
||||
endian = 'little'
|
13
images/base-win32/toolchain.cmake
Normal file
13
images/base-win32/toolchain.cmake
Normal file
|
@ -0,0 +1,13 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
|
||||
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
|
||||
set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
|
||||
set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
|
||||
set(CMAKE_RANLIB i686-w64-mingw32-ranlib)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /opt/ffbuild)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
Loading…
Add table
Add a link
Reference in a new issue