update_cache: true
- name: Ensure cross-compilers packages are installed.
- apt: "name={{ cross_compilers_packages }} state=present"
+ ansible.builtin.apt:
+ name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture}}', default=[]))}}"
- name: Install legacy cross compilers
when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' and compilers_legacy_install
- gcc-9-powerpc-linux-gnu
- gcc-9-riscv64-linux-gnu
- gcc-9-s390x-linux-gnu
+
+cross_compilers_packages_exclude_i386:
+ - gcc-i686-linux-gnu
+ - gcc-10-i686-linux-gnu
+ - gcc-9-i686-linux-gnu
- gcc-11-powerpc-linux-gnu
- gcc-11-riscv64-linux-gnu
- gcc-11-s390x-linux-gnu
+
+cross_compilers_packages_exclude_i386:
+ - gcc-i686-linux-gnu
+ - gcc-13-i686-linux-gnu
+ - gcc-12-i686-linux-gnu
+ - gcc-11-i686-linux-gnu
- gcc-11-powerpc-linux-gnu
- gcc-11-riscv64-linux-gnu
- gcc-11-s390x-linux-gnu
+
+cross_compilers_packages_exclude_i386:
+ - gcc-i686-linux-gnu
+ - gcc-13-i686-linux-gnu
+ - gcc-12-i686-linux-gnu
+ - gcc-11-i686-linux-gnu
- gcc-powerpc-linux-gnu
- gcc-riscv64-linux-gnu
- gcc-s390x-linux-gnu
+
- gcc-12-aarch64-linux-gnu
- gcc-12-arm-linux-gnueabihf
- gcc-12-i686-linux-gnu
- gcc-12-powerpc-linux-gnu
- gcc-12-riscv64-linux-gnu
- gcc-12-s390x-linux-gnu
+
- gcc-11-aarch64-linux-gnu
- gcc-11-arm-linux-gnueabihf
- gcc-11-i686-linux-gnu
# be fetched from a snapshot source instead
- gcc-11-powerpc-linux-gnu
- gcc-11-riscv64-linux-gnu
+
+# Packages not available on i386
+cross_compilers_packages_exclude_i386:
+ - gcc-i686-linux-gnu
+ - gcc-12-i686-linux-gnu
+ - gcc-11-i686-linux-gnu
+
cross_compilers_debian_bookworm_snapshot: true