name: cross only-arches: - x86_64 modules: - name: cross-gcc-pass1 sources: &GCC_SOURCES - type: archive url: https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz sha256: b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c - type: archive url: https://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.lz sha256: 3f33f127bcb6b2c3601676cd3281df45824b148cbf688b73c0fc8248793667d9 dest: gmp - type: archive url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz sha256: 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f dest: mpfr - type: archive url: https://ftp.gnu.org/gnu/mpc/mpc-1.2.0.tar.gz sha256: e90f2d99553a9c19911abdb4305bf8217106a957e3994436428572c8dfe8fda6 dest: mpc - type: file path: removeinc.sh - type: shell commands: - sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in - sed -i 's@m64=\.\./lib64@m64=\.\./lib/x86_64-linux-gnu@' gcc/config/i386/t-linux64 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 cleanup-platform: &GCC_CLEANUP_PLATFORM - /bin - /lib/gcc - /libexec/gcc - /share - name: cross-delete-old-gcc buildsystem: simple build-commands: - rm -rf /usr/lib/gcc/x86_64-unknown-linux-gnu - rm -rf /usr/x86_64-unknown-linux-gnu - name: cross-glibc-32bit-pass1 sources: &GLIBC_SOURCE_32BIT - &GLBIC_SOURCE type: archive url: https://ftp.gnu.org/gnu/glibc/glibc-2.32.tar.xz sha256: 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836 - 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: -O3 cflags-override: true cxxflags: -O3 cxxflags-override: true no-debuginfo: true no-debuginfo-compression: 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-fix-static-coreutils sources: - type: archive url: https://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz sha256: 4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa builddir: true config-opts: - --enable-single-binary=shebangs build-options: make-args: - SHARED=0 make-install-args: - DESTDIR=/usr/tmp - install cflags: -static cxxflags: -static post-install: - cp /usr/bin/cp . && ./cp -rav /usr/tmp/usr/. /usr/. && rm -rf /usr/tmp modules: - name: cross-glibc-64bit-pass0 sources: &GLIBC_SOURCE_64BIT - *GLBIC_SOURCE - 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 builddir: true build-options: make-install-args: - DESTDIR=/usr/tmp - install cflags: -O3 cflags-override: true cxxflags: -O3 cxxflags-override: true no-debuginfo: true no-debuginfo-compression: true post-install: - cp -rav /usr/tmp/usr/lib/x86_64-linux-gnu/*.a /usr/lib/x86_64-linux-gnu/ && rm -rfv /usr/tmp - name: cross-lib64-merge buildsystem: simple build-commands: - find /usr/lib64 -type f -print | xargs -I{} sh -c 'ln -s "$(readlink -f "/usr/lib/x86_64-linux-gnu/{}")" "{}"' - rm -rfv /usr/lib64 && ln -s lib/x86_64-linux-gnu /usr/lib64 - name: cross-glibc-64bit-pass1 sources: *GLIBC_SOURCE_64BIT config-opts: *GLIBC_CONFIG_64BIT builddir: true build-options: &GLIBC_BUILD_OPTIONS_64BIT make-install-args: - DESTDIR=/usr/tmp - install cflags: -O3 cflags-override: true cxxflags: -O3 cxxflags-override: true no-debuginfo: true no-debuginfo-compression: true post-install: &GLIBC_POST_INSTALL_64BIT - mv -v /usr/tmp/usr/sbin/* /usr/tmp/usr/bin && rm -rf /usr/tmp/usr/sbin - cp -rav /usr/tmp/usr/. /usr/ && cp -rav /usr/tmp/etc/. /etc/ && rm -rfv /usr/tmp - name: cross-pre-gcc-clean sources: - type: file path: removeinc.sh buildsystem: simple build-commands: - chmod +x removeinc.sh && ./removeinc.sh /usr/lib/x86_64-linux-gnu/include - chmod +x removeinc.sh && ./removeinc.sh /usr/lib32/include - name: cross-test buildsystem: simple build-commands: &TESTS - echo -e '#include \nint 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_SOURCES config-opts: - --host=x86_64-unknown-linux - --build=x86_64-unknown-linux - --target=x86_64-unknown-linux - --disable-nls - --enable-lto - --enable-multilib subdir: libstdc++-v3 builddir: true build-options: cflags-override: true cxxflags-override: true no-debuginfo: true no-debuginfo-compression: true post-install: - make -j$FLATPAK_BUILDER_N_JOBS check - name: cross-autogen sources: - type: archive url: https://ftp.gnu.org/gnu/autogen/rel5.18.16/autogen-5.18.16.tar.xz sha256: f8a13466b48faa3ba99fe17a069e71c9ab006d9b1cfabe699f8c60a47d5bb49a - type: shell commands: - sed -i 's@def_bf\[ MAXNAMELEN@def_bf\[ MAXNAMELEN + 4@' getdefs/getdefs.c config-opts: - --disable-dependency-tracking - --disable-error-on-warning cleanup: - "*" modules: - name: cross-guile2 sources: - type: archive url: https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.lz sha256: 5de7c4d28fa25c232512a4d1e76e6152a721dde568a6b1310971e1ea49e18c46 config-opts: - --disable-error-on-warning - --disable-shared - --enable-static builddir: true build-options: cflags: -DHAVE_GC_IS_HEAP_PTR -DHAVE_GC_MOVE_DISAPPEARING_LINK cleanup: - "*" modules: - name: cross-bdw-gc sources: - type: archive url: https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz sha256: 436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d config-opts: - --disable-shared - --enable-static - --enable-threads=posix cleanup: - "*" - 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++,d,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 - cp -rad /usr/tmp/usr/* /usr/ && rm -rf /usr/tmp # Fixes strange bug - chmod +x ../removeinc.sh && ../removeinc.sh /usr/lib/x86_64-linux-gnu/include - chmod +x ../removeinc.sh && ../removeinc.sh /usr/lib32/include cleanup-platform: *GCC_CLEANUP_PLATFORM - name: cross-test2 buildsystem: simple build-commands: - 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: make-install-args: - DESTDIR=/usr/tmp - install builddir: true post-install: *GCC_POST_INSTALL cleanup-platform: *GCC_CLEANUP_PLATFORM - name: cross-glibc-32bit sources: *GLIBC_SOURCE_32BIT config-opts: *GLIBC_CONFIG_32BIT build-options: make-install-args: - install_root=/usr/tmp - install cflags: -O3 cflags-override: true cxxflags: -O3 cxxflags-override: true post-install: *GLIBC_POST_INSTALL_32BIT builddir: true - name: cross-glibc-64bit sources: *GLIBC_SOURCE_64BIT config-opts: *GLIBC_CONFIG_64BIT build-options: make-install-args: - DESTDIR=/usr/tmp - install cflags: -O3 cflags-override: true cxxflags: -O3 cxxflags-override: true post-install: *GLIBC_POST_INSTALL_64BIT builddir: true - name: cross-test3 buildsystem: simple build-commands: *TESTS