mirror of
https://github.com/mborgerson/xemu.git
synced 2026-02-04 06:35:26 +00:00
ubuntu-win64-cross: Bump mxe, build GCC toolchain
This commit is contained in:
committed by
mborgerson
parent
bdef3ea496
commit
d49402972a
11
.github/workflows/build-xemu-win64-toolchain.yml
vendored
11
.github/workflows/build-xemu-win64-toolchain.yml
vendored
@ -12,13 +12,17 @@ on:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: xemu-project/xemu-win64-toolchain
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
name: Build and Publish Image
|
||||
if: ${{ github.repository_owner == 'xemu-project' }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain: [llvm, gcc]
|
||||
env:
|
||||
IMAGE_NAME: xemu-project/xemu-win64-toolchain-${{ matrix.toolchain }}
|
||||
steps:
|
||||
- name: Clone tree
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
||||
@ -28,8 +32,8 @@ jobs:
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
labels: |
|
||||
org.opencontainers.image.title=xemu-win64-toolchain
|
||||
org.opencontainers.image.description=Toolchain and libraries for building xemu Windows releases
|
||||
org.opencontainers.image.title=xemu-win64-toolchain-${{ matrix.toolchain }}
|
||||
org.opencontainers.image.description=${{ matrix.toolchain }} toolchain and libraries for building xemu Windows releases
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
||||
type=ref,event=branch
|
||||
@ -50,3 +54,4 @@ jobs:
|
||||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
file: ubuntu-win64-cross/${{ matrix.toolchain }}.Dockerfile
|
||||
|
||||
@ -4,16 +4,12 @@
|
||||
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV MXE_PATH=/opt/mxe
|
||||
ENV MXE_PATH=/usr/local/mxe
|
||||
ENV MXE_REPO=https://github.com/mxe/mxe.git
|
||||
ENV MXE_VERSION=db7f5247eaab700f28bb9b9433d279e5958f5f01
|
||||
ENV MXE_VERSION=9c716d7337fcec2b95eef7ed8f5970b4b8e97f68
|
||||
|
||||
ENV MXE_LLVM_MINGW_REPO=https://github.com/libvips/build-win64-mxe
|
||||
ENV MXE_LLVM_MINGW_VERSION=51fc5884d0c4a3be43a2f09fa36a464885918d3d
|
||||
ENV MXE_LLVM_MINGW_PATH=/opt/build-win64-mxe
|
||||
|
||||
ARG PLUGIN_DIRS="${MXE_LLVM_MINGW_PATH} ${MXE_LLVM_MINGW_PATH}/build/plugins/llvm-mingw"
|
||||
ARG TARGETS="x86_64-w64-mingw32.static aarch64-w64-mingw32.static"
|
||||
ARG PLUGIN_DIRS="plugins/gcc15"
|
||||
ARG TARGETS="x86_64-w64-mingw32.static"
|
||||
ARG JOBS=6
|
||||
|
||||
RUN apt-get update \
|
||||
@ -60,18 +56,13 @@ RUN apt-get update \
|
||||
wget \
|
||||
xz-utils
|
||||
|
||||
RUN git clone ${MXE_LLVM_MINGW_REPO} ${MXE_LLVM_MINGW_PATH} \
|
||||
&& cd ${MXE_LLVM_MINGW_PATH} \
|
||||
&& git checkout ${MXE_LLVM_MINGW_VERSION} \
|
||||
\
|
||||
&& git clone ${MXE_REPO} ${MXE_PATH} \
|
||||
RUN git clone ${MXE_REPO} ${MXE_PATH} \
|
||||
&& cd ${MXE_PATH} \
|
||||
&& git checkout ${MXE_VERSION} \
|
||||
&& git apply ${MXE_LLVM_MINGW_PATH}/build/patches/mxe-fixes.patch
|
||||
&& git checkout ${MXE_VERSION}
|
||||
|
||||
RUN make \
|
||||
MXE_TARGETS="${TARGETS}" \
|
||||
MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
|
||||
MXE_TARGETS="${TARGETS}" \
|
||||
JOBS=${JOBS} \
|
||||
-C ${MXE_PATH} \
|
||||
cc
|
||||
@ -85,8 +76,8 @@ COPY vulkan-headers.mk \
|
||||
${MXE_PATH}/src/
|
||||
|
||||
RUN make \
|
||||
MXE_TARGETS="${TARGETS}" \
|
||||
MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
|
||||
MXE_TARGETS="${TARGETS}" \
|
||||
JOBS=${JOBS} \
|
||||
CFLAGS=-O2 \
|
||||
-C ${MXE_PATH} \
|
||||
@ -104,5 +95,5 @@ RUN make \
|
||||
RUN find ${MXE_PATH}/usr -executable -type f -exec chmod a+x {} \;
|
||||
|
||||
ENV CROSSPREFIX=x86_64-w64-mingw32.static-
|
||||
ENV CROSSAR=${CROSSPREFIX}ar
|
||||
ENV CROSSAR=${CROSSPREFIX}gcc-ar
|
||||
ENV PATH="${MXE_PATH}/.ccache/bin:${MXE_PATH}/usr/x86_64-pc-linux-gnu/bin:${MXE_PATH}/usr/bin:${PATH}"
|
||||
81
ubuntu-win64-cross/llvm.Dockerfile
Normal file
81
ubuntu-win64-cross/llvm.Dockerfile
Normal file
@ -0,0 +1,81 @@
|
||||
#
|
||||
# Environment to cross-compile xemu for Windows
|
||||
#
|
||||
|
||||
FROM docker.io/library/buildpack-deps:trixie
|
||||
|
||||
ENV MXE_PATH=/usr/local/mxe
|
||||
ENV MXE_TAG=llvm-mingw-20251219
|
||||
ENV MXE_REPO=https://github.com/kleisauke/mxe.git
|
||||
|
||||
ARG TARGETS="x86_64-w64-mingw32.static aarch64-w64-mingw32.static"
|
||||
ARG JOBS=6
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get -qy install \
|
||||
autopoint \
|
||||
bison \
|
||||
build-essential \
|
||||
flex \
|
||||
gettext \
|
||||
gperf \
|
||||
gtk-update-icon-cache \
|
||||
intltool \
|
||||
jq \
|
||||
libtool-bin \
|
||||
libxml-parser-perl \
|
||||
lzip \
|
||||
p7zip-full \
|
||||
python-is-python3 \
|
||||
python3-mako \
|
||||
python3-venv \
|
||||
python3-yaml \
|
||||
ruby \
|
||||
zip
|
||||
|
||||
WORKDIR /usr/local
|
||||
RUN git clone -b ${MXE_TAG} --single-branch ${MXE_REPO}
|
||||
|
||||
WORKDIR /usr/local/mxe
|
||||
|
||||
# Bootstrap compilers and utilities
|
||||
RUN --mount=type=cache,id=mxe-download,target=/usr/local/mxe/pkg \
|
||||
echo "MXE_TARGETS := x86_64-pc-linux-gnu" > settings.mk && \
|
||||
make autotools cargo-c cc meson nasm pe-util \
|
||||
MXE_VERBOSE=true \
|
||||
MXE_TMP="/var/tmp" \
|
||||
MXE_PLUGIN_DIRS="plugins/llvm-mingw" \
|
||||
JOBS=${JOBS}
|
||||
|
||||
RUN rm ${MXE_PATH}/src/sdl2*.patch
|
||||
COPY vulkan-headers.mk \
|
||||
glib.mk \
|
||||
sdl2.mk \
|
||||
libsamplerate.mk \
|
||||
libressl.mk \
|
||||
${MXE_PATH}/src/
|
||||
|
||||
RUN make \
|
||||
MXE_TARGETS="${TARGETS}" \
|
||||
MXE_VERBOSE=true \
|
||||
MXE_TMP="/var/tmp" \
|
||||
MXE_PLUGIN_DIRS="plugins/llvm-mingw" \
|
||||
JOBS=${JOBS} \
|
||||
CFLAGS=-O2 \
|
||||
glib \
|
||||
libepoxy \
|
||||
libusb1 \
|
||||
pixman \
|
||||
libsamplerate \
|
||||
libressl \
|
||||
cmake \
|
||||
libslirp \
|
||||
sdl2 \
|
||||
vulkan-headers
|
||||
|
||||
RUN find ${MXE_PATH}/usr -executable -type f -exec chmod a+x {} \;
|
||||
|
||||
ENV CROSSPREFIX=aarch64-w64-mingw32.static-
|
||||
ENV CROSSAR=${CROSSPREFIX}ar
|
||||
ENV PATH="${MXE_PATH}/.ccache/bin:${MXE_PATH}/usr/x86_64-pc-linux-gnu/bin:${MXE_PATH}/usr/bin:${PATH}"
|
||||
Reference in New Issue
Block a user