WineBarrels-BasePlatforms/BasePlatform/v2/sdk/cross.yaml

253 lines
9.2 KiB
YAML

name: cross
only-arches:
- x86_64
modules:
- name: cross-gcc-pass1
sources: &GCC_SOURCES
- &GCC_SOURCE
type: archive
url: https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz
sha256: ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
- type: patch
path: ./gcc.patch
- type: shell
commands:
- ln -s /usr/bin/cpp /lib/cpp
config-opts:
- --host=x86_64-unknown-linux
- --build=x86_64-unknown-linux
- --target=x86_64-unknown-linux
- --disable-bootstrap
- --disable-decimal-float
- --disable-libatomic
- --disable-libmpx
- --disable-libgomp
- --disable-libquadmath
- --disable-libstdcxx
- --disable-libssp
- --disable-libvtv
- --disable-nls
- --disable-shared
- --disable-threads
- --enable-default-pie
- --enable-default-ssp
- --enable-languages=c,c++,lto
- --enable-linker-build-id
- --enable-lto
- --enable-multilib
- --libdir=/usr/lib
- --with-glibc-version=2.30
- --with-newlib
- --with-system-zlib
- --without-headers
- --without-isl
builddir: true
build-options:
no-debuginfo: true
no-debuginfo-compression: true
post-install:
- rm -v /lib/cpp
cleanup-platform: &GCC_CLEANUP_PLATFORM
- /bin
- /libexec/gcc
- /share
- name: cross-glibc-32bit-pass1
sources: &GLIBC_SOURCE_32BIT
- type: archive
url: https://ftp.gnu.org/gnu/glibc/glibc-2.30.tar.xz
sha256: e2c4114e569afbe7edbc29131a43be833850ab9a459d81beb2588016d2bbb8af
- type: shell
commands:
- echo slibdir=/usr/lib32 >> configparms
- echo rtlddir=/usr/lib32 >> configparms
config-opts: &GLIBC_CONFIG_32BIT
- --host=i686-unknown-linux
- --build=i686-unknown-linux
- --target=i686-unknown-linux
- --disable-werror
- --enable-bind-now
- --enable-cet
- --enable-multi-arch
- --enable-obsolete-nsl
- --enable-shared
- --enable-stack-protector=strong
- --enable-stackguard-randomization
- --enable-static
- --enable-static-pie
- --enable-tunables
- --libdir=/usr/lib32
- --libexecdir=/usr/lib32
- CC=/usr/bin/gcc -m32
- CXX=/usr/bin/g++ -m32
- is_selinux_enabled=false
build-options: &GLIBC_BUILD_OPTIONS_32BIT
make-install-args:
- install_root=/usr/tmp
- install
cflags: -D_FORTIFY_SOURCE=0 -O3
cflags-override: true
cxxflags: -D_FORTIFY_SOURCE=0 -O3
cxxflags-override: true
post-install: &GLIBC_POST_INSTALL_32BIT
- rm -rvf /usr/tmp/usr/bin /usr/tmp/usr/sbin /usr/tmp/usr/lib /usr/tmp/usr/share
- find "/usr/tmp/usr/include" -type f -not -name '*-32.h' -delete
- cp -raPv /usr/tmp/usr/* /usr/ && rm -rf /usr/tmp
builddir: true
- name: cross-glibc-64bit-pass1
sources: &GLIBC_SOURCE_64BIT
- type: archive
url: https://ftp.gnu.org/gnu/glibc/glibc-2.30.tar.xz
sha256: e2c4114e569afbe7edbc29131a43be833850ab9a459d81beb2588016d2bbb8af
- type: shell
commands:
- echo slibdir=/usr/lib/x86_64-linux-gnu >> configparms
- echo rtlddir=/usr/lib/x86_64-linux-gnu >> configparms
- echo complocaledir=/usr/lib/locale >> configparms
config-opts: &GLIBC_CONFIG_64BIT
- --host=x86_64-unknown-linux
- --build=x86_64-unknown-linux
- --target=x86_64-unknown-linux
- --disable-werror
- --enable-bind-now
- --enable-cet
- --enable-multi-arch
- --enable-obsolete-nsl
- --enable-shared
- --enable-stack-protector=strong
- --enable-stackguard-randomization
- --enable-static
- --enable-static-pie
- --enable-tunables
- is_selinux_enabled=false
build-options: &GLIBC_BUILD_OPTIONS_64BIT
make-install-args:
- install_root=/usr/tmp
- install
cflags: -D_FORTIFY_SOURCE=0 -O3
cflags-override: true
cxxflags: -D_FORTIFY_SOURCE=0 -O3
cxxflags-override: true
post-install: &GLIBC_POST_INSTALL_64BIT
- mv -v /usr/tmp/usr/sbin/* /usr/tmp/usr/bin && rm -rf /usr/tmp/usr/sbin
- cp -raPv /usr/tmp/usr/* /usr && cp -rav /usr/tmp/etc/* /etc && rm -rf /usr/tmp
builddir: true
- name: cross-test
buildsystem: simple
build-commands: &TESTS
- echo "int main() { return 0; }" > test.c
- gcc test.c
- ./a.out
- gcc -m64 test.c
- ./a.out
- gcc -m32 test.c
- ./a.out
build-options:
env:
PATH: "/usr/tools/usr/bin:/usr/bin"
- name: cross-stdcpp-pass
sources:
- *GCC_SOURCE
- type: shell
commands:
- sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64
- echo "exec \"\$(dirname \$0)/libstdc++-v3/configure\" \"\$@\"" > configure && chmod +x configure
- ln -s /usr/bin/cpp /lib/cpp
config-opts:
- --host=x86_64-unknown-linux
- --build=x86_64-unknown-linux
- --target=x86_64-unknown-linux
- --prefix=/usr
- --disable-werror
- --enable-multilib
- --enable-shared
- --enable-static
builddir: true
post-install:
- make -j$FLATPAK_BUILDER_N_JOBS check
- rm -v /lib/cpp
- name: cross-gcc-pass2
sources: *GCC_SOURCES
config-opts: &GCC_CONFIG
- --host=x86_64-unknown-linux
- --build=x86_64-unknown-linux
- --target=x86_64-unknown-linux
- --enable-__cxa_atexit
- --enable-bootstrap
- --enable-default-pie
- --enable-default-ssp
- --enable-languages=c,c++,lto
- --enable-libstdcxx-time=yes
- --enable-libstdcxx-filesystem-ts=yes
- --enable-linker-build-id
- --enable-lto
- --enable-multiarch
- --enable-multilib
- --enable-plugin
- --enable-shared
- --enable-static
- --enable-vtable-verify
- --libdir=/usr/lib
- --without-isl
- CC=/usr/bin/gcc
- CXX=/usr/bin/g++
builddir: true
build-options: &GCC_BUILD_OPTIONS
make-install-args:
- DESTDIR=/usr/tmp
- install
no-debuginfo: true
no-debuginfo-compression: true
post-install: &GCC_POST_INSTALL
- make -j$FLATPAK_BUILDER_N_JOBS check || true
- rm -v /lib/cpp
cleanup-platform: *GCC_CLEANUP_PLATFORM
- name: cross-test2
buildsystem: simple
build-commands:
- cp -rad /usr/tmp/usr/* /usr/ && rm -rf /usr/tmp # Fixes strange bug
- echo "int main() { return 0; }" > test.c
- gcc test.c
- ./a.out
- gcc -m64 test.c
- ./a.out
- gcc -m32 test.c
- ./a.out
- name: cross-glibc-32bit-pass2
sources: *GLIBC_SOURCE_32BIT
config-opts: *GLIBC_CONFIG_32BIT
build-options: *GLIBC_BUILD_OPTIONS_32BIT
post-install: *GLIBC_POST_INSTALL_32BIT
builddir: true
- name: cross-glibc-64bit-pass2
sources: *GLIBC_SOURCE_64BIT
config-opts: *GLIBC_CONFIG_64BIT
build-options: *GLIBC_BUILD_OPTIONS_64BIT
post-install: *GLIBC_POST_INSTALL_64BIT
builddir: true
- name: cross-gcc
sources: *GCC_SOURCES
config-opts: *GCC_CONFIG
build-options: *GCC_BUILD_OPTIONS
builddir: true
post-install: *GCC_POST_INSTALL
cleanup-platform: *GCC_CLEANUP_PLATFORM
- name: cross-move-gcc
buildsystem: simple
build-commands:
- cp -rad /usr/tmp/usr/* /usr/ && rm -rf /usr/tmp # Fixes strange bug
- name: cross-glibc-32bit
sources: *GLIBC_SOURCE_32BIT
config-opts: *GLIBC_CONFIG_32BIT
build-options: *GLIBC_BUILD_OPTIONS_32BIT
post-install: *GLIBC_POST_INSTALL_32BIT
builddir: true
- name: cross-glibc-64bit
sources: *GLIBC_SOURCE_64BIT
config-opts: *GLIBC_CONFIG_64BIT
build-options: *GLIBC_BUILD_OPTIONS_64BIT
post-install: *GLIBC_POST_INSTALL_64BIT
builddir: true
- name: cross-test3
buildsystem: simple
build-commands: *TESTS