Support mingw in runtime

master
Marko Semet 2020-01-25 19:17:52 +01:00
parent 80b2fe6b29
commit 1b96bf4e71
4 changed files with 122 additions and 101 deletions

View File

@ -1,5 +1,6 @@
name: gcc-base-meta
modules:
# GCC libs
- name: cross-gmp
sources:
- type: archive
@ -63,11 +64,44 @@ modules:
- libtool --finish /usr/lib/x86_64-linux-gnu
only-arches:
- x86_64
- name: cross-binutils
sources:
# Binutils
- name: mingw-binutils-32bit
sources: &BINUTILS_SOURCES
- type: archive
url: https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz
sha256: ab66fc2d1c3ec0359b8e08843c9f33b63e8707efdff5e4cc5c200eae24722cbf
config-opts:
- --target=i686-w64-mingw32
- --disable-werror
- --enable-deterministic-archives
- --enable-lto
- --enable-plugins
- --enable-relro
- --with-system-zlib
builddir: true
only-arches:
- i386
- x86_64
cleanup-platform:
- "*"
- name: mingw-binutils-64bit
sources: *BINUTILS_SOURCES
config-opts:
- --target=x86_64-w64-mingw32
- --disable-werror
- --enable-deterministic-archives
- --enable-lto
- --enable-plugins
- --enable-relro
- --with-system-zlib
builddir: true
only-arches:
- x86_64
cleanup-platform:
- "*"
- name: cross-binutils
sources: *BINUTILS_SOURCES
config-opts:
- --host=x86_64-unknown-linux
- --build=x86_64-unknown-linux
@ -99,6 +133,8 @@ modules:
- /bin
only-arches:
- x86_64
# Glibc base headers
- name: cross-prepare-glibc
sources:
- type: archive

View File

