- name: Ensure cross-compilers packages are installed.
ansible.builtin.apt:
- name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture}}', default=[]))}}"
+ name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}"
- name: Install legacy cross compilers
when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' and compilers_legacy_install
- gcc-12-i686-linux-gnu
- gcc-11-i686-linux-gnu
+# Packages not available on aarch64
+cross_compilers_packages_exclude_aarch64:
+ - gcc-aarch64-linux-gnu
+ - gcc-12-aarch64-linux-gnu
+ - gcc-11-aarch64-linux-gnu
+ - gcc-powerpc-linux-gnu
+ - gcc-12-powerpc-linux-gnu
+ - gcc-11-powerpc-linux-gnu
+
+# Packages not available on armhf
+# Yeah, that's all of them...
+cross_compilers_packages_exclude_armv7l:
+ - gcc-aarch64-linux-gnu
+ - gcc-arm-linux-gnueabihf
+ - gcc-i686-linux-gnu
+ - gcc-powerpc64le-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-powerpc64le-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
+ - gcc-11-powerpc64le-linux-gnu
+ - gcc-11-s390x-linux-gnu
+ - gcc-11-powerpc-linux-gnu
+ - gcc-11-riscv64-linux-gnu
+ - gcc-aarch64-linux-gnu
+ - gcc-12-aarch64-linux-gnu
+ - gcc-11-aarch64-linux-gnu
+ - gcc-riscv64-linux-gnu
+ - gcc-12-riscv64-linux-gnu
+ - gcc-11-riscv64-linux-gnu
+
cross_compilers_debian_bookworm_snapshot: true