From d3933a24d1abdcb56f45e6076cb84a1110674a8a Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 23 Apr 2019 17:59:29 +0100 Subject: [PATCH] CI: Add an x86 MinGW-w64 cross build Only cross-build for x86 MinGW-w64, as x64 MinGW-w64 will probably require fixing LLP64 issues. I don't know any source for pre-built cross-dependencies of the X server, so build these from git. Don't build with GLX enabled, so I don't have to deal with cross-building mesa and it's dependencies, for the moment. --- .gitlab-ci.yml | 8 ++- .gitlab-ci/cross-i686-w64-mingw32.txt | 20 +++++++ .gitlab-ci/cross-prereqs-build.sh | 79 +++++++++++++++++++++++++++ .gitlab-ci/debian-install.sh | 6 ++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci/cross-i686-w64-mingw32.txt create mode 100755 .gitlab-ci/cross-prereqs-build.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35d347411..75b2aed31 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ variables: UPSTREAM_REPO: xorg/xserver FDO_DISTRIBUTION_VERSION: buster-slim FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh' - FDO_DISTRIBUTION_TAG: "2021-01-19-git" + FDO_DISTRIBUTION_TAG: "2021-04-06" include: - project: 'freedesktop/ci-templates' @@ -83,3 +83,9 @@ meson-noglamor: variables: MESON_EXTRA_OPTIONS: > -Dglamor=false + +mingw-cross-build: + extends: .common-build-and-test + script: + - meson --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true build/ + - ninja -j${FDO_CI_CONCURRENT:-4} -C build/ install diff --git a/.gitlab-ci/cross-i686-w64-mingw32.txt b/.gitlab-ci/cross-i686-w64-mingw32.txt new file mode 100644 index 000000000..1c04f6547 --- /dev/null +++ b/.gitlab-ci/cross-i686-w64-mingw32.txt @@ -0,0 +1,20 @@ +[binaries] +c = 'i686-w64-mingw32-gcc' +cpp = 'i686-w64-mingw32-g++' +ar = 'i686-w64-mingw32-ar' +strip = 'i686-w64-mingw32-strip' +pkgconfig = '/usr/local/bin/i686-w64-mingw32-pkg-config' +windres = 'i686-w64-mingw32-windres' +exe_wrapper = 'wine' + +[properties] +# Directory that contains 'bin', 'lib', etc for the toolchain +root = '/usr/i686-w64-mingw32' +# Directory that contains 'bin', 'lib', etc which have been cross-compiled +sys_root = '/usr/i686-w64-mingw32' + +[host_machine] +system = 'windows' +cpu_family = 'x86' +cpu = 'i686' +endian = 'little' diff --git a/.gitlab-ci/cross-prereqs-build.sh b/.gitlab-ci/cross-prereqs-build.sh new file mode 100755 index 000000000..3decf707b --- /dev/null +++ b/.gitlab-ci/cross-prereqs-build.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +set -e +set -o xtrace + +HOST=$1 + +# Debian's cross-pkg-config wrappers are broken for MinGW targets, since +# dpkg-architecture doesn't know about MinGW target triplets. +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 +cat >/usr/local/bin/${HOST}-pkg-config <= 1.18