@ -1,64 +1,5 @@
build-extension: true
id: de.marko10_000.winebarrels.Platform.ExtensionsV2.MinGW
branch: "v2.0"
sdk: de.marko10_000.winebarrels.Sdk
runtime: de.marko10_000.winebarrels.Platform
runtime-version: "v2.0"
separate-locales: false
build-options:
prefix: /usr/wine_extensions/v2/MinGW
env:
C_INCLUDE_PATH: /usr/wine_extensions/v2/MinGW/include
CPLUS_INCLUDE_PATH: /usr/wine_extensions/v2/MinGW/include
prepend-path: /usr/wine_extensions/v2/MinGW/bin
prepend-ld-library-path: /usr/wine_extensions/v2/MinGW/lib
prepend-pkg-config-path: /usr/wine_extensions/v2/MinGW/lib/pkgconfig
ldflags: -L/usr/wine_extensions/v2/MinGW/lib
ldflags-override: true
name: mingw-meta
modules:
# Check arches
- name: check-arch
buildsystem: simple
build-commands:
- "false"
skip-arches:
- i386
- x86_64
# Bintutils
- name: mingw-binutils-32bit
sources: &BINUTILS_SOURCES
- type: archive
url: https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz
sha256: ab66fc2d1c3ec0359b8e08843c9f33b63e8707efdff5e4cc5c200eae24722cbf
config-opts:
- --target=i686-w64-mingw32
- --disable-werror
- --enable-deterministic-archives
- --enable-lto
- --enable-plugins
- --enable-relro
- --with-system-zlib
builddir: true
only-arches:
- i386
- x86_64
- name: mingw-binutils-64bit
sources: *BINUTILS_SOURCES
config-opts:
- --target=x86_64-w64-mingw32
- --disable-werror
- --enable-deterministic-archives
- --enable-lto
- --enable-plugins
- --enable-relro
- --with-system-zlib
builddir: true
only-arches:
- x86_64
# Headers
- name: mingw-headers-32bit
sources: &MINGW_SOURCES
@ -70,11 +11,13 @@ modules:
- --target=i686-w64-mingw32
- --enable-sdk=all
- --enable-secure-api
- --prefix=/usr/wine_extensions/v2/MinGW/i686-w64-mingw32
- --prefix=/usr/i686-w64-mingw32
builddir: true
only-arches:
- i386
- x86_64
cleanup-platform:
- "*"
- name: mingw-headers-64bit
sources: *MINGW_SOURCES
subdir: mingw-w64-headers
@ -82,10 +25,12 @@ modules:
- --target=x86_64-w64-mingw32
- --enable-sdk=all
- --enable-secure-api
- --prefix=/usr/wine_extensions/v2/MinGW/x86_64-w64-mingw32
- --prefix=/usr/x86_64-w64-mingw32
builddir: true
only-arches:
- x86_64
cleanup-platform:
- "*"
# GCC only compiler
- name: mingw-gcc-pass1-32bit
@ -96,13 +41,13 @@ modules:
config-opts: &GCC_CONF_32BIT
- --target=i686-w64-mingw32
- --disable-multilib
- --disable-shared
- --enable-cet=auto
- --enable-languages=c,c++,lto
- --enable-libstdcxx-time=yes
- --enable-libstdcxx-filesystem-ts=yes
- --enable-lto
- --enable-plugin
- --enable-shared
- --enable-static
- --with-system-zlib
builddir: true
@ -115,18 +60,20 @@ modules:
only-arches:
- i386
- x86_64
cleanup-platform:
- "*"
- name: mingw-gcc-pass1-64bit
sources: *GCC_SOURCES
config-opts: &GCC_CONF_64BIT
- --target=x86_64-w64-mingw32
- --disable-multilib
- --disable-shared
- --enable-cet=auto
- --enable-languages=c,c++,lto
- --enable-libstdcxx-time=yes
- --enable-libstdcxx-filesystem-ts=yes
- --enable-lto
- --enable-plugin
- --enable-shared
- --enable-static
- --with-system-zlib
builddir: true
@ -138,8 +85,10 @@ modules:
- make install-gcc
only-arches:
- x86_64
cleanup-platform:
- "*"
# MinGW CRT
# MinGW CRT pass
- name: mingw-crt-32bit
sources: *MINGW_SOURCES
subdir: mingw-w64-crt
@ -147,13 +96,21 @@ modules:
- --host=i686-w64-mingw32
- --target=i686-w64-mingw32
- --disable-lib64
- --disable-shared
- --enable-lib32
- --enable-static
- --enable-wildcard
- --prefix=/usr/wine_extensions/v2/MinGW/i686-w64-mingw32
- --prefix=/usr/i686-w64-mingw32
builddir: true
build-options:
cflags-override: true
cxxflags-override: true
ldflags-override: true
only-arches:
- i386
- x86_64
cleanup-platform:
- "*"
- name: mingw-crt-64bit
sources: *MINGW_SOURCES
subdir: mingw-w64-crt
@ -161,12 +118,20 @@ modules:
- --host=x86_64-w64-mingw32
- --target=x86_64-w64-mingw32
- --disable-lib32
- --disable-shared
- --enable-lib64
- --enable-static
- --enable-wildcard
- --prefix=/usr/wine_extensions/v2/MinGW/x86_64-w64-mingw32
- --prefix=/usr/x86_64-w64-mingw32
builddir: true
build-options:
cflags-override: true
cxxflags-override: true
ldflags-override: true
only-arches:
- x86_64
cleanup-platform:
- "*"
# GCC pass 2 full
- name: mingw-gcc-pass2-32bit
@ -174,18 +139,22 @@ modules:
config-opts: *GCC_CONF_32BIT
builddir: true
ensure-writable:
- /lib/gcc/*/*/install-tools/*.conf
- /lib/*/gcc/*/*/install-tools/*.conf
only-arches:
- i386
- x86_64
cleanup-platform:
- "*"
- name: mingw-gcc-pass2-64bit
sources: *GCC_SOURCES
config-opts: *GCC_CONF_64BIT
builddir: true
ensure-writable:
- /lib/gcc/*/*/install-tools/*.conf
- /lib/*/gcc/*/*/install-tools/*.conf
only-arches:
- x86_64
cleanup-platform:
- "*"
# MinGW Winpthreads
- name: mingw-winpthreads-32bit
@ -194,74 +163,98 @@ modules:
config-opts:
- --host=i686-w64-mingw32
- --target=i686-w64-mingw32
- --enable-shared
- --disable-shared
- --enable-static
- --prefix=/usr/wine_extensions/v2/MinGW/i686-w64-mingw32
builddir: true
build-options:
cflags-override: true
cxxflags-override: true
ldflags-override: true
libdir: /usr/i686-w64-mingw32/lib
prefix: /usr/i686-w64-mingw32
#post-install:
# - mv -v /usr/i686-w64-mingw32/bin/*.dll /usr/i686-w64-mingw32/lib
only-arches:
- i386
- x86_64
cleanup-platform:
- "*"
- name: mingw-winpthreads-64bit
sources: *MINGW_SOURCES
subdir: mingw-w64-libraries/winpthreads
config-opts:
- --host=x86_64-w64-mingw32
- --target=x86_64-w64-mingw32
- --enable-shared
- --disable-shared
- --enable-static
- --prefix=/usr/wine_extensions/v2/MinGW/x86_64-w64-mingw32
builddir: true
build-options:
cflags-override: true
cxxflags-override: true
ldflags-override: true
libdir: /usr/x86_64-w64-mingw32/lib
prefix: /usr/x86_64-w64-mingw32
#post-install:
# - mv -v /usr/x86_64-w64-mingw32/bin/*.dll /usr/x86_64-w64-mingw32/lib
only-arches:
- x86_64
cleanup-platform:
- "*"
# GCC full
- name: mingw-gcc-pass-32bit
- name: mingw-gcc-32bit
sources: *GCC_SOURCES
config-opts:
- --target=i686-w64-mingw32
- --disable-multilib
- --disable-shared
- --enable-cet=auto
- --enable-languages=c,c++,lto
- --enable-libstdcxx-time=yes
- --enable-libstdcxx-filesystem-ts=yes
- --enable-lto
- --enable-plugin
- --enable-shared
- --enable-static
- --enable-threads=posix
- --with-system-zlib
builddir: true
build-options:
prepend-ld-library-path: /usr/i686-w64-mingw32/lib
#prepend-path: /usr/i686-w64-mingw32/bin
#ldflags-override: true
#ldflags: -L/usr/i686-w64-mingw32/lib
#prefix: /usr
ensure-writable:
- /lib/gcc/*/*/install-tools/*.conf
- /lib/*/gcc/*/*/install-tools/*.conf
only-arches:
- i386
- x86_64
- name: mingw-gcc-pass2-64bit
cleanup-platform:
- "*"
- name: mingw-gcc-64bit
sources: *GCC_SOURCES
config-opts:
- --target=x86_64-w64-mingw32
- --disable-multilib
- --disable-shared
- --enable-cet=auto
- --enable-languages=c,c++,lto
- --enable-libstdcxx-time=yes
- --enable-libstdcxx-filesystem-ts=yes
- --enable-lto
- --enable-plugin
- --enable-shared
- --enable-static
- --enable-threads=posix
- --with-system-zlib
builddir: true
build-options:
prepend-ld-library-path: /usr/x86_64-w64-mingw32/lib
#ldflags: -L/usr/x86_64-w64-mingw32/lib
#ldflags-override: true
#prefix: /usr
ensure-writable:
- /lib/gcc/*/*/install-tools/*.conf
- /lib/*/gcc/*/*/install-tools/*.conf
only-arches:
- x86_64
# Finalize
- name: update-elf
sources:
- type: file
path: elf_compress.py
buildsystem: simple
build-commands:
- python3 elf_compress.py /usr/wine_extensions/v2/MinGW
cleanup-platform:
- "*"

View File

@ -1,3 +1,4 @@
name: meta-sdk
modules:
- cross.yaml
- mingw.yaml
- cross.yaml

View File

@ -1,14 +1,5 @@
#! /usr/bin/env bash
# Args: <file> <arch> <builder-args> [<repo>]
if [ -z "VERBOSE" ]; then
HASH_MODULE_ARGS="-v"
else
HASH_MODULE_ARGS=""
fi
CONF_PATH="$(dirname "$0")" &&
"$CONF_PATH/../../../tools/hash_modules.py" $HASH_MODULE_ARGS --require-build "$1" "$2" &&
exec "$CONF_PATH/../../../tools/build.sh" "$1" "$2" "$3" "$4"
echo 'No build required.'
exec "$CONF_PATH/../../../tools/build_when_required.sh" "$1" "$2" "$3" "$4"